Gartner Predicts the Future of the Mobile Market

By Michael Flanakin @ 2:28 PM :: 2309 Views :: Technology, Predictions :: Digg it!

Gartner recently released a smart phone market forecast, which looks at prior and predicted market share fluctuations from 2007 to 2013. I found some very interesting, but quite explainable predictions. I recommend taking a look at it yourself, but here are a few teasers.

The overall market has grown ~1.5x in 2 years and is expected to grow ~3.6x over the next 4 years. The ratio of consumer-to-business phones wavers, but remains about 3:1 throughout the assessed time frame.

Gartner predicts Android quadrupling its market over the next 4 years, ending up #2 in the market. This is likely due to the open nature of the platform. While I agree with a large growth, 4x isn't quite what I'd expect. Seeing this, you're likely to suspect other big changes, too. I think you'll be surprised with Gartner's numbers, tho.

Blackberry is estimated to steadily decline over the coming years, ultimately dropping 6% from their current standing. From #3 in 2007 to #2 in 2008 thru 2010 to #4 in 2013. A thought-provoking rise and decline, but it shows how Blackberry isn't quite the innovator they'd like to be.

For what most believe is the golden child of the mobile market, Gartner doesn't have much faith in the iPhone platform. iPhone tripled its market share from 2007 to 2008, then grew 50% in 2009. Most would think this would continue to shoot up over the coming years, but Gartner begs to differ. Gartner predicts only minor growth year over year thru 2013. They foresee a 10% growth by next year, virtually no growth the next, and a very trivial 1% growth in 2013. From here on out, the iPhone is expected to remain a #3 player thru 2013. Apple brought an interesting player to the market a few years back, but Gartner seems to believe that's where their innovation stops. I was very surprised to see the dwindling growth.

Given the fact that we know Symbian is #1 today and we've already covered the #2, #3, and #4 players, you might expect to see Symbian in the #1 spot. Well... you'd be right. Gartner sees Symbian maintaining their place, but I speculate this isn't -- nor has it been -- due to superior innovation in the market. It's only a matter of time before other players take over. I suspect (not Gartner) they'll drop to #2 by 2016 as other players drive advancements.

The road has been long and rocky for Palm, as we all know. WebOS seems like a last ditch effort to maintain a place in the mobile market. Gartner predicts they'll double their market share in 2010, but that's about the only success they'll see, as they slowly lose market share.

Windows Mobile
Gartner shows Windows Mobile steadily dropping from 2007 to 2010. That's no surprise, given all we've heard. With a mid-2010 release of Windows Mobile 7 -- Microsoft's response to the iPhone -- it's no surprise we won't see a spike until 2011, when Windows Mobile jumps up 15%. Gartner doesn't have faith that this will be good enough, tho, as they foresee market share dropping a little more than half a percent below their current share. While Microsoft isn't talking about Windows Mobile 8, they'll have to deliver it in relatively short order, if they want to show the market they mean business. I have faith this will happen by 2013. In fact, I'm hopeful that we'll see some major enhancements and mergers between Zune and Windows Mobile in the same time frame. My gut tells me we'll see this by 2012. It won't be until then that people truly see what Microsoft is capable of.

Linux, Maemo, and others are also included in the study. I'm not familiar with any serious Linux competitors other than Android, but they've lost 50% of their market share in the last 2 years and are presumed to continue to drop, eventually giving Palm some competition for the least amount of share by "major" competitors... if you consider Linux a major competitor. I have to say I was surprised by Maemo, which I don't think I've heard much about. It's a Linux-based tablet OS Nokia developed and subsequently brought -- or, at least, is bringing -- to the smart phone market. I liken this to the opposite of Google's Android-to-Chrome OS move. With a 2009 initial showing, Gartner surprisingly predicts Maemo shooting up to 6.5% by 2013. Very interesting; unlike other players, who drop from 1.1% in 2007 to less than .1% by 2013.


If you ask me, Microsoft should seriously consider buying RIM. Right now, they're #2 and #4, but Microsoft stands to gain a tremendous amount from the corporate presence Blackbery currently holds. With what's expected to come in Windows Mobile 7, this would also give Blackberry users a very nice glimmer of hope around what I speculate will be a very nice mobile OS. Now isn't the time, of course. Given Gartner's insights, I'd say 2011 would be the best time to drive such an acquisition, hopefully showing value for Blackberry users in the Windows Mobile 8 time frame.

