You are not logged in.

#1 2011-08-22 17:46:02

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

what language for starter?

Hi,

I know there are threads about programming languages like favorite language etc, but now I need your opinion in a different approach.

For my own pleasure I'd like to familiarize myself with a new programming language. I had some experience with visual foxpro years ago, and from time to time I use php, javascript jquery with my basic knowledge. And rest assured it's basic.

I thought of C, C++, C# or Python (3) but I don't know what would be the most practical. Well, I don't know what I want to do with it so it's certainly a difficult decision. Fun what it is all about.

Anyway I thought learning C or C++ could provide a solid base.

What are your suggestions? I'm open for your advise.

Offline

#2 2011-08-22 18:02:19

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: what language for starter?

C is a solid base, for sure...

For fun and for beginning with programming concepts, i would recommend Ruby: it's syntax is, imho, far cleaner than Python's and his object model is intuitive.

Offline

#3 2011-08-22 18:03:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: what language for starter?

siriusb wrote:

Anyway I thought learning C or C++ could provide a solid base.

A solid base to do what? You should first decide what do you want to do. If you want to learn for pure fun, python seems nice, but C & C++ aren't bad either.

Offline

#4 2011-08-22 18:09:35

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: what language for starter?

karol wrote:

A solid base to do what?

In case I go further I can build on the experience I get with C.

Offline

#5 2011-08-22 19:13:20

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: what language for starter?

siriusb wrote:
karol wrote:

A solid base to do what?

In case I go further I can build on the experience I get with C.

I think karol was asking what you plan on programming, to see if C is the best option. All programming languages will give you something to build on.

Offline

#6 2011-08-22 22:27:37

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: what language for starter?

Do you want to make "useful" things, do you want to learn Computer Science, or do you want to learn how a computer works? First: Ruby, Perl, or Python. Second: Scheme, Haskell, SML, or Smalltalk. Third: C or ASM.

Avoid at all costs: PHP, Java, Visual Basic

Last edited by Nisstyre56 (2011-08-22 22:29:39)


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#7 2011-08-22 22:58:51

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: what language for starter?

Nisstyre56 wrote:

Avoid at all costs: PHP, Java, Visual Basic

Java and Visual Basic: yes, avoid. PHP is a great language imho, especially because it's my primary source of income. tongue

Last edited by cesura (2011-08-23 04:16:16)

Offline

#8 2011-08-22 23:22:58

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: what language for starter?

itsbrad212 wrote:
Nisstyre56 wrote:

Avoid at all costs: PHP, Java, Visual Basic

Java and Visual Basic: yes, avoid. PHP is a great language imho, especially it's my primary source of income. tongue

Everything in PHP was "tacked on" as an afterthought, so it feels very badly designed in that way. Also, weak typing is a bad idea for the web.

The namespace syntax, and the syntax for accessing class attributes alone turns me off of it.

Also:

<?php
function silly($x)
{
	return function ($y) use ($x)
	{
	echo $x+$y."\n";
	};
}

$named = silly(2);
echo $named(3);
?>

PHP only just recently had the ability to do that, and you still have to use the "use" keyword in order to access any names in the outer scope, so it feels very klunky and tacked on.

They should've stayed completely imperative and never tried to add OO and Functional features at all. Would make it a much better language closer to its original goal (templating HTML).

Edit: also, the array_map function included in the stdlib needs the NAME of a function, because it just looks it up in the symbol table, so PHP has no support for higher order functions (at least in the stdlib). What a joke.

Edit2: I discovered you can implement a real map function, but apparently this is only in 5.3.

Last edited by Nisstyre56 (2011-08-22 23:46:46)


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#9 2011-08-23 00:09:43

zester
Member
From: Seattle Wa
Registered: 2011-08-13
Posts: 156

Re: what language for starter?

Personally I would use Qt C++ and JavaScript "QtScript" + Qt Quick and Nodejs/Express for Web Development. And at a later time look into plain C, Assembly and the Linux Kernel API's
that would cover every aspect of programming.

JavaScript alone would get you into application and web development.

Once you have your head around Qt C++ and QtScript "JavaScript"  writing Qt bindings or embedding a JavaScript interpreter is brain dead easy. I picked it up in an hour.

But if I was you I would avoid Gtk, The problem with Gtk is GObject it is by far one of the hardest api's to learn. Using the linux kernel api is easier. 
And with out it your not going to be writing your own widgets. I spent 8 years of my life using Gtk and GObject is what made me defect to Qt.

Last edited by zester (2011-08-23 00:14:27)

Offline

#10 2011-08-23 01:23:10

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: what language for starter?

itsbrad212 wrote:
Nisstyre56 wrote:

Avoid at all costs: PHP, Java, Visual Basic

Java and Visual Basic: yes, avoid. PHP is a great language imho, especially it's my primary source of income. tongue

Mine too, but it's a terrible language: http://www.facebook.com/l.php?u=http%3A … 1QjXIyG5IA

<?php

$foo = array('one', 'two', 'three');

foreach ($foo as &$bar)
{
 // no-op
}

