HNHacker News
TopNewBestAskShowJobs

cullenking

2,165 karma · joined May 13, 2009

Programmer, cyclist, rock climber, motorcyclist -- cofounder of http://ridewithgps.com - cullen@ridewithgps.com
submissionscomments
cullenking··on How Oregon's Second Largest City Vanished in a Day
Racism is not apparent unless you are good at picking up subtle/subconscious racism. Meaning overt racism or hostility is very rare.

Essentially it's a non-issue, come enjoy all the good things about the city!

cullenking··on How Oregon's Second Largest City Vanished in a Day
As a resident of Portland, I was surprised at the historic levels of racism, though I wasn't surprised at the decreasing population of minorities. We have become a mecca of white hipsters, it's kinda crazy watching the transformation of various neighborhoods in human-scale timelines. We are talking 12 or less months to take a cheap/quiet neighborhood and have it turn into a new hotspot with new multi-story apartment buildings. See Division street for the latest.

Another note: the historic city of Vanport is now a racetrack, owned and operated by the city. PIR circumnavigates the old town perimeter, you can see in these two photos:

http://www.corvetteracing.com/tracks/trk_img/portland/portla...

http://thumbs.media.smithsonianmag.com//filer/ac/46/ac46ca81...

cullenking··on Routing on OpenStreetMap.org
We currently run two graphhopper routing servers in production for our bike route mapping website. They work fantastic and are fast even without the contraction hierarchies tricks used to speedup routing at the expense of flexibility. We occasionally get user reports of odd routing anomolies due to the underlying data, but they are actually not much more frequent than reports about google maps. I also evaluated osrm but the graphhopper folk run a great open source project. Felt much more comfortable throwing in with them than anyone else. Happy to share any details if anyone has questions, email in my profile.
cullenking··on The Age of Unicorns
This is actually a very common problem we see with our service. Tons of 1 star reviews in Play/iTunes because we dare to withhold (valuable) features in order to make enough profit to run the business. Once a week we get very very negative (read: swearing) emails to customer support about needing a paid account to do certain things. Kinda a shame, considering the sheer value we offer 98% of our free users because 2% actually pay.

Preaching to the choir I am sure :)

cullenking··on BPA alternative disrupts normal brain-cell growth, study says
we buy a lot of these as promo/schwag materials for our business (ridewithgps.com, a bike software website/apps) and they certainly do wear out. I end up rotating mine our after 6 months, and i do not wash them with anything but the soap + water + shake method. the lining wears off and you are left with a plasticky tasting bottle. even new, if you let them sit with water in them for a couple days they'll taste slightly of plastic, so it's not perfect.

much better than any others we have tried though, so worth it.

cullenking··on Nearly Every USGS Topo Map For Free
See my above comment for a library that requires no geospatial database, just DEM files in gridfloat format. By recording information about each gridfloat file (bounding box, cellsize in lat/lng) you can do some simple math and only one disk operation (in the optimal case) to get an elevation value. Even with my crappy code in the library I mentioned in the other comment, the service is very fast on even spinning disks.
cullenking··on Nearly Every USGS Topo Map For Free
For what it's worth, the gtopo 24k product is pretty fantastic. Recently used the heck out of it on a 10 day hunting trip, it had a pretty ridiculous amount of roads not shown on any other detailed map.

One downside though is they are obviously using some elevation and image analysis to auto detect drainages and mark them as water. A significant number of draws in our area were marked as creeks, when it was actually an ATV trail along the bottom.

Other than that, a very very worthwhile product if you plan on doing any serious hiking/motorcycling/etc and plan on extensive use of GPS.

cullenking··on Nearly Every USGS Topo Map For Free
If you are interested in a service that does this, I host a redundant elevation service using NED, SRTM and ASTER data. It tries NED (highest res) first, falls back to SRTM and then finally to ASTER. ASTER is pretty bad in some areas, but it's the only dataset available above 60 degrees north/south.

We use it for our route planner on http://ridewithgps.com

Feel free to email me, cullen@ridewithgps.com if you want to use it, or just have questions about getting something together yourself.

Edited to add: code is open source, you just need an afternoon to tweak it (it's a ruby lib and a sinatra app) to work, along with some SRTM gridfloat dems. Code is here:

https://github.com/ridewithgps/humps

And if you need to convert from geotiff to gridfloat, here's some bad C:

https://github.com/kingcu/geotiff2gridfloat

cullenking··on Mistakes You Should Never Make
The SS side of FICA is 115k. Medicare has no limit and is at 1.45%
cullenking··on Mistakes You Should Never Make
Sure, but you just mentioned an unreasonable salary. If the median is $100k, then that's reasonable, and the person only gets to avoid SS and medicare on any additional profit.

I operate as an s-corp and pay myself a reasonable salary, matching that of the salary I could get in the current job market in the area I live in. Anything I clear above this is only taxed with my regular taxes.

If I was running a C-Corp instead of an S-Corp, I'd get my $100k salary, and any extra would have been taxed at the 30% corporate rate when it was taken in, then the 20% capital gains when it's distributed to me as profit.

cullenking··on A SWAT team blew a hole in my 2-year-old son
Two years ago, the house behind mine was raided by Portland's version of SWAT, SERT. The scary thing for me was the house number matched my house number, but was on the next street.

Given that you read stories about SWAT raiding the wrong residence because they misread the house number, it made worried that the same could happen to me.

Picture proof: https://pbs.twimg.com/media/AqKIhXOCIAEaG9D.jpg:large

cullenking··on This is how much tech consultants make per hour now.
A good friend of mine took a contract job (to be hired on fulltime within 3 months) for $30/hour, doing simple company support IT related stuff. He is most certainly considered a consultant. I think this is a very common case, 1-6 months as an outside contractor before being hired on fulltime. Lots of the listings on places like dice are specifically tagged as contract work, leading to fulltime.
cullenking··on Best practices for API versioning?
We run an API with probably 20 registered consumers, supporting apps and websites with different versions. This is not by any means an example of "the one true way", but it seems to be working well for us.

Basically, we put together a simple wrapper that lets us automatically pick which API version to use based on a users apikey, registered version (I set them up with v1 or v2), and what they pass in. A before_filter automatically pulls the apikey and version from params/headers, and it's consumed like this:

https://gist.github.com/kingcu/1e5e6982ad3e05707303

Essentially this lets us be strict about what key gets what result, and, lets us do prioritized fallback logic by using the any() function shown.

cullenking··on Poll: Is your startup or side project profitable?
http://ridewithgps.com - now supporting four full time employees with competitive salaries for Portland. Looking to be 6-5 by end of year. All bootstrapped, all subscription revenue. Lucked out that a hobby project in our niche could be profitable (the demographic for cyclist is pretty amazing, 40+ years old, lots disposable income, used to spending a bunch on their hobby)
cullenking··on Netflix Agrees to Pay Comcast to End Web Traffic Jam
I already had thoughts of dropping netflix due to their streaming quality. It's gotten so bad in the last three or four months that it was like I regressed to watching downloaded xvid's.
cullenking··on Ask HN: Is anyone successful with the 7-minute workout so far?
7 minutes is better than nothing, but you really need 30 minutes minimum to get your metabolism up to the point where it stays elevated throughout the day. Less than that, and you don't get the lasting, day long benefits of a workout.

The concept of "you don't need a gym membership or weights to get results" is very sound. My girlfriend is essentially a full-time acrobat (extremely fit, trains for 25+ hours a week), and she started me on a simple workout that takes 30-60 minutes, and goes in five week cycles of building up in reps. It's produce more results in a shorter period of time than any traditional gym workout.

cullenking··on Ask HN: How do you deal with potential acquirers?
I am going to counter this advice, and say first thing you do is gauge interest, start the conversations, let them push for it. When things are obviously starting to solidify and are getting serious, then consult with an attorney.

I just went through this situation last year, and while taking legal advice early on is good, it's very easy for lawyers to get their share of money. If you already have a relationship with a lawyer, sit down with them for an hour and get an overview, but don't have them do anything like draft documents, review dialogue, etc. They'll want to do these things (billable hours) but they'll just cost you a ton, when 95% of the time the deal isn't going to happen anyway.

cullenking··on What is it like to be a geek in a prison?
I once confronted the guy that broke into my car and stole my stereo. He gave everything he still had back (he didn't have the CDs anymore).

For what it's worth, I only went to him directly after the police shrugged it off and wouldn't pursue it. I gave them his address, description, other crimes he had been involved in (drug dealer), etc. They didn't care, and when the crime happened couldn't even be bothered to lift a couple of prints.

I was so angry when he said "sorry man, I figured your insurance would cover it, no hard feelings". But, looking back, he was just dumb as hell and stealing from a friend of a friend you met once made sense to him...In this sort of situation, handling the issue directly worked out for me better than going to the police.

cullenking··on I Got Myself Arrested So I Could Look Inside the Justice System
"throw the book at you" should be applied to non-victimless crimes, not things that you just don't like or agree with. Misdemeanor? Ridiculous. Moving violation with a fine? That's fine, I accept the consequences of my actions when they are proportionate to the action.
cullenking··on I Got Myself Arrested So I Could Look Inside the Justice System
This is the problem with black and white statements, there's always someone ready to jump in and prove there's middle ground. I am a well off white male and I've ridden a beaten up old dirt bike in the street plenty of times. Why? Because I like to ride off road, but you don't get to do that without tune ups, repairs etc. During riding season I am sure I annoyed neighbors with a weekly ten minute ride around a few blocks (and a large abandoned lot in my old city neighborhood). I even skip the helmet often during this so I can hear sounds as I diagnose a problem.
cullenking··on “MongoDB is dead. Long live Postgresql”
because it's faster to serve the full fidelity track, with all sensor data for every lat/lng pair, straight from disk as a gzipped file. I can store a point reduced version in postgis for actual geo operations, since that only needs lat/lng pairs, and not at 1hz sampling.

Pulling 21k points (1.8mb of JSON) for a single recording out of disk into memory, turning it into JSON, sending it over the wire to the client, is slow (500ms just to query, pull off disk and turn into JSON). Serving the same data pre-compressed, is 2ms. This isn't even considering what it takes nginx to compress it on the fly for every request.

cullenking··on “MongoDB is dead. Long live Postgresql”
We build our own machines and host them out of a carrier neutral facility in Portland, OR. $200/mo unmetered unlimited 100mbit connection and $1100 for a full rack with redundant 20 amp feeds. It would cost us something like $5k/mo to run our 9 servers on amazon.
cullenking··on “MongoDB is dead. Long live Postgresql”
One thing to note that I left out above, I also use the same severs for mysql. Our mysql working set is something like 30gb now, so I have a decent chunk of that ram apportioned to mysql.

Additionally our mysql db sees many more queries than mongo, so the overbuilt hardware is a bit less overbuilt when taking that into consideration :)

cullenking··on “MongoDB is dead. Long live Postgresql”
I think I peaked at 5% lock utilization this year, so I haven't seen any real issues.

Our actual track data isn't updated frequently. Mostly it serves as an archive for a user, and is only seen by 1-2 other people. Most people use our service to store all their activities, which for the most part are really boring. They are interested in aggregate metrics like "I've ridden 200 miles this month".

A smaller portion of our data is from planning a route using google maps, which has much more modest storage requirements, since it's optimized data (one point every mile if it's a straight line) instead of 1hz logging from a GPS unit. This stuff is edited, but I'd say only 10% of planned routes are ever modified, so actual updates on the track data are small.

