1. #1

    Advice for a new programmer

    So heres the deal, I am currently in a C programming course at my university, and I'm struggling to grasp the theory and structure behind it all. I am able to look at examples of code relevant to what I'm doing and fit it into what I need, but I am unable to generate and create it on my own without help.

    The problem is, for future courses either next semester or the semester after that, I'll be in classes that require me to be a competent C, C++, and Java programmer (possibly even C#).

    I hear that once you get your first language under your belt it's all pretty easy from there, but its just not clicking for me. Does anyone know any really good books/guides to learning these languages? Maybe even some tutorial program I could go through that would clear things up for me would be super helpful.

  2. #2
    Practice and logical thinking are your friend there... Oh, and practice!
    Correlation does not imply causation.

  3. #3
    Stood in the Fire Daerth's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Dublin
    Posts
    407
    Just try writing your own small programs when you have time, start really simple and then build on that. You will adapt over time, but it varies from person to person on how easy they find it at first. Just keep at it regardless and you'll get it

  4. #4
    Mechagnome Arisfarreach's Avatar
    10+ Year Old Account
    Join Date
    Jul 2011
    Location
    Boston, MA / Pittsburgh, PA
    Posts
    505
    The most important thing I can tell you is to practice it!

    Learning a new language isn't something you can just pick up right away. You need to spend a good amount of time reading and writing your own code.

  5. #5
    I recently read a interview with the founder of "Dice" wehere he said the following:
    "That you have studied this or that is not the most important thing, the interresting stuff is what you have done".

    So create stuff, make stuff. Try to show off and you'll be noticed!

    Just realised that wasn't what you were looking for >.<

    Well, learning through stuff you are familliar with is one way, watch your favourite movie or TV show with subs in that language

  6. #6
    In the beginning it's a lot of banging your head against the concepts while struggling with syntax all at the same time. Just keep at it. You'll find and some point ... BAM ... loops make sense next thing you know you've got pointers down cold ... and so on.

    Personally, I'd say start in on a project outside of the scope of your class. Having a program you really want to finish that is not an assigned one can be a great motivator.

  7. #7
    High Overlord Repeant's Avatar
    10+ Year Old Account
    Join Date
    Mar 2011
    Location
    Canada
    Posts
    112
    Practice is the best way to do it IMO, you don't even really have to know the theory of the language in-depth (although this helps a lot). Once you get into a project where you have to code a lot the hardest part is starting, once you do though you will get into the rhythm and know what code to use. Everything else is just debugging really.
    What is magic, If not the expression of a human's desire to create something from nothing directed solely by their own mind.
    One may even describe such an occurrence as art. - Mr.E

  8. #8
    Being able to modify existing code to do what you want is a good start. Try expanding on existing programs, adding new features and what not. Once you get good at that, creating your own from scratch isn't much harder. When you're adding a new feature, you think of what you need that additional piece to do, how to do it, and then write the code for it. When you write from scratch, you have to first figure out what pieces of code you need, what each piece should do and how to do it.. then write them all (ofc write and test one or 2 pieces at a time... unless you're like me and love writing 1000 lines of code then testing/debugging it all at once).
    Tutorials/books can only teach you so much... you really need to just learn by doing.

    When I first started learning, I used some book I bought... after reading most of it, I took one of their example games from the cd ("popball") and made it... way bigger lol. Added multiple difficulty levels, achievements, secret unlockable levels, different types of controls, "gravity mode"... and all sorts of crap. The end result was a giant blob of poorly written code, but it worked and I learned how to do so much stuff, got a much better feel for the language and what it can all do... and had a lot of practice writing code to do what I needed to be done... you know, practice. From there I just had to learn to code "well".

    And it is a lot easier once you know your first language.... I had to learn perl for a math class (yes math lol) this semester and all I did was skim the syntax, and then wrote a few hundred line cgi script which worked perfectly.
    Last edited by taekvideo; 2011-10-08 at 01:59 AM.
    If the radiance of a thousand suns were to burst at once into the sky, that would be like the splendor of the Mighty One... now I am become Death, the Destroyer of Worlds.

  9. #9
    Quote Originally Posted by Daerth View Post
    Just try writing your own small programs when you have time, start really simple and then build on that. You will adapt over time, but it varies from person to person on how easy they find it at first. Just keep at it regardless and you'll get it
    I think this is the best suggestion so far. Imagine a small project (e.g. a text-based game) and try to see it though. Read many books and many tutorials. After you have your basic idea of C, download linux kernel codes and try to read though them. Overall, don't limit yourself to one single language, stay open to concepts (try out functional programming, try out Smalltalk, Ruby etc.). I have met too many university graduates who only knew Java but had no idea about programming itself (very limited understanding of basic concepts like the OOP, juts your average Java pattern thinking). If you keep some open mind and have some talent, you'll go far.

  10. #10
    yea I would have to agree with you guys on the practice, im for sure just going to start playing around with it. I found out I can get Visual Studio free through Microsoft Dreamspark from a guy in my class so I'll probably get it on my PC so I dont have to be on campus to practice.

    its just tough in that I dont really know HOW to practice, I mean sure writing a program to the specs of a school assignment is one thing, but just going out and coming up with something on your own is a whole new ball game. i may just go into existing projects ive worked on and tweak/add things, just so i dont get in over my head on a something I come up with on my own.

  11. #11
    Quote Originally Posted by Lit View Post
    its just tough in that I dont really know HOW to practice, I mean sure writing a program to the specs of a school assignment is one thing, but just going out and coming up with something on your own is a whole new ball game. i may just go into existing projects ive worked on and tweak/add things, just so i dont get in over my head on a something I come up with on my own.
    Well, imagination is the single most important ability the programmer must have Rest is skills. And yeah, its tough, but its also something you can only learn on yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •