Interesting Programming Projects in C

Discussion in 'Mac Programming' started by vnle, Jul 10, 2010.

  1. vnle macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #1
    Hey all!

    I'm relatively new to MR and this will be the first thread I'm writing ..

    I'm currently a student in college aiming for my B.S. in Comp Sci. And so, I'm trying to learn C programming this summer but can't seem to find anything to program.

    I have a few interesting ideas in mind but not quite interesting enough. :rolleyes:Anyone in the same dilemma as I am here? :confused: What do you guys think?
     
  2. SatyMahajan macrumors regular

    Joined:
    Apr 26, 2009
    Location:
    Cambridge, MA
    #2
    Write Tetris, Chess, Solitaire, and/or Blackjack clones.

    Will give you a wealth of knowledge building any one of those projects. Plus you'll have something cool to show people afterward.
     
  3. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #3
    Thanks for the fast reply!

    I've tried those recently but never got around with finishing them in C because I've done them in other languages :( Anything more interesting? I kinda wonder what people have done ...

    But nonetheless, I shall try to finish them! :cool:
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Define 'interesting'.

    Everyone finds different things interesting. You could do some embedded programming on an AVR in C. Personally I'd find that interesting (even more interesting if you use assembly) but you might think it is boring.
     
  5. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #5
    Ahahahaha assembly programming :eek: ... I'm not that good of a programmer yet ...

    I guess I would define interesting as something that's not only good to learn but fun to program and deviating from your average "let's get started" programs i.e. number guessing games

    AVR? ... I have no idea what that is but I shall have to google it :D

    Thanks for the advice!
     
  6. Nsutton macrumors member

    Nsutton

    Joined:
    Dec 29, 2009
    Location:
    6 Feet Under
    #6
    I made a blackjack game when I was learning python. It's nice because you can set-up the frame when your just starting out and come back later when your more experienced and add things like, splitting, doubling down, saving the players money and so on.
     
  7. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #7
    I would say that it depends on what your interests are. Pick a project that is in line with your personal interests or curiosity. :)
     
  8. mdatwood macrumors 6502a

    Joined:
    Mar 14, 2010
    Location:
    Denver, CO
    #8
    One that I always find fun and still work on is solving the Traveling Salesman problem.

    It's very easy to setup and will teach you about NP-Complete problems that are applicable to so many other areas. It will amaze you how few cities you need before brute force is no longer an option even on todays CPUs. Then the fun part starts, implementing different algos to solve the problem. My current favorite is a genetic algorithm, but there are many directions you can go (many are listed on the wiki page) :)
     
  9. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #9
    Then tell us what you think is fun.


    Physics: lunar lander, lunar orbiter, space wars, etc.
    http://en.wikipedia.org/wiki/Space_Wars
    http://en.wikipedia.org/wiki/Lunar_Lander_(video_game)
    http://en.wikipedia.org/wiki/Lunar_Lander_(arcade_game)

    Physics: gunner games
    http://en.wikipedia.org/wiki/Special:Search?search=gunner+game&fulltext=Search

    For interaction, you can go the traditional console I/O route, or you can use a C lib like ncurses for basic addressable cursor action in a Terminal.app window.
    http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/ncurses.3x.html

    For example, the 'top' command uses ncurses.


    The book BASIC Computer Games has a boatload of games.
    http://en.wikipedia.org/wiki/BASIC_Computer_Games

    It's out of print, but read the article for links and more examples.

    If games aren't what you consider fun, then you'll have to be more specific than "interesting" or "fun".
     
  10. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #11
    I think learning assembler is a lost art. There's a lot of things that happen at the higher level that leave you wondering WTF is going on. Seeing that happen at the assembler level gives you excellent insight into many of the higher level languages.
     
  11. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #12
    Hmm ... that is a good project to invest some time in - considering I kinda love card games (blackjack and poker my fav). I probably will put this on my list of "programs to code" :p

    Did you do it with actual pictures of the cards?

    I think that's the problem here :rolleyes: I have no idea what my interests are in terms or coding and whatever I come up with always seems to be quite complicated :confused:

    Ekkk, I think I heard of this problem in more advanced classes. I read the wiki link you posted but it seems a bit out of my abilities atm. But it does seem very interesting - i shall have to learn theory at some point.:D

    I think those games are fun as in it'll be fun to play and whatnot. But what I mean by interesting is something that's useful, helpful to learning real programming, and .... thought provoking? Hope that clears it up!

    Before posting this thread, I have googled possible projects to code and I found that link; I was excited but once I read through the projects, it seemed to be more math-based. I'm not that great at math :( and prefer something that is pure Comp Sci but thanks for the thought :D

    Hahahaa, my friend would agree with you. I most likely will learn assembly language and I do find myself sometimes wondering how it works (i.e. when programming GUIs with all those register action commands :eek: ) but I think that's something I'll leave for when I get more advance into programming and learning a ton of concepts.

    And once again, thank you everyone! I'm starting to gather some ideas of what I want to do but it is always interesting to see how other people learn this strange subject of Comp Sci! :p
     
  12. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #13
    Hey Guys!

    Once again, Thank you for sharing your experiences/ideas.

    I think I've come up with a couple of projects to help me learn C; I'm going with a hangman game, some kind of card game - most likely poker. From there, I'm going to see how my skills stack up and maybe try some theory and maybe dabble in some database programming. :cool:

    Thanks again! :)

    :apple:
     
  13. SatyMahajan macrumors regular

    Joined:
    Apr 26, 2009
    Location:
    Cambridge, MA
    #14
    Be sure to post one or two of your best ones when you're done. This way it keeps you accountable. Otherwise, you might get "bored" ;) and not put your heart into it. People tend to do better work when there is some accountability (personal or social).
     
  14. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #15
    Will do! :D And perhaps there will be a few rounds of card games going around ;)
     
  15. mdatwood macrumors 6502a

    Joined:
    Mar 14, 2010
    Location:
    Denver, CO
    #16
    It's really not that complicated in the basic case. For example, the brute force method is much simpler than coding the AI in a poker game.

    Not to be a smart-ass, but Comp Sci a lot of math. Dijkstra said it best :)

     
  16. vnle thread starter macrumors 6502

    Joined:
    Jun 3, 2010
    Location:
    Maryland
    #17
    Ehh, I was more talking about pure math i.e. level 400s and beyond. My course load only includes up to 200s and maybe 1 300s which is fine and dandy cause I finish that already and it was easy enough. I supposed I hate doing just math but Comp Sci + Math is ok. Math in CS terms is so much better then math in ... math terms :p

    That quote is spot on! :D
     

Share This Page