Friday, November 30, 2007

Design Principles To Live By

Object-oriented design and design patterns can seem complex.  There are a lot of ideas and cases to consider.  However, there are a handful of principles that, if followed, will result in code that complies with most if not all of the patterns.  These are the patterns behind the patterns.  In my mind, there are 5.  In the next week or so, I'll be writing a post on each of these.



  1. Encapsulate Variation
  2. Design To Interfaces
  3. Loose Coupling Between Classes
  4. Classes Exhibit High Cohesion
  5. Prefer Composition Over Inheritance

  6. Don't Repeat Yourself [late addition]
I'm sure I've missed a couple.  If I have, let me know.

Thursday, November 29, 2007

Inbox Zero

If you're anything like me, you have way too much e-mail to read it all.  To try to cope with this, I've resorted to a collection of rules that sorts my mail into a Byzantine structure of folders.  This helps a little, but has the problem of helping me miss a lot of mail as well.  Things get neatly sorted into specific folders where they are summarily ignored for large periods of time.  I just ran across a talk by Merlin Mann discussing a concept he calls "Inbox Zero."  There are basically two main concepts:

  1. Don't let e-mail run your life.  Check it only periodically.
  2. When you do check it, take action on each piece of mail right away.  The key is the nature of the action taken.  In my world, taking action has always meant reading and responding to the mail.  This takes a long time and it's hard to get through the mailbox this way.  Instead, Merlin suggests doing one of the following, all of which are quick:
    1. Delete.  If the mail isn't important, delete it immediately.
    2. Archive.  If this isn't something you need now but might want later, move it to an archive folder.  He says to use just one.  That way you don't need to think about how to file it.  In Outlook 2007 (or earlier if you used desktop search or Lookout) and online mail programs, searching can solve the problem folders were intended to solve.  The advantage of only one is that you don't need to think about how to file it.
    3. Respond Quickly.  If you can answer in 1-5 sentences, just do it.  Then delete (or archive) the mail.
    4. Just Do It.  If action is required that can be done now, get up and do it.
    5. Flag For Follow-up.  If the mail requires more time, move it to a follow-up folder or mark in such a way that you know to get back to it.  This lets you move on.  Come back to this folder at the end of the day and clean it out.

That's all.  I'm going to give it a shot and see how it works.

Apparently this talk was based on a series of blog posts.

Sunday, November 25, 2007

Video Podcasts

With my new Zune, I've started watching some video netcasts.  Here are the ones I've found the most interesting so far:

  • Tekzilla - Feels a lot like old TechTV.  1/2 hour an episode talking about everything from routers to Black Friday sales.
  • The GigaOm Show - Om Malik interviews headliners and comments on the Web 2.0 world.
  • DL.tv - Another technology news show.
  • Cranky Geeks - John Dvorak hosts a panel discussion about the latest trends in technology.  Think Twit but with video.  Not quite as good though.
  • Ask A Ninja - Short form comedy.  Hard to describe.  Just watch it.
  • Tiki Bar - Comedy show set around the adventures in a tiki bar.  Well written and high production value.

If I'm missing any good video casts, let me know.

Saturday, November 24, 2007

The New Zune Revue

Over the past few years I have become an avid podcast listener.  I've been using Creative MP3 players until this point.  I have owned a Zen Nano, Zen Stone Plus, and a Zen Vision M.  The first was good its 1 GB size became restricting.  The second was a good size, but the battery life was terrible.  It's supposed to be 10 hours but it felt more like I was getting 5-7.  Worse, it's not clear when you are about to run out of battery.  The Zen Vision M is nice, but too heavy for my liking.  The UI is also quite a mess.  It's very inconsistent and not always intuitive.  For various reasons, I've never owned an iPod.  I also skipped the first Zune due mostly to the form factor.  I want to carry my player in my pocket all the time.  A hard drive player is just too big for that to be comfortable for me.

About a month ago I started seeing and reading about the new second generation Zune.  I liked the firmware on the first one but the PC software was pretty bad.  The new one did two things that piqued my interest.  First, they came out with a flash model.  Second, they totally rewrote the PC software.  As an added bonus, there is finally podcasting support.  The new unit looked promising so on the first day it was available, I bought one of the black 8GB Zunes.  I was not disappointed.  The device is solid, the firmware great, and the PC software very well done.  It's not perfect, there are certainly things that could be better, but overall the experience is amazing.

Highlights

When you unbox a new Zune, there is no CD included.  Instead, you have to go to the web to download the software.  The first thing I noticed is that there is a native 64-bit version of the Zune Player.  I run a 64-bit version of Vista on my main home machine so this was a welcome thing. 

The new player is elegant.  It is very streamlined.  This means that some functionality you might want is missing, but for the purpose of playing media and syncing to a Zune it is great.  In fact, I don't think I've loaded Windows Media Player since installing the Zune player.  It's that good.  It uses the same 2D control system that the Zune uses.  Visually, it looks great.  It makes iTunes look like a spreadsheet by comparison.

The support for podcasting is well done.  There is a list of hundreds of podcasts included in the marketplace.  You can search for them by keyword or browse by category.  Subscribing is as easy as hitting a subscribe button.  If the podcast you want isn't in the marketplace, you can just enter the url of the rss feed and it works the same.  It will then download the 3 most recent episodes and upload them one at a time to the Zune.  You are free to change these defaults if you want.  On the Zune, the podcasts show up in their own menu and are separated into audio and video podcasts.  When you finish listening to a podcast, it is automatically marked as watched and will be removed next time you sync.  In a really cool touch, each podcast has its own bookmark.  Unlike the Creative players I'm used to, I'm no longer hostage to the podcast.  It's easy to switch to music or even another podcast and come back to the same place later.

The screen on the Zune 4 and 8 GB models is a bit small, but it's fine for watching many shows.  I have watched video podcasts and TV shows transcoded from my Media Center and both are definitely watchable.  The screen is bright and the colors vivid.

Wireless sync is really cool.  Once you set up the Zune on your wireless lan, you can cause the Zune to sync any time you want.  It works well.  Look Ma!  No wires.

Lowlights

Unfortunately, not all is wonderful in Zune land.  The first thing I noticed is that I couldn't install the updated firmware.  I got an error 0xC00D11CD.  Searching the web I found that I'm definitely not the only one hitting this error.  Luckily, I also found a solution hidden in the forums.  If you see this error, try plugging in the cable directly into one of the motherboard mounted USB ports.  I get the error every time I'm plugged into the front jack but never in the back.  Your mileage may vary but hopefully this will help someone.

I really miss the ability to force a transcode before syncing.  The Zune can play audio at high bitrates and video at high resolutions.  If I'm not going to copy the file elsewhere, though, the extra resolution is wasted.  I want an easy way to down-res the audio and video files before syncing.  I can't find a way to do this presently.  This becomes a big problem when I'm trying to sync files from Media Center.  These are often 2-3 GB .dvr-ms files.  Because the Zune can play them directly, it doesn't transcode them.  Unfortunately, I don't want to waste 3 gigs of my 8 for one TV show.

While I'm at it, I'd like to see support for Divx and Audible formats.  Neither are on the device or in the software presently.

Conclusion

While there are definitely some things that could be better, this is a major leap forward from the first Zune.  The device UI is easy to use.  The new player is great.  The support is much broader than the first time out.  I haven't used an iPod extensively so I can't compare, but I don't feel like I'm missing anything with the Zune.  In fact, there are features like wireless sync I would miss if I did have an iPod.  If you are in the market for a new MP3 player this Christmas, give the Zune a good look.  You might be surprised at what you find.

Thursday, November 22, 2007

Happy Thanksgiving!

It is Thanksgiving today.  My wife and I will be having a small gathering of about nine family members.  I always enjoy getting some time to put work aside for a few days just hang out with family.  I hope you all have a great Thanksgiving today and that many of you get to spend time with family and friends.  I've often said that 80% of happiness is just deciding to be happy.  I encourage everyone to take the opportunity today to reflect on the good things in life.

Saturday, November 17, 2007

Resume Advice

Some resume advice from Steve Yegge.  I don't agree with all of it but it's good stuff to consider when writing your technical resume.

Friday, November 16, 2007

Phone Screen Questions

Steve Yegge from Amazon offers his Five Essential Phone Screen Questions.  It's an old post, but a good one.  His advice is solid.  It's always disappointing to bring in a promising candidate for an interview only to have them bomb.  It would be much better to screen them out early.  Steve give suggestions for what to ask (and not ask) to make a better determination up front.  Most of the advice is universal.  Some is specific to the type of work Steve is hiring for.  For example, he suggests that one of the five areas to probe is scripting and regex.  There are a lot of jobs out there that need this, but not all.  On my team (Audio Test Development in Windows), scripting and regex don't get a lot of use.  Instead, I would tend to ask about OS concepts and debugging.

Steve gives some other good advice.  First, he says that the interviewer needs to direct the interview.  That seems obvious but it is easy to focus on the areas the candidate wants to cover (the things on his/her resume) and forget the things that are missing.  Second, he gives a bar for the answers.  He says that you are looking for a well-rounded individual.  The acceptable candidate does not have to excel at all five points.  Rather, they cannot fall flat in any area.

I concur with most of Steve's advice.  My addition to his is to probe beyond the first-level answer.  I like to ask questions that go deeper until I find the point at which the candidate no longer knows the next level of answer.  It's easy to cram some high-level ideas.  Everyone can say that threads are more "lightweight" than processes, but what does this really mean?  Either the candidate really understands and has some solid second- (or third-) level answers or they don't really know the subject area.  Don't be afraid to ask follow-up questions until the candidate runs out of answers.  You'll get a much better sense for the candidates' strengths and weaknesses.  Of course, if you are going to do this, tell the candidate up front.  It's not fatal to not be able to explain how page tables can be used to map memory across processes.  You don't want them flustered when they mess up.