bhousel

Joined 17 years ago

Karma
5,142
Submissions
1,152
Member since
May 20
Former OpenStreetMap US Board Member Engineer at Mapbox Maintainer of OpenStreetMap's iD editor and more

http://linkedin.com/in/bhousel/

http://twitter.com/bhousel

http://github.com/bhousel

http://about.me/bhousel

http://7thposition.com

[email protected]

View on Hacker News

Recent submissions

Comment · 6 years ago
Comment · 7 years ago
Thanks for the kind words! I'm one of the maintainers, and we are always eager to hear what new users think of it.
Comment · 7 years ago
Ah yeah, hooks are strange at first..

They didn't click for me until I read this netlify blog post: https://www.netlify.com/blog/2019/03/11/deep-dive-how-do-rea...

If you think of them as mostly just syntactic sugar for closure state variables wrapped up in the module pattern, it's not so bad. (This is how some of us have been writing D3.js code for years!)

Comment · 7 years ago
Fun fact! SVG is one of those things that is often easy to minify down below your nginx/apache/cdn minimum gzip length.

If your SVG files are < ~1kb, it's usually faster to just not gzip them. If they're < ~150b, gzipping will probably make both slower _and_ bigger.

Comment · 7 years ago
I see lots of responses to this article asking "why client-side navigation?". I can share my own experience with building an app a few months ago, and how/why I switched to a client-side single-page app..

The app is this: https://osmlab.github.io/name-suggestion-index/index.html

It is a worldwide list of brands that have been seeded with OpenStreetMap data, and which volunteers have linked to Wikidata identifiers. We use this data in OpenStreetMap editors to help people add branded businesses. Pretty cool!

1. We had data in `.json` files (but not too much data) and we wanted to show it to people working on the project so that they could review the brands.

2. I spent a day or two and built a static document generator. It took our data and spit out an `index.html` and few hundred `whatever.html` files. This worked really well. As the article says, "browsers are pretty good at loading pages". A side benefit - Google is really good at indexing content like this.

3. Then users made the obvious request: "I want to filter the data. Let me type a search string and only show matching brands. Or brands that appear in a certain country".

4. OK, SO.. If your data is spread out over a few hundred files, short answer - you can't do this.

5. But the data is _really_ only a few megabytes of `.json`. I spent a few days to learn React and switch to a single-page client side app so that we can filter across all of it. The new version uses hooks to fetch the few `.json` files that it needs, `react-router` to handle navigation between the index and the category pages. It works pretty ok! Most people would stop here.

6. The first version with client-side filtering performed good enough, but not great. The reason was because, as users type these things happen: The filters get applied, the React components get a new list of brands passed in as props, and React re-renders these new lists to the virtual DOM, and eventually, slowly, the real DOM.

7. It's really easy to build React code like this, and many people do. But it is better to avoid DOM changes in the first place. I changed the components so that the lists stay the same, but filtered things just get classed as hidden `display:none` instead of being added and removed from the DOM, and performance is much better now.

Anyway hope this is helpful to someone!

Comment · 7 years ago
> Realistically, we can't pay people full engineering salaries to do random OSS.

Why can't you?

Professors get paid full professor salaries to do "random research".

Doctors get paid full doctor salaries to treat "random illnesses".

I expect if you looked a bit closer, you'll find that "Random OSS" is maintenance that makes the entire ecosystem possible. Would love to hear from some of your engineers what they are doing to earn that $20/hr.

Comment · 7 years ago
As a professional full-time open source maintainer and developer, initiatives like this bother me a lot.

The work we do is worth much more than $20/hr.

Ideally I'd like to see open source developers in stable, tenured positions that pay fair salaries with benefits. Anything that normalizes the idea that open source should be funded on tips, patreons, or spare time goodwill is embarrassing to all of us. We can do better.

If you value open source, hire people to do it and pay them fairly.

Comment · 7 years ago
Do we really have to Ask HN this every few days?
Comment · 7 years ago
from TFA:

>Crucially, self-driving cars also rely on conventional cameras. So if those lidars are not camera-safe, it won't just create a headache for people snapping pictures with handheld cameras. Lidar sensors could also damage the cameras on other self-driving cars.

Comment · 7 years ago
Cool. This will be fine as long as 2 self driving cars never go near each other.
Comment · 7 years ago
Lots of people don't realize that 1 cup milk has 13g sugar from the lactose.

For comparison, a typical sugar packet is 2-4g.

(This is why cereal + milk is probably just about the unhealthiest thing possible to start your day).

It's a good idea to switch from the sugary/milky Starbucks drinks to anything else - like cold brew, or black coffee where you add trace amounts of sugar/cream yourself, if any.

Comment · 8 years ago
Set your profile picture (Slack/Twitter/GitHub/etc) to something happy. You’ll see it thousands of times a day as background noise, but it will affect both your own mood and how other people treat you.
Comment · 8 years ago
Hah yeah, it was kind of funny that by the 4th shot, the ER docs and police there knew me as "the rabies guy".

I also was told that the immune globulin is a bit complicated because it needs to be prepared specifically for the person's weight. So unlike off the shelf vaccines, it requires an on duty pharmacist to actually do something before they can give it to you, which I'm sure adds to the cost.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton