Posts Tagged ‘programming’
Currently I’m developing something which has a learning curve, not so much because it is difficult to understand it, more because there are portions of it which seem illogical. I could delve into the issues I have, and this may become a more technical article, and that’s not what I want to discuss here.
The current project I’m working on has a reasonably complex business logic which it implements, adding to that a untried and unknown technology and it’s a receipt for a difficult sprint – meaning it’s difficult to correctly estimate the complexity of tasks within the User Stories. This makes it ideal for applying Test Driven Development. The advantage of TDD in this case is that an assumption is made when writing code, expressing this assumption in a test before writing the code makes it easier to verify this assumption.
Programmers, including me, are very good at “thinking of problems that don’t exist, and fixing them.” Test Driven Development gives me the advantage that I can express my expectations in a test, and assert the requirements which need to be met for a test to pass or fail. In this way I can postpone the fixing of this fictitious problem until the time that an issue occurs.
An added advantage is when issues occur. Programmers – like me – are often focused on the details of the implementation, which means that we will see potential issues and blame side-effects of the current code rather than focussing on the issue which is occurring. Creating incremental tests as evidence that the code is working correctly can help bolster your position and support your argument that the error is outside your code, it also has the advantage that other developers will immediately see that their changes are causing side effects. This is far more effective than creating a one-time proof.
Image source: Jerry Wong
“What I did for a project I was working on was I create a LD_PRELOAD library which overloaded the i/o operations and used gz and bz2. This could easily be adapted to overload with encryption library functions rather than compression libraries. You can also use this to keep the bash history in memory using a shared memory location.“
What I did which inspired the message above was to replace a number of functions – including read, write and lseek – with custom functions. What the underlying custom code did was fingerprint – using the magic file – the file to discover which compression mechanism was being used for an existing file, and when creating a new file it would use the compression based on the value set in an environment variable. The file was never extracted to and only held in memory as these were mostly streamed to and from disk compressed, which means that with a little tweaking that these could include a stream cipher, provided the key is long enough to avoid stream cipher attacks.
For completeness I’ll add here that the code supported the formats listed below, and a number of other historic formats and others that I don’t recall:
- pkzip (deflate)
Somebody else’s LD_PRELOAD examples can be found here: LD_PRELOAD fun
Image source: John Davey
In a previous article this week I mentioned that I wanted to create an A/B Testing PoC for myself, something I could use to see which item was more effective on my site. This is a pretty rough piece of code, which means that you will need to get a programmer to have a look at it. The image you see on the write is dependent on whether you are A or B, the underlying link also points do a different location.
You can try it out by clicking on the image.
I’m sure you’ve had the feeling on the last day of the Sprint that the way it went was awful:
- build environments broken for
- User Stories were badly estimates
- team members who had troubles
- team members were stressed about completing their User Stories
- new team member
- Project Owner wasn’t available
- not enough story points completed
- User Stories left uncompleted
Let me put you out of your misery, it was worse than you think. As the Scrum Master you probably feel bad, just think how your team feels. Like you they are now possibly demotivated and doubting themselves, and however much it was their and your fault it is now your task as Scrum Master to help get your team back on track.
Who’s going to motivate me?
–Anonymous Scrum Master
To answer that question you must realize that only you can motivate you, and that goes for your team too. Your task is not to motivate them, but to facilitate them to motivate and trust themselves and each other. There are many methods which can be used to achieve this, and I invite to to explore these to motivate yourself so you can motivate your team to become the best Scrum team.
Now it’s up to you and the team to align the team to the next Sprint, and complete the next Sprint with a win.
Image source: Jerry Wong
John R. Rymer wrote a piece on Forrester about the The Future Of Java, it’s pretty complete with the exception of the greatest weakness being called the greatest strength.
“Fewer young developers will learn Java first. One of Java’s greatest strengths has been the number of young developers who learn it as a first language.”
–John R. Rymer
It may have been an advantage for the adoption of Java as a programming language, but it is certainly not a strength of a programming language that students learn it as a first language.
Personally I don’t see it as an advantage for students to learn Java as a first language, it means that every language learned afterwards is seen from a perspective of a language which doesn’t teach the student simple rules like type safety or writing portable code. A programming language as teaching tool should allow a student to make all the mistakes which can be made, as a student learns more of their failures than from their successes. It should allow different programming modes, Object Oriented, Linear and a mixture.
I’ll stop here before I start talking about round pegs and square holes.
Image source: Hillary Hartley
As I mentioned before I mostly work in an Agile Scrum environment, with a little eXtreme Programming thrown in. This week I saw some messages go on the Scrum Development list by asking about assigning Story Points to bugs. There were some good opinions going by, and I hold to the idea that bugs fall into two categories:
- Programmer Errors
- Missed Requirements
The first is unavoidable, although they can be reduced with automated testing based on the User Story and Unit Testing of the underlying code.
As a users I want to move relations to a company
The second is an issue for the Project Owner, when the PO describes the User Story and leaves out certain requirements I believe that those are out of scope for the User Story. I’ll give an example of a User Story right.
The PO might neglect to add that the user might want to create a new company or a new relation in this flow and actually meant to word the User Story below. And naturally a User Story as in the example is still acceptable when the PO adds the requirements to the User Story description.
As a users I want to add or move a new or existing relations to a new or existing company
It’s also a task of the Scrum Team Members to ask the questions which will uncover these deficiencies in the User Story, so that deficiencies in the requirements are avoided.
Image source: Jerry Wong
I often build nice tools for myself, often customize them to myself with no regard for what a general users wants or needs. This is because it’s for me, and not for another, before I decide whether I release this under GPL or try to sell it I always ask myself the following questions before I make it ready to ship:
- Is there really a problem?
- Does my audience have this problem?
- Is there a solution which is better for my audience?
Let me take you through my thought process so you might better understand what I mean.
Is there really a problem?
In the case of some solutions I create, like the Roxen CMS or the YouTube Unsubscribe scripts I wrote, there really is a problem for others and myself. This doesn’t mean that everybody has this problem, just that I have it and that others probably have it too. It a problem with an easy solution, and something which can be quickly put together and released.
With other things I create, such as my script to take the items I download with Juice and order them in bundles sorted by audio, video, document or other, there is a clear problem for me, and this might not be a problem for others or this might not be the solution for others.
Does my audience have this problem?
In the case of the YouTube scripts there was clearly a problem for others, this functionality was not available. For Roxen CMS it was a case of this making life easier. Looking even further back I wrote a script which added a mark (un)read button for GMail rather than going into a pulldown menu to mark (un)read, this was downloaded quite a number of times and offered something that Google was not offering at that time.
Is there a solution which is better for my audience?
This is always a question, the solution I create is often the best for me or the best which was available at the time. It doesn’t have to be a good solution for others at all, it might not even work for others because it is too customized to my user experience that it neglects the user experience of others.
Taking the case of the Juice script all the directories are hardcoded for my system, they might work for somebody else and they aren’t designed to. The current version doesn’t clean up after itself, which means there is quite some mess left after the scripts are run. It deletes everything it doesn’t know, so it doesn’t take into account things that my audience might want such as images.
Image source: arjin j
In 2010 I was less focussed on programming articles on the blog than previous years, still I have managed to create some interesting articles with code in 2010. This is an overview of the activity:
The only questions that are asked in the Daily Scrum, aka Stand-Up, are: What…
UPDATE: GMail has introduced my number 3. YEAH! (Gmail introduces Priority In…
I like YouTube, and often subscribe to new channels and unsubscribe after a w…
Since I started working for my company I’ve been exposed to PCI DSS (Pa…
I don’t understand why url expansion after url shortening is such an is…
VeriSign – Personal Identity Portal is a OpenID provider with multiple …
Image source D’Arcy Norman