First programming language.... under Windows

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

First programming language.... under Windows

Postby Pesto » Fri Nov 06, 2009 11:22 pm UTC

A friend of mine wants to learn some programming, and asked me to recommend a language. I only ever program in *nix environments, so I don't really know what works well in Windows. He's willing to spend some money, so buying a proprietary software package might be a possibility.

He's not a computer novice, but by no means a compute whiz, so ease of setup should also be considered. He should be able to handle any sort of straight forward install process.

Languages he's mentioned so far:

Java
VB
C#

Of these, I'd lean towards Java. Thoughts?
Sigfault
User avatar
Pesto
 
Posts: 462
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: San Francisco, CA

Re: First programming language.... under Windows

Postby Lewton » Fri Nov 06, 2009 11:49 pm UTC

-not- VB

C# is a nicer programming language than Java. But Java is cross compatible
Lewton
 
Posts: 65
Joined: Tue Apr 08, 2008 9:15 am UTC

Re: First programming language.... under Windows

Postby Earlz » Sat Nov 07, 2009 12:18 am UTC

I would not recommend Java..

C# is nice(except for Casting Hell[trust me it exists no matter how well your classes fit together])
There is also general C++ if he's up for a bit more of a challenge..

There is also PHP. I don't think it's an extremely good language, but I would say it's simple to get started with and beginning to program with. For setting it up there is a 1 click installer that will install a webserver and all that stuff iirc.

I also can't go without recommending Ruby. It's a very elegant and nice language and it also has a 1 click installer.. I don't think SciTE should be considered a novice IDE though
User avatar
Earlz
Gets Obvious Implications
 
Posts: 555
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA

Re: First programming language.... under Windows

Postby Pesto » Sat Nov 07, 2009 12:30 am UTC

I'm not going to recommend PHP. Too many security issues to be considered.

He did also mention C++, which I am partial to. Since he's willing to spend a little money, is there a good commercial compiler out there that any of you recommend? The only one the comes to mind is Borland, but I have no idea if they're still around.
Sigfault
User avatar
Pesto
 
Posts: 462
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: San Francisco, CA

Re: First programming language.... under Windows

Postby lulzfish » Sat Nov 07, 2009 12:48 am UTC

Pesto wrote:I'm not going to recommend PHP. Too many security issues to be considered.

He did also mention C++, which I am partial to. Since he's willing to spend a little money, is there a good commercial compiler out there that any of you recommend? The only one the comes to mind is Borland, but I have no idea if they're still around.


Isn't there Visual C++?
I think the Express Edition is free, and MS probably doesn't charge too much for the full version.
lulzfish
 
Posts: 670
Joined: Tue Dec 16, 2008 8:17 am UTC

Re: First programming language.... under Windows

Postby Posi » Sat Nov 07, 2009 12:56 am UTC

Python - Works just as well on Windows. Everyone seems to love Python, but it may not be the language for your buddy.
C# or Java - I'd lean to C# (nicer overall, probably more portable than Java (Mono has GTK and QT, while Java (AFAIK) just has a bad GTK). Go with Microsoft's Visual Studio as a IDE/Compiler for C# or Eclipse for Java.
C++ - Not as nice as C# or Java, but if you know it you could offer him help (you sound like you know it). Visual Studio again.
Posi
 
Posts: 58
Joined: Mon Jul 16, 2007 6:08 am UTC

Re: First programming language.... under Windows

Postby Xeio » Sat Nov 07, 2009 1:24 am UTC

Earlz wrote:I also can't go without recommending Ruby. It's a very elegant and nice language and it also has a 1 click installer.. I don't think SciTE should be considered a novice IDE though
If ruby, definitely I'd say my IDE of choice would be Netbeans (and for Java, for that matter).
Image
Xeio
 
Posts: 1248
Joined: Wed Jul 25, 2007 11:12 am UTC
Location: Universe, Local Cluster, Milky Way, Sol III

Re: First programming language.... under Windows

Postby 0xBADFEED » Sat Nov 07, 2009 1:52 am UTC

Standard forum answer is Python.

Also, do not do C++. C++ should not be anyone's first language.
0xBADFEED
 
Posts: 564
Joined: Mon May 05, 2008 2:14 am UTC

Re: First programming language.... under Windows

Postby You, sir, name? » Sat Nov 07, 2009 2:12 am UTC

0xBADFEED wrote:Standard forum answer is Python.

Also, do not do C++. C++ should not be anyone's first language.


This. --^

Bigger languages like C++, Java and C# are nice once you know programming, but they are not suitable for learning programming in. They have a steep learning curve, and the amount of red tape you need to wade through to write code is not pedagogical at all.

Python is a very good place to learn programming.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
User avatar
You, sir, name?
 
Posts: 1201
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Re: First programming language.... under Windows

