got net?

Kevin Hazzard's Brain Spigot

About the author

Welcome to Kevin Hazzard's blog.
E-mail me Send mail

Recent posts

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Language Features Versus Tool Features

F4 Phantom

The physics guys in my college fraternity often joked that the F4 Phantom aircraft was proof that, with enough horsepower, even a brick could fly. In the software development world, we Microsoft developers have a similar joke:

"With enough Eclipse plug-ins, even Java becomes a useful programming language."

OK, I know I'll take a lot of heat for that. I certainly appreciate that the emergence of Java in the mid-1990s rescued me from the minutia and doldrums of C++. But once you become exposed to the expressiveness of the C# language and the richness of the .NET Framework Class Library, you just cannot to go back. I've worked in both .NET and Java environments extensively and I get more and better work done in C#. End of that story. And I apologize to my Java-oriented friends for the bad joke.

But there's an interesting phenomenon happening now that the joke sort of highlights. C# is mature and stable. It's about ten years old at the time of this writing. C# has grown considerably over that decade, acquiring lots of really cool new features:

  • Generics Classes and Methods
  • Anonymous Methods with Captured Outer Variables (Closures)
  • Nullable Value Types
  • Streaming Iterators
  • Partial Types
  • Static Classes
  • Partial Classes
  • Implicit Typing of Local Variables
  • Object Initializers
  • Collection Initializers
  • Anonyous Types
  • Lambda Expressions
  • Expression Trees
  • Extension Methods
  • Automatic Properties
  • Query Comprehension Syntax

And this list doesn't begin to describe all the changes to the CLR and FCL to support these great language features. Many of my friends who code in Java every day are openly unhappy about how slowly Java has been evolving as a language during this period. While Sun seems happy to add wonderful new features to the JVM and the class libraries all the time, they seem somewhat reluctant to expose much of that thinking through the language itself. Now that Java has gone Open Source (in a sense), it will be interesting to see how this changes. Certainly ECMA's oversight of the C# specification has been a good thing since the language's inception.

I think that programming languages have inertia. In the physics world, we say that Force equals Mass times Acceleration or F = ma, as Newton's Second Law of Motion describes it. As programming languages go, C# certainly has tremendous force in the marketplace based on the sheer mass of the features being added to the platform and the language over this past decade. And the acceleration that's been achieved through arguably modest adoption of the .NET platform finishes the equation. Java, which has grown much more conservatively as a language, also has great force. Look at the trends from Indeed.com for Java and C# job postings.

These graph lines were harvested from job descriptions across the Internet containing the terms Java and C#. You can see that C#has enjoyed steady growth over the last few years. The gap between job postings mentioning C# and Java even seems to be closing until Q3 of 2008. Even since then, C# has enjoyed statistically steady growth. But Java took a statistically unusual leap at the same time. Was it the release of Eclipse 3.4 (Ganymede) in June 2008 that is reflected in this graph? It would be interesting to hear your feedback on that.

It's clear that the ecosystem that exists to support the Java language is much richer than that which exists in the .NET space. Visual Studio, as a development environment, is highly integrated.  I can load half a dozen projects in the debugger at once and step from client to service to database code all in one smooth motion. Microsoft has done a marvelous job with Visual Studio, no doubt. But it is a largely closed platform. The developers at JetBrains have said very publically that each new compiler and IDE release forces them to do rewrites of large portions of their code to support the new language features and libraries that appear.

The publicly available information on Visual Studio 2010 is promising in this regard. The rewrite of the GUI using WPF promises to make hooking into the editor interfaces much cleaner. The super-rich ecosystem that's built up around Java, especially through and for Eclipse makes me really envious. Eclipse is infinitely pluggable so the hordes of Java developers who exist are constantly adding great new free features for the community to use. Of course, I'm not saying that if Visual Studio had the kind of extensibility that Eclipse has that awesome companies like JetBrains should be put out of business by the emergence of many free alternatives. ReSharper is the market leader and I expect that they would continue to do well, even in an environment where "average" developers can extend the IDE without so much intimate knowledge of the compilers, debuggers and editors.

Remember, if you respond to this post, it may not appear immediately. Because of link spammers, I have to approve every comment. Thanks for your patience on that.


Categories: Rant
Posted by kevin on Friday, April 03, 2009 7:55 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Proprietary Networks for the iPhone and the G1

We've been loyal Verizon Wireless customers for many years. We were GTE Wireless customers back in the day before the name change. But my wife has been wanting an iPhone for many months. She's enamored with the tight integration of the applications and the hardware. She's also a Mac user for the same reason. She finds the huge variety of vendors and configuration options on the PC overwhelming. The Mac simplifies things by limiting the choices. I can understand how she feels. I've been doing Windows development on a MacBook Pro for a few months and I have to say that the OS X experience is comfortable to me now. I still love Windows but running it in a virtual machine on my Mac gives me the best of both worlds.

My wife's business is doing well so she decided to get an iPhone today and make it a pure business expense going forward. She's in love with her iPhone and I'm happy for her. But it irks me that she had to choose AT&T Wireless to be able to switch over to the platform she really wanted. Verizon Wireless has great customer service and their network coverage is just phenomenal. We live in the wilderness between Richmond and Charlottesville, Virginia and wireless Internet service is all we can get out here. Even in the boondocks Verizon's coverage is rock solid: five bars. AT&T Wireless's coverage is OK where we live but not nearly as strong. I like to reward those companies that earn my trust and respect by remaining loyal to them. Just tonight I was trying to solve an issue with an EVDO card that I purchased on EBay and the Verizon Wireless support team was nothing short of amazing in their response to help me. A few months ago something weird happened with the wireless tower near my home and the I got routed to engineers in Dallas who were diagnosing the problem live while I listened. Within an hour a Verizon Wireless truck was on the scene at the local tower. And when they had fixed the problem the engineers in Dallas called me back and had me test the fixes before the workers were allowed to leave the tower. I was simply blown away by the quality of the response. You just don't get that kind of customer service from most companies these days. So you can imagine that I'd have been much happier if we could have added my wife's iPhone to our Verizon Wireless account. AT&T Wireless's service and support may also be wonderful. But Verizon Wireless has earned my respect and I like to be loyal to their brand.

The same goes for Google's Android-based G1 phone operating only on the T-Mobile network. I'd love to try the G1 but the T-Mobile signal where I live is just awful. Until the G1 is available on a more functional network, it's just unavailable to me. Are we so primitive in our networking prowess in 2009 that we have to restrict devices to specific carrier networks? A TCP stack is a TCP stack, right? Building a TCP stack that can use EVDO or EDGE interchangeably shouldn't be a big deal. So is it just that by limiting the carrier choices Apple and Google can better drive consumers through the channels where they can exert more control over features and configuration? The latter is the real driver behind the limitations, I'm sure. Apple is the master of limiting choices to limit complexity after all. I'm also sure that by single sourcing a device as sexy as the iPhone through one carrier, Apple has sweetened it's margins nicely, too.

I shouldn't be complaining, I suppose. I'm all for the freedom of businesses to make the choices that make them as successful as they can be. If it helps AT&T Wireless's, Apple's, T-Mobile's and Google's bottom lines to be proprietary then I honor their proprietary-ness. But consumers like me also place a high value on choice, too. I'm looking forward to the day when any computing or telephony device purchased anywhere in the world will work on any network, anywhere in the world. One network for all. Is my dream fallacious? Perhaps. What's your techno dream?


Categories: Rant
Posted by kevin on Saturday, January 24, 2009 6:02 PM
Permalink | Comments (7) | Post RSSRSS comment feed

Methods Should Never Return Void

Returning void (or Nothing in VB.NET) from a method is best the way to say, "I don't care about you, caller." Consider this silly C# code:

var engine = Python.CreateEngine();
var scope = engine.CreateScope();
scope.SetVariable( "PIRoot", Math.Sqrt( Math.PI ) );
var result = engine.Execute<double>( "PIRoot ** 2", scope );
Console.WriteLine( result );

This code could be a lot more fluid but the ScriptScope.SetVariable method returns void. If the method returned a reference to its Engine property, the code could have been written more succinctly as:

Console.WriteLine( Python
    .CreateEngine()
    .CreateScope()
    .SetVariable( "PIRoot", Math.Sqrt( Math.PI ) )
    .Execute<double>( "PIRoot ** 2", scope ) );

