Holy on Dev
Most interesting links of August ''12
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 vim-adventures.com: Learning Vim keys in an entertaining way by playing an on-l
Tip: How to Easily Customize PMD Rules in Eclipse
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").
Minimalistic Practical Introduction to Puppet (Not Only) For Vagrant Users
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.
Recommended Book: Real World Java EE Night Hacks by Adam Bien
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.
You''re Writing the Wrong Software - You Never Know What Users Want Until You Ask Them
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.
How to Add MapRed-Only Node to Hadoop
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:
- Do not start the datanode service on the node
- 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.
- Otherwise add the node to the DFS' blacklist, i.e. file pointed to by the property dfs.hosts.exclude and execute
hadoop dfsadmin -refreshNodeson the namenode to apply it.
Zabbix: Fixing Active Checks to Work With Zabbix Proxy
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>".
Most interesting links of July ''12
A brief one due to (thanks to?) holiday and an accompanying surprising lack of enthusiasm for the technical stuff. Recommended Readings Microdesign and red flags - why using an "else" or returning a boolean as a success indicator should rise a red flag and make you think what you're trying to achieve and whether there aren't better options (often there are - using guard conditions instead of else and
Book Review: Implementation Patterns
Implementation Patterns, Kent Beck, 2007, ISBN 0321413091.
Summary: Should you read the book? Yes, the chapter on principles and values is trully enlightening. The book in general contains pearls of wisdom hidden in the mud of "I know that already, man." I would thus recommend skimming through the book and reading only the pieces matching your level and needs.
The book seems to be targeted a lot at Java beginners (especially the chapter on collections), going into otherwise unnecessary details, yet there are many valuable advises of which some can only be appreciated by somebody with multiple years of professional programming experience. It thus seems to me that the book isn't a perfect match for anybody but everybody will find there many useful ideas. It would best be split in two.
An experienced developer will already know many of the patterns though it's perhaps useful to see them named and described explicitly and listed next to each - it helps to be aware and clearer of what you do and why you do it.I'd absolutely recommend everybody to read the chapter A Theory of Programming, explaining Kent's style of programming and the underlying key values of communication, simplicity and flexibility as well as the more concrete principles (local consequence, minimize repetition, logic and data together, symmetry, declarative expression, co-locating data and logic having the same rate of change). Also in the rest of the book there are valuable ideas that it would be a pity to miss. I list below some of those that I found particularly interesting.
Notify on Errors in a Log File with Zabbix 1.8
Situation: You want to get notified when a log entry marked ERROR appears in a log file. You want the corresponding trigger to reset back to the OK state if there are no more errors for 10 minutes. (This post assumes certain familiarity with Zabbix UI.)
Testing Zabbix Trigger Expressions
When defining a Zabbix (1.8.2) trigger e.g. to inform you that there are errors in a log file, how do you verify that it is correct? As somebody recommended in a forum, you can use a Calculated Item with a similar expression (the syntax is little different from triggers). Contrary to triggers, the value of a calculated item is easy to see and the historical values are stored so you can check how it evolved. If your trigger expression is complex the you can create multiple calculated items, one for each subexpression.
Most interesting links of June ''12
Recommended Readings Development Neal Ford: Evolutionary architecture and emergent design: Emergent design in the wild - discusses why not to do Big Design Up Front and how to recognize the "last responsible moment". Quote: "It's puzzling that so many organizations continue to use BDUF in the face of so many failures and underachieving projects."
How to Set JVM Memory for Clojure REPL in Emacs (clojure-jack-in, clojure-swank)
How to increase heap size for Clojure REPL started from Emacs, either standalone or as a part of a project.
1. Clojure REPL Started for a Lein ProjectIf you have a Leiningen 2.0 project and start Clojure REPL for it in Emacs via
M-x clojure-jack-inthen you can set JVM arguments such as heap size in the
Creating Custom Login Modules In JBoss AS 7 (and Earlier)
JBoss AS 7 is neat but the documentation is still quite lacking (and error messages not as useful as they could be). This post summarizes how you can create your own JavaEE-compliant login module for authenticating users of your webapp deployed on JBoss AS. A working elementary username-password module provided.
Serving Files with Puppet Standalone in Vagrant From the puppet:// URIs
If you use Puppet in the client-server mode to configure your production environment then you might want to be able to copy & paste from the prod configuration into the Vagrant's standalone puppet's configuration to test stuff. One of the key features necessary for that is enabling file serving via "source => 'puppet:///path/to/file'". In the client-server mode the files are served by the server, in the standalone mode you can configure puppet to read from a local (likely shared) folder. We will see how to do this.
- Previous (11)Next (13)