Best language for n00bs

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Mon Mar 09, 2009 11:20 pm UTC

I didn't mean anything bad about Python (it's in my list of languages to learn second) but even if you work in a language like Python you should still understand C if you're serious about being a programmer. For instance, I have full confidence that you'd be able to do a simple freshman C task like reversing a linked list with no real difficulty even though you've been working in Python for seven years :)
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

Sonic
Posts: 2
Joined: Wed Apr 23, 2008 10:11 pm UTC

Re: Best language for n00bs

Postby Sonic » Tue Mar 10, 2009 3:57 am UTC

Excuse me but I find the whole "being a serious programmer" pretty ridiculous. What is that supposed to mean? Are you not learning to code when writing Python? What's a low enough level to be considered serious programming? C++, C, Assembly, machine code, writing machine code on a hard drive with a magnetic needle?.

I like Python for teaching because it is clear. There are, however, three things which I kind of hate about it, though. First, it's really slow, even for an interpreted language. That's not actually a problem with Python but with its implementation, but still I think it could use more work. The second and third thing that I dislike is the use of whitespace and dynamic typing. They do make the code easier to type and understand, but they introduce runtime error instead of compile time errors, which are ten times easier to debug. I still find Python really useful not as an introduction to programming but to algorithms and data structures at an academic level.

As far as learning to code strictly for working and getting paid, I'd say either Java or C#. Their object system is sound, the standard class libraries are vast and useful, they have a good userbase and are two of the most asked-for languages in the industry. The choice between the two would boil down to what you would actually prefer to be coding. The way I see it Java struggles to take the desktop applications market, which is where .NET shines, but still they are similar enough so making the switch from one to the other is trivial. You can't go wrong with either one of them.

In my opinion, C / C++ are not worth learning unless you develop embedded systems, require real-time code (which a managed environment won't acomplish) or need to write extremely time critical libraries. Other than the "learn them to know how the computer works and be a real programmer" crap, they are old and outdated, (understandably) full of hacks and patches and much more dificult to code in for a neglegible gain (again, on non performance critical software, which could very well be 99% of all existing PC software). Newer, fully OOP languages are better suit for today's needs in today's hardware, and with JIT compilation and the very complex virtual machines performing runtime optimizations the performance hit is not that big. So, as you can see, I'm fully sold on managed environments, and I really believe C++ and unmanaged code for computer applications are a thing of the past. Not coding, but mantaining a large piece of software in C++ is very costly and time consuming. Learning something as C to gain better understanding of what's going on "under the hood" and then moving on to something else, probably OO, seems moronic to me. Most of the times the average programmer needs not to know exactly what is going on (that's what hardware abstraction and a virtual machine are good for), and if she ever does need to, the higher level languages can very much provide all the information and understanding required.

Summing up. Academic: Python and Smalltalk. Work: Java or C#

my two cents, and also my first post. Hope it makes sense.

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: Best language for n00bs

Postby Emu* » Tue Mar 10, 2009 11:06 am UTC

Smalltalk? ewww.

It's covered in one of my current modules, and Squeak generates a vast about of hate in me.
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

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

Re: Best language for n00bs

Postby OOPMan » Tue Mar 10, 2009 12:03 pm UTC

Sonic wrote:stuff


Jon "maddog" Hall says it better than I can here

Read his little article to get an idea as to why learning things like assembler and C is a good thing.
Image

Image

Sonic
Posts: 2
Joined: Wed Apr 23, 2008 10:11 pm UTC

Re: Best language for n00bs

Postby Sonic » Tue Mar 10, 2009 12:52 pm UTC

I do not agree with him, but that's for another time. Still he says "This is why I object to colleges and universities who feel that high-level languages, such as Java (or Python, or PHP, or you name it) are the only languages worth teaching, and that machine and assembly languages are not worth teaching to students. " And C is clearly closer to the high-level languages in this regard, as by learning it you still are "at the mercy of others". (You still are at the mercy of the computer's architecture with his 1's and 0's.) Besides, I did not dispute the fact that it may be useful in some situations to actually know C or C++, but definitely not for the novice programmer. Hell, maybe not even for most average programmers out there.

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Tue Mar 10, 2009 1:45 pm UTC

One thing I should have added is that one of the languages to learn second should also be some type of assembly. Unless you're an EE or embedded developer I wouldn't write too much assembly, but you should have some conception of it.

As for "managed code"—pray tell, what language is the OS that runs your managed code written in? What language is the JVM written in? If you're a web developer, what language is your web server written in? What happens if you want to write or maintain anything like that?

