I've learned. I'll share.

January 21, 2008

Garlic Programmers for Silver Code?

I just read Larry O'Brien's article about there being no silver programmers. He makes the case that although there may be great variance in programmer productivity, "the significant thing is not that some professional programmers are awesome, it's that some professional programmers suck". I admire Larry O'Brien greatly, and I think there is much wisdom in what he says here.

But I think he's missing something.

I have noticed a trend in my own productivity: my productivity varies greatly with the code base I'm working on. This variance may be greater than that between individual programmers. While many are rightly concerned with individual and team productivity, no ever talks about code base productivity. If we do, where does it lead us?

A few years ago, I was working for a small medical software company. One project was a new venture with a new code base. Though new, the code was already difficult to work with. Its design forced the developer to duplicate work. In my first meeting about the project, I was told we had to do lots of "fat fingering". I didn't even know what that meant. It turned out to mean typing almost the exact same thing over and over. I was horrified and ultimately wrote a code generation tool to automate the work. Though creating and maintaining it was extra work in itself, without it, doing many common tasks in this code easily took 3x longer than necessary.

After that project was "shelved", I was moved to the company's main product, which was older and had a much more "mature" code base. Actually, half was new-style (similar to what I had been working on) and half was old-style. The old-style code was even worse to work with. It was so bad that I was almost giddy whenever I could work on the new-style code. I'm sure you know what kind of code I'm talking about. Doing anything in this code easily took 3x even longer.

Combined, that's 9x slower. That seems too high. Is it even possible? How can a code base reduce productivity so much? Here are a few possibilities I thought of; I'm sure you can think of more:

  • Bad code leads to more code, and more code is slower to work with
  • Bad code is hard to understand
  • Bad code is dangerous to change
  • Bad code leads duplication of effort
  • Bad code leads to a slow change-compile-test cycle, leading to wasted time and loss of focus
  • Bad code from third party libraries can drive you crazy by crashing, malfunctioning randomly, or having little documentation
  • Bad code saps energy, interest, and morale

A bad code base makes any programmer less productive. Have you ever noticed that when you work from scratch with no code base to weigh you down, you can be much more productive? Imagine that as your baseline productivity. Now think of how long it takes you to accomplish something similar on a project that you're working on right now. How does it compare? I bet you're slower on the existing project.

But wait just a minute. Imagine if my list of the effects of bad code were reversed. What if, instead, it read:

  • Good code leads to less code, and less code is easier to work with
  • Good code is easy to understand
  • Good code is safe to change
  • Good code avoids duplication of effort
  • Good code leads to a quick change-compile-test cycle
  • Good code uses libraries which remove the need for "dirty work" and let you focus on the important problems
  • Good code is fun to work with!

A good code base makes any programmer more productive. Have you ever worked on a project that was so wonderful that you could crank out magnificent results almost effortlessly? Perhaps it has a great DSL embedded in it or has powerful infrastructure.

Even with conservative estimates, if bad code slows us down 5x and good code speeds us up just 2x faster, that's easily a 10x difference.

Maybe silver programmers don't exist. But is there "silver code"? What if there are programmers who are more adept at writing silver code? If they can make a code base that's just 2x easier to work with long-term, then that makes everyone that works on that code 2x more productive, possibly forever. If such programmers exist, then they must be extremely valuable, not so much because of their own productivity, but because of the effect they will have on the productivity of others in the future. Perhaps rather than "silver bullet" programmers that kill werewolves, these are just "garlic programmers" that ward of vampires.

Given that productivity can vary so much with quality of existing code, perhaps its worth looking for "garlic programmers" who will write code that will keep the rest us of productive long-term. I leave it as an exercise for the reader to figure out how to measure a programmer's garlic-ness :).