Postby Raptortech97 » Sat Nov 07, 2009 4:11 am UTC

I started off with HTMl,that way you can branch into javascript and CSS when ready. I also worked with Scratch and then Processing.
Maybe, someday, I'll actually be important enough to have a sig.
User avatar
Raptortech97
 
Posts: 18
Joined: Sat Sep 05, 2009 9:39 pm UTC

Re: First programming language.... under Windows

Postby cerbie » Sat Nov 07, 2009 5:21 am UTC

Python, Lua (my favorite imperative), maybe Ruby. Python and Scheme are probably the best starter languages, but I don't know that Scheme is going to be easy to pick up on (however, there are excellent, and small, books for it).

NEVER VB.
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - E.W. Dijkstra
The BASIC he was talking about is far worse than VB6 or VB.NET (really, more akin to COBOL), but the heritage is still there, and they are unholy languages.

Java and C# are fine languages (personally, I hate Java), but they are not so much, "oh, have fun and be creative," languages. They are very good, "you are fifth person to maintain this code for a byzantine application, and the good documentation is locked away in the previous maintainers' user account, which nobody is allowed to access, so, uh, er, have fun figuring it all out when a user calls about something," languages.
Do you feel like throwing a parade when you're depressed? Really? -Belial
The US political system's primary function is to transfer public funds to influential crony corporations. -Philwelch
User avatar
cerbie
 
Posts: 470
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: GA (USA)

Re: First programming language.... under Windows

Postby wishiwasabear » Sat Nov 07, 2009 6:22 am UTC

Interesting to read these opinions, because I started off with Visual Basic, taught myself Java, and am now writing things in VHDL. Algorithms and Data Structures and now Digital Logic and Design have both been really tough courses for me. Now I wonder if my learning path has something to do with that. Regardless, Java is where I started and what my university's cs program makes sure you know first off. But it wasn't easy, and based on my limited personal experience, I'd probably go with a better route recommended by someone else.
wishiwasabear
 
Posts: 16
Joined: Sat Dec 06, 2008 9:32 am UTC

Re: First programming language.... under Windows

Postby Poochy » Sat Nov 07, 2009 6:26 am UTC

Of the three mentioned, I'd say start with Java, but save the object-oriented and user interface stuff (besides maybe Scanner and System.in) for later. Start with making everything static. Java tends to have quite a bit in common with other high-level languages, so it's likely he would be able to apply what he learns to other languages. I'd also recommend Java over C#, for their type systems. If he does plan to start with Java, I highly recommend Eclipse. However, both Java and C# have some components that are quite unintuitive to beginner programmers, and you'll probably get a bunch of questions like "Why does every program need to have "public static void main (String[] args)"?"

Python would also be a good choice for starters; just don't let him get too used to blocking code purely by indentation. I find Python has the nicest learning curve of any programming language that I've used, so it's definitely my top recommendation.

I'll also have to jump on the bandwagon and say avoid VB. Don't start with C++ either, because of some rather weird components like the overloaded operators (<< and >> for both streams and bitwise shifts is particularly obnoxious).
clintonius wrote:"You like that, RIAA? Yeah, the law burns, doesn't it?"
GENERATION 63,728,127: The first time you see this, copy it into your sig and divide the generation number by 2 if it's even, or multiply it by 3 then add 1 if it's odd. Social experiment.
User avatar
Poochy
 
Posts: 276
Joined: Wed Feb 20, 2008 6:07 am UTC

Re: First programming language.... under Windows

Postby Pesto » Sat Nov 07, 2009 6:40 am UTC

cerbie wrote:"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - E.W. Dijkstra
The BASIC he was talking about is far worse than VB6 or VB.NET (really, more akin to COBOL), but the heritage is still there, and they are unholy languages.

Hey! :evil:

I cut my teeth programming in BASIC on an Apple IIe, and I turned out just fine. I mean, who does this Dijkstra fellow think he is, anyway, huh? :wink:

In general response to the thread, I know python is very popular for a first language, but I don't know what it's like under Windows. How problematic could the installation be? No harder than most applications? Is there any type of GUI interface for running the python scripts, or is it all command line?
Sigfault
User avatar
Pesto
 
Posts: 462
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: San Francisco, CA

Re: First programming language.... under Windows

Postby Poochy » Sat Nov 07, 2009 8:38 am UTC

Pesto wrote:In general response to the thread, I know python is very popular for a first language, but I don't know what it's like under Windows. How problematic could the installation be? No harder than most applications? Is there any type of GUI interface for running the python scripts, or is it all command line?

I had no problem with the installation on Windows in spite of the fact that I was feeling lazy that day and didn't bother to read any kind of setup instructions or readme. It's very simple. For an interface / IDE, I recommend IDLE.
clintonius wrote:"You like that, RIAA? Yeah, the law burns, doesn't it?"
GENERATION 63,728,127: The first time you see this, copy it into your sig and divide the generation number by 2 if it's even, or multiply it by 3 then add 1 if it's odd. Social experiment.
User avatar
Poochy
 
