My 2012 in Review
This has been my second year in Norway and I am still very much enjoying it, there is a very active developer community organizing great conferences such as JavaZone (followed by an amazing trip to the nature a.k.a. SurvivalZone) and Smidig (Agile) where I have also presented, Scala-focused flatMap, many meetups etc.
Events & side jobs
Thanks to my company I had the opportunity to do some real consulting work, namely helping with a technical audit of an R&D department and co-organizing a TDD and refactoring workshop for the customer, and I have learned a lot from both of these.The most exciting event was a week long educational stay with Ken Beck that has resulted in the most popular blog post ever of my company and myself, Programming Like Kent Beck. Another exciting event was the workshop BDD - Specification by Example by Gojko Adzic, simply the best workshop/course I have ever attended, with plenty of valuable content about how to build the right software. I also very much enjoyed preparing and presenting an introductory workshop into Clojure with my friends and collegues Lars and Ivar.
Continue reading →
Blogging Stats of 2012
Continue reading →
Most interesting links of December '12
Recommended Readings
Software developmentContinue reading →
What Is Clean Code? - In Quotes
Continue reading →
Most interesting links of November '12
Recommended Readings
- James Roper: Scaling Scala vs Java (recommended by M. Odersky) - writing scalable apps in Scala is much easier then Java because idiomatic Scala uses immutable structures and lends itself naturally to asynchronous processing while doing these things in Java is possible but very unnatural and laborious. "It [Scala] is biased towards scaling, it encourages practices that help you scale."
- Exception Handling Antipatterns (2006, still valuable) - Log and Throw, Throwing Exception (instead of a suitable subclass), Throwing the Kitchen Sink (declaring many exceptions in method signature), Catching Exception (instead of a particular subclass), Destructive Wrapping (not including the exception as cause), Log and Return Null, Catch and Ignore (swallowing the exception), Throw from Within Finally, Multi-Line Log Messages (via repeated log calls instead of \n), Ignoring InterruptedException (instead of breaking the loop etc.), Relying on getCause().
- The GitHub way: Your team should work like an open source project - a provocative article about the development process in GitHub that strongly prefers asynchronous and on-line communication over face-to-face meetings and communication, which, according to the author, leads to increased productivity. That is quite the opposite of what is usually practiced. I can think of situation where direct interaction is invaluable but, on the other hand, I could certainly live with less meetings. (Comments on Hacker News)
Continue reading →
Most interesting links of October '12
Recommended Readings
- David Veksler: Some lesser-known truths about programming - things newcomers into the field of IT don't know and don't expect, true and an interesting read. Not backed by good data but anyway. F.ex.: "[..] a programmer spends about 10-20% of his time writing code [..] much of the other 90% thinking, researching, and experimenting". "A good programmer is ten times more productive than an average programmer. A great programmer is 20-100 times more productive than the average [..]" "Bad programmers write code which lacks conceptual integrity, non-redundancy, hierarchy, and patterns, and so is very difficult to refactor." "Continuous change leads to software rot, which erodes the conceptual integrity of the original design." "A 2004 study found that most software projects (51%) will fail in a critical aspect, and 15% will fail totally."
- Brett L. Schuchert: Modern Mocking Tools and Black Magic - An example of power corrupting - interesting for two reasons: a good analysis of a poorly written piece of code and discussion of the code injection black magic (JMockIt) vs. actually breaking dependencies to enable tests. The author presents a typical example of low-quality method (mixing multiple concerns, mixing different levels of abstractions, untestable due to a hardcoded use of an external call) and discusses ways to improve it and to make it testable. Recommended to read.
- It’s Not About the Unit Tests - Learning from iOS Developers: iOS developers don't do much testing yet they manage to produce high quality. How is that possible? The key isn't testing itself, but caring for the code. (Of course, iOS is little special: small apps, no legacy, a powerful platform that does lot for the apps, very visual apps.) "It’s not about the practices. It’s about the spirit and intent behind them, and how they are applied." (M. Fowler had a similar observation about a team that used mock-based testing exclusively and thus lacked integration tests yet all worked. [I've lost the link to the post and would be grateful for it])
- Java Code Quality Tools – Overview - brief descriptions of 44 quality-related tools including some interesting tools and Eclipse plugins I didn't know or knew but forgot. F.ex. analysis of dependencies with JBoss Tattletale or JarAnalyzer, Clirr to check libraries for source and binary backwards compatibility, JDiff generates JavaDoc-based report of removed/added/changed in an API. Spoon - read and check or transform Java code. Java PathFinder (NASA) - special JVM capable of checking all execution path to discover concurrency defects etc.
Continue reading →
Do You Know Why You Are Testing?! (On The Principles Underlying TDD)
Continue reading →
Tip: Import Leiningen Project to IntelliJ (With Dependencies)
Continue reading →
Tool Tip: Byob - Screen With Text UI
Continue reading →
Puppet Troubleshooting: Compiling Catalog, Locating a Cached Catalog
Where to Find the Cached Catalog On Client
Continue reading →
My Scala vs. Clojure Impression In Pictures
(By kristobalite) Clojure: Clean Structured Focused | (By agiamba) Scala: Adorned Overflowing Magnificent |
Continue reading →
Note: Loading Tab-Separated Data In Cascalog
Continue reading →
Most interesting links of September '12
Recommended Readings
- Johannes Brodwall: This dependency injection madness must end! - it's very valuable to hear well-founded arguments against any popular belief and Dependency Injection is one of these. "I have started disliking the consequence of this strategy very much: All coupling in my system becomes implicit and harder to understand. I have instead reverted to using design patterns like the Singleton pattern, but with a slight twist."
- Computer Programmers Learn Tough Lesson in Sharing - WSJ.com - A balanced presentation of pair-programming including both benefits and issues. A key point: It is a skill that must be learned (to respect the other one, give her space, be aware of how your behavior is perceived by her, ...).
- Kent Beck: Functional TDD: A Clash of Cultures - TDD has been developed for object-oriented languages and applying it to a functional language with strong type brings interesting challenges. Also a good summary of the benefits of TDD: double checking of the logic (by the implementation and the, preferably quite different, test), solution decomposition (focus on part of the problem, once solve be sure it stays solved), automatic checking of correctness, outside in design (API first, implementation after that). Plus the pleasant experience of the continuous cycle of tension (failing test) - relief (green).
- Paul Callaghan: Thinking Functionally with Haskell: Types? Tests? We Need a New Word - Powerful type systems eliminate possibility of defects thus venturing into the domain of testing - what can they offer and where the new border and symbiosis between types and tests will be?
- Tales from the Ops Side: Black Friday - an interesting and exciting view into the life of operations engineers one day when all went wrong. Key learnings: Many interdependant components are difficult to reason about; good monitoring and communication are crucial. The post refers to an interesting concept of Recovery-Oriented Computing, i.e. failures are inevitable and their prediction is nearly impossible thus we must focus on making the systems able to survive failures (e.g. vi damage containment, automatic fault detection, component-level restartability).
- Groovy: The road map for the popular JVM language - why was Groovy created (as Java companion focused on productivity), key changes in Groovy 2.0 (more suport for static typing, Java 7, modularity with speed as a side-effect) and in the future Groovy 3.0 (invokedynamic everywhere, more Groovy written in itself).
- Martin Fowler: Key Points from NoSQL Distilled - an overview of why NoSQL, data models, distribution models, consistency, map-reduce, polyglot persistence, criteries for choosing a database.
- You’re a Top Developer! - a surprising hypothesis that "90% of all developers never read a programming blog, never have any side projects to learn something new, and never spend any time or effort outside work hours to improve". However I haven't seen any data to back that up (the author only quotes Peopleware) and the author doesn't propose any explanation for the fact. I'd really like to know if it is true and why it is so.
Continue reading →
Using Java as Native Linux Apps - Calling C, Daemonization, Packaging, CLI (Brian McCallister)
1. Using Native Libs in Java
Calling Native Libs
Calling native libraries such as C ones was hard and ugly with JNI but is very simple and nice with JNA (GPL) and JNR (Apache/LGPL)Continue reading →
Infographic: Why Should All Learn Little Code
Continue reading →