Announcement

Collapse
No announcement yet.

The Programming Thread (was New to Programming)

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The Programming Thread (was New to Programming)

    Not sure if this is the best place to put this, but anyway...

    Where is the best place to start for someone who wants to learn how programming works? I mean, extreme beginners. I did a 'Hello World' in C about 7 years ago, and I can't remember how to do that anymore - that basic. This is just something I want to do for fun in my own time, I've no real intention to start coding apps seriously (though that would be nice once I get to that point), I simply want to learn and understand.

    I gather C++ is the best place to start these days? As I understand it, it seems to make more sense than 'unlearning' the higher level languages later on at any rate. If people agree with this, can anyone recommend a book, or a place to get started?
    Last edited by Brad; 17-05-2011, 11:12.

    #2
    Start off with C. C++, like Java, is object orientated.

    Comment


      #3
      Why C? I'd have said Object Orientated was the way to go really. I used this book once, It divides everything up into hourly chapters. There's a large emphasis on theory rather than coding at the start, then the second half of the book has you building a single application. The 2010 version seems to get bad reviews though.

      Comment


        #4
        ^That sounds like a book that could work for me. I don't really have enough free time to put significant amount of time a day into this, it's just something I want to do in my free time, so breaking it up into hour-long sections sounds ideal. I'll find out what, if anything, is wrong with the 2010 edition first though.

        I assumed C++ would be a good place to start for me simply because it appears to be the dominant language. You reckon C# would be better?

        Comment


          #5
          C# is essentially Microsoft's answer to Java, and they both share a lot of the same theory, at least for a beginner anyway. The modern focus is on Object-Orientated design. Java is possibly the most popular language in existence. C++ would be a lot harder to learn, and probably isn't the best introduction.

          Comment


            #6
            The reviews for that particular book suggest that it's better for people with prior knowledge of programming - would you agree with that? I'm basically looking for a book that assumes no prior knowledge, but isn't going to be too patronising or skip over things (I used 'C for Dummies' once and it kinda irked me).

            Have you ever used this book? I know it's for C++, but the reviews sounds positive.

            Comment


              #7
              Don't know how relevant this is, but I saw it recently:

              Lifehacker is the ultimate authority on optimizing every aspect of your life. Do everything better.

              Comment


                #8
                I was recommended that I learn Python, "because you can print Hello World with one line". I did that fine, but I'm impatient - I wanted to make a program with a GUI, to do that I had to download extra stuff and work out how to put it all together.

                So, I wrote a program using AutoHotKey instead. Real programmers will scoff, but I got the computer to do what I wanted to do in about 2 days, so who's laughing... probably nowhere near as powerful for what you want to do though.

                Comment


                  #9
                  For me it's kinda the opposite. It's not so much that I want to write apps (although that will be a part of the process, and probably essential for practice), more that I want to learn and understand.

                  Comment


                    #10
                    Avoid C, it's only used for legacy code or really low level hardware stuff these days. If you want to write procedural style programming you can learn that just as easily in C++.

                    I would say, as your instincts have told you, that C++ is a much better option than Java or C#. For one thing going from C++ to Java/C# is a lot easier than doing the reverse. While I learnt Java first I had a really good teacher who taught us C++ principles along side it. I've seen many people however who didn't get this grounding and they don't have a clue what Java is doing under the hood, which is a bit dangerous really. The freedom that C++ gives you makes it a lot easier to write little bits of code to learn fundamental algorithms and data structure designs that would be good for a beginner to play around with. You'll learn what's really going on in the compiler. Self taught Java can result in a number of bad practices being picked up. A beginning Java/C# programmer will spend far more time reading library documentation and far less time coding than a C++ learner will.

                    I can't recommend any particular beginner C++ book as like I say I came off Java but I would recommend getting the following in addition:


                    This is the guy who created C++. This book goes into great depth on the real specifics of the language. As a reference book for any topic you want greater detail on it is unparalled. Though you do have to put up with a few off topic ramblings now and then which are of debatable truth.


                    A great, small, cheap, concise reference book. Perfect for revision of quickly checking something. Once you've got your head around basic algorithms and start using the STL rather than writing them yourself they do an STL one too.

                    Key thing is to just keep cracking at it. Programming, despite what some people might portray, is real easy, most people can do it. If you ever get stuck on a concept, move on and revisit it later. With a clear head it's amazing how some things can suddenly become clear.

                    Set yourself little projects as well coding little algorithms. A few I recommend are Huffman encoding, Red-Black trees, run length encoding, various sorting algorithms like merge sort, quicksort and heapsort. These are great ways to practice coding while learning fundamental building blocks that are achievable and give a sense of achievement in the early stages.

                    Comment


                      #11
                      Thanks for that, I feel a tad more confident about where I should be going with this now!

                      Reading around on the net, I bumped into this book. This seems to be the bottom rung beginners book, assuming I have practically no knowledge at all - which would be true. As I mentioned before, I'm really not a fan of the '...for Beginners' series, mainly because of the overly-jokey way that everything is presented, but content-wise this looks like a good place to start before moving onto some of the other recommendations in this thread.

                      Comment


                        #12
                        Hey Jake,

                        I used to teach C++. I chose this as the course book:



                        It seemed to go down pretty well. It's several versions on from the second edition that we used but I'm guessing it must still be largely the same.

                        Learning C++ is going to be slower than any of the other modern languages, but like Monkey says, once you know C++ every other language is a piece of cake. You can do awesome stuff in C++ that you can't do in anything else. If you want to learn about what goes on under the hood then C/C++ is a good choice.

                        Comment


                          #13
                          I would say it depends what you want to make... I think a lot of big games are written in C++, a lot of small web games are written in Java, a lot of commercial apps are written in C++ or C#. A lot of websites are written in php or asp.net (mvc is cool). A lot of webservices are written in wcf. It's horses for courses

                          I make a decent living out of C# and I think its amazing how easy it is to get into it with a few pointers now that I've been doing it a while (I'm a senior/lead web developer in a small company making big asp.net mvc sites and small content delivery sites)

                          If you want to try C#, download Visual Studio 2010 Express (free and awesome!), then click File>New Project...> Console Application

                          google "hello world c#" or "intro to c#" or some examples

                          Then find something to code that you'll enjoy!

                          Comment


                            #14
                            I wouldn't recommend C/C++ as learning languages really. They are really really hard to get to grips with and require advanced concepts for basic data types.

                            Lots of people get sniffy with learning Java (which is one of the best learning languages of OO) because it allows bad practices in coding.

                            Yes it's important to learn algorithms and data structures but that's no good if you're banging your head against the desk at 1:00am trying to fix a null pointer exception.

                            Comment


                              #15
                              I agree with you wholeheartedly. however, it was my understanding that the OP wanted to learn all the nitty gritty so to speak. Short of learning assembly language I think C++ is a good place to start for him as he gets to learn what goes on in the guts of the computer but is also able to use modern programming techniques such as inheritance, polymorphism and generics.

                              You're right though, C++ is tough to learn and there are many many gotchas that can take an age to debug if you're a novice.

                              If you want to actually produce a proper application that does something useful then Java is a far better choice, plus of course it'll run on anything more or less.

                              Comment

                              Working...
                              X