Author Topic: Learning to Code  (Read 3547 times)

0 Members and 1 Guest are viewing this topic.

Offline jt512

  • Well Established
  • *****
  • Posts: 1267
    • jt512
Re: Learning to Code
« Reply #15 on: January 18, 2017, 02:33:29 PM »
I'm definitely leaning toward Python, though I'm still open to more recommendations so please keep them coming.  Then question becomes: Python 2.7 or Python 3.5?  Python 2.7 still seems to have the best library support and it's built into OS X, which is an advantage for me.  But there seems to be a lot to like in 3.5...

I'm not a professional programmer, but I would think if you're hoping to teach programming at some point, that you should first learn a lower-level language first, like C/C++.  Python is easy to learn, so you can get up and running with it quickly, but I think you'll gain deeper understanding by going the more-difficult route with C/C++.

Offline PANTS!

  • One leg at a time.
  • Reef Tank Owner
  • *********
  • Posts: 8763
  • What seals? I auditioned for this job.
Re: Learning to Code
« Reply #16 on: January 18, 2017, 02:53:33 PM »
I'm definitely leaning toward Python, though I'm still open to more recommendations so please keep them coming.  Then question becomes: Python 2.7 or Python 3.5?  Python 2.7 still seems to have the best library support and it's built into OS X, which is an advantage for me.  But there seems to be a lot to like in 3.5...

I'm not a professional programmer, but I would think if you're hoping to teach programming at some point, that you should first learn a lower-level language first, like C/C++.  Python is easy to learn, so you can get up and running with it quickly, but I think you'll gain deeper understanding by going the more-difficult route with C/C++.

I don't think so.   Maaaaaaaaaaaybe you can make a case for assembly or machine code, but C++ and python are at the same level of algorithmic abstraction.  Python just gives you an added layer of some design patterns and external interfaces pre-built.  There really is not a lot of daylight between 3rd and 4th gen.  Not like there was between previous generations.  I would argue the largest leap from a programmer's pov came within the 3rd gen with the advent of managed code (.Net) and Bytecode (JVM).
« Last Edit: January 18, 2017, 03:40:37 PM by PANTS! »
Now where I come from
We don't let society tell us how it's supposed to be
-Uptown, Prince 👉

We cross our bridges when we come to them and burn them behind us, with nothing to show for our progress except a memory of the smell of smoke, and a presumption that once our eyes watered.

Offline Johnny Slick

  • "Goddammit, Slick."
  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 11888
  • Fake Ass Skeptic
Re: Learning to Code
« Reply #17 on: January 18, 2017, 03:01:31 PM »
Yeah, as someone who did go through the route of learning C/C++ for a while before turning towards C#/straight up .NET stuff, I've rarely if ever used principles I learned from the lower level languages. At *most* it's helped me to understand argument by value vs by reference (the latter is essentially a C-style pointer to the object) and been grateful for the fact that garbage collection works. I feel like as long as you have a general idea of why the languages behave the way that they do, you really don't have to learn C and all of its weirdness regarding memory management and so on (sorry, teethering!).
Speak what you think now in hard words, and to-morrow speak what to-morrow thinks in hard words again, though it contradict every thing you said to-day.

- Ralph Waldo Emerson

Offline jt512

  • Well Established
  • *****
  • Posts: 1267
    • jt512
Re: Learning to Code
« Reply #18 on: January 18, 2017, 03:29:34 PM »
Yeah, as someone who did go through the route of learning C/C++ for a while before turning towards C#/straight up .NET stuff, I've rarely if ever used principles I learned from the lower level languages.

On the other hand, my girlfriend uses those principles in her programming on a daily basis.

Offline PANTS!

  • One leg at a time.
  • Reef Tank Owner
  • *********
  • Posts: 8763
  • What seals? I auditioned for this job.
Re: Learning to Code
« Reply #19 on: January 18, 2017, 03:42:01 PM »
Yeah, as someone who did go through the route of learning C/C++ for a while before turning towards C#/straight up .NET stuff, I've rarely if ever used principles I learned from the lower level languages.

On the other hand, my girlfriend uses those principles in her programming on a daily basis.

How so - and which ones specifically?  And is it because she is not using a language with managed code?
Now where I come from
We don't let society tell us how it's supposed to be
-Uptown, Prince 👉

We cross our bridges when we come to them and burn them behind us, with nothing to show for our progress except a memory of the smell of smoke, and a presumption that once our eyes watered.

Offline Johnny Slick

  • "Goddammit, Slick."
  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 11888
  • Fake Ass Skeptic
Re: Learning to Code
« Reply #20 on: January 18, 2017, 03:43:01 PM »
Yeah, as someone who did go through the route of learning C/C++ for a while before turning towards C#/straight up .NET stuff, I've rarely if ever used principles I learned from the lower level languages.

On the other hand, my girlfriend uses those principles in her programming on a daily basis.
Hmm. What kind of programming does your girlfriend do? I mean, I do know a *lot* of people out there who absolutely do use C++ on an everyday basis precisely *because* they have to manage memory et al. The Latinist sounds like he wants to try his hand at web and/or mobile development, which just doesn't need that kind of attention to detail (I mean, don't get me wrong, I do web development myself and there is *absolutely* a need to keep page loads and such as short as possible, which means that in turn you have to do a bunch of extra technical work to reduce round trips, ensure that your code base is as efficient as possible, etc., but it's not anywhere close to the level that game designers and graphics cards driver designers, for instance, have to micromanage things in order to make stuff run as quickly as possible). I'm not saying that learning C++ would be a *waste*, necessarily - most languages, once you've learned one, you're 80% of the way to learning another - I'm just saying that it's got a bit of a steep learning curve compared to C# or especially Python, and why start with that when you can keep the training wheels on, so to speak?

Also by the way: I had to work out some algebra today for a particular project I'm working on. I bring this up because it's literally the first piece of math I had to walk through at this job in like a year.
Speak what you think now in hard words, and to-morrow speak what to-morrow thinks in hard words again, though it contradict every thing you said to-day.

- Ralph Waldo Emerson

Offline jt512

  • Well Established
  • *****
  • Posts: 1267
    • jt512
Re: Learning to Code
« Reply #21 on: January 18, 2017, 04:09:11 PM »
Yeah, as someone who did go through the route of learning C/C++ for a while before turning towards C#/straight up .NET stuff, I've rarely if ever used principles I learned from the lower level languages.

On the other hand, my girlfriend uses those principles in her programming on a daily basis.
Hmm. What kind of programming does your girlfriend do? I mean, I do know a *lot* of people out there who absolutely do use C++ on an everyday basis precisely *because* they have to manage memory et al. The Latinist sounds like he wants to try his hand at web and/or mobile development, which just doesn't need that kind of attention to detail (I mean, don't get me wrong, I do web development myself and there is *absolutely* a need to keep page loads and such as short as possible, which means that in turn you have to do a bunch of extra technical work to reduce round trips, ensure that your code base is as efficient as possible, etc., but it's not anywhere close to the level that game designers and graphics cards driver designers, for instance, have to micromanage things in order to make stuff run as quickly as possible). I'm not saying that learning C++ would be a *waste*, necessarily - most languages, once you've learned one, you're 80% of the way to learning another - I'm just saying that it's got a bit of a steep learning curve compared to C# or especially Python, and why start with that when you can keep the training wheels on, so to speak?

Also by the way: I had to work out some algebra today for a particular project I'm working on. I bring this up because it's literally the first piece of math I had to walk through at this job in like a year.

She's a theoretical chemist.  And she needs to work with enormous matrices and tensors.  Here is a paper describing a tensor library she collaborated on: http://iopenshell.usc.edu/pubs/pdf/jcc-34-2293.pdf

Offline werecow

  • Cryptobovinologist
  • Frequent Poster
  • ******
  • Posts: 3023
  • mooh
Re: Learning to Code
« Reply #22 on: January 18, 2017, 04:56:48 PM »
Once you get the basic logic of programming languages, what specific language you code in is of secondary importance. I don't have much experience with C#, but I agree that Python is a really good language for learning basic programming skills. It teaches you the logic of programming without the extra hassle that comes with strong typing (though dynamic typing can also be a curse at times), pointers and memory management, and forced object-oriented design, and it forces you to learn to maintain a good, readable layout. And it has the advantage of being pretty popular right now, so there are lots of libraries either already available or being written (and package management is really easy when using pip and virtualenv). A downside is that there are no really great IDEs for python like there are for, say, JAVA or C# (in part because this is really hard to do well in a dynamically typed language).
I personally learned Java and C before python, and I think I'd have been better off in the reverse order (pointers and memory management in C are annoyingly confusing to a novice programmer). So I would say use python for your backend work (look at how to set up REST services, for example). For your frontend work you may want to use something like AngularJS.
Mooohn!

Offline Billzbub

  • Frequent Poster
  • ******
  • Posts: 2608
  • I know you know I know
Re: Learning to Code
« Reply #23 on: January 20, 2017, 05:05:37 PM »
My daughter took an intro to programming class at University of Central Florida when she was in high school, and it was in Python.  Then when she got to MIT, her first programming class there was in Python, too.

Online Andrew Clunn

  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 15039
  • Aspiring Super Villain
Re: Learning to Code
« Reply #24 on: January 20, 2017, 05:09:02 PM »
Once you get the basic logic of programming languages, what specific language you code in is of secondary importance. I don't have much experience with C#, but I agree that Python is a really good language for learning basic programming skills. It teaches you the logic of programming without the extra hassle that comes with strong typing (though dynamic typing can also be a curse at times), pointers and memory management, and forced object-oriented design, and it forces you to learn to maintain a good, readable layout. And it has the advantage of being pretty popular right now, so there are lots of libraries either already available or being written (and package management is really easy when using pip and virtualenv). A downside is that there are no really great IDEs for python like there are for, say, JAVA or C# (in part because this is really hard to do well in a dynamically typed language).
I personally learned Java and C before python, and I think I'd have been better off in the reverse order (pointers and memory management in C are annoyingly confusing to a novice programmer). So I would say use python for your backend work (look at how to set up REST services, for example). For your frontend work you may want to use something like AngularJS.

If you reach that point, I can send you a friendly boilerplate project set up for AngularJS.
Banned from both Hacker News and the xkcd forum.

Offline The Latinist

  • Cyber Greasemonkey
  • Technical Administrator
  • Reef Tank Owner
  • *****
  • Posts: 9107
Re: Learning to Code
« Reply #25 on: January 21, 2017, 07:01:31 PM »
I am about to teach a computer science course.  I'm going to be using http://greenteapress.com/wp/think-python-2e/
IT's a very clear and concisely written book.

So I've worked through the first 6 chapters of Thinking Python, including exercises, with some side breaks to experiment. I've just been drawing Koch curve snowflakes for my kids, letting them choose size, colors, and fill from user inputs.  I think it will take some time to reorient my thinking to some of the more object-oriented concepts; what limited programming experience I had was with more procedural languages like BASIC.

I'm using Python 3.5 and PyCharm. 
« Last Edit: January 21, 2017, 07:05:29 PM by The Latinist »
I would like to propose...that...it is undesirable to believe in a proposition when there is no ground whatever for supposing it true. — Bertrand Russell

Offline Johnny Slick

  • "Goddammit, Slick."
  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 11888
  • Fake Ass Skeptic
Re: Learning to Code
« Reply #26 on: January 21, 2017, 10:05:36 PM »
I don't think there's a version yet for Python but I really enjoyed the Head First series.

Sent from my SM-N910V using Tapatalk

Speak what you think now in hard words, and to-morrow speak what to-morrow thinks in hard words again, though it contradict every thing you said to-day.

- Ralph Waldo Emerson

Offline The Latinist

  • Cyber Greasemonkey
  • Technical Administrator
  • Reef Tank Owner
  • *****
  • Posts: 9107
Re: Learning to Code
« Reply #27 on: January 29, 2017, 04:29:11 PM »
So I've now worked through Chapter 10 (Lists) and I'm on to Chapter 11 (Dictionaries).  As I go, I'm realizing what everyone means when they talk about language being almost irrelevant.  The biggest revelation to me is just how few the essential instructions of a computer language are, and how common they are to all languages.  It's been an enlightening process.

Now off to code a program to find words whose pronunciations don't change when you remove either their first or second letters.
I would like to propose...that...it is undesirable to believe in a proposition when there is no ground whatever for supposing it true. — Bertrand Russell

Offline werecow

  • Cryptobovinologist
  • Frequent Poster
  • ******
  • Posts: 3023
  • mooh
Re: Learning to Code
« Reply #28 on: January 29, 2017, 04:43:31 PM »
So I've now worked through Chapter 10 (Lists) and I'm on to Chapter 11 (Dictionaries).  As I go, I'm realizing what everyone means when they talk about language being almost irrelevant.  The biggest revelation to me is just how few the essential instructions of a computer language are, and how common they are to all languages.  It's been an enlightening process.

Now off to code a program to find words whose pronunciations don't change when you remove either their first or second letters.

If you program anything like I do, your life will frequently depend on dictionaries.
Lists are important as well, though when you need more than the basic functionality, I tend to use numpy arrays (which allow for parallelized linear algebra calculations) or even pandas tables (which is built on top of numpy but also allows for some more extensive high-level data manipulations).
Mooohn!

Offline superdave

  • Stopped Going Outside
  • *******
  • Posts: 4749
  • My name is not dave.
Re: Learning to Code
« Reply #29 on: January 29, 2017, 04:51:01 PM »
You get through the whole book you'll know more programming than I do.

 

personate-rain