Wouldn't that be nice? So don't return void (or Nothing in VB.NET). When you have nothing else you can return from an instance method, return the this pointer (or Me in VB.NET).

 


Categories: C# | DLR | Rant | Software Dev
Posted by kevin on Tuesday, January 06, 2009 9:53 PM
Permalink | Comments (4) | Post RSSRSS comment feed

Turning on Comment Moderation

Sorry to do this folks but I am having to turn on comment moderation on this blog. I have been getting some really inappropriate comments from the bots recently. I would put a CAPTCHA control in place and I may still do that. But I don't have time to get that set up right now. Instead, I will be approving new comments to my blog posts before they become visible to the public. Sorry for having to do this. I already respond to most comments so this should not have a big impact on most of you.

Categories: Rant
Posted by kevin on Monday, December 08, 2008 11:39 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Twitter Has So Many Chances to Screw Up and So Little Time

Could Twitter.com get any worse? OMG. If it's not up, it's spambot-seeking bots are killing my followers. I keep TweetDeck up in the background all day at work. I follow some folks on Twitter, some people follow me. They are my tribe, as they're called, and I love them because they resonate with me. The beauty of the Twitter.com idea is that I can choose those with whom I resonate spiritually, economically, politically, socially, gastronomically, whatever-ically. Get it? I choose. Nobody chooses my tribe for me.

Now, if in choosing, I have some malfeasance in mind, say harvesting profile data and building spam campaigns against a large group of Twitters, I should probably be stopped. A low ratio of followers to followees (those whom I am following) might be one way to identify people with no legitimate motive in the space. Another might be to look at the number of times someone has been blocked by other Twitters, essentially taking the community's vote of confidence into account when deciding who the real spammers are. Still another might be to look at the ratio of followees to tweet volume. In other words, an evil harvester is likely to be watching many, followed by few and contributing very little conversation. There are many algorithms I could cook up that would accurately find the creeps and stop them while leaving the innocents alone.

So, today, I log in to Twitter.com via TweetDeck and see that half of my followers and half of my followees are gone. Months of work building relationships through my friends and their friends just gone. This happened to millions of Twitters, not just me. Massive social energy vanished in the blink of an eye. Really normal, healthy people like Rachel Appel and Kevin Griffin who followed me because we resonated with one another, are now told by Twitter.com, "No, you are not following Kevin Hazzard any longer because who knows why? We just felt like making this change. Have a nice day." Rachel Appel, Kevin Griffin and I don't have any qualities which would make us stand out as potentially malicious. But Rachel lost 36 of her followers. And, Kevin Griffin, who just got started with Twitter.com lost 75% of his followers. I lost 38 of mine, almost half. Poor Ted Neward, whom I follow(ed) because I have great respect for him, went from 243 followers to zero. That's right, Twitter.com thinks it's better for all 243 of us who respect Ted not to hear what he has to say.

And I was already diligent about blocking spambot and fembot followers common to social networks like Twitter.com. To have 79 legitimate followers on July 23rd, 2008, I had already blocked more than 20 spambot followers over the previous few months. This morning, Twitter's own spambot-seeking bots reduced my followers from 79 to 41, cutting out Rachel and Kevin and many others. And Jeff Bezos is investing his hard-earned money in this piece of junk? I suppose he's not as smart as I thought he was. Sorry. I shouldn't say that about Jeff because I don't know him. He must be brilliant. But someone needs to take those Twitter bozos by the scruff of the neck and give them a good shaking. Maybe that's what Jeff Bezos will do. I hope so.

By the way, I was able to recover my followers because TweetDeck, my Twitter client of choice, caches my tribe over time. After Twitter cut my followers, I got a very accurate rendering of my former tribe by clicking the GROUP button in TweetDeck. Twitter had lost them but TweetDeck remembered them. Victory! I added my followers back manually because in Twitter.com's official response to the problem, they claim that some of the losses will never be fully recovered. While my followees have been restored, my followers will have to rediscover me on their own. That will take months.

If you want to see how many followers you or your friends lost today, check out TwitterCounter and type in your screen name in the search field.


Tags: ,
Categories: Rant
Posted by kevin on Thursday, July 24, 2008 7:00 PM
Permalink | Comments (3) | Post RSSRSS comment feed