cullenking··on “MongoDB is dead. Long live Postgresql”
See comment below. Definitely a small database size. You hit the nail on the head. It's going to grow fast this next year, and I'd like to put off sharding as long as possible, hence gzipped storage of the data.

postgis isn't a good fit for the data we store in full fidelity, since it's not just geo data but also sensor data (heartrate, cadence, power in watts, temperature etc). However I'll be storing a point reduced version of the full track in postgis, so i can move to using actual intersection queries for matching tracks, instead of the current brute force approach (check everypoint in every track sharing a bounding box) that works now. All bets are out the window though with 2-4x the traffic and data we currently have, using that brute force approach.

I already run another beefy postgis setup (192gb ram, though spinning disks not SSDs) for serving OSM maps, and eventually OSM routing hence the ram.

cullenking··on “MongoDB is dead. Long live Postgresql”
It's actually very much over built. I had the budget, so I built for growth. This setup should easily last us through this year, assuming 4x growth over last year. I am actually putting together another similarly spec'd machine with 384gb of ram (why not, it's cheap) because the current secondary is on 15k disks with only 24gb of ram. Still more than enough to handle the load through this last year, but probably not this coming year, at least without a bunch more ram.

In regards to actual iops, not sure what this thing can peak at off the top of my head, but we'll easily be doing 100 queries a second this year, with a considerable portion of those queries pulling out ~1mb documents.

Playing it conservative, so I am moving towards gzipping those large documents (never need to access anything but the full data, > 90% of accesses are directly served to clients that can handle inflating the data). For now they will stay in mongo, but I am building out an evaluation of using a flat file structure and just letting nginx pass them out.

cullenking··on “MongoDB is dead. Long live Postgresql”
Maybe I am just incredibly lucky, but mongodb has worked fine for ridewithgps.com - we are sitting at 670gb of data in mongo (actual DB size, indexes included) and haven't had a problem. Replica sets have been fantastic, I wish there was another DB out there that did auto-failover as cleanly/easily as mongo does. We've had a few server crashes of our primary, and aside from 1-2 seconds or so of errors as requests come in before the secondary is promoted, it's transparent.

With that being said, we are using it to store our JSON geo track data, most everything else is in a mysql database. As a result we haven't run into limitations around the storage/query model that some other people might be experiencing.

Additionally, we have some serious DB servers so haven't felt the pain of performance when exceeding working memory. 192gb of ram with 8 RAID10 512gb SSDs probably masks performance issues that other people are feeling.

Final note: I'll probably be walking away from mongo, due to the natural evolution of our stack. We'll store high fidelity track data as gzipped flat files of JSON, and a reduced track inside of postgis.

tl;dr - using mongo as a very simple key/value store for data that isn't updated frequently, which could easily be replaced by flat file storage, is painless. YMMV with other use cases.

cullenking··on Facebook marketing? Don't bother, says new report
FB is the largest single referrer to our site. Using google analytics tracking, I can see that inbounds from facebook are directly linked to tens of thousands of dollars in sales. I have had terrible luck with facebook advertising, but we get great results when people share their bike rides on our site using facebook. Their friends who are probably bicyclists themselves see the link and come through our funnel.

You need both a good funnel, and a message that provides value to a user. It has been crudely expressed as "do you get your user laid", less crudely as "make your user look cool". If you do this, then they'll share your service to all their friends for free. In our case, someone is proud to ride 100 miles, and they'd like to show it off. Our tool let's them do it, so they paste it around on facebook. It's all about your value prop and how someone feels sharing that with others.

cullenking··on Scientists Back Kiera Wilmot by Tweeting About All the Stuff They've Blown Up
I did as well (50:50 with oxygen), ignited with a shot from a roman candle. Close enough to knock me over when I was 14. Realized how fucking stupid it was when I thought about static electricity and trash bags....
cullenking··on Why Redfin, Zillow, and Trulia Haven't Killed Off Real Estate Brokers
What you are failing to take into consideration is that the demographic that keep a pit or rot mix as a non-socialized and aggressive guard dog over represents the breed as a whole. Yes, a pit bull has a greater chance of inflicting serious harm if they attack, most of the ones that attack are the millions locked in a yard by your neighborhood drug dealer.

I just read through a couple reports, they include wonderful stories like the pit bull who knocked over an old lady and broke her hip as an attack.

Edit: To make an anecdotal, worthless point...I live in a really poor area of Portland. I walk through the neighborhood and on just about every block there is one house with a locked up pit bull behind a 4 foot chain link fence. These dogs are aggressive, abused and very well represent a danger to people.

← PreviousPage 6 of 21Next →