News for hackers. Stuff that matters.
Re:Show HN: 10-minute programming challenge. Let's do more o... by eddie_the_head on Wednesday August 08, 2012 @05:32AM (#4354684)
Re:Show HN: 10-minute programming challenge. Let's do more o... by prezjordan on Wednesday August 08, 2012 @03:50PM (#4357674)
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
Re:Show HN: 10-minute programming challenge. Let's do more o... by vineet on Wednesday August 08, 2012 @08:40AM (#4355188)
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.
Re:Show HN: 10-minute programming challenge. Let's do more o... by jmduke on Wednesday August 08, 2012 @12:56PM (#4356614)
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

Re:Show HN: 10-minute programming challenge. Let's do more o... by vineet on Wednesday August 08, 2012 @01:19PM (#4356743)
Thanks for sharing. My list has much more CRUD apps with different UI challenges (like a single person todo list).
Re:Show HN: 10-minute programming challenge. Let's do more o... by snippyhollow on Wednesday August 08, 2012 @07:14AM (#4354943)
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.
Re:Show HN: 10-minute programming challenge. Let's do more o... by pud on Wednesday August 08, 2012 @07:19AM (#4354955)
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,%...

Re:Show HN: 10-minute programming challenge. Let's do more o... by subsystem on Wednesday August 08, 2012 @08:04AM (#4355079)
Localization issue: var miles = prettyDistance.replace(",","").replace(/[A-Za-z$-]/g, "");
Re:Show HN: 10-minute programming challenge. Let's do more o... by snippyhollow on Wednesday August 08, 2012 @08:16AM (#4355120)
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."

Re:Show HN: 10-minute programming challenge. Let's do more o... by tantalor on Wednesday August 08, 2012 @09:34AM (#4355435)
Are those metric steps or imperial?
Re:Show HN: 10-minute programming challenge. Let's do more o... by nemetroid on Wednesday August 08, 2012 @12:58PM (#4356628)
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?
Re:Show HN: 10-minute programming challenge. Let's do more o... by JfromSw on Wednesday August 08, 2012 @07:51AM (#4355040)
Had the same issue. Put in a 0,1 km walk, came out to 1k+ steps
Re:Show HN: 10-minute programming challenge. Let's do more o... by pbjorklund on Wednesday August 08, 2012 @08:48AM (#4355223)
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.

Re:Show HN: 10-minute programming challenge. Let's do more o... by mibbitier on Wednesday August 08, 2012 @06:29AM (#4354824)
OVER_QUERY_LIMIT

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

Re:Show HN: 10-minute programming challenge. Let's do more o... by pud on Wednesday August 08, 2012 @06:44AM (#4354867)
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!

Re:Show HN: 10-minute programming challenge. Let's do more o... by nandemo on Wednesday August 08, 2012 @07:03AM (#4354916)
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?
Re:Show HN: 10-minute programming challenge. Let's do more o... by pud on Wednesday August 08, 2012 @07:20AM (#4354957)
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.

Re:Show HN: 10-minute programming challenge. Let's do more o... by epaga on Wednesday August 08, 2012 @07:55AM (#4355053)
you should totally have recorded your screen while doing all of this, that would be incredibly educational. great stuff!
Re:Show HN: 10-minute programming challenge. Let's do more o... by nandemo on Wednesday August 08, 2012 @10:31AM (#4355711)
Impressive. I suppose if you iterate a thousand times (only 30 working days!) you're bound to generate a big hit. :-)
Re:Show HN: 10-minute programming challenge. Let's do more o... by brink on Wednesday August 08, 2012 @11:52AM (#4356217)
You may be able to do it fast, but do you really learn anything new?
Re:Show HN: 10-minute programming challenge. Let's do more o... by TimJRobinson on Wednesday August 08, 2012 @06:00PM (#4358316)
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.
Re:Show HN: 10-minute programming challenge. Let's do more o... by beobab on Wednesday August 08, 2012 @05:32AM (#4354681)
It says fastest route, but would someone walking prefer the shortest?
Re:Show HN: 10-minute programming challenge. Let's do more o... by pud on Wednesday August 08, 2012 @06:47AM (#4354878)
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..."

Re:Show HN: 10-minute programming challenge. Let's do more o... by brador on Wednesday August 08, 2012 @05:36AM (#4354693)
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 :)

Re:Show HN: 10-minute programming challenge. Let's do more o... by Deestan on Wednesday August 08, 2012 @05:54AM (#4354731)
> 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.

Re:Show HN: 10-minute programming challenge. Let's do more o... by delinka on Wednesday August 08, 2012 @06:36AM (#4354844)
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.

Re:Show HN: 10-minute programming challenge. Let's do more o... by Deestan on Wednesday August 08, 2012 @07:17AM (#4354950)
No, these are all walkable.
Re:Show HN: 10-minute programming challenge. Let's do more o... by hnriot on Wednesday August 08, 2012 @11:51AM (#4356211)
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.

Re:Show HN: 10-minute programming challenge. Let's do more o... by yitchelle on Wednesday August 08, 2012 @07:30AM (#4354984)
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?
Re:Show HN: 10-minute programming challenge. Let's do more o... by brechin on Wednesday August 08, 2012 @12:07PM (#4356316)
I like the simple implementation. One small UI complaint: the text on the button is hard to read because of low contrast.
Re:Show HN: 10-minute programming challenge. Let's do more o... by basugasubaku on Wednesday August 08, 2012 @11:32AM (#4356105)
I get: "The fastest route is 232 マイル, which will take approximately NaN to NaN steps if you walked it."
Re:Show HN: 10-minute programming challenge. Let's do more o... by TamDenholm on Wednesday August 08, 2012 @07:46AM (#4355031)
Tech used?
Re:Show HN: 10-minute programming challenge. Let's do more o... by tantalor on Wednesday August 08, 2012 @09:37AM (#4355453)
From first glance, JavaScript, Google Maps API, and jQuery.