Short of a Microsoft/RIM acquisition, somebody needs to buy Palm for Palm's sake. Given my newly-acquired knowledge of Maemo, I have to say Nokia should seriously consider it. I was initially thinking RIM should give it a thought, but I don't see them having much to gain. Maemo and WebOS both have a lot in common. A merger could go a long way... not that Nokia needs Palm. The Palm-ers could definitely use some Nokia love, tho.


The last thing I should mention is that most of this is speculation on my part. Gartner provided the numbers -- aside from my Symbian 2016 and Windows Mobile 2012/13 comments. I wholly recommend you look at Gartner's numbers and other mobile studies they have to fully understand what they're thinking and why they made these forecasts.

Silverlight 3 Tools Offline Install

By Michael Flanakin @ 8:30 AM :: 0 Views :: .NET, Development, Tools/Utilities :: Digg it!


Ever try to install the Silverlight dev tools in an environment with "filtered" or even no access to the internet? If so, you've probably taken a look at the errors in the log and seen the following error:

Error from JobError Callback : hr= 0x80190193 Context=5 Description=HTTP status 403: The client does not have sufficient access rights to the requested server object. . Percentage downloaded = 0

For some tools, like .NET 3.5 and 3.5 SP1, there's an offline installer available on their respective download pages. Unfortunately, the Silverlight dev tools don't have that. I major oversight, if you ask me, but what can you do? Note that this was a problem with Silverlight 2 and 3. I haven't heard anything about a fix for the future, but I have to think they realize the work-around is ridiculous. Enough of my blabbering, tho...

  1. Download and save the Silverlight 3 Tools for VS 2008 SP1 to your desktop
  2. Create a new sltools directory on your desktop
  3. From a command prompt, run silverlight3_tools.exe /x to extract the files
    NOTE: You can also use a tool like 7-zip to extract the files
  4. Specify the directory you created in step 2
  5. Download and save the Silverlight Developer Runtime to the sltools directory
    NOTE: My problem was that the Sl Dev Runtime is at a blocked URL, so you may have to download it offline and bring it into your environment
  6. Run sltools\SPInstaller.exe to perform the actual installation
  7. Delete the sltools directory

That's it. Not hard, but annoying.

Tim Heuer Syndicated feed has a similar blog post for Silverlight 2, but I wanted to share this because the developer runtime is in a new location. I'm still trying to figure out what the full URL is, so I'll update this if I get a chance to figure that out.

Update: Thanks to the Bob Pomeroy Syndicated feed from the Silverlight team for helping me get the direct URL for the Silverlight 3 developer runtime.

Boot from USB to Install Windows 7

By Michael Flanakin @ 6:34 PM :: 2173 Views :: Technology :: Digg it!

One of the things I really like about Windows 7 is it can be installed from a USB drive -- perhaps thanks to the rise in netbooks. This isn't anything terribly new to the world of computers, but it's always nice when you have a new feature to play with -- and, let's face it, Windows 7 is all about simplicity. When I first heard about installing from a bootable USB drive, I hoped it was going to be as simple as copying the files over. It wasn't. All-in-all, the process wasn't too bad, tho.

  1. Attach the USB drive
  2. If you have anything on the drive you want to keep, copy it off
  3. Click Start, type and select the Device Manager option
  4. Expand Disk Drives
  5. Right-click your USB drive, click Properties > Policies
  6. Check Optimize for performance and click OK
  7. Close Device Manager
  8. Open Windows Explorer (Win+E)
  9. Select Computer, right-click the USB drive, select Format...
    NOTE: Remember the total size of the USB drive and what drive letter it is assigned
  10. Select the NTFS file system, uncheck all format options, and click Start
    NOTE: This process will take a while, so we're going to multi-task
  11. While the USB drive is being formatted, copy the Windows 7 DVD contents to the c:\win7 directory
    NOTE: If you only have an ISO file, use 7-zip to extract contents to the target directory
  12. Click Start, type powershell, right-click the Windows PowerShell option, and select Run as administrator
    • Fine, fine... if you're not on the band wagon, run Command Prompt as administrator
  13. When the USB drive is done formatting, type diskpart, and press Enter
  14. Type list disk and press Enter
    • This will return results like the following. In this case, I have a 16 GB drive as disk 1.

      DISKPART> list disk
        Disk ###  Status         Size     Free     Dyn  Gpt
        --------  -------------  -------  -------  ---  ---
        Disk 0    Online           74 GB      0 B
        Disk 1    Online           14 GB      0 B
  15. Type select disk <d>, where <d> is the disk number from the previous step, and press Enter
  16. Type list partition, press Enter
    • This will return results like the following. In this case, I have a 16 GB drive as disk 1.

      DISKPART> list partition
        Partition ###  Status         Size     Offset
        -------------  -------------  -------  -------
        Partition 1    Primary          14 GB    20 KB
  17. Type select partition <p>, where <p> is the partition number from the previous step (most likely 1), and press Enter
  18. Type active, to make this partition active an press Enter
  19. Type exit and press Enter
  20. When the Windows 7 disk contents are done copying, type cd c:\win7\boot and press Enter
  21. Type .\bootsect /nt60 <e:>, where <e:> is the drive letter your USB drive is assigned to (i.e. e:), and press Enter
  22. Lastly, copy the contents of the c:\win7 directory to the root of your USB drive

