Thursday, August 25, 2011


I've now solved over 70 of the Project Euler site i mentioned a couple months ago. One of the problems i just solved was to generate solutions to 50 Sudoku puzzles. People solve these sorts of puzzles by hand all the time. I could have done it that way. I started by solving the first one by hand. It was pretty easy. I really only used one rule to make it happen. I thought about the rule for a bit, and decided it would be easy enough to code into a program, and that might be quicker than doing 50 by hand. And this first version solved some 29 of the 50. My program showed how far it had gotten. I used that to tackle the next unsolved puzzle by hand. And, indeed, i found an easy rule to code, and that version managed 39. From there, it might have been quicker to solve the last 11 by hand. Eventually, there were five ideas, and 46 problems were solved. One of the problems could be easily solved by hand from there if a guess was made of one of the two remaining possibilities for the cell. I decided to code in guesses. After making a guess, it would use it's previous system to see if it could get a solution. It continued to make a single guess until it either solved the puzzle, or it ran out of single guesses. All fifty puzzles were solved.

Total run time was difficult to get. What you'd like is the amount of time it takes to solve each puzzle. So, if you had a thousand puzzles to solve, you could multiply your time by a thousand and get a good estimate for how long that would take. But the total time was much less than a second. It's unlikely that the time would scale. It's quite possible that a thousand puzzles would also take less than a second.

Of notable interest is that nearly five thousand people have solved this problem. There are tons of programs that have been published that also solve this problem. So at least one person in a million, world wide, has written a Sudoku solver. That's a good deal more than i'd have expected.

Friday, August 19, 2011

Bike Log Day Four

I weighed myself just before day one. I guess that would be day zero. I'd lost five pounds compared to the previous time i'd weighed myself. That was a couple months ago. As i haven't been dieting, per se, i didn't expect to see a drop. I figured that since it was a fairly dramatic five pounds, i must have caught my weight at a low ebb. Historically, my weight has normally risen and fallen, pretty much at random, over a ten pound range, in the course of any random week. When i take a measurement, there's usually no way to take it at face value. I weigh myself approximately daily over a week, and my weight for the week is the lowest number. I figure it's easy to add weight - drinking a gallon of water is about eight pounds. But, i figure the bottom is the bottom.

A gallon of water is quite a bit. In 1986, i drank a gallon of water every day for six months, and half a gallon the other six months. It's great for your health. Now, you might think that my weight value from two months ago would also be subject to the ten pound range. But that was with several measurements. So it's likely that it really was the minimum back then.

On day two, i weighed myself again, and it was another three pounds down. So that's down eight pounds. Eight pounds is not something i lose in two months without serious effort. So this minor mystery is getting to be less minor.

Thursday, August 18, 2011

Bike Log Day Three

In 1992, i rode to work every day for an entire summer. My speed started out at about 6 MPH, and ended at 21 MPH. I had a shower at work, so i could go as fast as i wanted. It was 9 miles each way, and so that first trip was an hour and a half. By the end, it was 27 minutes. Fastest transport across Boston.

Back in Boston, i started biking to work in the Spring. I really hadn't done any biking that season. Six miles per hour is the speed you can go on a bike if you're totally out of shape. Little kids who have just gotten over using training wheels can go this fast.

My first measured day this time around was a bit over ten miles per hour. It took a couple weeks to get to that speed back in '92.

Day three's first timing was 31:43, for an average speed of 11.91 MPH. That's more than 10.35 MPH. That's a 15% increase in speed in just one day. In 1992, a big speedup like this took a week. Things aren't exactly the same. One of the things that changed on this day was that instead of wearing a hooded sweat shirt, i just wore a sweat band over my ears. That means it was easier for my body to get rid of waste heat. Some of the early speed increases are going to be due to improvements in how things are done rather than in changes in physical health.

Wednesday, August 17, 2011

Bike Log Day Two

There is no bike log from day one. I wasn't going to log anything. After all, i probably won't bike to work for more than a few days this time. Don't worry. I won't post anything if i don't have anything to say.

The trip to work is 6.3 miles. My bike computer (odometer) said 10.11 km. I've not calibrated it to four significant digits. I haven't had this unit very long. I could have told this unit to read out in miles, but for no reason that i can discover, i told it to read out in km. So if i'm listening to jazz music on my mp3 player, i suppose it's Kilometers Davis.

It took 36 minutes and 25 seconds, according to the bike computer. My wrist watch said it took about 50 minutes. The bike computer keeps the time of day accurately. But if i stop for a street light, the bike computer stops too. There's no way that i was stopped for fourteen minutes. But i was stopped for perhaps five. I stopped my wristwatch stopwatch a bit later than when the bike computer would have stopped, so there's another two or three minutes. This anomaly is about six minutes. The man who has two clocks has no idea what time it is.

The average speed was 10.35 MPH. Again, this isn't calibrated to four significant digits. I'd read this as ten and a third MPH. The numbers probably have four significant digits of precision, but not accuracy. Precision has to do with repeatability. So you can think of the distance as a unit similar to miles, and compare day to day numbers with four digits. Unfortunately, though the bike computer has an Average Speed readout, and although the bike computer manual says that there's a trip timer, the only way to get trip statistics is to reset all values in the computer. So i lose the odometer setting. However, this value matches the bike computer's average speed readout, despite the fact that it also averaged a few previous trips. While what really matters is distance, what tracks progress is speed. I'll likely focus on average speed in the future.

Thursday, August 11, 2011


I've been on both ends of the interview. I've seen that both ends pretty much suck. Interviewers ask pointless and stupid questions. Interviewees are in a half panic and act like they've lost 50 IQ points or more. It's not realistic on either side. It's mostly luck if it ends up with any kind of a match.

Despite getting resumes from recruiters, who were supposed to match requirements to experience, we seldom got the experience we were looking for. We soon discovered that only 1 in 3 candidates that we asked in for an interview actually showed up. So, we invited everyone. No big deal - i always had work to do to fill in. In one interview, the English was so bad that it wasn't clear if the candidate matched the resume or not. One guy showed up, we showed him the job in the morning. He went out for lunch and didn't return.

One of our best employees was transferred in from another department. She would never have made it through our interview. She had little actual relevant skills, but learned quickly. I spent about an hour with her about once a week in a code review. I tried not to critasize her working code too much. I'd simply make non-mandatory suggestions. Her code improved rapidly in quantity and quality. Everyone has a learning curve period. Hers was no worse than most. When she left, she tried to get me hired by her new employer. They turned me down.

These days, when i'm the interviewer, the question is "is this someone i'd like to hang out with?". It's not that i want someone to hang out with. It's just that these are the people who are the really sharp candidates. Very little else matters. I don't care if the candidate can't wake up in the morning, if they're obnoxious, if they're holding 3 other jobs. I only care if they'll get the job done.

I often get a contract with only one or a couple interviews. I often get offers for months after getting hired and i've stopped sending out resumes. How long do they think i'll wait?

I didn't send a resume or cover letter for my first interview. It was a summer job while i was in school. I'd made it through my freshmen year in Engineering, and that was enough. I didn't send a resume or cover letter for my first job after i graduated. I said i had an Engineering degree. They wanted to hire me for whatever. By the time i needed a resume, i had tons of experience on it. Many employers are looking for specific narrow skills these days, so i have to edit it down to what they want to see.

I don't say anywhere that "I have strong communications skills." My resume now has a reference to my TV show. It's a real attention grabber.