Hacker News new | past | comments | ask | show | jobs | submit login
TIS-100: the Programming Game You Never Asked For (codinghorror.com)
159 points by LukeB_UK on Apr 15, 2016 | hide | past | web | favorite | 69 comments

> You know what's universally regarded as un-fun by most programmers? Writing assembly language code.

I beg to differ. Assembly is awesome. Some of the best times I've had programming were writing networking code (ethernet driver, TCP/IP stack, and HTTP server) in Z80 assembly. I wouldn't recommend assembly if you're writing something like a modern GUI app, but assembly on an embedded micro can be a lot of fun.

I've been working as a programmer for more than 6 years now.

I still think my best work is a graphical library I built in 9th grade in assembly to use with my Pascal programs in MSDOS.

  mov ax, 13h
  int 10h      ;SCREEN 13 rules!!!

Still have my copy of PC Intern[0] from which I was able to learn how to do the same.


The good old days! After using edlin to write BASIC on my parents' 80286, we got a Pentium with a modem, and I used it to download Ralf Brown's Interrupt List and an assembler. Both downloads, I started before I went to bed and they were done by morning. (So as not to tie up the phone line during daytime.) Rbinter wasy my guide to causing a whole new world of exciting crashy behavior. Ultimately I wrote a paint program in assembly before I gave in and started using high level languages like C.

And kids these days, they just don't understand!

oh the Turbo Pascal and Turbo C days, where I had embedded assembly code mostly to have fun with 5.25 drives. Did fun experiments with copy protection back then; it was a thing; down to interrupt handling and more.

also a fun way to seize up your computer when you got it wrong, I mean it compiled it should run, right?

Yes. This.

Years ago a "textfile group" I was involved with decided to release a 3 1/2" floppy diskette w/ our files at a hacker con. I thought it would be cool to put a custom bootsector on the disk-- something that displayed an easter egg rather than the boring traditional "Non-System disk or disk error" the bootloader on MS-DOS-formatted disks displayed.

I ended up making a simple static mode 0x13 display w/ a gradient background and a text message. When I tested it I discovered my message was being displayed backwards and in the wrong positions. I'd set the direction flag earlier in the code and neglected to clear it. I was preparing to add the one-byte "CLD" instruction when it hit me that I could just leave the code as-is and reverse the data. I saved a byte and the code did exactly what I wanted. I was quite happy.

You can't experience that kind of joy in a high level language.

Modern GUI is relative: I make GUIs for Symbos in Z80 asm and it is great and modern.... for the target I am writing for :) But yes I write asm for modern embedded devices as well as 70-80s machines and I love both. So definitely not universally.

Yes, "universally" should not then be restricted to "most programmers". Those are incompatible. It would be like saying that the Universal Declaration of Human Rights aren't meant to apply to all humans.

I would prefer "what's near universally regarded as un-fun by programmers". Which would simply place you in the small minority, rather than being placed outside the universe of programmers. It could still be wrong, depending on the threshold for "near universal", but it wouldn't be obviously confusing.

The vast majority of programmers have never written 10 lines of any type of assembler. I wouldn't doubt that most would scowl at the idea of having to write it, but that's just because they've been told it's unfun, and it doesn't look like algol.

Writing assembler for Harvard architecture microprocessors is one of my favorite things to do in the world. Bringing some Frankenstein's monster laid out on a breadboard into life from nothing gives me a sense of accomplishment like nothing else. Strangely, PIC assembler is the only language that I can compose so quickly that I sometimes can't type fast enough to keep up.

Don't foget Microcorruption! Nothing like an MSP430 to give you a case of clinical depression!


Note, "most". Neither the post nor its refutation has been proven, so rather than pedanticize, can we not take the quote in the spirit it was given?

Am I the only one who finds it weird how articles like this seem to fetishize programming talent? How we desperately need to come up with ever more sophisticated filters (programming simulators, in this case) to extract only the purest high quality programming material? Gattaca, here we come!

I mean, it's efficient...not sure how I feel about a future where a conversation, or even the dreaded whiteboard become relics of more innocent times. That said, great game :)

The filtration process is terrible; "everyone knows" that some people are more able than others, but it's very hard to quantify and very vulnerable to prejudice. And a particularly modern problem: if you give people a take-home test, they can outsource it across the globe.

I'm starting to think that the way out of this is guild-like structures where you qualify by producing a "masterwork" recognised as such by your peers. And then you don't have to prove yourself any more.

If the challenge is just allowed to be itself and not an employment filter, then it can be fun for all involved. I'm keeping an eye on Stockfighter myself, and I know people who do Project Euler for fun.

>I'm starting to think that the way out of this is guild-like structures where you qualify by producing a "masterwork" recognised as such by your peers. And then you don't have to prove yourself any more.

Isn't this essentially how PhDs are granted?

Optimistically, yes. Realistically, it doesn't seem like it to me, and even when it is actually as described on the tin it doesn't seem super useful for predicting future performance.


And of course to another programmer writing a 100 byte assembly program that draws something interesting on the screen is just a fun gimmick and "real programmers" are the ones making the same program 10x slower and consuming 1000x more memory while using some new Java API

(I'm more of the former myself)

but if doing it through the Java API means you can ship it in an hour instead of 2 days, still might be worth it.

In the end it's really dependent on what tools you're used to. And extremely dependent on the goal. For most software, the objective is to accomplish the task, and performance doesn't matter (until it starts to matter of course).

I think judging people on the level of abstraction of their tools could end up being counterproductive and alienating. Maybe you never want to write in Java, but dismissing those people out of hand could mean that you might not have an opportunity to show them why you enjoy writing your assembly programs.

You're absolutely right that working in a higher level language has a value and it would be crazy to do it another (low-level) way if you can do it using Java or another higher level language

Of course the number of people that could do it in Asm is smaller than those who could do it in Java (I guess in the same way only few people can drive a Formula 1 car)

I fell into the trap of thinking that writing 100byte assembly programs was "real programming.

I used to make small demos. They'd take about a day each to make my Atari 800 do something amazing. I was assigned to create 14 interactive screens for a game at work. I thought to myself "14 screens. I make a screen in 1 day so 14 days I'll be done". Turned out to be closer to 90 days. Of course maybe I just suck as a programmer but my takeaway was real programing is more work than "drawing something interesting on the screen".

You are not the only one.

I must be an exception (or a lousy programmer) because I do not particularly enjoy games that require programming to play, I write programs for fun (and programming for me is fun) and I play games for fun but have not found a game that appeals to me, that combines the two.

I've played a few hours of TIS-100 (Jeff is super late to the party). There's a line between "this is a fun intellectual puzzle" and "this is actually just work" and TIS-100 crosses that line for me. I really enjoyed SpaceChem and Infinifactory (the two Zachtronics games that preceded TIS-100) and they are on the good side of the line. Very enjoyable puzzle games, and vastly better than any of the games mentioned in the article.

Don't forget Codex of Alchemical Engineering, one of their free browser games:


I fall in the same camp as you. I have played TIS and SpaceChem, though not to completion. After banging my head against one problem all night long, I decided I'd have more fun just playing HotS or some other game instead.

The dopamine rush from solving a hard problem is pretty intense, but not worth the hours of frustration after more hours of frustration at my job.

It's a bit of a stretch to call it a programming analog, but Factorio is appealing to me in many similar ways. The ability to construct factories with input materials and output products and optimizing those factories for the best ratios and minimal footprint is very fun.

Not a stretch at all! I spent many nights playing factorio trying to make an efficient static typing (dumb inserters but smart belt routing) system to replace a costly dynamic typing quick hack (smart inserters with big bus belt routing). Drawing the parallels has been half the game for me and has given me more insight into how everything fits together in programming.

I'm there with you. I can enjoy some programming games, but it's typically short lived. What I enjoy in programming is creating real and at least semi-useful stuff, not getting more points on a scoreboard.

I fully agree. Plus, most of those games are lacking in at least one of the two areas, so that you end up with either a bad game, or a bad programming lesson. Maybe the new VR market is going to introduce some new ideas in that area, but so far I'd prefer to either play an actual game or follow a proper programming lesson, instead of a mediocre combination of the two.

Which ones have you tried? I have only tried SpaceChem, but it's certainly different enough from work!

TIS-100 sounds more like one of the old ICFP programming competitions - 2006 and 2007 in particular, both were about reverse engineering esoteric systems.

TIS-100 doesn't require any reverse engineering whatsoever: The game comes with a very retro looking manual that documents the system pretty well. What makes this fun, and not work, is that it's a pretty unique system: inter processor communication between very primitive processors.

In comparison, The Human Resource Machine has far better production values, but it's really an assembly class in disguise. The end level is to write a sort, so I see it a lot more as an educational tool for kids than a game that could be fun for programmers.

> In comparison, The Human Resource Machine has far better production values, but it's really an assembly class in disguise. The end level is to write a sort, so I see it a lot more as an educational tool for kids than a game that could be fun for programmers.

I found it to be a good "ideal assembly" playground. It definitely could use more depth, but more often than not I didn't meet the cycle count or code size bonus criteria after finishing a level, which turns into its own challenge.

I'd say Infinifactory is an improvement over SpaceChem, in that your creations are a lot more viscerally satisfying.

Yeah, I feel your pain.

I like these games a lot, but I almost feel like the act of typing out the solutions is the funner part. Getting stuck on an especially hard problem for too long just gets frustrating.

although it is not exactly programming, it is more about linux stuff, i've been enjoying the overthewire.org games

> Joel implied that good programmers love programming so much they'd do it for no pay at all. I won't go quite that far, but I will note that the best programmers I've known have all had a lifelong passion for what they do. There's no way a minor economic blip would ever convince them they should do anything else. No way. No how.

This isn't just a minor economic blip, but I took a non-programming (but still technical) job out of college, because it was what I could get. I now have a few kids and pretty firm roots in a town without a lot of programming jobs. I make a six figure salary, I'm reasonably good at what I do and I like my coworkers, so I feel weird complaining about my job, as I'm better off than most people I know...

However, I really want to write software. I contribute to open source projects, and when there is something I can automate at work, I do it. I'm also somewhat concerned that if programming were to become my day job, I would lose interest in it. Has anyone else made the transition from hobbyist to professional, and have any advice to give?

I haven't made that transition, but I can say from experience that (for me, at least) hobbyist side projects are a lot different than working on software full-time. When you're coming up with your own side-projects or picking FOSS to contribute to you get a lot more freedom in what you're doing and how you do it than if it's handed down to you filtered through managers and other more senior engineers. Unless you're lucky, there's a good chance you'd end up working on something that doesn't really interest you or stimulate you in the way that solving your own problems can.

That being said, I work full time on software that doesn't always align 100% with my passions, but it hasn't dulled my interest or excitement in programming in general or my side projects at all.

Agreed though I find that as a professional I'm not as motivated to see side-projects through to completion because I'd rather spend my free time doing other things.

I studied computer science at university, but didn't take a programming job straight away - one of the reasons was that I feared being bored (slow death by cubicle). After dipping into grad school, dropping out, starting a company (where I wrote almost all the code for our product, but did a lot of other things too) and spending several years as a product manager, I switched back to software engineering as a career, and I've never been happier.

While I was working as a PM, I spent a lot of time as a hobbyist programmer, and a lot of time learning about how to engineer good software systems. After leaving that job I spent 6 months or so just building stuff. Games, android apps, whatever I felt like. It was awesome. I turned one of those projects into a consulting gig, then another, then got hired full-time from one of those gigs into a startup where I learned like crazy and sought out as much mentoring as I could get my hands on. I maybe could have done a similar side-step at my previous job, but having talked to some folks about what that would look like, I decided to just jump. It worked out. I hope it does for you too.

I'm also somewhat concerned that if programming were to become my day job, I would lose interest in it.

...Or, as it sometimes happens, you lose interest in writing software for other people.

I'm with Robin, this sounds like a ton of fun, and I also love crafting up random VMs and emulators. This kinda reminds me of an old ICFP Programming Contest featuring the mysterious Cult of the Bound Variable [0] which starts off with requiring you to implement a VM to a spec and just gets weirder (and more awesome) from there on in.

[0] http://boundvariable.org/task.shtml [1]

[1] Fair warning, this rabbit hole is deep.

TIS-100 made me wish I could have programmed in the 80s. I doubt it means I'm a good programmer, but god is it fun.

As someone who (poorly) programmed their c64 in the 80s, I do not miss those days at all.

Bingo, the best part of these games (TIS100 and HRF in particular) is having a well chosen instruction set and glossing over the other annoying parts of working this close to the hardware. I want the puzzle to be figuring out how to make do with only 2 jmp variants, not remembering to use a different instruction to access memory below address 0x100

It's not to late. For a few bucks you can buy an Apple II from Goodwill. For 10-100x a few bucks you can buy one off eBay. (There are also plenty of emulators which are more practical but lack that 80s feeling.)

Finding the hardware may be the easy part. You'll also need a DOS boot disk, and a LISA compiler.

I fired up my Apple ][ recently and was amazed it still worked -- those floppy disks are amazingly durable. 30+ years of sitting in a footlocker and yet they're still readable. Amazing!

There is no substitute for the charm of a flickering greenscreen monitor, the whirr of a 5.25" disc drive, 40 columns of text, a clacky keyboard, and the smell of dust burning off the power supply. Yet I found myself asking "how did I get anything done with such primitive machines?"

Well I hack on an original gameboy; I think that counts :p.

Assembly language can be fun and awesome!

For me, if I'm ever working in assembly, which is pretty rare these days, it's usually on an overall "smaller" system. Ie an embedded system where all the SW, HW, and tools can be grokked by a single person with out multiple cascading levels of increasing complexity and abstraction.

Good times for sure, though to be real, the good part usually comes after many moments of banging-head-against-brick-wall.

TIS-1000 is a bunch of fun, the way it combines assembly programming in small bits with the puzzle of connecting different black boxes.

Interesting trivia: the creator of this game, Zach Barth, created Infiniminer, the precursor to Minecraft.

I really enjoyed playing it too. One of the more fun things was seeing the scoreboard and competing against engineer friends of mine... it's fun to see that there is a better solution, and also fun to see that yours is more efficient. It feels egotistical, but to me it's a form of feedback.

I've not coded any assembly for a decade but at college I enjoyed Microcontroller assembly courses way more than other programming courses

It's a nice game, but the difficulty for some puzzles can really ramp up ( I do not consider myself a programmer, so your mileage may vary ) : I've been stuck on the sequence sorter one long enough to lose all interest in completing it. I understand what should be done, I simply can't find a way to subdivide the task in a way that fit into the cells...

On the same subject there's also http://box-256.com/

I enjoyed the time I've spent so far with TIS. My takeaway wasn't so much about programming assembly, though, as much as managing pipelines and concurrency.

It reminded me a lot more of the work I did with software-configurable processors in the early 2000s than any of the 8-bit assembly I did back in the 80s.

TIS-100 isn't even the most hardcore Zach Barth programming puzzle came. That would be KOHCTPYKTOP (actually a circuit-design puzzle game).

Nice. Looks like APPLE II assembly code there at the top? ACIA! "asynchronous communication interface adapter (== serial card)". Brings a tear to me eye.

Approaches like this lead to systems where talent work for free just to gain a reputation.

Stack Exchange, which was co-founded by the author, does exactly this.

In a merit-based system, though, that reputation actually does translate into a "resource" that you can leverage at some point, so even though it's money-less work, it does pay off.

And, of course, if you're having fun and noone is forcing you to do it, I'm not sure it can be classified as 'work' anyway (depends on whose viewpoint you're taking, of course).

Stack Exchange itself appears unable to monetize the reps of users, and while there are exceptions, I would argue that on average user's contributions if are done for financial gain are not beneficial; clearly, learning, sharing, etc. are important regardless, though long-term Stack Exchanges future is concerning to me given what little I know of its financials.

But is a system truly merit based if having enough time to do work for free is a necessary component of demonstrating merit?

It's still merit based, though it might not yield the world's best candidates, since they might not have the time. And that's going to be a problem, of course, but other things you might do to demonstrate merit except for actual paid work (open source projects etc) also take time. The exception being technical interviews, which for various reasons are undesirable or at least seen as suboptimal by many.

I suppose a system like stockfighter can try to take into account the fact that not everyone has time to optimize their solution, but also, at the end of the day, how you prioritize your time I suppose is a factor in the whole merit-equation - the more driven you are the more 'passion' you are seen as having.

Stack overflow is different in this respect, though, I will admit that - although some answers are really high quality it is probably the people spending the most time there that end up with most reputation. And I guess that's fine as well, if some recruiters want to use SO points as a basis for recruitment they know (or should know) what kind of people this process singles out.

I hope to see many projects like stockfighter in the future, each focusing on their own aspects of work in software so that employers can look for their candidates in the appropriate 'pool'.

"How you prioritize your time" reflect passion if all else is equal, but someone raising a family or commuting two hours each way is just plain not going to have as much time to spend playing a programming game as someone with no responsibilities other than themselves and a 15-minute walk to work -- no matter how "passionate" the former person is. And yet the former person may make a far better employee.

I just really think that measures like this severely distort the employment market and are a terrible measure of actual merit. Which becomes even worse when people talk about those with "merit" being more "deserving" of whatever we consider to be "success".

Intrinsic valuations do not require giving away work for free, though in practice it's uncommon to have access to information required to do this.

For example, say a developer worked on an open source project and was paid market rate for their work. At the very least, the code they've contributed is public.

Isn't that question like asking if a tree falls in the forest and no one can hear it?

Unless you have a magical telepathic helmet that can access merit

Gaining reputation by contributing to a public good seems OK in some situations. It's unfortunate that we need reputation to find work, but I'd rather answer SO questions or contribute to open source then many other ways of doing it. Both of those can often be of real benefit to others at the same time as building a reputation.

I've finished Stockfighter, and wrote a clone of the official stock exchange server. You can find that here: https://github.com/bcoburn3/forex

I'm looking for work as a programmer in NYC, my email address is bcoburn3@gmail.com please get in touch if you also think that a game like Stockfighter is a good test of programmer skill.

So... did you get an interview of any kind directly from the game?

No interviews yet, but I did just write a response to an email asking about interest in a specific company.

The impression I get is that people have gotten and will get interviews through this, but that the amount of time each one takes is more than expected and that Thomas/Patrick/Erin are generally overwhelmed.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact