Sunday, September 15, 2013

Finally one simple solution to all your development problems

There is no silver bullet in software development, but surprisingly few people can accept it.  Over the years i have heard how this technology or some process will fix everything. Here are some of the top ones:

  • Guids will fix everything
  • DDD will fix everything
  • SOA will fix everything
  • More meetings will fix everything
  • Less meetings will fix everything
  • More process will fix everything
  • Less process will fix everything
  • NoSql will fix everything
  • Caching will fix everything
  • Cloud will fix everything
  • Scrum will fix everything
  • Moving to java/.net/ror/... for language will fix everything
  • Moving to oracle/sql/mysql/... for db will fix everything
  • TDD will fix everything

Feel free to add your own.

Many of these come and go, than come back again like clothing fashions from 80s.


There is actually only one thing that does fix everything and that's using Wiki for knowledge-base.  That actually does fix everything.

Monday, June 24, 2013

Are you managing developer time or just whistling Dixie?

Today's topic is managing developer time.   I know you are probably telling yourself:  But coding is an art and just like art it is free-form of expression that can't be limited by something strict like deadlines. This definitely applies to some of us, who are still living in our parent's basement and can't afford a tiny 24" ISP screen.  Unfortunately most great artists have suffered throughout their lives and have only been recognized long after their death.   They lived very poor and chose their art form over many of their basic needs.   In most cases development doesn't reach those levels, even though code can be as beautiful as sunset in Antarctica.


Show me the money


There are two types of development projects out there:
  • Projects with soft deadlines/no deadlines: Open Source, Personal sites, some internal projects
  • Projects with hard deadlines: software built for customers which costs money, both consulting projects and standalone products


Balance Act


When working on any project you are balancing three things:

                                    Soft Deadline                     Hard Deadline
- Cost                          Spend Free time                  Fixed
- Time                          Flexible                                Fixed
- Quality                       You choose                         Can vary. Depends on the other two.


If you take cost out of equation  you can really concentrate on Quality and Time.  There is definitely opportunity cost involved.  Developers working on soft deadline projects could be making money working on the client projects, but they get paid in something worth more then money.  Feeling good about contributing something to the world, having fun learning new technologies in personal time, improving internal processes that make work better for everyone.   These are all great things that are hard to measure.

On the other hand you have client projects.  Hard cold cash is the king.  In my company I like to send/receive payments in small purses of gold coins.   Well that only happened one time when we did that project for Vatican.  These guys are pretty old-fashioned.  Either way, how you receive payments is secondary.  The question is how do you balance Cost, Time and Quality and actually come out ahead at the end.

The answer is easy.  All you have to do is manage developer time.  THE END

If it would be that easy you would already do that... Right?   Unfortunately it is harder then feeding spinach to a two year old.  


What are developers made off


Here is the list of things developers like to do:

1. Code
2. See 1.
3. Watch Superhero movies
4. Talk shit on Reddit
5.
...
51. Eat Pizza
52. Talk shit on Reddit
53. Code
...
...
...
10002. Estimate tasks
10003. Write impl. details
10004. Update timesheet
10005. Go get something to eat, when you are really close to solving some issue, even though you have been really close for the last 16 hours and at this point you don't even remember what original problem was.



As you can see, the things related to managing Development time are very very far down the list.  As devs, we want to keep our Black Art to ourselves.  Otherwise if others in organization will find out what we really do all day, it will be very dangerous for everyone.  Let's go over each item we don't like to do.


The answer is 42


Estimating tasks


Who do you think I am Nostradamus.  I can't predict how long things will take or I wouldn't be losing all my money on Apple stock.  Let's make a deal.  I will just start coding and then we shall see.
How about not.  Yes estimating tasks is not an exact science, but with experience it is possible to get very good a it.  Estimates should not be set in stone, and may somewhat change as issues are discovered during writing of implementation details and actual implementation.  It is very important that PMs, Tech LEads and developers are clear on that.


Write Implementation Details


That seems like a huge waste of time.  I can just start coding and try several designs until I find the best one.  Then spend inordinate amount of time procrastinating back on forth on which approach is the best, while not actually going forward for weeks.  How about not.

I don't think anyone is stopping you from finding the best design.  All that's is asked is to spend some time thinking about problem up front.  Come up with preliminary design, do some proof of concept on small scale, talk to other developers about what you could be missing.  Yes it could be a waste of time, but in vast majority of cases it is not.  

Here are some interesting quotes about planning:

  • Plans are of little importance, but planning is essential – Winston Churchill
  • Plans are nothing; planning is everything. – Dwight D. Eisenhower
  • No battle plan survives contact with the enemy. – Helmuth von Moltke the Elder
  • A good plan, violently executed now, is better than a perfect plan next week. – George S. Patton

