Beginner at programming, in need of advice

Posted:
in General Discussion edited January 2014
Hello everyone,

I'm looking into getting into computer programming (specifically Java and C) and I was wondering if you guys know of any resources that would help a beginner, such as myself, with programming. I have no clue where to start, so any input would be greatly appreciated.



Thanks in advance guys.

Comments

  • Reply 1 of 14
    hirohiro Posts: 2,663member
    I teach an intro programming course, start with Python. I'm dead serious. use this online book: http://www.greenteapress.com/thinkpython/html/. It is very good and aimed at the true beginner. Python has far less overhead to figure out in the beginning, meaning you can concentrate much more on learning the logic of how you solve the problem with the language. Java and C will drive you nuts for days just trying to get something, anything, to even run the first time.



    Back to the book. Do every problem, but delay doing chapter 4's problems until after you are happy with concepts through chapter 7.



    Throughout the book there are examples, type them in. Even when you think the example is trivial. Type. It. In. Wax-on wax-off. I'm dead serious, it works for my art history and music majors, it can work for you too.



    OS X comes with a version of Python already installed, but I find the IDLE environment friendlier for learning to program than other ways. Find it in a full python distribution here: http://www.python.org/download/releases/2.6.2/ Since the book is writen for Python 2, use 2.6.2 instead of 3.0 which will keep the prInting syntax consistent with the book.



    Once you have finished with that book you will understand the basics of programming in a imperative programming language. Imperative programming language just means each line of code is a command which must be followed, there are other sub-categorizations of imperative languages but don't worry about that. The nice thing is that Java and C are also imperative languages!



    So when you move on to the next language you can keep the ideas of instruction order, logic-driven conditional branching and repetition and just roll with the new decorations. That's what most of the basic syntax differences are amongst the imperative languages, decoration!



    Sure there is a bit more to moving from language A to B, but once you understand the basics and can see the similarities, you will be able to concentrate on the transition and not seem like it is a totally new thing.
  • Reply 2 of 14
    finalblinkfinalblink Posts: 55member
    Thank you so much Hiro! This has definitely come in handy. Ive tried dabbling in C and Java before but always found it excruciatingly painful. Thank you, I never once considered Python. Thank you again!
  • Reply 3 of 14
    justflybobjustflybob Posts: 1,337member
    Stanford offers CS106A - Programming Methodology, which teaches the basics of programming and design using Java and CS106B - Programming Abstractions, which teaches you how to build clean and well engineered programs using C++.



    Combined, they offer you a solid foundation to programming.



    But the best part? The courses are FREE through iTunes U (with the exception of any books you may need to purchase). These are the full blown courses that any CS student is required to take at Stanford.



    Best of luck!
  • Reply 4 of 14
    hirohiro Posts: 2,663member
    Quote:
    Originally Posted by justflybob View Post


    Stanford offers CS106A - Programming Methodology, which teaches the basics of programming and design using Java and CS106B - Programming Abstractions, which teaches you how to build clean and well engineered programs using C++.



    Combined, they offer you a solid foundation to programming.



    But the best part? The courses are FREE through iTunes U (with the exception of any books you may need to purchase). These are the full blown courses that any CS student is required to take at Stanford.



    Best of luck!



    Yes, that's their course. The Stanford CS department uses that course as a filter to cull the students who either lack experience or the ability to teach themselves the real basics . Most CS departments do that, it is universally considered one of the hallmarks of a prestigious department. When faculty get together at conferences the quotes run along this line: "Our department is elite, we fail/drop 63% of our intro programming students."



    Everybody who wants to can program just fine, but they shouldn't be taking one of those filter classes to find out whether or not they like it. Get a bit of experience in a reasonable manner first, then the filter class can filter someone else and be a good experience for the no longer novice student.
  • Reply 5 of 14
    splinemodelsplinemodel Posts: 7,311member
    What you really need to do is determine why you want to learn programming. This reason may change over time, but you need to start somewhere. I am not a programmer by job definition, but nonetheless I often find myself cranking out programs. That's today's world. I use C and Ada/VHDL, mostly C, due to my needs.





    - Most people my age started with VB, so I suppose that's an option. I'm not sure there's any good reason to use it these days, though.



    - If you want to build web pages, learn a web scripting language. Generally these are pretty easy to master, which is helpful.



    - If you want to prepare yourself for many university programs as well as what appears to be the most common attribute I see in enterprise software developer job listings, it would seem like you should learn Java. Java, incidentally, is more than just a language. It's a whole workflow and it can probably only be learned by substantial hands-on experience. I suppose this is what open source software projects can be used for.



    - If you want to program in *NIX and potentially embedded software, it's still C. Nobody really uses assembly anymore, which is somewhat ironic since there are only 3 major CPU families on the market today (ARM, PPC, x86). Yes, ARM is now all the way to the bottom thanks to the M0 and M3.



    - If you want to program logic devices (FPGAs), or if you want to write fast-running error-free multi-threaded stuff, learn Ada. Ada is similar in syntax and concept to VHDL, which is used on logic devices and strangely is the more common of the two. Ada/VHDL is the most advanced programming language I have ever seen (its syntax is inherently parallel), and it totally deserves to be the one everyone uses to program today's multi-process, multi-threaded programs. It's a small club, but your programs will be better than your competition's.





    Lastly, I still feel that the important first step before any of this is to understand basic computer architecture and memory. There is a whole class now of dunce coders who couldn't even tell you what a "pointer" is. Don't be that guy.
  • Reply 6 of 14
    hirohiro Posts: 2,663member
    All that is true, but save those industrial strength languages for a second language.



    Sticking with a uncluttered interpreted language for a students first language means the learner has less crap to worry about while learning the logic and programmatic problem solving that will be common amongst every other language learned after that [well except maybe Prolog and it's ilk].
  • Reply 7 of 14
    yoder54yoder54 Posts: 7member
    As mentioned above...you need to determine just what you want to do with your programming.



    In many ways Java seems to be where it is at, but in the end programming languages have so much in common that if you specialized in one language...say Java, then you could pick up another like C very easily. If you are self-educating, then one of the best languages to learn on is Pascal. You can still download the compiler from Borland, and it has a lot in common with C, C++, Java, etc.



    One of the best ways to learn for the busy person is via correspondence study. UC Irvine offers certificates in Java, and Java Enterprize Edition Technologies. A 3 semester hour online class will cost you about $700. They are university level courses and do transfer. That is a really good price. If you attend classes at CU here in town, a 3 semester hour class will cost about $1200. Cal Berkley also offers courses, I took C a number of years ago from them.



    UC Irivine site is:



    extension.uci.edu
  • Reply 8 of 14
    splinemodelsplinemodel Posts: 7,311member
    Quote:
    Originally Posted by Hiro View Post


    All that is true, but save those industrial strength languages for a second language. Sticking with a uncluttered interpreted language for a students first language means the learner has less crap to worry about while learning the logic and programmatic problem solving that will be common amongst every other language learned after that [well except maybe Prolog and it's ilk].



    I don't buy this. I've met a lot of crappy programmers. Their crappiness comes from the fact that they (a) are probably not too smart to begin with and (b) probably never had a basic class in logic or very basic computer arch. Most of these guys work with interpreted languages or languages like Java that abstract pointers.



    As I said, I used things like VB, Perl, and web scripting before I ever used C or VHDL. The knowledge of the former helped very little when I approached the latter. What has helped is the exercise of solving problems with boolean logic. Assembly programming is also a great learning tool. You'll never understand the point of Java until you've used C, and you'll never understand the point of C until you've used assembly.
  • Reply 9 of 14
    hirohiro Posts: 2,663member
    Quote:
    Originally Posted by Splinemodel View Post


    I don't buy this. I've met a lot of crappy programmers. Their crappiness comes from the fact that they (a) are probably not too smart to begin with and (b) probably never had a basic class in logic or very basic computer arch. Most of these guys work with interpreted languages or languages like Java that abstract pointers.



    As I said, I used things like VB, Perl, and web scripting before I ever used C or VHDL. The knowledge of the former helped very little when I approached the latter. What has helped is the exercise of solving problems with boolean logic. Assembly programming is also a great learning tool. You'll never understand the point of Java until you've used C, and you'll never understand the point of C until you've used assembly.





    Very old-skool attitude. I can't disagree more, and you have to work to take snippets out of context and mix them with irrelevant issues.



    What is most important to a programmer? Desire to be good at it. Almost singularly.



    Those who don't really care will do crappy irrespective of their educational background.



    Of those who have some desire, the field loses way too many of them because we hang onto bogus attitudes. Start learning the logic and problem solving with a language that doesn't suck for either being flat out trailer-park trash like VB where you don't learn the basics, or too fucking obscuring of the logic by incorporating irrelevant crap designed for parsers to have a lower memory footprint back in the day --- your basic garden variety C/C++.



    Python can be an excellent road into the C family tree of languages, letting an inexperienced student learn the logic and basic structures of sequence, selection and repetition, without fighting the compiler on new-guy obscure errors. Get those three concepts and EVERY POSSIBLE LANGUAGE opens up as accessible because on a von Neumann machine, there isn't any other way to make the system work.



    Realistically, there is still a fair piece of work when transitioning to new languages, but if you get the logic and structure basis the rest is far far less work to pick up. Otherwise every new language gets learned from scratch.
  • Reply 10 of 14
    splinemodelsplinemodel Posts: 7,311member
    Quote:
    Originally Posted by Hiro View Post


    Very old-skool attitude . . . Realistically, there is still a fair piece of work when transitioning to new languages, but if you get the logic and structure basis the rest is far far less work to pick up. Otherwise every new language gets learned from scratch.



    At the end of the day, I couldn't care less about the proper path. My point is that you should learn the language that is the de-facto for the job you want to do. That said, I still maintain that dt takes a person who has gone through the pain of assembly to understand C, and likewise the pain of C to understand why Java was invented.
  • Reply 11 of 14
    hirohiro Posts: 2,663member
    Quote:
    Originally Posted by Splinemodel View Post


    At the end of the day, I couldn't care less about the proper path. My point is that you should learn the language that is the de-facto for the job you want to do. That said, I still maintain that dt takes a person who has gone through the pain of assembly to understand C, and likewise the pain of C to understand why Java was invented.



    Then by your standard the whole computing establishment is near death. Almost unanimously, our PhD level job candidates never even did more than a one week intro to assembler during a first course in architecture. It's just not applicable to the whole field of computing anymore, really it's only taught in depth for currics that lead to programming operating systems, embedded systems or compilers.



    And how many programmers care, at a visceral level, why a language was invented? Answer: very few. One sentence sums up the Java from C transition: Too many hacks fucked up their pointer management, so Java was developed to allow access via pointers, now called references, but not to allow mathematical manipulation of those references (pointers). The rest is libraries. And libraries aren't the language, they are bribes to use the language.



    And you still haven't dealt with the fact that the industrial strength language that is your de-facto standard is nearly always a very bad choice for the best language to learn logic and programming for a new student in the field. Yes, once someone has a programming clue, they should learn the language which is the right tool for the job, That goes without saying. But learning C/C++, Java or Ada first is pure stupidity.



    And OBTW: The OP wanted to know how to learn programming, that was his task. He never said word one about a language requirement for some job or other overriding concern. So if the task is to learn how to program, then learning the logic and structure of programming via Python will be far more effective and quicker than mucking through C/C++, Java or Ada. If he really wants to get into the logic and structure of programming later, he can do the MIT Open Courseware course that uses Scheme.
  • Reply 12 of 14
    splinemodelsplinemodel Posts: 7,311member
    Alright chief.
  • Reply 13 of 14
    hirohiro Posts: 2,663member
    Nice cowboy coder comment there. Good luck with finding young talent that will put up with the local atmosphere long term.
  • Reply 14 of 14
    splinemodelsplinemodel Posts: 7,311member
    Alright chief.
Sign In or Register to comment.