If you're serious about being a programmer, you don't want to limit your options, and training yourself to only code within the padded room that interpreted, managed-code, and VM languages give you is a sure way to limit your options. If you want to limit yourself to being a C#/Java code monkey that's one thing. Go get your IS degree and leave me in peace. But you're not the intended audience I'm trying to talk to. I'm trying to talk to people who want to be *good* programmers.
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Best language for n00bs

Postby 0xBADFEED » Tue Mar 10, 2009 1:53 pm UTC

Sonic wrote:I do not agree with him, but that's for another time.
...snip...
Besides, I did not dispute the fact that it may be useful in some situations to actually know C or C++, but definitely not for the novice programmer. Hell, maybe not even for most average programmers out there.

All programmers should know C fundamentals. If you don't understand how C works you don't understand how memory or works or how your applications are executed.

Even if all you ever do is program in Java, guess what, the JVM is implemented in C. If you need to integrate with a legacy library you'll be writing some C and using the JNI. If you know C/C++ you can basically do anything. That's why it's useful. It is the common denominator language. Regardless of what you are doing, if you do it long enough, you'll probably have a need for some C.

Maybe "average programmers" don't have a need for C. But who wants to be an "average" programmer?

I want to be a superior programmer. So I learn any language I can when I have time to. If you're content with being an average programmer that's fine.

The real question is "Do you know C?"

Sonic
Posts: 2
Joined: Wed Apr 23, 2008 10:11 pm UTC

Re: Best language for n00bs

Postby Sonic » Tue Mar 10, 2009 2:20 pm UTC

Me? yes. My background is in EE so almost all code I write is in C or asm. But that's not the point. The point is "which is the best language for learning how to code". C is definitely not the answer. You are right most VMs are implemented in C, but what percentage of programmers work implementing VMs as opposed to the percentage of programmers who actually work in pre exsting ones? You can go dig up C when you need it (as I already said before) but learning with it is a completely different story. There's a lot of stuff that you're gonna have to unlearn anyway.

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Tue Mar 10, 2009 2:41 pm UTC

There's learning how to code as a hobby (in which case sure, go learn some Python or something) but then there's learning how to code as a profession.

Going from C to other languages, there isn't really anything you have to unlearn. C concepts like scope, type, sequence, selection, iteration, the call stack, and even the syntax will carry you along in most other languages.

There's a difference between programming as a hobby or as part of your job, and being a professional programmer. Being a professional programmer means understanding how the computer works, and the computer works in C.

C is a good starting language because it's simple, roughly high-level, and procedural. Object-oriented programming is something you can put off—any idiot can figure that out once they know procedural programming, and in any case, procedural programming is way more intuitive for beginning programmers. The only real mental leap in C is pointers, not that pointers are easy, but you can go pretty far in C before having to use them. By the time you get to pointers in C, it's time to learn something useful—and pointers are not only as important as OOP, but they're pretty essential to knowing how OOP even works in many cases (for instance: vtables in C++).
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

User avatar
HawkDesigns
Posts: 37
Joined: Mon Mar 09, 2009 2:53 am UTC
Contact:

Re: Best language for n00bs

Postby HawkDesigns » Tue Mar 10, 2009 10:29 pm UTC

English.
Spoiler:
Image
^Clicky clicky^

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Tue Mar 10, 2009 10:39 pm UTC

HawkDesigns wrote:English.

This is actually I good point, I hear that this is the most important language for a programmer.
Image

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: Best language for n00bs

Postby Emu* » Tue Mar 10, 2009 11:20 pm UTC

It's all very well being a demon code warrior, but if your colleagues are scared of starting a conversation with you, there's a big problem to be dealt with...
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Tue Mar 10, 2009 11:28 pm UTC

Yeah, I hear the specifications, documentation, help guides, and books for all the other languages are written in English, so English is a good one to start with.

Especially, as it happens, if you don't already speak English. Because seriously, "for", "while", "if", and so forth are all English words. And because all the books are written in English.

Here's an interview where Linus talks about the fact that he comments his code in English because he wouldn't think to use any other language with computing. That's just him, though. (Also, amusingly enough, the only programming language he claims to be fluent in is C.)
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Best language for n00bs

Postby Berengal » Wed Mar 11, 2009 4:27 am UTC

