The Holy Java

Building the right thing, building it right, fast

Archive for August, 2012

Most interesting links of August ’12

Posted by Jakub Holý on August 31, 2012

Recommended Readings

  • How To Fail With Agile:Twenty Tips to Help You Avoid Success – a great overview of ways people may make agile projects and initiatives fail – use them to either avoid the failure or to make it certain, according to your attitude towards agile
  • Learning Vim keys in an entertaining way by playing an on-line 2D game. A brilliant idea!
  • The Search for a Better BIG Data Analytics Pipeline – how to use big data and analytics on it in a company. Big data = lot of data, simple processing; deep analysis = representative, small sample of data (no need for all), advanced techniques. Big data can provide input for analysis.

Links to Keep

  • Pat Kua’s Onboarding Strategies series – tips for getting new people onto your team as a tech lead and making them productive quickly. He also wrote the InfoQ article A Leaner Start: Reducing Team Setup Times based on the series. Some posts: Catalogue of patterns applied, Airing .. about feedback meetings, Pair programming, Preparation e-mail, Domain driven design and readable code, Tech huddles (what-we-learned session every 2nd day), Transparent technical debt, Visible architecture, Big vision business problem.

Useful Tools

  • OWASP Hatkit Proxy: TCP/HTTP proxy intended for developers that can intercept and modify requests and store parsed communication into MongoDB for later exploration. You can define what (not) to store/intercept with white- (black-)lists. Syntax highlighting, Swing UI etc.
  • Using Doxygen to understand a code base – Doxygen can generate a full cross reference of source code, class diagram, caller and call graphs for many languages including Java, PHP, C.

Interesting Quotes

Our standards by default exclude comments where possible replaced by representing as much intent as possible in the code itself. We focus on what it does and why. I’ve found “What” tends to be best represented by production code, whilst “Why” is better explained in tests because you can better represent different contexts there.
Pat Kua: Onboarding strategy: Domain driven design and readable code

Posted in General, Tools, Top links of month | Tagged: , , , , , | Comments Off

Tip: How to Easily Customize PMD Rules in Eclipse

Posted by Jakub Holý on August 21, 2012

The default PMD rules are little too strict for me (especially when starting on a legacy project) so I need to adjust them, usually by decreasing priority to warning. It’s however quite difficult to find the rule responsible for an error message unless you know how to do it. The answer is the PMD Violations Overview view, which lists the rule names (such as “ConstructorCallsOverridableMethod”, as opposed to the error message such as “Overridable method ‘addSummaryPeriod’ called during object construction”).

Read the rest of this entry »

Posted in eclipse, Tools | Tagged: , | 1 Comment »

Recommended Book: Real World Java EE Night Hacks by Adam Bien

Posted by Jakub Holý on August 13, 2012

Real World Java EE Night Hacks – Dissecting the Business Tier, Adam Bien, 2011, ISBN 9780557078325.

I highly recommend this very thin and down-to-the-earth-practical book to everybody interested in back-end Java (a basic knowledge of servlets, Java ORM, and REST might be useful). The book evolves around a small but realistic project (X-Ray), which we follow from the inception through couple of iterations til the end. Bien shows us how lean Java EE can be, how to profit from the functionality that it offers, and how these pieces of functionality fit together to deliver something useful. He actually introduces a complete Java EE development environment including continuous integration (CI), code quality analysis, functional and stress testing.

Some of the things that I appreciate most in the book is that we can follow author’s decision process with respect to implementation options (such as SOAP vs. REST vs. Hessian etc., a REST library vs. sockets, or when (not) to use asynchronous processing) and that we can see the evolution of the design from an initial  version that failed through cycles of growing and refactoring and eventually introducing new technologies and patterns (events, configuration over convention) to support new and increased requirements. Read the rest of this entry »

Posted in General, j2ee, Languages | Tagged: , , , , | Comments Off

Minimalistic Practical Introduction to Puppet (Not Only) For Vagrant Users

Posted by Jakub Holý on August 13, 2012

I couldn’t find any good, brief, practical introduction into Puppet that gives you basic working knowledge in minimal time, so here it is. You will learn how to do the elementary things with Puppet – install packages, copy files, start services, execute commands. I won’t go into Puppet installation, nodes, etc. as this introduction focuses on the users of Vagrant, which comes with Puppet pre-installed and working in the serverless configuration.

Read the rest of this entry »

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

You’re Writing the Wrong Software – You Never Know What Users Want Until You Ask Them

Posted by Jakub Holý on August 12, 2012

Too often companies and IT departments believe that they know what software they should create. However users often need and want something different than you believe, even if you’re a domain expert yourself. My colleague and dear friend Ivar had exactly this experience when designing a meal planning tool for his girlfriend and himself. He knew everything perfectly – the previous tool they’ve used (a paper on the fridge), the problem domain, the users. Yet the first prototype tested did not at all match the ideas of what he thought was needed.

Read the rest of this entry »

Posted in General | Tagged: , | Comments Off

Zabbix: Fixing Active Checks to Work With Zabbix Proxy

Posted by Jakub Holý on August 8, 2012

We’ve recently changed our Zabbix 1.8.1 setup to include Zabbix Proxy, which broke all our active checks (f.ex. monitoring of log files). The solution seems to be having the proxy first, before the Zabbix Server, in the Zabbix Agent’s config parameter Server, i.e. “Server=<proxy ip>,<server ip>”.

Read the rest of this entry »

Posted in General, Tools | Tagged: , , | Comments Off

How to Add MapRed-Only Node to Hadoop

Posted by Jakub Holý on August 8, 2012

I was surprised not to be able to google an answer to this so I want to record my findings here. To add (a.k.a. commision) a node to Hadoop cluster that should be used only for map-reduce tasks and not for storing data, you have multiple options:

  1. Do not start the datanode service on the node
  2. If you’ve configured Hadoop to allow only nodes on its whitelist files to connect to it then add it to the file pointed to by the property mapred.hosts but not to the file in dfs.hosts.
  3. Otherwise add the node to the DFS’ blacklist, i.e. file pointed to by the property dfs.hosts.exclude and execute hadoop dfsadmin -refreshNodes on the namenode to apply it.

Read the rest of this entry »

Posted in General, Tools | Tagged: , , | Comments Off