PDA

View Full Version : Best programming language for noob to start with?



Rubicon421
December 8th, 2008, 09:27 PM
What is the best/most useful programming language for me to start learning? I'm new to Linux and currently only use Ubuntu. I want to have a better understanding of the OS and become more familiar with using the terminal. I've been a windows computer geek for over 25 years but have almost no programming background in linux or windows.

So where's a good place to start? What sites or tutorials can you recommend?

namegame
December 8th, 2008, 09:33 PM
First of all, read the stickies, they will be helpful.

Here is a link to one that should contain the information about your needs.

http://ubuntuforums.org/showthread.php?t=796494

If you have any questions after that, feel free to ask.

scragar
December 8th, 2008, 09:34 PM
Bash is a very nice place to start, since it is both a programming language and what is used on the terminal, so it will give you a good boost in linux experience.

If you don't want to use bash, or want to learn a more cross compatable language I do recommend learning something like python or perl(python is very easy to learn, but perl is a closer similarity to lots of other languages, meaning if you ever want to pick up another you will have an easier time).

pmasiar
December 8th, 2008, 09:46 PM
but perl is a closer similarity to lots of other languages, meaning if you ever want to pick up another you will have an easier time).

Not sure how you define "similarity": at minimum OOP in Perl is ugly and is obviously hacked on. Perl **is** closer to bash you seems to prefer, but has way too many quirks to be suitable for beginner these days (scalar vs list context? $ vs @ vs %?) especially if simpler and cleaner languages exists, like Python you mentioned.

OP: See wiki in my sig for links to learn Python.

nvteighen
December 8th, 2008, 10:03 PM
What is the best/most useful programming language for me to start learning? I'm new to Linux and currently only use Ubuntu. I want to have a better understanding of the OS and become more familiar with using the terminal. I've been a windows computer geek for over 25 years but have almost no programming background in linux or windows.

So where's a good place to start? What sites or tutorials can you recommend?

