Best language for n00bs

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

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* » Sat May 31, 2008 12:05 pm UTC

Java 1.5 was quite a recent release when I learnt it so most of the labs were still on 1.4.2 and we didn't get taught generics until second year... I'll probably be learning better C and OpenGL in October.
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!

sninctown
Posts: 23
Joined: Mon Oct 01, 2007 2:16 am UTC

Re: Best language for n00bs

Postby sninctown » Sat May 31, 2008 8:04 pm UTC

i'm surprised no one mentioned MATLAB. I'd recommend learning MATLAB if you want to do simulations.

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* » Mon Jun 02, 2008 10:20 am UTC

I didn't think Matlab was worth considering as a language. It's a PITA.

It has syntax whose usage of certain symbols is different to the "conventional" usage of same.
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
enk
Posts: 754
Joined: Mon Sep 10, 2007 12:20 am UTC
Location: Aalborg, Denmark
Contact:

Re: Best language for n00bs

Postby enk » Mon Jun 02, 2008 10:26 am UTC

And one-based indexing will make it harder to switch to other languages. Just sayin'
phlip wrote:Ha HA! Recycled emacs jokes.

User avatar
mstrzerg
Posts: 76
Joined: Fri Apr 11, 2008 3:49 pm UTC
Location: Lexington Park, Maryland

Re: Best language for n00bs

Postby mstrzerg » Fri Jun 06, 2008 3:46 pm UTC

MATLAB is really good for quickly and easily analyzing and displaying a set of data. However, I am finding it very hard to transition to anything else right now.

User avatar
bowlerhatman
Posts: 21
Joined: Wed Mar 05, 2008 9:42 pm UTC

what language should I learn to program with?

Postby bowlerhatman » Sat Jun 14, 2008 9:24 pm UTC

I would like to learn about computers and how to program them, but there are so many different languages out there that it seems like you have to learn to program to understand which you should choose, because the pros and cons don't make sense to me. So, straight up, what language should I learn on? I was thinking python, but then I read this: http://xkcd.com/409/, and I thought that I should learn on something that makes me a better programer first. So maybe C? Java? You guys seem to know what you're talking about, so what do you think?

Also, should I learn out of a book or should I try to get a live mentor. The mentor approach seems like a good way to go, but my high school doesn't offer any computer science courses and my friend who programs doesn't make sense. I don't really know what I'm doing, so could you all help me? Thanks.
*****
My name is Ozymandias, King of Kings,
Look on my Works, ye Mighty, and despair!
Nothing beside remains.
-Percy Bysshe Shelly

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: what language should I learn to program with?

Postby qbg » Sat Jun 14, 2008 10:32 pm UTC

What do you want to program?

User avatar
bowlerhatman
Posts: 21
Joined: Wed Mar 05, 2008 9:42 pm UTC

Re: what language should I learn to program with?

Postby bowlerhatman » Sat Jun 14, 2008 10:45 pm UTC

I want to program things like Conway's Game of Life. That's the thing that really made me want to learn, but I've always been moderately interested in writing simple games (platformers like Mario, for instance).
*****
My name is Ozymandias, King of Kings,
Look on my Works, ye Mighty, and despair!
Nothing beside remains.
-Percy Bysshe Shelly

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: what language should I learn to program with?

Postby Berengal » Sun Jun 15, 2008 12:57 am UTC

Head over to this thread for a bunch of people shouting over which language is the best. Hey, look where this thread was merged to. ;-)

Pretty much the first thing I've done in all languages I've taught myself have been to program Game of Life. It's easy enough yet not too basic, so you'll get a feel for the language pretty nicely.

Perhaps the easiest way to start would be to learn python first, write a few programs there, then learn C, C++, Java or D and write the same programs there, then repeat with a new language etc. until you've touched most language types.
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
Ptolom
Posts: 1559
Joined: Mon Mar 24, 2008 1:55 pm UTC
Location: The entropy pool
Contact:

Re: Best language for n00bs

Postby Ptolom » Sat Jun 21, 2008 8:06 pm UTC

asm!
nah not really but it would start you off with the right mindset

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 » Mon Jun 23, 2008 6:49 pm UTC

Ptolom wrote:asm!
nah not really but it would start you off with the right mindset
asm!
nah not really but it would start you off with the right mindset


I really wouldn't recommend ASM to anyone for the first programming language unless they are an electrical engineer (or computer hardware related engineer) simply because it doesn't teach you most of the higher level constructs or programming principles.

In my experience people that learn the low level stuff right off the bat either A) get really confused pretty fast (most of the concepts are not exactly easy to teach yourself) or B) have trouble learning some of the other higher level language concepts later on, mainly because a lot of people have the mindset of if its not broke don't fix it and if you can do something 1 way but there is a better way out there a lot of people just use the method they learned first.

Its good to go back and understand whats happening under your Smalltalk code, but I wouldn't say ASM is noob friendly.

Berengal wrote:Perhaps the easiest way to start would be to learn python first, write a few programs there, then learn C, C++, Java or D and write the same programs there, then repeat with a new language etc. until you've touched most language types.


That is still something I do to this day and find it gives very valuable experience. I do tend to stick to some of the more obscure languages like Objective-C, Erlang, Haskell, (in comparison to C/C++ or Java, although D is still kinda obscure IMO).
# drinks WAY to much espresso

chaos95
Posts: 4
Joined: Thu Sep 06, 2007 12:12 am UTC

Re: Best language for n00bs

Postby chaos95 » Thu Jul 31, 2008 3:50 am UTC

I personally started on Basic on old machines like the BBC and Rainbow 100. From there I moved up to QBasic on ye olde DOS 6.22, and that was where I really started to get an interest in programming. When I was 12 I decided that I needed to learn a serious language (read: one that could make a .exe) so I took up C. After that it was a slippery slope through C++, Java, PHP, Delphi, C#, VB and various others, with my most recent acquisitions being Python and Emacs Lisp.

I think the key for me was that starting in Basic allowed me to focus on what was important to me at the time - I wanted to make the computer do some stuff that I told it to do. Print dirty words. Count to ten. Pretend to be a DOS shell but print dirty words instead of directory listings, etc. (I was 8 or 9 at the time, so these were very important aspects of computing). To that end, Basic served me well - a series of instructions to the computer. Once I started to have more complex requirements, I picked up languages that suited those needs.

There's some merit to the argument for starting with a language that teaches good programming practice, but I think the added cruft that you have to deal with in a lot of those kinds of languages makes them unsatisfying for the learner.

There's really only one language that springs to mind for me when it comes to providing the entry point that Basic used to provide, with the added benefit of allowing you to move up to procedural and object-oriented programming in the same breath - Python (Admittedly there are other languages with moderately similar intentions which allow the same progression, but Python is the most popular). Use Python to give you that fun, immediate sense of 'I am controlling the computer', and then it can grow with you as you learn more complex concepts. Eventually you'll hit something that is either difficult to do, or performs poorly, etc. Then it's a chance for you to look at other languages and technologies to achieve your goals.

TL;DR:
Python is this generation's Basic.

photosinensis
Posts: 163
Joined: Wed Aug 22, 2007 6:17 am UTC

Re: Best language for n00bs

Postby photosinensis » Mon Aug 04, 2008 5:55 am UTC

chaos95 wrote:Python is this generation's Basic.


Except that Python doesn't suck (or cause severe brain damage).

Berengal wrote:Perhaps the easiest way to start would be to learn python first, write a few programs there, then learn C, C++, Java or D and write the same programs there, then repeat with a new language etc. until you've touched most language types.


Basically, this is the right idea. I might encourage C and/or Objective C over the others, with Java and/or C# following from those two, as they naturally do. Only after having proven yourself should you attempt to bother with C++: the potential for screwing yourself up royally is too great. Also, don't forget Common Lisp or Scheme, which you should cover around the same time as C/ObjC. They're just as good for you as the ancient and venerable C family, but often ignored for the flamewars they have caused.

RISC assemblies would be safe after C/ObjC and Common Lisp/Scheme. After that, 68k's not a bad example of a CISC asm. Unless you've really got a passion for metal, though, I would advise against trying to understand any compatible descendant of the Intel 8086. Those architectures have made me cry more than once over the past couple of years. Of course, JVM/CLI instructions would also be something I'd include in here somehow.
While I clicked my fav'rite bookmark, suddenly there came a warning,
And my heart was filled with mournng, mourning for my dear amour.
"'Tis not possible!" I uttered, "Give me back my free hardcore!"
Quoth the server: 404.

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: Best language for n00bs

Postby aleflamedyud » Mon Aug 04, 2008 8:04 pm UTC

Actually, Python's total lack of types or required variable declarations sort of does cause brain damage.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

btilly
Posts: 1877
Joined: Tue Nov 06, 2007 7:08 pm UTC

Re: Best language for n00bs

Postby btilly » Mon Aug 04, 2008 8:45 pm UTC

aleflamedyud wrote:Actually, Python's total lack of types or required variable declarations sort of does cause brain damage.

Joy. Before going into the value of different kinds of type systems I recommend reading this overview. You'll hopefully learn something. Among other things you'll learn that dynamically typed languages really are typed just as statically typed languages, that you need to approach them differently, that there is a reason people in dynamic languages like unit tests, and that there is a lot more to the subject of typing than most programmers are aware.

So lacking static typing doesn't make a language better or worse. It just makes it different, and means that to get full power out of the language you need to program differently.
Some of us exist to find out what can and can't be done.

Others exist to hold the beer.

User avatar
Clintonio
Posts: 7
Joined: Sat Aug 02, 2008 9:02 pm UTC

Re: Best language for n00bs

Postby Clintonio » Fri Aug 08, 2008 1:51 am UTC

I'll probably be hated for this, but I believe PHP is a good start. I tried many languages before PHP, but I just had a blank look on my face after each. But with PHP I had a goal in mind, and I had it easily at my finger tips (No compiling necessary). And now I can pick up other languages much easier, mostly because I understand the logic behind programming that I didn't seem to grasp the first time.

But the issue with PHP is that it requires a WAMP or LAMP solution, and most people I've met are just too damn lazy to install either of those for training purposes. So I just tell them to go play with C++ and see how far they can get.

photosinensis
Posts: 163
Joined: Wed Aug 22, 2007 6:17 am UTC

Re: Best language for n00bs

Postby photosinensis » Fri Aug 08, 2008 2:56 am UTC

aleflamedyud wrote:Actually, Python's total lack of types or required variable declarations sort of does cause brain damage.


Python has types and variable declarations. Variables are declared (instantiated) at initialization--there's no point in having a variable without a value assigned to it. What's more, Python is very strongly typed--try this:

Code: Select all

#!/usr/bin/env python
'a' / 3 #This DOESN'T work, and in fact returns a type error.

The output:

Code: Select all

>>> 'a' / 3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'str' and 'int'


See that? A TypeError, which shouldn't happen in an "untyped" language. So obviously Python has types. But I don't think you're convinced. What if I try to make this square peg fit in a round hole?

Code: Select all

>>> int('a')/3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'a'


Nope. Not gonna happen. I just can't convert a string (in Python, even one character constitutes a string) to an int.

Let's see what happens in C, which is statically typed:

Code: Select all

//types.c
#include <stdio.h>
int main(void)
{
    int a = 'a' / 3;
    printf("%d\n", a);
}

And what happens with this code?

Code: Select all

Westley:~ thephotoman$ gcc types.c -o types
Westley:~ thephotoman$ ./types
32
Westley:~ thephotoman$


Sure, C's types are static, but they don't actually mean a whole lot, as I've demonstrated here. This is because C's typing system is very weak (and incredibly unsafe). On the other hand, Python is religiously and strongly typed. Of course, this doesn't necessarily mean that C is bad: actually, this is a memory-saving hack in C. I could just say "int a = 97;", but that's (by ISO C99) 16 bits of memory. "short a = 97;" is also possible, but that's 8 bits. What I did above is 7 bits, even if C fully and properly supported Unicode without extra libraries. In Python, I can't get around the fact that a = 97 creates a 32 bit int.

It's just that Python's typing system is dynamic, so you don't always notice the typing system in play--and you don't have to tell the interpreter what kind of variable you're initializing. See the flamewar about dynamically/statically typed languages for more info.

I can tell you've never played with user-defined objects in Python, particularly old-style objects that are either base classes or not a part of any hierarchy.

Know what you're saying before shoving your foot in your mouth.

btilly wrote:So lacking static typing doesn't make a language better or worse. It just makes it different, and means that to get full power out of the language you need to program differently.


Indeed. Sometimes, dynamic typing makes the job easier. This isn't always the case, though.
While I clicked my fav'rite bookmark, suddenly there came a warning,
And my heart was filled with mournng, mourning for my dear amour.
"'Tis not possible!" I uttered, "Give me back my free hardcore!"
Quoth the server: 404.

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: Best language for n00bs

Postby aleflamedyud » Fri Aug 08, 2008 5:58 am UTC

Python has types and variable declarations. Variables are declared (instantiated) at initialization--there's no point in having a variable without a value assigned to it. What's more, Python is very strongly typed--try this:

Actually, I had meant declarations of both variables and types.

And, using a variable does not mean declaring it, particularly not instance variables. Doing normal variables the C-way of declaring them at any old place and then initializing them works for me (though I prefer Scheme let-blocks the best), but this weird notion of not declaring what attributes a class should have before initializing them? Brain-damaged.

Also, I really do prefer, even in languages that technically have dynamic typing, to declare the type of a variable. With strong typing around (and Python does not have strong typing, it has duck typing) it's just that much safer.

Really, I like Python's syntax for a beginner's language and duck typing works wonders to avoid superfluous interfaces (as in Java interfaces), but its approach to declaring classes and methods is downright brain-dead, and the way it allows people to just make new variables in any old place without opening a new scope makes me think it will damage the brains of beginners.

Then again, I began on Pascal, so I actually consider cleanliness a requirement for code.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

EvanED
Posts: 4321
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Best language for n00bs

Postby EvanED » Fri Aug 08, 2008 6:34 am UTC

aleflamedyud wrote:With strong typing around (and Python does not have strong typing, it has duck typing) it's just that much safer. [Emphasis added]]
"Strong typing" is a term that gets thrown around by so many people in so many different ways, it's best just not to use it because no one knows what it means because no one agrees what it means. That said, under most definitions I've seen, duck typing is strong typing. (Or at least can be strong typing, and in every implementation of duck typing I know, is.)

From Wikipedia: "However, these terms [strong and weak typing] have been given such a wide variety of meanings over the short history of computing that it is often difficult to know, out of context, what an individual writer means when using them." Or from a comp.lang.perl.moderated post by Mark-Jason Dominus:
In a couple of hours, I found eight different and incompatible definitions of 'strongly typed language':

1. A language is strongly typed if type annotations are associated with variable names, rather than with values. If types are attached to values, it is weakly typed. [Some people would use "typed" and "untyped" to refer to these; "statically typed" and "dynamically typed" are more common.]

2. A language is strongly typed if it contains compile-time checks for type constraint violations. If checking is deferred to run time, it is weakly typed.

3. A language is strongly typed if it has compile or run-time checks for type constraint violations. If no checking is done, it is weakly typed. [This is the definition that I would adhere to.]

4. A language is strongly typed if conversions between different types are forbidden. If such conversions are allowed, it is weakly typed.

5. A language is strongly typed if conversions between different types must be indicated explicitly. If implicit conversions are performed, it is weakly typed. [ML probably fits into this category.]

6. A language is strongly typed if there is no language-level way to disable or evade the type system. If there are casts or other type-evasive mechansisms, it is weakly typed.

