Holy on Dev

Archive for February, 2011

Most interesting links of February

Posted by Jakub Holý on February 28, 2011

Articles, links etc.


  • The Git Parable (thx to Alexander) – a good and easy to understand explanation of the story behind Git and thus also its main goals and concepts. It really helps in understanding what makes Git different from Subversion and thus empowers you to use it to its full capabilities and in accordance with its philosophy and not (painfully) against it. Though I’d appreciate little more coverage of merging and cooperation in the Git world.


  • Some thoughts on stress testing web applications with JMeter (part 2) – what to measure, when to stop, what listeners to use, some practical tips e.g. for using remote slave JMeter instances, how to interpret the results (explanation of mean, std. deviation, confidence interval). By Nicolas Vahlas, 3/2010.
  • Scalability Factors of JMeter in Performance Testing projects (conference paper, 2008) – what factors determine what number of virtual users (VU) a load test tool can efficiently simulate and experiments to determine the impact of those factors on JMeter. Each VU has an associated cost in terms of CPU and memory (send, process, store request/response etc.) => number of VUs depends on the HW and the complexity of the messages and protocol and on the load test script complexity.
    • For example one commercial tool claims to support up to nearly 2k VUs on 1GHz PIII w/ 1GB but w/o stating the other factors.
    • JMeter scalability experiments results (Def.: Scalability limit reached when additional VUs aren’t increasing the server’s load (i.e. the test tool has become the bottleneck)):
      • Response time: “The optimal number of virtual users increases with increase in response time. It increases from around 180 virtual users to around 700 optimal virtual users when the response time changes from 500 ms to 1.5 seconds.”
      • Application response size: “Application response size has a massive effect on the load generation capabilities of JMeter. The optimal # of virtual users drops from around 500 virtual users to a measly 115 virtual users when the application response size increases form 20 kb to 100kb.”
      • Communication protocol (HTTP x HTTPS): The load generation capability decreases by 50% or more when the protocol is HTTPS
    • HW used for the test machine: P4 2.4GHz, 2GB RAM.
  • A. Bien: Can Stateful Java EE 6 Apps Scale? – Another Question Of The Week – the answer: Yes. A.B. always starts with Gateway+PDO and measures the performance/overhead with VisualVM, JMeter. Don’t forget that stateless applications usually just move the state and therefore scalability problem to the DB.


  • Switching to Plan J – isn’t Scala good enough (yet)? – by Jonathan Edwards. Really an interesting read including the comments (well, the first half – esp. Martin, Stuart R., Vincent etc.) – though very impressive, is Scala too complex and do we need syntax subsets for normal people? The state of IDE support is bad but should be getting better.
  • Opinion: The unspoken truth about managing geeks – a great article on corporate culture and psychology, which turn people into stereotypical geeks – invaluable advices for managing IT professionals. And it’s fun to read! (Well, at least if you’re a geek observeing the very things he speaks about around you.)
  • ThoughtWorks Technology Radar, Januar 2011 – Scala up to Trial, DevOps, …. . Unchanged: ESB, GWT & RIA on hold, Apache Camel (integration library) on Trial. Other interesting: CSS supersets supporting variables etc. like LESS.

Quotes of the month

I’ve decided to add this occassional section to capture interesting or inspirational comments of famous as well as ordinary people.

  • if i learn, i end up going fast. if i just try to go fast, i don’t learn & only go fast briefly.” (Kent Beck’s Twitter, 2/11). Reflects nicely a discussion I recently had with a colleague 🙂 I also like the follow-ups:
    • Mike Hogan: any links/books you can suggest to help get more grounded in this mindset of valuing learning over trying to go fast?
    • Kent Beck: “zen in the art of archery” is one classic that i’ve found helpful. that and endlessly trying to do it wrong…
  • The computer industry is the only industry that is more fashion-driven than women’s fashion.” – by Richard Stallman in Cloud computing is a trap, 2008-09-29. I might not agree with everything he says but there certainly is a seed of truth in that!
  • Shipping is a feature. A really important feature. Your product must have it.by Joel Spolsky in The Duct Tape Programmer, 2009-09-23. This is something we should really keep in mind and explain to the product owners too 🙂

Posted in General, Testing, Tools, Top links of month | Tagged: , , , , , , , | Comments Off on Most interesting links of February

Hidden Dependencies Are Evil – Arguing With The Clean Code (Slightly)

Posted by Jakub Holý on February 19, 2011

Hidden dependencies are evil because two pieces of code influencing invisibly each other make it very hard to understand what the code is doing. There is an example of an unresolved hidden dependency in the presumabely perfected code in Clean Code’s chatper 14: Successive Refinement. When I wrote the first draft of this post I thought I´d be arguing with the author on this point but after reading the next chapter (15) I found him propagating the very same idea. Of course no code is ever perfect but anyway I believe this is something that should have been improved. The final code actually looks really well, it’s short, clean, and expressive, but there is this one thing that really troubles me for I find it difficult to understand (and thus quite “unclean”), and that is the method parseArgumentStrings. Perhaps I’m not smart enough but clean code should be dummy-proof anyway :-). The problem is caused by a hidden dependency between methods of the main class Args and between this class and another one, which is modifying Args’ internal state variable. Read the rest of this entry »

Posted in Languages | Tagged: , | 1 Comment »

Clean Code: Four Simple Design Rules – Obligatory Read

Posted by Jakub Holý on February 14, 2011

I consider the Clean Code book to be obligatory for every programmer. And if you currently haven’t the time to read it all at once then you should read – and take deep into your heart – at least the 12th chapter Emergence by Jeff Langr, which introduces Kent Beck’s Four Simple Design Rules and explains thoroughly what they mean and why they’re so important. The rules, in the order of importance, are:

  1. Runs all the tests
  2. Contains no duplications
  3. Expresses the intent of the programmers
  4. Minimizes the number of classes and methods (this isn’t as controversial as it may sound, see below)

Stated like this in simple sentences it’s difficult to see the depth hidden behind them and thus their essential importance for clean, high-quality code with high-quality design and I’ll therefore try to explain what they really mean in the full extent based on Clean Codes. I’ll cite some parts of the book – for I can’t find better words than the author – hoping for the author(s) and publisher graciously permitting it. Read the rest of this entry »

Posted in General | Tagged: , , , , , , | 6 Comments »

Manually restoring raw partclone partition image to a VMWare

Posted by Jakub Holý on February 6, 2011

This post sums up how to manually restore a partition backup create by Clonezilla (using partclone) into a VMware virtual machine, which can be then either executed or its (virtual) disk mounted. The difficult points are “manual” and “partition backup” (would be much easier with a full disk backup). Normally I restore a backup by running Clonezilla from a virtual machine with sufficiently large virtual disk, but at times it isn’t possible, e.g. because the Clonezilla kernel has a buggy USB driver which tends to disconnect at times (at least with my version & flash disk). Read the rest of this entry »

Posted in Tools | Tagged: , , , | Comments Off on Manually restoring raw partclone partition image to a VMWare