Sign in
|
Join
ISerializable - Roy Osherove's Blog
Unit Testing, Agile Development, Leadership & .NET - By Roy Osherove
This Blog
Home
About
Syndication
RSS
Atom
Comments RSS
Search
Go
Navigation
Home
Blogs
News
My new book is out!
The Art Of Unit Testing
Buy and read it as I write it.
I work at:
Your ad here
The Art Of Unit Testing Book
Roy's Cool Tools
Subscribe!
Subscribe to ISerializable by Email
About
Hire me
Ask me
On my bookshelf
About me
Ego trip
Roy's Tools
5 Whys - a blog for team leaders
Key.bo - a search engine wiki for keyboard shortcuts
unit testing
ruby styff
All Developer Songs
It's Time for Violence
Que Sera Sera
Articles
3: Oops! Typed Datasets
Are
scalable!
4: Introduction To Regular Expressions
5: Practical Parsing Using Groups in Regular Expressions
6: UI Threading Helper Classes
Make Your App Support Plugins 2 - Dynamic Search (MSDN)
Winforms Data Binding Lessons Learned
Make Your App Support Plugins (MSDN)
1: Introduction to Typed Datasets
2: Typed Datasets Are No Silver Bullet
My articles on MSDNAA
7: Solving VS.NET Debugger Problems
Make your log files searchable using Regex and the XML classes (MSDN)
Introduction to TDD with NUnit
Fun with Unit Tests – Testing abstract classes
New: Creating a generic Site-To-RSS tool
.Net scripting
- the practical way
Simplified Database Unit testing using Enterprise Services
Creating custom test attributes easily with NUnit 2.2.1
Cool tools every .Net Dev should be aware of
Cool Tools every .Net developer should be aware of
New: The case for staged delivery and Agile methodologies
My .Net Deep Dive lectures on video
New: Defensive event publishing in .Net, part 1
Test Feasibility Matrix
Depenedency Breaking Issues
*new* Achieving And Recognizing Testable Software Designs – Part I
Favorite Blogs
The Morning Brew
Martin Fowler
Scott Hanselman
Joel On Software
.NET Weblogs
Microsoft Israel Community
The Runtime
Daniel Moth
Oren Eini
Jimmy Bogard
CodeBetter
Dustin Campbell
Guy Kawasaki
Stephen Toub
Research @ Intel
Udi Dahan
The Typemock Insider
My Projects
Vs.Net Settings import.export Add-in
SchemaHelper - auto-detect & create data relations
Proxy handling using ProxyFactory and ProxyInfo
BackgroundWorker implementation
XtUnit: An Unofficial Unit Testing Extensibility Framework - Add new attributes to NUnit or MbUnit e
Intercetpion Application Block
Extensibility Application Block
The Regulator
VS.Net 2003 registry tweaker
My Tools page
Regular Expressions
RegEx Lib
Expresso
Regex Blogs
Sites : .Net
.Net Tools List
.NetWebLogs Forums
Winforms FAQ
.Net Debugging Resources
.Net WebCasts & Others
.NetWeblogs Archive
MSDN Magazine
Design Patterns in C#
.Net Rocks Radio
.Net Resources
Howto: .Net common tasks
VB.Net blogs on MSDN
.NetSlackers
Sites : Misc
Regular Expression Library
MSR Downloads
Win2k3 Tweak Guide
About Microsoft Interviews
Tech Interview Riddles
Feedster
Amazon Light
C:\Utils
Sites : Unit Testing & XP
NUnitASP
Tips and techniques with NUnit
NUnit
NUnit Addin
XProgramming
MSDN Mag:Simplify Data Layer Unit Testing using Enterprise Services
Tags
.NET
.Net 2.0
.Net Original
.Net Quotations
.NetWeblogs Site
Addin Contest
ADO.Net
Agile
Agile Israel News
Agile Related
altnet
altnetconf
altnetisrael
Architecture
Art Of Unit Testing
ASP.NET
BDD
Blogging
C#
CLR
Community
Community News
Cool Articles
Cool sites
Cool Tools
Extensibility
Family
FeatureFocus
Free book chapters
General Software Development
Interview
Lean
Mobile
MSBuild
NDC09-Video
Off Topic
Open Source
Other
Product Reviews
Project Management
racer
Recommended books
Reflection
Regex
Regular Expressions
review
Security
Sharepoint
Silverlight
SOA
Songs
SQL Server
tdd
Team Agile News
Team System
TechEd 05
Testing Guidelines
TestReview
Threading
Tips & Tricks
Typed Datasets
Typemock
Unit Testing
Visual Studio
web
web services
WebCast
Windows Forms
WinFX
Recent Posts
How to: Move your blog off of weblogs.asp.net (aka ‘This Blog has moved’)
test – ignore
Bounty: 500$ is you can convert my blog to squarespace
Join me for a live webinar on unit testing with Isolator++ this thursday
What’s coming in Test Lint 1.5
Archives
November 2010 (2)
October 2010 (4)
September 2010 (4)
August 2010 (3)
July 2010 (2)
June 2010 (5)
May 2010 (6)
April 2010 (6)
March 2010 (4)
February 2010 (5)
January 2010 (11)
December 2009 (7)
November 2009 (7)
October 2009 (5)
September 2009 (6)
August 2009 (21)
July 2009 (7)
June 2009 (11)
May 2009 (13)
April 2009 (5)
March 2009 (21)
February 2009 (4)
January 2009 (2)
December 2008 (5)
November 2008 (6)
October 2008 (13)
September 2008 (4)
August 2008 (13)
July 2008 (19)
June 2008 (5)
May 2008 (17)
April 2008 (11)
March 2008 (13)
February 2008 (16)
January 2008 (21)
December 2007 (8)
November 2007 (18)
October 2007 (17)
September 2007 (15)
August 2007 (19)
July 2007 (18)
June 2007 (33)
May 2007 (16)
April 2007 (10)
March 2007 (15)
February 2007 (10)
January 2007 (11)
December 2006 (22)
November 2006 (18)
October 2006 (19)
September 2006 (30)
August 2006 (19)
July 2006 (27)
June 2006 (26)
May 2006 (32)
April 2006 (15)
March 2006 (20)
February 2006 (33)
January 2006 (23)
December 2005 (22)
November 2005 (41)
October 2005 (21)
September 2005 (7)
August 2005 (28)
July 2005 (41)
June 2005 (60)
May 2005 (14)
April 2005 (51)
March 2005 (31)
February 2005 (17)
January 2005 (63)
December 2004 (45)
November 2004 (35)
October 2004 (28)
September 2004 (36)
August 2004 (21)
July 2004 (44)
June 2004 (63)
May 2004 (62)
April 2004 (78)
March 2004 (64)
February 2004 (55)
January 2004 (67)
December 2003 (34)
November 2003 (67)
October 2003 (68)
September 2003 (113)
August 2003 (56)
July 2003 (112)
June 2003 (71)
May 2003 (136)
April 2003 (52)
March 2003 (81)
February 2003 (77)
Am I the stereotypical VB programmer?
My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/7/8/am-i-the-stereotypical-vb-programmer.html
Published
Tuesday, July 08, 2003 1:03 PM by
RoyOsherove
Filed under:
Off Topic
Comments
Tuesday, July 08, 2003 2:30 AM by matthew
#
re: Am I the stereotypical VB programmer?
Your post just shows how each person gets used to something and then dislikes anything different, regardless of whether it's better or not.
I've never done any VB-like programming, and on the rare occasion I've even had to extract (ripoff!) six lines of code from VB code from a VB project it has pissed me off no end.
Firing up a VB project for 2 minutes, here's what pisses me off:
Intellisense: I want to access Me.myVariable.
In C#, I type this.myV until it comes to the member I want, I press enter - it autocompletes the rest of the variable.
In VB, I type this.myV, press enter - it gives me the variable and adds the new line!
Why would I want a new line? I'm just about to say Me.myVariable = x, so why do I have to go back and do this?
Why do you need all those redundant words like End If?
On your complaints, case-sensitivity is a fundamental language feature, and unlike some of your other complaints cannot be changed as it's part of the standard.
It's also very cool
public class myClass {
private bool myBool;
public MyBool {
set {
myBool = value
}
get {
return myBool
}
}
two different variables there....
Automatic creation of "()" braces:
Since I've never had this I don't miss it.....
It really doesn't take me too long to go MyFunction(.... Plus the ( gives me the intellisense to remind me of the parameters the function is expecting.
I guess VB programmers don't have to type many brackets, but in C# you get used to it, and I don't think I would want or use this feature
With. I'm sure there's an article I read about why this is bad, but it's really hard to google for 'with', so I can't post the link..... I did use it once in JavaScript, and I felt it tended to obfuscate things a little though.
Tuesday, July 08, 2003 2:30 AM by
Martin Spedding
#
re: Am I the stereotypical VB programmer?
Hi Roy,
I liked your list of potential improvements to the IDE and I have to say I agree with all of them. Case sensitivity seems to be one of those annoying things that seems to a feature of C syntax languages and operating systems and I agree with you it is a pain. You should never have two variables with same name except for case.
As for the with statement I remember having this discussion at the PDC in 2000 and seems that the developers did not seem to see a need for it.
I surprised the person who complained that you are looking at everything from a VB point of view did not complain at your mention of "edit and continue" for C#. I remember seeing a comment in MSDN chat where Eric Rudder was asked about adding "Edit and Continue" for C# and he said he did not think there was the demand for it from C# developers.
I developed in about 10 different programming languages over time, including Java, vb and C# and really want all the productivity aids that come with VB and especially "Edit and Continue".
You are definitely on the right track.
Martin Spedding
Tuesday, July 08, 2003 2:35 AM by
Paul Nicholls
#
re: Am I the stereotypical VB programmer?
Case sensitivity is important to me, because it makes my code cleaner. It stops me (and other people) from writing
MySpecialMethod()
as
myspecialmethod()
or
MYSPECIALMETHOD()
It forces code to be uniform. I understand that not every VB programmer is this sloppy, but I've run into quite a lot of hard-to-read code because case was used inconsistantly.
(I'm speaking from when I used to be a VBScript programmer, I haven't touched VB at all.)
I don't think it's vital to the language, I just like the constraint. :)
Tuesday, July 08, 2003 2:41 AM by
Roy Osherove
#
re: Am I the stereotypical VB programmer?
matthew:
Pressing TAB instead of Enter fixes your issue :)
as for "wordy" - I agree. I think VB.Net can sometimes be too wordy for its own good - but it sure is self-documenting - the wording fo access modifiers might seem redundant - but it is much more self documenting than curly braces...
I still like curly braces better(I'm a VB traitor..)
as for naming variables - I don;think it's cool to have two variables named exactly the same with only casing diffrentiating them. It makes for less understandable code. The fact that you had to mention "two variables there" in your code shows exactly that - It should be easy to spot and read two different variables without getting confused between them.
Paul:
That's what I'm talking about - In VB you can write MYVARIABLE but you'll get automatically formatted text to the name of the variable, so if it was named "MyVariable" - your text will automatically turn into that casing... how easy is that? :)
Tuesday, July 08, 2003 2:44 AM by
Jeff Julian
#
re: Am I the stereotypical VB programmer?
Leave case-sensitivity alone. It will never change, nor do most C# developers want it to.
Tuesday, July 08, 2003 3:17 AM by
Duncan
#
re: Am I the stereotypical VB programmer?
Case sensitivity leads to bugs.
Tuesday, July 08, 2003 3:32 AM by
Frans Bouma
#
re: Am I the stereotypical VB programmer?
"That's what I'm talking about - In VB you can write MYVARIABLE but you'll get automatically formatted text to the name of the variable, so if it was named "MyVariable" - your text will automatically turn into that casing... how easy is that? :) "
Not always. If you are typing some code and realize you have to declare a variable, you type in the statement using hte variable and then you type the declaration above it. AFAIK, the statement will not change based on another casing.
Personally I think code which relies on case sensitivity to run properly is not that good and it shows lazyness, because coming up with a new good name is not that hard but takes a little time and the shortest way out is to simpy use the same name with another casing...
Tuesday, July 08, 2003 5:00 AM by Oisin Grehan
#
re: Am I the stereotypical VB programmer?
Oh dear -- what have I started? I didn't mean to word my original comment so personally, apologies are due, please accept them Roy.
I've a lot of pent up anger to disperse on VB programmers in general, yes I used to be one, until I discovered the light about ten years ago, along with curly braces and square bracket indexers. It's only fair that if I flame you for your post, I give you (and many others) the chance to do likewise for my reasons.
My biggest problem with VB in general is that something that can be so "self-documentating" as you put it can be simultaneously so woefully inelegant. In general Roy, I disagree with your principals for suggesting changes to the language, not really the changes themselves. To put it simply, I believe there to be two broad camps of programming methodologies, the VB way, and the C way -- the languages may have changed over the years, but the developers' frames of mind remain the same. I'll rant about the VB way:
The 'VB' way.
I'm sure you're aware of the history of Visual Basic, it was originally built as a application prototyping environment, for quick turnaround of concepts into working code. Every single feature that has been added to the language and the dev ide have tried to accomodate this scenario. Every little thing seems to be designed around the lazy programmer. Just spit out grammar as it comes into your head and let the background-compile process draw little squiggley red lines underneath your code -- you can fix it later. Your pinky has slapped the capslock key? Never mind, let's code the rest of this module entirely in UPPER case, the compiler doesn't care. Option Strict? what's that? -- "lets not bother declaring any variables, I'll just make them up when I need them." Option Base 1? "I can't get my head around zero-based indexes, let's all start at 1, except for this module over here". "I think I'll use zero based indexes there. I'm not sure why". It's syntactical verbosity is just astounding, the amount of syntactic sugar is enough to induce programmatic diabetes. Edit and continue is more pandering to this hack up a demo ethic, IMO. Used correctly, it can be a help, but in my experience it caused me to think less and brainfart more.
You see where I'm going with this? There was no discipline in VB. Yes, you could argue that VB.NET changes all this, but giving a VB programmer a copy of VB.net doesn't change their habits. We have several VB programmers here, and our shop is moving to .NET. I've insisted that the VBers start afresh with c#. My reasoning behind this is that if they were to learn VB.NET properly, they should treat it as a completely new language. But, coming from VB 6, they will see all these things and keywords that are familiar to them and they'll never really mentally shake off the connection (and the bad habits). I strongly believe that they'll take to OO programming faster and with a better attitude if they go with a new language, a perceived blank sheet per-se. I may be wrong.
I think this endless pursuit of making it easier for the programmer has gone beyond aiding creativity. It is positively eroding it.
Back to your points:
- Background compile
(discourages discipline: see above rant)
- Case insensitivity
(discourages discipline: see above rant)
- '[]' instead of '()' for array indices
Sounds like you're getting confused between languages Roy.
- VB.NET-like Intellisense for enums and namespaces writing
Sounds like a good idea to me. I'd imagine it awaits us in the next rollout of the IDE.
- Automatic creation of "()" braces on method calls
This sounds like more help for VB programmers used to typing function calls without parentheses. It had never occurred to me. How much productivity are you going to save with the s
Tuesday, July 08, 2003 5:02 AM by Oisin Grehan
#
re: Am I the stereotypical VB programmer?
(continuation)
- Automatic creation of "()" braces on method calls
This sounds like more help for VB programmers used to typing function calls without parentheses. It had never occurred to me. How much productivity are you going to save with the saving of two characters?
- With like functionality VB.NET
As pointed out in various forms to you:
using (q = Namespace.Object.Object) {
q.property1 = "a";
q.property2 = "b";
}
Admittedly, you've had to type an extra four characters, but hey, life is tough. VB and C# are different for a reason. That reason is so they are different -- it's that simple. VB.NET has underscore line continuation, a 'With' keyword, parentheses for array etc because it is Visual Basic. I believe that VB has been put together to enable speedy mock ups for a broad spectrum of applications, with an emphasis on strong visualisation and good readability for the lay coder. C-syntax to me has always been about the embodiment of abstract concepts, its concise grammar lends itself especially well to this IMO. I'd like to think I'm not a C-syntax snob, but it appears I am.
And last, but not least, I am currently involved in porting a large multitier app from VB to C#. This has been the source of countless rage fits. Again, apologies for getting a little too personal on the rant.
Subscribed.
Tuesday, July 08, 2003 5:23 AM by
Dave Burke
#
re: Am I the stereotypical VB programmer?
Roy, I liked your list. I agree with all except Case Sensitivity. It should be smarter and automatically adjust like VB, but then it wouldn't be C# anymore. I like using VB primarily because the VS.NET editor seems much smarter and supportive than C# (though I have coded almost exclusively in C# for the last year.) Keep on doing what you're doing, whether its "stereotypical" or not!
Tuesday, July 08, 2003 6:56 AM by
Marc LaFleur
#
re: Am I the stereotypical VB programmer?
I'm with you Roy.
Tuesday, July 08, 2003 6:59 AM by
Roy Osherove
#
re: Am I the stereotypical VB programmer?
Thanks for the feedback guys(especially Oisin). I've learned a lot :)
Tuesday, July 08, 2003 9:03 AM by
TrackBack
#
Frans Bouma's blog
Frans Bouma's blog
Tuesday, July 08, 2003 9:03 AM by
TrackBack
#
heLP .Net Blog
heLP .Net Blog
Monday, September 29, 2003 8:10 AM by Eric
#
re: Am I the stereotypical VB programmer?
Matthew said:
-----------------------
It's also very cool
public class myClass {
private bool myBool;
public MyBool {
set {
myBool = value
}
get {
return myBool
}
}
---------------------
There is so much to say about case sensitivity from a psychological point of view that I wont even start. Suffice it to say that its NOT cool. Matthew, here is your code again only this time it will cause a stack overflow every time you set the MyBool property:
----
public class myClass {
private bool myBool;
public MyBool {
set {
MyBool = value
}
get {
return myBool
}
}
-----
Go ahead. Run it and see what happens when you create an instance of myClass and do "myVar.MyBool = False". Now without using the debugger to step through the code, try and work out what's going on :). Now throw in several thousand lines of code, a few differences in the way your programmers use case-sensitivity in identifiers and voila! - CHAOS.