A collection of thoughts, ideas and rants inspired by my career in the fintech and banking industry.

Two Eclipse Icons in Windows 7 taskbar

I had an annoying problem on Windows 7 x64 with Helios x64 where I had pinned Eclipse to the taskbar but would see two icons whenever Eclipse was running. I found that the following workaround works with the option “Always combine, hide labels” for taskbar buttons.

  • You must specify a -vm argument in your “eclipse.ini” file (in your Eclipse directory).
  • The -vm argument in your “eclipse.ini” must point to the bin directory of your JDK or JRE (and not to javaw.exe). For me the argument is “C:/Program Files/Java/jdk1.6.0_27/bin/” without quotes.
  • Unpin Eclipse from the taskbar or delete the shortcut
  • Run “eclipse.exe” from Windows Explorer and choose your workspace
  • Pin Eclipse to the taskbar after the splash screen has loaded and the main window is shown

Hope this helps.

[Read More]

How to divide without using division operator

I attended a talk at the Toronto Agile Tour on Deliberate Practice that focused on TDD Games and other programming challenges like Kata.  Among the challenges were things like solving a problem without using the ‘if’ keyword, or without using primitives.

Solving simple problems using these challenges makes us better programmers because they force us to come up with multiple, creative solutions to the same problem.

Here’s my solution for how to divide without using the division operator ("/") in Java. The method should take a numerator and a denominator and return the largest integer multiplier. For example 10/3 = 3, which would be called as int result = divide(10, 3)

[Read More]

Keep calm and carry on

“I’ve had a talk with the Product Owner, and he’s decided to let you guys have an extra week to finish the work for this Sprint”, my Project Manager said on Friday afternoon.

The horror! The horror!

My team and I did not manage to complete all the work that we’d committed to in the Sprint.  In the interests of open communication, I informed my project manager that there would be a few carry-over items.  The next thing I knew I was being told that we would get a Bonus Week in our two-week Sprint so that we could complete the functionality.

[Read More]
Agile 

How to be Agile when using 3rd party software framework

It can be difficult to be Agile when working with 3rd party software framework.  The vendor product may dictate many aspects of the software architecture thwarting your attempts at automated testing and continuous build.

However there are steps you can take to make Agile easier.  I’ll discuss a few of the options that have worked for me on my current project.

  • Insulate yourself from static methods.
  • Introduce wrappers (Facades) to vendor classes.
  • Introduce Spring, with different contexts for testing vs production, to allow easy substitution of vendor classes.
  • Make use of mock objects for testing your code in isolation.
  • If possible, move responsibility into services that live outside the framework.

In our particular case we’ve done all of the above and have managed to build a stable system with respectable test coverage.  We’ve also engaged the vendor to see if they can modify some of the framework interfaces to simplify unit testing, and they have been open to our suggestions.

[Read More]

ControlTier: Initial Impressions

For the last 2 months, we’ve been using ControlTier to automate deployments to our integration and QA environments.  Our deployment is a little more complicated that most Java applications because it runs on a pseudo-grid.  That is, there are 2 clustered JBoss servers, a database server, and 4+ Linux servers that each run about 8 Java processes.

I was able to get ControlTier up and running in a few days, and defining the jobs was relatively straightforward.

[Read More]

Things I Learnt in 2011

  1. Automation is good.
  2. People make or break a project. Thanks Joel.
  3. Coding the right tests is hard, but infinitely valuable.
  4. “Cutting edge development” describes the processes and principles, not the technologies.
  5. Software must be tested in a representative environment.
  6. Knowing the gaps between marketing and reality in your vendor’s software is valuable.
  7. The timing of a discussion directly influences its outcome.
  8. Metrics are useful but can be gamed.

Dysfunctions of a corporation

Deploying a sufficiently complicated application into a corporate environment involves navigating a sea of paperwork, getting all the appropriate “approvals” in place, co-ordinating with department managers to get time slots from their staff, and so on.

Knowledge silos

On Release Day all the right people from the various departments - DBAs, application server administrators, server administrators (both Windows and Unix), desktop support, storage experts - are all sitting in their cubicles at the allotted time waiting to check their checkbox, waiting to mark their task as Done, so they can catch the 5:31pm train home.

[Read More]

Closing tasks

I read a great quote in I’m feeling lucky. It described a note sent from one Google employee to another as he handed over a piece of software.

  • Here’s what I’ve done.
  • Here’s how it’s running.
  • Here are some things to look at.
  • Here’s what’s going to go wrong if it goes wrong.
  • Here are the steps to turn it off.

These five points would be invaluable documentation to any new code or functionality. Imagine how much time could be saved if you had this information before embarking upon a code change.

[Read More]

Continuous deployment

Automation isn’t about quality, it’s about scale.  Manual processes don’t scale.

Each part of your process that you automate gets you one step closer to continuous deployment. For many teams, automation is a Quadrant 4 activity - not urgent, not important - but on my teams it is a Quadrant 2 activity - important but not urgent. We allocate time each iteration to improve our automation because it frees up more time for development.

[Read More]

Use affirmative phrases for boolean names

Please use affirmative phrases when naming your boolean variables and flags - I find that it makes code much more readable.  This is particularly true when naming the configuration settings used to turn features on or off.  If the setting is named in the negative then I have to use a double negative to enable it, and everyone learnt in high school that double negatives are a Bad Thing.

For example, if I have a feature that sends emails and I want to make this behaviour conditional then an appropriate variable name would be “boolean sendEmail = true”.  It’s easily comprehended.  Contrast that with the same feature phrased negatively: “boolean disableEmail = false”.

[Read More]