I too code in english, and at the company I work at as an intern, all code is in english as well as anything involving code, from comments to specifications. Even our conversations have a non-trivial amount of english in them when we're talking about code, and not just all technical cody terms either.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

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

Re: Best language for n00bs

Postby OOPMan » Wed Mar 11, 2009 7:26 am UTC

Hmmmmm, all this has reminded me that my own C is extemely rusty :-( I think perhaps it's time to do some actual C coding :-)
Image

Image

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Wed Mar 11, 2009 3:55 pm UTC

Berengal wrote:I too code in english, and at the company I work at as an intern, all code is in english as well as anything involving code, from comments to specifications. Even our conversations have a non-trivial amount of english in them when we're talking about code, and not just all technical cody terms either.


I'm just wondering, Berengal are you making a joke, or do you actually live in a non-english speaking country?
Image

Varyon
Posts: 6
Joined: Wed Mar 11, 2009 3:04 pm UTC

Re: Best language for n00bs

Postby Varyon » Wed Mar 11, 2009 4:04 pm UTC

Pseudo Code.

And learning that "find the optimal path" is still np-complete, no matter what language you choose :)

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Best language for n00bs

Postby Berengal » Wed Mar 11, 2009 4:54 pm UTC

Shriike wrote:
Berengal wrote:I too code in english, and at the company I work at as an intern, all code is in english as well as anything involving code, from comments to specifications. Even our conversations have a non-trivial amount of english in them when we're talking about code, and not just all technical cody terms either.


I'm just wondering, Berengal are you making a joke, or do you actually live in a non-english speaking country?
pic.png
pic.png (22.93 KiB) Viewed 6552 times

Varyon wrote:Pseudo Code.
Aka. Python.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Thu Mar 12, 2009 4:08 am UTC

lol sorry Berengal, I'm not that observant.
Image

User avatar
MHD
Posts: 630
Joined: Fri Mar 20, 2009 8:21 pm UTC
Location: Denmark

Re: Best language for n00bs

Postby MHD » Wed May 06, 2009 3:38 pm UTC

Berengal wrote:In case some newbie actually looks here for advice, I find it best to provide some help, and not just a language fight arena:

How to determine the best language for me, a non-programmer, to learn as a first language:
What better way to determine the first programming language than to do a programming language to do so for you? This is a step-by-step guide on how to do that.

Load up a python interpreter. In most Linux distributions it's already included, and you can just type "python" in the shell to start it. On windows, you'll have to download it yourself first. If you're too dumb to figure out where and how, you're too dumb to program.
Anyway, at the interactive prompt, write "from random import choice". Without going into too much detail (you haven't decided to specifically learn python yet), this means that you load the function "choice" from the module "random". A module is just a collection of similar functions that work on a specific problem domain (the "math" module, for example, contains many math functions, like square root, log or sin). The "random" module is just a module of random functions; things that didn't fit in any other modules. The "choice" function reads a list, and based on an internal database determines what exactly the choices are, and thusly what the question is. It then evaluates the choices, weighing them against each other, and returns the best choice. It might seem like magic, but really, it's full of holes. For example, when asked to choose between "Trance" and "Techno", it usually comes up with "Trance" (the answer might vary, depending on the music library on your computer) when clearly the answer should be "Death metal". When it comes to programming languages, however, it's pretty solid. After all, it's written by programmers, and if anybody has thorough knowledge about programming languages it's us. Therefore, depending on the list of languages you enter, it will determine what you're using this language for and figure out the best language for you to use in that specific case. The best first-language has been debated to death over the last forty years, so we're pretty sure about the answer at this point. You just need to provide a list of possible candidates. To do this, you just type "candidates = " into the prompt and NOT PRESS ENTER. You need to enter the candidates in as a comma-separated list first. Find a list of languages (this is a good source, wikipedia is too). Now enter every language in between two quote marks and separate them with a comma, like this <"language1", "language2"> (omit the <>). Now you have your list and it's safe to press enter, you just need to use the "choice" function. You do this by writing "choice(candidates)". The best language should be written to the screen. If nothing happens, not even a newline, this is choice's way of saying that you should probably find something else to do, like play table-tennis and go for long runs, as programming might not be for you. Don't worry, as you can always invest in Apple :) Now that you know the language you should start in, ignore it and find a python tutorial. You already know some of the basic syntax and have it installed.

TL;DR:
As mentioned in the wall of text, this is a good resource for beginning languages. Programs written in Malbolge are especially impressive, and is a unique experience to behold.


lol.

I'd say, try lua. Small, simple, weak & dynamic typing, nice verbosity, functional.

It was what I sarted in.
EvanED wrote:be aware that when most people say "regular expression" they really mean "something that is almost, but not quite, entirely unlike a regular expression"

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Wed May 06, 2009 11:31 pm UTC

MHD wrote: ¡This cheese is burning me!.

I'd say, try lua. Small, simple, weak & dynamic typing, nice verbosity, functional.

It was what I sarted in.


I just want to point out, with my experience with lua (limited) I can't really endorse it for a first language for a programmer. However, one thing it has going for it is that World of Warcraft uses lua for its UI, so all add-ons are written in lua.
Image

User avatar
Cleverbeans
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: Best language for n00bs

Postby Cleverbeans » Fri May 29, 2009 1:36 am UTC

LOGO. All the awesomeness of Lisp but with a geometric form of output, which elicits a stronger connection to visual skills, a must for developing skill in math and computer science. It's ideal for early age exposure (5-8), but it's so useful for building intuition anyone would benefit from exposure.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

Agent_Irons
Posts: 213
Joined: Wed Sep 10, 2008 3:54 am UTC

Re: Best language for n00bs

Postby Agent_Irons » Wed Jun 17, 2009 7:01 pm UTC

I'm going to share my personal story here. I started programming with BASIC way back, and dropped it like it was hot. It was boring. Then I did some stuff in TI-BASIC essentially to pass the time, and then took a programming class in high school. We started with assembly(we coded multiply), and suddenly it all clicked. I learned C in a weekend and c++ a few weeks later. (obviously filling in the patches took much much longer). I'm currently jumping up the language tree to Python and Haskell.

It worked for me.

User avatar
Wednesday
Posts: 901
Joined: Fri May 22, 2009 6:31 pm UTC
Location: Oakland, CA

Re: Best language for n00bs

Postby Wednesday » Wed Jun 17, 2009 9:21 pm UTC

Shit. I think every single language ever has been mentioned as for what you should learn first. My sister (a computer science major in her 3rd year oh college) told me to start with C++. but I've heard reliably that I should start with python. So, crap.

Please, somebody, explain to me what "computer science" is, what "programming languages" can actually do, with examples por favor, and just in general what the usefulness of everything is? Im just a generally curious person, and since my sister finds this fun, I should look into it.
Sexts From The Void wrote:i struggle to maneuver on a chessboard of dicks

Agent_Irons
Posts: 213
Joined: Wed Sep 10, 2008 3:54 am UTC

Re: Best language for n00bs

Postby Agent_Irons » Wed Jun 17, 2009 9:58 pm UTC

horisustar wrote:Please, somebody, explain to me what "computer science" is, what "programming languages" can actually do, with examples por favor, and just in general what the usefulness of everything is? Im just a generally curious person, and since my sister finds this fun, I should look into it.

Computer Science would be the science of computers. Forgive the tautology. CS is the study of how long it takes to do certain tasks, whether some questions are answerable in less than a certain time, and so on. It's only a few decades old though, so a lot of questions are unanswered.

Examples: The fastest currently known sorting algorithms are O(nlogn) (the number of operations required to sort a list of things is proportional to the number of things times the logarithm of the number of things. Most algorithms are O(n^2), though. If the list gets twice as long the algorithm takes four times as long to finish sorting.

A lot of clever people spend a lot of time reducing problems to other, simpler, problems. There are NP-complete problems, which are formally defined in a way that I don't really understand, but informally boil down to (very hard). The traveling salesman problem, for example. There are fast ways of approximating the best possible answer quickly, but no way of finding the absolutely best answer in a short amount of time. A big open question is whether it's possible to find a quick algorithm for finding optimal solutions to NP-complete problems at all. A lot of them reduce to one another, so if you can solve one of them you can solve the others. Just proving that it's impossible would be a huge breakthrough. *shrug*

Programming languages are what turn your computer from a brick into a computer. They boil down to different ways of telling the computer what to do in very simple steps. Assembly is the lowest, and is very simply a set of things the chip itself knows how to do. Very simple things, like add two numbers, sometimes multiply two numbers, move numbers around in memory, etcetera. More complex programming languages are more concise ways of telling the computer what to do(example, instead of saying "add number b to number c, then subtract 1 from number d. If d is zero, stop. Otherwise, go back to the beginning" I would say b*c, because to me those are equivalent. Another program would have to tell the computer what I meant, unfortunately.)

The "point" is that with a grasp of at least one programming language you can get the computer to do things you want. Generally it's like amateur rocketry, except instead of something flying into the air it's something less tangible, like calculating a bunch of large prime numbers, or solving an interesting problem. Project Euler is a good source of problems, and it has a point system, so it's like competitive brainteaser-solving. You can write computer games if you want, but I advise not setting your heart on that. There are languages designed for it (see Game Maker) but it's hard in other languages that are more general-purpose. You can get paid to program computers, but where I work I get paid to copy and paste things into excel, so I wrote a short script in c++ that does all the hard work and number-crunching, producing neat and tidy answers. When it works right it's really satisfying(because when it doesn't work right it can be really frustrating).

tl;dr: You can get paid to do program computers, and many people do, but the reason people get into it is the same reason people do jigsaw puzzles.

User avatar
MHD
Posts: 630
Joined: Fri Mar 20, 2009 8:21 pm UTC
Location: Denmark

Re: Best language for n00bs

Postby MHD » Thu Jun 18, 2009 3:19 am UTC

simo wrote:I feel sad that noone has mentioned lua!

I'd say lua is one of the simplest scripting languages to learn, its really forgiving and of course its a great introduction to the power of C. I learnt lua in an evening, even things like creating complex object orientated behaviour were a breeze due to the single data structure type.


What he said, althoug two years ago when I knew nothing of code and edited scripts for garry's mod in notepad... I was almost... dim back then.

Now I'm all numbers and logic. Looking into haskell, althoug my procedural brain has to get used to it.
EvanED wrote:be aware that when most people say "regular expression" they really mean "something that is almost, but not quite, entirely unlike a regular expression"

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Best language for n00bs

Postby 0xBADFEED » Thu Jun 18, 2009 2:26 pm UTC

horisustar wrote:My sister (a computer science major in her 3rd year oh college) told me to start with C++. but I've heard reliably that I should start with python. So, crap.

Please don't start with C++. It will frustrate you to tears. Go with Python or another language with an interactive interpreter. An interactive interpreter is extremely useful when you're just trying to grok programming basics.

I don't know why your sister would recommend C++. I imagine she's learning it at university and probably hasn't had much exposure to other languages yet? But it's certainly not a good first language. It helps to approach C++ after you already understand some programming basics.

** I actually like C++ (for what it is). It's just not a beginner's language and could possibly turn you off of programming. **

User avatar
Wednesday
Posts: 901
Joined: Fri May 22, 2009 6:31 pm UTC
Location: Oakland, CA

Re: Best language for n00bs

Postby Wednesday » Thu Jun 18, 2009 3:07 pm UTC

i believe it was because she wanted me to learn the two types of coding. Object oriented and something else. Forgive me if that doesnt make sense. But I think Im going for python.
Sexts From The Void wrote:i struggle to maneuver on a chessboard of dicks

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Fri Jun 19, 2009 3:19 am UTC

horisustar wrote:i believe it was because she wanted me to learn the two types of coding. Object oriented and something else. Forgive me if that doesnt make sense. But I think Im going for python.

There's like 20 types of programming languages (they call them paradigms, also the 20 is just a guess I think I can only name like 3), I'd assume she said Object Oriented and Functial Oriented, Python is a little of both, so it's good fun :)
Image

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Fri Jun 19, 2009 4:05 am UTC

Shriike, you're misleading people.

C++ supports procedural programming and object-oriented programming. Functional programming (as popularized by Lisp and Haskell) is another popular type, but it's not particularly supported by C++. Python allows some functional programming but surprisingly little (even less than Perl or Javascript).

Also, "object-oriented programming" is the vaguest term ever.

Also, paradigms aren't "types" of languages. Lisp supports functional programming, procedural programming, and object oriented programming. In fact, Lisp probably supports all paradigms, including (arguably) a paradigm unique to Lisp. C++ supports procedural and one style of OO. Ruby supports a much more Smalltalk-style OO as well as functional and procedural programming.

Other paradigms include declarative programming, which Prolog uses, and which isn't especially helpful. (SQL is another type of declarative programming but specialized to a single task.) Other paradigms are usually supported by special purpose languages. For instance, Postscript is explicitly stack-oriented. There are also languages like Brainfuck that are pretty much straightforward Turing machines, which is even less useful than stack-oriented programming. But those are usually not intended for serious use.
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Best language for n00bs

Postby Berengal » Fri Jun 19, 2009 6:25 am UTC

Paradigms aren't neccessarily tied to languages. Sure, a language usually favors one (a few two) heavily, and it's hard to grok a new paradigm without learning a language made with that paradigm in mind, but I've looked at assembly and recognized the haskell that produced it, and I've myself directly ported a haskell program to C. It might not be pleasant, but all languages I know at least make it possible to write in just about any paradigm you want. A good programmer can write FORTRAN in any langauge (a great one can write Haskell).

Also, what constitutes a paradigm isn't well defined. Lisp and Haskell might both be functional, but to a Lisp or Haskell programmer they're worlds apart. The Haskell programmer would say Haskell's paradigm is "very strong, static typed, purely functional lazy". C++ and Java might be object-oriented, but they're also procedural, O'Caml is a functional object-oriented langauge and very different. I don't think object-oriented programming could exist alone without some other paradigm to actually do stuff in...
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
Wednesday
Posts: 901
Joined: Fri May 22, 2009 6:31 pm UTC
Location: Oakland, CA

Re: Best language for n00bs

Postby Wednesday » Fri Jun 19, 2009 4:41 pm UTC

So this. Procedural programming and object-oriented programming. I think that's what my sister said. Python has both, you say?
Sexts From The Void wrote:i struggle to maneuver on a chessboard of dicks

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Best language for n00bs

Postby ash.gti » Fri Jun 19, 2009 8:19 pm UTC

Python is certainly capable of procedural programming, but a lot of people attribute it more for functional approaches than procedural.

Python is a great way to start programming, its a great language to get your feet wet and its a very useful language for understanding a lot of programming concepts. But really knowing the difference between functional, procedural, and object oriented really shouldn't be an issue until you actually are programming and know whats going on, not just experimenting to understanding how the language works.
# drinks WAY to much espresso

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Best language for n00bs

Postby Berengal » Fri Jun 19, 2009 10:07 pm UTC

ash.gti wrote:Python is certainly capable of procedural programming, but a lot of people attribute it more for functional approaches than procedural.

Python is way more procedural than functional though. People are probably just really exited about the functional aspects, seeing as they're so nice to have. (To spot the functional programmers in a group, tell them they have to use a language without first-class functions. The functional programmers will be the ones who keep gasping for air, reach for their heart medicine, writhe in pain or simply quit.)
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Best language for n00bs

Postby ash.gti » Sat Jun 20, 2009 8:53 pm UTC

Berengal wrote:Python is way more procedural than functional though. People are probably just really exited about the functional aspects, seeing as they're so nice to have. (To spot the functional programmers in a group, tell them they have to use a language without first-class functions. The functional programmers will be the ones who keep gasping for air, reach for their heart medicine, writhe in pain or simply quit.)


I must say that the more I use first class functions the more I miss them when I don't have access to them.
# drinks WAY to much espresso

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Best language for n00bs

Postby Shriike » Tue Jun 23, 2009 7:14 pm UTC

Philwelch wrote:Shriike, you're misleading people.

C++ supports procedural programming and object-oriented programming. Functional programming (as popularized by Lisp and Haskell) is another popular type, but it's not particularly supported by C++. Python allows some functional programming but surprisingly little (even less than Perl or Javascript).

Also, "object-oriented programming" is the vaguest term ever.

Also, paradigms aren't "types" of languages. Lisp supports functional programming, procedural programming, and object oriented programming. In fact, Lisp probably supports all paradigms, including (arguably) a paradigm unique to Lisp. C++ supports procedural and one style of OO. Ruby supports a much more Smalltalk-style OO as well as functional and procedural programming.

Other paradigms include declarative programming, which Prolog uses, and which isn't especially helpful. (SQL is another type of declarative programming but specialized to a single task.) Other paradigms are usually supported by special purpose languages. For instance, Postscript is explicitly stack-oriented. There are also languages like Brainfuck that are pretty much straightforward Turing machines, which is even less useful than stack-oriented programming. But those are usually not intended for serious use.

I'm sorry, maybe I'm just ignorant but I fail to see how I was misleading. I didn't say that a language sticks to one paradigm, I was simply saying that the "type" horrisustar was talking about was probably paradigms, since at least the way that I hear people talking about paradigms it is like a type of language, if that makes sense. I guess what I was saying is even if it is an over simplification, and as your post so clearly pointed out it is difficult if not impossible for a language to have a single paradigm, there is still always one dominant paradigm that is associated with a language (in my opinion).

Please correct me if I'm wrong though, I am always interested in learning.
Image

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Best language for n00bs

Postby Philwelch » Wed Jun 24, 2009 12:53 am UTC

Shriike wrote:
Philwelch wrote:Shriike, you're misleading people.

C++ supports procedural programming and object-oriented programming. Functional programming (as popularized by Lisp and Haskell) is another popular type, but it's not particularly supported by C++. Python allows some functional programming but surprisingly little (even less than Perl or Javascript).

Also, "object-oriented programming" is the vaguest term ever.

Also, paradigms aren't "types" of languages. Lisp supports functional programming, procedural programming, and object oriented programming. In fact, Lisp probably supports all paradigms, including (arguably) a paradigm unique to Lisp. C++ supports procedural and one style of OO. Ruby supports a much more Smalltalk-style OO as well as functional and procedural programming.

Other paradigms include declarative programming, which Prolog uses, and which isn't especially helpful. (SQL is another type of declarative programming but specialized to a single task.) Other paradigms are usually supported by special purpose languages. For instance, Postscript is explicitly stack-oriented. There are also languages like Brainfuck that are pretty much straightforward Turing machines, which is even less useful than stack-oriented programming. But those are usually not intended for serious use.


I'm sorry, maybe I'm just ignorant but I fail to see how I was misleading.


Let's work through it.

There's like 20 types of programming languages (they call them paradigms, also the 20 is just a guess I think I can only name like 3), I'd assume she said Object Oriented and Functial Oriented, Python is a little of both, so it's good fun :)


Paradigms aren't types of programming languages, since most of your non-trivial languages are multi-paradigm. I don't think there's anywhere close to 20 of them. "Functional Oriented" isn't a paradigm, but functional and procedural are. Python is not exceptionally functional, it's more a mix of OO and procedural. There are multiple OO paradigms.

The only things you said that was right is that Python is a little object oriented, object oriented programming is a paradigm, and Python is good fun. The whole rest of your comment was the misleading part.
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

User avatar
The EGE
not very good at pickup limes
Posts: 1081
Joined: Sat Dec 27, 2008 12:11 am UTC
Contact:

Re: Best language for n00bs

Postby The EGE » Fri Jun 26, 2009 5:28 am UTC

headprogrammingczar wrote:I learned to program in BASIC on the TI-83 first. The programming syntax was the same as the mathematical syntax on the main screen. This, and the fact that it was an interpreted language, made it easy to write little formula-helpers and cements the concept of programming as statically typed math. For the first few days/weeks, keep the manual around, because the error catcher is very unhelpful. The combination of the weak error handling, clunky manual, and simple syntax, teaches you how to debug programs without it listing every mistake, as well as teaching you to get it right the first time. All variables are initialized by default, and variable identifiers are limited to single letters. Lists are 5 letters prefixed by a subscript L, so you can learn to make a program without having to fight the program. It also lets you initialize variables outside the program, introducing the concept of file IO, again without fighting the language/OS/other processes. The last benefit is that it is abominably slow, so newb programmers don't get too ambitious, or if they do, they can still see what is happening.
I personally learned to program like this, then learned how computers work before learning a computer language (Java in my case).
It effectively teaches you to program without teaching you a language, so when you do learn a language, you can start with some knowledge of programming, as well as having a few of your own programs for you to practice translating.


I too learned to program in TI-BASIC, albeit on a TI-84+ SE which is faster and has a bit more memory. I fully agree with everything you say there - crappy language or not, it's a good introduction to programming and an excellent way to waste class time :D

I started by reverse-engineering a few basic programs that a friend gave me - prime factoring, factoring quadratics, and a pretty good black jack game. I leanred the basic stuff that way, but I wasn't able to do anything high-level or fast.

Then, a few months ago, I started a pretty ambitious project. I took code for a rocket simulator written in TRS-80 style BASIC, translated it into TI-BASIC, and set out to improve it. I learned data storage, search methods, loop commands, basic graphics, restructuring flow, and low-level optimization stuff. That one program, accomplished over a semester of spare class time, taugh me 90% of what I know about programming. I plan to rewrite it now onto the TI-89 I just aquired and learn to use that different version of BASIC, then learn python. I've also been working on translating BASIC to brainfuck and back - that's a good mental exercise.

My theory is that it doesn't matter whether it's fortran, basic, C++, python, whatever. As long as you can understand the language and learn it by solving practical stuff - Project Euler, anyone - and learn a variety of stuff, not just by examples, but on your own, then it's a good language for you.
sillybear25 wrote:But it's NPH, so it's creepy in the best possible way.

Shivahn wrote:I'm in your abstractions, burning your notions of masculinity.

User avatar
Ran4
Posts: 131
Joined: Mon May 04, 2009 2:21 pm UTC

Re: Best language for n00bs

Postby Ran4 » Tue Jun 30, 2009 9:44 pm UTC

Instead of just saying noobs, why not talk about people without programming experience?
It's that first experience that is the hardest when programming.
I'd go against C/C++ as the very first language simply because finding and installing an IDE, creating a project, creating files and then compiling is way more hardcore than it needs to be for a _complete_ programming beginner (yes, I know, you could always do this from the command line, but then you probably already know the basics of programming).
Understanding everything in even the simplest C code requires way to much information. Anything more than "print "hello, world!"" is overcomplicated for the beginner.

For the first, say, 20 hours, I'd go with BASIC (if you are windows based, Quickbasic is as simple as it gets: double click the file, press enter and you're in the IDE, ready to write programs. You don't even have to know how to save files as .py or whatever). That, or Python.

After those 20 hours, then it's time to find some other language. I think a lot of people are forgetting how easy it is for absolute beginners to stall at things such as for-loops.

Most programming environments are C-like. If, else, for, the concept of an array, the concept of a class: if you learn them in one language you'll know them in nearly any language. It's the first step that is what keeping noobs away.

...what I'm trying to say, is that a complete beginner needs to learn how to think how to program, nothing else.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Best language for n00bs

Postby Berengal » Tue Jun 30, 2009 11:42 pm UTC

Ran4 wrote:Instead of just saying noobs, why not talk about people without programming experience?
They're the same people in this context.
Ran4 wrote:It's that first experience that is the hardest when programming.
Yes, very much this. Actually, I'd say it's hard to learn to program at the same time you're learning to learn to program. Once you've got a few languages under your belt, learning the basics of a new one should be much easier and not neccessarily because you're familiar with the basic concepts, because they might be entirely different, but because you know how to best familiarize yourself with them and the syntax (equally important in the very early stages of learning a language).
Ran4 wrote:I'd go against C/C++ as the very first language simply because finding and installing an IDE, creating a project, creating files and then compiling is way more hardcore than it needs to be for a _complete_ programming beginner.
There are many kinds of n00bs. If proper handholding is available, getting an environment up and running should be of no concern. It's only an issue when learning on your own, and even then the n00b might be l33t enough to do it by himself. Setting up a programming environment and programming itself are orthogonal skills, really, and most environments can be installed by downloading an exe/apt-get install/comes built-in (gcc does on most distros. All you need is a text editor and knowledge of how to open a shell.)
Ran4 wrote:For the first, say, 20 hours, I'd go with BASIC (if you are windows based, Quickbasic is as simple as it gets: double click the file, press enter and you're in the IDE, ready to write programs. You don't even have to know how to save files as .py or whatever).
BASIC is horrible and has been scientifically proven to irrepairably damage any mind that touches it. Python is a good suggestion. I didn't save a single .py file the first three months I programmed in python. File extentions to indicate types are an outdated concept, instead, dotted filenames should indicate a hierarchical ordering too trivial to encode in the filesystem directly.
Ran4 wrote:After those 20 hours, then it's time to find some other language. I think a lot of people are forgetting how easy it is for absolute beginners to stall at things such as for-loops.
20 hours is barely enough time to become familiar with the syntax of a language. Say 100 and I'll be more inclined to agree, but you shouldn't really sacrifice depth for breadth at such an early stage anyway. A good alternative is to learn a new langauge every other week for a couple of months, but continue to use all the previous languages. This should also help the n00b learn general concepts, and how to generalize concepts, instead of simply language constructs.

If a n00b has trouble with for loops, switching language is not the way to go.

Ran4 wrote:Most programming environments are C-like. If, else, for, the concept of an array, the concept of a class: if you learn them in one language you'll know them in nearly any language. It's the first step that is what keeping noobs away.
These concepts aren't the basics of programming (give me pattern matching, algebraic datatypes, symbol bindings and functions, and I'll give you a decent programming language). The basics are meta-concepts like extracting generals from specifics, seeing what a solution to a problem looks like before you've solved it etc. that are hard to describe and probably impossible to teach, but which have to be learned through pattern recognition.
Ran4 wrote:...what I'm trying to say, is that a complete beginner needs to learn how to think how to program, nothing else.
In conclusion, there are very different types of n00bs.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 6 guests