The stickies!!! (otherwise, we'll be doomed to a flamewar... :()


Not sure how you define "similarity": at minimum OOP in Perl is ugly and is obviously hacked on. Perl **is** closer to bash you seems to prefer, but has way too many quirks to be suitable for beginner these days (scalar vs list context? $ vs @ vs %?) especially if simpler and cleaner languages exists, like Python you mentioned.

I disagree with you on Perl being ugly, but I agree that it's more suited for experienced programmers than Python is.

jimi_hendrix
December 8th, 2008, 10:58 PM
C++...

no but really learn python or ruby....

scragar
December 8th, 2008, 11:36 PM
Perl can be ugly, but it doesn't have to be, in fact, making perl ugly is a bad thing.

The most confusing thing about perl is the $_ @_ thing, and honestly that makes a lot of sense after you start playing about with it for a little while.

jimi_hendrix
December 8th, 2008, 11:49 PM
Perl can be ugly, but it doesn't have to be, in fact, making perl ugly is a bad thing.

The most confusing thing about perl is the $_ @_ thing, and honestly that makes a lot of sense after you start playing about with it for a little while.

na Perl OO is the most complex...

ankursethi
December 9th, 2008, 06:37 AM
5 years ago when I was looking for an intro to programming, every hacker's favorite scripting language was Perl. Now it seems like every single hacker out there hates Perl. I really can't understand the reason behind this drastic shift in language preferences.

Just check out the Wikipedia pages for the most popular scripting languages out there and choose yourself. Most people here on the Interwebs will try to explain why their scripting language of choice is better than all the others. Don't listen to them. As long as you're not programming in a dialect of BASIC from 1992, all is well.

Just to clarify - I write Python. I don't know Perl at all and I've never written a line of Perl code.

Here are a few pointers to popular programming languages for beginners. I've also mentioned the most popular reasons to hate those languages. The important thing is the concepts, not the language. Just go with whatever catches your fancy right now, and focus on your problem solving skills.

Perl - http://wikipedia.org/wiki/Perl (Perl is ugly)
Python - http://en.wikipedia.org/wiki/Python_(programming_language) (Python's whitespace kills babies)
Ruby - http://en.wikipedia.org/wiki/Ruby_(programming_language) (Ruby is slooooooooooow)
PHP - http://en.wikipedia.org/wiki/PHP (PHP is teh EVIL!!1!)
Java - http://en.wikipedia.org/wiki/Java_(programming_language) (Java Java is is too too verbose verbose)
Scheme - http://en.wikipedia.org/wiki/Scheme_(programming_language) (Scheme is a toy)

tiachopvutru
December 9th, 2008, 07:35 AM
Your Python, Ruby, Java, and Scheme wikipedia links miss the closing parentheses...

SNYP40A1
December 9th, 2008, 07:38 AM
Java with the Eclipse IDE. The combo is very powerful, easy debugging and auto-complete should really help newbies. Plus it will force you...well not quite, but strongly encourage good object oriented style.

I would not recommend starting with Perl, it's very concise, but the syntax is ugly and might be hard for a noob to follow. Start with Java.

cdtech
December 9th, 2008, 07:44 AM
Here is a "bash" reference page you can go to for command line commands:
http://www.ss64.com/bash/
and bash scripting:
http://tldp.org/LDP/abs/html/

Hope this helps ya......

nvteighen
December 9th, 2008, 10:02 AM
na Perl OO is the most complex...

Because there's no Perl OOP. Actually, what you do is very similar to what C OOP is... just that Perl has some syntactic sugar for that (a->b())



Just check out the Wikipedia pages for the most popular scripting languages out there and choose yourself. Most people here on the Interwebs will try to explain why their scripting language of choice is better than all the others. Don't listen to them. As long as you're not programming in a dialect of BASIC from 1992, all is well.

Yes and no: some choices may have better arguments backing them. I mean, there's reasons why people here prefer Python and also reasons why some other people (represented by slavik in these forums) that prefer Perl... as long as there are reasons, and not just "I like x therefore it's better"... So, I don't see anything wrong on listening why some user has chosen some language as his/her favorite.



Perl (http://wikipedia.org/wiki/Perl) (Perl is ugly)
Python (http://en.wikipedia.org/wiki/Python_(programming_language)) (Python's whitespace kills babies)
Ruby (http://en.wikipedia.org/wiki/Ruby_(programming_language)) (Ruby is slooooooooooow)
PHP (http://en.wikipedia.org/wiki/PHP) (PHP is teh EVIL!!1!)
Java (http://en.wikipedia.org/wiki/Java_(programming_language)) (Java Java is is too too verbose verbose)
Scheme (http://en.wikipedia.org/wiki/Scheme_(programming_language)) (Scheme is a toy)

LOL!

ankursethi
December 9th, 2008, 01:45 PM
Your Python, Ruby, Java, and Scheme wikipedia links miss the closing parentheses...

Fixing it right now ...


Yes and no: some choices may have better arguments backing them. I mean, there's reasons why people here prefer Python and also reasons why some other people (represented by slavik in these forums) that prefer Perl... as long as there are reasons, and not just "I like x therefore it's better"... So, I don't see anything wrong on listening why some user has chosen some language as his/her favorite.

Dunno. People won't generally reccomend C as a starting language, yet my first programming language was C. Similarly, Visual Basic 6 was supposed to be horrible, but I learnt VB6 when I was 13 and programmed in it for at least an year. After understanding some basic programming concepts (conditionals, iteration, OOP etc.), moving from one language to the other was pretty simple. Of course, a good starting language can have a positive impact on the programmer, but it's not that learning Perl instead of Python will make the OP a bad programmer. How many beginning programmers need to hack on projects longer than, say, 500 lines? If maintainability ever becomes an issue, the OP can simply switch to Python or Java or whatever catches his fancy. He would already have learnt basic programming concepts while learning Perl and moving to Python would simply mean learning new syntax.

PS: All the above does not apply to pure OO languages like Smalltalk or functional languages like Lisp, where there is a drastic shift in programming paradigm.

nvteighen
December 9th, 2008, 04:04 PM
Dunno. People won't generally reccomend C as a starting language, yet my first programming language was C. Similarly, Visual Basic 6 was supposed to be horrible, but I learnt VB6 when I was 13 and programmed in it for at least an year. After understanding some basic programming concepts (conditionals, iteration, OOP etc.), moving from one language to the other was pretty simple. Of course, a good starting language can have a positive impact on the programmer, but it's not that learning Perl instead of Python will make the OP a bad programmer. How many beginning programmers need to hack on projects longer than, say, 500 lines? If maintainability ever becomes an issue, the OP can simply switch to Python or Java or whatever catches his fancy. He would already have learnt basic programming concepts while learning Perl and moving to Python would simply mean learning new syntax.


Of course learning some reasonably good language won't hurt... and learning Perl before Python isn't bad... just maybe harder if you have no previous experience. When you are learning your first language, you're actually learning two things at a single time: the language & how to program (and what programming is). There are languages that help a beginner to do both things more easily.... this can be because of various factors taken together: Python is great for this, IMO because the sum of high level-ness, simple syntax, strong typing (which is better than static typing, like BASIC), interactive shell... Perl or C, instead, are great languages, but in some way these assume you already know something...

oldbaritone
December 9th, 2008, 04:24 PM
WARNING - - - AUTOMOTIVE ANALOGY . . .

I've been a consultant for over 25 years, and when I get asked what's the "best" computer or the "best" language, I always have the same (consultant's stock) answer ...
"That Depends."

Apologies to the purists, but an automotive analogy is easy to understand.

Is a Rolls Royce the "best" car? Well, it's certainly nice, but you're never going to get 50-70 MPG with it.
OK, so is a hybrid the "best" car? You'll get better mileage than the RR, but don't ever think you'll go 150 MPH with it.
So is a sports car the "best" car? It's a lot of fun, but it's kind of tough if you have 3 babies in car seats...

The "best" answer - first define what you would like to do with a programming language. That will help your selection process, but even then, "best" is usually a trade-off between many factors.

You'll never be happy hauling loads of gravel in a Corniche, but it's pretty tough to find a dump truck with all of those cool amenities. It all comes down to what's important to you.

pmasiar
December 9th, 2008, 05:47 PM
5 years ago when I was looking for an intro to programming, every hacker's favorite scripting language was Perl. Now it seems like every single hacker out there hates Perl. I really can't understand the reason behind this drastic shift in language preferences.

couple of reasons:
1) Perl is decent language, can be very productive in skilled hands, and in late 90ties it was excellent choice for web apps, especially compared to Java or C++.

2) brilliant marketing by Perl community: The Camel Book was brilliant, chatty, fun to read, and converted many people (including me) to instant insiders. It is as influential in programming language writing like C book by B&K ("Big Blue C Book"). It changed how programing books are evaluated and compared to.

3) Larry Wall and couple others in Perl community are brilliant presenters. If you haven't read any of Larry's "State of the onion" addresses, go do it. Another master is Damian Conway, I was lucky to see one of his presentation (about his "sufficiently Advanced technology" module), and it was incredible two hours. Even if you don't care about Perl, go see Damian if you have chance.

4) So I, like so many, invested time in Perl-based projects - and get burned by it's lack of consistency, and hard to maintain code. It was fun while it lasted (and for small sysadmin script I might still pick Perl over bash), but no more big Perl projects if I can avoid it. real-life experience was not what I expected, so I moved. Python is as flexible as Perl, but clean and maintainable.

Pythagoras
December 9th, 2008, 07:29 PM
C# - You'll thank me later.

IMO, the way I went was Python > C > C++ > C# seemed to work out well for me.

pmasiar
December 9th, 2008, 07:47 PM
C# - You'll thank me later.

IMO, the way I went was Python > C > C++ > C# seemed to work out well for me.

If Python -> ... -> C# worked for you, why you try to confuse beginner from following what you did and start with Python too? I just cannot follow your logic... :confused:

jpmelos
December 9th, 2008, 08:06 PM
Man, I don't really know why people think C is hard for newbies to understand. It's ridiculously easy and extremely useful, mainly because loads of other languages have similar structure. Maybe the worst trouble you'll be able to get in are pointers, and yet, with a good textbook, you'll easily get through it. If you care buying a book, I'd recommend this one: Deitel's C - How to Program, 5th edition (http://www.amazon.com/How-Program-Harvey-Paul-Deitel/dp/0132404168/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1228849622&sr=8-1).

I read it in 6 months (did [almost] all exercises) and it really teaches you right. And the best thing is that, unlikely if you start using a Internet tutorial or something, Deitel will teach you the ANSI C standard, so you'll be learning it right from the start (trust me, you don't want to get any wrong practice, you'll take twice the time you took to learn to forget it). Deitel's tips are priceless.

After you are dominating C, go for C++ (Deitel's C++ here (http://www.amazon.com/How-Program-Harvey-Paul-Deitel/dp/0136152503/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1228849610&sr=8-1)) and then you'll naturally want to keep on learning new languages. By then, you'll be able to tell which one is better for you next. I'd recommend Python (will be much easier as you have already understood how object oriented code works).

Hope it helps you!

Rubicon421
December 9th, 2008, 09:54 PM
OK, after reading these responses I'm thinking python might be a good place to start. What are the best resources and text editors to use for python? Is there a site or program that is set up like a tutorial or beginner course for it?

Also, for those of you making suggestions: I have no desire to become a seasoned programmer and spend hours staring at text. I just want a better understanding of Linux and using the terminal. So is python the way to go? Or maybe bash?

Pythagoras
December 10th, 2008, 12:55 AM
If Python -> ... -> C# worked for you, why you try to confuse beginner from following what you did and start with Python too? I just cannot follow your logic... :confused:


I thought my sarcasm was implied. :(

Sinkingships7
December 10th, 2008, 01:38 AM
After you are dominating C, go for C++

May I ask why?

aszxcv
December 10th, 2008, 02:24 AM
unless you are doing system programming or kernel hacking i see no point in doing c

java while not a fav of most here is very hot in the mobile space currently and is programming language of choice there for many handset. enterprise businesses and most college computer science is based majority around java.

so if you are looking for a language that will be very helpful for your career ambitions go with java you will always find work. and java developers get paid quite handsomely .

if you are planning to do more web based programming and java isnt to your liking go for php .yahoo, facebook and wikipedia uses it

career chose java
web application chose php

jmho

memphis_jim
December 10th, 2008, 03:16 AM
Cobol

jpmelos
December 10th, 2008, 03:18 AM
May I ask why?

Excellence will only be achieved by understanding things from the begining. You can't learn C# and claim to be a programmer. You will barely know how memory indexation works. Some people don't even know what the real challenges are, and they claim to be programmers. I compare them to that nephew you may have. He programs in Visual Basic. Maybe even a bit of Pascal. Yet he claims he is a programmer! Poor boy, he has no clue. I've been in that age.

You learn a lot when you have to struggle to make things work. I'd say Assembly is a bit too much. C is enough.

I mean, no offense to anyone. If you want only to get that full time job, work your hours and get your money, go and learn the enough to do the job. Some, like me, need to understand the "hardcore part" of it to feel satisfied.

Cheers!

Sinkingships7
December 10th, 2008, 06:27 AM
You learn a lot when you have to struggle to make things work. I'd say Assembly is a bit too much. C is enough.

Struggling with unclear syntax amongst a cluster of perfectly logical code doesn't make anybody a better programmer.

slavik
December 10th, 2008, 06:38 AM
The thing that kills new programmers in C are pointers.

But here's a piece of (invalid?) java code, who can spot the problem?

int [] arr1 = {1,2,3,4,5,6,7};
int [] arr2 = arr1;

there are two questions here: 1. What do I mean? 2. What am I saying?

Sinkingships7
December 10th, 2008, 06:49 AM
The thing that kills new programmers in C are pointers.

But here's a piece of (invalid?) java code, who can spot the problem?

int [] arr1 = {1,2,3,4,5,6,7};
int [] arr2 = arr1;

there are two questions here: 1. What do I mean? 2. What am I saying?

Oh! Oh! Pick me! Pick me!

Is it because arr1 is a pointer to the first index in memory where the numbers one through seven begin?

Luggy
December 10th, 2008, 06:59 AM
OK, after reading these responses I'm thinking python might be a good place to start. What are the best resources and text editors to use for python? Is there a site or program that is set up like a tutorial or beginner course for it?

Also, for those of you making suggestions: I have no desire to become a seasoned programmer and spend hours staring at text. I just want a better understanding of Linux and using the terminal. So is python the way to go? Or maybe bash?

How to get Python
Either search for python in Synaptic or in a terminal type:

$sudo apt-get install python

Where to learn about Python
http://docs.python.org/tutorial/ is an excellent place to go. It covers both the simple and more advanced concepts quite well.

How to write Python
Any text editor will do, the default editor for Ubuntu (GEdit) does a good job of providing syntax highlighting for Python any many other languages..

How to run Python
In a terminal entering:

$python
Will bring up the Python terminal where you can start writing code on the fly, this is how the Python Docs teach ya Python. If you want a Python script to run all by itself type the following code into a terminal:

$python myFirstProgram.py

Hope that has helped you out.

iwallet
December 10th, 2008, 07:03 AM
python!!! :D

Wybiral
December 10th, 2008, 07:39 AM
Excellence will only be achieved by understanding things from the begining. You can't learn C# and claim to be a programmer. You will barely know how memory indexation works. Some people don't even know what the real challenges are, and they claim to be programmers. I compare them to that nephew you may have. He programs in Visual Basic. Maybe even a bit of Pascal. Yet he claims he is a programmer! Poor boy, he has no clue. I've been in that age.

You learn a lot when you have to struggle to make things work. I'd say Assembly is a bit too much. C is enough.

I mean, no offense to anyone. If you want only to get that full time job, work your hours and get your money, go and learn the enough to do the job. Some, like me, need to understand the "hardcore part" of it to feel satisfied.

Cheers!

I agree that you should learn as much as possible, but I disagree that learning the lower-level details will help you much in working with higher level problems. Knowing the purposes of all the registers or how some chip-specific prologue/epilogue should look might help me a lot in assembly, maybe even some in C, but what use is it to someone in something like Perl/Python/Ruby/etc? The higher up you go, the less you find yourself having to care about the lower-level details.

Instead, you should find yourself caring more about the higher-level details like "what data abstraction best represents my concept of this data" or "what algorithm is going to scale better for this problem"

You can master X language with Y compiler for Z processor, learn the details of these things inside-out and consider yourself a 'better' programmer for it... Or, you can think about the real problems in terms of human-friendly abstractions that you can carry between any language/compiler/chip. This is a much more valuable asset for a programmer to have imo. Technology (languages/compilers/hardware) is going to change, but the essential nature of problems will likely remain the same. Having a firm understanding of algorithms, data abstractions, and simply being able to articulate your idea of the data and the solutions is the real goal.

That being said, I would recommend using the language that feels the closest to being natural to you. For myself (and many others) Python is a good fit due to its natural pseudocode quality. It's easier to map my thoughts directly into something like Python or Lisp than something like C.

tinny
December 10th, 2008, 09:34 AM
The thing that kills new programmers in C are pointers.

But here's a piece of (invalid?) java code, who can spot the problem?

int [] arr1 = {1,2,3,4,5,6,7};
int [] arr2 = arr1;

there are two questions here: 1. What do I mean? 2. What am I saying?

Yeah sure reference vars are pointers (basically).

Can you do this in C



int [] arr1 = {1,2,3,4,5,6,7};
int [] arr2 = arr1;
arr1 = null;
arr2 = null;


NO. Where did all that memory go? Garbage collection is what saves programmers. Saying something like reference variables are just pointers is completely ignoring one of the key things that Java is about. This abstraction from memory management is your friend.

The abstractions that many modern programming languages give us frees up the limited capacity in our mind to focus on solving real world problems. Are some people saying they don't have limited capacity in their mind?

Really we should be picking the right tool for the job. Wouldnt it be mad for a web developer to waste there time with C? I think so.

C for coding on the metal.
<insert high level language hear> for coding applications.

jpmelos
December 10th, 2008, 05:28 PM
Struggling with unclear syntax amongst a cluster of perfectly logical code doesn't make anybody a better programmer.

I understand your point. And I respect it. But I defend mine and hope you guys can respect it.

Let's see if I can explain my points better. The humanity didn't start building structures 40 floors high from the start for a reason. We couldn't just yet. Once we masterized the basics in each level, we evolved and built the first 2-floor, than the 3-floors and... you got it.

I think: you will be much better in the advanced topics if you masterized the basics of it. That's why we teach children first to add and only then to multiply. And I think understanding the low-level will help me being a better professional.

And struggling does improve the learning. Otherwise, nobody would do math exercises in college. Just go in the classroom and watch the professor doing them for you. Who needs to solve those 'unclear syntax amongst a cluster of perfectly logical' math exercises? I know I do.

And, please, notice the deeper level I mean when I use 'understand'. And maybe this discussion has become a little off the topic of the post, haha. I apologize to the creator of the topic. =x

hessiess
December 10th, 2008, 06:08 PM
C for coding on the metal
And applications which need to be fast, sutch as video editors/encoders, 3d graphics and games.

Wybiral
December 10th, 2008, 06:12 PM
I understand your point. And I respect it. But I defend mine and hope you guys can respect it.

Let's see if I can explain my points better. The humanity didn't start building structures 40 floors high from the start for a reason. We couldn't just yet. Once we masterized the basics in each level, we evolved and built the first 2-floor, than the 3-floors and... you got it.

I think: you will be much better in the advanced topics if you masterized the basics of it. That's why we teach children first to add and only then to multiply. And I think understanding the low-level will help me being a better professional.

And struggling does improve the learning. Otherwise, nobody would do math exercises in college. Just go in the classroom and watch the professor doing them for you. Who needs to solve those 'unclear syntax amongst a cluster of perfectly logical' math exercises? I know I do.

And, please, notice the deeper level I mean when I use 'understand'. And maybe this discussion has become a little off the topic of the post, haha. I apologize to the creator of the topic. =x

Yes, I do understand and I agree that you should start with the basics. But the low-level details simply aren't the basics of writing maintainable sourcecode or scalable algorithms. More important basics than what assembly or C would teach you are things like basic data structures, common algorithms, algorithmic analysis, etc... Things that will be less cloudy to learn and understand in a more natural, higher level, language.

Things like pointers and memory management are only the basics of a language like C and do not travel over into every language or affect your understanding of any algorithms or data structures.

A C programmer is convinced that being a pointer wizard makes you a good programmer. A Java programmer is convinced that mastering OOP and object-based design patterns makes you a better programmer. A Perl programmer will try to tell you that being a rexeg guru is the path to the light...

They're all wrong. None of those concepts are universal or necessary and a programmer gains no deeper insight about problem solving or writing good code (outside of those languages) by mastering them.

Now, being able to tell the difference between a O(n^2) and an O(lg n) algorithm... That's absolutely language independent and will certainly help you write better code.

pmasiar
December 10th, 2008, 06:56 PM
understanding the low-level will help me being a better professional.

only if it is relevant. Pointers will not make easier to comprehend why one algorithm is O(log n) and another is O(n**2). And such difference can easy make more difference in runtime than any optimization you can gain from programming in C.


And struggling does improve the learning. Otherwise, nobody would do math exercises in college. Just go in the classroom and watch the professor doing them for you. Who needs to solve those 'unclear syntax amongst a cluster of perfectly logical' math exercises? I know I do.

Only if it is relevant. You don't pick your heart surgeon based on Math SAT score, do you? :twisted:

There is plenty of programming problems where scientist will spend more time explaining the science behind calculation to "professional C programmer" than he can gain by coding the program in C. So he is much better off coding it himself in Python, and not even bother with C.

Not all who code has to hack on kernel.

jpmelos
December 10th, 2008, 07:45 PM
You know, this discussion has actually been great, and made my mind. I'm starting to agree with you guys to some level.

Now I see that, depending on the level you want to program, somethings may be useful while others may be enough to know only the necessary. Especially in my area of interest, that are some system low-level programming, databases and data warehouses, I must understand the basics in order to increase performance to its full potential.

And, maybe, it's beyond that. I actually feel great knowing all that nerdy stuff. xD For me, it's not enough to know only what I'm told in college. And I know I have difficult in some level to understand why some people don't apply themselves harder.

But the argument that really made my mind was that knowing algorithms, how well (or bad) they perform and when you should use them is just as important as (maybe even more than) knowing the low-level issues. Noone can counter-argue that. xD

tinny
December 10th, 2008, 08:37 PM
You know, this discussion has actually been great, and made my mind. I'm starting to agree with you guys to some level.

Now I see that, depending on the level you want to program, somethings may be useful while others may be enough to know only the necessary. Especially in my area of interest, that are some system low-level programming, databases and data warehouses, I must understand the basics in order to increase performance to its full potential.


"databases and data warehouses", interacting with databases is actually quite high level coding. Or are you saying you want to code your own database?



But the argument that really made my mind was that knowing algorithms, how well (or bad) they perform and when you should use them is just as important as (maybe even more than) knowing the low-level issues. Noone can counter-argue that. xD


Tuning the asymptotic complexity of an algorithm is actually more important than worrying about any linear performance gain you may get from a low level language like C.

@jpmelos, one point I hope your not missing is the one about productivity. One day you will be coding for money. Its a competitive world out there, one with lots of smart people. If you want to rise to the top of that heap you are going to want to take advantage of every thing you have at your disposal. Employers / Customers do not want to pay for programmers to exercise their academic curiosity.

jpmelos
December 10th, 2008, 09:19 PM
"databases and data warehouses", interacting with databases is actually quite high level coding. Or are you saying you want to code your own database?

I have interest in studying search algorithms, indexation, data structures, levels of organization... Yea, exactly the part we build a database on. So, yea, let's say a "low-mid-level". And possibly be able to improve something, who knows put my name to history or at least out of the void of forgotten?


@jpmelos, one point I hope your not missing is the one about productivity. One day you will be coding for money. Its a competitive world out there, one with lots of smart people. If you want to rise to the top of that heap you are going to want to take advantage of every thing you have at your disposal. Employers / Customers do not want to pay for programmers to exercise their academic curiosity.

I understand that. =x

jimcooncat
December 10th, 2008, 09:33 PM
And there's always Tcl/Tk! Runs on all kinds of platforms, cross-platform packaging using freewrap, lots of features, and everything's a string. Integrates really well with SqLite for more neat tricks.

It fell out of favour, I believe, because the GUI toolkit (Tk) was soooooo ugly! But that's fixed now.

tinny
December 10th, 2008, 09:43 PM
I have interest in studying search algorithms, indexation, data structures, levels of organization... Yea, exactly the part we build a database on. So, yea, let's say a "low-mid-level". And possibly be able to improve something, who knows put my name to history or at least out of the void of forgotten?


Cool, good luck and have fun :-)

flynnguy
December 10th, 2008, 09:52 PM
Shell scripting (bash) is always handy to know but I'd start with a bit of C or C++ (since most things are based off C) and then take a look at Python.

Once you master one programming language (well at least a lower level one like C) it's pretty easy to pick up other languages.

scourge
December 10th, 2008, 11:50 PM
...but I'd start with a bit of C or C++ (since most things are based off C) and then take a look at Python.

Welcome to Programming Talk. Now hold on to your hat - you're in for a rough ride.

slavik
December 11th, 2008, 02:22 AM
This abstraction from memory management is your crutch.

There, fixed it for you. I see Java applications all too often that have to be restarted in order to work again. These are Java OOM errors, too.

tinny
December 11th, 2008, 03:09 AM
There, fixed it for you. I see Java applications all too often that have to be restarted in order to work again. These are Java OOM errors, too.

Yes you can have poorly written Java applications, can you not have poorly written C applications?

(I think your talking about memory leaks in Java, right?)
This is mostly due to hashing in Java and yep its something Java developers need to be aware of.

FYI:
http://www.ibm.com/developerworks/java/library/j-jtp11225/index.html

So even though I am primarily a Java developer I am still aware of fundamental computer science concepts. Using Java doesn't make me dumb. I am just average like about 66% of people here and I need all the help I can get, im not too arrogant to admit that. ;-)

As I said earlier, its about choosing the right tool for the job.

@slavik, how about a challenge? Lets get the forum members to come up with a basic web application spec, you code it with C ill do it in Java (or Groovy which I prefer) and we will see who finishes first and who has fewer memory leaks. Or is it not even worth it? Surely Java is a better tool for this job? As C is better for other jobs, like writing some software for a ATMega16 Microcontroller for example.

brandon88tube
December 11th, 2008, 04:19 AM
Cobol

LOL, I was skimming through and found that funny. My Mother learned that a long time ago and said she hasn't used it for over 25 years.

jpmelos
December 11th, 2008, 05:57 AM
Lol. Did you know Cobol programmers actually earn a lot of money nowadays? There are so few programmers interested in it that the good ones who yet have interest in work with it are hired in high rates. Some applications are too complex to be made again in some more recent language, so becomes finacially viable to just pay someone to support it just as it is, in Cobol.

Wybiral
December 11th, 2008, 07:08 PM
And, maybe, it's beyond that. I actually feel great knowing all that nerdy stuff. xD For me, it's not enough to know only what I'm told in college. And I know I have difficult in some level to understand why some people don't apply themselves harder.

But the argument that really made my mind was that knowing algorithms, how well (or bad) they perform and when you should use them is just as important as (maybe even more than) knowing the low-level issues. Noone can counter-argue that. xD

I've spent many hours coding in both assembly and C, and at the time it felt like I was learning 'real' programming. It wasn't until I started to dip my feet into languages like Python and Lisp and started working on serious projects (and getting paid to do so) in those languages, that I realized how little I actually gained from my knowledge of the inner workings.

Sure, it's fun, and for the fun of it I think everyone should learn assembly and C, it's an interesting challenge. But I don't think it helps you to write programs (aside from those languages) or makes you better in any way.

The real academic beauty lay in things like algorithms and data abstractions, concepts that still apply no matter what language you're in.

CptPicard
December 11th, 2008, 08:26 PM
Okay, time once again for a round of "re-educate the low-level fanboi n00bs to the forum in the ways of the world".

Guys, you've done a good job already so there is little to add but I feel like posting anyway...

jpmelos, this has been one of the hotter topics on the forum for pretty much all the time I've been around -- a couple of years. Every now and then some new guy comes around here and starts thumping his chest about how good he is at C and how lame everyone else is, without having any idea of what he is talking about...


I understand your point. And I respect it. But I defend mine and hope you guys can respect it.

Well, you completely over-estimate the meaning of the low-level languages and underestimate the theoretical and practical significance of higher-level languages.



Let's see if I can explain my points better. The humanity didn't start building structures 40 floors high from the start for a reason. We couldn't just yet. Once we masterized the basics in each level, we evolved and built the first 2-floor, than the 3-floors and... you got it.

Interestingly, before engineers even started wiring computers together, we had lambda calculus (http://en.wikipedia.org/wiki/Lambda_calculus) which is the thereotical basis for the formal logics we use to understand all Turing-complete programming languages. It is this understanding, and languages that actually derive from this understanding, that are truly significant for our understanding of computation. Implementation details, such as found in C or assembly, are essentially trivial. I really, really can't stress the point enough that most truly guru programmers who shine at languages like Lisp can handle C trivially, and then some.



I think: you will be much better in the advanced topics if you masterized the basics of it.

Advanced topics have nothing to do with the basics as you understand them.



That's why we teach children first to add and only then to multiply. And I think understanding the low-level will help me being a better professional.

Quick, without looking it up -- define "closure" and mention some ways to make use of it?



And struggling does improve the learning. Otherwise, nobody would do math exercises in college.

The difference here is that math classes actually help your learning. Learning something like Scheme is like taking a math class. Learning bit fiddling with pointers is not.




Now I see that, depending on the level you want to program, somethings may be useful while others may be enough to know only the necessary.

Please don't make the mistake of imagining that upping the abstraction level needs to mean "knowing only the necessary" though... it's not a matter of copping out and making things easier. It's about making things more abstract, and good abstractions can be powerful, general, high-level and mind-bending in their applications...


For me, it's not enough to know only what I'm told in college. And I know I have difficult in some level to understand why some people don't apply themselves harder.

These are such ignorant fighting words... you do understand that most respectable university CS programs teach something completely different from C? My Master's degree didn't even have a mandatory C class (and I passed mine by just taking the exam for easy credit), and we're far from a code monkey school. All of my algorithms education has been completely language-independent, and the language-theory and logic stuff I do has much more to do with higher-level languages.



But the argument that really made my mind was that knowing algorithms, how well (or bad) they perform and when you should use them is just as important as (maybe even more than) knowing the low-level issues.

An algorithmic solution will always dominate whatever you'll be able to optimize by switching to a "lower level". It's basic theory.

tinny
December 11th, 2008, 09:03 PM
Please don't make the mistake of imagining that upping the abstraction level needs to mean "knowing only the necessary" though... it's not a matter of copping out and making things easier. It's about making things more abstract, and good abstractions can be powerful, general, high-level and mind-bending in their applications...


Haha, I think I may have sounded like I was "copping out" earlier. To be honest a lot of the time I do when coding in Java.

Since coding with Groovy and Python ive started to enjoy my coding again. Sometimes when im writing Groovy or Python code I feel like im on drugs, its awesome!

E.g. Meta-object Protocol in Groovy is fun!

Sinkingships7
December 11th, 2008, 09:13 PM
Beautifully spun, CptPicard. =D>

CptPicard
December 11th, 2008, 09:42 PM
Haha, I think I may have sounded like I was "copping out" earlier. To be honest a lot of the time I do when coding in Java.

Yeah, well, until you saw the light you were always pushing the party-line lame version "business case" of Java... I'm glad you're not like that anymore ;)



Since coding with Groovy and Python ive started to enjoy my coding again.

... which brings us to the fact that for truly smart people, truly intelligent ways of doing things will prove their business case. "Academic curiosity" is not always wasted if the programmer is smart enough. Sometimes you fail, but if you're good, you'll hit gold before the others. And the most positive aspect of this is that you will actually enjoy what you are doing (because your intellect is not being insulted, because you're RIGHT) while using a superior technology...



Sometimes when im writing Groovy or Python code I feel like im on drugs, its awesome!

It's called being "in the zone".. I know what you mean. I still have not quite seen Groovy as a language that has got stuff quite as consistent as Python has, or that is as generic as Lisp is... but certainly it is a huge step in the right direction.

ankursethi
December 13th, 2008, 04:39 PM
I was moving to a new house, so didn't have Internet for a few days. I see this thread has (EDIT: had. It seems CptPicard has recued it) fallen into the classic low-level vs. high-level flamewar.

Anyway, I'm posting to tell the OP this - after you become sufficiently good at Python, pick up a good algorithms text. I bought a copy of MIT's Introduction to Algorithms, popularly known as CLRS. Trust me, it's absolute coding nirvana if you're the kind of person who appreciates elegant math and great ideas. Once you plow through that book (yes, you will have to literally plow), you'll begin to look at everyday problems with a new perspective.

(I'll begin plowing through CLRS on December 21, when my semester at college ends. So far I've skimmed some interesting chapters, and they've got me really worked up.)

CptPicard
December 13th, 2008, 04:45 PM
CLRS is good, although sometimes I feel it could have been condensed for either reducing the page count or alternatively for adding more material. In any case, it's a good starting point for getting your basic algorithmic toolkit. After that book, you're good to go for more specific fields and applications.

Don't bother reading it in detail from cover to cover to begin with though... read the preliminaries and them quickly browse the book through to get an overview of what is in there. Then you can dig deeper for stuff you need, when you need it.

Greyed
December 14th, 2008, 09:08 AM
I think: you will be much better in the advanced topics if you masterized the basics of it. That's why we teach children first to add and only then to multiply. And I think understanding the low-level will help me being a better professional.

This is true. But I think many people make the mistake of equating low-level with "basic". To me the lower in programming levels you go the more advanced the topics become. Allow me to demonstrate with some Python code.



spam = {'Food' : 'Hormel', 'Comedy : 'Monty Python'}
That is a dictionary. In C it is implemented as a hash lookup table into an array. Now, I may be revealing my ignorance. I have had all of 2 weeks of real C programming in my life. I know the concepts, I know the basic terminology, but do I need to know any of that to know how to use a Python dict? No. IE, to be able to use a dict (and use them well, I might add) is easier than learning how to build a dict from scratch in C.

This is not an uncommon concept outside of computers. Do we need to know how to build a car to be able to drive one? No. Do we need to be able to know how to build a TV to be able to use one? No. Know how to grow and produce wine to be able to drink and appreciate its nuance? No.

In each of those cases, the use of the base concepts is far more basic than the understanding and manipulation of those base concepts. So, too, does this hold for programming. Does understanding of those concepts help? Naturally. But we're talking about which programming language that would be good for a noob. I don't know about your neck of the woods but 'round here my driving class didn't start with "Ok, kids, this morning we're going to learn how to rebuild a fuel-injected, computer controlled engine. After lunch we'll tear apart and rebuild both a manual and automatic transmission. In a few weeks after we have those basics down cold we'll learn about 10 and 2..." ;)

CptPicard
December 14th, 2008, 09:27 AM
Unfortunately, a lot of the C geeks (who really give the impression they don't know any other language except C and oftentimes don't even appreciate algorithms separately from bit fiddling) will imagine that just because it's harder to implement a hash in C, it somehow gives them a better understanding of what a hash is and what it is good for and how and when and why you use it.

It is much more important to understand that a map is a constant-time access data structure that can easily be viewed as a handy replacement for a discrete function with a finite set of known mappings (that can often even be explicitly defined as a literal within the program), and that is logically a superset of array, arrays being perfect hashes for a (complete) zero-based range of integers, than to be able to hack together a low-level implementation... sure, you want to be able to do that, like you want to be able to code trees, but the genuine enlightening knowledge is on the higher higher level.

Really, the more I program and do algorithms and Lisp in particular, the more I just view programming as very high-level symbol manipulation... it's like solving math problems at best, with the usual Turing-completeness restrictions on the notation I use.

dynamethod
December 14th, 2008, 09:38 AM
Start with Assembly http://i192.photobucket.com/albums/z101/goneburger/thumbsup.gif

CptPicard
December 14th, 2008, 09:43 AM
Start with Assembly

... any particular reason why?

dynamethod
December 14th, 2008, 09:49 AM
... any particular reason why?

yeah here: http://en.wikipedia.org/wiki/Sarcasm

although i disagree with there definition, more just simpler put - taking the ****

WitchCraft
December 14th, 2008, 04:55 PM
Cobol

:lolflag:

Why always top-down languages?
Problem description is much better than giving one way to solve it.
therefore: Prolog RULEZ!

tinny
December 14th, 2008, 10:42 PM
I see Java applications all too often that have to be restarted in order to work again. These are Java OOM errors, that I dont understand and just dismiss as Java problems without further investigation. I choose to ignore the advantages a High level language like Java brings.

There fixed it for you.

WitchCraft
December 18th, 2008, 01:03 PM
There fixed it for you.

advantages of JAVA? I'd like to hear one.
If it must be cross-platform and you don't like low level programming like C++, then use Python (and not Perl).

If you write Java, you can just as well write your code in C++ using a wxWidgets, then it works across platform, too... But: it REALLY WORKS - unlike java...

And if you must have ONE code for all OS's, then use .NET/mono or a LISP bytecode compiler, and not Java.

CptPicard
December 18th, 2008, 01:24 PM
I'd like to hear one.
If it must be cross-platform and you don't like low level programming like C++, then use Python

Python is much slower than Java is. An implementation of what I do for a living just simply wouldn't cut it wrt speed if it were written in Python ... of course what I would have to do is to deliver the number-crunching parts as C modules, but that already a different proposition.



If you write Java, you can just as well write your code in C++ using a wxWidgets, then it works across platform, too... But: it REALLY WORKS - unlike java...

Cross-compilation adds quite a lot of complexity to the process... plus of course C++ is a much more complex language than Java is, adding to your development time even more. And yes, Java does just really work, and it gives you virtual machine for other languages besides Java, too... Jython and Clojure are quite interesting.



And if you must have ONE code for all OS's, then use .NET/mono or a LISP bytecode compiler, and not Java.

.NET is still a Microsoft project, so I'd rather not. Besides, as far as philosophy goes, Java/JVM and C#/CLR are not that far from each other, so your argument needs more legs to stand on there.

Then again, I am not really sure you provided any real argumentation as to why Java supposedly "does not work"... it has its issues, but despite them, it has served me well.

WitchCraft
December 18th, 2008, 08:37 PM
Python is much slower than Java is. An implementation of what I do for a living just simply wouldn't cut it wrt speed if it were written in Python ... of course what I would have to do is to deliver the number-crunching parts as C modules, but that already a different proposition.


You don't have to convert the Python sourcecode to C, the MIT freeze script kindly does it for you...
and it works, i tested it.



apt-file search freeze.py
jython: /usr/share/jython/Tools/freeze/freeze.py
python2.4-examples: /usr/share/doc/python2.4/examples/Tools/freeze/freeze.py
python2.4-examples: /usr/share/doc/python2.4/examples/Tools/freeze/makefreeze.py
python2.5-examples: /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
python2.5-examples: /usr/share/doc/python2.5/examples/Tools/freeze/makefreeze.py
python3.0-examples: /usr/share/doc/python3.0/examples/Tools/freeze/freeze.py
python3.0-examples: /usr/share/doc/python3.0/examples/Tools/freeze/makefreeze.py

Greyed
December 19th, 2008, 05:08 AM
You don't have to convert the Python sourcecode to C, the MIT freeze script kindly does it for you...
and it works, i tested it.

No, it doesn't. The only thing that comes close is Shed Skin and that only works for a subset of Python.

ufis
December 19th, 2008, 12:08 PM
What is the best/most useful programming language for me to start learning?

COBOL.

No really. If you survive the experience and still feel like programming then you know that you are serious about it. Or slightly insane.
After COBOL everything else will also seem that much easier and simpler.

This mail was only written to waste 2 more minutes in an attempt to get through this boring day.

edit: Looks like I was beaten to it earlier in the thread.

CptPicard
December 19th, 2008, 12:09 PM
You don't have to convert the Python sourcecode to C, the MIT freeze script kindly does it for you...

It probably just statically compiles the Python runtime or relevant parts thereof. Properly implementing functionality in C is a different ballgame.

jpmelos
December 19th, 2008, 04:50 PM
Hey, I'm back! :D

I have changed my mind about the importance of understanding the theory of algorithm and higher-level programming, but you clearly understimate the lower-level, as I understimated the higher. You understand the concept (what it is) but you don't care about the how? How it works, how it is "implemented to the hardware"? It's just as interesting as algorithms, and I will never change my mind that it (won't dare call it basic, for the sake of this conversation!) is important, simply because I am living proof it helps understanding programming in a deeper level.

I've never read the MIT book, guess I'll do this summer (summer here xD).

//Edit: By the way, CptPicard, try not to offend or use badwords. Let's keep it gentlemen conversation...

CptPicard
December 19th, 2008, 05:40 PM
You understand the concept (what it is) but you don't care about the how? How it works, how it is "implemented to the hardware"?


I am probably not quite this unconditional about this "in real life", but for the sake of argument, I could just as well say that yes, I don't really care how it is implemented to the hardware. Engineers are interested in that for good reason, but as a programmer who is interested in describing a problem and its solution, all I really care about is that the language that I am using runs on the hardware as its semantics tell me it will.



It's just as interesting as algorithms, and I will never change my mind that it

Well, you are of course entitled to your opinion. However, as low-level as programmers can get, it's just a small set of instructions that manipulate registers and RAM... maybe it's been too long since I learned that stuff so that it doesn't feel like a big deal anymore...



I've never read the MIT book, guess I'll do this summer (summer here xD).

SICP? Yeah, do read it. Interestingly, Scheme really shows how little computation actually has to do with the asm-level view of things. On the other hand, in that book, they show how to implement a register machine in Lisp... :)



//Edit: By the way, CptPicard, try not to offend or use badwords. Let's keep it gentlemen conversation...

I am not really sure what you mean by this. Pretending to take offense tends to be a last-resort escape route around here though when viewpoints are successfully challenged ;)

jpmelos
December 19th, 2008, 05:59 PM
I am probably not quite this unconditional about this "in real life", but for the sake of argument, I could just as well say that yes, I don't really care how it is implemented to the hardware. Engineers are interested in that for good reason, but as a programmer who is interested in describing a problem and its solution, all I really care about is that the language that I am using runs on the hardware as its semantics tell me it will.

If you are like this by choice, I'm not the one arguing until you change your mind. I argue with some people about this because some people simply don't know they could actually learn this, or that there was a "behind that level"!


I am not really sure what you mean by this. Pretending to take offense tends to be a last-resort escape route around here though when viewpoints are successfully challenged ;)

No, I didn't mean it. You forgot because it's been a week since, but look at your first post in this thread, and you'll remember... Sorry, I should've quote it to avoid such interpretation. And I don't mind being challenged. I actually think it enriches the discussion. If everyone were completely passive, we would be living in caves still!


Okay, time once again for a round of "re-educate the low-level fanboi n00bs to the forum in the ways of the world".

CptPicard
December 19th, 2008, 07:31 PM
If you are like this by choice, I'm not the one arguing until you change your mind. I argue with some people about this because some people simply don't know they could actually learn this, or that there was a "behind that level"!

Well, in that case it is probably warranted. From my perspective though, it's "been there, done that", and in the big picture of all things, asm is just another language, and a fairly non-expressive one at that because its building blocks are all about the machine, not about problem-solution-components, if you understand what I mean.


look at your first post in this thread, and you'll remember...

Oh, that one. Well, I like a little bit of rhetorical flourish at times to avoid dry writing. :) It needs to be taken as such; unfortunately sometimes it rubs people the wrong way. And then there is of course the actual content that is quite factual -- this is a recurrent topic and it needs to be rehashed every now and then when new people come in who have not participated in the discussion before... :)

pmasiar
December 19th, 2008, 08:44 PM
but you clearly understimate the lower-level, as I understimated the higher. You understand the concept (what it is) but you don't care about the how? How it works, how it is "implemented to the hardware"?

I am another one not interested in low level. I did programmed in ASM many years back (my thesis was to implement FORTH for PDP/11 back in days when FORTH was new), but these days problems are elsewhere, and (for vast majority of people - but not for all) it just does not make senese to waste your brain cycles for task which CPU can do for you. I consider computer as tool to enhance my brain: I try to push as much of work to CPU as it can safely handle, to free my mind to focus on interesting problems. Pushing bits around is **not that interesting** anymore. Selected few have work where pushing bits to the limit is relevant, for rest of us "good enough" solution is good enough.

Sure it helps to understand how metal works (and I clearly see difference between understanding algorithms between me and students who understand only Java and lack the feel of how it is implemented "close to the metal", but whole point of abstractions is to disregard low level and focus on higher level.

This discussion is nothing new even on this forum. CompSci guru Dijkstra explained it perfectly in essay The Humble Programmer (http://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html) (his lecture when accepting Turing Award in 1972) - so the right answer so many people are looking for is older than most of the seekers... :-) So go and read it - because even if computing technology changed since then, human brain works same way as back then, and his insight is as vital as it was 35 years ago. Scary how little new generation learned - repeating the same mistakes all over again... :-/

jpmelos
December 19th, 2008, 11:00 PM
Sure it helps to understand how metal works (and I clearly see difference between understanding algorithms between me and students who understand only Java and lack the feel of how it is implemented "close to the metal")...

That's my point for the whole discussion. LOL. And, you know, sometimes happens you need to program your abstraction yourself! And you need to go to a lower level in those cases. Having a complete knowledge helps.

pp.
December 19th, 2008, 11:10 PM
I think it interesting to note that quite a few people who claim that knowledge about the working of the hardware isn't essential to building software are people who obviously do have that knowledge.

As some kind of parallel case I offer the observation that quite a few painters who became famous were not only extraordinarily skilled and artful in composing their images and accurately rendering what the depicted. They also were extraordinarily skillful and innovative in inventing and preparing - say - they paints they used for those works.

xarte
December 19th, 2008, 11:16 PM
I had to laugh... already I can see that this is one of those recurring questions that the old hands must get tired of. Interesting and relevant to me as a noob though.

I find it weird that there seems to be some argument bordering on aggression about the various languages. To me that's like arguing that graphite pencil is better than pastel is better than oil paint. Horses for courses! You might say that oil paint is bad because it's slow to dry and the oil leaches into your paper... but those things are good if you're doing a realist image on canvas.

As a beginner, I'm presently tossing up between Java (primarily because a good resource was suggested) and Python (currently looking like the best option), as these two seem very accessible, which is important for me. I need to find out more about the 'end product' - what can I actually DO with each language. I think that might be a deciding factor.

Doing 'bare metal' coding looks like fun and I really fancy tinkering at that level, but I don't see myself actually taking it anywhere.

I'd have thought that people work with low level codes when developing new hardware - would that be so? Or if you find that you can't do something in a higher level code and have to create something at a lower level for it to utilize?

edited to add: LOL at synchronicity with PP's art metaphor.

Yes, any good artist needs to know their tools. HOWEVER you don't need to know how to grind paint or make a pastel to be a good artist. You do need to know how to draw (IMHO) and I can always spot a painter who can't draw. It's patently obvious in the lack of structure in their work. The other thing is, I often notice when we are talking about skills, that exceptional people like Mozart and Leonardo often get a mention. We don't all want to be gurus. Some of us would be content with just being competent and doing good solid work.

I'd suggest that maybe a bit of familiarity with lower level coding would be useful, but you don't need to be expert at it?

Wybiral
December 19th, 2008, 11:21 PM
... sometimes happens you need to program your abstraction yourself! And you need to go to a lower level in those cases. Having a complete knowledge helps.

The only time you ever need to reduce yourself to that level is because you are physically limited. You'll gain absolutely no insight into constructing programs or solving problems what-so-ever.

If you're not writing libraries or kernel hacking, you should not be using something as low as assembly or C. If you reach a problem that REQUIRES low-level code where a library hasn't already been written to solve it (which is rare in practice) then you should write that code as a library, but not write your entire application in C, unless you love wasting your own time.

CptPicard
December 19th, 2008, 11:29 PM
I think it interesting to note that quite a few people who claim that knowledge about the working of the hardware isn't essential to building software are people who obviously do have that knowledge.

+1e9. This is the major point to note here of the HLL/LLL debate.

There is also a converse observation to be made... the people who are most adamant about the importance of understanding the low-level details almost by definition are people who only know the low level, and either simply do not know high level languages or just simply do not use them as they think it's all just meaningless syntactic sugar on top of "the real stuff". Thus, the "blub" concept.

If one does understand and appreciate both the high and low levels, it very quickly becomes obvious that logically/semantically the low level languages are almost trivially contained within the higher level languages, and that the higher level languages have concepts that genuinely transcend the lower level languages. Of course they're all still Turing-complete, but to get the same stuff in the lower-level language requires an implementation of the interpreter (or special case thereof) of the higher-level language. On the other hand, the lower-level language's expressiveness just simply "is there" already, for free, in the higher level language.

So, of course, for the competent high-level programmer, the relative importance of the low-level semantics is diminished. For the low-level programmer, it's still all there is for him. This seems to be somewhat hard to swallow for some ;)

As to your parallel case, it's an interesting point of view. I am pretty sure that the painter masters took a fairly bird's eye view to their work too, and the paint was seen as just an ingredient...

jpmelos
December 19th, 2008, 11:47 PM
Sure it helps to understand how metal works (and I clearly see difference between understanding algorithms between me and students who understand only Java and lack the feel of how it is implemented "close to the metal")...


I think it interesting to note that quite a few people who claim that knowledge about the working of the hardware isn't essential to building software are people who obviously do have that knowledge.

I see you agree with me to some level, after all. I can't yet see how can you say it's not important to a programmer to understand the low-level.

And I do program high-level code. I'm like a driver who is interested in knowing how his car works, not only in driving the car. And hey, I'm a graduating engineer. It's my job to have curiosity on how things work and try to understand that. If there was noone like me, there would be no computers for you guys to program in the first place!

pp.
December 19th, 2008, 11:49 PM
If one does understand and appreciate both the high and low levels, it very quickly becomes obvious that logically/semantically the low level languages are almost trivially contained within the higher level languages, and that the higher level languages have concepts that genuinely transcend the lower level languages.

That's not consistent with what I perceive when I do some creative programming. Rather, I view the project as a multidimensional grid of concepts. There's, of course, the problem domain layer, the models and the algorithms and whatnot. But at the same time I see structures which are orthogonal to those which directly relate the different layers of abstraction to potential or actual implementations in terms of real hardware. Hence, an array might become some length of continuous memory, while other structures become linked lists, coupled arrays and whatnot.



As to your parallel case, it's an interesting point of view. I am pretty sure that the painter masters took a fairly bird's eye view to their work too, and the paint was seen as just an ingredient...

Think "earlier centuries" before paints, canvases and so on were made in factories. I've read a number of accounts of great artists spending much time in finding recipes and procedures for better pigments, "better" being cleaner colours, new shades of colour, better handling or longer conservation of the work. I can't, however, not locate those sources on the spur of the moment.

xarte
December 19th, 2008, 11:55 PM
Think "earlier centuries" before paints, canvases and so on were made in factories. I've read a number of accounts of great artists spending much time in finding recipes and procedures for better pigments, "better" being cleaner colours, new shades of colour, better handling or longer conservation of the work. I can't, however, not locate those sources on the spur of the moment.

Yes they did, but they also got apprentices to do the paint-grinding and cloud-painting. Yes, they knew how to do it, but they didn't spend a lot of time actually doing it.

You also have to beware of re-inventing the wheel, and doing it badly. Plenty of art students' masterpieces are now peeling because of dodgy 18th century medium recipes.

The idea of core principles is a good one. You know how paints are made and ground, but few modern painters actually do it - they've read about it, that's enough. They use a paint based on its feel and look and archival qualities.

pmasiar
December 20th, 2008, 02:05 AM
I think it interesting to note that quite a few people who claim that knowledge about the working of the hardware isn't essential to building software are people who obviously do have that knowledge.


I see you agree with me to some level, after all. I can't yet see how can you say it's not important to a programmer to understand the low-level.

I never said that understanding low level is unimportant - I even suggest learning C - but as **second language**. Because when you loow at low level **after you learned high level** you can see that it is mostly the same programming concepts (loops, functions, variables) but with **substantially** more tedious details which might go wrong. It's not rocket science, just much more pain. he only difference is pointers, and thay can be trivially simulated in higher language with one single byte array to store different types (integers, characters etc), and accessing them using index (offset) - that's all magic behind pointers.

So of course learn low level if you have time and patience - but starting with that is such waste of time!


It's my job to have curiosity on how things work and try to understand that. If there was noone like me, there would be no computers for you guys to program in the first place!

But without people refusing to be distracted by low-level details and focusing on solving problems of real people **for cheap**, computing would be limited to once-in-decade census for government, and calculating ballistic tables for army - and maybe running payrol for Fortune 100. All coded in ASM of course :-)

pmasiar
December 20th, 2008, 02:23 AM
I find it weird that there seems to be some argument bordering on aggression about the various languages.

It's because "speed kiddies" (term we invented for beginners obsessed by raw speed) do not comprehend need of understanding the big picture (because they did not hit the wall what is need to maintain 100K lines of code, make changes and still keep it working).

The language you learned first determines how you think about programming. Read stickies, about "blub programmer". To learn new concepts you need to stretch your thinking, unlearn limiting approaches.

We struggle hard to prevent long-lasting brain damage beginners suffer when they learn wrong language first, like C/C++. Luckily BASIC is in past, forgotten as it should be.

Some, like me, are under permanent watch, threatened to be banned for forums, because I fight against newbies being abused by "wrong" advice by poster lacking experience. Mods understand little in programming, and want to smooth over any conflicts.

Easiest way to aviod conflicts is to silence someone who is not afraid to challenge "common wisdom" of crowds. Mods wants democracy, every opinion must be heard and counts equally. Which is obviously BS: opnions are **evaluated** not counted.

So yes, we did have pretty heated wars here, thanks for asking :-)

pmasiar
December 20th, 2008, 02:29 AM
I see you agree with me to some level, after all. I can't yet see how can you say it's not important to a programmer to understand the low-level.

And I do program high-level code. I'm like a driver who is interested in knowing how his car works, not only in driving the car. And hey, I'm a graduating engineer. It's my job to have curiosity on how things work and try to understand that. If there was noone like me, there would be no computers for you guys to program in the first place!

You can be competent driver without any clue how clutch works - or even that your car has one. QED :-)

Sure go ahaed and dig inside, but it is not for everyone, and knowing it does not make you so much better driver.

pp.
December 20th, 2008, 10:22 AM
Yes they did, but they also got apprentices to do the paint-grinding and cloud-painting. Yes, they knew how to do it, but they didn't spend a lot of time actually doing it. (...)

The idea of core principles is a good one. You know how paints are made and ground, but few modern painters actually do it - they've read about it, that's enough.

There's a difference between thoroughly understanding the basics of any trade and sticking to those basics, and I am gald to see that even the lowly parallel case from the arts can be stretched so far.

What I said in earlier posts was that there have been artists which needed to and did occupy themselves with more than just the high level topics of their trade. They certainly did delegate the drudgery whenever they could. Some did not delegate their research.

And those who did not have a sufficient understanding of those basics failed spectacularly in some respects, for instance by the paint failing to stick to the medium or by paints reacting with each other in unexpected ways.


You can be competent driver without any clue how clutch works - or even that your car has one. QED :-)

... if your car has an automatic transmission. If your car has a manual transmission, be prepared for some clashing of gears and jeering of bystanders when you have no clue that your car has a clutch and what it's good for.

Greyed
December 20th, 2008, 11:29 AM
... if your car has an automatic transmission. If your car has a manual transmission, be prepared for some clashing of gears and jeering of bystanders when you have no clue that your car has a clutch and what it's good for.

Which doesn't dispute what he said. I know of drivers who know to switch gears they press the pedal on the left, shift, release the pedal on the left. They don't know it is the pedal for the clutch nor how it works, that's just what you do. Kinda like the Windows user of drivers. They don't know how their computer works, they just click on the icon and start typing.

CptPicard
December 20th, 2008, 11:32 AM
Then again, I really don't like where this analogy is going.. I don't consider high-level programmers to be "ignorant" in the sense a Windows user is. :)

Greyed
December 20th, 2008, 12:46 PM
True. I think a high level programmer would be the one who knows the name of a clutch and its function if not exactly how it performs nor how to replace one. I certainly know what a clutch is (I drive nothing but manual cars, motorcycles and did 6 months in a big rig), I know its function and kiiiiinda how it works but damned if I could get in there to replace one.

Along the same line I'm a high level programmer and I could say what Python's dict is (and have on UF somewhere), know its function but damned if I could write an implementation in C.

I was just stressing the extreme case where a driver can drive a stick without knowing that the left pedal = clutch.

That better? :)

CptPicard
December 20th, 2008, 01:18 PM
Hmm... that hashtable (dict) example is an interesting one... I've been writing enough implementations of hashes in various languages, C included... and still, the most important feature of it is to understand what it is and what it "means" and how to use it. Namely, that is is a constant-access time discrete function from keys to values.

General implementation strategy knowledge of something like load factors and strategies for choosing the slot where to put stuff in are algorithmically interesting (and actually can tell you something new about stuff that is not directly related to the actual hashtable problem)... but even those do not really require low-level knowledge of anything. All you need is an array and a hash function.

I really can't think of anything where knowledge of really genuinely "low-level" stuff produces some kind of enlightenment in this example...

jpmelos
December 20th, 2008, 02:57 PM
I didn't mean I know how a car functions. Indeed, I don't give a damn, LOL. That was just a try to see how I see myself. =x I know how those people who want to understand cars do, because my father is a car addict!

nvteighen
December 20th, 2008, 06:09 PM
(...) and still, the most important feature of it is to understand what it is and what it "means" and how to use it. Namely, that is is a constant-access time discrete function from keys to values.


That leads to the awkward semantic problem programming languages have... they're a semantically hybrid in a very strange way: mere denotation (e.g. x = 9) and symbolism (abstraction) play together in a really significant way... This is not as in natural languages, where denotation is restricted to proper names and...

...wait, I'm boring you all, am I not? :p

CptPicard
December 20th, 2008, 06:24 PM
No, go on :) Looking forward to that programming languages paper of yours.

nvteighen
December 20th, 2008, 09:20 PM
No, go on :) Looking forward to that programming languages paper of yours.
It's about artificial languages (and written in Spanish :p)... I had some discussion with my professor, but nothing serious until January 9th 2009!

tinny
December 22nd, 2008, 12:51 PM
Another analogy.... (couldn't resist)

F1 Drivers dont even need to use a clutch anymore! I use a clutch every day, but im pretty sure im not as good as Lewis Hamilton at driving.

And...

Didn't the master painters have teams of apprentices working for them on "their" works? So the Masters where using all the tools at their disposal because they where smart.

I also find it interesting how those advocating for HLL's are clearly some of the most knowledgeable in the LLL ways (E.g pmasiar's thesis using ASM :-) ). Just think about that for a minute...

It just blows me away how some people just cant understand this. If we didnt have enlightened people the human population would all still be spending 10hr/day gathering food and living and a cave. This abstraction concept is something you benefit from every day.

slavik
December 22nd, 2008, 02:16 PM
You can be competent driver without any clue how clutch works - or even that your car has one. QED :-)

Sure go ahaed and dig inside, but it is not for everyone, and knowing it does not make you so much better driver.
Ever wonder why race car drivers do not use the same foot for both gas and brake? ;)

