Tag Archives: gadgets

Amazon Kindle + Audible = Killer-app?

My wife sent me a link to the Amazon Kindle the other day, and asked, “Have you heard of this? what do you think?” I think she wants one.

I have to admit that the thought of such a device is appealing. I have tried reading e-books on my PDA and BlackBerry occasionally, but other than a quick read now and then, it’s too painful–the screen was too small.

But the Kindle…this might work out. I’m seriously considering getting one.

With the news that Amazon is buying Audible, the story gets more interesting. Personally, I haven’t gotten much into audio books, but I know people who do and love them.

I have no idea if or how Amazon will integrate Audible into the Kindle’s experience, but I have a feature request. For a killer feature:

Sell the audio version of a book at a discount (or free, or + $1)when someone buys the e-book format (or vice-versa). Then, synchronize the bookmarks between the two formats. That way, I can plug the Kindle into my car’s stereo on the way home to listen to my current selection, and at night I can pull it out and continue reading from where the audio left off.

That’s my prediction for a killer app. My wife and I do a LOT of reading (we JUST ordered our first TV, and it’s only for NetFlix, and we will not be hooking it up for any broadcast or cable). I think someday soon we’ll both have our own Kindle–it would save a lot of bookshelf space.

Technorati Tags: ,,,


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Updated my favorite podcasts

I’ve updated my list of podcasts with some that I forgot and some new ones I discovered while finding the links to the first ones. I also slightly reorganized the list (Added a business section)


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Podcasts I listen to

I got a 4 MB blue iPod Nano 2nd Genfor my birthday last June, and while I do have a few music playlists, I almost exclusively listen to podcasts. I can’t believe I went so long without one of these. Putting together the list below led me to some others that I might give a try, but for now here’s my list:

Education

  • In Our Time – A weekly BBC production discussing various events, people, or ideas in history (recent or ancient). Always interesting. About 45 minutes long.
  • Philosophy Bites –  A weekly interview with someone about a specific philosophical topic. About 15 minutes long.
  • Talk of the Nation: Science Friday – Weekly show about all sorts of issues relating to science. It’s in a very easy-to-listen-to format. Broken into segments. About 1hr per week.
  • Science Talk from Scientific American – I don’t think I like it as much as Science Friday, but it’s still very interesting. It’s usually focused on one or two topics per episode, sometimes recording of lectures by prominent scientists. Weekly, about 30 minutes.
  • Grammar Girl – Nice and short, answers to tricky grammar questions. Often plays off current events. Weekly. 5 minutes.
  • Get-It-Done Guy – I’m a fan of Getting Things Done, as I kind of discussed in my entry on Outlook. This is a nice, short podcast with simple ideas for efficiency in your life. Weekly. 5 minutes.
  • Legal Lad – Answers to interesting legal questions. Weekly. 5 minutes.
  • Fundamentals of Piano Practice – really just somebody reading out loud the online book of the same name. I play piano, and I’m learning a ton of fundamental principles from this book that help. The hands-separate method? I’ve played for 8 years and never had it explained to me so clearly. It’s obvious in retrospect, but that’s the kind of good thing you learn in this book. Unfortunately, new readings haven’t been added since October. Varying length and frequency.
  • Learn Jazz Piano – I haven’t listened to any of these yet, but I’ve always wanted to play jazz. Infrequent (but still being updated!). 30m.
  • WordNerds – Interesting discussion of words and language. I always learn something interesting. Every three weeks. 30-60 minutes.

Business

  • MarketPlace – I like to follow the business news, and their format is really good. Entertaining, informative. Daily. 30 minutes.
  • MarketPlace Money – Their weekly show that goes into more depth on topics, discusses more “timeless” issues, answers questions. I really like this one. Weekly. 1hr.
  • Entrepreneurial Thought Leaders – Forums at Stanford with lecture and questions by famous entrepreneurs. These are frequently interesting, especially if you want to start a business someday. Weekly. 1hr.

Fun

  • Car Talk – how can you not have this on the list? They’re hilarious. And I do learn something about cars. Mostly, just fun, though. Weekly. 60 minutes.
  • LAMLradio: LEGO Talk Podcast – Interviews with LEGO builders, and others in the online LEGO community. I like it, but you probably have to be familiar with the community to follow it. Weekly 15 minutes.
  • MunchCast – A weekly show about junk food! I’ve only listened to the first episode, but I’m hooked. It’s more interesting than it sounds. Weekly. 30m.

Technology

  • .Net Rocks – Very well put-together show about .Net development, upcoming technology, interviews with industry pros. Twice weekly. 1hr+
  • This Week in Tech – Casual discussion of the week’s computing news with Leo Laporte. Highly entertaining. Has the cranky John C. Dvorak on often, but the panel rotates. Weekly. 60-90m.
  • Windows Weekly – Covers Windows-specific news (mostly) with Paul Thurrott and Leo Laporte. Also interesting stuff. Weekly. 1hr
  • Security Now – With Steve Gibson and Leo Laporte. They talk about all sorts of security-related topics. Very interesting, very well done. They have a knack for explaining difficult concepts in a way that’s easy to grasp. One of my favorites. I am not a security guru, but this is fascinating stuff. Weekly. 1hr.
  • HanselMinutes – with Scott Hanselman who now works at Microsoft. Discusses various technical topics, usually related to programming. To be honest I don’t like this one as much very often, but I still listen to it occasionally. Don’t know why…a little dry?
  • NPR Technology News – stories culled from various NPR programs into a 20-30 minute collage. Weekly.
  • The Tech Guy – another Leo Laporte show, in a longer format, with interviews, callers, and more.