7. A language is strongly typed if it has a complex, fine-grained type system with compound types. If it has only a few types, or only scalar types, it is weakly typed.

8. A language is strongly typed if the type of its data objects is fixed and does not vary over the lifetime of the object. If the type of a datum can change, the language is weakly typed.

photosinensis
Posts: 163
Joined: Wed Aug 22, 2007 6:17 am UTC

Re: Best language for n00bs

Postby photosinensis » Fri Aug 08, 2008 3:00 pm UTC

This is really treading on the territory of the typing flamewar now. Could we get a branch and merge?

#6 is closer to my definition, but still not quite it. It's not about implicit/explicit casts, but instead about whether I can use a function/method on type A that doesn't exist on that type, but does exist on type B, which is entirely unrelated but is stored in memory in a similar way (such as the example with ints and chars above) and gets managed by the same kind of ALU (whether integer or floating point).

Of course, this doesn't mean you can't evade typing systems. Take Java, a strongly, safely, and statically typed language. I can still pull this stunt:

Code: Select all

class WhoCares
{
  public static void main(String argv[])
    {
      Object a = new Integer(1);
      System.out.println(a);
      a = new String("This is now a string.");
      System.out.println(a);
    }
}

Sure, it's bad form (for Java), but it's still valid Java, thanks to the fact that everything derives from the object class. At least it ran through my Java compiler and runtime without a problem.

Thus, typing shouldn't be a consideration in a language for noobs. Instead, the considerations should be whether a language encourages good practices, is human-readable (this is where Perl in particular loses), and keeps simple things simple. If the language is object-oriented, everything should be an object--including literals (sorry, Java). Additionally, the language should have good compiler/runtime error messages (so C++ is right out), and preferably some kind of automated memory management, though this should be readily and easily circumvented so as not to have to teach memory stunts in C (though one should learn C anyway).

I'd say that Python and Ruby fit the bill here quite well, as does Groovy (a JVM-integrated language similar to Python/Ruby, but with substantially more Java to it than the others). Of course, a first language should not also be one's last language, so C and Common Lisp or Scheme should follow once the noob has some mastery of his/her first language. After all that, move on to some kind of RISC assembly, followed by a non-8086 derived CISC assembly. 8086 style assemblies are for compilers alone.
While I clicked my fav'rite bookmark, suddenly there came a warning,
And my heart was filled with mournng, mourning for my dear amour.
"'Tis not possible!" I uttered, "Give me back my free hardcore!"
Quoth the server: 404.

User avatar
mat-tina
Posts: 331
Joined: Mon Jun 02, 2008 3:33 pm UTC

Re: Best language for n00bs

Postby mat-tina » Fri Aug 08, 2008 5:44 pm UTC

photosinensis wrote:Nope. Not gonna happen. I just can't convert a string (in Python, even one character constitutes a string) to an int.


Of course you can!

Code: Select all

>>> ord('a') / 3
32


I see your point, though. "Chars" aren't "inherited" from intergers in Python, like they are in C.
Felltir wrote:has no sig, and therefore something to hide
GENERATION n: The first time you see this, copy it into your sig on any forum. If n is an even number, divide it by 2. If it's odd, multiply it by 3 and add 1. Prove that this sequence converges to 1 for all n.

User avatar
fishyfish777
Posts: 375
Joined: Mon Jan 28, 2008 4:29 pm UTC

Re: Best language for n00bs

Postby fishyfish777 » Tue Aug 12, 2008 8:37 pm UTC

Oooh Ohh I got one!


ENGLISH!

I hate how 99% of n00bs have HORRIBLE spelling/grammar errors...
Neon Rain wrote:And somehow we humans can invent scanning-probe microscopes that can "see" individual atoms, yet still can't invent a machine that can reliably scan tests not taken with a #2 pencil.

photosinensis
Posts: 163
Joined: Wed Aug 22, 2007 6:17 am UTC

Re: Best language for n00bs

Postby photosinensis » Sat Aug 16, 2008 11:52 pm UTC

fishyfish777 wrote:Oooh Ohh I got one!


ENGLISH!

I hate how 99% of n00bs have HORRIBLE spelling/grammar errors...


English is a terrible programming language. That said, you have a point. The ghost of the English language wishes to be avenged.
While I clicked my fav'rite bookmark, suddenly there came a warning,
And my heart was filled with mournng, mourning for my dear amour.
"'Tis not possible!" I uttered, "Give me back my free hardcore!"
Quoth the server: 404.

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Re: Best language for n00bs

Postby evilbeanfiend » Wed Aug 20, 2008 6:57 am UTC

aleflamedyud wrote:
Really, I like Python's syntax for a beginner's language and duck typing works wonders to avoid superfluous interfaces (as in Java interfaces), but its approach to declaring classes and methods is downright brain-dead, and the way it allows people to just make new variables in any old place without opening a new scope makes me think it will damage the brains of beginners.

Then again, I began on Pascal, so I actually consider cleanliness a requirement for code.


but declaring them any old place (even in languages where you can declare without initialising/defining) allows you to keep the declaration close to the use. sure you can open a new block to do this in c but people, especially novices, don't. all to often you see long c functions with a whole stack of variables declared at the start and not initialised until some obscure point far down the function. deferred initialisation is frankly an ugly hack to avoid some overhead because c can't declare things at any old point. the cost of this ugly hack is UB if you forget to initialise a variable before using it. i'm pretty certain that UB is far more of an obstacle to beginners (it can be pretty confusing if you come across it as an expert).
in ur beanz makin u eveel

btilly
Posts: 1877
Joined: Tue Nov 06, 2007 7:08 pm UTC

Re: Best language for n00bs

Postby btilly » Wed Aug 20, 2008 11:05 am UTC

evilbeanfiend wrote:but declaring them any old place (even in languages where you can declare without initialising/defining) allows you to keep the declaration close to the use. sure you can open a new block to do this in c but people, especially novices, don't. all to often you see long c functions with a whole stack of variables declared at the start and not initialised until some obscure point far down the function. deferred initialisation is frankly an ugly hack to avoid some overhead because c can't declare things at any old point. the cost of this ugly hack is UB if you forget to initialise a variable before using it. i'm pretty certain that UB is far more of an obstacle to beginners (it can be pretty confusing if you come across it as an expert).

C no longer requires variable declarations to come at the start of scope. The C99 standard allows declarations to appear elsewhere in code. (Contrary to popular rumor not quite anywhere though - declarations are not a type of statement, and labels can only be applied to statements. Therefore you cannot put a declaration right after a label.) That said, there are people still using compilers that don't support C99, and many code bases predate C99. Plus it takes time for habits to change.
Some of us exist to find out what can and can't be done.

Others exist to hold the beer.

sakeniwefu
Posts: 170
Joined: Sun May 11, 2008 8:36 pm UTC

Re: Best language for n00bs

Postby sakeniwefu » Thu Aug 21, 2008 3:44 am UTC

chaos95 wrote:Python is this generation's Basic.

