Skip to main content


Debugging Stories: Problems Logging in

I came across an interesting Debugging Story about login credentials that only worked when the user was seated. Whenever they attempted to login while standing, their credentials failed. Until one wise debugger asked the right question. Read the story here, in this book excerpt from Programming Perls by Jon Louis Bentley.

It reminded me of one of my own stories: the new user whose initial password refused to work.

I was part of a small team making a web portal for a medical insurance company. It would let medical practitioners submit predetermination-of-benefits requests before the proposed procedure was performed. We created a first roll-out to three partner offices, with a minimal set of useful features. We called it our Beta release.

Two of the offices began using the system right away. The third could not log in.

Recent posts

Eclipse Keyboard Shortcuts - Neon (4.6)

I created this page as a personal quick-reference lookup. It will therefore not worry about completeness (try here if you want a more complete list). My personal list will also be in a least-to-most-common use sequence. After all, the ones I use all the time I already remember. It's for the more occasional ones that I want a quick reference.

Ctrl + Alt + H Open Call HierarchyCtrl + T Quick HierarchyF4 Show Type Hierarchy
Switch View to...
Shift + Alt + Q then C ConsoleShift + Alt + Q then Z HistoryShift + Alt + Q then O OutlineShift + Alt + Q then S SearchShift + Alt + Q then Y SynchronizeShift + Alt + Q then T Type Hierarchy Java Comments

Ctrl + / Toggle CommentsCtrl + 7 Toggle CommentsShift + Ctrl + C Toggle CommentsShift + Ctrl + / Add Block CommentsShift + Ctrl + \ Remove Block Comments
Run / Debug

Run Java ApplicationRun JUnit TestDebug Java ApplicationDebug JUnit TestStep into methodStep over instructionStep and returnResume executionInspect

Algorithm to Find All Divisors of BigInteger

I was working on one of the math programming challenges from Project Euler recently and needed to implement an algorithm to find all of the divisors of a BigInteger.

A bad brute-force approach would be to visit all values from 1 to N and see which ones divide evenly into N.

A better approach would be to just check all values from 1 to the square root of N. Any values found that divide evenly into N will also give another divisor, since if we have value i then we can find j = N / i where i <= j

But the Java API for BigInteger does not include a calculation of its square root. And I don't want to write an algorithm to calculate the square root today. This algorithm, however, is almost as efficient as one limited by the square root:

STAMP: The 5 Elements of Writing Automated UI Tests

What are the common elements for writing and running automated UI-driven functional tests?

I am a software developer, not a QA tester, so my interest is in writing some form of scripts to perform tests through a user interface; I am not into tools that record a user's UI interaction.

The question arose recently, while I sat through an introduction to the custom-built testing framework of a project I am working on. (first, a clarification: by "framework" for this article I mean the custom code that a development team needs to create in order for the automated testing system to interact in a meaningful way with the production code. I do not intend it to refer to the testing platform itself. I'll call a tool like jUnit or Selenium a tool or a platform, and the set of tests, test doubles, and other artefacts of testing a specific system I will call the Framework.)

My guide for the learning session had a tendency to do deep-dives into the low-level details. After several …

Essential Eclipse Plugins: Source Control

Source Control or Version Control management tools are a reality of modern development, playing an essential role in helping teams collaborate and helping projects track code-base changes over time.

As I have moved from one team or organization to another, I have met different Source Control tools.

Whichever one you work with, there is probably an Eclipse plugin for it. Many are good enough that for day-to-day dev work you will never need to use the command line, saving those interactions for the rarer, more administratively difficult tasks.

The essential thing is to have a plugin for those day-to-day dev activities, but which one depends on your team's tool. I will touch on some of the best ones here.

Essential Eclipse Plugins: Ant Visualization

Apache Ant is a pure-Java build tool that made quite a splash in its day, and did a great job superseding the Make tools.

Do people still use Ant? Many have moved to Maven or Gradle, but Ant has been around long enough that some projects have built quite complex structures of targets.

XML files that stretch into several hundreds of lines long, with calls and dependencies, can make understanding the Ant build script difficult enough, and maintaining it all the more challenging.

Any time I have had to modify a complex build file, I would start by sketching the targets and their relationships. This Eclipse plug-in does all that tracing and sketching for us, by creating a visual representation of the targets and their links. Much simpler and faster!

Changing Default Program for File Extension in Windows 10

I recently set up a new Windows 10 computer. This included installing some of my favorite freeware utilities.

Then I went into the W10 Settings tool to change the default program for certain file type extensions to use my preferred tool rather than the pre-installed default.

Alas, the only options were the pre-installed software, or "Look for an app in the store"

But I don't want to buy or download an app, I have my preferred one already installed. How can I select it?