Help with choosing a language

  • Thread starter Thread starter verukins
  • Start date Start date
V

verukins

Hi,
Im a sysadmin/consultant around the microsoft suite of server
products and do quite a bit of vbscripting to manipulate AD/Exchange.

I'd like to start doing a little more, specifically turning the concept
of my scripts into "richer" programs with a full GUI, database
connectivity etc, rather than just a rag tag bunch of scripts.

Im leaning towards a dotnet language, as all my programs will only be
for windows machines any my perception is that it will be quicker to
pickup.

Many of the books out seem to be geared towards people that wish to
write web services etc..

So - my questions
1) Is there any particular lanuguage which will give me greater
flexibility over another within the .net family? (I've heard c# is easy
to learn)
2) can anyone point to some good books for an absolute beginner?

TIA
 
1) Is there any particular lanuguage which will give me greater
flexibility over another within the .net family? (I've heard c# is easy
to learn)

C# is slightly more flexible over VB.Net. As to how easy it is to learn, I
suppose that depends on the person doing the learning. And like any video
game, it is relatively easy to learn, and hard to master!
2) can anyone point to some good books for an absolute beginner?

The .Net SDK is free, and has lots of articles, tutorials, and the complete
..Net reference:

http://msdn.microsoft.com/netframework/downloads/updates/default.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.
 
Agree with Kevin's comments (and you can find ***so*** many opinions on this
subject in the archives) - but really you should figure out what you *need*
from a language; and to be honest, in these CLR days the language is less
critical as this is just the glue; the important bit is the framework, but
any CLR language should have access to the CLR-compliant parts of this...

C# is pretty convenient for most things, but (as an example) VB.Net trumps
it a bit when it comes to talking to COM objects through late-binding
(although you can always reference the VB libs and abuse the methods that
way). Convesely, the C# 2.0 compiler offers things like anonymous methods
and captured variables, which can sweeten the deal.

A 1.1 VB.Net / C# comparison table is here:
http://www.codeproject.com/dotnet/vbnet_c__difference.asp

I couldn't find a comprehensive 2.0 version, but such will exist
somewhere...

Marc
 
1) Is there any particular lanuguage which will give me greater
flexibility over another within the .net family? (I've heard c# is easy
to learn)

Since our customers use both C# and VB, for both .NET 2.0 and 1.1, we have
to be well-versed in all four combinations. But we write all our original
code in C# 1.1, then use Visual Studio and InstantVB to port that to 2.0 and
VB, respectively.

If you have any experience with C or C++, then C# is definitely the way to
go. If you are coming from the VB6 world, then VB.NET would be a natural
choice. If you have little or no programming experience and are starting
from scratch, then I would recommend C# for the following reasons:

1) C# enjoys better support from Microsoft, component and tool vendors.
Most new products/features are rolled out first in C#, then to VB. This is
not always the case (e.g., edit & continue) but more often than not.

2) C# is much more concise and less verbose than VB.

3) There's a number of little details that make C# a better experience.
e.g., C# allows multiple assignments in a single line (int a = b = 6), inline
operators (int a = b++), #region statements within methods/properties, etc.
All of these are marked as errors when we convert from C# to VB.

..NET is an excellent choice for the Windows platform. It's feature rich,
very stable, well-documented, well-supported by Microsoft and the developer
community. The one thing we really like about .NET languages: you write the
code and it works. Unlike C++ in which you can spend hours chasing down
pointer-to-pointer bugs, etc. Our company is exclusively .NET.

The biggest downside to .NET is that Microsoft for whatever reason refuses
to force-install .NET on all Windows PC. As a result, even today only a very
small percentage of PCs have .NET 2.0 installed. This means that most of
your customers will be forced to download the 17MB redistributable, which is
a big hassle. People without broadband will balk at this, and people with
broadband are like, "What's this .NET thing?" As a result, we are forced to
stay with .NET 1.1. Microsoft's solution is to include .NET with Vista,
which means that you won't see the latest version of .NET installed on most
PCs until 2009 (given the 2007 release date and typical 2 year adoption rate).
 
Hi,
Im a sysadmin/consultant around the microsoft suite of server
products and do quite a bit of vbscripting to manipulate AD/Exchange.

If you're already familiar with VB script then you might want to lean
towards VB.NET.
 
Mini-Tools Timm said:
3) There's a number of little details that make C# a better experience.
e.g., C# allows multiple assignments in a single line (int a = b = 6), inline
operators (int a = b++), #region statements within methods/properties, etc.
All of these are marked as errors when we convert from C# to VB.

This is all old ground, but I think I ought to point out that you seem
to have put 'better' where you mean 'worse' here.

I mean, #region's in a method? How long are your methods?!
 
Larry Lard said:
This is all old ground, but I think I ought to point out that you seem
to have put 'better' where you mean 'worse' here.

Programming languages, like operating systems, are a very personal (almost
religious) topic. Just the other day a C++ guy here was blasting .NET as the
worst invention in history. When we do our C# to VB conversions, we scratch
our heads at all the things that VB complains about. And yet many of our
customers wouldn't be successful without VB. So I believe you should use
whichever language allows you to quickly produce high-quality solutions that
meet your customers' needs.
 
I'd agree with Brian here, since VB is much more beginner friendly when
it comes to topics like automatic type conversion, matching calling
conventions or registering event handlers.
On the other hand execution is slower after compilation and some errors
are harder to track down. But for someone coming from a scripting
language this will certainly not be the primary aspects you are looking
at...
 
Larry said:
I mean, #region's in a method? How long are your methods?!

The current world record for C# method length is probably held by my
ex-co-worker, who not only wrote an 800-line method but then copied
and pasted the whole thing because some small changes to the process
were required in one situation.

Eq.
 
Paul said:
The current world record for C# method length is probably held by my
ex-co-worker, who not only wrote an 800-line method but then copied
and pasted the whole thing because some small changes to the process
were required in one situation.

That's pretty bad, but I think I can one-up you. Not too long ago
someone posted that they were seeing an InvalidProgramException. It
was caused by a code generator that declared more than 32767 local
variables in a single method.

Brian
 
cool - ok, thanks for all the messages.

I know its a personal thing - but that still doesnt mean other peoples
advice is not useful!

thanks for that, i think im basically going to have a play with both
vb.net and c# and see which one is for me.... or maybe both :-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top