Author Archives: jlangr

Bad Code Examples Promote Bad Habits

Why is there so much bad code? Developers offer myriad excuses: We just have to ship (i.e. we don’t have enough time to do it right). We disagree as to what “bad” is. We know the code is not clean … Continue reading

Posted in coding, programming | 3 Comments

Collaborative (Dare I Say Pair?) Writing

I enjoy writing, though I’m not as prolific as I’d like to be. I tend to re-read what I wrote many times, often second-guessing it. Like any writer, I also find difficulty from time-to-time, getting stuck on how to phrase … Continue reading

Posted in distributed, index cards, pairing, remote, writing | Leave a comment

TDD for C++ Programmers

Recently I’ve been getting a good number of calls from C++ shops interested in doing TDD, despite my heavy Java background. I took on some of the business and had to turn away some to avoid being swamped. Many other folks I … Continue reading

Posted in agile, C++, coding, programming, TDD, test-driven development, unit testing, writing | 2 Comments

Legacy Quadrants for Increasing Confidence Coverage

Your legacy system presents you with a choice: Put a stake in the ground and attempt to do something about the daily pain it causes, or let it get incrementally and certainly worse. Often its challenges seem insurmountable–small improvements appear … Continue reading

Posted in coding, legacy, mikado method, TAD, TDD, test-driven development, unit testing | Leave a comment

My First TDD Exercise

Finding a good first exercise for TDD learners can be challenging. Some of the things I look for: Not so simple that it’s trivial, e.g. Stack, lest students dismiss it as pointless. There should be opportunities for students to make … Continue reading

Posted in agile, algorithms, coding, kata, TDD, test-driven development, unit testing | Leave a comment

Refactoring and Performance

In the first portion of the book Refactoring, Martin Fowler presents an example where he whittles a verbose method into an improved design. Here’s the original, more or less: public String statement() { double totalAmount = 0; int frequentRenterPoints = 0; … Continue reading

Posted in agile, coding, performance | 1 Comment

Test-Driving a Heap-Based Priority Queue

It’s been over 25 years since I had to code a priority queue. Should I really need to? Java now supplies a priority queue, and an important lesson of software development is that you should first seek to reuse what … Continue reading

Posted in coding, kata, TDD, test-driven development, unit testing | Leave a comment

Don’t Stop Reading…

When writing, be careful of presenting an opposing point first with the notion that you’ll make your counterpoint in a subsequent paragraph or page. That first pitch is often as far as some readers get. Royce’s article “Managing the Development … Continue reading

Posted in coding, pair programming, pairing, writing | 2 Comments

Not Giving Up on vi(m)

I wrote this blog as a reaction to reading James McKay’s blog entry, “:q!,” in which he describes abandoning vim. A story familiar to me, but I fortunately never abandoned it for good. I do have to agree that Intellisense … Continue reading

Posted in IDEs, pairing, vim | Leave a comment

TDD Kata: Roman number converter

I’ve introduced the whole-number-to-Roman-numeral kata in my test-driven development training, not out of sadistic interest, but because I think it offers some excellent lessons about TDD. I do find it a bit amusing that good developers often struggle badly with … Continue reading

Posted in algorithms, kata, TDD, test-driven development | Leave a comment