bhousel
Joined 17 years ago
Joined 17 years ago
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!)
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.
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!
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.
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.
>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.
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.
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.
http://linkedin.com/in/bhousel/
http://twitter.com/bhousel
http://github.com/bhousel
http://about.me/bhousel
http://7thposition.com
[email protected]