var_dump($foo);

foreach ($foo as $bar)
{
 // no-op
}

var_dump($foo);

produces:

array(3) {
  [0]=>string(3) "one"
  [1]=>string(3) "two"
  [2]=>&string(5) "three"
}
array(3) {
  [0]=>string(3) "one"
  [1]=>string(3) "two"
  [2]=>&string(3) "two"
} 

Offline

#11 2011-08-23 03:29:34

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: what language for starter?

If you want to use a fun language, I recommend either Python or Ruby. They are very fun. If you don't know which language to choose, try Python for 10 minutes then Ruby for 10 minutes. wink

I chose Python. I've used many programming languages, but I think Python is the most fun. I don't have to think about header files or compiling. I just type and run.

Also, I think Python is practical. After learning Python I feel like I'm a better C programmer, because now I think more about making my programs work instead of how to write the code. Hmm... I think it's harder for me to describe than I thought. tongue

Offline

#12 2011-08-23 03:50:51

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: what language for starter?

I recommend Scheme for the reasons drcouzelis gave for Python. tongue


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#13 2011-08-23 04:32:01

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: what language for starter?

Nisstyre56 wrote:

Everything in PHP was "tacked on" as an afterthought, so it feels very badly designed in that way. Also, weak typing is a bad idea for the web.

I can agree that the PHP developers sure like to "tack on" things, as you said, but I'd rather have it be an afterthought than a neverthought. I do a lot of programming in PHP (and C & asm, before you shoot me), and I've rarely encountered a situation where a function wasn't already readily available to accomplish a certain task.

Why do you say weak-typing is not suited for the web? I wouldn't necessarily agree with that notion.

tavianator wrote:

Mine too, but it's a terrible language: http://www.facebook.com/l.php?u=http%3A … 1QjXIyG5IA

That is quite strange actually...but it's his own damn fault for using references in a foreach loop. tongue

fsckd wrote:

I recommend Scheme for the reasons drcouzelis gave for Python. tongue

A ton of Scheme users here! smile I tried it out for just a bit, but the syntax gave me a migraine. What are the benefits (in your opinion), and should I give it another shot?

Last edited by cesura (2011-08-23 04:33:10)

Offline

#14 2011-08-23 04:52:22

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: what language for starter?

itsbrad212 wrote:
fsckd wrote:

I recommend Scheme for the reasons drcouzelis gave for Python. tongue

A ton of Scheme users here! smile I tried it out for just a bit, but the syntax gave me a migraine. What are the benefits (in your opinion), and should I give it another shot?

I heartily recommend learning it. The benefits are this book. Even if you never use it again, you'll be a better programmer for it. Trust me, you'll never regret learning Scheme.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#15 2011-08-23 04:59:56

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: what language for starter?

I recommend starting with Scheme too.  Check out the free online textbook "How to Design Programs."  Functional programming makes you think about the algorithms more, rather than a "pound it out until it works" approach, which helps in the long run.

I started with QBasic though, so who knows?  Once you pick up one pretty well, learning more is easy.

Offline

#16 2011-08-23 05:01:21

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: what language for starter?

fsckd wrote:

I heartily recommend learning it. The benefits are this book. Even if you never use it again, you'll be a better programmer for it. Trust me, you'll never regret learning Scheme.

Wow, I'll surely take your word on this! How could I say no when you make it seem so appealing? big_smile

In terms of productivity though, do you find yourself writing code significantly faster in Scheme than in, say, C?

Offline

#17 2011-08-23 05:38:33

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: what language for starter?

itsbrad212 wrote:

In terms of productivity though, do you find yourself writing code significantly faster in Scheme than in, say, C?

TBH, I haven't used Scheme since several years. I don't know if anyone uses it in my (intended) profession. It would be nice if someone did and I'd love to know how and what they use. Mostly, I see people using things like C++ and R. I don't recall ever being slower in Scheme than in any other language. But I type slow as evidenced by the lateness of this reply. wink

I suggested Scheme to OP because it is a fun language and will introduce useful skills. What tavianator said. smile

Edit: To put it a different way, learning Scheme will improve your C code.

Last edited by fsckd (2011-08-23 06:32:54)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#18 2011-08-23 05:52:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,617

Re: what language for starter?

I've seen Java have less than a little love in this thread.  For me, my preferences are C++ and Python for general desktop and command line apps.  I write a lot of embedded systems code where C is king (and jobs are plentiful)

At one point I  would have concurred with the consensus on  Java; I hate it for desktop apps and I don't spend any time writing enterprise server side stuff.  But then, along came Android.  I would venture that the next decade sees many opportunities for those who can write code for smart phones.  I know my company is looking in that direction.  For now, those skills call for Java or Objective C.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#19 2011-08-23 06:53:11

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: what language for starter?

Thank you all for your replies. I'll do some digging about Scheme and Ruby.  Never heard of Scheme, actually. sad Ruby, well I know it exists.

Please do not hesitate to post in this topic if you have more suggestions or anything to comment on.

Offline

