Author Archives: jmischel

A fun little puzzle

I ran across this puzzle about 10 years ago. Although it didn’t take me long to come up with the optimum solution, I find the puzzle interesting because it just might be a good interview question for programmers at different … Continue reading

Posted in Software development | Tagged | Leave a comment

Birthdays, random numbers, and hash keys

You’re probably familiar with the Birthday Paradox, either from your introductory statistics class or from hanging around computer programmers for too long. Briefly, the math shows that the odds of any two people in a group having the same month and … Continue reading

Posted in Software development | Tagged | Leave a comment

Subtraction is not the same as comparison

(Originally posted in somewhat different form on 11/21/2016.) All too often, I run across integer comparison functions that work, but have a latent bug. It’s not a bug that you’ll run into very often but when you do run into … Continue reading

Posted in Software development | Tagged | Leave a comment

Computer programs are not cats

(Originally published February 1, 2013) I see questions like this fairly regularly: I’ve said before that Thread.Sleep is a red flag indicating that something is not quite right. And when a call to Sleep is in a loop, it’s a near certainty that there is a … Continue reading

Posted in Software development | Tagged | Leave a comment

Bit twiddling for the win!

(I don’t recall if I wrote about this before. I really need to resurrect my old blog entries.) This was an interesting puzzle to work on. Some of the programmers I subsequently explained it to just got that glazed look … Continue reading

Posted in Software development | Tagged | Leave a comment

It really isn’t that difficult

I’ve been contributing to Stack Overflow for 14 years: pretty much ever since it started. And every year there are Computer Science students who come up with novel ways of screwing up parsing and evaluating arithmetic expressions. It’s a problem … Continue reading

Posted in Software development | Tagged | Leave a comment

But that’s the way we’ve always done it!

Some years back I did a lot of research on and experimentation with the binary heap data structure. During that time I noticed that publicly available implementations placed the root of the heap at array[1], even in languages where arrays … Continue reading

Posted in Software development | Tagged | Leave a comment

First, prove that it’s possible

Building on my previous post about finding a working solution first, before thinking of optimization issues. I have been fortunate to work on many interesting problems in my career, and I have used that approach every time: first, find something … Continue reading

Posted in Software development | Tagged | Leave a comment

Find a solution first

I’ve mentioned before that I contribute to answering questions on StackOverflow. Something I see all too often is a question asking for “the most efficient way” to solve a first- or second-semester homework problem. It’s clear from the content of … Continue reading

Posted in Software development | Tagged | Leave a comment

Shingles is no fun

I am suffering through my first experience with shingles. No, not the roofing kind. Shingles is a disease characterized by a painful skin rash with blisters that occurs in a localized area. It’s caused by the chickenpox virus. If you’ve … Continue reading

Posted in Uncategorized | 2 Comments