Feedback: VB vs. C# Culture

Sunny Delight writes in:

Hi,

I recently came across one of your posts on Google (VB vs. C# Culture). I find your argument quite interesting since I am from a heavy C++ background. Currently, due to my college class requirement, I program in VB.NET 2003. Honestly, VB.NET is not as bad as most people (C++ and C# programmers) think. In fact, I never had any experience with VB until VB.NET 2003.

Anyway, you mentioned in your post that your friend uses "strings" everywhere in his codes. What is wrong with strings? Even back in the day of C++, I don't think it is such a bad thing to cout << "some strings"; Am I missing your point? Perhaps, you should focus more on the performance side of the codes rather than the appearance of it?

Given the complexity of C# and C++, it is obvious that you can perform low-level operations at will. However, I feel that the main reason we C++ and C# programmers look down at VB is due to the fact that VB programs tend to be bloated. However, VB.NET has solved most part of that issue already. As you mentioned, when you look at the compiled codes from both VB.NET and C#, they look almost the same.

More to come.. Microsoft has vowed to turn Python into Python.NET. I am sure VB.NET programmers will eventually have something to look down at ;)

Feel free to write back. Looking forward to your reply.

Sincerely,
Sunny


Sunny,

You're right VB.NET is not that bad. However, if you compare the language (strictly without the IDE) it's obvious that it's just way more verbose. If you compare the languages as they stand within VS2003, VB.NET can sometimes be better/easier merely because MS actually finished it's IDE (vs. C# which struggles along with basic intellisense / code completion).

As for strings... well that's a long standing pet peeve that I've had with VBScript and VB (which is the languages most programmers are thinking of when they call VB.NET inferior - I've done this myself). When you use strongly typed variables you can tell something about an object without even knowing what's in it (regardless of the variables' name) at design time. Also, because in OOP types are merely class constructs you can have a very complex structure hidden behind a "variable" (e.g. a DataSet). Hell, you can even design your own type (and inherit from the base types if you want!). When you use strings, that's not much you can tell about the data... and parsing it (identifying it) becomes a full time job not only for you in your code (explicit; prior to compilation) but for the CLR (implicit). It's just not good practice.

Finally, C#'s edge today is in File IO... but because both languages target the CLR, and compile to identical IL: VB can also perform low-level operations (not just C# or C++). The bloat that you mention is more in the extra lines of code (which my buddy Check will say is very minor indeed) that VB must use to accomplish a similar task. On the other hand, VB.NET supports the optional codeword which allows for "virtual" overloads. C# is apparently clueless (despite this being supported by the CLR).

vr,
Steve

Updated my Mac... so it's time for another Apple Rant (TM)

Yeah, I actually stood in line at the Apple Store on Friday and waited to buy OS X 10.4 "Tiger". Damn, I felt like such a geek. The upside is that their were a lot of hot chicks there... way disproportionate to the standard PC crowd (woohoo!). So what did I pick up and how is Tiger? I'm glad you asked. ;)

When I walked in the Apple folks handed me a scratcher ("Everybody is a winner!" They said). My scratcher gave me 10% off (everything but Tiger)! On my purchase I ended up saving $390 (though I had to pay $211 in taxes). Here's what I bought:

  • 30" Cinema Display ($300 off)*
  • iSight ($15 off)
  • Griffin SightLight ($4 off)
  • iPod 60GB ($45 off)
  • ER-6i Earphones ($15 off)
  • Black iSkin evo2 ($2 off)
  • iPod Dock ($4 off)
  • Rise of Nations ($5 off)
  • OS X 10.4 "Tiger" (exempt)
* Yes, I know I need a special $600 card to run this display, but it was not in stock.

I finally installed Tiger on Saturday. Now mind you I knew that it was bug-riddled and that Apple intends to release a major patch within days of it's release so watching various apps crash was par for the course. But some of those apps had to be more stable than their predecessors right? I mean Safari crashed *all the time* (as in at least once a day)... and it still does. I had heard that their was a lot of work done to Safari... but not only is the window frame not finished, but it still crashes!!! AHHHH! Apple, fix this! Or FireFox could just render Safari irrelevant... here's your chance FireFox.

QuickTime 7 must have crashed on me like 4 times in the space of 5 minutes! Now why the hell would I pay them for a Pro version if the basic version crashes so often? When you open it, it opens a browser-like clickable graphic region window (with advertisements that link back to iTunes) instead of a QuickTime viewer... but for some counter-intuitive reason you have to double-click the pictures as if they were icons on your desktop instead of THE HYPERLINKS THEY ARE! AHHH! I kept thinking something was broken when I was single clicking everything... well something is definitely wrong -- with Apple! Additionally, if you are lucky enough to stumble on the real QuickTime player window the buttons don't update when you click them (if they ever rendered at all), same with the window close/min/max buttons - they don't update when you hover. In some cases you don't even see the progress bar - because it just didn't render! Stupid! If you minimize and restore the player window some of these problems are fixed. Stupid! Apple, fix this!

Dashboard is predictably cool (having displaced Konfabulator, a similar commercial product though) with 10+ widgets out of the box and 51 additional Widgets available from Apples' website, with even more coming for .Mac accounts. My favorite out-of-the-box widgets include: weather, stocks, calendar, clock, stickies, calculator and dictionary/thesaurus. My favorite downloaded widgets include: VersionTracker, DashMonitors, This Day in History and Bloglines. Spotlight appears to work with preliminary tests, but where is the XSound-like sound event assignment capability? You know the kind of feature that was included in the FIRST VERSION OF WINDOWS and OS X STILL DOESN'T HAVE IT!? Ooooo! Sometimes I feel like Yosemite Sam when I follow what Apple does with their "updates".

Ahh .Mac synchronization. Where for art thou, .Mac syncrhonization? Back in the 10.3.x days, you'd use iSync to sync up with .Mac. But Apple has moved .Mac out of iSync and into the system preferences with it's own icon. It's definitely slick and should prove to be the holy grail for synchronization with it's new API for developers. If true, then FireFox could build a sync that worked on both my Tiger box at home and my XP box at work. Then I would finally have fully synced two-way bookmarks. Ah the insanity. The new .Mac preferences window is chock-full of information about your account. In fact, you can even manage many of your settings from here without even hitting a browser! Sweet. Curiously though, despite moving .Mac out of iSync, it leaves the .Mac icon there. Why?! Probably just to confuse switchers. With all the power that the .Mac sync provides, along with the RSS concept in Safari - why didn't Apple just build a full-fledged aggregator into Safari so that items marked as read / or unread would keep their state across machines? They could replace NewsGator and Bloglines in one swoop (assuming Safari didn't crash all the time).

Worse still my ShapeShifter theme that partially finishes the Apple UI inconsistencies (this should be an abomination to Mac-heads) to the brushed-metal look no longer works (or at the least I was warned that it could crash since it wasn't made for Tiger). Granted this isn't Apples fault... but it does force me to go back to Apples' half-impemented UI.

So basically OS X 10.4 "Tiger" is still, frustratingly NOT FINISHED; and this beta build is less stable than 10.3.4 - 10.3.9! Ahhh! Apple are you trying to force your customers back to Windows?! I mean 18mos and a $130 tax for this? 10.4 may be a point release (eg. Windows 2000 is 5.0 and XP is 5.1), but it's coming off as little more than a service pack (and a buggy one at that). At least Microsoft gives away it's "service packs" for free (eg. XP sp2 had the same number of perceivable features).

Some other, more complete reviews of Tiger have been done by John Siracuse at arstechnica and Paul Thurott at the WinSuperSite. By far these are the most *respectable* of all the reviewers I've seen. No fanboy hype, all information.

John Siracuse spends a fair amount of time talking about a new technology in Tiger that is turned off by default: Quartz 2D Extreme which promises to speed up the Apple UI by a factor of 10! He also has a graphic to show just how poorly the Spotlight UI for SmartFolders was implemented. He even rails against how smartfolders work and offers an alternate implementation concept.

Paul Thurott breezes through many areas with only a paragraph (more like my review - but with pictures), so consider his the light-edition (only one page) of the Siracuse review (which is 21 pages).

Finally, Mail was updated to 2.0 (though I'm still using gmail) and Automator was introduced. Although Automator sounds cool, I'm not sure where it fits in with my use yet. That's it, 200 features boiled down to just a few updated/introduced apps - all for the low-low price of $130.

Well, I guess it's back to my testing of iPodderX 3.0 (which is upto RC1), PoddumFeeder, iPodder and PlayPod. I've promised Ray Slakinski (one of the authors of iPodderX) that I won't post my review of iPodderX 3.0 until its release (a sort of verbal/email NDA). Maybe by then I'll be doing my own screenshots...

«May»
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234