Python is better than BASIC of course but it lacks what made BASIC and VB the languages of choice for amateur and corporate programmers and scientists; easy screen and file IO.
PSET, POINT, PRINT, INKEY$, OPEN, GET,PUT and INPUT beat the crap out of any language you can bring up. VB extended that ease of use to common GUI controls. It WAS a limited language, but lots of scientists found it easier to do what they wanted in Qbasic, 8080 BASIC, or Vbasic than in C or C++.
It turns out people will rather draw the 3D graph using 16(or less) color graphics than displaying a list of float values through stdout that a second graph-drawing program that they will have to write from scratch using some retarded UNIX or Microsoft API will read, or paying for a real math package that does far too much and uses a strange notation.
Of course, most BASIC dialects are discontinued(VB.NET isn't BASIC anymore), but there is Freebasic, a GNU portable clone of QBASIC complete with graphics for Linux and Windows. It is a compiled language and it has an extended (modern language) mode in addition to QBASIC compatible mode.

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: Best language for n00bs

Postby aleflamedyud » Sat Aug 23, 2008 1:14 am UTC

evilbeanfiend wrote:
aleflamedyud wrote:
Really, I like Python's syntax for a beginner's language and duck typing works wonders to avoid superfluous interfaces (as in Java interfaces), but its approach to declaring classes and methods is downright brain-dead, and the way it allows people to just make new variables in any old place without opening a new scope makes me think it will damage the brains of beginners.

Then again, I began on Pascal, so I actually consider cleanliness a requirement for code.


but declaring them any old place (even in languages where you can declare without initialising/defining) allows you to keep the declaration close to the use. sure you can open a new block to do this in c but people, especially novices, don't. all to often you see long c functions with a whole stack of variables declared at the start and not initialised until some obscure point far down the function. deferred initialisation is frankly an ugly hack to avoid some overhead because c can't declare things at any old point. the cost of this ugly hack is UB if you forget to initialise a variable before using it. i'm pretty certain that UB is far more of an obstacle to beginners (it can be pretty confusing if you come across it as an expert).

Yeah, C allows you to declare variables any old place. Python doesn't require variable declarations. It just lets you assign to a variable that doesn't exist. This means that you can create a new variable by unintentionally writing a typo into your use of an old variable, and the interpreter will treat this the same way as an intentional variable creation.

I think declaring variables any-old-place is messy if sometimes appropriate (I prefer Scheme/Lisp 'let' expressions, really), but they should require some form of actual declaration just to let the programmer catch an otherwise trivial class of bugs.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Best language for n00bs

Postby qbg » Sat Aug 23, 2008 2:10 am UTC

Edit: Nevermind
Last edited by qbg on Sat Aug 23, 2008 5:34 pm UTC, edited 1 time in total.

EvanED
Posts: 4321
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Best language for n00bs

Postby EvanED » Sat Aug 23, 2008 2:14 am UTC

From what I can tell, Python doesn't have this. Is my Google-fu weak now? (Wouldn't be the first time today.)

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Re: Best language for n00bs

Postby evilbeanfiend » Mon Aug 25, 2008 8:43 am UTC

frankly c == c89 (or early) for most c applications. hardly anyone uses c99 (in comparison)
This means that you can create a new variable by unintentionally writing a typo into your use of an old variable, and the interpreter will treat this the same way as an intentional variable creation.


well you can shadow variables in c if you have a typo. that's why you test
in ur beanz makin u eveel

User avatar
healingkid
Posts: 2
Joined: Fri Aug 22, 2008 7:39 pm UTC
Location: New Haven, CT

Re: Best language for n00bs

Postby healingkid » Mon Aug 25, 2008 1:30 pm UTC

PHP for speedy hands-on getting started. PHP and Java together FTW.

Then," sing the songs YOU like to sing;" spread out into the rest

or not.

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 Aug 26, 2008 3:40 am UTC

evilbeanfiend wrote:frankly c == c89 (or early) for most c applications. hardly anyone uses c99 (in comparison)
This means that you can create a new variable by unintentionally writing a typo into your use of an old variable, and the interpreter will treat this the same way as an intentional variable creation.


well you can shadow variables in c if you have a typo. that's why you test

Well, "int myVariable; myVariable = 6; myVarable = 5;" won't work in c most of the time, but will in python (if you drop the declaration). (Hopefully you have a little more distance between your variable names than what a single typo can bridge.)
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.

photosinensis
Posts: 163
Joined: Wed Aug 22, 2007 6:17 am UTC

Re: Best language for n00bs

Postby photosinensis » Tue Sep 23, 2008 10:26 pm UTC

EvanED wrote:From what I can tell, Python doesn't have this. Is my Google-fu weak now? (Wouldn't be the first time today.)


Python has self, which is always the first argument in a method.