pmasiar
December 22nd, 2008, 07:17 PM
Ever wonder why race car drivers do not use the same foot for both gas and brake? ;)

ever wondered how far you can push an analogy before losing any relevance to original matter? :twisted:

xarte
December 22nd, 2008, 10:18 PM
I suspect this conversation went well off topic a while ago, and perhaps a section of it ought to be broken off into "Do I need to learn a lower level language to be a good programmer?"

It's an important discussion but I'm not sure that it is all that helpful to people who are just starting out. Being able to make my own paint might have made me a better painter, but I started out with cheap acrylics on a readymade canvas because they were affordable, mistakes are correctable, and the colors are bright and true.

As a beginner, I want a language that is current and relevant, that I can 'do something' with. I want it to be reasonably easy to learn, to make sense, and to be easy to troubleshoot.

I found this page on python vs java

http://www.ferg.org/projects/python_java_side-by-side.html

which makes some interesting points. Certainly the verbosity of Java is something I don't fancy at all.

One point that I don't see being addressed is WHAT YOU CAN DO with the languages, what applications you can create and what strengths they have. Obviously Java must have something going for it - flexibility?

in this article
http://furryland.org/~mikec/bench/

the author mentions excellent libraries for Java, and the fact that its static typing makes it easier to debug, and the longwinded code is more 'solid'.

It has been pointed out that an IDE designed for Java makes handling its verbosity less painful.

That said I'm sticking with Python, as I can look at the code and have a vague idea of what is going on, while with Java I'm clueless.

http://python.about.com/od/gettingstarted/tp/pytutbeg.htm

CptPicard
December 22nd, 2008, 11:18 PM
I suspect this conversation went well off topic a while ago, and perhaps a section of it ought to be broken off into "Do I need to learn a lower level language to be a good programmer?"

Been there, done that. Many times. Cyclical and repeating in history, The Language Wars are.




One point that I don't see being addressed is WHAT YOU CAN DO with the languages, what applications you can create and what strengths they have. Obviously Java must have something going for it - flexibility?

Theoretically speaking you can create anything in any Turing-complete language, but reality is of course quite different.

Java is actually rather cumbersome, until you become very well versed in the libraries and have a good IDE which you know how to use. That's when Java becomes close to Python in flexiblity ;)

That's not to say that I wouldn't use Java when it is called for.. it's good for big systems that run on heterogenous hardware. It's also actually reasonably fast.




the author mentions excellent libraries for Java, and the fact that its static typing makes it easier to debug, and the longwinded code is more 'solid'.

Merits of static typing vs. unit testing are a broader topic of discussion... my own view on this is that static typing mostly just increases design time and does not reduce bugs THAT much.



It has been pointed out that an IDE designed for Java makes handling its verbosity less painful.

Doing bigger Java projects without IDE is almost impossible :)

slavik
December 23rd, 2008, 01:12 AM
I suspect this conversation went well off topic a while ago, and perhaps a section of it ought to be broken off into "Do I need to learn a lower level language to be a good programmer?"
My opinion if anyone cares is yes, you do need to know a language that is 1 level lower than the one you write in.


It's an important discussion but I'm not sure that it is all that helpful to people who are just starting out. Being able to make my own paint might have made me a better painter, but I started out with cheap acrylics on a readymade canvas because they were affordable, mistakes are correctable, and the colors are bright and true.

As a beginner, I want a language that is current and relevant, that I can 'do something' with. I want it to be reasonably easy to learn, to make sense, and to be easy to troubleshoot.

This is problematic because different people think differently, thus there is no single language that is best for such a task.


I found this page on python vs java

http://www.ferg.org/projects/python_java_side-by-side.html

which makes some interesting points. Certainly the verbosity of Java is something I don't fancy at all.

One point that I don't see being addressed is WHAT YOU CAN DO with the languages, what applications you can create and what strengths they have. Obviously Java must have something going for it - flexibility?

I doubt that you could find an example where you can do something in one language and not in another and this goes back to Turing equivalence.


in this article
http://furryland.org/~mikec/bench/

the author mentions excellent libraries for Java, and the fact that its static typing makes it easier to debug, and the longwinded code is more 'solid'.

I am very fond of Perl, so draw your conclusion from that ;)


It has been pointed out that an IDE designed for Java makes handling its verbosity less painful.

this is a bad argument IMO, a tool which eases the use of a language should not be treated as a requirement. (I refuse to write Java code without Eclipse or Netbeans because of the verbosity).


That said I'm sticking with Python, as I can look at the code and have a vague idea of what is going on, while with Java I'm clueless.

http://python.about.com/od/gettingstarted/tp/pytutbeg.htm
Python is a decent language. Stick with it and I am sure you will do something useful with it.

Greyed
December 23rd, 2008, 04:17 AM
My opinion if anyone cares is yes, you do need to know a language that is 1 level lower than the one you write in.

So everyone should know ASM? For if one should know one below what they are writing in one regresses all the way to ASM anyway. IE, I know Python so I should know C, whoops, now I should know ASM in case I need to bootstrap into C.... ;)

slavik
December 23rd, 2008, 06:43 AM
While I would suggest somefamiliarity with C, I should probably rephrase that.

"You should understand one level below which you work at." So, if you write Python (using CPython), you should understand what the Python VM will be doing.

pmasiar
December 23rd, 2008, 03:16 PM
My opinion if anyone cares is yes, you do need to know a language that is 1 level lower than the one you write in.

It's funny you disagree with yourself in next sentence:
slavik> This is problematic because different people think differently, thus there is no single language that is best for such a task.

Different people have different needs, and not all people who write own code to solve problems on computer are professional programmers. I work with plenty of scientists, and for them Python is a godsend: it allows them to solve problems without teaching me graduate level of their science.

So yes, professional programmers should know C and be familiar with ASM and how CPU really works. No, C/ASM is not needed for most people who can use little programming in Python to massage some data files on occasion.

And we discussed this many times, and you still refuse to admit that most people are not (and will never be) professional programmers. I wonder why?

slavik
December 23rd, 2008, 04:43 PM
I see why you think I am contradicting myself, but maybe I am not phrasing it correctly.
Scientists don't need to be "good programmers", professional programmers do.

Person A = professional programmer, BS/MA in Comp Sci. writes code for his bread.
Person B = scientist, mathematician, etc. Someone who can benifit from some code, but doesn't really see much code.

Language X = some higher level language.
Language Y = language that the interpreter for language X is written in.

My thoughts/points/opinions/etc:
1.) If Person A uses language X very extensively (most if not all code they write) then to be considered a good programmer, they should have a fairly good understanding of how Language Y works.
2.) Person B doesn't even have to know Language X that well.

pmasiar
December 23rd, 2008, 04:49 PM
I see why you think I am contradicting myself, but maybe I am not phrasing it correctly.

You are phrasing it correctly just fine, but you (and many others programmers in UF) keep forgetting about 70% of the people who could benefit from processing data without being professional programmers :twisted:

slavik
December 23rd, 2008, 04:53 PM
I am not understanding you argument. But my point would be that those 70% will likely not be what I consider good programmers. :)

pp.
December 23rd, 2008, 06:32 PM
You are phrasing it correctly just fine, but you (and many others programmers in UF) keep forgetting about 70% of the people who could benefit from processing data without being professional programmers :twisted:

Slavik and many other programmers in UF might suppose that the question "Best programming language for noob to start with?" is most meaningful if one presumes that the programming noob wants to become a programming non-noob, i.e. that the noob wants to make progress. Under that premise, much can be said for understanding several layers of the programming stack.

Otherwise, you'd assume the question to mean "Which is the language a noob ought to choose if he is intent in remaining a noob", and the answer to that could be "Basic".

pmasiar
December 23rd, 2008, 06:40 PM
I am not understanding you argument. But my point would be that those 70% will likely not be what I consider good programmers. :)

All those scientists knowing only Python would be "good enough" programmers to solve their own problems (and would do it much faster than trying to explain "you" - a professional programmer). Are they "bad" programmers? Certainly not, if they can get solution faster than hiring "good" programmer. Do they need to dive into C++? Certainly not, unless they really want to.

Your point is kinda elitist in a sense that you require others to learn as much about your area of expertize (CompSci) as you know, even if you are not ready to learn as much about say genetics as they know. Organic chemistry alone is much harder than understanding C.

CptPicard
December 23rd, 2008, 07:13 PM
Under that premise, much can be said for understanding several layers of the programming stack.


I would never advocate "not understanding" some layers of the stack if one wants to be a well-rounded computer guy, but then again... I can't subscribe to the point of view that making progress equates "digging down". Understanding maybe, but interestingly, my "progress" has mostly meant understanding more and more of the big picture issues, not the "small picture" ones.

Wybiral
December 24th, 2008, 07:38 AM
The point is that the question is "Best programming language for noob to start with?" and the answer should be "the language that gets you in and doing things as quick and painlessly as possible, teaching you about relevant things like data structures and algorithms along the way"

You don't need to know anything about assembly or C to learn about mapping data to some virtual structure or knowing what algorithm best suites your problems needs.

Learning lower languages will make you appreciate higher languages more, and it's fun, but for the most part it's not going to help you much, if any. It helps when you need to use them to speed up some tiny bit of code where you absolutely need it (which is rare and in most cases a library has already been written for you, laziness is a virtue) but you can learn that all later, it's irrelevant to a "noob" who just wants to write programs.

nvteighen
December 24th, 2008, 04:48 PM
A question, if you program in ASM, do you have to understand how semiconductors work?

And, what about Lisp? If I program in Lisp, I have to learn how Lisp works, and therefore, how Lisp works and therefore, how Lisp works... SEGFAULT! (Yeah, I'm pretty limited at recursion depth).

slavik
December 24th, 2008, 04:59 PM
All those scientists knowing only Python would be "good enough" programmers to solve their own problems (and would do it much faster than trying to explain "you" - a professional programmer). Are they "bad" programmers? Certainly not, if they can get solution faster than hiring "good" programmer. Do they need to dive into C++? Certainly not, unless they really want to.

Your point is kinda elitist in a sense that you require others to learn as much about your area of expertize (CompSci) as you know, even if you are not ready to learn as much about say genetics as they know. Organic chemistry alone is much harder than understanding C.
Then what happens when the problem size changes? What if the program needs to be distributed and run on 100 nodes interconnected by a gigabit network. Parallel programming is still not as easy as everyone would like it to be, there are architectural decisions to be made that while seem insignificant change greatly the problem set for which your architecture is optimal.

slavik
December 24th, 2008, 05:10 PM
A question, if you program in ASM, do you have to understand how semiconductors work?

And, what about Lisp? If I program in Lisp, I have to learn how Lisp works, and therefore, how Lisp works and therefore, how Lisp works... SEGFAULT! (Yeah, I'm pretty limited at recursion depth).
with ASM, you would need to understand microcode. :) like what happens when there is a branch and what problems that can bring.

pp.
December 24th, 2008, 05:21 PM
A question, if you program in ASM, do you have to understand how semiconductors work?

If you write a driver for a solid state storage device (aka solid state disk) you'd better be aware of the restrictions on write cycles. If you write a file system which has to perform well on a hard disk, you have to take into account the various kinds of speeds and latencies inherent in the device as well as the capabilities of the disk controller chipset. If you want to write really fast code, knowing about the various caching and other optimizing devices in your processor becomes essential. When writing for an environment where the power drain is relevant knowing your architecture is indispensable.

So again, as ever: it depends.

If you want to generalise from those simple cases, you might say that the different layers are not perfectly abstract, i.e. not entirely transparent or orthogonal w/r to each other. Hence, there often will be cases where you have to understand several layers of the stack even if you can't or won't write code for any but your own layer.

The kind of application you write has quite some influence on how much you need to be aware of the other layers (on both side of your own). The scientist writing programs for his or her own speciality might write better programs for that domain than most professional programmers.

That is to be expected because that occurs in every field of skill or knowledge. The hobby cook can produce meals just as good as or better than those prepared by a pro. A hobby bricklayer might build better walls. The hobby musician might play several pieces more perfect than a pro. In many cases it's not the quality of the individual work which divides the amateur from the professional but the width of the field or the efficency.

So, the question of the best language for the beginner remains coupled to the berginner's intent: best language for someone to be able to write useful snippets in the shortest possible time or best language for someone wanting to be become a professional general purpose programmer (if such exist) or best language for someone wanting to write software for controlling robots on the surface of Pluto.

pmasiar
December 24th, 2008, 09:14 PM
Then what happens when the problem size changes? What if the program needs to be distributed and run on 100 nodes interconnected by a gigabit network.

Well then this is **different** problem - and you likely have a grant to cover the conversion - and proven algorithm to solve it. But starting all in ASM "just in case" is exactly the premature optimization which is root of all evil, as you well know.

xarte
December 25th, 2008, 08:21 AM
Oh for heaven' sake. Nothing like taking an argument to the nth degree, is there!

Do many of you guys teach? You're always looking at the end-result all the time, the professionals and the experts. You don't start out your music career playing Peter Sculthorpe because you want to play contemporary music. You start off playing scales and tunes, and especially classical era music that gives you a grounding in western harmony. THEN you build in the extended instrumental technique, study modes and non-western musical scale and so forth that you need to contend with contemporary Australian composers.

Maybe one day I'll need to learn some C or something, maybe I will decide to become a programmer (not likely but I'm generalizing here) - but first I have to start at the beginning with something I can manage.

