what prog language make sense?

dbarton

Senior member
Apr 11, 2002
767
0
76
I programmed in Clipper for DOS way back when and wrote database and simple utility apps.

Now I'd like to write simple Windows apps, and maybe a bit of web stuff now and again

So many choices. Visual Basic? Java? PHP? CGI?

All just names to me - how do I sort out what to look further into learning?
Any suggestions?
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
CGI is not a language.
VB = evil - teaches you how NOT to do things.
Java is really not that practical. The language design is good but the implementations and libraries are lacking.
I would recommend C++ Builder. Super easy to put together Windows apps, the C++ you learn will be useful on pretty much every platform.
 

dbarton

Senior member
Apr 11, 2002
767
0
76

Is C++ Builder is made by a few people? Is Borland's the one to get?

Any suggestions for where to start would be a great help.
 

HJB417

Senior member
Dec 31, 2000
763
0
0
hmm, c++ builder sounds like a program (ide) made by borland. I would get the c++ primer book (i have 3rd edition) or something similar and read that. Make sure you have a project in mind before you do this. I would also listen on the c++ newsgroups. From there, you can then move on to c++.net for gui development and other cool classes the .net framework provides.
 

Codewiz

Diamond Member
Jan 23, 2002
5,758
0
76
Hell I would recommend C#, it will not only allowhim to create standalone applications but directly leads to ASP.NET
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
Originally posted by: dbarton
Is C++ Builder is made by a few people? Is Borland's the one to get?

Any suggestions for where to start would be a great help.

C++ Builder is a product from Borland. That's in my opinion the best commercial C++ compiler available.
For a free one, try Bloodshed DevC++.

C# does lead to web stuff though.
 

Alternex

Senior member
Oct 9, 1999
531
0
0
C#/.Net is really easy to program. Plus you can download the free compiler for it so it costs nothing
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Originally posted by: glugglug
CGI is not a language.
VB = evil - teaches you how NOT to do things.
Java is really not that practical. The language design is good but the implementations and libraries are lacking.
I would recommend C++ Builder. Super easy to put together Windows apps, the C++ you learn will be useful on pretty much every platform.

ok, i'll bite. How does VB teach you hot NOT to do things? And Java is not practical??? How so?

 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
VB you don't have to declare your variables?
It's an event driven language?

*hugs VB for being so quick and easy to use*
 

boran

Golden Member
Jun 17, 2001
1,526
0
76
Java is a good place to start, but C (and derivates) have the most applicable use. since java requires lots of clutter to get to work. (JRE)
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
Mucman wrote:
ok, i'll bite. How does VB teach you hot NOT to do things? And Java is not practical??? How so?

A few ways in which VB teaches bad habits:

1: Enforced use of Goto/On Error Goto for error handling rather than having any real exception handling. Actually, it's worse than that. Using the err object/raising an error to be caught in your error handler is EXPENSIVE in VB, on the order of 100 million CPU cycles. So actually for the errors you have full control of, if you want things handled a couple hundred times quicker you have to copy your error information into some object scope vars with a function call, then explicitly have a Goto nonsystemerrorhandler in your code.

2: No way to enforce explicit variable type declarations with the ugly Variant as a default type in code that doesn't specify. Fortunately .NET fixes this with Option Strict. VB.NET is truly a different animal from VB6 - it's VB6 I have major issues with. In fact it is all too common a practice NOT to give variables types because then things won't work if you copy and paste into ASP/VBScript.

3: The fact things have to be Variant if they are ByRef params called from VBScript is the ultimate evil.

4: reference counting on all objects rather than forcing the programmer to think about their allocation/deallocation, and no direct control of destructors being called. Yes, I say forcing the programmer to do this is a good thing?. I know this "feature" is supposed to protect you from memory leaks but in actuality it doesn't. Any objects with references to each other (circular) will end up causing a memory leak in VB. I know circular references are also considered bad practice, but there are more justifiable uses for this than one might think. This is a big gripe with Java as well.

5: Don't get me started on the evils of the "apartment thread model". BTW, did you realize that any Public variable in a .bas file is actually thread scope, not a true global? (Actually, given the thread model, that is a good thing...)

6: Array implementation so lousy it forces you to either throw the array contents into a delimited string or use a dictionary or list object if the array needs to be scanned frequently for performance reasons.

7: Everything has to be an "Object" so that they can claim it is OOP - it won't let you create a normal Win32 DLL that is a collection of functions but isn't COM, yet the only possible type of inheritance is interfaces.


Edit: BTW, anyone else who downloaded the source to Windows notice that the only 2 VB files are test programs to make sure it still worked with other Windows components?
 

rearden888

Junior Member
Aug 13, 2001
24
0
0
Yeah, Java is one good way to start doing OOP, but now that C# is out, it's probably just as good, seeing as it's just as ojbect oriented as Java is. Also, if you're starting to do Windows programming, there is no way in h*$% I'd start out with C++. Start doing Windows programming in VB, Java, or C#. Doing windows programming in C++ is like sacrificing your firstborn child to the gods of inane syntax and weird function calls. I'm programmed in all 4 in windows environments, and C# is by far my favorite. There is good documentation online, and if you can get a hold of VS.NET, you'll have a really nice IDE to work with the language in. Anyway, that's my 2 cents
 

dbarton

Senior member
Apr 11, 2002
767
0
76
So I think the consensus suggestion is from me to learn C#..

Can anyone help with what specific software package and learning book/tool I need to get now to begin?

Free compiler?

(BTW Oracle Sygate etc - not worth looking at unless only doing database stuff?)
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Originally posted by: WobbleWobble
VB you don't have to declare your variables?
It's an event driven language?

*hugs VB for being so quick and easy to use*

You can make it so that you have to declare variables or the compiler will give you an error.
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
Originally posted by: igowerf

You can make it so that you have to declare variables or the compiler will give you an error.

I'm aware of that :)

But my point was that you don't have to declare variables. Usually people starting out programming get frustrated by having to declare variable and they see VB and it's a language where you don't have to, so they won't.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Here I go again getting sucked in, but I'll amuse everyone by being predictable :)

Originally posted by: glugglug
Mucman wrote:
ok, i'll bite. How does VB teach you hot NOT to do things? And Java is not practical??? How so?

A few ways in which VB teaches bad habits:

1: Enforced use of Goto/On Error Goto for error handling rather than having any real exception handling. Actually, it's worse than that. Using the err object/raising an error to be caught in your error handler is EXPENSIVE in VB, on the order of 100 million CPU cycles. So actually for the errors you have full control of, if you want things handled a couple hundred times quicker you have to copy your error information into some object scope vars with a function call, then explicitly have a Goto nonsystemerrorhandler in your code.

Do you have any references ot this 100 million CPU cycle nonsense?

2: No way to enforce explicit variable type declarations with the ugly Variant as a default type in code that doesn't specify. Fortunately .NET fixes this with Option Strict. VB.NET is truly a different animal from VB6 - it's VB6 I have major issues with. In fact it is all too common a practice NOT to give variables types because then things won't work if you copy and paste into ASP/VBScript.

3: The fact things have to be Variant if they are ByRef params called from VBScript is the ultimate evil.

You are using the loosely-typed nature of something that is not VB affect your opinion of VB? The byref and variant semantics is an artifact of COM's IDispatch interface for ASP's late-binding. VB was kind enough to implement a dual-interface for you behind the scenes, and you are certainly welcome to not employ byref variants if you so choose; however, doing so limits its use by late-bound clients such as ActiveX scripting engines. This issue is present in any language capable of implementing COM interfaces, including C++.

4: reference counting on all objects rather than forcing the programmer to think about their allocation/deallocation, and no direct control of destructors being called. Yes, I say forcing the programmer to do this is a good thing?. I know this "feature" is supposed to protect you from memory leaks but in actuality it doesn't. Any objects with references to each other (circular) will end up causing a memory leak in VB. I know circular references are also considered bad practice, but there are more justifiable uses for this than one might think. This is a big gripe with Java as well.

Again, this is COM, not VB. It was debated for quite some time whether ref counting should be implemented in .NET as well due to the lack of deterministic finalization, but you can't have both the implicit cleanup and explicit control at the same time. I do agree with you on the issues though.

5: Don't get me started on the evils of the "apartment thread model". BTW, did you realize that any Public variable in a .bas file is actually thread scope, not a true global? (Actually, given the thread model, that is a good thing...)

This has been an argument for years, and this is where VB was not a good choice, but what ignorant progenitor pushes VB as a panacean solution to all?

6: Array implementation so lousy it forces you to either throw the array contents into a delimited string or use a dictionary or list object if the array needs to be scanned frequently for performance reasons.

Agreed, it's lacking in this area.

7: Everything has to be an "Object" so that they can claim it is OOP - it won't let you create a normal Win32 DLL that is a collection of functions but isn't COM, yet the only possible type of inheritance is interfaces.

I don't understand what you mean here. Are you referring to VB.NET or VB? Yes, it is true that VB cannot create standard DLLs, but this is again simply an area that VB need not be your tool of choice if you wish to do so. Interface inheritance was a joke, but only because most people were using VB COM components in the middle-tier to be consumed by late-bound clients. In doing so you negated the default dual-interface implementation provided by VB, and you're left with having to delegate the interface implementation. It was just another attempt to appease those who said they wanted this flexibility and then admonished it when they got it. Standard DLLs preceded COM of course, and VB was a tool derived from the intentions of COM.