Posts: 276
Joined: Wed Feb 20, 2008 6:07 am UTC

Re: First programming language.... under Windows

Postby Xeio » Sat Nov 07, 2009 9:54 am UTC

Poochy wrote:I had no problem with the installation on Windows in spite of the fact that I was feeling lazy that day and didn't bother to read any kind of setup instructions or readme. It's very simple. For an interface / IDE, I recommend IDLE.
*cough* IDLE sucks *cough*
Image
Xeio
 
Posts: 1248
Joined: Wed Jul 25, 2007 11:12 am UTC
Location: Universe, Local Cluster, Milky Way, Sol III

Re: First programming language.... under Windows

Postby cerbie » Sat Nov 07, 2009 2:01 pm UTC

Pesto wrote:
cerbie wrote:"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - E.W. Dijkstra
The BASIC he was talking about is far worse than VB6 or VB.NET (really, more akin to COBOL), but the heritage is still there, and they are unholy languages.

Hey! :evil:

I cut my teeth programming in BASIC on an Apple IIe, and I turned out just fine. I mean, who does this Dijkstra fellow think he is, anyway, huh? :wink:
...and I on my dad's TRS-80. Then batch files and MS-DOS QBasic. Then Visual Basic 3, then 5, then misc. custom app scripting languages (SS: Tribes' nostalgia strikes again!). They were there, and these free unixy things, along with broadband, weren't. That doesn't make any of it really good. Now, we have really good options. Having professionally used ASP (VB6, basically), and dicked around with VB.NET (when I look at docs, it's like an an extra verbose C#, but when I use it, it feels far worse, and too much like older VBs), I would still not want anyone to have to ever use them, or anything like them, ever, if possible.
Do you feel like throwing a parade when you're depressed? Really? -Belial
The US political system's primary function is to transfer public funds to influential crony corporations. -Philwelch
User avatar
cerbie
 
Posts: 470
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: GA (USA)

Re: First programming language.... under Windows

Postby You, sir, name? » Sat Nov 07, 2009 2:15 pm UTC

Pesto wrote:In general response to the thread, I know python is very popular for a first language, but I don't know what it's like under Windows. How problematic could the installation be? No harder than most applications? Is there any type of GUI interface for running the python scripts, or is it all command line?


Python installation is pretty straightforward, and there are GUIs of varying quality. It ships with IDLE which is probably enough for a newbie, but there are more advanced editors and IDE-like thingamajigs out there.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
User avatar
You, sir, name?
 
Posts: 1201
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Re: First programming language.... under Windows

Postby Earlz » Sat Nov 07, 2009 6:40 pm UTC

Funny thing to mention Cobol.. thats being taught at my college. Basically how it works is they have only a few real computer science classes(its a 2 year college). They have
1. Computer Applications--- The most pointless waste of time any computer science major will ever have. This is where they say "A screen is called the monitor" and teach you how to use Word and other pointless crap
2. Computer Logic And Algorithms--- This is less of a waste of time, but it still is. Even though it says algorithms, all you are learning is how to make flowcharts(which I don't think will contribute to people being able to program) and boolean logic and set theory.. The set theory bit was actually pretty interesting.. but everytime the teacher says "intersect" I think "and" because I knew about boolean stuff before hand.
3. Introduction To Unix--- This class doesn't have a description so I'm really hoping it's not too dumb.. I'm taking it next semester and I use OpenBSD as my home system so should be a breeze
4. Programming in Cobol
5. Programming in Java
6. Programming in C++
7. Advanced Programming in C++

Now this is how they recommend it. Is for you to take Cobol first then Java then C++ then Advanced C++. Doesn't this seem wrong to anyone else? That you must learn 3 different languages(which all have a learning curve and which all make it so that you talk more about the language than how to actually do anything with programming such as *real* algorithms).. idk..

But yea, so basically they want everyone's first introduction to programming to be in Cobol.. I think there is a reason there aren't many people that stay in computer science there.. (and not in the good way that say Scheme functions as a Weed out class)...


idk.. anyway! back on topic.

My history of programming is:
1. HTML (6th grade)
2. Batch scripts( .BAT) (7th grade)
3. Liberty Basic(very little amount learned though) (7th grade)
4. Dark Basic Pro(actually made a few half useful things with this) (8th grade)
5. PHP
6. C
7. Assembly
8. C++
9. Java (used it only my senior year for the AP test.. haven't touched it since)
10. Delphi (required for work.. I know enough to tell what code does but don't know it very well to writeit..)
11. C# (also required for work.. very fluent now after 4 months)
12. Ruby

I don't think I turned out to be a half bad programmer... Basics don't help much though when you are making the trip to a low level language like C though..

I would recommend against VB though... It's a little more evil than the casual basics..
User avatar
Earlz
Gets Obvious Implications
 
Posts: 555
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA

Re: First programming language.... under Windows

Postby 0xBADFEED » Sat Nov 07, 2009 7:20 pm UTC

Earlz wrote:Now this is how they recommend it. Is for you to take Cobol first then Java then C++ then Advanced C++. Doesn't this seem wrong to anyone else? That you must learn 3 different languages(which all have a learning curve and which all make it so that you talk more about the language than how to actually do anything with programming such as *real* algorithms).. idk..

But yea, so basically they want everyone's first introduction to programming to be in Cobol.. I think there is a reason there aren't many people that stay in computer science there.. (and not in the good way that say Scheme functions as a Weed out class)...

You're not in a computer science program.

This is an Associates of Programming curriculum. Do they actually call this a computer science degree? Most 2-year schools are fairly upfront about the fact that it's more of a trade-focused program, and that it is definitely not a computer science curriculum. Their job, as they see it, is to (hopefully) create entry-level programmers, not computer scientists. COBOL, as unsexy, boring, backward, and old as it might be, still needs programmers. There are huge legacy systems still in use that need regular maintenance. Two year degrees are about getting jobs. The COBOL niche is probably a pretty good bet, as the other 4 year programs aren't going to touch it and it's likely to still be around for a while. Note, there's nothing wrong with these degrees, and in lots of cases they're probably a lot better bang for your buck than a 4-year degree, but they will not give you a CS education.

Actually, I've never heard of a 2-year program offering a computer science degree. If you're bored you should consider transferring to a 4-year CS program.
0xBADFEED
 
Posts: 564
Joined: Mon May 05, 2008 2:14 am UTC

Re: First programming language.... under Windows

Postby cerbie » Sat Nov 07, 2009 8:13 pm UTC

Earlz wrote:Funny thing to mention Cobol.. thats being taught at my college.
It and Fortran refuse to die, I guess. Having fixed T-SQL, ASP, and Javascript (only the most elegant languages in the world, right?) written by a Cobol programmer, as if they could be mapped to Cobol...*shudder* The thought process made sense, after I researched Cobol's workings a bit, but...ew.

But yea, so basically they want everyone's first introduction to programming to be in Cobol.. I think there is a reason there aren't many people that stay in computer science there.. (and not in the good way that say Scheme functions as a Weed out class)...
The thing is, Scheme would weed some people out, educate others (who may minor CS, or go into a hard scientific field), and if you're the right type, is a really fun and challenging language to learn. The only problem I could see, for a complete beginner, self-teaching (IE, this thread's topic), is that it requires and forces high abstraction right off the bat. If you don't yet have a mindset amenable to that, I could see it being an issue.

0xBADFEED wrote:Actually, I've never heard of a 2-year program offering a computer science degree. If you're bored you should consider transferring to a 4-year CS program.
Yo. One of these days, I'll move north a bit, then move on to a BS.
Do you feel like throwing a parade when you're depressed? Really? -Belial
The US political system's primary function is to transfer public funds to influential crony corporations. -Philwelch
User avatar
cerbie
 
Posts: 470
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: GA (USA)

Re: First programming language.... under Windows

Postby Earlz » Sat Nov 07, 2009 8:50 pm UTC

0xBADFEED wrote:
Earlz wrote:Now this is how they recommend it. Is for you to take Cobol first then Java then C++ then Advanced C++. Doesn't this seem wrong to anyone else? That you must learn 3 different languages(which all have a learning curve and which all make it so that you talk more about the language than how to actually do anything with programming such as *real* algorithms).. idk..

But yea, so basically they want everyone's first introduction to programming to be in Cobol.. I think there is a reason there aren't many people that stay in computer science there.. (and not in the good way that say Scheme functions as a Weed out class)...

You're not in a computer science program.

This is an Associates of Programming curriculum. Do they actually call this a computer science degree? Most 2-year schools are fairly upfront about the fact that it's more of a trade-focused program, and that it is definitely not a computer science curriculum. Their job, as they see it, is to (hopefully) create entry-level programmers, not computer scientists. COBOL, as unsexy, boring, backward, and old as it might be, still needs programmers. There are huge legacy systems still in use that need regular maintenance. Two year degrees are about getting jobs. The COBOL niche is probably a pretty good bet, as the other 4 year programs aren't going to touch it and it's likely to still be around for a while. Note, there's nothing wrong with these degrees, and in lots of cases they're probably a lot better bang for your buck than a 4-year degree, but they will not give you a CS education.

Actually, I've never heard of a 2-year program offering a computer science degree. If you're bored you should consider transferring to a 4-year CS program.



Well the degree isn't really focused as a trade but rather as to prepare you to move on to a 4 year college..(which I plan on doing) I would say I'm better off doing just general ed to get basics out of the way but thats basically what I'm doing and with the exception of Cobol I would bet I will encounter similar classes at a 4 year uni and have to take them for my degree.. and I'm not sure I would want a job programming in Cobol.. They would have to pay me a good amount lol.... Maybe rewriting something from Cobol to something else wouldn't be bad though.. I couldn't imagine actually programming in Cobol every day...
User avatar
Earlz
Gets Obvious Implications
 
Posts: 555
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA

Re: First programming language.... under Windows

Postby Pesto » Sun Nov 08, 2009 1:14 am UTC

cerbie wrote:
Pesto wrote:
cerbie wrote:"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - E.W. Dijkstra
The BASIC he was talking about is far worse than VB6 or VB.NET (really, more akin to COBOL), but the heritage is still there, and they are unholy languages.

Hey! :evil:

I cut my teeth programming in BASIC on an Apple IIe, and I turned out just fine. I mean, who does this Dijkstra fellow think he is, anyway, huh? :wink:
...and I on my dad's TRS-80. Then batch files and MS-DOS QBasic. Then Visual Basic 3, then 5, then misc. custom app scripting languages (SS: Tribes' nostalgia strikes again!). They were there, and these free unixy things, along with broadband, weren't. That doesn't make any of it really good. Now, we have really good options. Having professionally used ASP (VB6, basically), and dicked around with VB.NET (when I look at docs, it's like an an extra verbose C#, but when I use it, it feels far worse, and too much like older VBs), I would still not want anyone to have to ever use them, or anything like them, ever, if possible.

I moved from BASIC on the Apple to Qbasic when we upgraded to an "IBM compatible" computer. The next language I learned was C in college.
Sigfault
User avatar
Pesto
 
Posts: 462
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: San Francisco, CA

Re: First programming language.... under Windows

Postby Tirian » Sun Nov 08, 2009 5:57 pm UTC

I don't agree that the BASIC that Dijkstra couldn't teach around is preserved in any implementation from QuickBASIC forward. Structured BASIC is Pascal without pointers, unstructured BASIC was human-readable Assembly with FOR loops. Yes, you can abuse labels in modern BASIC, but you'd have to want to and it's true of every other language that has labels.

I like Python too. The one major problem that IDLE has (which they call a feature for reasons that will never be clear to me) is that they run your script in the same process. So if you run a infinite loop without realizing it, you'll have to restart the whole IDE instead of just terminating your program. Or open up a console window and execute your Python scripts out of that, but that kind of defeats the purpose of having an IDE in the first place.
Tirian
 
Posts: 91
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: First programming language.... under Windows

Postby cerbie » Sun Nov 08, 2009 6:42 pm UTC

Tirian wrote:I don't agree that the BASIC that Dijkstra couldn't teach around is preserved in any implementation from QuickBASIC forward. Structured BASIC is Pascal without pointers, unstructured BASIC was human-readable Assembly with FOR loops. Yes, you can abuse labels in modern BASIC, but you'd have to want to and it's true of every other language that has labels.
True. It's a way to use hyperbole, relative to modern languages. A language built to be easy to learn with minimal mental abstractions (that's the Python, Ruby, etc. exception) introduces complexity barriers to its learners/users. Even adding things like proper OO, VB has been going in the wrong direction for years. It's OK for the people taking crufty stuff from Excel to Access, but what makes it OK for that also makes it a [wildly verbose for no good reason] irritation for general programming.
Do you feel like throwing a parade when you're depressed? Really? -Belial
The US political system's primary function is to transfer public funds to influential crony corporations. -Philwelch
User avatar
cerbie
 
Posts: 470
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: GA (USA)

Re: First programming language.... under Windows

Postby poohat » Mon Nov 09, 2009 4:52 am UTC

I think its better for people to understand non-OO programming and how to structure code before they learn OO, so Java and C# are bad choices for a first language imo (theyre bad for lots of other reasons too).

Python is a decent choice.
User avatar
poohat
 
Posts: 175
Joined: Mon Apr 07, 2008 6:21 am UTC

Re: First programming language.... under Windows

Postby spelunker » Tue Nov 10, 2009 8:13 am UTC

poohat wrote:I think its better for people to understand non-OO programming and how to structure code before they learn OO, so Java and C# are bad choices for a first language imo (theyre bad for lots of other reasons too).


Why? The way I see it, since OOP models after the real world, it makes things a bit quicker to understand. People know what "cars" are, so explaining what a Car object would be like wouldn't be terribly difficult. It has wheels and doors and can drive around. Tada, we just explained properties and methods.

Besides, OOP can teach you to structure your code very logically. Things that are related are naturally grouped together in classes (i.e. a Car class obviously wouldn't be the place to put something like a calculateFlightPath() method).

I do agree with Java and C# being bad first languages, and I also happen to agree with Python being a good first choice, but for a different reason: Python is OO! You can teach them OO concepts with an easy language!

Posi wrote:C# or Java - I'd lean to C# (nicer overall, probably more portable than Java (Mono has GTK and QT, while Java (AFAIK) just has a bad GTK).


What? I'm no Java evangelist by any means, but Java has billed itself as multi-platform since before C# existed. Mono is interesting I guess, but the JVM has been multi-platform from the beginning.

Plus, the way I understand it, Java has a "bad implementation of GTK" because, usually, Swing or AWT can do the job. Now I've never tried to use Swing or AWT outside Windows and OS X, so it could be crappy, I don't know. I've been out of the loop for Swing for a while, and I've heard it's improved quite a bit.

Anyway, either way, like I said earlier, I don't think I'd recommend either of them really to learn programming.
spelunker
 
Posts: 99
Joined: Wed Dec 05, 2007 7:07 am UTC

Re: First programming language.... under Windows

Postby OOPMan » Tue Nov 10, 2009 1:00 pm UTC

Pesto wrote:I'm not going to recommend PHP. Too many security issues to be considered.


Such as?

Seriously, most PHP security issues at this point come down to developers writing shoddy code, not the
language itself. This is a problem that crosses language boundaries. SQL injection is just as possible in
Java as it is in PHP.
Image

Image
User avatar
OOPMan
 
Posts: 284
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: First programming language.... under Windows

Postby You, sir, name? » Tue Nov 10, 2009 1:43 pm UTC

OOPMan wrote:
Pesto wrote:I'm not going to recommend PHP. Too many security issues to be considered.


Such as?

Seriously, most PHP security issues at this point come down to developers writing shoddy code, not the
language itself. This is a problem that crosses language boundaries. SQL injection is just as possible in
Java as it is in PHP.


The code of a programming newbie is by definition going to be shoddy. So a language intended for use on a web server is probably not a very good thing to start with.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
User avatar
You, sir, name?
 
Posts: 1201
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Re: First programming language.... under Windows

Postby OOPMan » Tue Nov 10, 2009 1:44 pm UTC

You, sir, name? wrote:
OOPMan wrote:
Pesto wrote:I'm not going to recommend PHP. Too many security issues to be considered.


Such as?

Seriously, most PHP security issues at this point come down to developers writing shoddy code, not the
language itself. This is a problem that crosses language boundaries. SQL injection is just as possible in
Java as it is in PHP.


The code of a programming newbie is by definition going to be shoddy. So a language intended for use on a web server is probably not a very good thing to start with.


Good Point.

Python, get your slinky arse in here!
Image

Image
User avatar
OOPMan
 
Posts: 284
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: First programming language.... under Windows

Postby Pesto » Tue Nov 10, 2009 6:37 pm UTC

Honestly, I hate to say this, but I don't know if my friend should ever go anywhere near PHP. I don't think he has the mentality to deal with security issues.
Sigfault
User avatar
Pesto
 
Posts: 462
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: San Francisco, CA

Re: First programming language.... under Windows

Postby Posi » Tue Nov 10, 2009 7:11 pm UTC

spelunker wrote:
Posi wrote:C# or Java - I'd lean to C# (nicer overall, probably more portable than Java (Mono has GTK and QT, while Java (AFAIK) just has a bad GTK).


What? I'm no Java evangelist by any means, but Java has billed itself as multi-platform since before C# existed. Mono is interesting I guess, but the JVM has been multi-platform from the beginning.

Plus, the way I understand it, Java has a "bad implementation of GTK" because, usually, Swing or AWT can do the job. Now I've never tried to use Swing or AWT outside Windows and OS X, so it could be crappy, I don't know. I've been out of the loop for Swing for a while, and I've heard it's improved quite a bit.

Anyway, either way, like I said earlier, I don't think I'd recommend either of them really to learn programming.

Well, the portability problem with Java was mostly license issues (ie Linux distros didnt provide it by default), and when C# came around the community worked up Mono that worked a whole lot better than Java did on Linux. Java was there first, but C# was in allot better shape when it got there. People didn't want to code for Java on Linux because it wasn't something that was included out of the box. Mono was includable in the box, and it built up good GTK/Gnome support off the bat. Then it got Qt support and is now a first class citizen in the KDE project as well as Gnome. Java just doesn't offer that yet.

Swing and AWT sucked. Besides looking grossly out of place, they also imploded on compositing desktops (at least when I learned it). SWT, which Eclipse uses, works a whole lot better but still is noticeably different (mostly font rendering) from GTK in look.

So while Java code is technically portable, C# is the better choice if you want to switch platforms. Both work, but all the good stuff works with C# and not Java.

(I know this post completely ignores OSX, and I am fine with that)
Posi
 
Posts: 58
Joined: Mon Jul 16, 2007 6:08 am UTC

Re: First programming language.... under Windows

Postby spelunker » Tue Nov 10, 2009 11:03 pm UTC

Posi wrote:
spelunker wrote:
Posi wrote:C# or Java - I'd lean to C# (nicer overall, probably more portable than Java (Mono has GTK and QT, while Java (AFAIK) just has a bad GTK).


What? I'm no Java evangelist by any means, but Java has billed itself as multi-platform since before C# existed. Mono is interesting I guess, but the JVM has been multi-platform from the beginning.

Plus, the way I understand it, Java has a "bad implementation of GTK" because, usually, Swing or AWT can do the job. Now I've never tried to use Swing or AWT outside Windows and OS X, so it could be crappy, I don't know. I've been out of the loop for Swing for a while, and I've heard it's improved quite a bit.

Anyway, either way, like I said earlier, I don't think I'd recommend either of them really to learn programming.


Well, the portability problem with Java was mostly license issues (ie Linux distros didnt provide it by default), and when C# came around the community worked up Mono that worked a whole lot better than Java did on Linux. Java was there first, but C# was in allot better shape when it got there. People didn't want to code for Java on Linux because it wasn't something that was included out of the box. Mono was includable in the box, and it built up good GTK/Gnome support off the bat. Then it got Qt support and is now a first class citizen in the KDE project as well as Gnome. Java just doesn't offer that yet.

Swing and AWT sucked. Besides looking grossly out of place, they also imploded on compositing desktops (at least when I learned it). SWT, which Eclipse uses, works a whole lot better but still is noticeably different (mostly font rendering) from GTK in look.

So while Java code is technically portable, C# is the better choice if you want to switch platforms. Both work, but all the good stuff works with C# and not Java.

(I know this post completely ignores OSX, and I am fine with that)


Okay, so by more portable you mean "works well on Linux".


As far as Swing and AWT goes, it looks like jdk 1.6 is trying to improve on that. (Man, that website is slow...)
spelunker
 
Posts: 99
Joined: Wed Dec 05, 2007 7:07 am UTC

Re: First programming language.... under Windows

Postby Earlz » Wed Nov 11, 2009 5:20 am UTC

spelunker wrote:<snip>

Okay, so by more portable you mean "works well on Linux".


As far as Swing and AWT goes, it looks like jdk 1.6 is trying to improve on that. (Man, that website is slow...)


Um, I would say "works well on non-windows platforms". Mono works fine on OpenBSD(a unix type system that isn't linux, and is related to Mac OSX's kernel by NetBSD) and is more lightweight than Java... I think the jre license was rewritten or something I guess because there is now a jre package available, but I remember it use to be illegal to distribute a precompiled package of Java that wasn't distributed by Sun themselves.

Swing and all that is extremely ugly though. It doesn't match the way a desktop looks at all. Where as GTK at least can look like whatever platform it is on.

Plus with Mono you can get more decent languages than Java(including Ruby and Python as of late)
User avatar
Earlz
Gets Obvious Implications
 
Posts: 555
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA

Re: First programming language.... under Windows

Postby spelunker » Wed Nov 11, 2009 8:19 am UTC

Earlz wrote:Um, I would say "works well on non-windows platforms". Mono works fine on OpenBSD(a unix type system that isn't linux, and is related to Mac OSX's kernel by NetBSD) and is more lightweight than Java... I think the jre license was rewritten or something I guess because there is now a jre package available, but I remember it use to be illegal to distribute a precompiled package of Java that wasn't distributed by Sun themselves.

Swing and all that is extremely ugly though. It doesn't match the way a desktop looks at all. Where as GTK at least can look like whatever platform it is on.

Java works fine on my computer, a Macbook Pro.

I agree about Swing, but like I said, it appears to be improving. Again, the OSX version of Swing seems pretty close to the native look and feel.

Plus with Mono you can get more decent languages than Java(including Ruby and Python as of late)

Yes, and Java has Jython and JRuby, as well as others like Groovy and way awesome Clojure (which apparently is running on the CLR too).

Okay, I can see we're starting to derail this thread into a C# vs. Java debate, so I guess I'm done.

I'm actually teaching myself some C# now, to make myself more marketable... it's surprising how similar the two languages can be.
spelunker
 
Posts: 99
Joined: Wed Dec 05, 2007 7:07 am UTC

Re: First programming language.... under Windows

Postby OOPMan » Thu Nov 12, 2009 8:50 am UTC

spelunker wrote:I'm actually teaching myself some C# now, to make myself more marketable... it's surprising how similar the two languages can be.


Yep, C# = M$ Java
Image

Image
User avatar
OOPMan
 
Posts: 284
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: First programming language.... under Windows

Postby poohat » Thu Nov 12, 2009 10:54 am UTC

spelunker wrote:
poohat wrote:I think its better for people to understand non-OO programming and how to structure code before they learn OO, so Java and C# are bad choices for a first language imo (theyre bad for lots of other reasons too).


Why? The way I see it, since OOP models after the real world, it makes things a bit quicker to understand. People know what "cars" are, so explaining what a Car object would be like wouldn't be terribly difficult. It has wheels and doors and can drive around. Tada, we just explained properties and methods.
OO is just data structures that support inheritence and polymorphism. I think it makes a lot more sense to teach students the basics of structuring programs, and then later introduce the idea of inheritance once students understand the basics of how to create and manipulate data structures and suchlike

I think youre slightly confused; theres nothing specifically OO about having a 'Car' structure. This is just a basic example of an Abstract Data Type, which youre going to use in every language, even ones which arent OO. OO isnt about having 'Car' structures, its about having method inheritance and some kind of polymorphic dispatch. These are more compilcated than basic ADTs, so it makes sense to teach ADTs first in a non OO setting.

In fact I think your post is an excellent example of why people shouldnt learn OO first - it leads to people confusing the specific Smalltalk(/Java) way of implementing OO (objects 'owning' methods) with Abstract Data Types in general, which just makes learning non-OO languages confusing. Its important to understand that (eg) structs in C are basically the same as objects in Java except that you cant have inheritance relations, and that OO isnt some kind of amazing paradigm that radically changes the way code is structured.
User avatar
poohat
 
Posts: 175
Joined: Mon Apr 07, 2008 6:21 am UTC

Re: First programming language.... under Windows

Postby Earlz » Thu Nov 12, 2009 6:47 pm UTC

poohat wrote:
spelunker wrote:and that OO isnt some kind of amazing paradigm that radically changes the way code is structured.


This is true, but not true.

Having a strict OO language such as Java forces you into a certain way of structuring code. Sure you could go the non-standard and ugly non-OO/Java way.. but you won't because it's easier to just follow Javas stupid restrictions.

And it doesn't take an OO language to have a OO structured program. iirc the X windowing system is completely OO structured, but written in C(which provides for some... entertaining code)
User avatar
Earlz
Gets Obvious Implications
 
Posts: 555
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA

Re: First programming language.... under Windows

Postby spelunker » Thu Nov 12, 2009 8:16 pm UTC

Okay, poohat, so you're telling me teaching a high schooler abstract data types is a better idea than just using object oriented programming?

poohat wrote:OO is just data structures that support inheritence and polymorphism. I think it makes a lot more sense to teach students the basics of structuring programs, and then later introduce the idea of inheritance once students understand the basics of how to create and manipulate data structures and suchlike

OOP also enables things like dynamic typing and member functions, which I don't believe structs can do.

poohat wrote:I think youre slightly confused; theres nothing specifically OO about having a 'Car' structure. This is just a basic example of an Abstract Data Type, which youre going to use in every language, even ones which arent OO. OO isnt about having 'Car' structures, its about having method inheritance and some kind of polymorphic dispatch. These are more compilcated than basic ADTs, so it makes sense to teach ADTs first in a non OO setting.

Is inheritance really that hard of a concept? Poylmorphism might be a *bit* more complicated, but not by that much. I think you're underestimating first-time programmers.

poohat wrote:In fact I think your post is an excellent example of why people shouldnt learn OO first - it leads to people confusing the specific Smalltalk(/Java) way of implementing OO (objects 'owning' methods) with Abstract Data Types in general, which just makes learning non-OO languages confusing.

Yes, I have confused OO types with structs; besides you explaining it, I also discovered this recently when doing some Objective-C programming, which forced me to learn some C for the first time. But who cares if I confused them? Things straightened out fine when I was forced to look into how to use C structs.

Conversely, I could imagine people getting confused the other way too, moving from C structs to something like Java objects or something even more exotic like OCaml or Smalltalk. So, what do we do now? Not teach them either methodology? Go learn Haskell instead?

I also agree with Earlz: OOP leads to more organized and reusable code, which, apparently, wasn't necessarily the case before it was used.
spelunker
 
Posts: 99
Joined: Wed Dec 05, 2007 7:07 am UTC

Re: First programming language.... under Windows

Postby You, sir, name? » Thu Nov 12, 2009 8:22 pm UTC

spelunker wrote:
poohat wrote:OO is just data structures that support inheritence and polymorphism. I think it makes a lot more sense to teach students the basics of structuring programs, and then later introduce the idea of inheritance once students understand the basics of how to create and manipulate data structures and suchlike

OOP also enables things like dynamic typing and member functions, which I don't believe structs can do.


Actually, you can do that and more with structs (with base pointer equivalence and function pointers), but they lack the syntactic sugar to make it anything other than painful.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
User avatar
You, sir, name?
 
Posts: 1201
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Next

Return to Coding

Who is online

Users browsing this forum: TNorthover and 4 guests