This is what happens when stuff disappears, and I read something out of context.
While I clicked my fav'rite bookmark, suddenly there came a warning,
And my heart was filled with mournng, mourning for my dear amour.
"'Tis not possible!" I uttered, "Give me back my free hardcore!"
Quoth the server: 404.

EvanED
Posts: 4321
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Best language for n00bs

Postby EvanED » Tue Sep 23, 2008 10:55 pm UTC

Heh. I think the "this" in my post was referring to an analogy to VB's "option explicit" or Perl's "use strict".

HenryGifford
Posts: 152
Joined: Mon Nov 03, 2008 2:01 am UTC

Re: what language should I learn to program with?

Postby HenryGifford » Thu Nov 06, 2008 11:45 pm UTC

Berengal wrote:Perhaps the easiest way to start would be to learn python first, write a few programs there, then learn C, C++, Java or D and write the same programs there, then repeat with a new language etc. until you've touched most language types.

So essentially write a "Hello World!" program in every language?

My list of the route you should go at the beginning is...

Scratch: Not quite a programming language, just dragging blocks, but it gives you the idea of how programming works. It's quite fun too.
BASIC: Annoying as hell, but BASIC gave me a lot of tools in using other languages... It was also one of the very first, so it makes you feel bad for the first programmers.
Python: Stop here. Just learn Python. Then stop. Because Python is amazing.

So I like Python.

User avatar
Godskalken
Posts: 159
Joined: Wed May 14, 2008 3:29 pm UTC

Re: Best language for n00bs

Postby Godskalken » Thu Feb 26, 2009 10:43 am UTC

This thread has become absolutely amazing.

thanksbastards
Posts: 151
Joined: Sat Jan 24, 2009 3:02 pm UTC

Re: Best language for n00bs

Postby thanksbastards » Thu Feb 26, 2009 6:01 pm UTC

basicly

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

Re: Best language for n00bs

Postby Shriike » Thu Feb 26, 2009 6:35 pm UTC

Personally I learned on BASIC++, then moved on to BASIC.

So this is an example of mod's messing with us right? What was it, mods be evil day?
Image

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 6:45 pm UTC

I'm going to assume that you genuinely, seriously, really want to be a programmer. You are a freshman CS student who's never touched code before. Or you're a kid in high school who wants to be a CS major. If you're a scientist who wants to write code, learn Fortran or something—I just say that because that's what my scientist friends tend to use.

But if you're serious about programming? Want to make a living out of it?

Good first languages: C and Scheme. Scheme lets you learn smart high-level shit, C lets you learn smart low-level shit. If you're not going to be able to figure out either pointers or recursion, fall back to Python and do some hobbyist programming, but please don't drag down the level of my profession.

Good second languages: Ruby, Objective-C, Perl, Python, and C++. Understanding how C++ works makes you appreciate what programming can do, even if C++ isn't the right way to do it. Perl will reach you regular expressions (one of the essential skills of the trade), while any of the OO languages will teach you object orientation. Though by this point, you should also be far enough along in Scheme or Lisp that you can do all sorts of Lispy shit, so being locked into a single paradigm (namely whatever your language's object model happens to be) will feel restrictive. One thing OO is good for? Learning tons of fancy dynamic data structures (AVL trees, heaps, dynamic arrays...).

Languages to put off: Java and C#. Java and C# teach you nothing the above languages don't. They make good resume fodder, and they're relatively popular choices at big companies, but if you know C syntax and OO, you'll pick them up.
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
r1chard
Posts: 281
Joined: Thu Dec 06, 2007 2:17 am UTC
Location: Melbourne, AU
Contact:

Re: Best language for n00bs

Postby r1chard » Mon Mar 09, 2009 11:08 pm UTC

Philwelch wrote:If you're not going to be able to figure out either pointers or recursion, fall back to Python and do some hobbyist programming, but please don't drag down the level of my profession.

I'm a professional programmer and I've been coding almost exclusively in Python for about 7 years now. You can take your profession and ... well, put it somewhere where I don't have to have anything to do with it :)


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 1 guest