Re:MongoDB Interactive Geospatial Tutorial
by latch on Tuesday April 05, 2011 @08:21AM
(#2410609)
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.
Re:MongoDB Interactive Geospatial Tutorial
by AlexC04 on Tuesday April 05, 2011 @10:16AM
(#2411009)
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.
Re:MongoDB Interactive Geospatial Tutorial
by joelhaasnoot on Tuesday April 05, 2011 @06:14AM
(#2410364)
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.
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.
Re:MongoDB Interactive Geospatial Tutorial
by bittersweet on Tuesday April 05, 2011 @07:20AM
(#2410475)
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.
Re:MongoDB Interactive Geospatial Tutorial
by mmccaff on Tuesday April 05, 2011 @10:14AM
(#2410997)
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.
Re:MongoDB Interactive Geospatial Tutorial
by nuclear_eclipse on Tuesday April 05, 2011 @09:40AM
(#2410860)
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.
Re:MongoDB Interactive Geospatial Tutorial
by AlexC04 on Tuesday April 05, 2011 @10:19AM
(#2411015)
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.
Re:MongoDB Interactive Geospatial Tutorial
by nuclear_eclipse on Tuesday April 05, 2011 @10:08AM
(#2410969)
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...
Re:MongoDB Interactive Geospatial Tutorial
by rauljara on Tuesday April 05, 2011 @10:17AM
(#2411010)
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.
Re:MongoDB Interactive Geospatial Tutorial
by ch0wn on Tuesday April 05, 2011 @09:03AM
(#2410734)
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).
Re:MongoDB Interactive Geospatial Tutorial
by latch on Tuesday April 05, 2011 @06:41AM
(#2410410)
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.
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'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.
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.
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.
http://www.google.com/search?q=50+km+%2F+radius+of+earth http://www.google.com/search?q=50+miles+%2F+radius+of+earth
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.
Now I'm thinking of ways to use this!
In IE8 it gets a JavaScript error a few lines earlier, and stops advancing.
Am I missing something obvious in the ui?
It might be worth keeping on the screen at all times. ;-)
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.
Once a user finishes, provide a list of open jobs for shops that use MongoDB.