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-07 7:16
Procedural: C
Object Oriented: C# or Java
Functional: Haskell
>>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.