Posts

Showing posts from 2012

Git and Subversion - the working directory is fundamentally different

One of the fundamental differences between Git and Subversion that I didn't understand at first and, IMHO, doesn't really get much coverage in the documentation is the way the 'working directory' is treated. Git is all about branching and it is indeed very good at that but what happens when you switch branches in Git is completely different to when you switch branches in Subversion. You could say that you never really "switch" branches in Subversion. You can create branches and checkout a branch in subversion: In subversion if you want to use a branch you typically 'check it out' to a new clean 'working directory'. This directory is a new place in your filesystem and you perform work on that branch in this new working directory. You can't easily 'switch' a working directory from one branch to another branch. With subversion if you are working on a number of different branches then you would typically have a number of different

Classic software engineering mistakes: To Greenfield or Refactor Legacy code?

Oh, the humanity! If we were not in the software engineering game but, rather, in the civil engineering game then the equivalent of this article would be called 'Classic Civil Engineering Mistakes' and contain graphic videos of buildings and bridges collapsing and thousands of people running for their lives. It's hard to get emotional about something you can't see Unfortunately software is a rather intangible asset that doesn't lend itself to dramatic and emotional visualizations. When it comes down to it the life work of a software engineer, when reduced to it's lowest conceptual level, is the specific arrangement of sequences of 1's and 0's on one or more hard disks (or some form of solid state storage) residing on a server or desktop computer. How those 1's and 0's get there and 'which' sequences work and which don't is not really a black art but it definitely requires some intelligence but surprisingly a lot more common sens

As a Java UI Framework let me say Wicket Rocks!

Everybody knows that Wicket rocks as the best Java UI framework available. Sure there's people out there still using JSP (with/without struts), Spring MVC (Huh?), JSF, even raw servlets and a host of many other Java frameworks but let me repeat; "Everybody knows that Wicket rocks as the best Java UI framework available". I suppose I should clarify that a bit.... everyone who has ever used Wicket knows that it rocks.... You see, if you're a Java programmer who "gets" the whole Object Oriented paradigm and loves the reusability that comes from plug and play component architectures and from clever use of inheritance then you simply won't find ANY other framework that satisfies your need for such architectural candy at the UI level but that still allows the visual candy that expert web designers can create when they have full control over HTML and CSS. All I can say is "Get into it already". Get started. Read up on it. We've been using W

Java package name structure and organization - best practice and conventions

When it comes to conventions regarding how to structure your packages in Java (or any other language in fact) there is a wide variety of opinion. Making the right decision can promote productivity, understandability, quality, flexibility and the construction of reusable frameworks. I've seen some people promote 'package by feature' over 'package by layer' but I've used quite a few approaches and found 'package by layer' much better than 'package by feature' but further from that I have found that a hybrid: 'package by layer then feature' strategy works extremely well in practice and here's why I think that's so. Package by layer then feature The 'package by feature' people tend to want to put all user interface, model classes, persistence classes (eg., DAO - if you're into self torture ;]) for a particular feature into the same package and according to many examples, the same directory. i.e. they don't us