Wow... 23 steps seems like a lot more than I originally realized, but it's just about going thru the motions. You'll be waiting for the USB drive to be formatted and files to be copied for the majority of the time. Once you're done, reboot and plug in your USB drive to kick off the installation. Remember to check your BIOS boot settings. If your machine isn't configured to even try to boot from USB, you won't get very far.

Comparing Virtual Earth and MapPoint Web Service

By Michael Flanakin @ 11:04 AM :: 1733 Views :: Development, Tools/Utilities :: Digg it!

When I need to create a geospatial visualization, Virtual Earth is my default answer. When talking to someone who's been in this space for a while, he mentioned the MapPoint Web Service. I initially assumed this was a legacy offering that Virtual Earth replaced. Apparently not. Tatham Oddie has a very nice high level comparison to at least help you determine which makes the most sense in a given situation.

  Virtual Earth MapPoint Web Service
Map Styles Road, Aerial, Birds eye Over 30 different styles (optimised schemes for night viewing, etc) however no aerial imagery
Integration style JS control (best for embedding in web pages) SOAP web service (usable anywhere)
Interface style Drag and drop positioning, scroll wheel support, interactive pushpins, AJAX based. Roll your own (it returns an image and you have to work out what to do with it).
Pushpin support You create them all yourself on the fly using API calls – any clustering / filtering optimizations have to be done manually. Can upload pushpin sets to their databases and they will handle plotting / clustering and filtering.
Routes Specify a start point and an end point and they’ll give you a route in text. End of story. Specify the waypoints, preferred road styles (back roads, highways, toll roads, non-toll roads) and it will return a machine readable result set.
Cost Free (commercial use has some minor restrictions) Per transaction
SDK documentation and support Basic MSDN docs, active community ( Plenty of MSDN docs and articles, including VS.NET integrated help and plenty of websites (

A Plea for IE

By Michael Flanakin @ 7:28 PM :: 4446 Views :: Technology, Microsoft, Predictions, Tools/Utilities, User Experience :: Digg it!

Internet Explorer

Microsoft is out to prove a point with Windows 7. I can see the message clearly: "See, we can deliver on time; and earlier than most expected. And to top it all off, we did so without drastically changing the OS. That 'polished' OS you're looking at... yeah, it's Vista; 'Vista-point-1' to be exact. Sure, we tweaked it; but that's just to prove another point: Microsoft software isn't about bloat." I could probably go on for a while, but the signs are all there. Sinofsky has done a great job taking the Windows team under his wing. I've been very happy with some of the decisions they've made. As a matter of fact, I'm hoping to see some of the same changes on other fronts. Enter Internet Explorer.

IE8 is a big flop in my book. Don't get me wrong, it's my default browser and I love the enhancements; but it's just hiding the real, underlying problem: the foundation. I apologize for the analogy, but you can only mold a pile of crap so many ways before it just starts falling apart. Arguably, the same can be said about Windows, but Windows 7 has really given it a refresh. It's hard to explain how much better Windows 7 feels. I have to say I'd liken it to the first day I got Windows Vista, to be honest; but the key differentiator there is that I had quality hardware that was up to the challenge and no legacy software or devices to be concerned with. I'm not the "normal" user, of course, and I feel bad for those who had bad experiences. It's not because the software is bad, it's because your circumstances around which you experienced it were wrong. Not that Microsoft isn't to blame, tho; but I'm getting way off topic. It's time for a major change with IE.

I remember seeing some early concepts around IE8. At first glance, I was confused at a few of the ideas -- I'm thinking of one in particular -- but after I paused to really mull it over, it hit me. The power users would have at their fingertips would be astounding. There's a common root to the booming growth of Google and Firefox. This is exactly what Microsoft would've seen with this feature. Guess what: that feature never saw the light of day. As a matter of fact, I don't even know that it made it past that slide deck. Admittedly, the idea was rough, but it had some real potential. What's funny is that I just read something about the same concept being applied to another browser. *sigh*

Before IE8 beta 1 hit the streets, I saw another slide deck about what would be included in IE8 and 9. At first, I was excited, but it didn't take long for that to wear off. I actually began to question some of the decisions. There was (once again) one feature loved, but then I started to wonder if it even made sense. Depending on whether the team takes a left or a right out the gate will be the deciding factor for that feature... if it's still even a possibility. IE8 was pushed back so much that the IE9 time frame and feature set is completely out of the picture for what I saw. It's too bad; I was looking forward to a few quick revs. At the same time, this could be perfect timing.

Windows 7 is on the way, with rumors of April and May release candidates culminating in a June, July, August, September, October, November, or January final release date. It's pretty clear nobody has a good clue of the actual release date, but there is one constant in all the confusion: simplicity and performance are the two driving tenets in Windows 7. These two factors are huge for usability and, furthermore, perceptions. So, when I think about what to expect in IE9, I'm looking for both of these: simplicity and speed. IE8 is a dog on some machines. We've seen JavaScript benchmarks and "everyday use" benchmarks that all tell us different things, but it all comes down to our individual experiences... and perceptions. For IE to be a contendor, it needs to clean up its act. I want a sleek, sexy browser. It's not Firefox; it's not Chrome; and it sure as hell isn't Safari or Opera. I'm not saying each isn't functional, I'm just saying there's a lot to be desired.

Opera's doing it's thing, although I'm not sure why it even bothers; Apple's giving Safari on Windows a go, but not doing well; Google's got juice, but I don't think they have the right talent-mix to succeed; and Firefox is leading the pack against IE, but hasn't really made any significant innovations and is growing more by perception than anything. Microsoft (read: IE team), the browser market is yours to lose [which you're doing]; but it's also yours to dominate. Take a step back. Review the history books. There is one constant in what drives the up-and-comers of today. See that and feed into it. The world is asking for simplicity, speed, and all-around usability. IE8 isn't the answer. IE9 could be. You can do better. I know it; you know it.

Visual Studio 2010 Will Make You More Productive

By Michael Flanakin @ 7:41 AM :: 2776 Views :: .NET, Development, Tools/Utilities :: Digg it!

Visual Studio

Whether you've heard about Visual Studio 2010 and .NET 4.0 or not, you should really be watching the 10-4 show on Channel 9 Syndicated feed. As you have probably guessed, the show talks about what to expect in Visual Studio 2010 (version 10.0) and .NET 4.0. The episodes I've seen cover things like ASP.NET, AJAX, parallelization, and overall enhancements to the VS IDE. Admittedly, I'm behind a few episodes, but that's just par for the course While each of these has been valuable on its own, I have to specifically call out episode 5, Code Focused in Visual Studio 2010. This episode talks about three things: code navigation, test-driven development (TDD), and extending the VS editor.

These first two areas, code navigation and TDD enhancements, are taking a page from the Resharper bible. If you haven't used Resharper, yet, you're seriously missing out. Resharper is the one VS add-in I can't live without -- GhostDoc isn't too far behind, tho. The first thing we're getting is the ability to highlight all references of an variable. This doesn't sound all that exciting, but it's really nice to see without having to look, if that makes sense. To top it off, you can bounce between these references with simple keyboard shortcuts.

Bouncing between variable instances is neat, but let's take it up a notch. If you're digging into new code, figuring everything out can be a true feat. To help us move down this path, VS10 is giving us the ability to view the hierarchy of calls related to a specific method/property. The call hierarchy tells you everthing that calls your code block and what your code block calls. This is going to make understanding code a lot easier. We're still short of my desired end-goal of having an automatic sequence diagram generated, but at least we're making steps in that direction.

From a productivity perspective, one thing I love about Resharper is that, if I need to open a file, I don't need to know where it is, I simply need to know its name. VS10 is bringing this to everyone. A simple shortcut, like Ctrl+T, and a dialog pops up, waiting for you to type in the file name. You can type a partial name, mycla to get MyClass.cs, or use the Pascal-casing and type MC to get MyClass.cs or MyComponent.cs. Pay attention to how much time you spend in the solution explorer. Imagine cutting that in half, if not more.

The TDD-based enhancement really isn't about TDD, but it does support TDD very nicely. Basically, the idea is, when you're writing code, you want to dig in to the real logic, not go around creating domain objects and data access layers. To support this, you just start typing. If you need a customer class, you just reference it in code. VS will tell you it doesn't know about that class, but this is where the feature comes into play: it'll give you the option to generate it. The same thing happens when you add properties and methods. VS will generate the stubs for you. This lets you focus on one method at a time, without having to divert focus to figure out how third party code needs to work. This is all about decreasing the noise, in my opinion, which is very hard to do sometimes.

The last thing the episode covers is something most people will probably underappreciate: the new WPF-based editor. Despite what people think, this isn't about flashy graphics. Nobody wants text to fly across the screen as we type it. There are two concepts here: (1) simple animation can go a long way to enhance user experience; and, (2) WinForms is now a legacy technology and WPF provides so many enhancements that it just makes sense to bring this to developers, making it easier to build and extend on the #1 development environment in the world. Everytime I think about this, I fall back on Resharper. Now that it's so easy to do amazing things with the editor, what is the Resharper team going to be able to give us? What is the community going to be able to give us? I can't wait to find out.

Windows 7 RC Enhancements

By Michael Flanakin @ 6:57 PM :: 1664 Views :: Technology, Microsoft :: Digg it!

Windows 7

Since the debut of Windows 7, there's been a lot of talk about whether or not Microsoft would listen to feedback from the field. This sounds odd, but the question is a valid one, due to how Steve Sinofsky is running this release of Windows. The major departure from past releases is that the Windows team isn't introducing features into the build until they're "done." Sure, there may be some small issues, but nothing like what we saw in the pre-release versions of Vista or XP. This, along with only 2 pre-release versions of the OS making it out to the field -- beta and release candidate -- will make anyone question how much will really change between the beta and official release. Well, the Engineering 7 Syndicated feed blog lets us know about 36 things we'll see in the release candidate based on feedback from the beta. This is very refreshing, even if a number of them are qute trivial.

  1. Task Switcher (Alt+Tab) now with Aero peek -- excellent enhancement to really bring focus to the app you're thinking about switching to
  2. Win+# will open or launch, not just launch -- I'm very excited about this one; I'll finally have a Win+1 shortcut to open my most important window: PowerShell
  3. Apps wanting your attention will be more obvious
  4. Dragging a file onto an app on the taskbar will now open the file in the app
  5. 25-40% more icons will fit on the taskbar before scrolling
  6. Clearer mapping of what app thumbnails are related to in the taskbar
  7. Newly installed programs will show up at the bottom of the start menu
  8. Increased the number of items in the taskbar app's context menu (aka jump list)
  9. More flexibility when pinning items to an app's jump list
  10. Separation of desktop icons and gadgets
  11. Aero peek now touch-enabled
  12. Multi-touch capabilities added to the virtual keyboard to make it more realistic
  13. Summon the context menu with a 2 fingers -- this isn't quite as simple as it could be, but there are some reasons why a 2-finger tap isn't viable
  14. Touch enhancements to select and drag/drop content
  15. Simplified networking options in system tray and return of the connected-but-no-internet indicator
  16. User Account Control (UAC) tweaks
  17. Auto-lock a machine without applying a screensaver
  18. Return of the high performance power option from the system tray
  19. Clearer communication about preview vs. saved theme changes
  20. Reliability enhancements to Windows Media Player for internet radio
  21. Digital camcorder/camera video playback improvements
  22. Cleaner "now playing" view in Windows Media Player
  23. Content that Windows Media Player cannot play won't show up in the library -- this might be confusing to some, but it sounds like a good option; I'd probably opt for a dimmed color and icon depicting its unplayable status
  24. Changed Windows Media Player to resume playback of content after returning from sleep
  25. Introduction of Windows Media Player sync relationships dialog will be reverted -- classic case of why betas are important
  26. Easier, quicker access to advanced playback settings in Windows Media Player
  27. Windows Media Player's jump list now includes content launced from outside of WMP
  28. Worked with hardware vendors to make it easier to get more devices to support Device Stage -- if you don't know what Device Stage is (I didn't), watch this
  29. Improved headphone experience
  30. Increased audio reliability
  31. Improved Windows Explorer header to enhance new "libraries" capability
  32. Drag and drop enhancements when dealing with libraries
  33. Win+E was opening libraries, but will return to open My Computer, as it does today -- I'm glad to see this because I haven't found a use for libraries, yet
  34. Added FAT32 support for libraries
  35. Arrangement view enhancements for libraries
  36. Performance enhancements abound

There are really only 4 of these that I'm looking forward to, but it's still a surprisingly large list. I'm looking forward to the RC. Rumor has it we'll see a public release in April. Part of me expects it to be sooner, but I have no idea.

Failure to Yield Right-of-Way

By Michael Flanakin @ 9:52 PM :: 2126 Views :: .NET, Development :: Digg it!


I'm one of the many .NET developers out there that neglects the enhancements in the framework. Not that I mean to, I just keep a running tally of things I need to catch up on, but rarely make the time to actually do any of them. In an effort to shame myself into taking care of a few of these things, I decided to dig into something I haven't spent any time trying to understand: the yield keyword, introduced in C# 2.0. I have to say, I was surprised at how simple it was... well, almost.

To attempt the obligatory textual description: yield, in conjunction with a return or break statement, tells the compiler that the code block should be treated as an iterator. This means the code block must return an instance of System.Collections.IEnumerable; but that will be almost completely hidden from you. All you need to do is "yield" each value within a loop. The compiler will wrap your code block and return each value as the enumerator is traversed.

There. Plain as day, right? Doubt it.

While reading about the feature, I was reminded about how crappy some help can be. I just wanted a code snippet to show me what I might do without the yield keyword and then what I'd do with it. Here's what you are probably writing today...

public List<User> GetUsers(IDataReader reader)
    // convert to list of users
    List<User> users = new List<User>();
    while (reader.Read())
        User user = new User();
        // set user properties from reader

    // return
    return users;

This is pretty basic stuff. Now, let's look at how you'd do it with the yield keyword...

public List<User> GetUsers(IDataReader reader)
    // convert to list of users
    while (reader.Read())
        User user = new User();
        // set user properties from reader
        yield return user;

If you didn't catch it, we were able to get rid of the code that uses the List<User> instance. Sure, only 3 lines, but less code is typically better -- assuming we're not sacrificing readability. Those who're paying a little more attention probably noticed the fourth line that changed (well, technically, it was the first): the return type. Since yield only knows about IEnumerable (and IEnumerable<T>, by proxy), we have to change the return type to match that. I have to admit, I didn't like this. Using IEnumerable basically means I'm stuck with foreach blocks, which I hate using. This led me to investigating performance.

If you really want to know about the performance benefits of for vs. foreach, check out Joe Duffy's blog Syndicated feed. Joe works on the PLINQ team and has a very nice post about perf considerations. From the limited tests I ran, I started to see horrid performance when using yield. Then, I reallized I probably needed to bump up my iterations to make it a bit more meaningful. Once I got into 10-50,000 iterations, I started seeing yield come out on top -- or, at least making it a better race. This goes along with what Joe talks about: you pay the cost of having the enumerator, which costs a lot, but will make up for it over the long haul, assuming you have a lot of iterations.

This isn't the whole story, tho. I ran this on a single core machine. Using a multi-core machine will produce better results. Why? Because yield is multi-threaded. What actually happens is, when you call a method that uses yield, it maintains a reference to that method. Then, your code will get an enumerator for it, typically via a foreach block. All this happens without actually touching your method. Within the foreach block, you actually reference the instance associated with the enumerator's location (i.e. users[i] in a for block). When you access the instance, that's when .NET actually digs into your method to get the next instance. The benefit of this is that you only process what you need to process. If you only need to loop thru 10 of the 1000 records, you only process 10, whereas all 1000 would be loaded into memory with the typical approach.

It's all a bit fuzzy until you play with it. I'd recommend creating a simple test to walk thru it yourself, if you really want to get a feel for it. It's as simple as debugging a test. As a matter of fact, here's a simple MSTest project that walks thru it. Hopefully, this helps you understand what's going on.

PowerShell Tip: Out-Null is to PowerShell What Duct Tape is to Mouth

By Michael Flanakin @ 11:15 AM :: 15558 Views :: PowerShell :: Digg it!

There are a number of commands in PowerShell that aren't as "quiet" as you may want them to be. Sometimes, there are parameters to supress output, but not always. Fortunately, we have Out-Null. While seemingly simple, this is a priceless cmdlet. I use it when writing scripts to keep the output clean.

Perhaps the simplest explanation of this cmdlet is to show a very common function, md, which creates a new directory. For the uninitiated, this function is available to support backwards-compatibility to DOS. You may have caught that I referred to this as a function and not an alias to a cmdlet. Based on that, if you want to see what the function is, simply use Get-Content.

PS C:\Flanakin> Get-Content function:md
param([string[]]$paths); New-Item -type directory -path $paths

As you can see, md simply makes a call to New-Item and tells it to create a directory with the specified path. Pretty simple. Here's what the output looks like.

PS C:\Flanakin> md noisy

    Directory: Microsoft.PowerShell.Core\FileSystem::C:\Flanakin

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         1/27/2009   2:51 PM            noisy

PS C:\Flanakin>

I don't know about you, but that's a lot more than I really care to know. Oh, and note the 6 extra lines. Bleh! Luckily, Out-Null will save us.

PS C:\Flanakin> md quiet | Out-Null
PS C:\Flanakin>

That's it! You gotta love something so simple.

Lessons Learned from the Great Zune Massacre

By Michael Flanakin @ 7:11 AM :: 2304 Views :: Technology, Microsoft :: Digg it!


I was thinking about the Dec 31, 2008 debacle Zune went thru, where the devices didn't work for a 24 hr period. If you didn't hear about it, the problem was due to a device driver, which wasn't controlled by Microsoft. This is exactly the problem Microsoft has to deal with: crappy hardware vendors. I remember the sad, sad day I found out the Zune was built using Toshiba hardware. I have hoped so much that this would change, but it hasn't, yet... yet. I say that, not knowing of things to come, but hoping that Microsoft will realize the err in its ways. Microsoft should take tighter control over hardware by using quality hardware vendors. Hell, the Zune issue is nothing compared to the red ring of death issues the Xbox faces. I don't know anything about the Xbox hardware, tho, so I can't say much about that. Heck, Microsoft can't either, considering they haven't fixed the problem yet, as far as I know. I'd like to see Microsoft either form a division focused on delivering great hardware -- like phones, Zunes, Xboxes, desktops, and laptops -- or pony up and buy a company. There has been a lot of speculation to that effect with the purchase of Danger in early 2008, but Microsoft has claimed the "Zune Phone" won't happen. That doesn't stop the rumors from piling up, tho. All I can say is that, if my vote was worth anything, I'd be voting for Lenovo. I've purchased 2 and am about to get another. I've even thought about replacing my desktop with a Lenovo. What's even better, tho, is the idea of having a Lenovo phone. As much as I like my HTC Touch Pro (AT&T Fuze) -- minus the crap AT&T does to it, that is -- my love affair with Lenovo laptops really has me lusting after their new phone. If only it'd make it to the US... along with the HTC Touch HD, which I still want. All this really boils down to one question, in my mind: Will Microsoft reconsider a higher level of control after dealing with one problem after another from hardware vendors? I kind of doubt it, but I'll keep hope alive.