Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
MongoDB Interactive Geospatial Tutorial (mongly.com)
79 points by latch on April 5, 2011 | hide | past | favorite | 24 comments


A few feature requests...

1. Provide buttons somewhere to increase and decrease the speed. The keyboard shortcuts don't seem to work for me (OS X, Dvorak keyboard layout).

2. Even better, ditch speed entirely and let me click "next" to see ALL of the lines of text up to the next bit where I'm expected to interact.

3. Don't make me guess how to do things! I'm lazy and in a hurry.

Maybe this just isn't the right style of learning for me.


I made it so you can click the speed icon in the top right to change the speed. Still not 100% happy with that.

I'll look at #2.

Based on the original tutorial, the feedback was positive with respect to making people think about the answers. help always tells you exactly what to type to move on though.


I do enjoy guessing how to do things; I find it a great way to learn. Thanks so much for creating this -- it's given me a great head start.


I logged into the comments to say the same. I'm absolutely loving the game like tutorial. "Just type stuff till it works" it's fun, you can't really mess stuff up.

My feature requests would include: a) a hint system. if I don't get it three times I'd like to be able to give up. I know it's open for abuse, but I'm a grown man and understand that I'm only cheating myself. end of the day I still want to learn it.

b) a link from each concept to the reference documentation of the function I've just used. So when I've finally used [* $near spoilers redacted*] let me see the actual documentation for $near if that's possible I guess. I'm not sure how complete the Mongo docs are. My reasoning being that I'd like to see the rest of the ways I can use the command.

Short answer: I love the tutorial & thank you.


Cool! Working on a project that uses this a lot and this would've been very helpful two months ago. The geospatial indexing page in the Mongo docs is very helpful too.

One thing you leave out is the $nearSphere and related commands which can be used since MongoDB 1.7 or so to create better radiuses. It makes searching just that little more precise. There is one twist for it that had me stuck for a bit: the radius is in radians when using those commands.

Other than that: MongoDB makes it very very easy to create a location based mobile service. Throw in some node.js and some JSON, and you're set.


If you haven't seen it already, a quick Google hack for computing the radians to input into MongoDB:

http://www.google.com/search?q=50+km+%2F+radius+of+earth http://www.google.com/search?q=50+miles+%2F+radius+of+earth


Yes, my code is just range/6418 or so. It just produces unexpectedly slow results when you don't realize :)


http://www.mongodb.org/display/DOCS/Geospatial+Indexing

I've been doing Geospatial queries lately. It's pretty fast when going through 280k+ city coordinates at ~1-20 ms (Can't go lower than ms though) to find cities near [0, 0], [100.752, 120.236], etc.


Very well made, I have learned a lot while using it!


Very nice, this is an awesome way to get introduced to a (for me) new technology, I didn't have any experience with geospatial work before so this is a great way to visualize it.

Now I'm thinking of ways to use this!


Personally, my biggest hurdle is that every time the tutorial introduces a new concept, my brain was expecting to just modify the existing query with the new concept, while the tutorial actually wants me to create an entirely new query each time.


I was somewhat annoyed that when I typed:

    db.treasures.find()
then hit up arrow I got:

    db.find()
The tutorial would have gone a lot faster if uparrow stored the correct string. Though then again, maybe there's something I don't know about the db.find option. Maybe it is doing it right and I'm wrong.


I love that about the tutorial. One of the few tutorials where I actually have to think.


Yes, it would just be nice for it to be a little more upfront/explicit that it wants a new query, instead of using the same wording from before, but with subtle number changes that my mind glosses over...


I kind of disagree. I remember things much better when I screw up doing them. The fact that it isn't immediately evident what exactly is wrong with my query means I have to go back and read, and figure it out. Much like debugging. I know your trouble isn't with the concepts, but I honestly think that the extra step of saying, 'why isn't this working' will make the concepts stick around much longer than they would otherwise.


How do I proceed after "Go ahead and look at the collection"? In FF 3.6 it stops delivering messages after that one, and I don't see any way to advance.

In IE8 it gets a JavaScript error a few lines earlier, and stops advancing.

Am I missing something obvious in the ui?


You enter a command in the box. If you don't know the command to enter, enter help.


Very cool, looking forward to working through all the lessons later. I was doing too many things at once and let the notice about help scroll by.

It might be worth keeping on the screen at all times. ;-)


I'm stuck at lesson 6. After typing 'db.treasures.find({location: {$near: [0, 0]}, {type: "gold"})' the loading indicator stays and I get the javascript error "Uncaught TypeError: Cannot read property 'x' of undefined" (Chrome 11).


you can type help to get help...or lesson(7); to skip to the next lesson.

the correct command is db.treasures.find({location: {$near: [0, 0]}, type: "gold"}).limit(5);

you have an extra { infront of "type"...making it invalid json.


I'm going to have to try this after work today because I've been thinking about doing something with geoNoSql.


This would be a great recruiting tool.

Once a user finishes, provide a list of open jobs for shops that use MongoDB.


I'm curious what did you use to write it ? node?


The core engine is based on a little web-based mongodb admin tool I wrote in RoR (https://github.com/karlseguin/Mongo-Web-Admin). The tutorials are just modified versions, and some javascript that drives the lesson.




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

Search: