1. 35

I’m starting a list of new learning projects to do when I graduate. I’ve read that tackling these kinds of projects helps you get a better understanding of programming, and computer science. Here’s my list so far:

  • Calculator in ASM
  • Interpreter
  • Compiler
  • Markov-chain bot
  • Basic shell

Do you have any suggestions to add to this list?

  1.  

  2. 13

    A ray tracer! It’s good practice for writing performant code and dealing with floating point issues, and basically an endless project if you want to go deeper.

    1. 2

      Agree, this or a fractal flame (http://flam3.com/) generator are projects I goto when looking for a medium sized project for a new language.

      1. 2

        I recommend trying to write a triangle rasterizer and see if you can match or outperform Quake’s renderer. And add some features Quake doesn’t have.

        Of course, directly rasterizing other (convex) polygons, quads in particular, might be a worthwhile addition considering how common rectangular surfaces are.

        1. 2

          Are there any good resources for people who want to get started with graphics/3D-related programming but have no prior experience?

          1. 5

            You need to comfortable with trigonometry and introductory linear algebra. I don’t know any good resources for these since I got to learn them in school.

            After that, it depends what you want to do. If you like photorealistic graphics:

            If you like real time graphics (i.e. games):

            This is done off the top of my head, so I may have forgotten some introductory material, but hopefully you’ll be able to get started with this. I’ve tried to arrange the lists roughly in order of ascending difficulty. Ray tracing will be easier to get into at first, since you won’t have to deal with OpenGL/video driver idiocy.

            1. 1

              Thanks! I have the math background, and those resources are exactly what I was looking for.

              1. 3

                For a software rasterizer (non raytracing), this is fun too:

                https://github.com/ssloy/tinyrenderer/wiki

                I’m currently working on a version of it in JS.

        2. 12

          I like doing IRC bots. It lets you learn about the way network IO, parsing, and streams are handled in your language, and it makes a great sandbox. Nobody ever complains about an IRC bot with too many features. :)

          1. 2

            Worst case, you defer to a library, and still need to learn about events and actually working with libraries. It’s also an opportunity to consider module loading and perhaps to make that possible, some OOP concepts.

          2. 10

            If you work up in dynlangs, a testing framework is a nice reminder that there’s no magic anywhere.

            If you like ASM, install DOSBox, find a copy of Lustiwg’s Little Black Book of Computer Viruses, and write one. Lots of creative programming under weird constraints. (There’s another good book from this era, but all I can remember is that the cover is yellow or orange, sorry.)

            1. 1

              I highly recommend building a test framework as well. I learned the value of test frameworks in college by writing simple test utility functions and tools. Those functions evolved into a small testing framework, eventually helping me understand the modern ecosystem of testing tools, and the motivation behind their design. My life is so much better for the experience, I don’t know how I got anything done before I wrote thorough tests!

              1. 1

                I was a heavy x86 assembly language programmer back in the early to mid 90s and can recommend anything by Michael Abrash, particularly Zen of Assembly Language and Zen of Code Optimisation. Horribly out of date by now, but still fun reads and you never forget how fun it was to cycle count on 486s!

              2. 8

                I liked working through project Euler.

                Build a tool that implements the subset of grep, sed, and awk that you use.

                For something different, learning a language, writing a web proxy helps one experience both sides of web programming in a language, which can be vital.

                1. 6

                  I always felt Project Euler programs were more about math and less about programming, but doing some basic equivalents to UNIX commands and working on a proxy sound interesting.

                  1. 2

                    If you like strings, it could be fun to implement the Boyer-Moore string search algorithm. Some (many?) implementations of grep use it.

                2. 6

                  During my Recurse Center batch, I think maybe 3 different people suggested building a BitTorrent client from scratch.

                  1. 1

                    Awesome, thanks for the reply! I’ll add that to my list, it sounds exciting.

                  2. 6

                    Here are some ideas that don’t necessarily exercise the algorithmic side heavily but do get into many real-world problems around writing, building, and testing software. I use these when learning a new language:

                    • Implement a debugging socket proxy.
                    • Implement Wa-Tor, (SciAm 1984) and render it on the screen. Understand separating the rendering from the modeling. Extra pat on the back for abstracting the behavior so you can play with other strategies than those in the paper. Double extra points for taking this separation out to threads, co-processes, or the network. This by the way makes a very good basis for a “Trek” style game.
                    • Write a parser for an existing text configuration or data file format. Examples include INI, CSV, and JSON (or S-expressions…). Explore the edge cases.
                    • Decode a “simple” bitmap image format like TIFF or BMP. Extra points for rendering the image.
                    • Implement a Z-Machine interpreter and follow the standard. Get it to run a real interactive fiction file or better yet survive the abuse test file (can’t remember the filename right now).
                    • Pick an RFC like RFC4648 and go down the rabbit hole implementing it.
                    1. 7

                      Write a useless library in Rust, the hipsters here love this!

                      On a serious note, if you’re looking for some inspiration, you can take a look at our project ideas-page http://suckless.org/project_ideas or directly in the git repositories http://git.suckless.org/ (projects range there from a suckless C99-compiler to a Wifi-jammer).

                      Not to appear self-advertising, I can also recommend working for the OpenBSD-project, because it’s the only promising operating system out there in my opinion.

                      I know it’s always more exciting to start a project from scratch, but there is a lot of code on the web for useful programs that just need some more love. I think the biggest challenge a developer is facing is to finish his projects and not just start with an exciting new idea and then just discard it when something else shows up.

                      It’s an unfortunate case, that many developers are loners and not keen on joining a development group for collaborative efforts. Especially if you’re a student in programming, having a group to aks questions to is very helpful. If more developers spent more time on collaborative coding and “playing” instead of starting projects from scratch all the time only to find out there is a better solution already existing is a waste of time, with exceptions of course.

                      1. 2

                        With respect to the OpenBSD topic. Is there a similar page of say ‘low having fruit’ that someone with some OS dev experience could look at? I worked with dlg teaching an OS dev course at the University of Queensland last year and it would be nice to be able to point people and somewhere they could look if they wanted to keep at it. (Also keen myself but my capacity probably doesn’t have enough room for another project right now)

                        1. 3

                          This thread on tech@openbsd.org shows a simple way of getting involved with OpenBSD - it will give an insight to both the kernel and ports.

                          1. 3

                            I know of no such list, however, if one can spare some time, the best pointers could be given on the ml. Just write a mail there, give your basic qualifications and they’ll let you know what work is needed. You could also keep it general and ask, what generally could be done by an OS dev in OpenBSD.

                            1. 3

                              This question pops up periodically on the mailing lists if you search tech@ and misc@ you should find some pointers. There is also a fair amount of work going on at the moment to pledge(2) programs.

                          2. 4

                            Quickcheck Paxos A database A real time networked game across the Internet A type system A prover A process scheduler A shader A gpu accelerated math problem An operating system for a microcomputer with less than 640k ram A gossip protocol A fluid simulation A generic ETL tool A Quine A Shazam clone An OCR engine A chess opponent A VR simulation An AR simulation A path finding algorithm A JIT A mesh simplifier A crypto algorithm A natural language classifier A neural net A hard real time program of any type An angry birds clone A mobile app A web app scalable to 100,000 simultaneous users

                            That should keep you busy for at least the next 36 years. Come back in another 36 and I’ll give you the second set.

                            1. 17

                              I hope the lack of punctuation means that the OP should incorporate all of this in a single program?

                              So, basically, we’ve got a multiplayer Angry Birds game, which uses a geo-replicated Paxos powered (maybe spanner?) database for the leaderboard, that makes full use of the GPU for rendering. In addition, the game is written on top of a virtualized from scratch operating system, and implemented in a new, statically typed programming language which has a quickcheck tool, and allows you to specify tests as theorems, which it will prove. The game has an offline mode which requires you to record audio and scan soup can labels in order to select appropriate background music, and, using Markov chains derived from the scanned / OCR’d labels, produce a believable soup recipe for an in game interstitial. Naturally, a new crypto algorithm will protect communications from the mobile app, and will be based on the principles of fluid dynamics. Also, the only way to play it is to make valid chess moves.

                              As ridiculous as that sounds, I still didn’t incorporate half of your suggestions… I’m slipping a bit!

                              1. 3

                                Although my post lacked punctuation owing to Lobsters not newlining properly, I’m happy to announce that I pitched our idea to Y Combinator and we have a $500,000,000 market cap now. Congrats, business cofounder!

                              2. 2

                                That list with formatting fixed by using Markdown list syntax:

                                • Quickcheck
                                • Paxos
                                • A database
                                • A real time networked game across the Internet
                                • A type system
                                • A prover
                                • A process scheduler
                                • A shader
                                • A gpu accelerated math problem
                                • An operating system for a microcomputer with less than 640k ram
                                • A gossip protocol
                                • A fluid simulation
                                • A generic ETL tool
                                • A Quine
                                • A Shazam clone
                                • An OCR engine
                                • A chess opponent
                                • A VR simulation
                                • An AR simulation
                                • A path finding algorithm
                                • A JIT
                                • A mesh simplifier
                                • A crypto algorithm
                                • A natural language classifier
                                • A neural net
                                • A hard real time program of any type
                                • An angry birds clone
                                • A mobile app
                                • A web app scalable to 100,000 simultaneous users
                              3. 4

                                I’ve taken to writing cat(1) in new languages. Can start quite simple (read file, output file) and then get more complicated trying to match behaviour (read stdin on -, handle errors/stderr output, keep files in correct order, etc). I wrote a cat_linter to make sure my implementations matched the original behaviour, and have so far done this in ruby, golang, elixir and swift.

                                My other go-to project for a new language appears to be an IRC bot. Slightly more complicated as it involves networking, but simple enough to get somewhere with.

                                I’ve also found solving problems on Exercism and codewars to be useful, both in further existing language knowledge and giving me problems to solve in new languages.

                                1. 3

                                  May I add developing an operating system? It got me entertained for 1 month 4 years ago, I followed this tutorial http://www.jamesmolloy.co.uk/tutorial_html/ although it seems to be down at the moment,

                                  1. 1

                                    Full text search engine.

                                    1. 1

                                      Depends wildly on your skill level, what have you done before?