It seems like these guys are contradicting themselves in their quotes, but after you have worked on some projects without planning, which failed over and over, you can understand what these guys are talking about.  Your implementation details are living documents.  When you write your first draft, you have to be ready for change. Just like battle plans may change depending on how the bottle goes, your implementation details may not be the final approach you will take.

Here are some  things that come out of the process of writing impl. details:
  • Another developer can review your design.
  • If you can't clearly explain it on paper in a way that another person can understand, there is a good chance you need to think of a different approach.
  • By writing impl. details you are getting a clear understanding of the overall design and business requirements
  • Actual implementation is still an important task and your original plan may not go as planned, but you would be surprised how easy implementation becomes when you write down what you will do up front.

Update Elapsed Time for Estimated Tasks

This one is a doozy.  For almost all developers - the gene that makes them into good programmers usually comes paired up with a gene that makes them against updating elapsed time in timesheet.
It does not matter how simple Timesheet application is to use and that you only need like 5 mins to update your time for the day or two days,   developers will just agree with you that it is very important and not actually do it.

Some developers can be trained, while in other cases the only way to do it is by having PM or tech lead to seat down with developer and do it together.  Sooner or later there is a break through and they can do it on their own.

Conlusion

In conclusion to get development done on time, you need to make sure all tasks are estimated, implementation details are written and developers update elapsed time for the planned tasks.

"Sounds easy, no?  So why don't you just do it, Batman"
- Riddler



Monday, June 3, 2013

"I will do my best" is a sure way to miss a project deadline

There is a week left to finish the project.  As a PM you ask a developer lead if the project will be finished on time.  The answer is:
"I will do my best".

Sounds great, right?  So why is it you have a a sick feeling in your stomach. Ahhh, you remember that that's what Dev Lead said last release and release before, and it sounded as good as it does this time.  BUT...  what followed these words wasn't as good.  Deadlines were missed, developers scrambled to try to finish what was expected, but instead, like quick sand they were sucked into a Hell Week of sleepless nights, breaking bugs, and lots and lots of junk food.

But all that is now forgotten, and for this release it sure will be different. Thank god humans were gifted  with very short memories or  that stair in "Modern Family" would actually get fixed after 3 seasons.


I would say, yes there is a chance it will be different in this release.




But reality is that when you hear:
"I will do my best", you may as well go to supermarket and buy the biggest bag of cheetoes you can find, because that will be you diet for the week after deadline.

This phrase was encrypted using forgotten "BS++ slang". The original phrase is:
"There is basically know way this project is getting done on time, for all kinda reasons, but I have used this phrase many times before and that's what my PM wants to hear anyways."



I can see why PMs usually just end their line of questioning at this point and hope for the best:



Developers are scary they got sticks and scary language that sounds kinda like Klingon, but spoken with British accent.  If you cross them, you never know when they corner you with their collector edition phaser and the unforgettable "Kirk and Spock Bottle" music playing in background.

Taaaaaaa daaaa taaaaaa daaaaaa, ne ne ne ne ne ne ne neeeeeeeee, na na na na na na naaaaaaaaaaaa, taaaaaaa daaaa taaaaaa daaaaaa, 


The only solution to this is facing you fears.  Bite the bullet, think of how you gave only half of the money to your highschool bully that one time, or re-experience the last 30 minutes of the Good-buys in Lord of the Rings - whatever else relaxes your mind and gives your courage.

BONUS POINTS:  Tie developer to dentist chair and wave dental instruments in his/her face while repeating "Is it Safe?  Is it Saaaafe?"   German accent is a plus.

Keep asking Developer or Tech lead until you get one of the following two answers:
  1. Yes it will be done on time. (Preferred)
  2. No it will not be done on time (At which point you pull one tooth, as a lesson*)

These are both valid answers.  It should be encouraged for devs to tell the truth as early as possible, because the sooner PM knows that project might slip, the sooner he/she can take steps to correct the situation
  • Move some tasks 
  • Extend the deadline.
  • See if devs can work overtime (preferred not)

All these are valid options that should be discussed openly as soon as there is a possibility of project slipping. 

I would like to conclude this, by quoting an old book: "The truth will set you free, while truthiness will be paid back in free involuntary teeth extraction". Please check your medical insurance to see if it is covered.



NOTES
* The author of this Blog doesn't condone any type of violence**
** Unless you can prove that Developer is Enemy Combatant, which shouldn't be difficult after perfect record of 5+ missed deadlines.