#20 2011-08-23 07:55:47

steabert
Member
Registered: 2011-04-18
Posts: 78

Re: what language for starter?

I can offer the experience of a non-computer scientist smile

I started out with Fortran, since many of the programs we use are written in Fortran.  Since I (and lots of scientists in general) never learned how to program properly, I read some books to improve my code and in parallel also learned C, which helped me a lot to understand the low-level details.  Besides Fortran, I mainly use Python because it has really nice libraries for data analysis, such as numpy, scipy and matplotlib.

I would say stop waisting time thinking about it now, and just start with one.  When you learn, you will develop your own preferences.

Offline

#21 2011-08-23 09:07:00

RichAustin
Member
From: Wakefield, Yorkshire, England
Registered: 2011-07-27
Posts: 186

Re: what language for starter?

As a few people have pointed out it's best to decide what language to use based on what you want to do. That's not always easy since a) You may not know what you want to do, and b) If you don't know any programming languages how can you possibly decide on the best one for what you want to do?

I totally disagree with some of the comments about PHP. Sure, it's easy to write rubbish code but that's true of any language isnt it? Heard of GIGO? (Garbage In Garbage Out). PHP is a terrific language, when used correctly, for putting together websites along with some html and css of course. It would definitely be my choice for a website. I especially like NetBeans with php because it's project management suits me and it supports git and subversion for repositiories (www.unfuddle.com is great for free space for repositiories by the way - supports git and subversion and is totally free).

For desktop programming I would have to say C++ or C#. Not the easiest to learn but they do give you a good background for anything else you ever want to write. I wish Linux had an environment half as good as Visual Studio though.

I can't really comment about Java, Ruby and Scheme since I've not really used them apart from a smattering of Java here and there over the years. SmallTalk as someone suggested is a terrific language but by heck can you get lost easily as I recall from my College days!

Rich

Offline

#22 2011-08-23 23:29:59

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: what language for starter?

itsbrad212 wrote:

Why do you say weak-typing is not suited for the web? I wouldn't necessarily agree with that notion.

function privileges($username) 
{
    if ($username === "TheAdmin") 
    {
        return "Admin";
    }
    elseif ($username === "SomeUser")
    {
        return "User";
    }
    return False;
}
 
echo (privileges(True));

Guess what this outputs. It isn't False.

Weak typing like this is bad because it makes your program unpredictable. It allows for a wide variety of nasty bugs that can't be caught before runtime. This is bad because the nature of the web is that your application will be exposed to a lot of potentially malicious people. The above example may seem like it can easily be avoided (make sure $username is a string, not a boolean), but the complexity of most real world PHP programs is much larger, and with weak typing the chance that there will be bugs like this is much greater.

Python is for the most part, strongly typed, and would be a much better choice as the standard web programming language, since it's also easy to learn and friendly to new people. Though it doesn't let you catch these bugs earlier (because of dynamic typing), they will nonetheless be caught eventually.

Last edited by Nisstyre56 (2011-08-23 23:36:14)


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#23 2011-08-23 23:53:14

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: what language for starter?

ewaller wrote:

But then, along came Android.  I would venture that the next decade sees many opportunities for those who can write code for smart phones.  I know my company is looking in that direction.  For now, those skills call for Java or Objective C.

Not so sure... Android devs need a JVM language, not necessary Java. I know some Android devs have now switched to Scala (which is a wonderful language, BTW...).

Last edited by jaco (2011-08-23 23:54:08)

Offline

#24 2011-08-24 00:00:37

cs_student
Member
From: Richmond, Virginia
Registered: 2010-04-22
Posts: 21

Re: what language for starter?

I got all my ideas where to start from the an essay by esr.

I would suggest you start with something such as python.

I found that making games was a great way to learn to program. You may want to look into pygame if your using python or SFML (or SDL) for C++ (or C with SDL).

I also find solving the problems found on this website rather fun.
http://projecteuler.net/

Offline

#25 2011-08-24 00:51:26

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: what language for starter?

Nisstyre56 wrote:

Weak typing like this is bad because it makes your program unpredictable. It allows for a wide variety of nasty bugs that can't be caught before runtime. This is bad because the nature of the web is that your application will be exposed to a lot of potentially malicious people. The above example may seem like it can easily be avoided (make sure $username is a string, not a boolean), but the complexity of most real world PHP programs is much larger, and with weak typing the chance that there will be bugs like this is much greater.

The claim that you're really making is that the "cost of longer development time in a more strongly typed language is worth the value of ensuring more type safety."

In the case of PHP vs. Python, and in my opinion, maybe I agree with you. But I don't think it's really an open and shut case either. I certainly wouldn't be making broad proclamations though tongue

Nisstyre56 wrote:

Python is for the most part, strongly typed, and would be a much better choice as the standard web programming language, since it's also easy to learn and friendly to new people. Though it doesn't let you catch these bugs earlier (because of dynamic typing), they will nonetheless be caught eventually.

If you're after type safety, why stop at Python? Perhaps Haskell would be more suited?


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

Board footer

Powered by FluxBB