My 20 year old brother wants to get into programming. I want to set him up with a language that has these features:
1. Easy to learn, must have simple syntax
2. Immediate results, easy to make graphical and text outputs.
3. Fully featured language(I want him to be able to easily progress into more advanced stuff and not be limited by the language)
4. Fast(So he gets the idea of how powerful computers are)
Name:
Anonymous2009-03-06 16:48
Scheme sounds perfect for you. You may also want to read this book on the conceptual basis to programming. http://mitpress.mit.edu/sicp/
Name:
Anonymous2009-03-06 16:48
Ruby
Name:
Anonymous2009-03-06 16:50
I hate to say it, but Java would be good fit for what you want. Of course it's not as fast as native, but someone new to programming won't care, it will just seem really fast to them regardless of the language.
Set him up with a minimalist IDE like JBuilder, and set it up to do java applets. That will give you easy graphics right away.
Name:
Anonymous2009-03-06 16:58
>>4
Java is a terrible language to start with. It's stupidly verbose, and the API is inconsistent.
Scheme might be a decent choice if not for the heavy emphasis on recursion, which is a really hard concept to grasp at first. Ruby is fairly decent as long as you completely ignore Rails.
Name:
Anonymous2009-03-06 17:00
My 2 year old brother wants to get into programming. I want to set him up with a language that has these features:
1. Easy to learn, must have simple syntax
2. Immediate results, easy to make graphical and text outputs.
3. Fully featured language(I want him to be able to easily progress into more advanced stuff and not be limited by the language)
4. Fast(So he gets the idea of how powerful computers are)
Name:
Anonymous2009-03-06 17:12
>>4
OP here, yea I was thinking about java. It has the bonus of being a C-derivative so its good to jump off to the other mainstream languages if he finds some of java's most annoying parts too annoying. >>2 >>5
Scheme?? I hope you guys are trolling. Scheme might be good for first year MIT student prodigies but it doesn't meet the criteria I listed.
Scheme?? I hope you guys are trolling. Scheme might be good for first year MIT student prodigies but it doesn't meet the criteria I listed.
It does, however, match Criteria 1
Name:
Anonymous2009-03-06 17:21
>>7
Are you a fucking idiot? How can you possibly think Java has a "simple + easy to learn syntax"? Think about the "everything is a class" mentality, why? What does static mean? What is boxing / unboxing? What's the difference between int and Integer? What's the difference between abstract classes and interfaces?
Java is the absolute worst choice for a first language.
Name:
Anonymous2009-03-06 17:23
Java is the absolute worst choice for a first language.
What about visual basic? Although, that may be suitable for him in this case *shudders*
Name:
Anonymous2009-03-06 17:35
I'M THE SUSSMAN
SON OF A BITCH JAVA
JAVA IS PIG
DO YOU WANT CRAPPY LANGUAGE?
DO YOU WANT OVERENGINEERING?
JAVA IS PIG DISGUSTING
GUY L. STEELE IS A TRAITOR
FUCKING ENTERPRISE
Java is an excellent first language. My first language was Java and now I am an EXPERT PROGRAMMER.
Name:
Anonymous2009-03-06 20:04
VB.NET
Name:
Anonymous2009-03-06 20:12
>>1
I read the subject as What the a good first language?
And the answer is Lisp, of course. Amusingly, Lisp is also a good first language. Meets all your criteria, as well as criteria you were too dumb to include.
Name:
Anonymous2009-03-06 20:13
>>18
Or rather, "What is the first good language?"
My advice is do something better with your life. And make sure you get laid a lot.
Name:
Anonymous2009-03-06 21:11
Assembly, you bunch of homos you.
Name:
Anonymous2009-03-06 21:25
>>7 1. Easy to learn, must have simple syntax
Scheme. 2. Immediate results, easy to make graphical and text outputs. https://code.launchpad.net/~derick-eddington/ikarus-libraries/gtk http://elvis.rowan.edu/~nlt/interpreters.html 3. Fully featured language(I want him to be able to easily progress into more advanced stuff and not be limited by the language)
Scheme.
>4. Fast(So he gets the idea of how powerful computers are)
This is so vague that it's meaningless. You need to reword this requirement if it's supposed to mean something.
I started with Scheme at 10 with my older brother. I can assure you, I am no prodigy.
Name:
Anonymous2009-03-06 21:37
>>22
Will getting ``laid'' bring me the same kind of happiness writing a recursive fibonacci brings me?
>>1
Let me guess, you would also like it to have world-destruction capability and also sharks with frickin' laser beams.
Look here, every single thing you do in computing involves a tradeoff. You sacrifice ease of use, speed, memory, or processor time in every single programming-related scenario. There is no single solution that fits all problems and if there is, it's bloated and probably slow as a tradeoff.
I'll address each with the best candidates (in my crappy opinion as someone who hasn't used many different languages).
1. Easy to learn, must have simple syntax
What do you mean by "simple syntax"? Does this mean dynamic typing, the use of English where characters normally are, etc.?
Visual Basic and any number of scripting languages such as Python, Ruby, mIRCscript, etc. fall into this category. Chances are that you don't want to mess with academia languages like Haskell and Lisp simply because they require you to think differently about problems, and that's not what you're looking for.
2. Immediate results, easy to make graphical and text outputs.
Any language worth its salt can easily produce textual output. The Visual line of products from Microsoft also offers relatively effective ways to design GUIs. Java also has GUI capability.
3. Fully featured language(I want him to be able to easily progress into more advanced stuff and not be limited by the language)
This sounds more like a scripting language. Python has an extremely vast number of libraries and existing code to do almost any generic function, and I assume that Ruby and others do as well. Progressing into more advanced stuff is slightly more difficult with Java or C#, and extremely difficult in languages like C++.
4. Fast(So he gets the idea of how powerful computers are)
No scripting languages. Lua is one of the fastest scripted languages there is and it's still fuckslow compared to any remotely binary language, even Java. On any processor of worth, you probably won't notice a difference without an intensive task, however. Assembly is going to get your tasks done in the fastest time possible, period. C++ can be optimized to do pretty well too. Anything else is in between the two extremes.
Overall, it sounds to me like you're interested in a scripting language, so try Ruby, Python, mIRCscript, Lua, etc.
Name:
Anonymous2009-03-06 22:01
How about Adobe Flex using ActionScript technology
>>10
All of those examples of ``why java SUQS" aren't hard to comprehend at all.
Java is good, start him with a simple IDE
Name:
Anonymous2009-03-07 1:03
>>29
Yeah, they're not hard to comprehend for somebody who's been programming for decades.
Name:
Anonymous2009-03-07 1:15
Spanish, then work your way up to Chinese.
English is overrated.
Name:
Anonymous2009-03-07 3:22
>>26
This is why java would be a good choice. 1) simple syntax.
Uses standard C syntax for arithmetic, assignment, loops and functions.
Standard OO features, all objects are created with new and used with '.'
(I just described the important parts of java syntax, the only other commonly used features are generics, interfaces,exceptions and enums).
2) immediate results.
just extend an applet, let your IDE auto generate functions. And you have a paint function with a Graphics handle you can use to draw. For instance to draw a red rectangle:
g.setColor(Color.RED);
g.drawRect(0,0,100,100);
3) fully featured
Since the java api is all object oriented all you have to do is pick the object you want and look at its docs to find out what the methods do. Its very easy to use the advanced features, which is what makes people hate java so much. It takes the "hard" out of programming, which in a field where arrogance and pissing contests are so common, doing things the easy way is looked down on. Why use printf when you can code a 50 line assembly program to print a number.
Fast(So he gets the idea of how powerful computers are) >>26
I know you are retarded here because I guarantee any hand coded assembly here of any non-trivial length will run slower than -O3 optimized C++ code. Even if you are super-gosu the optimizations that compilers do these day are too computationally expensive for a human to replicate and beat.
That said Java is plenty fast for any newbies purposes.
Name:
Anonymous2009-03-07 3:27
I would say Python for definite, but Ruby has the benefit of _why's introductory stuff like Shoes (http://shoooes.net/) and HacketyHack
Name:
Anonymous2009-03-07 3:34
_why is the only good thing about Ruby.
Name:
Anonymous2009-03-07 4:01
How could syntax be simpler than Lisp's? Especially if you omit all the metasyntax; that sort of stuff will probably just confuse beginners anyway. Parenthesis means call a function, make sure they match, and use an apostrophe when you don't want to do a function call, or to refer to a variable name rather than the value. That's all you need to know to get started.
There are several good Lisp/Scheme graphics libraries, and any damn programming language can do text. It's certainly fully-featured, and has a lot of features that most so-called "modern" languages lack. For example, (/ 5 4 (* 3 2)) produces 5/24. What other languages named in this thread have built-in support for rational arithmetic? And really, that's pretty basic shit.
Typical Lisp/Scheme implementations have excellent interactive support, typically greatly exceeding what other languages have to offer. Python programmers like to babble about how you can type dir() and help() and so on, but can you debug, step through code, or trace function execution? Hell no. In Python you can't even set a damn breakpoint without typing a bunch of esoteric undocumented shit. Lisp's got everything else beat by a mile.
Lisp code is certainly fast, too. Many high-demand applications use it as an extension language, because it can keep up. It's plenty fast enough to handle AutoCAD, sound processing effects for Audacity, and speech synthesis with Festival, to name just a couple programs. Python and Ruby would choke and die if given the huge volumes of data that these programs need to churn through. Java could handle it... if you had 20 gigs of RAM.
Name:
Anonymous2009-03-07 4:20
>>35
Shut up lisp weeny, you are wrong and your language will never be popular, suck it.
(/ 5 4 (* 3 2)) produces 5/24 is not rational arithmetic. A rational language would call syntax error on this bullshit because any language where infix notation isn't the default is retarded. Notice I said not the default so that you couldn't respond with ZOMG MACROS.
I think that starting with C/C++ is probably the best way to go. It's portably low-level, so you get a good understanding of how expensive something is. For example, because I know what pointers are, I understand that "reference types" in Java/C# are really just pointers, albeit with a bit more overhead, and that "primitives" are really just builtin machine primitives.
Another possibility is Haskell. It has little syntax, and its layout syntax is like Python's on steroids. Of course, it's hard to quickly do something in Haskell, so it might get frustrating.
Name:
Anonymous2009-03-07 4:56
>>36
Some words have multiple definitions, feel free to use whichever one you like.
>>32
I have thought about it and you are correct, sir. I was retarded on that single point of Assembly being faster than compiler-optimized C++ for non-trivial applications.
However, I imagine that most of the beginner applications his brother will write at first are trivial.
Chances are that he won't see the difference in speed between even the slowest scripting language and C++, though, without intensive processing. Java would be a fair choice.
>>50
You are still wrong. Hand coded assembly for trivial programs will still be slower than optimized c/c++ if the assembly is written by a non-expert assembly programmer. You obviously know very little about assembly or compiler optimization.
I'm not >>50 but something tells me you haven't coded much in assembly. I've seen plenty of x86 asm apps which are faster than their C equivalent(not to mention that not all optimizing compilers are created equal, and that it's always possible to make a better optimizing compiler), and in most cases can code something faster than what my compiler produced for a piece of C code (It's rarely worth my time for me to be wasting time hand optimizing something in asm unless it's truly time critical). Here's another example: have your compiler generate the assembly for some complex computationally expensive function, then just try to see what you can optimize in the generated code, in many cases you'll find out you could rewrite certain code to be much faster than the code your compiler generated, this is because a human who can think in the context of the code and knows his asm can almost always find better way to solve a specific problem, unlike a compiler whose algos are designed to generate code which works commonly faster in generic cases.
Name:
Anonymous2009-03-07 14:03
>>56-57
Good optimizing JITs for JavaScript (eg TraceMonkey) are actually faster than hand-coded assembly for nearly all purposes.
Name:
Anonymous2009-03-07 14:04
Anyways, >>57, please listen to me. Not that it's really related to this thread. I went to /prog a while ago; you know, world4ch? Well anyways there were an insane number of Haskell programmers in there, and I couldn't post. Then, I googled for the Haskell homepage, and it had "PURELY FUNCTIONAL PROGRAMMING LANGUAGE" written on it. Oh, the stupidity. Those idiots. You don't use a programming language just because it s purely functional, fool. It's only referential transparency, FORCED NO SIDE EFFECTS for crying out loud. There're even companies using it. Company of 400 employees, all downloading some Haskell compiler, huh? How fucking nice. Alright, my manager's gonna use Haskell for the whole project. God I can't bear to watch. You people, I'll give you a damn purely functional language for FREE if you stop fagging up my /prog. /prog should be a bloody place. The tense atmosphere, where two guys on opposite sides of an open discussion can start a fight over VIM vs Emacs at any time, the stab-or-be-stabbed mentality, that's what's great about this place. Haskell fags should screw off and stay home. Anyways, I was about to discuss dynamic typing, and then the bastard beside me goes programming, with Haskell. Who in the world uses Haskell, you moron? I want to ask him, do you REALLY want to use Haskell? I want to interrogate him. I want to interrogate him for roughly an hour. Are you sure you don't just want to try saying Haskell? Coming from a expert programmer such as myself, the latest trend among us vets is this, multi-paradigm languages. That's right, multi-paradigm languages. This is the vet's way of programming. Multi-paradigm languages means more functionality than fappage. But on the other hand the theoretical correctness is a tad lower. This is the key. And then, it's powerful. This is unbeatable. However, if you try this then there is danger that you'll be marked by trolls from next time on; it s a double-edged sword. I can't recommend it to amateurs. What this all really means, though, is that you, >>57, should just stick with today's special.
I always recommend starting from the bottom and going up if you're going to learn to program. This includes learning all of the following before learning a single programming language:
- Digital Data
- Combinatorial and Sequential Logic
- Basic Computer Architecture
After that, start with writing asm for a simple CPU like the Z80, to get accustomed to how a computer actually works. Only then should you move onto high(er) level languages, preferably starting with C; understanding how a compiler just performs a translation from the high-level language to asm equivalents is particularly important. Then, OOP can be introduced to show how certain problems can be solved easily with it, and how e.g. C++ objects can translate to C.
Those who want more theoretical, mathematical stuff may want to try the...
SATORI ROUTE:
- 6.001 lectures and SICP
- Haskell
- Prolog
- Theory of Computation
Name:
Anonymous2009-03-07 23:34
>>71
Starting at the top is better. Starting at the bottom entails learning habits and skills that don't apply to actual development. The student is then left cold by (relatively) complicated languages, reasoning that they were doing just fine in assembly/C/Sepples. Learning only high-level languages is problematic as well, but in this case low-level knowledge comes as an answer to the inevitable question, "How do I make this efficient enough for my purposes?" Now the student understands and values both ends of the spectrum.
After learning both the circuitry and architecture of microprocessors and computers, and high level languages, I don't agree with this sentiment. When working with a language such as C, it can be useful to understand what is actually happening as it goes from C to Assembly to machine code to the microprocessor, but it isn't necessary for many projects. Also, Assembly Language doesn't have much use when working with computers except for specific tasks. Also, most compilers will take your C code and make it faster than anything you could ever write in assembly.
I think for someone who is doing it out of mere interest it would be better to understand a lower level language such as C and then moving to a higher level language such as C#. Once you understand these two languages it is easy to pickup an imperative language as you need it, and with these two languages you can manage to do a lot.
Name:
Anonymous2009-03-08 1:57
>>38
You're absolutely correct. I hope you realize that my first language was C++ and now I'm a ZEALOUS NERD.
For CISC processors, hand-written Assembly can easily be more efficient than compiled C code, but such an occurance is considerably more difficult even in the hands of an EXPERT PROGRAMMER on a RISC machine - of course, CISC is an obsolete abomination which should have been dead long before, but thanks to the efficiency of free markets and people buying marketing bullshit, we have crap like this.
Name:
Anonymous2009-03-08 14:15
but thanks to the efficiency of free markets and people buying marketing bullshit, we have crap like this.
wat
Name:
Anonymous2009-03-08 14:17
Python. The only problem is that it is a bit slow (compared to C, for example). Yeah, go Python, he'll have results quickly.
>>83
Oh, look, an American! You can tell by the lack of capitalisation, and the irrational belief in the benefits of taking a naive market model far beyond the conditions where it has been shown to apply.
Also, >>84, surely a quintessential example of naïveté is the belief that a few planners can make more efficient large-scale decisions than millions of individuals pursuing their separate interests