Your main argument seems to be that VB was a tool derived from the intentions of COM, but I don't see how that can be used to consider it a bad tool. If a tool is designed for one environment, one shouldn't complain that it doesn't work in another. VB was very successful in ushering in the notion that "COM is love" (as Don Box would have said then), but it being so highly coupled to COM obviously lends itself to obsolescence when a revolution like .NET arrives. Also, how many languages can you honestly say don't suffer from some inadequacies?
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: dbarton
So I think the consensus suggestion is from me to learn C#..

Can anyone help with what specific software package and learning book/tool I need to get now to begin?

Free compiler?

(BTW Oracle Sygate etc - not worth looking at unless only doing database stuff?)

Absolutely. I still believe this is the best book on the .NET Framework, and this is the best book for C#. Those two in combination will provide you with more than you need to know on the subject. You're welcome to get one of those monolithic texts that encompass everything, but Richter's book is the best source of in-depth information on the .NET Framework (with examples in C#).

Download the .NET SDK to get started; it includes the compilers you'll need. You will of course have to compile everything yourself, but I strongly feel this is a preferred learning method. SharpDevelop is an excellent free open-source IDE that you could use as well. If you just want a normal editor that supports C# syntax, look at Crimson Editor. Finally, you can use Web Matrix to get started on some ASP.NET projects.

All free! :)
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
On the ByRef params must be Variant thing: This is NOT a restriction of the IDispatch interface. It is a problem with VBScript. To make it even more confusing, you can in fact call methods returning non-Variants ByRef through VBScript by casting using CLng or CStr, etc. depending on the type, but then the returned value gets thrown away.

In fact, if you consider the fact that every function return value in VB is actually an [out] parameter if you look at the lower level COM interface (with the real function return value being a result code), and the fact that these return values don't have to be Variants, this VBScript restriction is pretty inconsistent and silly.

You are right though that this isn't really VB's fault, it's VBScript's. The use of the 2 unfortunately tends to go together.
 

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
Originally posted by: dbarton
I programmed in Clipper for DOS way back when and wrote database and simple utility apps.

Now I'd like to write simple Windows apps, and maybe a bit of web stuff now and again

So many choices. Visual Basic? Java? PHP? CGI?

All just names to me - how do I sort out what to look further into learning?
Any suggestions?

I'd recommend C++. C++Builder (Borland) is really great imo. Java isn't too bad either, but I personally prefer C++.
 

dbarton

Senior member
Apr 11, 2002
767
0
76
I guess I'm a bit confused on what the .net framework actually is...

I have it installed, cos one of my programs insisted on it, but to write windows progs do I write for .net when most folks don't have that installed?

Are these booke mentioned okay for essentially a beginner?

I liek the idea of Borland C++ bulider since it's such a standard, but wish there was a C# equivalent..

this is SO confusing!!!
 

Codewiz

Diamond Member
Jan 23, 2002
5,758
0
76
Originally posted by: dbarton
I guess I'm a bit confused on what the .net framework actually is...

I have it installed, cos one of my programs insisted on it, but to write windows progs do I write for .net when most folks don't have that installed?

Are these booke mentioned okay for essentially a beginner?

I liek the idea of Borland C++ bulider since it's such a standard, but wish there was a C# equivalent..

this is SO confusing!!!

Anything you write in C# will require the .NET framework. Just like anything written in Java needs to JVM. That really shouldn't hold you back.

Those books are the exact same ones I would have recommended. They should be ok for a begineer but I can't really give an honest opinion because I dealt with C# after having many languages under my belt.

There is a C# standard. The MS standard :)

They made it so there is one standard unlike C.

I HIGHLY recommend going with C# before even looking at C++. Get into good programming habits before getting in C++. Otherwise I feel that you will get into a lot of bad habits with C++.
 

AlexWade

Member
Sep 27, 2003
89
0
0
I know I'm late to the game, but I have to say this:

C# is nothing but Java modified just enough to avoid a lawsuit.

DO NOT start with Java, Smalltalk, or C#. Object-oriented programing requires a new way of thinking -- going start to OO requires you to learn two concepts at once.

Start with C or non-OO C++. Once you've got C++ down, go to C++ OO. Then jump to Java. If you want to be a serious programmer, know C++ well -- parts of OS's are written in C++; I know the Linux kernal is. Going from C++ OO to Java/C# will be easier than straight to Java/C#.

If you are brave, just download Sun's Java at java.sun.com. You want J2EE.