Live data from Hacker News

Show HN: SQL Noir – Learn SQL by solving crimes

sqlnoir.com

41–50 of 90 posts

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#42
post #7

This gives me a childhood flashback to a show called MathNet, an educational police procedural (a la Dragnet) where both investigators have holstered calculators. https://en.m.wikipedia.org/wiki/Mathnet

and there were infamous hackers too

https://youtu.be/vNhBq3kjq_Q?t=2011

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#43
tables: crime_scene, witnesses, interviews, suspects. one of these is not like the others.

I've seen it advised to list table names as plurals as it holds more than one of the things. I've been told plural is dumb. I've not yet run into mixed plurals and singular table names. Sure, it's a style, but pick one???

I'm guessing this is like tabs vs spaces, but would a tab person use spaces randomly or vice versa?

otherwise, it's a fun way to kill some time. clearly, i played with it long enough to notice this little bitty bit of something. however, if only modern police departments had this ability to link clues. there's no way to drip donut cremes or spill coffee on these notes

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#44

I'm on mobile, so maybe I'm missing something, but I don't understand how youbare even supposed to get started without knowing SQL. If this is supposed to teach SQL then there needs to be some tutorial to guide the way.

Some games require reading of the instructions before playing. Not all games are Candyland or Chutes&Ladders simple. Sometimes you need a bit of basic knowledge gathering to play the most basic levels of the game.

There's also plenty of ways to teach. Some methods assume a basic level of the concepts involved, but by continuing, you'll be exposed to new concepts that level up those skillz. Just like how arithmetic comes before algebra comes before trig comes before calculus.

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#45

I solved all of them. Minor nitpick: Since every criminal confesses to their crime, the fastest way to solve most of these is to query the confessions table for strings like '%i did%' or '%kill%'.

That's how I solved #3, still trying to reverse-engineer the correct solution.

Isn't that the reversed method? You mean you're now trying to solve the crime the normal way instead of jumping to the last page of the book first?

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#46
post #27

Love this! The style is unique and awesome. I see the beginnings of a really fun way to learn / practice / remember SQL. A few notes: - Would be cool if it was a single workspace (no tabs). Was constantly switching tabs back and forth. - Saving previous SQL queries and results would be cool. I was copying results into the notes. Feel like this is important as things get more complex. Excited to see where you take thi…

> - Saving previous SQL queries and results would be cool. I was copying results into the notes. Feel like this is important as things get more complex.

I imagined myself with my flip notepad at the crime scene taking notes every time I'd copy queries/results to the notepad section. All I needed was a hat, and then say "just the facts, ma'am" a couple of times.

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#48
post #27

Love this! The style is unique and awesome. I see the beginnings of a really fun way to learn / practice / remember SQL. A few notes: - Would be cool if it was a single workspace (no tabs). Was constantly switching tabs back and forth. - Saving previous SQL queries and results would be cool. I was copying results into the notes. Feel like this is important as things get more complex. Excited to see where you take thi…

> - Saving previous SQL queries and results would be cool. I was copying results into the notes. Feel like this is important as things get more complex. I imagined myself with my flip notepad at the crime scene taking notes every time I'd copy queries/results to the notepad section. All I needed was a hat, and then say "just the facts, ma'am" a couple of times.

I like that way of thinking about it!

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#49
The editor behaves weirdly when I try to add comments.

It's hard to explain, but you can reproduce like this:

1. Write several lines, for example:

  select i.*, s.*
  from interviews i
  join suspects s
  on s.id = i.suspect_id

2. Try to comment each line on its own by typing -- in front of each line.

  -- select i.*, s.*
  from interviews i
  join suspects s
  on s.id = i.suspect_id



  -- select i.*, s.*
  -- from interviews i
  join suspects s
  on s.id = i.suspect_id

3. As soon as you do it for "from interviews i", that line will move itself to the previous line, and the syntax highlighting will be broken
Post reply on HN