46 comments:

  1. " Good code leads to less code, and less code is slower to work with" ???

    ReplyDelete
  2. I can clearly recall the same situation occurring in my own professional career, within the past year sadly (i've since moved back into the world of my home office as an independent software engineer.)

    I was called in to work for a hosting provider to revamp many of their backend processes and interfaces, plus some automation and what not. The environment was in perl, so I know instantly that there would be some hellish times ahead. Anytime a code base exists in perl that isn't a series of small targeted scripts, there is generally spaghetti code and ugliness abound.

    I won't go into the specifics because I've already written that elsewhere on my own technical journal over a series of entries and months (http://www.codedevl.com) but a quick synopsis (and reason for leaving the job) was as such: I found my productivity reduced to a fraction of what it was prior to that position, and since leaving I have returned to my normal pace (a considerably high factor. What would take 5 days in that position takes about a day now, and I'm far more confident about the build quality of the current code.

    That situation partially revolved around the fact that the codebase was written by two people. One was a C code who got into perl but never stopped using C idioms, hence instead of using libraries and packages (.pm files), he named them with .h extensions and included them with the include directive. Global variables abound, no my, no use strict pragma (which is a must for well designed perl), and secondly the replacement programmer was the owner. He was not a coder by trade and it shows in his work. Yes, the system worked, but only with constant management and considerable human interactivity on a routine basis, including direct database manipulation of items which should have been controlled through coded mechanisms, especially the financial pieces.

    The level of depression I felt due to the disappointment by myself at the environment in which I was trying to operate made me realise that this problem was due to 10 years of a base codebase, and individuals that never took the necessary time to learn real best-practices, implement systems for peer review, setup versioning repositories (none had existed prior to me), and never learned that you shouldn't work on live systems as you're just asking for trouble.

    Either way, I do agree with what has been presented, I only wish I didn't have personal experience in that kind of environment, because it drained the life from me, and took away several months of productivity, which could have been spent engineering beautiful code and systems.

    eric

    ReplyDelete
  3. I couldn't agree more. It might take a bit more time initially to set yourself up, but you will definitely reap the rewards in spades later. Instead of fighting with your code base, you could be working with it.

    For my company LandlordMax, when I initially started it, I took more time initially to develop the underlying architecture, frameworks, etc. And what a difference it's made. If this hadn't been the case, there's no way we could have added so much new functionality in the amount of time we did!

    As well, there's a term called Developer Debt, or Technical Debt, which basically means that over time you will dramatically increase your cost to do anything if you don't do it right. It can quickly compound out of control.

    If you're interested you can read about it here.

    ReplyDelete
  4. one mans treasure is another mans trash.

    I'm sure the people who wrote your 'bad code' thought it was great and easy to work with at one time.

    ReplyDelete
  5. You may be missing (or misunderstanding) the cause/effect relationship between your "good code"/"bad code" examples and the "results side" (you may not be - it's always possible I'm just not paying enough attention to what you've written!)

    Basically, it's not a case (for example) that if you write "good code" it'll be easier to change: rather if you make your code easier to change, then it'll be good code.

    So:

    * If you write less code to achieve the same result, it'll be good code.

    * If you write code that's easy to understand, it'll be good code.

    * If you write code that's safe to change (I'm thinking unit tests, good naming conventions so the next guy knows EXACTLY what you're using that variable to store, etc.), then it'll be good code.

    * If you avoid duplicating your efforts (i.e. if you spot that you're doing it the first time you see it and change your code to avoid doing it in future), then you'll write good code.

    * If you write code with the change-compile-test cycle in mind (build scripts, continuous integration tools, automated unit tests), then you'll produce good code.

    * If you use tested reliable libraries for the common stuff and focus only on those factors unique to your problem, then you'll produce good code.

    The exception is that last one - the good code does cause the "fun" (and the bad code causes the stress).

    ReplyDelete
  6. The "permalink" to the silver programmers article is broken, but this link seems good: http://www.knowing.net/index.php/2008/01/14/no-silver-programmers/

    ReplyDelete
  7. Big Ball of Mud (1999):

    "It is interesting to ask whether some of the differences in productivity seen between hyper-productive organizations and typical shops are due not to differences in talent, but differences in terrain. Mud is hard to march through."

    ReplyDelete
  8. العاب بنات يحتوي موقعنا على تشكيلة من العاب تلبيس بنات متجددة باستمرار وكل مايتعلق بصنف العاب بنات تلبيس ومكياج والعاب طبخ ومرحبا بكم في العاب تلبيس
    al3ab-banat01
    al3ab tabkh

    ReplyDelete
  9. This is really nice post, I found and love this content. I will prefer this, thanks for sharing. Australia's Best Allied Health Practice Management Software.

    ReplyDelete
  10. There are literally thousands of weight loss pills sold everywhere, from local grocery stores to health and diet food stores. It is sometimes difficult to make the right choice. Resurge reviews

    ReplyDelete
  11. Programming is very complex and every person can't learn it because it has many complex features which are unable to understand. If you want to join this field, you should get help from seniors and learn this skill. Dissertation writing services.

    ReplyDelete
  12. Thanks for sharing this informative content.,
    Leanpitch provides online training in Scrum Master Certification during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    Scrum master certification online

    CSM certification online

    CSM online

    CSM online certification

    CSM online training

    CSM training online

    Scrum master training online

    ReplyDelete
  13. Mortgage advisors are certified economic advisors who assist belongings shoppers to make knowledgeable picks and entire the loan software system. disability insurance awareness month

    ReplyDelete
  14. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great. Feel free to visit my website; 온라인카지노

    ReplyDelete
  15. I like your site and content. thanks for sharing the information keep updating, looking forward for more posts. Thanks Feel free to visit my website; 온라인카지노

    ReplyDelete
  16. Wow, fantastic weblog structure! How long have you evver been running a blog for?
    you made blogging look easy. The total glance of our web site is magnificent, as well as the content! 바카라

    ReplyDelete
  17. Good blog. Keep sharing. I love them Are you also searching for ajman assignment help? we are the best solution for you. We are best known for delivering writing services to students without having to break the bank

    ReplyDelete
  18. Good blog. Keep sharing. I love them Are you also searching for Spanish writing help? we are the best solution for you. We are best known for delivering Spanish writing services to students without having to break the bank

    ReplyDelete
  19. 토토사이트 very goood website thanks for sharing for this article!

    ReplyDelete
  20. 스포츠토토 I was quite impressed with this valuable content this was purely interesting.


    ReplyDelete
  21. This is my first time pay a quick visit at here and i am truly happy to read all at alone place. 바카라사이트

    ReplyDelete
  22. very nice post, i actually enjoyed this web site, carry on it



    Very attractive article



    Very well written, very informativa post. 온라인카지노

    ReplyDelete
  23. Thanks for sharing this knowledgeable post. What an excellent post and outstanding article. Thanks for your awesome topic . Really I got very valuable information here.

    ReplyDelete
  24. This is truly an practical and pleasant information for all and happy to see this awesome post by the way thanks for sharing this post.
    Data Scientist Course in Noida

    ReplyDelete
  25. You have shared very meaningful and useful blog with us. I read your all blog, all are very interesting. Thank you for sharing your content with us. If you need technical help to Change Bellsouth Email Password, you can connect with us.

    ReplyDelete
  26. Want to look stylish? Want to look fashionable? Want to look chic? Then get yourself a brown b3 aviator shearling leather jacket that will make you look like a stylish man and not those boring ones!

    ReplyDelete

  27. Great..!!! I like this website so much it’s really awesome to me nowadays am just waiting for your next update whenever an update feels like happy. 3d logo design in australia

    ReplyDelete
  28. SMTP Relay Service Provider
    Looking for an SMTP Relay Service Provider ? Look no further than the ideal SMTP. We offer a wide range of SMTP relay services to meet your needs, for both small and large businesses. Our team of experts can help you choose the right SMTP relay service for your needs and we'll make sure it's set up and working properly. Contact us today to find out more.
    SMTP Relay Service Provider

    ReplyDelete
  29. emporia va traffic lawyerMarch 28, 2023 at 4:15 AM

    I appreciate how you provided a detailed explanation of the process and how it could potentially be used in various industries. The idea of using garlic as a more eco-friendly and sustainable alternative to traditional coding methods is also a fascinating one.

    I think it's important to explore new ideas and approaches in the tech industry, and your post has certainly opened up a new perspective for me. Thank you for sharing your thoughts and insights on this topic - I look forward to reading more from you in the future.
    emporia va traffic lawyer

    ReplyDelete
  30. "I'm filled with profound gratitude for the creative mind behind this captivating blog. Your hard work and dedication are evident, and they truly deserve applause. The consistently thought-provoking content speaks volumes about your unwavering commitment. Anticipation builds as I look forward to immersing myself in your future articles. Your exceptional effort doesn't go unnoticed! I wholeheartedly offer my recommendation." Abogado de Invadiendo Condado de Middlesex

    ReplyDelete
  31. Amazing, Your blogs are really good and interesting abogados de accidentes. It is very great and informative. Good code uses libraries which remove the need for "dirty work" and let you focus on the important problems, I got a lots of useful information in your blogs. Keeps sharing more useful information in your blogs

    ReplyDelete
  32. سقالات معدنية للبيع في مصر يمكن العثور بسهولة على مجموعة متنوعة من السقالات المعدنية المتاحة للبيع. تتميز هذه السقالات بقوتها ومتانتها، مما يجعلها مثالية لدعم الأعمال البنائية على اختلاف أحجامها وتعقيدها. يمكن أن تتوفر هذه السقالات بأحجام مختلفة وأنواع متنوعة تناسب احتياجات مشاريع البناء المختلفة.

    ReplyDelete
  33. "Garlic Programmers for Silver Code?" explores a unique coding methodology using garlic as a metaphor. The article uses humor and curiosity to explore this unconventional approach, capturing attention and sparking interest in innovative coding practices. The witty title and playful tone make it an engaging read for those thinking outside the traditional coding box. Overall, it offers a clever and lighthearted perspective on programming.
    Nueva Jersey Orden Protección Riesgos Extremos

    ReplyDelete
  34. Fabulous, what a weblog it is! This blog provides valuable information to us, keep it up.

    ReplyDelete
  35. Great article. Couldn’t be write much better! Keep it up!

    ReplyDelete
  36. This is a nice article I hope you can like article.virginia family law attorneys

    ReplyDelete

  37. Thank you! I'm glad you found the information helpful. If you have any more questions or need further assistance, feel free to ask.
    Exploring the third eye chakra can be a fascinating journey into understanding and balancing this energy center within your body. The third eye chakra, also known as Ajna in Sanskrit, is located in the center of the forehead, just above the space between the eyebrows. It is associated with intuition, perception, imagination, insight, and spiritual awareness. Here are some ways to explore and balance your third eye chakra:https://www.rockymountainoils.com/blogs/energy/exploring-your-third-eye-chakra

    ReplyDelete

Blog Archive

Google Analytics