A lot of code I come across consists of relatively few, but long, methods. The code does what it is supposed to do. However, it could be improved a lot. Refactoring to use more methods can produce better structured programs that are easier to understand, easier to modify, easier to test and easier to debug. Below are 7 reasons why using more methods can be a good idea.
I have read a couple of blog posts about LinkedIn recently. “Is LinkedIn Cheating Employers and Job Seekers Alike?” is criticizing LinkedIn for charging job seekers to appear “at the top of the list” when applying for a job. “LinkedIn Spam (?) and Recruiters: A Guide for Geeks” has some good advice on how to interact with recruiters on LinkedIn. These among others made me ponder the question: Is LinkedIn good or bad? (and Betteridge’s law notwithstanding, the answer is not “No”). Here is my take: Continue reading
All programs need some form of logging built in to them, so we can observe what it is doing. This is especially important when things go wrong. One of the differences between a great programmer and a bad programmer is that a great programmer adds logging and tools that make it easy to debug the program when things fail.
When the program works as expected, there is often no difference in the quality of the logging. However, as soon as the program fails, or you get the wrong result, you can almost immediately tell the good programmers from the bad. Continue reading
I recently got an e-mail from Michael Sherman, a teacher in New York. He had developed a variation of the card game Set called Complementary Pairs. This is how he described it:
“We have Set competitions at the school where I teach, both as individual time trials and as head-to-head matches. When many students at my school became capable of finding sets very quickly, I developed what I called C.P. Set (Complementary Pairs) to slow them down a bit and reduce the number of simultaneous calls in the head-to-head matches. The idea is to find two pairs of cards that both require the same 3rd card to complete a Set. The completing card does not need to be on the board; only the four cards forming the complementary pairs are picked up.” Continue reading
In my previous post on what programmers want, I ranked working from home low on the list. Several commenters value working from home higher, and K (not his real name) added a link to a great TED talk given by Jason Fried (of 37signals) on why it is hard to get any work done at work. Jason starts with the observation that programmers need long stretches of uninterrupted time in order to get stuff done, and goes on to recommend avoiding meetings, and minimizing interruptions by using chat and e-mail instead of direct communication. While I agree with the meetings part, I think there is more to consider regarding interruptions. I also value face to face interactions more than he does. Continue reading
I got an e-mail last week from three students at Halmstad University doing a three month project on what programmers want in a job, and how companies can attract talented programmers. Here are my answers to their questions, in order of importance. Obviously people have different preferences, so it would be interesting to hear what items you agree and disagree with, how you would rank them, and what you think is missing. Continue reading
I recently finished the Coursera course Algorithms: Design and Analysis, Part 2 by Professor Tim Roughgarden of Stanford. I’ve already reviewed part 1, and here are my thoughts on the second part.
The main theme of part 1 was the divide and conquer paradigm. In the second part the main themes were greedy algorithms, dynamic programming and NP-Complete problems. The lectures were excellent, with clear and easy to follow algorithm development and proofs. At six weeks, it was one week longer than part 1, and I found it quite a bit harder than part 1. Here’s more on each part. Continue reading