Author Topic: What's the Best Way for a Programmer to Learn a New Language  (Read 2736 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #1 on: October 02, 2013, 07:06:27 PM »

The comment by David Rutten at Eric Liptons site strikes a chord ..

Quote
Unless you are exceptionally lucky to find a book that is exquisitely tailored to your interests and needs, it is more likely to bore, confuse and frustrate you. Buying and reading books about programming languages is something you should do to become a good programmer. But first you have to become a bad programmer just by doing horrible stuff that kinda sorta works.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #2 on: October 02, 2013, 07:50:13 PM »
I can definitely relate to the last sentence in that quote!  :kewl:

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #3 on: October 02, 2013, 09:34:04 PM »
^^ ditto that Jeff. :)

After doing that for a fair while now, I think it's more important to learn proper design/architecture and logic patterns (such as if/else, switch etc) than the language.

For instance, nearly all programming language books/tutorials leave out such things as error handling to "make things clearer", or when to use things like error codes and exceptions and where to use them. If they do include error handling it is usually an abstract example and doesn't explain how it can affect the rest of the program flow, it just shows how to implement them.

It's better to learn things like flow charts and UML I think. I use these daily now and well before I type a line of code. Starting a new chart on a piece of paper is much better than leaving crappy bits of  commented out code around (because you think it might be handy later...) and no error handling.
With tested flow charts and UML done typing up the code is quick and easy.

Once you have a grasp of that you need to use a proper language that's not too hard to pick up and test your skills, Python is probably the best for this and is probably why MIT and other uni's use it for their CS courses.

After this, learning a new language is pretty much just learning the syntax. I use over 5 languages daily now with desktop and web app development and I picked up the new ones I needed easily. You already know what logical constructs you need to use from your flow charts, you just look up the operation in the language doc's for the syntax and use it.

There are definitely more specialised things to learn in any language but these are more 'helper' features (such as generics) rather than base features and you can get by without them and you pick them up along the way if you use that language often enough.

Quote from: Bjarne Stroustrup
I try to avoid oversimplification and sugar coating: programming can be a noble art and involves some skilled craftsmanship. I hope for readers who want to build real-world systems, rather than just toy programs to be able to get a grade or to tick a box on an interview form.
« Last Edit: October 02, 2013, 09:46:34 PM by MickD »
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #4 on: October 02, 2013, 10:43:20 PM »
@Jeff & Mick ^^ ditto the last sentence.
I've found the Python at MIT and Coursera quite a comfortable fit. The JavaScript, HTML5 and CSS less so, but I do quite like JavaScript.
I tried Ruby but I'll need to revisit it to see if we get along any better ..
My old brain balks at C++ other that just to recognise some of the constructs unfortunately.

Wasn't it someone we know who said the best way to learn a language is to write  thousands of lines of code .

I'm back onto C# and VLisp at the moment and as happy as a pig in poo.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #5 on: October 02, 2013, 11:07:33 PM »
Wasn't it someone we know who said the best way to learn a language is to write  thousands of lines of code .

Hehe where is he anyways?

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #6 on: October 03, 2013, 12:05:58 AM »
I've found the Python at MIT and Coursera quite a comfortable fit. The JavaScript, HTML5 and CSS less so, but I do quite like JavaScript.

As you have 'cut your teeth' on lisp I can see why you like javascript, I find it a lot easier than lisp though :)
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: What's the Best Way for a Programmer to Learn a New Language
« Reply #7 on: October 03, 2013, 12:43:11 PM »
I have a hard time learning new programming concepts without trying (and breaking) things. I also have a hard time trying things without learning how they work first. So for me it's always been both at the same time. (hello world)

Also, learning just from a book has the disadvantage that it doesn't expose the stuff that *should* work but doesn't. We AutoCAD programmers know of such things.

Todays pain is a change to the 2013 API that breaks existing code. http://www.theswamp.org/index.php?topic=45176.msg503789#msg503789
« Last Edit: October 03, 2013, 02:36:27 PM by mohnston »
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions