Slashdot Mirror


Ask Slashdot: Beginner To Intermediate Programming Projects?

An anonymous reader writes "I've been teaching myself to code recently. I've made good progress so far, and I've written a bunch of little scripts to make my life easier. Here's the problem: most project ideas I come up with now either seem pretty easy or pretty impossible. I'm having trouble thinking of a project that'll stretch my skills without overloading them. I've tried finding open source projects to read through, but I run into the same thing: either it's straight-forward, or it requires reading a half-dozen dependencies, each of which has dependencies of their own. Anyone have suggestions on some intermediate-skill projects to undertake? Or some project files in an online repo that go beyond the basics without getting overwhelming? My language of choice is Python, but other languages are welcome."

16 of 172 comments (clear)

  1. Try a microcontroller project. by wb8nbs · · Score: 5, Informative

    I would suggest getting an Arduino. There's tons and tons of example code out there at all levels of expertise. And it's fun.

    1. Re:Try a microcontroller project. by PopeRatzo · · Score: 4, Insightful

      I don't know dick about programming, and I've been having fun with my little Arduino.

      It brings me back to my callow youth, playing with a breadboard and figuring out how to make LED's flash. Except this Arduino can actually do stuff.

      Right now, I'm playing with making a sort of frankenstein controller for an old analog modular synthesizer. A cross between a Theremin and a Kaoss pad and percussion pads.

      But it might end up as a cat torture device, if that damn thing doesn't stop chewing on my earbud cables.

      --
      You are welcome on my lawn.
  2. Something else? by TechyImmigrant · · Score: 5, Interesting

    Programming isn't an end to itself. Well it can be but, generally we program to do something else - payroll, missile guidance, selling stuff over the internet, etc.

    What else do you know? Are you an expert in newt farming? Write an application to automate the tedious aspects of new farming.

    Once you have a problem to solve, it becomes attackable. Having to hunting around for the right sized problem suggests you aren't acknowledging the problems you already have.

    --
    I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    1. Re:Something else? by TapeCutter · · Score: 3, Insightful

      Agree, find a problem. Work out an algorithm/heuristic that solves it, then attempt to implement it. If you are not sure how to implement it then you have found a problem of suitable difficulty and you may then want to look at how others have attacked it.

      AI, simulations, and number theory are (for my tastes) great places to find intermediate to difficult problems (and the algorithms that solve them), 25yrs as a commercial developer and I'm still finding new stuff in those fields. For example I started learning python (for work) by implementing my favourite intermediate "hello world" program, an n-body gravity simulation. I'm currently looking at CUDA (for fun) using my trusty "hello world" sim, they supply an optimised example of the same problem but I won't look at it until I have mine working.

      Also it depends on what you call "intermediate". Python is a "batteries included" language, how much do you know about language independent data structures such as trees, vector, matrices? Take a look at "The art and science of programming" by Donald Knuth, it's examples are in Pascal but if you inhale the wisdom in the book you will understand when I say that the language it uses is irrelevant.

      Here's an ancient problem I found in the early 80's that I still don't have a programmatic solution for, pretty sure algorithms exists to solve it but I don't want to look at any "spoilers", would much rather find an answer on my own.
      1. Create a 6x6 magic square
      2. All columns, rows and diagonals must sum to 666
      3. All 36 numbers in the square must be prime numbers
      4. Marvel at the fact that Issac Newton solved it in his head! Ironically while hand-writing nearly a million words of drivel on the "number of the beast".
      5. Bonus points if you find more than one solution.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  3. Project Euler by Anonymous Coward · · Score: 5, Informative
  4. Pygame? by Cramit · · Score: 3, Informative

    You could build a small game in Pygame!
    http://www.pygame.org/

    A basic banner ad type game tutorial.
    http://www.pygame.org/docs/tut...

  5. Don't overlook the easy by DerekLyons · · Score: 4, Insightful

    Don't sneer at the easy/simple/etc... Just because they seem so at first blush doesn't always mean they are so once you get into them. Not to mention, working on the basics never hurts no matter what you're trying to learn.

  6. Managing dependencies is a key skill... by Narcocide · · Score: 3, Informative

    ... and if that is all that stands between you and every single project that isn't "too easy" for you, then THAT is exactly what you should be working on.

    However, you can learn SDL and fairly easily use it with C and/or C++ and make simple games and graphical apps with no or at least very few additional dependencies.

  7. checkio and hackerrank by LetterRip · · Score: 3, Informative

    The two sites checkio and hackerrank can probably provide you some challenges. They will force you to learn some algorithms (trees, graphs, etc.) which will provide you with tools you need for more complex projects.

  8. Simulate a microprocessor. by crgrace · · Score: 3, Insightful

    When I was in graduate school I had to write a C program to simulate the operation of a small custom microprocessor. It was a truly fascinating experience (and not terribly difficult). You can start with something really simple like a MIPS variant and go from there. I actually had to write several simulators at different levels of abstraction (one only simulated the instruction set, another simulated down to the microcode, etc). Just simulating a small instruction set is a great way to get started.

    The cool part of this kind of project is it gets you learning so many different things out of necessity. To run assembly code on my C-based microprocessor simulation I had to learn to write assembly language programs. Then I had to learn how to write an assembler (I did it in C but if I were doing it today I would use Perl or Python) to generate object code for my microprocessor simulation.. Then to debug the microprocessor I needed to write a disassembler and so on.

    The microprocessor was microcoded so I also got to learn how to write microcode to verify fine details of the microprocessor. I got some great insight to computer arithmetic and really enjoyed it.

    I can't tell you what a cool experience it is to see a simple assembly code you wrote run on a microprocessor simulation you wrote. This can lead to getting involved in emulation but I didn't do that. I'm in the chip design business now so I write simulations and models of all kinds of analog and digital circuits and it is a blast.

  9. To the tune: Let it be by AdamColley · · Score: 4, Funny

    When I find my code in tons of trouble,
    Friends and colleagues come to me,
    Speaking words of wisdom:
    "Write in C."

    As the deadline fast approaches,
    And bugs are all that I can see,
    Somewhere, someone whispers:
    "Write in C."

    Write in C, Write in C,
    Write in C, oh, Write in C.
    LOGO's dead and buried,
    Write in C.

    I used to write a lot of FORTRAN,
    For science it worked flawlessly.
    Try using it for graphics!
    Write in C.

    If you've just spent nearly 30 hours
    Debugging some assembly,
    Soon you will be glad to
    Write in C.

    Write in C, Write in C,
    Write in C, yeah, Write in C.
    Only wimps use BASIC.
    Write in C.

    Write in C, Write in C
    Write in C, oh, Write in C.
    Pascal won't quite cut it.
    Write in C.

    Write in C, Write in C,
    Write in C, yeah, Write in C.
    Don't even mention COBOL.
    Write in C.

  10. Games and ProjectEuler by EmperorOfCanada · · Score: 3, Interesting

    The two bits of advice that I have given to a zillion beginning and intermediate programmers are games and ProjectEuler. First project euler is great because it will exercise your math abilities and problem solving abilities in any given language. Few CS people realize how powerful properly applied mathematics can be. PU will get you in tune with that ability.

    Secondly I recommend making some games. Pacman, space invaders, something 3D. They don't have to be good. But ideally you move onto multi player.

    Basically if you can make a multi-player multi-platform pacman in an isometric view in OpenGL driven 3D with a server(SQL/NoSQL) driven leaderboard with a distrubution/installer module for each platform then you are done. There isn't a whole lot of programming that you can't do.

    Not to mention your friends will think that you are a whole lot cooler making a game than when you try to explain the challanges of problem 132 in Project Euler.

    Many people here are mentioning Arduino (which I love) it is a cool thing to add to your resume but unless you do something fairly strange then it won't expand your programming skills much. Arduino programming is usually fairly straight forward act / react. Although dealing with crappy sensor data and having motors not do exactly what you meant and then having to compensate is both frustrating and oddly satisfying.

  11. Calculator by Charliemopps · · Score: 3, Interesting

    Write a calculator.
    Sounds easy right?
    Good luck.

  12. Different mindset by thatkid_2002 · · Score: 3, Insightful

    Stop thinking in terms of difficulty levels and programming problems. Go out there and just do stuff, easy or hard, with the objective of making something meaningful happen. Have another look at Open Source - maybe you don't grok open source and the ecosystem yet, but give it a bit more time and start with the simplest bugs rather than feature development.

    Something that I have found particularly helpful is having a go at using open source tools and libraries and then when you find something hard to use (and with a lot of swearing, eventually understand it) go and write a tool or a library to make it easier. There's so many rough edges out there that you can smooth out and these problems tend to have a fairly confined complexity in my experience. You've already started this with your scripting so take it to the next level.

  13. Re:Pieces of impossible by Quirkz · · Score: 3, Interesting

    I think this is a good answer. Dream big, start small. About a decade ago I decided I'd like to create a web-based computer game. I had some very beginner web, PHP, and MySQL skills. In theory that was enough of a foundation, as long as I continued learning, but it was a daunting task, because I didn't know many of the simplest things, like even how to keep track of values behind the scenes (such as with session variables). I started very small, coding little pieces, figuring out just enough. Some of the really early components were actually gambling mini games, because those have such strictly defined rules. Once I had a rock-paper-scissors game and a craps game, I'd picked up just enough that I felt I could also implement a simple store. After coding a store, I realized I knew almost enough that, with a little more research, I could code an equipment page that added and removed gear, without really paying any attention to the benefits on the gear. From that came the character sheet which displayed gear plus other stats, then some simple noncombat adventures which gave players equipment and money or increased stats ... and so on. Each new thing required some learning, but most of it was incremental enough, and the learning specific enough, that I could bite off one interface/interaction at a time and keep going.

    Sure, it took me six months until I thought I had anything worth inviting play-testers, and a year to go into beta testing, plus a couple more of development, but eventually I had a complete game, a sprawling thing of size and complexity I couldn't remotely have imagined at the beginning. It wasn't only fun, but also somewhat profitable, and in retrospect it's one of the greatest creative efforts of my life. That's something which would have sounded silly to say as I was testing out code for those first couple of exercises with RPS and craps, but that's what they led to.

  14. Re:Not kidding by Anonymous Coward · · Score: 5, Funny

    You should believe him. He's an AI I wrote last year when I was learning to program in Python. Now I'm an excellent programmer.