Skip to main content

Posts

Showing posts from 2013

State of the Art - Don't Comment Your Code

I was listening to a Java Posse podcast this morning, and the hosts were discussing the pros and cons of putting comments in your code.   I consider myself a software craftsman, and a big part of that involves writing readable code.  I have done it often enough to know that good code really doesn't need comments, and by that I mean any non-Javadoc comments.  (And only your API code should have those.)

The fact that the Java Posse guys seemed unaware of this as a practice surprised me, so I did a little digging with the expectation that this "obviously beneficial" practice was being used by most, but not all developers.  I was surprised to find a number of fools who were dismissive of the idea, in addition to a number of obviously intelligent people who agreed with me.  Apparently this is not yet a mainstream concept.

I have worked at a lot of places, and the best, most maintainable, easiest-to-change code I have ever seen was all written at my current workplace where &qu…

Google does 20%, we do 10%

I work at Cengage Learning (my views are my own, they don't represent the company, etc, etc, etc), and we recently started giving developers the option to make use of  "The Cengage 10".  This means that we can use 10% of our work time for a project that we're passionate about.

The idea is to drive innovation and make it a better workplace.  So far, I think we're successful at both goals, but it may be a little bit early to tell on the second one.  Doing this hasn't impacted delivery dates for normal business-driven projects.

We did put a couple of restrictions around it:

If your team room really needs you (broken build, release problems, etc.), don't leave to work on your side project.You should work on a project with at least one other person.A "project" doesn't have to provide direct business value - it can be learning a new technology. This works pretty well because we hired people who enjoy their work and don't need much supervisio…

Expert Searching With Google

I found this site on "Power Searching with Google".  It describes how to get the most out of a google search. For 90% of my searching, a quick & dirty search (which is what I usually do) should be fine.  But that other 10% probably represents half of the time I spend trying to find things.  My usual strategy is to keep banging away & try new search terms.  The course recommends doing exactly that, but here are a few tips that I think will save a LOT of time for more specific searches: When searching for images, use the "search tools" and choose a color.  Black & white, gray, white or black in particular are useful for finding diagrams.Google scholar is great for finding authoritative search results.  I think that it is similar to searching with site:edu, plus some other academic sources.  Note the legal search results - court opinions are much clearer that I would have believed (and a lot more wordy).Site: is useful if you want to restrict to a particul…

The Roman Numeral Kata

I've been pulling together a kata based on converting Roman numerals.  The idea is that after having people refactor this one to something relatively clean, they can test drive a different design.

I haven't settled on a good design just yet, though.  The concepts I want to drive home are:

Excellent namingSmall ModulesLow ComplexitySingle Responsibility Does anyone have a favorite problem space, or a solution to the Roman numeral conversion problem that really drives these home?