Hacker News new | ask | show | jobs
Game-ify debugging/cs?
2 points by bmistree 4801 days ago
For an end of quarter project, I'm supposed to build a computer game. I've noticed that both my girlfriend and her mother play puzzle-like games (go through a maze, word searches, match objects, etc.) obsessively. To take advantage of all this effort, I think it would be cool if you could embed a real bug finding, debugging, or other coding task in a puzzle game. For instance, it would be neat if whenever you completed a puzzle, not only did you complete the puzzle, but you also found a concurrency bug in the Linux kernel.

So far, it's been difficult to come up with translations from code to puzzles. And I figured that lots of other folks on this site might have some really good ideas. Right now my rough ideas were: <handwaviness> 1) Treat loading registers, reading from memory, and operations on registers as "moves" in a game. Get the user to try to re-write generated code to run as quickly as possible. 2) Place and route for chip layout 3) Requiring programmers to notate code with invariants and using those. For instance, Code Block A and Code Block B cannot be run at the same time. And provide a call graph. Is there a way to navigate the call graph so that they do? </handwaviness>

Let me know if you have any thoughts (positive or negative are welcome). Thanks.

1 comments

It's an interesting idea and can make for educational games, but I don't think it will see much traction as a means of doing useful work. The vast majority of bugs exist in the gulf between a programmer's characterization of a problem (or a problem's requirements) and the actual use case. And of course, if your puzzle generator can understand what is meant by a piece of code sufficiently well to identify a bug, it can fix the problem without human involvement.