Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A command-line murder mystery (github.com/veltman)
146 points by _kcn8 on Jan 14, 2014 | hide | past | favorite | 47 comments


A lot of the code that I write looks like a crime-scene.


Hah, I had a similar idea a few months back [0]. Of course, being the lazy person that I am, I tweeted about it, wrote about it in my ideas notebook, and never implemented anything.

Checking this out right now!

[0] https://twitter.com/gardaud/status/402608968029057027


It's not a new idea.

I recall a database query tutorial on the Apple Mac in the early 90s that took the form of a detective game. With clues, you gradually refined your query. I can't find any references to it now though.


Hah, that's awesome- if anyone knows of it, would love to know the name!

I'm definitely familiar with tutorials for programming languages/tools/environments using the medium itself, as you just described - but have never seen anything in game form. Further examples appreciated!


I'm not sure about on the Mac, but that sounds like the MS Works 1.0 tutorial for the database component. The scenario was for a ski field where there had been a murder, and you had to whittle down the suspects based on the clues found.


In case it jogs anyone else's memory:

It started out like a game. There was a grey background, then footsteps appeared, marching across the screen to gravel-crunch noises. And the queries were for guests in a hotel, IIRC.


I believe the same one was available for DOS, though my memories of the details were vague. It was for either Works or Lotus 1-2-3 and was the culmination of a series of spreadsheet training scenarios.


I found it frustrating that gur vagraqrq fbyhgvba cngu qbrfa'g gryy lbh qverpgyl jura lbh'er qbar naq lbh unir gb vasre gung sbe lbhefrys.

It's a really neat idea and a cool way to give people some command-line practice.


Ohg vfa'g vg yvxr gung va erny yvsr? V xvaqn rawblrq vg orvat gung jnl. Vg znqr zr qb n yvggyr rkgen yrtjbex gb znxr fher V qvqa'g neerfg na vaabprag zna.


Gung'f n tbbq cbvag. Guvf jnf n pynffvp ceboyrz jvgu cbyvpr cebprqheny fubjf yvxr Qentarg -- ab zrnavatshy hapregnvagl nobhg jub gur thvygl cnegl jnf, rire. Znlor vg'f sbe gur orfg gung jr npghnyyl unir gb guvax nobhg jung gur rivqrapr ntnvafg gur fhfcrpg vf jvgubhg vafgnagyl orvat gbyq "pbasebagrq jvgu guvf, Ohtf Zrnal pbasrffrq"!


Fvapr V'z sebz gur HX, V'z abg gung snzvyvne jvgu Qentarg.

V nz snzvyvne jvgu Fpbbol Qbb, gung jnf fb cerqvpgnoyr vg jbhyq qevir zr hc gur jnyy... "naq V jbhyq unir tbggra njnl jvgu vg, gbb, vs vg unqa'g orra sbe lbh zrqqyvat xvqf!"


Yes, I agree - I think the name of the suspect should form part of the key required to decipher the solution file, so that you cannot see the solution unless your suspect is the perpetrator.

The frustration for me was gur haerfbyirq vapbafvfgrapl orgjrra gur pbssrr pyhr ng gur pevzr fprar naq Naanory'f jvgarff fgngrzrag.

Gur onevfgn ng gur pevzr fprar ercbegrqyl fnvq gung "n jbzna yrsg evtug orsber gurl urneq gur fubgf".

Ohg Naanory Puhepu'f vagreivrj erpbeqf ure fnlvat gung fur "ena njnl nf fbba nf gur fubgf jrer sverq", gung vf, nsgre gur fubgf jrer sverq.

Vg znl or cbffvoyr gb erpbapvyr be rkcynva gubfr fgngrzragf, ohg gurl frrzrq gb zr gb jneenag ng yrnfg fbzr vairfgvtngvba.


Zl haqrefgnaqvat: Pevzr fprar jnf gur fgerrg va sebag bs gur pbssrr cynpr. Gur jvgarff vf gur ynfg crefba gung yrsg orsber gur fubgf (bhgfvqr) jrer sverq.

Gung fur ena nf fbba nf fur urneq gur fubgf svgf dhvgr va?


yby


I'm a bit peeved that much of what is ROT13-ed in this thread isn't spoilers. I went through the trouble to decode it, and typically didn't find it worth the effort.


https://addons.mozilla.org/en-US/firefox/addon/leet-key/

Puts ROT13 encoders and decoders in your context menu, along with a lot of other good stuff.


Jung vf guvf? Cenpgvpr jvgu ryrzragnel pvcuref? V jnf whfg ybbxvat ng gur wnetba svyr ba RFE'f ubzrcntr, V zvtug nf jryy eha gung guebhtu ebg13 naq cbfg vg ba UA.


I think of it as normal practice for avoiding giving puzzle-related spoilers.


That ist soo nineties! They should use double Rot13 for stronger encryption.


I think you just did :-)


I guess I have to report you for your DCMA violation by breaking my novelty encryption scheme.


I hear the "Double-rot13" algorithm is even stronger.


Finally! A good use for my custom tool set of basic cryptoanalysis tool :-D


I +13 this.


Hey, I'm the one who made this. Glad you guys liked it! This one was a bit quick and dirty, done for a workshop at the Mozilla Festival last year, I'm going to try to do another installment though!


I had a lot of fun with this. I did it in Clojure, though. Thanks!


Very fun and unique. I enjoyed it a lot! My solution (spoiler alert): https://gist.github.com/lost-theory/8412918


I love this. I've been curious what a one-line solution would look like. :)


Including the .zip in the repository is a bit redundant when GitHub offers you the ability to download a zip file of a repository. Like this:

https://github.com/veltman/clmystery/archive/master.zip

https://github.com/veltman/clmystery/issues/4 - I opened an issue about it, just in case the author did not realize this.


Are the executables listed in https://github.com/bmatzelle/gow/wiki/executables_list sufficient for use with this?


Yep, I was just able to do it only with cat, grep, sed, and head.


I think I would have found it painful without join and sort, though (which, also in that list).


I rarely use join and it never occurred to me. For combining the one file that had records spanning several lines, I used awk instead of grep -A as the hints suggest. Where the hints suggest a head/tail combination, I used sed. I also used sort piped to uniq in one case; combinations of those two are very often useful.


Thanks! I'll be checking this out then.


cd, cat, ls, head, tail, grep


thanks for sharing. this was entertaining and reminded me of http://vim-adventures.com


Glad you enjoyed it!


Alicia Fuentes F 48 Walton Street, line 433

There's no Walton Street under streets. Same for a few others I checked. What gives?


I noticed the same thing and opened an issue:

https://github.com/veltman/clmystery/issues/1


Perhaps you need to hire a skip tracer?


I thought the missing streets added something. People give fake addresses sometimes...


I guess she's not important. What let you to suspect her?


First person in the people file. Is there a bunch of gibberish?


I take it using pagers would be considered cheating, under the categorisation of "text editors"?


It's not cheating, it just doesn't really help you. There's a lot of noise. You have to use grep, sed, etc. to find the text that's actually important.


Not just a little, holy crap there is a lot! The crime scene file is ~13500 lines of reports.


This was fun!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: