Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: 10-minute programming challenge. Let's do more of these. (missstep.com)
45 points by pud on Aug 8, 2012 | hide | past | favorite | 33 comments



I love what they do, but unfortunately r/dailyprogrammer leaves a bad taste in my mouth because they started off with challenges copied from my site - http://programthis.net


This site looks good. But I wondering if someone has a similar list of apps that are one steps larger than just algorithms - must have UI and be useful.


It's certainly not comprehensive, but here's the shortlist of stuff I make to try out a new language, in order of increasing complexity:

-- Sudoku verifier

-- library generator (scan all of the music files on your drive and compile a list of artists)

-- dictionary app (using Wordnik API)

-- flexible calculator that can detect postfix v. prefix

-- Sudoku solver

-- Hidato solver (which is essentially King's tour, but cooler)

-- tumblr API wrapper (or really any OAuth service)

-- n-gram language classifier


Thanks for sharing. My list has much more CRUD apps with different UI challenges (like a single person todo list).


For my daily (walking) commuting, it says 2.4km, which is right, for 24k to 33k steps, which is wrong: that's <= 10cm steps. It's one order of magnitude away from the truth.


Is it possible you're reading it wrong?

I just put in a 2.4km address and it came out to ~2,500 steps.

See this permalink (click "go")

http://missstep.com/?origin=Clayallee%209%2014191%20Berlin,%...


Localization issue: var miles = prettyDistance.replace(",","").replace(/[A-Za-z$-]/g, "");


I don't think I'm reading it wrong. Your link gives me:

"The fastest route is 2,4 km, which will take approximately 24,855 to 33,140 steps if you walked it."


Are those metric steps or imperial?


It's doing some text parsing on the "pretty text" returned by the Google Maps API instead of using the provided distance in meters, and it's probably failing due to some localisation issue. It strips "," from the text, maybe your locale uses "," as a decimal separator leading to the distance being parsed as 24 km?


Had the same issue. Put in a 0,1 km walk, came out to 1k+ steps


Guess that reading the google maps api to find the walking distance function would have taken me more than 15 minutes.

The 15 minutes concept would probably make good katas to keep stuff you have already used up to date in your memory. Would love to see a collection of small challenges like this grouped under different kinds of tags. This one might be javascript, google-maps for instance.

I would use that.


OVER_QUERY_LIMIT

Such a shame that Google started limiting and charging for their APIs :(


I just fixed this by changing all API lookups from server-side to client-side.

I think Google's limits are per IP address, so doing the lookups client-side should keep my app working for any reasonable amount of use.

Woo!


I'm curious, did you just happen to have a domain name containing the word "step"? Or that was done after the initial 15 minutes?


I did not already have the domain.

Finding & registering the domain was part of the 15 minutes. As was setting up (and propagating) the DNS.


you should totally have recorded your screen while doing all of this, that would be incredibly educational. great stuff!


Impressive. I suppose if you iterate a thousand times (only 30 working days!) you're bound to generate a big hit. :-)


You may be able to do it fast, but do you really learn anything new?


You should record a video of you doing the next one, I'd love to see your process and tools that you use to get things done so fast. I'm always trying to be as fast as possible but even to me 15 minutes from nothing to done is mindblowing.


It says fastest route, but would someone walking prefer the shortest?


In the API call, I'm setting "travelMode:google.maps.TravelMode.WALKING" - so Google is return the correct result.

So the problem is the copy I wrote. I'll leave it be since my 10-minute limit is over. But I agree I should've said "The shortest walk is x miles..."


In general, shortest would be fastest for walking (unless the difference is large and fatigue sets in).

Or you could analyse ground gradiants for steepness and find the flatest. Combine with your own personal fitness levels and solve for a better optimal route :)


> In general, shortest would be fastest for walking

Traffic lights, crime-addled regions, embassies (I wouldn't dare jog towards a guarded embassy carrying a backpack), loose gravel paths. All these will slow down walking considerably.

Or outside the city: Marshes, mountains, thick forests, muddy hill slopes.


So put the adjective "walkable" in front. The question is the same. These things are unwalkable and therefore not able to be part of any route.

Same with your car: the places without roads are undrivable and therefore not available for routing. But with a car, the speeds are so much greater than bipedal motion, shortest vs. fastest is a viable question. When the routing system avoids obstacles, it's mostly going give you the shortest and fastest route. brador makes a good point about grade; with enough grade on the shortest route, it might not be the fastest.


No, these are all walkable.


I can't believe people are actually debating this. Did you really expect a check box 'jogging with backpack' mode?

It's a quick and dirty calculation that google is making about routing. Im pretty sure the google walking routes wont take you through marshes or thick forests.


OK, I'm confused, what exactly is the challenge here? The creation of a website (one with its own domain) that calculates the number of steps?


I like the simple implementation. One small UI complaint: the text on the button is hard to read because of low contrast.


I get: "The fastest route is 232 マイル, which will take approximately NaN to NaN steps if you walked it."


Tech used?


From first glance, JavaScript, Google Maps API, and jQuery.




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

Search: