HN user

codesink

233 karma

coding for fun and profit http://codesink.org

Posts18
Comments43
View on HN
news.ycombinator.com 7mo ago

I would love to get some feedback from data-obsessed climbers (Expo/RN app)

codesink
4pts0
goclimbr.com 7mo ago

Show HN: I built a climbing tracker for data-obsessed climbers (Expo/RN)

codesink
3pts2
developers.google.com 12y ago

Google Geocoding API V2 will stop working today (Sept 8th)

codesink
1pts0
www.amazon.co.uk 13y ago

Kindle Paperwhite is now available in Europe

codesink
2pts0
i.imgur.com 14y ago

Well Google that doesn't seem right (googling "adwhirl")

codesink
1pts0
fosdem.org 15y ago

This weekend: Fosdem 2011, free hackers conf in Brussles

codesink
3pts0
www.reddit.com 15y ago

IAMA: I am a hiring manager who hires hundreds of software developers a year.

codesink
2pts0
it.hackmeeting.org 16y ago

HackIt 0x0d: Hacker meetup in Rome, Italy (Jul 2,3,4)

codesink
1pts0
cfis.savagexi.com 16y ago

How Google Maps splits the world in 2^20 256x256 tiles (2006)

codesink
72pts22
news.ycombinator.com 16y ago

Ask HN: Learn/practise a language over Skype?

codesink
2pts0
itunes.apple.com 16y ago

Please review my iPhone app (icons recognition)

codesink
15pts11
www.freepatentsonline.com 16y ago

Patent: Compiler independent bit-field macros

codesink
47pts38
news.ycombinator.com 16y ago

Ask HN: Please review AppSnap - Snap the icon of an iPhone app to get it

codesink
1pts0
news.ycombinator.com 16y ago

Ask HN: Anybody kind enough to share scraped iTunes appids?

codesink
1pts0
news.ycombinator.com 16y ago

Ask HN: What happened to Bookpool.com?

codesink
4pts2
translate.google.com 16y ago

Italian Government is Trying to Intercept Skype for Lawful Interception

codesink
1pts0
news.ycombinator.com 16y ago

Ask HN: Please Review my iPhone App (Use an External Keyboard to Send SMS)

codesink
2pts3
metrics.admob.com 16y ago

Geographic Distribution of iPhone Users

codesink
2pts0

Parkopedia | Full-time in London, UK | ONSITE

Parkopedia was founded with the mission of being able to answer any parking question, anywhere in the world. Today, Parkopedia is the world’s leading digital parking services provider used by millions of drivers and organisations such as Apple, TomTom and 18 automotive brands ranging from Audi to Volvo.

We are looking for a Senior PHP/Full-stack Developer to be based in London to support our existing systems as well as to architect and to develop new solutions that run on top of our global AWS based infrastructure (APIs, public/customer facing web applications, payments transaction platform, etc).

Our benefits include unlimited vacation policy / flexible working hours / cash bonus / annual company trip / time off for volunteering

Please visit https://www.workable.com/j/257C9360D7 to apply.

I stumbled over it few months ago and the issue was that readdir(), used by rm on the box I was using, by default alloc'd a small buffer (the usual 4KB) and with millions of files that turned in millions of syscalls (that's just to find out the files to delete).

A small program using getdents() with a large buffer (5MB or so) speeds it up a lot.

If you want to be kind to your hard drive then sorting the buffer by inode before running unlink()s will be better to access the disk semi-sequentially (less head jumps).

I made AppLens (formely AppSnap) a iphone app that lets you install any other iphone app by taking a picture of its icon (on other phones or laptop screens or anything else).

It's a free app + ads, most of its users are from china and japan.

Money-wise definitely not an hit!

I spent quite a bit on time to develop the backend part (in C) and optimized it to query 3mil icons in few ms on a commodity server (cheap).

http://bit.ly/Szmy7X

I think google is working to move Android to Go as soon as possible; Rob Pike replied to a related question with "I cannot talk about it" and that sounds like a good clue :)

Go binaries already run on Android/ARM, the higher level code is the one that's missing.

That would bring great boost in performance (compilers are available for both x86 and ARM) without adding any complexity on the language side (Go is a cool language).

Backends seem overpriced to me; their default backend is a long-lasting process running at 1.2Ghz allowed to use 256MB of RAM and it's priced $0.16/hour ($115/month).

They can shutdown/restart/relocate your backend whenever they want so what they suggest to keep your service live is "Configuring more backend instances than are normally required to handle your traffic patterns" (yeah that's at least another $115/month fee).

Show HN: Tasskr 15 years ago

I've used 37signals tada lists in the last few months and the main pain points are:

1) no indenting 2) cumbersome reordering 3) editing sucks

your tasskr fixes all the above issue, well done.

for me what is missing to make the switch is sharing (anybody in the team is allowed to add or check an item).

if tada list is one of your main competitor I'd add an import page to make the switch easy (I'd prefer pasting the HTML in a textarea instead of give you my credentials).

true, the distance calculation must NOT be in the WHERE clause if you want to use indexes (and you want).

What I'm doing, given a max distance and a search point, is to calculate the bounding box in which I want to search in filter results with

WHERE lat BETWEEN lat_min AND lat_max AND lng BETWEEN lng_min AND lng_max

Calculating latitude min/max is trivial knowing that 1 latitude degree is 111.2KM. Longitude is a bit more convoluted because longitude degree size changes moving north/south.

$lat_min = $lat - $range_km * (1 / 111.2); $lat_max = $lat + $range_km * (1 / 111.2);

$k = $range_km/6371.04; $lng_min = $lng - rad2deg($k/cos(deg2rad($lat))); $lng_max = $lng + rad2deg($k/cos(deg2rad($lat)));

you can embed your own C code without the hassle to handle HTTP/S (or forkbombs) using KLone web server; it can easily handle thousands of requests per second.

p.s. I'm part of the company whom made it.

EDIT: "Each tile is 256 pixels square and the number of tiles across at each zoom level is given by this formula: Math.pow(2, zoom)"; ops I missed the word "across" :)

How did you come up with that number? The sum loop that follows reports 524287 tiles total.

#include <stdio.h> #include <math.h> int main(void) { int i; double tot = 0; for(i = 0; i <= 18; ++i) tot += exp2(i); printf("tot %f\n", tot); return 0; }

You can read why that happens in the paragraph titled "Scale".

Here's an excerpt (given that Google tiles are 256x256 and at zoom 0 one tile covers the whole world):

"Intuitively its easy to see why the scale changes. Let's think about Google Maps zoom level 0. At zoom level 0 the world is fit into a 256 pixel wide image. But we know that the earth's circumference is the largest at the equator and dwindles down to zero at the poles. So as you move north or south away from the equator, the Earth has to be "stretched" to fit into the 256 wide bitmap. Thus as you move north or south the scale gets larger and larger because the same number of pixels on the screen are showing you a larger and larger percentage of the Earth's surface."