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."

29 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. Re:Try a microcontroller project. by phillk6751 · · Score: 2

      Even though I haven't yet tinkered with an Arduino I have to totally agree with this. As a professional programmer with similar experience here are a few reasons why:

      1)I have had to work with machine automation in both of my programming jobs extensively. Knowing how to program 'realtime' devices is very useful in an industrial environment (Reading barcode readers, processing, output....or reading relay state/change, determining course of action, switching relay or sending notifications to a user...or combinations thereof like reading from a barcode reader and comparing to a database/list/group and sending a relay output to tell a belt to stop for example).
      2)You will learn about many things that are difficult to reproduce without sensors/switches/etc including timing, triggers, events, etc

      One issue I do have with this however is that sometimes dealing with devices like this, you can easily fall into a trap where inexperience can lead to code that is almost impossible to debug or problems that come up that are very difficult to reproduce.

  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 rwa2 · · Score: 2

      Now that you're an "intermediate" programmer, find an existing piece of code somewhere and modify it to do something you want. You'll cover a lot of ground, since you're already starting from a fairly capable codebase, and you'll learn a lot about what you like and don't like from trying to read other people's code. Python is a great "glue" language, so the code you're looking at using need not even be in the same language.

      Back in the day I hacked up some 3D gnome tetris game in C to output game state to a file that was parsed by a perl script that would build and solve an FEA model of that structure in SLFFEA in near-realtime. It was pretty fun to work with those kinds of building blocks.

    2. 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. Re:Something else? by TapeCutter · · Score: 2

      Bad form to reply to oneself and all that. If you (the submitter) are trying to drill down through the dependencies in an attempt to find the "bottom". There' isn't one, it just sort of fades into hardware in the same way life fades into chemistry at the cellular level. However a very practical idea is to consider C "the bottom" and work up as well as down. Programming requires the ability to mentally move through levels of abstraction, nobody truly "knows how to program" but there are plenty of people who practise it quite well. My employers don't pay me "Senior Software engineer" wages because they think I'm a wizard. Yes I have the beard for it, but it's irrelevant because they are paying me to find solutions to their business problems.

      K&R's "The C Language" is not "a" classic programming book, it is "The" classic programming book.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    4. Re:Something else? by butalearner · · Score: 2

      I'm not going to condemn you for this. My own perceptions of what I would be doing with my engineering degree turned out to be so far off target that it's not even funny. I'm not working on the stuff that fascinated me. I'm working on the stuff my boss lets me do. I try to find the "joy of engineering" when and where I can, but it is very difficult to earn a living, raise a family, have the intrinsic qualifications and market demand to pursue one's very specific interests. I suspect that many other readers here would agree.

      This is not to mention that working on the stuff that fascinates you doesn't mean it's all joy. I've found this even in my hobbies: I want to make video games, but there is a lot of tedium involved. At my day job, I've spent days hunting down intermittent software bugs, and just because I do it for rockets and missiles and satellites doesn't make it any more fun than doing it for industrial wastewater management systems.

  3. Project Euler by Anonymous Coward · · Score: 5, Informative
  4. Pieces of impossible by ddt · · Score: 2

    Do a small piece of something impossible in such a way that you might be able to integrate it into the impossible thing later once your kung fu is strong enough. To tip the odds in your favour, do a piece of something that seems impossible but is something you're super passionate about. It'll help you overcome the hurdles more easily.

    1. 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.

  5. 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...

  6. 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.

  7. Simple by Anonymous Coward · · Score: 2, Insightful

    Break up those "impossible" projects into manageable chunks. That's sure to be a helpful skill when you move into even larger projects.

  8. 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.

  9. Zen by mfh · · Score: 2, Interesting

    Study Zen. Not from a religious standpoint but from a philosophical one. Once you grasp these concepts, you are ready to become a programmer or anything else you want.

    The first lesson is that an object falls into a pond directly. The object splashes directly. The object sinks directly. The sequence out of order is unnatural.

    Okay so this idea informs you about security, and about data flow. More lessons await! :)

    --
    The dangers of knowledge trigger emotional distress in human beings.
    1. Re:Zen by mfh · · Score: 2

      This is an example of a koan.

      What is the Buddha nature of programming? I see this only as to, with heart, effortlessly spawn systems.

      The koan of the pebble as it is tossed into a pool is powerful and yet effortless.

      From a programming standpoint, the server is the pond. The pebble is the data that will connect to and be placed into the server. The person tossing the pebble is the user. Each activity will take the shortest path, perhaps to the farthest depth. The pond can reject pebbles (frozen). :-)

      Systems rely on this koan.

      --
      The dangers of knowledge trigger emotional distress in human beings.
  10. 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.

  11. 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.

  12. SICP by jbolden · · Score: 2

    I'd go for the classic medium and I want to get better SICP.

    Online course: http://ocw.mit.edu/courses/ele...

    Online book + problems +... http://mitpress.mit.edu/sicp/

    This book more than any other will take your programming to a new level.

  13. 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.

  14. 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.

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

    Write a calculator.
    Sounds easy right?
    Good luck.

  16. 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.

  17. Not intermediate yet by ranton · · Score: 2

    I would move past writing software for yourself. While "intermediate" is obviously subjective, you are very unlikely to be at that skill level if you have never sold software or written software for money. Writing software for yourself is so much easier. You can change your goals based on what is easier or what skills you already have. You don't have to figure out difficult problems just because that is what the customer wants.

    Since it can be so hard to find work with no experience, and with no academic credentials, a close second is to write software for free for someone else. I started developing software without a degree by writing CRM/ERP software for small companies (not that I even knew what those initials meant at the time). It taught me not only how to write better software, it taught me how to gather requirements and deal with customers. There will probably still be huge gaps in your abilities because of a lack of mentoring from someone in the industry, but it help you prove yourself enough to get a job in the industry.

    Even if you can't find anyone who wants your help with software, a fake web-based CRM/ERP software project is a great way to learn skills that are actually useful in industry. And you will still have something to show employers if they want an example of your work.

    --
    -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
  18. But what do you want to DO? by FuzzNugget · · Score: 2

    You're asking the wrong question. Programming isn't an end in itself, it's a means to an end. Ask yourself what practical application you want to accomplish, then teach yourself the appropriate language.

    Personally, I always liked website development. I like that I can keep my fingers in a few pies that I enjoy -- graphic design, sometimes photography, the occasional copy writing and the code to put it all together. So, naturally, I gravitated towards PHP, JavaScript, HTML and CSS (OK, those last two aren't really programming). I'll admit, I like the instant feedback and gratification of interpreted languages.

    So come up with an end goal that interests you, then do some research to find the best language(s) suited to the task. If it seems too complicated, scale back your ambitions a bit until you find something suitably challenging without being overwhelming, then work your way up. You'll find that many of the skills and principles you learn from one language translate pretty quickly to others.

  19. Ruby Warrior by Squiggle · · Score: 2

    If you like Python you might like Ruby too (I love em both). I always wished I had learned Ruby with ruby warrior:
    https://www.bloc.io/ruby-warri...
    https://github.com/ryanb/ruby-...

    --
    Complexity Happens
  20. Try Fractals by KingOfBLASH · · Score: 2

    Fractals are complex images generated out of amazingly simple algorithms and math.

    You can quite easily go from easy to sophisticated solution, you'll get exposure to different aspects of programming, and it's something you could spend as little or as much time as you'd like. They literally go on for infinity so in addition to the mandelbrot set and the julia set that you have probably seen a million times before, you can create many amazing different images from them.

    Plus you'll get a "cool man" feeling when you print up a giant psychedelic sized poster and people visiting comment on how awesome it looks.

  21. 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.