Sample Code - VB or C#?

  • Thread starter Chad Z. Hower aka Kudzu
  • Start date
C

Chad Z. Hower aka Kudzu

(e-mail address removed) (Herfried K. Wagner [MVP]) wrote in (e-mail address removed):
Would be interesting if you let us know about your final decision!

Gladly. Here is what I have put into the documentation regarding sample code.

Examples

Providing all examples in all languages creates a maintenance nightmare and
detracts from time that would otherwise be dedicated to content. While Indy
supports Delphi, C++, C#, Visual Basic and J#, example code will be provided
as follows:

C# and Delphi - All sample code is provided in both C# and Delphi.
Visual Basic - Limited sample code is provided in Visual Basic. When Visual
Basic code is not available, the C# source should be referred to.
J# - No J# examples are provided. J# developers should refer to the C# code.
C++ - No sample code is provided in C++. C++ Builder developers should refer
to the Delphi code.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
H

Herfried K. Wagner [MVP]

Chad,

* "Chad Z. Hower aka Kudzu said:
Plenty. Without starting a flamewar - Delphi.net does not require a near
rewrite of your existing code like VB.net and C# users have had to do.

That's indeed a very big advantage...
 
H

Herfried K. Wagner [MVP]

* "Markus Hahn said:
language. On the other hand VB.NET programmers probably will choke on
expressions like "while (null != (test = (obj = new
Foo()).Items[nI++]));" . Tough question indeed...

'for' has a different (misleading) meaning in C#.

'using' doesn't exist in VB.NET (at the moment).

Indexers are different in VB.NET and C#.

Calling the base class's ctor is different.

'continue' doesn't exist in VB.NET at the moment (this will make
conversion C# -> VB.NET harder).

The event model is different.

....
 
R

Rob Windsor [MVP]

Hey Chad,

So, another Delphi guy makes the switch ;-) I used to help run the Toronto
Delphi User Group, I've attended a couple of your talks.

Anyway, from what I've seen developers are starting to realize that it's the
framework that matters, not the syntax you use to make calls to it. There
are three .NET groups in or near Toronto and speakers use whatever language
they are comfortable with when they present. I run the local VB group and
we've had afew presenters show C# sample code. I've done a few talks at the
Delphi group using VB.NET, C# with VS, C# with C# Builder and Delphi for
..NET and the message about the technology still gets across. It'll take a
while longer before you won't get any complaints but it won't be that long.

I think the main reason people want to see code in the language they use is
so when they download your samples after the presentation they can cut and
paste instead of translate.

Just my $0.02 CAN.
 
C

Chad Z. Hower aka Kudzu

Rob Windsor said:
So, another Delphi guy makes the switch ;-) I used to help run the

I wouldnt call it a switch. :)

Im still using Delphi a LOT. I just have to show C# and VB users how to use
assemblies produced in Delphi.
Toronto Delphi User Group, I've attended a couple of your talks.

Great. :)
language they are comfortable with when they present. I run the local VB
group and we've had afew presenters show C# sample code. I've done a few
talks at the Delphi group using VB.NET, C# with VS, C# with C# Builder

Great. But C# programmers still look down on VB - and probably will for a
long time. Many of them are prior C++ developers.



--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
J

Jay B. Harlow [MVP - Outlook]

Chad,
Possible, but Id prefer to be consistent. Im leaning towards C#, with some VB
ports where time permits.
Samples in both is consistent in my book! Favoring one over the other is
inconsistent in my book!

Look at how MSDN does it, they provide samples in C#, VB.NET, Managed C++
and J#.

Any less would really be a disservice to your potential customers!

Consider the word Compromise!

As you have suggested. If you do only C#, I suspect you will alienate VB.NET
programmers, if you do only VB.NET you will alienate C# programmers, seeing
as complete examples in both may not be doable by yourself, I am suggesting
some of each to minimize alienating C# or VB.NET developers. Of course then
you risk alienating J# & Managed C++ developers.

A fair compromise is an equal number of samples in each, if complete samples
in both are not readily doable.

Hope this helps
Jay
 
C

Chad Z. Hower aka Kudzu

Jay B. Harlow said:
Look at how MSDN does it, they provide samples in C#, VB.NET, Managed
C++ and J#.

Any less would really be a disservice to your potential customers!

If there were only enough hours in day...

Microsoft has what thousands, if not tens of thousands of people?
VB.NET developers. Of course then you risk alienating J# & Managed C++
developers.

Im not very concerned about them because:

a) J# is a joke and there are very few people actually using it. Those that
are are plenty used to reading C#.

b) Managed C++ - Arent a whole lot of them either. Most of them are C++
diehards who are just resisting the move to C#. They are used to reading C#
too.



--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
J

Jay B. Harlow [MVP - Outlook]

Chad,
Microsoft has what thousands, if not tens of thousands of people?
Is your project is the same scope as .NET? Are you implying that you would
need thousands of people to create samples for your project? If you do, then
that is all the more reason to do the samples in every language!

However I get the impression you are missing the point I am trying to make.

If you need 6 examples, do 6 examples: 3 in C# and 3 in VB.NET. Surely you
can handle doing 3 in each.

There is no need for a response. As I am dropping out of this discussion.

Note have you considered asking developers in these newsgroups to help
create examples, rather then "alienating" them by suggesting you can only
create samples in a single language?

Again good luck, I'm out of this discussion.

Hope this helps
Jay
 
C

Chad Z. Hower aka Kudzu

Jay B. Harlow said:
If you need 6 examples, do 6 examples: 3 in C# and 3 in VB.NET. Surely
you can handle doing 3 in each.

We are going to do some in VB, and some ports. But the majority will be C#.
The samples are quite varied in purpose.
Note have you considered asking developers in these newsgroups to help
create examples, rather then "alienating" them by suggesting you can
only create samples in a single language?

Kind of - for the Indy demos yes, we have created a team. However these
samples are for a semi-commercial purpose and I doubt users would want to
work for free for that. :)


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 

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

Similar Threads


Top