It's funny that Basic should be mentioned for 'noobs that don't want to go anywhere' - a computer tech I know mentioned it today as a good starting place because it's easy, straightforward and a good way to learn about stuff like strings and variables and loops. Just because a language doesn't lead on IN ITSELF to bigger and better things, does that mean it can't be a useful learning tool for the fundamental principles of programming?

And if a lower level language CAN fill this function, are there learning resources available which are actually oriented towards a beginner?

I think before I actually start on any programming I probably need to go and learn a bit more about systems architecture....

CptPicard
December 25th, 2008, 02:56 PM
Oh for heaven' sake. Nothing like taking an argument to the nth degree, is there!

As a matter of fact, there isn't! There is a lot to be said about extending argument along interesting tangentials... ;)



You don't start out your music career playing Peter Sculthorpe because you want to play contemporary music. You start off playing scales and tunes, and especially classical era music that gives you a grounding in western harmony. THEN you build in the extended instrumental technique, study modes and non-western musical scale and so forth that you need to contend with contemporary Australian composers.

It's almost like that but not quite. Programming and a "study of computation" as I like to think of it can't quite so easily dismantled into "stuff that is for n00bs" and "the rest". The learning curve is more like a learning network and directions in it are not always clear, as evidenced by our discussions here about how to guide beginners along the path... and of course, the flamewars begin when someone suggests that the other guy's shining end-result principle is actually intellectually uninteresting n00bishness or theoretical wankery or using abstractions as crutches or... :p




first I have to start at the beginning with something I can manage.

Yep, that sounds like a good plan.


a computer tech I know mentioned

Yeah, anecdote from computer tech vs. golden nuggets of wisdom from Programmers ;)


Just because a language doesn't lead on IN ITSELF to bigger and better things, does that mean it can't be a useful learning tool for the fundamental principles of programming?

Depends. Scheme is a great teaching tool although it is not really suitable for large systems, although it has be basic ingredients in place for it -- it would just need libraries and "pragmatic features" added to it. BASIC is not suitable for large things because it just is archaic and better things have come along. The principle here is that a language tends to be "better" if it is more suitable for creating software systems (duh) therefore it makes better sense for programming, therefore it's better to learn it.

Java is a counter-example though.. it is quite suitable for large systems, but it is also somewhat uninteresting from the learning perspective (although you certainly CAN learn programming in it).

Python is nice because it fits both roles well -- it even scales quite well to bigger apps. And if you can use something that is usable "in the real world", and that is nice to learn in, why not learn it?



And if a lower level language CAN fill this function, are there learning resources available which are actually oriented towards a beginner?

They can't, because they by definition teach you about the hardware, not about programming.


I think before I actually start on any programming I probably need to go and learn a bit more about systems architecture....

You need to learn more about programmers duking it out over an initially innocent but explosive n00b question! ;)

xarte
December 26th, 2008, 02:56 AM
As a matter of fact, there isn't! There is a lot to be said about extending argument along interesting tangentials... ;)

Some of it's been interesting... Generally I don't have an issue with discussions shooting off into tangents, but it does feel a bit like thread-hijacking to push barrows at times (aforementioned flame wars). :P ... at least you guys stay (mostly) civilised though... !



Yeah, anecdote from computer tech vs. golden nuggets of wisdom from Programmers ;)

Not my intention. It was dimissed in a really offhand way, in a comment here, whereas the person I spoke to made a considered argument for it. You've pointed out the negatives. It must be still relevant though? I notice About.com has a visual basic website..(edited to add: ignorance showing again, seems vbasic is a whole nother box-and-dice.)
however as you say

BASIC is not suitable for large things because it just is archaic and better things have come along.

I guess my ears pricked up at the mention of BASIC since it was my first exposure to programming and remembered rather fondly!


Now this is helpful: might be 'duh' for you, but is a useful point to me:


The principle here is that a language tends to be "better" if it is more suitable for creating software systems (duh) therefore it makes better sense for programming, therefore it's better to learn it.







Python is nice because it fits both roles well -- it even scales quite well to bigger apps. And if you can use something that is usable "in the real world", and that is nice to learn in, why not learn it?

Makes sense. Python sounds like a real winner from everything I've read so far, both for a beginner or amateur or for a potential serious programmer.

Kilon
January 1st, 2009, 03:48 AM
Python is really a nice language. The problem that is not as supported as other languages. That hurts it in two ways

1) lack of libraries

2) lack of documentation

Both is very important. For example , I tried to make a VST Plugin. For those who do not know , VST plugins are plugins used by audio applications like Cubase, Logic and Ableton Live. They are extremely important to music making world and can be Synthesizers ,Romplers , Effects etc.

Not surpassingly VST plugins are dll (or other library format) coded in C++. Of course there is no VST SDK in python.

I did not really wanted to code in C++ so I found the next best solution jVSTwrapper , which is a Java Wrapper. Now of course the java wrapper has very little documentation because it just wraps the C++ VST library . So I have to refer to C++ VST documentation. But the C++ VST documentation really sucks.

So that forces me into studying alot of C++ source code and speaking with people working on C++ VST plugins in order to understand how the VST SDK works. It is a pain. But I was lucky cause I know how C++ works.

The Conclusion is that knowing more than one language is highly helpful. Even if this wont make you an expert in any of those languages it will give you the power to look inside source code and documentation and understand how things work.

Don't be tight down into only one programming language, they are far from perfect. It wont matter that you are a noob , it will make your life easier.

slavik
January 1st, 2009, 04:03 AM
Python is really a nice language. The problem that is not as supported as other languages. That hurts it in two ways

1) lack of libraries

2) lack of documentation

Both is very important. For example , I tried to make a VST Plugin. For those who do not know , VST plugins are plugins used by audio applications like Cubase, Logic and Ableton Live. They are extremely important to music making world and can be Synthesizers ,Romplers , Effects etc.

Not surpassingly VST plugins are dll (or other library format) coded in C++. Of course there is no VST SDK in python.

I did not really wanted to code in C++ so I found the next best solution jVSTwrapper , which is a Java Wrapper. Now of course the java wrapper has very little documentation because it just wraps the C++ VST library . So I have to refer to C++ VST documentation. But the C++ VST documentation really sucks.

So that forces me into studying alot of C++ source code and speaking with people working on C++ VST plugins in order to understand how the VST SDK works. It is a pain. But I was lucky cause I know how C++ works.

The Conclusion is that knowing more than one language is highly helpful. Even if this wont make you an expert in any of those languages it will give you the power to look inside source code and documentation and understand how things work.

Don't be tight down into only one programming language, they are far from perfect. It wont matter that you are a noob , it will make your life easier.
I had to do the same when I wanted to write a /ctcp plugin for pidgin in Perl (no Perl docs), but they correspond to the C function layout and the C was very well document.

pmasiar
January 1st, 2009, 04:45 AM
The problem that is not as supported as other languages.

as compared to what? What other free independent languages are supported better?



1) lack of libraries

2) lack of documentation


... or lack of knowledge how Python community solves those problems?

Kilon> VST plugins are dll (or other library format) coded in C++. Of course there is no VST SDK in python.

But there are C++ wrappers like boost.python (http://www.boost.org/doc/libs/1_37_0/libs/python/doc/index.html)


Kilon> But the C++ VST documentation really sucks.

but how it can be, you just said that Python's doc sucks? :-) Maybe all docs sucks?

Kilon> The Conclusion is that knowing more than one language is highly helpful.

Of course, no-one disputes that :-) But the quastion was, just to remind you: "Best programming language for noob to start with?" :-)

Kilon
January 1st, 2009, 10:01 AM
I had to do the same when I wanted to write a /ctcp plugin for pidgin in Perl (no Perl docs), but they correspond to the C function layout and the C was very well document.


I was sure I was not the only one. Of course , the opposite can apply. For example I have yet to find such an easy library as pygame in Java.


as compared to what? What other free independent languages are supported better?

are not most of them free? Well Java beats down Python in Documentation and Available libraries. And probably C++ does the same against Java. Of course in some areas the opposite my apply. But it is not a secret that Java and c++ is far more popular than python. Also letting a programmer language depend on the good will and free time of inividuals is not something that I see as an advantage.


But there are C++ wrappers like boost.python

WOW I was not aware of the existence of this . Nice !!!! That certainly change things. But I do not know how well Boost will work with VST in matter of speed and reliability. That was the reason that I did not even try to use Python. If everybody says that python is considerable slow how can I use it when VST plugin development that puts even C++ into a test. A VST plugin contains code needs to be executed 44000 times each second (once for each audio sample depending of course on sample rate this can increase 2 or 3 times) sometimes, I doubt even Java as a wise choice.


but how it can be, you just said that Python's doc sucks? Maybe all docs sucks?


No All docs do not suck. It will be dependent on the case of course. As I said Python in my first post python seriously lack documentation and libraries.

I always read how easy python is to do this or that, but this far from the true. When I googled VST and Python nothing came up , and that is for me a big problem. Also I do not see many people using python for pro audio application development. So that makes python really difficult and risky to use. Will it work ? How it worked ?If it does not when will it be fixed ?

Of course I am not aware how well Python interface with C++ and of course I was not aware of the Boost libraries, but still starting something and not having some examples to really help you can make your progress very slow.

But I will certainly give BOOST a try. Maybe things are easier than I think. But my experience in programming languages tell me that is not a question of what programming language is easier but what programming language implements the feature you want . I do not think that anyone wants to bugfixing the libraries that are supposed to make your life easier. Certainly not a noob.


But the quastion was, just to remind you: "Best programming language for noob to start with?"

If you look closely I am saying that it wont really matter. Because as soon as you start programming you will want to look at alternative approaches coded in other programming languages. Afterall programming languages are pretty much the same. They are not so difficult to learn , they just take some time to learn the basics. Some take more and some take less. So if you start with c++ it will be useful even if you decide that python is much better than c++ or java and vice versa.

Greyed
January 1st, 2009, 02:02 PM
INo All docs do not suck. It will be dependent on the case of course. As I said Python in my first post python seriously lack documentation and libraries.

In your opinion. Most people's opinion is that Python is one of the better documented and supported languages.


When I googled VST and Python nothing came up , and that is for me a big problem.

Key words there. Congrats, you found one area where Python might not be up to part library wise. The same can be said of many other languages and many different libraries.


If you look closely I am saying that it wont really matter. Because as soon as you start programming you will want to look at alternative approaches coded in other programming languages.

Sure, after a year or two. Up until that point most people are still learning their first language and looking at alternatives is counterproductive.


Afterall programming languages are pretty much the same.

No, they're not. "Turing complete" does not mean "pretty much the same."


So if you start with c++ it will be useful even if you decide that python is much better than c++ or java and vice versa.

Except if someone starts with C++ they're hitting more walls on their path to learning how to program vs. how to talk to the computer.

nvteighen
January 1st, 2009, 03:08 PM
Python undocumented? I'd say one of the problems it has is the overwhelming (and sometimes irrelevant) documentation... :p (ok, the canonical form of documentation for me is GTK+'s: concise and 100% useful)

pmasiar
January 1st, 2009, 04:35 PM
are not most of them free? Well Java beats down Python in Documentation and Available libraries.

It might surprise you but not, most of languages are not free but provided by someone. Sun released Java only recently, and only after IBM started very serious Free (GPL) reimplementation.

For a long time Sun gave away Java and supported the hype marketing, because it was raking money in big servers. It's over for Sun, and freeing Java is attempt to give it second breath. Python never had such support machine, and earned the position it is in by "word of mouth" marketing - by merit. Only after Python became popular Google started to use (and support) Python.

Kilon> But it is not a secret that Java and c++ is far more popular than python.

Yes, but how it is relevant to be suitable for beginner?

Kilon> Also letting a programmer language depend on the good will and free time of inividuals is not something that I see as an advantage.

So you prefer to be a slave to marketing whims of a big company?

Kilon> If everybody says that python is considerable slow how can I use it when VST plugin development that puts even C++ into a test. A VST plugin contains code needs to be executed 44000 times each second

Of course, but you imply that first thing a beginner should do it to write a code where execution speed is critical. It's just not true. Most of code most people ever write is not time critical, and using C++ is waste of time.

Far more common example of what beginner would like to do is to access a database, possibly as web server, and Python is just fine in those circumstances.

Kilon> As I said Python in my first post python seriously lack documentation and libraries.

Many people (including me) consider docs good enough. And having more libraries is not "always good" - the more libraries, the bigger task is to evaluate them and pick the right one for the task. Perl has this problem too: too many libraries for similar tasks, because sharing Perl code is not as easy as Python code.

Kilon> I always read how easy python is to do this or that, but this far from the true. When I googled VST and Python nothing came up , and that is for me a big problem. Also I do not see many people using python for pro audio application development.

Congratulation, you found the rare area where Python is not good fit for beginner. I would challenge your suggestion that real-time sound processing is good area for beginner.

Kilon> Because as soon as you start programming you will want to look at alternative approaches coded in other programming languages.

"as soon as"? Maybe after a year, when you master your first language, **and** your area of interest requires CPU speed. As I said, most people I know work around databases and web, and Python speed is adequate for those tasks.

Kilon> Afterall programming languages are pretty much the same. They are not so difficult to learn , they just take some time to learn the basics.

Try brain**** to realize how wrong you are. :-)

For real languages, try Forth and Lisp, to realize how limited is your understanding what real programming is.


So if you start with c++ it will be useful even if you decide that python is much better than c++ or java and vice versa.

Not so: If tasks you solve are OK with Python speed, and if Python can be mastered in substantially less time then C++, suggesting to start with C++ is **wrong** advice.

You are blinded by your own area of interest (audio processing) which does require CPU speed - most people's tasks do not require that, and starting with C++ would be wasted effort.

And expereince from programming language teachers who are **thinkers** (ie not following "industry standard" without much thinking) says that teaching beginners Python before Java **improves learning Java**. We had those discussions (and polls) many times, read stickies.

I am wasting time here only for benefit of new UF-PT members, to avoid them being misled by niche case needs like yours. And maybe for you - quite a few programmers around here argued for CPU-cycles optimization like you did, but came around to appreciate increased productivity of higher-abstraction languages like Python (and Ruby, Groovy, Perl, etc).

Kilon
January 1st, 2009, 05:16 PM
Well that was my experience with python. I am here to share it and give a different opinion.

Afterall all opinions are personal and should be taken in context.

However i still stand on my argument that a noob should understand at least more than one language. Take it or leave it.

pmasiar
January 1st, 2009, 06:13 PM
Afterall all opinions are personal and should be taken in context.

yes, I tried to put **yours** into context :-) so beginners (which might be less capable to see the context) will not be under wrong impression that C++ might be equally good place to start


However i still stand on my argument that a noob should understand at least more than one language. Take it or leave it.

I take it - see my sig :-)

But beginner cannot **start** with two languages (one language **has to be** the first), and that first one should **not** be C++. Take it ot leave it :-)

CptPicard
January 1st, 2009, 07:10 PM
and that first one should **not** be C++. Take it ot leave it :-)

+1.

Considering the thread I have running atm, I am not sure C++ should be even a 25th language for a non-n00b like me.. ;)

Fosfate
January 1st, 2009, 07:32 PM
There's more talk in this thread about programming than actual programming itself.

The best advice: Figure out what want you want to do, then pick the language that makes it possible.

CptPicard
January 1st, 2009, 07:55 PM
The best advice: Figure out what want you want to do, then pick the language that makes it possible.

How is one supposed to know what makes what possible, in particular if one is a beginner? There is a LOT of talk about that here, just dig up some old threads...

Kilon
January 1st, 2009, 08:30 PM
Curious , do you find C++ so difficult ? I remember the old days while I was playing with C++ and MsDos , I never experienced any big difficult. Things did get really tough when I tried to do Windows Programming, but I blame the ugliness of MFC for that not C++.

But I find so strange the emphasis on C++ "difficulty" and python "ease of use". I can see the difference but I cannot see the grave difference that you see. Am I missing something here ?

I am not new to "ease of use " thing , I have been an advocate of delphi for many years and still think that delphi is probably the programming language that best combines "ease of use", power and speed in the windows world. But I would never discourage a beginner to pick C++ as its first language of choice. Maybe warn him but still I do not see why C++ would be a bad choice.

creek23
January 1st, 2009, 08:43 PM
Curious , do you find C++ so difficult ?

I do. That's why I designed my own C/C++ like programming language with BASIC (http://fbc.sf.net).

pointers have always made my head ache. :)

CptPicard
January 1st, 2009, 09:20 PM
But I find so strange the emphasis on C++ "difficulty" and python "ease of use". I can see the difference but I cannot see the grave difference that you see. Am I missing something here ?


I would say that yes you are missing something here :)

Just look at Bruce Eckel's "Thinking in C++" books. They are two 900+700 page tomes that teach you how to first of all think in static-typed OOP terms (value of which is somewhat questionable IMO to begin with, at least when "enforced" hard) and then how to manage the language to a degree of competence that you're able to get something done... very simple things can trip you up in C++, and it's because the language is a combination of higher-level concepts implemented within a fundamentally low-level framework.

I mean really. Read vol 1 chapter 11 on copy constructors. I've been hacking C++ on and off for 10 years now (and been productive in 10 other languages during that decade) and only yesterday did I actually find a decent through explanation of what I can trust the compiler to return-value-optimize and what will explode in my face if I do things wrong :)

Interestingly, no other language quite produces such a need for so much "this is how you actually are meant to use the language" material :)

So yes.. I might say without admitting to my own idiocy that I find C++ to be difficult, and in a bad way... it is not "conceptually challenging" like some other languages can be at first sight, but that in the long run reward you with insight. It's just complex for its own sake, and you must deal with it :p

xarte
January 1st, 2009, 10:31 PM
Just to lower the tone a little,

here's a really nice place to start for -utter- noobs. A nice, easy, clear introduction to the very first basics. (Found by googling "write a simple python program")

http://hetland.org/writing/instant-hacking.html

Kilon
January 2nd, 2009, 12:41 PM
Talking about easy languages for beginners. What you think about F# and JPYTHON ?

Also I have found this http://iolanguage.com/ , very easy and very light.


By the Way if we target the absolutely easiest of all. Then a noob should take a look to "REVOLUTION" , it i s programming language with a drag n drop user interface and very simple syntax . It is not free but not expensive either, but can make apps for windows, linux and mac. Excellent for the absolute beginner in programming and using computers.

https://secure.runrev.com/products/overview/overview/

CLomax
January 2nd, 2009, 02:03 PM
Pascal.

GeoffreyBernardo
January 3rd, 2009, 12:03 AM
Hi All,

Here is another analogy:

To be a good driver of a car, one does not need to know the ins and outs of an engine.

xarte
January 3rd, 2009, 12:18 AM
Hi All,

Here is another analogy:

To be a good driver of a car, one does not need to know the ins and outs of an engine.

AAAAHHHHH!!! AAAAAAAHHHH!! AAAAAHHHHH!

nooooooooooooooooooooo!!!!

you... did.... READ this thread ... didn't you....

*runs away screaming

CptPicard
January 3rd, 2009, 12:54 AM
*runs away screaming

You must be new here.

Oh, wait... you are new here ;)

Nobody ever reads the thread before commenting, and in particular nobody ever reads the sticky threads before asking the OP's question...

jpmelos
January 3rd, 2009, 01:31 AM
Hi All,

Here is another analogy:

To be a good driver of a car, one does not need to know the ins and outs of an engine.

That explains why you hide the implementation and only shows the interface of your headers.


So yes.. I might say without admitting to my own idiocy that I find C++ to be difficult, and in a bad way... it is not "conceptually challenging" like some other languages can be at first sight, but that in the long run reward you with insight. It's just complex for its own sake, and you must deal with it :p

That's so not true at all. You can find an explanation to everything happening based on more basic concepts you should have learned before. Of course, if you jump steps, you won't learn as well as you should and will conceive the language as "badly structured" and "arbitrary".

Analogy time (yay! :D): just like history. If you go for the Cold War history straight with no knowlegde of the WWII, you'll pretty much think you have to just record it in your memory as whatever I tell you and think I'm arbitrary and I'm making up that stuff. You will have no ground to rationalize.

Oh damn! I tried to stay away from this post, but I can't help it. >.< Sorry. :(

creek23
January 7th, 2009, 08:23 PM
Hi All,

Here is another analogy:

To be a good driver of a car, one does not need to know the ins and outs of an engine.

True, it is. Because drivers are simply "users of a car".

This means programmers are like the blue-collared mechanics. ;)

And when it comes to programming, programming languages are the mechanics' tools.

CptPicard
January 7th, 2009, 10:08 PM
And when it comes to programming, programming languages are the mechanics' tools.

And in that sense it is better to know the ins and outs of lambda calculus to know what is physically possible and how that relates to most general symbolic systems humans have at their disposal -- on any machine.

Sheesh... I feel like launching into a tirade about how non-lispers and esp. the low-level guys don't have the abstraction capacity to think about programming in machine-independent manner, but that would be inflammatory, so I will refrain from that. Let's just say that register machines are trivially included in higher-level languages, so those who claim that dislike from C++ comes from not knowing what is under the hood can just cut it off already :p

Kilon
January 7th, 2009, 10:30 PM
If you want to stay close to C++ but want something more beginner friendly , there is always D.

http://www.digitalmars.com/d/

http://en.wikipedia.org/wiki/D_(programming_language)

maximinus_uk
January 8th, 2009, 02:19 AM
When somebody says 'what the best programming langauge for a noob?', you really need to know more about that person wants. Do they want to learn how to program computers, or do they want to learn programming?

If you want an instant result in a language that looks English-like, then I would say start with Python. There's loads of docs for free, plenty of people use (so it's easy to get help) and it comes with enough libraries to pretty much do what you like with it.

Now if you want to learn how to program, go away and learn (probably in this order) Python, C, Lisp, Haskell, Assembler and (seriously) Brain****. Then you'll a very good idea on what the best language for you might be.

I teach guitar, and often people ask me 'whats the best guitar for a noob?'. The answer is - a cheap one. When you start, you won't know what you are looking for for in a guitar, so get a cheap one and start playing. Soon, you'll notice the shortcomings in either your style of playing or the guitar, and when you come to spend more serious money you'll know what you want.

So it is with programming languages. Pick one that is easy to learn and easy to use. Code something simple. As you get better, you'll start to realize what you like and don't like. Then you can perhaps choose a more appropriate tool. But, most importantly *write code*.

rplantz
January 8th, 2009, 02:58 AM
Whenever I see this question I'm reminded of a friend of mine, a music professor at the university where I taught computer science. He first started to learn programming in the early 80s by taking a class in Pascal. He had lots of trouble. Next he took a class in LISP, and the whole thing fell into place for him.

As for me, my first "language" was digital circuit design in the early 60s. (I'm an electrical engineer.) I have trouble understanding things until I can see how it works in assembly language.

Our brains work differently. What is clear to one person simply does not make sense to the next.

A further example of what I just said is the psychology class I took as part of my undergraduate general education. I loved the class and thought I understood everything. I got a good solid "D" in the class. Later, I earned a PhD in EE from Berkeley. I'm better at EE than I am at psychology.

So the clear and simple programming language for one person is confusing for the next. You just gotta try it and see what works for you.