Thread: C programming!

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    12

    Talking C programming!

    simple question to everyone out there, im looking for ways to improve my c programming skills as there pretty basic at the moment, im just wondering which ways other people found best??

  2. #2
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428
    I programmed game idea after game idea lol. It may not be the best tactic, but it has worked for me thus far. I remember making text games that my nephewswould play that tought them to read, and at the same time gave me some fun learning to program.

    Every new game project led me to another concept or another book. As I slowly sifted through concept after concept, Ifs, functions, ints, char, &&s, ||s, they all slowly started to integrate themselves into my thinking. I think learning to program was alot like learning to play guitar for me. Keep playing/programming what you enjoy letting your own desire push you to get better at it. Whenever I would hit plateus in either I would, get a new book or learn a new concept.

    Usually taking on new projects will require a new programming technique that you have never experienced before. Sometimes you'll hit walls and it could be really hard to understand a concept. Don't be scared to continue on and come back to it when you feel like you are ready. I think it took me waay to long to really understand what a pointer is and how it works, and I think on some levels I am still learning about them.

    So books, lectures, forumns, websites, tutorials, ect are all great ways to learn.
    Doing something you enjoy/ are interested in will give you the most drive though.
    Virtual reality hello world http://www.rodneybrothers.com/vr/vrh...rld/index.html in html and javascript.
    Viewable with dodocase, google cardboard, OR, and other compatible VR gear.

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    As a programmer you can run the following simple program, which when executed on yourself, will continually increase your programming skills:

    Step 1: Read a good book, read the example problem statements/homework assignments, then solve each of the problem statements by writing correct programs.

    Step 2: Write several of your own creatively thought-out problem statements, then solve those problems by writing creatively thought-out correct programs.

    Step 3: If one of the above problems or solutions are potentially interesting to other people, post it on the net and get feedback. Use the feedback to improve your programs, skills, get job contracts and make money. Use the acquired skills and money to pay your bills, and now you have time to repeat step 2.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Practice and time.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    +1 for just programming, and something you enjoy programming.

    When I was learning to program, I wrote games. I copied games I could see (i.e. recreated them in my own way). I copied games that I couldn't afford but wanted. I copied and then improved games that had bugs or features that had always annoyed me. Hell, the other year, I bought "Osmos" and thought it was a really cool little game, so I knocked up a clone in about two days just to see how the original game probably worked internally (never quite got the same results, but close enough for me to guess at how it works under the hood).

    Once you start down the path of making a project, having one sentence in your head of what you want it to be when you finish, and ploughing through it until it is, it gets addictive quite quickly.

    I'm writing a game at the moment. I got side-tracked and ended up writing my own copy-protection system that I never intend to use (I'm anti-DRM, but it was interesting to see what could be done). While there, I side-tracked into recreating a path-finding algorithm that's more suited to the type of game I was writing and adding more features onto it (I started with A* libraries, ended up with a custom-modified Directed-A* derivative with time-dimensions so the path-finding "predicts" the future and avoids one sprite getting stuck because another will be in its way in 3-4 moves). While there, I wrote a software distribution system that could run from my website, offering paid downloads spread over multiple servers (and learned more about SSL, DNS, etc. along the way). While there, I re-wrote the game to do 90% of the image manipulation programmatically (so I don't include greyscale images of things where I need them, I have a routine that takes a graphic and greyscales it for me, etc. - saves on disc space, barely noticeable CPU use and means I can literally just turn one sprite image into resizeable buttons, etc.). While there, I re-wrote the whole graphical routines to cache the results of those actions (so once I'd greyscaled an image once, I had a cached copy of the greyscale image to hand should I ever need it again). While there, I converted the game from SDL to OpenGL. While there, I coded my own "achievement" system that talks to my server. While there I added QR-code production into the game and used it as a pseudo-active part of the game (i.e. collecting on-the-fly-produced QR codes on achievements which could give you, say, access to a hidden part of the website or a discount on the web-store, etc.) While there, I converted the save-game system to use SQLite databases.

    Basically, in the course of writing a simple game, I actually ended up writing my own copy of Steam, adding features that I've not seen in other games before, learning more about SQL databases and syntax (and given that I'm an IT Manager, that's quite an achievement), and touching libraries and techniques that I'd never seen before. That's how it works.

    Find a game or a piece of software that you either love or would love, and then recreate it or create it. If you don't find something to learn along the way, you weren't ambitious enough.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  6. #6
    Registered User
    Join Date
    May 2012
    Posts
    505
    Get a good algorithms book. Obviously I recommend my own, Basic Algorithms. It's very much a "second book of C", once you've worked through the introductory book to teach you the actual language, it goes on to the next level.

    Then start on a project. A good one is a program to play a board or card game. You don't need any graphics to get the first version working, just print out the board or the hand at each step.
    I'm the author of MiniBasic: How to write a script interpreter and Basic Algorithms
    Visit my website for lots of associated C programming resources.
    https://github.com/MalcolmMcLean


  7. #7
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    I'm a big fan in using forums to improve


    Here is a post that I wrote a little while ago:


    Quote Originally Posted by Click_here View Post
    If you keep an eye on this forum, you will start to notice that everyone has the same problems over and over - So after a while you'll see something like this:


    Code:
    int banana;
    ...
    scanf("%d", banana);

    And know straight away what the OP's problem was


    Code:
    int banana;
    ...
    scanf("%d", &banana);

    Figuring out why someone else's program does not work is a good way to become a good programmer.

    See if you can solve the problems in someone elses code - Watch how other people solve the problems.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-11-2012, 01:03 AM
  2. Replies: 4
    Last Post: 12-11-2011, 04:25 PM
  3. small programming job VCPP / Object Oriented Programming
    By calgonite in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 01-04-2006, 11:48 PM
  4. Total newb to programming here... Question about the many programming languages. Ty!
    By tsubotakid1 in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 10-05-2003, 10:32 AM

Tags for this Thread