May 2005 - Posts
I'm speaking at the Dev Con conference tomorrow (local MS event) and I am doing the demos for the opening keynote. One of those demos is building a typed stack class using generics (VS.NET 2005/.NET Framework 2.0). The deck talks a lot about the performance benefits you get with a typed collection/stack (avoid all the boxing), so I added a performance comparison to the demo. I iterated through 100,000 pushes/pops on the untyped stack (object in, object out, cast to specific type, access property) vs. a typed stack implemented with generics (employee object in, employee object out, access property). The results...absolutely no performance difference. On my laptop, both loops take ~900ms and neither is consistently faster.
This could just be a Beta thing (i.e. performance of generics will get better with the RTM bits...), but I doubt it. This feels like the sort of thing that looks faster on paper, but doesn't actually yield any meaningful performance benefits. That said, I still see a lot of benefits to generics. I've been writing typed collection classes all the way back to VB4 and using generics certainly makes that a LOT easier. The performance benefits I see from generics are at design-time, not run-time.
Here is the relevant code...the block that was executed 100,000 times:
Untyped:
//Create the Employee
Employee newEmployee = new Employee();
//Set the name
newEmployee.Name = textBox1.Text;
//Push it on the stack
LoopStack.Push(newEmployee);
//Pop it off and cast to Employee
Employee stackEmployee = (Employee)LoopStack.Pop();
//Get the name
string name = stackEmployee.Name;
Typed:
//Create the Employee
Employee newEmployee = new Employee();
//Set the name
newEmployee.Name = textBox1.Text;
//Push it on the stack
LoopStack.Push(newEmployee);
//Pop it off and get name
string name = LoopStack.Pop().Name;
I picked up an i-mate Jam on Friday. I wasn't really in the market for a new device, but Janet needed a phone that could sync with Exchange, so she got my MPx220 and I went shopping for a new phone.
I really liked the 220. It's a great phone-first device which I had concluded is what I wanted. Well, there is no cool new phone-first device on the market, so I figured I would give the Jam a try.
I've only had it hte weekend, but so far I like it...but don't love it.
Pros:
- The thing is really small...way smaller than every other PocketPC Phone I've held. It feels like the perfect size phone device to me...easily fits in my pocket without me noticing it's there.
- Phone works well. I've made several calls with it and the quality is as good as the 220.
- Battery life is also quite good. Made it through the entire weekend without charging.
- Ships with WMP10 which means it works with music subcription services like Yahoo Music. Given that 1 gig SD cards are down to ~$40, it just might make a servicable portable music device.
- The landscape mode is cool...but in all honestly is a bit disappointing. IE in particular doesn't seem to properly reformat the dislay for the wider screen.
- Software - TONS more to choose from for the PocketPC platform than Smartphone. I installed PocketRSS this morning - works great.
Cons:
- MAN I miss the one-handed navigation of the 220. Not really a problem with the Jam, more an issue with the PocketPC software. It's frustratingly close to there, but I often have to resort to the Stylus which often feels clumsy to pull out. Really need:
- 'Back/Escape' button. With the 220 there is a dedicated button that get you back to the previous screen (e.g. open a mail, hit key to get back to list of mails...).
- Access to all menus from keys. There is a 5-way button, so I can scroll through the options and select the one I want, but there is no way to activate the menus
- Lack of 'smart dial' is annoying. Have to bring up the contacts list, enter the letters of the name (using the stylus...), and then select the one I want.
Like I said, I like the Jam but don't love it. I'm still waiting for a device that takes the best of the Smartphone and PocketPC platforms and combines them into one. Be interesting to see what the Magneto devices shipping this Fall are like. This one looks interesting, but also looks HUGE.
…is to share my thoughts with anyone interested on the following topics (in order of intended frequency of posts):
- Performance Programming for .NET: I love optimizing code for performance. I find it to be a challenging and rewarding task. I also find that there is little-to-no quality material on the subject available…I am going to share what I find interesting/useful with the world.
- Team Development with .NET: One of the biggest challenges our industry is facing today is finding a way to scale our projects more efficiently and effectively. Whether the issue is hiring 3 new developers to help a solo-developer be more productive or integrating a 20 person off-shore development team to an existing environment, may of the challenges are the same. I want to share project management techniques and software tools I find useful for addressing this problem. Specifically, I plan to take a hard look at the Visual Studio Team Server Edition suite over the next 6-9 months and share what I learn in that process here.
- Indigo: Also on my list to research/learn before it ships. I’ve been working with Microsoft’s distributed computing technologies for close to 15 years…interested to see if they got it ‘right’ this time.
- Gadgets: I’ve got a serious thing for gadgets…figure others should benefit from my experiences playing with them.
- Cycling: If I’m not at work I’m either spending time with my family or on my bike. Don’t plan to blog about my family, but do want to share select stories about my time on the bike. No idea who will find those interesting.
Who am I and why should you care what I think about the topics above? I have zero cycling credentials, but here are the things that matter on the other topics:
- Clarity Consulting, Inc: My ‘employer’ for the past 10 years. I put employer I’ve been with the company since it was 3 guys working out of the founder’s condo. We are a small (~50 people) consulting firm in Chicago that focuses on custom software development…primarily on the MS platform, but we also do a good bit of Java work.
- Microsoft Regional Director: I’ve been an RD for the past 5+ years. In 2003 I was named RD of the Year!
- MS MVP – Architecture: This past year I was selected as an MVP in the Architecture group for MS. Still getting acclimated to that group…
Why now? Why start a blog now…damn good question. Thought about doing it for years, never got around to it. Over the past year I really fell out of the speaking/wring mode and I realize now that I miss having that outlet to share things with others. I want to get back into speaking/writing, but I also thing a blog can be an interesting and useful means for me to start the process of getting back into that mindset.
We’ll see…if I can’ post more than once a week I’ll shut the effort down within a month. Check back in July to see how I do.