Honorable Mentions

  • The Restaurant Guys – Discusses “food, wine, and the finer things in life.” If you like food, you’ll probably enjoy this podcast. I was probably interested in about half of their shows but something about them bugged me so I’ve dropped them for now in favor of other things. I may add them back soon. Daily. 1hr.

Technorati Tags: ,


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Easily Unit Testing Event Handlers

In C#, If you need to unit test a class that fires an event in certain circumstances (perhaps even asynchronously), you need to handle a little more than just running some code and doing the assertion. You have to make sure your unit test waits for the event to be fired. Here’s one naive way of doing it, a WRONG way:

   1: private bool statsUpdated = false;
   2: private ManualResetEvent statsUpdatedEvent = new ManualResetEvent(false);
   3:
   4: [Test]
   5: public void CheckStats()
   6: {
   7:     BrickDatabase db = new BrickDatabase(tempFolder, maxCacheAge);
   8:
   9:     statsUpdated = false;
  10:     statsUpdatedEvent.Reset();
  11:
  12:     db.InventoryStatsUpdated += new EventHandler(db_InventoryStatsUpdated);
  13:     db.DoSomethingThatFiresEvent();
  14:
  15:     statsUpdatedEvent.WaitOne();
  16:
  17:     Assert.IsTrue(statsUpdated);
  18: }
  19:
  20: void db_InventoryStatsUpdated(object sender, EventArgs e)
  21: {
  22:     statsUpdated = true;
  23:     statsUpdatedEvent.Set();
  24: }

There are a number of things wrong with this:

  1. The class variables. More complex unit test class. Have to coordinate these variables across multiple functions.
  2. Since they are class variables, you will want to reuse them, but you’d better remember to reset the event and the boolean every time!
  3. Have to have two functions to do something really, really simple.
  4. The WaitOne() does not have a timeout, so if the wait is ever satisfied then statsUpdated is guaranteed to be true.

Here’s a better way of doing it, using anonymous methods in C# 2.0:

   1: [Test]
   2: public void CheckStats()
   3: {
   4:     BrickDatabase db = new BrickDatabase(tempFolder, maxCacheAge);
   5:     bool statsUpdated = false;
   6:     ManualResetEvent statsUpdatedEvent = new ManualResetEvent(false);
   7:
   8:     db.InventoryStatsUpdated += delegate
   9:     {
  10:         statsUpdated = true;
  11:         statsUpdatedEvent.Set();
  12:     };
  13:
  14:     db.DoSomethingThatFiresEvent();
  15:
  16:     statsUpdatedEvent.WaitOne(5000,false);
  17:
  18:     Assert.IsTrue(statsUpdated);
  19: }

Improvements?

  1. The event is just part of the method. Since the event handler is an anonymous delegate, it can access the enclosing method’s local variables.
  2. Added 5,000ms timeout to the WaitOne() function to prevent hanging of unit tests.

Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

The Benefits of Having Too Much Processing Power

Do an experiment: keep Task Manager or any other CPU activity monitoring program up on your screen for a few hour or days, glancing at it every so often. Do you see it EVER above zero (other than momentary spikes)?

Here’s mine, from a Google sidebar gadget:

mycputime

I’ve got a Dual Core and 2GB RAM. Currently I have open two copies of Visual Studio 2005, Word 2003, Outlook 2007, Paint.Net, RSS Bandit, Adobe Reader, IE, MSDN help, Windows Live Messenger, and Google Deskbar.

So that’s using just over 1 GB of RAM. And ZERO CPU. I’m watching this. The CPU meter goes up a little when I type, open a new program, compile my source code, etc., but most of the time it’s zero, even when I think I’m actually working.

I used to eschew running apps like Google Deskbar, wallpaper helpers like Display Fusion, or other system utilities that continually run. But I had a realization–it doesn’t matter! I could run many more utilities concurrently and still not come anywhere close to creating a slowdown on my computer.

Of course, I’m only talking about non-interfering/non-processor-intensive programs. This immediately excludes anti-virus programs, which interrupt every process to examine system behavior continually, or running video compression (duh) in the background.

But things like desktop searching, system monitoring (if it’s not too intrusive), utilities, and any other independent process–yeah, just throw them on. They won’t make a dent.

They key word in that last paragraph is independent. Independent means they don’t depend on or interfere with other processes.

Technorati Tags: ,,,,


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Bose headphones

I received many wonderful gifts for my birthday, but these in particular have helped me at work in a way nothing else has.

I listen to music constantly as a program–it helps me concentrate and eliminates all other distractions. 

They really do work as well as I expected–maybe even better. I work in a pretty noisy environment–the hum of airconditioning, computers, and people is constant. These take it all away. I don’t get ear fatigue because the volume is lower than I usually had it, and the cuffs fit around the ears, not on them. The A/C sound is completely gone, and people sound like they’re far away, even if talking right next to me. I’ve heard things in many songs that I’ve never heard before, especially at the end of some tracks when the last vibrations of an instrument are fading out–you can hear every last bit, and it’s wonderful!

 


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: