21 ms·
Challenging projects every programmer should try
- azhenley 7y agoIf anyone has any other good ideas, please let me know. I'll make a list of them at the end of the article and provide credit.
- deleted 7y ago[deleted]
- wefarrell 7y agoMS paint clone.
- azhenley 7y agoI've never tried but I can see that being really fun. Someone else sent me an email suggesting a vector graphics editor. I'll add both, thanks!
- chupa-chups 7y agoYou'll have to establish an MVP program on top of the clone: https://weblogs.asp.net/alex_papadimoulis/430478 https://weblogs.asp.net/alex_papadimoulis/430478 </fun>
- dfox 7y agoMy suggestions: Implement basic widget toolkit, making something that essentially works is simple (regardless whether you implement in on top of dumb framebuffer, existing display server like X11/WinAPI or even on top of HTML). But there are lots of nuanced details that you will probably learn along the way, some of them overlap the text editor problem, then there are things like not opening windows/popup menus outside the display area (there are widely used toolkits that get this wrong even for the simplest “select box on bottom of the screen” case), clipping, handling scrolling (both detecting if something is too large and should be scrollable and actually implementing scrolling efficiently) and last but not least designing the API to be both powerful and simple to use. Simple transactional database that really has ACID semantics. Locking, BTrees, journaling, isolation levels, how to actually store all that in files. Toy unix block filesystem (there can be some overlap with previous point and for journaling design it might be better to start with the FS case). Recommended reading: https://news.ycombinator.com/item?id=12309686 https://news.ycombinator.com/item?id=12309686 And, which is maybe somehow motivated by doing this mostly pointless thing as long abandoned pet project, and thus maybe slightly nonsencial: implement AFS-like “distributed” filesystem. The interesting part there lies in RPC and authentication mechanisms, not in doing some kind of distributed consensus (thats why “AFS-like”, as AFS has single master server for each volume) And at last, although the theme is somewhat different: Implement a tool that given a path to unix file prints a list of users who have access to the file and what kind of access they have. This sounds like simple tool, but is surprisingly non-trivial even without takong ACLs into account. (This is not from me, but I read this in some similar list ~15 years ago, IIRC by Andrew Tridgell)
- umvi 7y agoIt's fun trying to recreate GNU coreutils. Stuff like grep.
- lawn 7y agoAn emulator of something is a pretty good idea I think.
- evmar 7y agoMy goto project is a terminal emulator, for reasons I went into here: http://neugierig.org/software/blog/2016/07/terminal-emulators.html http://neugierig.org/software/blog/2016/07/terminal-emulator... (summary: it touches a surprising breadth of details!)
- stevewilhelm 7y ago- A load balancer module that accepts generic worker functions. - A service that can take a real-time timestamped data and generate an internalized time series. For example returns a first, last, high, low, and average value at fifteen second intervals. - A mechanism for serializing structured data. Something like Google Protobuf. - A chart widget optimized to display and navigate date based content.
- bhl 7y agoA lightweight clone of git: implement basic commands such as log, merge, commit, fork.
- pvg 7y agoAre you familiar with Etudes for Programmers? There's a bit of overlap with your list and it's also an interesting look back at what someone thought programmers ought to try their hands at a few decades ago.
- akamoonknight 7y agoOne professional project that really changed some of the ways that I thought about programming was writing a PCIe Linux driver. Learning how the kernel lays out data structures and how they provide callbacks and passing data back to the 'user' was really just different than I had thought about things before. Definitely a lot of pitfalls, but lots of learning.
- deleted 7y ago[deleted]
- OrgNet 7y agoa simple paint program in assembly
- bwiggs 7y agoPort Scanner/nmap clone - This project is much simpler than the others, but is more approachable. It's a great project to implement when picking up a new language. If it's your first time writing one, it forces you to learn a bit about networking and concurrency if you want it to scan quickly.
- mac_was 7y agoGreat idea for projects!
- thrower123 7y agoEither a raytracer or a software rasterizer. Or both.
- azhenley 7y agoI almost added raytracer! I'll add it to the end with some other community suggested projects. Thanks for the suggestion.
- nlh 7y agoSeconded! Raytracer is phenominal, especially if you do it “purely” (no GPU/OpenGL/etc.). It’s relatively straightforward and the satisfaction of seeing even a basic shaded sphere that you literally created from scratch in code by writing pixels to a bitmap file is awesome. I did this about a year ago and it was still one of the most fun/educational projects I’ve ever done.
- Lerc 7y agoRaytracer was the thing that sprang to mind for me. Currently the only two I have left to do on the list are the Basic compiler and the spreadsheet. I plan to do the compiler quite soon, once the emulator IDE is nice enough. If I decide to do a Basic without line numbers I'll probably be doing another text editor as well. Not sure if I could bring myself to write a spreadsheet. I feel queasy just looking at them.
- aklemm 7y agoPerhaps something web-based--perhaps collaborative or real-time--and get exposure to sessions, database work, networking, APIs, and the tooling ecosystem, etc.
- merolish 7y agoSeconded, a minimal full-stack system like a messaging service could go in many directions depending on your interests.
- userbinator 7y agoThe biggest challenge is figuring out how to store the text document in memory. My first thought was to use an array, but that has horrible performance if the user inserts text anywhere other than the end of the document. The counter-argument to that is that processors are ridiculously fast in human timescales --- copying memory at gigabytes per second --- so unless you're focusing your use-case on editing correspondingly huge files, there's no real need to make your implementation more complicated than a single array. Even when DOS machines with <640K of memory and memcpy() speeds in the low MB/s were the norm, people edited text files of similar sizes, with editors that used a single array buffer, and for that purpose they weren't noticeably slower than ones today. My ideas for challenging projects are a little less open-ended, so they exercise different set of skills: being able to implement a specification correctly and efficiently. - TTF renderer - GIF or JPEG en/decoder - Video decoder (start with H.261) IMHO being able to consume existing content with code you wrote is very rewarding.
- tgv 7y ago> there's no real need to make your implementation more complicated than a single array Ugh. That's just offensive.
- yaantc 7y agoNot really, it's a commonly used scheme. Read on gap buffers: https://en.wikipedia.org/wiki/Gap_buffer https://en.wikipedia.org/wiki/Gap_buffer It's really an array with a gap at the cursor location. Used by emacs and others for decades.
- bochoh 7y agoI'd probably do a doubly linked list for the test document. Then you're looking at O(1) for operations I think.
- zabzonk 7y agoNot for searching. Linked lists are fine if you are at the point where you need to do an operation, but getting to that point can be expensive.
- DonaldFisk 7y agoI'd strongly recommend using a gap buffer for storing the text in while it's being edited, and within reason I wouldn't worry too much about runtime performance, as any reasonable solution should be able to keep up with a user typing.
- bogdanoff_2 7y ago>how do you generate a dynamic number of enemies? The factory pattern helps a lot. Why? The factory pattern is about adding logic and state to the creation of objects. What's wrong with creating enemies using their usual constructors and dumping them into a resizable array?
- thrower123 7y agoIt does make it a lot easier to hide implementation details down the road, for instance if you start using object pooling.
- jayd16 7y agoYou use a factory when you have code that needs to create something but shouldn't determine the details of their creation. If you want to create enemies from multiple places (seems common) you don't want to have to refactor every place when you change something about the creation or pooling.
- bogdanoff_2 7y agoYes, if you determine that creating your objects requires passing in state or using some logic that you don't want to put in the constructor, then using a factory or factory function makes sense. However that has nothing to do with creating a dynamic number of enemies. Object pooling is a good point actually.
- deepnotderp 7y agoA neural network from scratch?
- cameronfraser 7y agoI thought about saying this as well, but this isn't really a challenging programming assignment. It's a challenging math assignment, but once you know the math the programming is very easy (assuming using a numerical library that supports vectorization)
- deepnotderp 7y agoThat's fair, and you're right about that. I'd still highly recommend anyone interested in ML to implement their favorite algorithms from scratch.
- gmenegatti 7y agoIMHO I think databases could be added to the list. It’s one of the most complex system one can develop and you end up learning about multiple areas, such as OS, compilers, distributed systems, data structures, parallelism etc.
- pacaro 7y agoThis. Just implementing a persistent key value store with b-trees is a great jumping off point This is a rabbit hole that goes as deep as you want it, which has both positives and negatives of course
- krn 7y ago> It’s one of the most complex system one can develop The same could probably be said about the internal combustion engine, but it might soon be replaced by electric batteries, which provide a much more elegant solution. I believe that "unbundled" databases, such as Crux[1], can become the electric batteries of the database world by making a lot of the current complexity irrelevant. [1] https://opencrux.com/ https://opencrux.com/
- detaro 7y agoWhat makes crux's internals less complicated than a more conventional database?
- tincholio 7y agoI suspect the gp was referring to it using either Kafka or RocksDB for storage.
- refset 7y ago1) the single-writer principle of the transaction log means there's no need for any transactional locking 2) the separation of reads and writes allows for elegant horizontal read-scaling without coordination/consensus 3) pluggable storage backends implemented as simple Clojure protocols (as the sibling comment mentions), which eliminates a large number of performance and durability concerns 4) combining schema-on-read with entity-attribute-value indexing means there's no need to interpret and support a user-defined schema 5) Datalog is simpler to implement and use than the full SQL standard or alternative graph query languages ...I work on Crux :)
- chooseaname 7y agoI would like to add that a good project is to fix some bugs or add some feature to a project like, say, GNU Octave; especially for new developers. It really expands your mind as a new developer learning how to read code and understand where to make changes and add features.
- azhenley 7y agoI agree! I'll be teaching a graduate-level SE course in the future and I intend on making contributions to open source projects a requirement.
- closeparen 7y agoI sat around with a desire to “make an open source contribution” for years. Followed the advice about looking through bug trackers for tractable issues. Never could make heads or tails of a project. Then at work I become an ambitious user of a relatively immature open source platform. As a power user, I finally had real motivation to fix specific defects, and a good enough mental map to get it done. It came naturally.
- conistonwater 7y agoWon't this mean that those projects' maintainers will suddenly get a random influx of half-baked pull requests, which are somehow tied to a grade? This sounds a little too close to the "term papers must be good enough to be submitted to conferences" anti-pattern.
- chobeat 7y agoHave you considered that suggesting people to make copies of copies of copies for the sake of a technical challenge instead of tackling real world problems (even as beginners) might fuel the endless waste of energy that programmers collectively pour into developing useless stuff for their own amusement? In a world where pro-bono software development is very scarce, is this what we want to teach to beginners?
- kbenson 7y agoCopying others is a tried and true way of increasing your abilities. Painters don't just start out as masters, they often spend years copying other styles until they find what like themselves. There's only so much the human mind will come up with on its own, being presented with new problems in new domains, and how other people addressed them is one way of increasing ability. Take the master of any domain, and their past is likely littered with experiments and copies of things that already exist, either because they thought they could do it better or because they wanted to understand that topic better.
- chobeat 7y agoFine, I'm questioning the idea that the goal should be to maximize an hypotethical "programming skill", something that I'm not sure it even exist, I can only see adherence to different subjective definitions of "clean", "orthogonal" or "simple". What's the point of writing aesthetically pleasing software if it sits unused on Github? If you're lucky you can aim at replacing some old tool doing exactly the same thing with the only added value of satisfying the endless desire for novelty of other programmers. Innovations in software are very rare and almost never come from trial and error but most often from academic research. Why should this endless machine of waste reproduce itself over and over?
- randomidiot666 7y agoWhat's the point of a professional violinist playing aesthetically pleasing music alone without an audience? The point is self improvement, self education. It is incredible that some people don't understand such basic things.
- artfulhippo 7y agoFor me, it's hard to learn by making useless things. Without any impact for users, I have no motivation to make correct design decisions.
- annnoo 7y agoIt differs from person to person I guess. For me it is more about learning and understanding stuff. It motivates me more than doing my day to day job, because I encounter completely different domains and problems :)
- randomidiot666 7y agoThen make something useful, at least for yourself. A tool that helps your productivity. An emulator that you will actually play games on.
- azhenley 7y ago:( These are the projects that I look forward to though. Not having anyone to please is a very nice break. I find that to be the opposite of useless.
- shantly 7y ago1000% the same. I often get motivated to mess around with or learn something for the sake of it, but have a very hard time choosing something to get motivated to mess around with or learn about. Give me someone who needs me to build something I don't already know how to build, though, and I will figure that shit out. I've been lucky that this has worked out well for me so far, but it means I need to always try to get on projects with unfamiliar things or take new jobs involving unfamiliar things, or I'll have a really hard time expanding my skillset. Oh, and school sucked.
- barbs 7y agoI totally agree. I personally will never work on any of these things unless the end result is being used, either by myself or someone else. Or I'm getting paid for it. Spending all that time working on something that ultimately reinvents the wheel and just ends up gathering dust in a github repo just feels so pointless to me. No offence if you enjoy this sort of thing though, of course. Just not my bag.
- ronilan 7y agoIf you ever wondered how the tech interview process got to where it is, here is live example (of one possible explanation) - look at the comments, gleefully adding more and more stuff. So. 1. “Every programmer” is a matter of speaking. Obviously not every programer should try any of. Author I believe knows that. 2. If you are not a programmer you don’t add to the list. Period. You wouldn’t be adding to the list of “drills any dentist should try”, right? So why here? 3. If you are a programmer, and have not tried all of the above why are you adding more? Yah, I know, you once did a challenging project that is not on the list. So did I. “Doesn’t make me Madonna, never will”. Now what if you are a programmer and you’ve done all on the list, with or without substitution (like Snake might be equal Space Invaders)? In which case you’d have at least 6 repos to share with the world, and if you can implement Tic-tac-toe live, you might get to the next round of interviews.
- esotericn 7y ago'Every programmer should tackle these at some point before they die' =/= 'every programmer should have done this before they interview for a job'.
- ronilan 7y agoYour assertion is true but you missed the point. Completely. Let me clarify - the process by which commenters gleefully (damn that’s a nice word) add things to the list is illustrative of how things got added to the interview process. No one ever said something (or anything) should be done before interview. Now as for “tackling before you die”. If your name is Bobby Wagner, than by all means, tackle, it’s your job, but please do not die. If you are programmer, you are not obliged to neither.
- esotericn 7y agoThe blog post is offering interesting things to do as a hobby. An interview process is completely different. An interviewer who loads up a process with nonsense is a prat, and is actively decreasing the quality of their hires.
- 7y ago
- jsmolka 7y agoWriting an emulator is a great project indeed. I've been working on my GBA emulator for almost a year now and I learned so many different things about hardware, assembly programming and video output.
- carapace 7y agoImplement Forth, Lisp, and Prolog. (For extra fun write your Lisp in Forth and then your Prolog in Lisp...)
- skizm 7y agoA lot of these things involve graphics. Every time I try doing my own graphics (not using an engine like unreal/unity) I have trouble even getting a triangle to show up on screen. There is nearly always something that doesn’t work like the tutorial says it should and that isn’t common enough to come up when I google the error. In C/c++ I can never get the toolchain working correctly and compiling step one never works even when I pull the authors project exactly. Last time I tried pygame it turns out it like just doesn’t work on Macs or something? None of the examples worked, just got blank boxes. Couldn’t make it past the first few steps in lazyfoo’s tutorial, even unreal engine’s tutorials are constantly being outdated due to short release cycles, although I’ve had the most success with unreal. I’m not sure if I’m just thick or something, but any project that involves low-ish level graphics I shy away from because I’ve had so much trouble in the past.
- pjc50 7y agoIt might be genuinely easier to do it in emulated MSDOS QBASIC or BBC BASIC.
- deleted 7y ago[deleted]
- progman32 7y agoCheck out QB64. Modern implementation of quickbasic. Looks, behaves, and feels like the original if you want it to.
- calaphos 7y agoI image most of these 'low level' approaches involve OpenGL which seems to be a bit troublesome on macOS. I can recommend to have a look at webGL, it's basically a limited openGL subset that is called from Javascript. Really easy to get started as it involves no dependencies, compilers, etc. except for (basically any) webbrowser. Used it for my first graphics related programming project. Was lots of fun and I learned a lot.
- curtainvase 7y agoall my attempts at learning graphical programming consisted of getting about 3 tutorials in and then getting to a point where they just didnt work anymore eventually I ended up learning via the HTML5 canvas element and WebGL, which gets rid of the problem of having having a different setup to the author
- AdrianB1 7y agoThe list is fine, the title is misleading: these are not projects every programmer should try, only the ones that want a more serious challenge than their usual. For many programmers these challenges are too difficult and a complete waste of time, as a certain psychologist was saying IQ is something you cannot train and IQ is generally telling how fast you can learn new things; with an IQ that is not enough, that time goes to infinite. Programming is now accessible to so many people and programmers are so diverse, enough have an IQ low enough to contradict the title.
- ChrisMarshallNY 7y agoThese aren't bad. They are, by no means, a definitive list. If you can do all of these, good stuff; but there's plenty more where they came from. To be honest, the very first professional project I ever did (in 1987), was a complete embedded OS. In 1983, I wrote a Space Invaders game on my VIC-20, in Machine Code. In those days, you had to use characters to represent aliens, so I made up my own font. I've done a number of text editors over the last 30-some years. Nowadays, most operating system frameworks have 99% of a full-featured text editor built in, and you can do it with a few calls to system resources. I haven't written any real compilers (haven't ever felt the need), but I have done a ton of parsers and whatnot.
- amerine 7y agoWhat are you referring to when you say “operating system frameworks”?
- ChrisMarshallNY 7y agoUIKit, AppKit, Windows SDK, Cocoa, Android SDK, ChromeOS, etc. In AppKit, you can do a pretty full-featured text editor as a "Hello World" project.
- saagarjha 7y agoWhich is pretty much exactly what TextEdit is: https://developer.apple.com/library/archive/samplecode/TextEdit/Introduction/Intro.html https://developer.apple.com/library/archive/samplecode/TextE...
- master_yoda_1 7y agoMost of the undergrads do these projects if they do computer science Text editor 2D game - Space Invaders Compiler - Tiny BASIC Mini operating system So the author must be talking about non programmers
- azhenley 7y agoDo you have evidence for that? I asked students in my undergrad course if they had tried these. The only one they had was the operating system. I took two different operating system courses when I was a student and never actually implemented one.
- master_yoda_1 7y agothat is the problem. your undergrad program is not challenging enough. you should repeat your undergrad.
- wool_gather 7y agoKind of related, there's this list of "Build Your Own $FOO" (that I'm pretty sure I learned about here on HN originally :) https://github.com/danistefanovic/build-your-own-x https://github.com/danistefanovic/build-your-own-x - Build Your Own Text Editor - Build Your Own Shell - Build Your Own Git (!) etc. Comes complete with the Feynman quote "What I cannot create, I do not understand".
- winrid 7y agoWasn't the quote, what I cannot explain I do not understand?
- wool_gather 7y agoHah, yes, good point, I think you're correct about that. The repo has an adaptation of the quote, then. :)
- barrkel 7y agoWrite a database. Depending on what angle you take, it can look like a compiler (SQL parsing, predicate evaluation, optimizing for index usage), OS (file systems for in-place updates of complex data structures, and scheduling with lock dependencies), distributed systems (consistency and availability tradeoffs across machines, with possible partitions). And then there's the whole mental model of relational algebra and stream processing of queries. It'll give new appreciation for existing databases and what they can and can't do for you.
- Transfinity 7y agoOne of my favorite courses in college was basically this. I learned so much about filesystems, data structures and concurrency that has been useful in my career!
- doggydogs94 7y agoI did a text editor once; it was bad.
- cosmodisk 7y agoFor those who want a real challenge I'd recommend trying to write a code that could read/write PDF files without using any purpose built libraries.
- jfoster 7y agoI think the #1 project every programmer should try is a project that has customers. There's so much involved in achieving that. It will possibly prove more difficult than any of these. It will probably lead to a different understanding of every other project that programmer then takes on, too.
- chubot 7y agoI agree with that and would add that dev tools are a manageable way for programmers early in their career to get feedback and learn what matters. It’s pretty hard for one person to solve enough of a problem to have users in the general public. It obviously happens, but it’s not a sure thing. It’s hard to get users that are not in the public too. I had internships early in my career working on IT stuff, at a large business and a university. I found those jobs were actually terrible for getting feedback from users because there was so much bureaucracy. The management would actually insulate you too much from complaints or feedback. Dev tools are a good learning experience because programmers will give honest feedback if they don’t like something :)
- tripzilch 7y agoI think the takeaway is that you shouldn't get feedback from users filtered through management. It's exactly the same problem that your "write dev tools for programmers" solution solves. You like it better because you expect you'll get the feedback from the programmers directly instead of through management. If that feedback would have to filter through someone's supervisor before it landed in your inbox, it would be about just as useless.
- TAForObvReasons 7y agoSome problems are "technically straightforward", where it is "easy" to build but "hard" to find and work with customers. To-do lists are a classic example. Others are technically challenging. That difficulty is precisely why others don't tackle the problems, but generally customers are looking for a solution and you have a ton of flexibility when working with customers. To put it in different terms, in some cases "if you build it, they will come" is true. The hard part is determining when it applies.
- johan_larson 7y agoI can't help but notice that this post is just below PG's "Having Kids" post. That's a challenging project right there.
- jenscow 7y agoI was surprised to discover that interpreting BASIC to be more difficult than a C-like language, as most statements required their own syntax rule.
- ldng 7y agoHow about contibuting to someone else hard project ? Because doing it alone, whatever the level of a task, is often easier than grasping existing code base and work with others ;-)
- boothby 7y agoWhat a great list! Adding some suggestions... some I've done, others are goals (especially APL and Prolog) 1. Design a new programming language. Prove it Turing complete (or go back to the design phase). Maybe do a compiler for it. 2. Design some hardware. There's cheap FPGAs and nice walkthroughs for architectures like the 6502, but my next project will probably be a custom architecture because I've never done a proper compiler before. 3. Raytracers! I did one in JavaScript back in '02... ah, how languages evolve... 4. Break your language paradigms! Learn Lisp, APL, Prolog, Haskell... This is a meta-challenge: do another challenging project in an unfamiliar language, and get to know powerful idioms in the language and how they're handled behind the scenes.
- petethepig 7y agoA few things I did in the past I would definitely recommend: * Make a Lisp https://github.com/kanaka/mal https://github.com/kanaka/mal — tutorial on how to make a lisp language interpreter. * Make an 8 bit computer https://eater.net/8bit https://eater.net/8bit — tutorial on making a simple 8 bit computer out of a bunch of AND, OR, NAND chips. Really helps you understand how computers work, what microcode is, etc. Honestly, building it wasn't quite as much fun as I thought it would be, but just learning how to build one was very useful.
- macintux 7y agoWhen I tried MaL I got hung up on the regex in one of the first steps, which is complex and tricky to translate into any of the umpteen other variants of regular expressions, and utterly vital to the overall project. Frustrating.
- cletus 7y agoHonestly, I hate the way these articles are framed: "X things every programmer should [read|try|learn]". I've certainly seen a list of 1000 books everyone should read. I hate the way these are framed because you'd spend your entire life doing all of them so it's clearly not practical. Can we step away from the hyperbole here and just start saying (in this case) "Interesting project ideas" or somesuch? This of course leads to people piping up their own "must dos" like "write a compiler" (huge undertaking). Interestingly I see a comment here like "do something with actual customers" and the replies are interesting, essentially dismissing this as a business rather than technical problem. I find this interesting because software exists to solve problems for people so this is probably the most useful advice I've seen. The ability to identify a pain point and use software to solve it is arguably the most useful ability a software engineer can have. You will of course learn things by writing a compiler or . text editor or a ray tracer and if scratches an itch for you, by all means go for it.
- calcifer 7y agoThe author thinks these are valuable challenges every programmer should try. Not must, should. It's just an opinion. If you don't agree with it, then don't do the challenges. Why does it cause you to write a 200 word rant?
- AnimalMuppet 7y agoWhy did cletus' post cause you to write a 40 word rant? I thought it was a valid point. 1000 books I should read? If I devoted all my free time, for the rest of my life, I might make it. But that leaves me exactly zero time left for the next person who's got some fine-sounding "should" for me, or the next, or the one after that. It's all my time for the rest of my life - for one person's "should". I don't think it changes the problem to say "should" instead of "must". It's just an opinion. It doesn't create any more of a "should" for me than it does of a "must".
- nnain 7y agoI second this, when such advice comes from people who have some authority, it can be very confusing to a lot of young people entering the field. It could even be disheartening and really demotivating for some, who otherwise might have exceptional logicial/design/frontend/database/statistics/ML... skills.
- bovermyer 7y agoThat list sounds great, and I can see how each of those projects presents a unique set of problems to solve. For me, though, working on my day job and my "for fun" side project take enough of my time and brainpower. I never lack for problems to solve.
- kresten 7y agoWeb developers should write a simple web server.
- lancefisher 7y agoThese are great suggestions! A few years ago I worked through building a spreadsheet in JavaScript. It was a great introduction to interpreters. I read through Writing an Interpreter in Go by Thorsten Ball [1]. Constraining the interpreter to execute formulas in cells was a straight-forward way to approach building one from scratch. Writing a Pratt parser as part of this forced me to understand how it works. Figuring out how to process a sheet led me into algorithms and structures like directed acyclic graphs (as mentioned in the article). I found myself referencing Introduction to Algorithms and really studying it [2]. In the end I turned it into a talk at Big Sky Dev Con in Montana. The whole thing was a good experience - from researching how to do it, to sticking it out through the implementation, to distilling it to a 45 minute talk. Be sure to check out the recording [3] and code [4] if you're interested. Any of these suggestions will lead you down a rabbit hole of learning with a clear objective in sight to keep you motivated to dig deeper. [1] https://interpreterbook.com/ https://interpreterbook.com/ [2] https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844 https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... [3] https://www.youtube.com/watch?v=Sj4h0DcVLL0 https://www.youtube.com/watch?v=Sj4h0DcVLL0 [4] https://github.com/lancefisher/cellularjs https://github.com/lancefisher/cellularjs
- will_pseudonym 7y agoThank you for sharing this, Lance! I'm a "recovering actuary/Excel power user/Excel developer (shudder)" currently in Lambda School in their web development track. I'm really enjoying watching the recording of your talk, and in addition to learning one way to build a spreadsheet, I'm also learning lots of good software development practices orthogonal to the specific project, which is great. Again, thank you for sharing!
- lancefisher 7y agoThanks! Glad you like it!
- will_pseudonym 7y agoBy the way, I'm curious, how did the company you work(ed?) for in Missoula, MT, get started? I'm always interested when I come across software companies in non-megalopolises.
- anonytrary 7y agoI am curious why the author suggests programming spreadsheets is "hard" but programming an operating system isn't. Arguably, all you're doing in a spreadsheet is building a dependency graph of nodes, then re-rendering them when an input changes. It's about as complex as building your own React.
- ncmncm 7y agoDidn't somebody win an IOCCC contest with a spreadsheet coded in under 2K bytes?
- macintux 7y agohttps://adventofcode.com https://adventofcode.com should probably be on the list. You end up doing bits of several of the suggestions along the way.
- CuriouslyC 7y agoMeh. Doing a throwaway project just for the challenge of it is a horrible waste of time. Do something useful, if you choose your project wisely you'll learn just as much about coding, while simultaneously making the world a better place and filling out your portfolio/resume.
- deleted 7y ago[deleted]
- artiste 7y agoIf you just feel the urge to learn things and improve your skills then that doesn't always require the project to have some practical utility. The person who will learn the most is the one who simply does both useful projects and projects for their own sake. Obviously with only so much time it makes sense to prioritize the useful projects, but just speaking generally here.
- mrobot 7y agosoftware 3d renderer!
- Madmallard 7y agoYou could try an realtime online multiplayer game if you want a category of difficulty past the emulator. Lol
- prophesi 7y agoJust a quick nitpick; could the link be updated to use https? I'm a bit surprised it doesn't automatically redirect in the first place.
- lmilcin 7y ago* Low latency. Receive at 10k messages per second (one every 100 microseconds), have non-trivial amount of business logic, ensure all responses are sent within 50 microseconds. I did a proof of concept of algorithmic trading platform in C/Common Lisp for a brokerage house that was interfacing stock exchange, was tested to withstand 10k mps over an hour with 10 microseconds end-to-end latency (measured on switch). I learned A LOT. * Non-trivial application with very restricted amount of memory, crappy networking, that has to be very reliable. I did an entire payment POS application (EMV, contactless) on a very ancient device. It had total of 2MB of memory (SRAM + flash, it had execute in place). I needed to do a lot of research to optimize the application for memory usage -- for example, had to implement transactional database to work within constant amount of memory. I also needed to research a lot of techniques to make my application reliable regardless of what happened. I also learned A LOT on that project.
- saberience 7y agoIn typical HN fashion, this just sounds like an excuse to jaw about your resume projects. How would these clearly niche projects be something "every programmer" should try? When in enterprise engineering is 2MB a normal amount of memory for something to need? I'ved worked in videogames, fintech, e-commerce and worked on many kinds of systems and not run into anything with such requirements. Not to mention, the sorts of "lessons learned" on such projects could actually hurt an engineer when working on more realistic enterprise systems. At my current job (where I manage many teams of engineers), if I saw engineers micro-optimizing to save 2 MB of memory instead of getting features shipped I would ask their tech-lead wtf was going on. I've seen far more damage done by premature optimization in my career than I've seen it actually help matters. Engineers trying to be "extra smart" and show of their extreme memory/cpu optimization skills so often leads to wasted time, hard to debug code, or worse, annoying bugs which are much more difficult to diagnose later.
- lmilcin 7y agoYou miss the whole point of the list. The idea is that experience of working on variety of projects makes you better developer in whatever field you are in. This assumes you will understand where to use and when not to use those techniques. The list gives examples of projects each with unique requirements. Each requiring you to think about the problem in a different way. I just gave two more examples that I personally found very illuminating, that also have unique requirements, different from other projects on the list. I may be working on some more mundane software atm but, for example, I know how specifying size of every buffer or any data structure is important for reliability of the service I am working on. In fact, the service had bad track record of reliability which was quickly fixed by specifying what it means to do stream processing (no unbound data structures in memory, etc.) and quickly verifying each component against this spec. I learned this and many others from MISRA which is standard to help write reliable software for automotive industry. I adopted it for my embedded app to help me work on complex app that had to be very reliable.
- aurelianito 7y agoAnother interesting project is to do your own web framework. Routing, ORM, validations that work both server and client side, rendering server and client side transparently are some of the challenges. Just do something and improve some actual pain point you see with a popular one. I did mine and, even thou I have never used it for anything important, I still think it is a good learning experience and I can point to some aspects of it that are better than all the major web frameworks.
- zoomablemind 7y agoIf the 'every programmer' already has a paying job, then there're may be other ways to advance their craft. For example, joining an open-source project that's worth their while and maybe contribute when ready. Of course, one's motivations may be as diverse as their perceived rewards. Still, solving problems which need a solution always has a room for programming/design challenges, while working with others lets one connect and learn from the collective knowledge. Eager minds with free time are precious!
- tus88 7y ago> First, you'll have to learn to draw to the screen. I had no idea how this worked. You are actually clearing the screen then drawing each portion of the screen in rapid succession, many times a second, to create the effect that objects are moving. Not if you're double buffering you aint.
- tydok 7y agoWe use double buffering to avoid flickering, but still we have to clear the back buffers.
- rb808 7y agoDoes anyone have a good guide like this but with good answers? I can come up with decent solutions to problems, but the best way to learn is to be able to see alternatives you hadn't thought of so you learn something new.
- randcraw 7y agoMy suggestion: build a basic calculator then extend it... Add scientific and fixed formats. Add functions like log, sine, exp - especially if you create the math ops from scratch. Detect roundoff error and suppress it gracefully. Add binary, octal, and hex base numbers and binary, shift, rotate and bitwise operations. Add 2D graphs and 3D surfaces. Add control of illumination and stacking order for multiple plots. Add animation. Evaluate expressions. Add programmability. Or just invent your own private Emacs.
- known 7y agohttp://rosettacode.org/wiki/Rosetta_Code http://rosettacode.org/wiki/Rosetta_Code is also good
- jheenan1 7y agoI think the best project to try is the one that you have little to no knoludge of. I find sometimes the best way to learn is by failing. For myself; i hate the feeling, and failing isnt somthing that I do well. Pushing through setbacks strengthens your abilities and produces a new confidence that anything is possible. Also you can bring in an outside perspective to a project that isnt typical to that field or group. When the project is complete; you look back and realize how far you have traveled! At that point the wealth of knoledge can be quantitatively measured. When we streach beoyond what seems possible, dig in a little deeper, and strive to become a little better than we are; at that point we grasp the intangible, at that point we define ourselves. Its thoes small victories that give birth to new innovation,define generations,and forges a way for everythings' future. If you stand up and tackel the unknow, brush off the ridicule of ignorance,and get crazy enough to defy logic itself; I belive thoes minuscule moments in the history of humanity are the very iota's that allowed God to see the future of man and understand his creation is 'good.'
- nnain 7y agoI understand this is posted on a University website, so I guess it is ok, but gosh I've wasted way too many days of my early career chasing things that the 'seniors' said I 'should' do as a programmer. This is just not true, but worse still it confuses people who are just starting. You can be an exceptional front end developer with HTML/CSS/JS scripts and not necessarily have a mini OS in your past projects.
- choeger 7y agoThere is a difference between "must" and "should". Take this list as an advise on how to become better at understanding the fundamentals. A front end developer for instance could take html,js, and the DOM as gospel. Or they could try to understand their foundation and how the same concepts apply in different domains (e.g., what and why are the distinctive advantages/shortcomings of js). I prefer the latter and I think it makes me better at my job. Also it is kind of sad when a fellow developer is stuck with a problem that can easily be debugged with some OS knowledge.
- TheOtherHobbes 7y agoThis is a surprisingly nostalgic list. It's not that there's no benefit to these projects, it's that there are more modern projects - custom web servers, practical DSLs, 2D and 3D iOS/Android games, simple AR, simple ML, simple embedded hardware - at a similar level of difficulty, which are easier to extend to real commercial applications, and also teach important CS fundamentals. You could also do worse than learn Erlang, Haskell, Julia, or some other interesting-but-not-really-mainstream language. I'm surprised the author appears to be a millennial. I would have expected a list like this from someone my age, who started coding when TinyBASIC and Space Invaders were the new shiny.
- Footpost 7y agopractical DSLs Isn't embedding a "practical DSLs" another toy compiler? Except that with a DSL, you have to worry about gnarly but not-so-interesting problems like what happens to my syntax (given by a CFG) when I add another syntax (another CFG)? Are the combined CFGs ambiguous etc? Keep things simple!
- yoda97 7y agoHere's a good list of project based tutorials that you should follow https://github.com/tuvtran/project-based-learning/ https://github.com/tuvtran/project-based-learning/
- thallukrish 7y agoI guess most of the time we do not know what we want to do. That's the time you can productively spend working on improving your skills. But unfortunately it is too hard to work on something that does not lead to worthiness of some sort. So I guess it is good to look for something worthy to be done in their life while sharpening your skills.
- jonasft 7y agoMy "problem" is that I struggle to find the motivation to program side-projects, when I already spend 8hours a day programming at work
- edisonjoao 7y agolove this