OT: Is Python a good language to start learning code?

Mr Sworld
Mr Sworld Posts: 703
edited January 2012 in Commuting chat
I know there are IT geeks on this forum so I'd like to pick your brains...

I'd like to learn something new this year and maybe look at a new career for the future. As I've always been quite comfortable with computers I think I would like to learn how to code.

From what I've googled Python, while not a overly used language, is suggested as a good starter language to learn. I'm not too sure what I want to do in the future (maybe some apps for smartphones) so don't know which of the major languages I'll eventually learn.

So, am I on the right path? Any other languages I should start with instead? Is it easy to get a 'part time' job in writing code?

Thanks in advance. 8)

Comments

  • Coding? good luck with that.

    Is it easy to get a part-time job writing code?
    Yes and no - IT isn't the industry it was 10 years ago - there is no such thing as a guaranteed job anymore.
    However there are expanding areas in IT which have huge skills gaps.
    For example, our place is desperate for developers who know anything about Cloud development.
    For us, we are looking at people with .NET, C++, ASP.NET, WCF, and Visual Studio and for people who can work with MS Azure.

    As for Python - it is open-source and extensible, but here we would see someting like Ruby alongside Ruby on Rails as a better alternative. Python is supposed to be very similar though so if you could do one, it should be easy to transfer your knowledge across.

    I'm sure others on here will be more help. I work in software development, but got out of the development game 4 years ago.
    2007 Felt Q720 (the ratbike)
    2012 Cube Ltd SL (the hardtail XC 26er)
    2014 Lapierre Zesty TR 329 (the full-sus 29er)
  • sketchley
    sketchley Posts: 4,238
    Learning something from scratch for the first time I'd suggest looking Windows PowerShell as PowerShell is the new black in Microsoft land.

    Other than that and for part time coding I'd look seriously at Apple and Android application development. Not something I know I lot about but the market for them is huge. I'd suggest doing your own research on this before you jump in.
    --
    Chris

    Genesis Equilibrium - FCN 3/4/5
  • CiB
    CiB Posts: 6,098
    I've never used Python and don't know anyone who does, which doesn't mean it's obsolete, more likely that I am. When I started the common theme was that learning to programme and learning a programming language at the same time was hard and two separate things; it was, and is. Once you understand the logic of programming - loops, if constructs, object orientated, all that stuff - learning another language is much easier. So your best bet is to learn programming using an easy to use language. Knock it if you like but VB.Net & C# are pretty easy to learn and will allow you to get your head around how programming works.

    I occasionally get asked to help newcomers with learning the basics; it disappoints me to see how few have a grasp of using loops and if then else constructs etc to make a program do what the exercise requires. Like the guy who proudly told me he'd used an if loop as he couldn't make his while loop work.
  • mudcow007
    mudcow007 Posts: 3,861
    edited January 2012
    im told that Microshaft Dynamics or i think its called AX - is something to get your head into

    i did a bit a Java at uni (anyone familiar with the "hello world" print to screen command), Cobolt is something that if u can get your head around, is worth knowing as there are loads of legacy systems that still use it but fewer an fewer Cobolt nerds around (old language)
    Keeping it classy since '83
  • CiB
    CiB Posts: 6,098
    COBOL, not Cobolt. I was one. :)

    It's not died the death but learning COBOL is akin to learning how to restore Austin 7s with a view to becoming a car mechanic. Same basics maybe but largely irrelevant these days.
  • mudcow007
    mudcow007 Posts: 3,861
    CiB wrote:
    COBOL, not Cobolt. I was one. :)


    ahh come on tomata - tomato!

    your a rare breed!

    are you still a code warrior?
    Keeping it classy since '83
  • CiB
    CiB Posts: 6,098
    Amongst other things yeah. Stats is an example of amazing technical coding wizardry combined with a total inability to create a nice GUI. I'll go far.... :)
  • tgotb
    tgotb Posts: 4,714
    Slightly OT, but I reckon it's quite a bit harder to get into coding than it use to be; my peers and I grew up writing various dialects of BASIC on very simple home computers, probably because programing was the only interesting thing you could do with them. It was exciting because we were all breaking new ground, writing our own games, stuff like that. By the time we left school we all had a very sound understanding of the principles, and learning "proper" languages like C was a relatively straightforward exercise. In those days, the command line was synonymous with the BASIC interpreter, so you were straight into the programming environment; in contrast, to write "Hello World" in Java, you have to start by downloading a JDK and an IDE (which also means that you have to find out what JDKs and IDEs are before you can even get started)

    For this reason, I'd echo the previous suggestion of having a go at Android/iPhone development. I've never done anything for the iPhone, but I know that you can download everything you need to develop in Android for free, follow some basic tutorials, and be up and running with your first Android app in an hour or so. More to the point, you can develop something useful and original, which will keep the motivation up. Modern phones have lots of sensors built in, so there's plenty of scope for building something fun/interesting. I'd have killed for a platform like my Android phone when I was a kid!
    Pannier, 120rpm.
  • +1 for ruby on rails
    Le Cannon [98 Cannondale M400] [FCN: 8]
    The Mad Monkey [2013 Hoy 003] [FCN: 4]
  • I currently write Python for my day job. It is a nice enough language and gets the job done. I also write a lot of JavaScript, and have previously been employed writing Ruby and PHP. If I was starting again now in my free time I would probably learn in either Ruby, Python or JavaScript. But it really depends on what you want to do. Personally I love the internet so I focus on languages and technologies that let me do that.

    My advice would be work out what it is you want to achieve. Do you want to make a website? Or perhaps you want to make an App for your phone, or you might want to be able to program something like an Arduino. Then look at the languages that let you get that done.

    If you do decided to learn Python I would start with Zed Shaws `Learning Python The Hard Way` (its an ironic title). You can read it for free online and will take you through the very basic programming principles right through to writing large python applications. You can find it here: http://learnpythonthehardway.org/
    -- edd
  • Python's a good language, I use it a lot for testing my code. The only problem with it is that you'll end up writing test systems for people who do real code. Once you've learned one language, the others aren't as hard. Python probably isn't the easiest to get the hang of, though, as there isn't much in the way of good documentation online - if you find a decent book on it, though.
  • sketchley
    sketchley Posts: 4,238
    mudcow007 wrote:
    im told that Microshaft Dynamics or i think its called AX - is something to get your head into

    Dynamics is good to learn. AX is the accountancy / ERP side or it there is also CRM which is very good at what it does. You'll need to learn JavaScript for both and either VB.net or C#.net to do any coding with them. So I'd start there. If that what you want to do.
    --
    Chris

    Genesis Equilibrium - FCN 3/4/5
  • TheStone
    TheStone Posts: 2,291
    Haven't heard of half the stuff mentioned so far!

    My advice would be C# .NET. The dev environments can be downloaded and set-up free and easily. You can build extensive apps and a good step towards other types of programming.
    exercise.png
  • notsoblue
    notsoblue Posts: 5,756
    I'd choose a language that you will enjoy the potential applications of. Personally the only coding I know is for web based applications because many years ago I decided to try my hand at designing my own website. Lots of messing about later on personal projects and I managed to get to a reasonable standard with the peak of my achievement being a (modest, but sound) e-commerce site for my employer. So I know about object oriented programming, (basic) web services, web standards etc.... and I know enough to know how much more *real* coders know than I do.

    Anyway, my point is that it would be worth choosing a language that you can make stuff that entertains or remunerates you :)
  • I use Python extensively (where C/C++ performance is not required) and would have to say that it is a pretty good language if you don't know much at all about programming (or even if you are experienced, come to that) - it's accessible for the complete beginner and has more than just beginner level constructs built in to the language: things like lambda functions, map/reduce, generators, etc.. I'm actually using it to teach my 11yo daughter how to program. There are also lots of freely available libraries - web frameworks, scientific libraries, imaging libraries - if the large standard library doesn't cover an area that you want to explore.

    However, if you want a language that you can get a job with, Python may not be what you are looking for. In most cases, Python is a useful second language on your CV but others are likely to buy more CV points as the only language on your CV.

    Since I reckon that programmers should be largely language agnostic, I would suggest starting with Python (since everything you need is freely - in both senses of the word - available and it is a good language for learning) and, once you are comfortable with the concepts, pick another (perhaps more marketable) language and have a play with that. Appreciating that differences between languages is almost as important as understanding one language in the first place, IM<HO!

    _
  • I am a Mechanical engineer who dabbles with programming.

    I have written quite a few VB macros for automating boring work tasks - but quite a few of these consisted of using a published routine and modifying it for my own purposes.

    I have also written stuff in java and android.

    The one thing that I learnt is that not only do you have to learn the language but the programming environment. The environment is almost as important as the language! There are free ones I have used elipse and netbeans they have additional languages that can be added.

    I felt the learning curve was painfully slow! ( that could have been just me ).

    Good luck
    Racing is rubbish you can\'t relax and enjoy it- because some bugger is always trying to get past.
  • Agent57
    Agent57 Posts: 2,300
    I was going to suggest Codecademy, as Maxticate has just posted. One advantage of Javascript is that there's nothing to install etc. as you can do it all in a browser. Also, if you're using a decent modern browser (e.g. Chrome) you can play with the graphical capabilities of the HTML5 canvas, and write some games.

    As for Python, I think it's a good language to use. There are others that people might recommend, like Ruby, and different languages have their good and less good points. If you want to try Python, there's an e-book you can download - Snake Wrangling for Kids - which is aimed at children (age 8 upwards), and is therefore pretty easy to follow for your first steps.

    There's an interactive Ruby shell here.

    If your interest is Web development, you could pick up PHP as it's so widely used, and fairly easy to set up on your own computer (Google for XAMPP for example). It's probably not the best language to learn fundamentals with though, as there's a lot of very bad PHP code; but once you have started to think like a programmer, swapping from Python or Ruby to something else is pretty easy.

    There are "frameworks" for other languages though - as already mentioned, Rails is often used for Web development using Ruby, and Django is Python based.
    MTB commuter / 531c commuter / CR1 Team 2009 / RockHopper Pro Disc / 10 mile PB: 25:52 (Jun 2014)
  • Agent57 wrote:
    I was going to suggest Codecademy, as Maxticate has just posted. One advantage of Javascript is that there's nothing to install etc. as you can do it all in a browser. Also, if you're using a decent modern browser (e.g. Chrome) you can play with the graphical capabilities of the HTML5 canvas, and write some games.
    My son has indicated a desire to learn some HTML and Javascript. The Codeacademy looks good; do you know of something similar for HTML?
    Invacare Spectra Plus electric wheelchair, max speed 4mph :cry:
  • janm399
    janm399 Posts: 132
    Python is indeed a good language, and so is Haskell, F# or Scala or Clojure. There are other languages, like C# and Java (and many, many others). The difference is that the first set of languages are functional languages; and some of the functional languages lend themselves easily to building type systems. The second set (C#, Java and such like) are not functional.

    In the non-functional languages, your task as a programmer is to express the problem as a sequence of primitive operations (assignment!, addition, multiplication, ...). The compiler (and/or the runtime) cannot reason about the purpose of the code you've written. Also, imperative languages encourage mutable state, which makes it far more complex to understand what your code will do.

    The functional languages, allow you to deal with named operations (functions) that ideally operate on immutable state. This makes it easier for the compiler to understand what the code will do; a pleasant consequence of immutability is the fact that it becomes trivial to parallelise such programs. (Read cloud.)

    So, back to the original question. Should you use Python? Python brings some of the concepts of functional programming (i.e. the notion of functions, it includes good list comprehension and generators). It is also object-oriented, making it reasonably close to Scala on the Java platform.

    If you're going to learn Python, make sure you learn the difficult topics as well; then follow up with functional programming, type systems (and perhaps the category theory) in Haskell (if you're interested in theoretically 'clear' implementation) or in Scala or F# (if you can overlook some simplifications and inconsistencies).
    Computer geek, Manchester Wheelers' member since 2006
  • Agent57
    Agent57 Posts: 2,300
    janm399's post scares me, and I've been programming for 22 years. :D
    MTB commuter / 531c commuter / CR1 Team 2009 / RockHopper Pro Disc / 10 mile PB: 25:52 (Jun 2014)
  • Agent57
    Agent57 Posts: 2,300
    My son has indicated a desire to learn some HTML and Javascript. The Codeacademy looks good; do you know of something similar for HTML?

    I've found this, but there are lots of online resources and tutorials that cover HTML (and HTML5 more specifically, such as Mark Pilgrim's Dive into HTML5). As well as Javascript and HTML(5), the other main thing to pick up is CSS (Cascading Style Sheets). CSS is used for the presentational aspect of Web pages - e.g. whether your links are red, blue, green, underlined etc.

    The Mozilla developer network has some good stuff (although maybe a bit advanced for a complete beginner).
    MTB commuter / 531c commuter / CR1 Team 2009 / RockHopper Pro Disc / 10 mile PB: 25:52 (Jun 2014)
  • janm399
    janm399 Posts: 132
    If you're in/near London, you could come down to SkillsMatter for some of their free events: http://skillsmatter.com.
    You'll get real experts delivering exciting talks, plus there's free pizza and drinks!
    Computer geek, Manchester Wheelers' member since 2006
  • Agent57
    Agent57 Posts: 2,300
    I've been to SkillsMatter. In fact, I have a SkillsMatter pen right here on my desk, and some notepads. =) It's on Goswell Road, right? I went to the NoSQL-EU conference there the year before last. \o/ Shame I don't live closer; I'd be down there all the time.
    MTB commuter / 531c commuter / CR1 Team 2009 / RockHopper Pro Disc / 10 mile PB: 25:52 (Jun 2014)
  • janm399
    janm399 Posts: 132
    Yeah, Goswell road, the land of fixies with trendy people who do not brake for anybody. Perhaphs because they don't have brakes. All the conferences and events are good fun, I'll be there next week Monday - Wednesday (Spring course) and then 8th Feb (Scala in Spring talk).

    Note to self: try to be nicer to the hipsters.
    Computer geek, Manchester Wheelers' member since 2006
  • CrackFox
    CrackFox Posts: 287
    I really like the Head First books as language/coding primers. If you're a complete beginner, the Head First Programming book might be a good place to learn essential programming concepts using Python. These books are designed to keep your brain engaged and to make the learning process enjoyable.

    If web stuff is your area of interest, Sitepoint is a good resource for HTML, CSS and Javascript etc. Also consider Learnable for very affordable online training courses in web related technologies.
  • janm399
    janm399 Posts: 132
    Yes, I can only recommend the head first books. Some might complain that the content is not technically perfect, but they are based on sound learning theory. The path is dramatic problem -> simplistic solution (the first victory) -> "but" moment (the defeat) -> the ideal solution (the big battle) -> result! (Compare with how typical action film plots work!)
    Computer geek, Manchester Wheelers' member since 2006
  • Mr Sworld
    Mr Sworld Posts: 703
    Thanks all! That's a lot of stuff to research and great advice. :D

    Kudo's to y'all! 8)
  • Mr Sworld
    Mr Sworld Posts: 703
    While browsing the 'How-to geek' website I found an artical about Codeacadamy who are offering a starter course in code by sending an e-mail lesson every week, so I signed up.

    http://codeyear.com/ 8)