HNHacker News
TopNewBestAskShowJobs

Olreich

711 karma · joined July 9, 2012

submissionscomments
Olreich··on A tale of webpage speed, or throwing away React
The framework and libraries and information you find on the internet definitely encourages you to go for animations via JS. Might be a holdover from before CSS3, but I'm not sure I've ever seen people really try to use CSS3 for their animations unless people were working on their own toys. Just google "animated X react" and 80-90% of the articles are massive JS components with a little styling in the CSS.

For size of the bundle, just remember the node_modules black hole meme. The amount and size of JS libraries is no joke, it's wildly out of control. 2.5MB minified non-gzipped is common mostly because of a paradigm of "once you gzip it it will be small, and inflating that doesn't cost anything, and this way everything is preloaded!". Libraries come with a bunch of images embedded as Base64 encoded strings, the full localization tables, 40 1kb depedencies (left pad and friends), etc. etc. etc. These are all the default and no one changes defaults.

To make a reasonable web application today without all the insanity, you have to be very disciplined, because everything is pointing you toward doing dumb or crazy things.

Olreich··on Streaming Is Laying Bare How Big ISPs and Big Tech Work Together Against Users
Traffic shaping can still occur as they see your data volumes and the networks your connecting to. Sure it might not be as specific to the streaming service, but it should be decently possible to identify other streaming services, and any ISP-owned one.
Olreich··on Why a Slack Backlash Is Inevitable
I was thinking the article would be about the deteriorating quality of Slack and the lack of improvement in their facilitation of perusing channels.

The article was instead that CEOs don’t want to get talked about behind their back and so are going to shut it down. While Slack might increase the ease of that, it’s not like employees couldn’t do it via email or at the water cooler instead. This speaks to leadership problems more than anything else.

Olreich··on Handmade: A Community for Self-Rolled Performant Software (2016)
Let’s call 1 second the threshold for a bare system with an SSD and 4 core CPU at 2Ghz. That gives you 8 billion cycles to start up, trading off with file access, so maybe only 4 billion of those have access to all the data you need in memory (modern ssd loads what, 400 MB/s?).

So all the startup code and initial assets are larger than 200 megabytes and take more than 2 billion cycles to prep? Computers are fast, software is slow. Sure, things aren’t trivial to always fit in that package, but it’s disingenuous to say you need to take many seconds to start up.

Look at a giant piece of software that was built for more limited times: Visual Studio. It used to start up in milliseconds back in 2000. Now it takes 30 seconds. Did it really improve things so much to justify that in the intervening years? I’d go with no.

You know what else has an amazing set of features and capabilities including internationalization and accessibility and all those other complicated things? Web browsers. And there’s not a browser on the market that doesn’t start up in more than a couple of seconds, including loading a full webpage and rendering it from the internet.

Olreich··on Handmade: A Community for Self-Rolled Performant Software (2016)
Doesn’t the ImGUI UI library have pretty good accessibility now without sacrificing on memory consumption and performance?

JavaScript is difficult to program in a safe way, so I’m going to assume the Messenger app is written in something safer too.

Olreich··on Alcohol as a social technology to check the trustworthiness of others (2014)
Caffeine and sugar are drugs with similar strength to alcohol in different mental state directions. You come off as judgmental and full of yourself with that kind of rhetoric. If this is how you talk to partners and customers, you must have really amazing products and services.
Olreich··on How to Hire Great Engineers
I don’t think they are exclusive, you can be a great engineer that knows all about the algorithms in CS books and keeps up on the latest research in parts of the academic field. They aren’t even different skill sets, just different places to find the knowledge. Game development and cryptography bear this out well. The top engineers are the ones that read all the papers and that can build solid systems based on them.
Olreich··on Universal Basic Income is Capitalism 2.0
I wrote a big long article for you, but realized you’d counter with the idea that landlords will collectively decide to hike rents no matter what.

So, the simple argument that UBI will not increase minimum rents by 2k a month overnight with no improvement in living conditions: landlords will have to compete to get the UBI out of individuals hands. Right now, the lowest income housing isn’t in competition for individuals, it’s competing for government approval and integration. If everyone individually has 2k a month to spend, they have the luxury of shopping around.

Olreich··on We Don’t Need to Work So Much (2015)
> That’s a benefit that the private sector just can’t provide

They actually can. Businesses have a lot of profit that they pump directly into the hands of investors in the form of dividends and stock buy backs. They have massive capital expenditure projects. Many or all of these things could be put on hold or slowed so that cash-on-hand to handle expenses can be saved.

Business practices seem to say that saving money for a rainy day is a dumb move for the business, because profit is the only goal or money saved is wasted because it’s not doing anything productive. That line of thinking is just plain wrong. So much of the recessions that impacted so many and required massive government bailouts could have been prevented by increased cash-on-hand. The implication that you’ll go out of business guaranteed if you aren’t constantly investing in growth at the highest possible level is asinine.

Olreich··on Amazon gets priority while mail gets delayed, say US letter carriers
Yeah, it is spending a little more for those rural customers due to additional distance traveled. However, the have been using flat-rate shipping within the US for a long time, so they know the price they need to maintain. Postage is still 55 cents for most letters in the US, which doesn’t seem particularly bad. UK has ~80 cents a stamp as the cheapest I found. Germany was praised elsewhere in the thread and has stamps at ~90 cents a letter.

So yeah, based on how cheap it is to send mail in the US, and the fact that USPS would be profitable venture if they weren’t screwed over by horrible laws (pension prefunding, etc.), the USPS is very efficient and shouldn’t be parceled out to states.

Olreich··on All of us test in production all the time (2019)
Self-documenting code is all code. The only thing that speaks to what a piece of code does is the code. Comments aren’t syntax, so they don’t help you there. I’ve never seen a codebase that does a good job of documenting the system architecture, expected usage patterns, and why the code is built the way it is. And I don’t know that having all that be inline to the code would be helpful anyway.

I find it far less error prone to just read the code and determine its purpose and allowable modifications from that. I am thinking about what a citation or footnote system might look like for code now though. That has the potential to provide context on-demand without needing to separate out all the pieces of the code into little silos that are hard to piece together.

Olreich··on How much your computer can do in a second (2015)
Two things: scaling well in a single node environment necessitates separating concerns such that scaling across nodes won’t suck as much. And, C often cuts down O(n^2) algorithms in python to O(1) because the algorithm is O(1), but Python was doing n^2 memory allocations behind the back.
Olreich··on An understanding of AI’s limitations is starting to sink in
If models actually were able to tell you what they know and don’t know, then sure. But instead they just give you an output for any input you give them, whether they have a clue or not.
Olreich··on Forecast, don't guesstimate your software projects
Tech debt is something that the engineers left undone because of pressure to finish quicker. The example above is not that. It's the fundamental assumptions getting changed mid-project.

The big system was designed with the assumption of single-locale users. This let them move faster, and make the system faster. It could mean schema changes, business process changes, and making hot paths in the code slow in a way that users will not tolerate.

Each service might have it's own level of integration with the single-locale, accounting might be 10 weeks of work, UI 5 weeks, and data processing 1 week. If you pick the wrong system to estimate against, you can easily be off by a factor of 10.

Estimates are definitely doable, but take a lot of time and expertise to do well, not just programming skill, but deep knowledge of the affected systems. An engineer can only estimate accurately for the pieces that they fully understand, and they can only estimate how long it would take them to do it, as the things they have context for aren't very likely to overlap well with other team members.

A dev that's been around for 3 years is likely to estimate lower than someone who's in their first year for many systems. But that thing the new guy implemented from scratch and the 3 year dev hasn't ever touched? Changing that will take much less time for the new guy. (all of this is on average, some people are better at holding context than others)

Olreich··on The nightmare that colleges face this fall
That’s a failing of the education system, not a victory. Math education is absolutely terrible. There’s no building of foundations and fundamental relationships to provide people with easy learning. It only gets worse further up the chain. It took 3Blue1Brown to make the connection for me between i, the unit circle, and e. They seem fundamentally linked, but no math education ever put them into the same sentence other than to give a few rote examples of famous equations.

Maybe my education was just garbage, but none of the stuff in k-6 was built upon. They threw out my foundation in numbers and handed me a list of valid rules in the form of equations and identities. If you do the quadratic formula, you get the roots. Cos^2 + sin^2 = tan, etc.

I was on the track to math, sure. But that’s because I was good at memorizing useless trivia and utilizing it on tests, not because I was good at math. Same goes for most of my classes. There was one dude that actually got it, but he definitely didn’t get it from our teachers.

Olreich··on The nightmare that colleges face this fall
College education is just as often useless as well. All that college education money hasn’t gone to teaching staff or classrooms or lecture halls. It’s going to administrative buildings, sports complexes, and dorms.

The teaching at colleges has stayed largely the same as it ever has been, with few of the professors actually passionate about transferring the knowledge to the next set of students. You only get a great professor every once in a great while, most of the rest are unintelligible or disinterested. I’m not willing to pay 150k to get one great educator maybe.

With Wikipedia, YouTube science communicators, and videos of actually great lecturers across the years, the knowledge portion of college education is covered for free. The other benefit of college is networking with people who might remember you enough to help you get a job in the future. For many it also increases their exposure to different thought, which is valuable in today’s society. I feel like something should replace college on the social aspects too, as it’s a hugely inefficient system for it right now.

Olreich··on Huawei builds up 2-year reserve of 'most important' US chips
Intel can’t do it. The leader of chip fans for near half a century failed to deliver on this generation of lithography. That’s the level of difficulty we’re talking about.
Olreich··on Wikipedia Is Badly Biased
Eastern medicine that works would also be labeled as just medicine. Acupuncture is growing in use and legitimacy as it is studied and implemented for chronic pain sufferers.

Studies of Aromatherapy have found nothing statistically significant though, so that’d be down as “alternative medicine”. In the same way as “alternative facts” are not facts. “Alternative medicine” is not medicine. The nice thing about alternative medicine is that there’s a pretty clear and simple path to getting an alternative medicine to become actual medicine if it works. Have it studied and tested using the rigor of the scientific method.

Olreich··on Wikipedia Is Badly Biased
Normalization and legitimization of opinions as facts when facts don’t suit those opinions. Lots of little cogs in the machine that made that change. But it’s easier to hold an opinion that is factually wrong nowadays.

Now that it’s normal for 30% of the world believing whatever they want and finding their tribe to support them, it’s hard to convince everyone that facts are even valuable, let alone more valuable than those incorrect opinions.

Olreich··on Modern universities are an exercise in insanity (2018)
With the wealth of knowledge available, and the slow improvement of online learning, I hope we stop treating college as the place to discover things and improve our knowledge. It’s sometimes an okay way to do it, but is generally one of the least efficient ways in the modern world.

With a basic foundation in a topic, Wikipedia and open journals are much more valuable learning places than a lecture hall or study group. Those basic foundations should be built much earlier in primary education.

Olreich··on Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
Yes
Olreich··on Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
Not collateral. They fuck with paste.
Olreich··on Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
You should just let the password field have kilobytes of data. Throw a warning, but it costs you almost nothing. You don’t have to store the data, processing password hashes is designed to take a long time and use a lot of memory (way more than the password of a few KB).

Your web app should also not engage with the password field as much as possible. Don’t make it a component, just leave it a password field. Don’t read it except to immediately send the contents to the server. Bonus points for just having that be a form submission.

Olreich··on Elon Musk reopening Tesla factory despite Alameda County order
Work doesn’t inherently mean profits. Labor can be pursued for many reasons, exercise being the next most popular reason to perform work. The most popular one is actually to continue living, which in many cases isn’t all that profitable, what with all our expensive needs. You can also labor for pleasure, for love, and for a host of other reasons.

Framing work as only-profit-seeking encourages a viewpoint aligned with shareholder values, which I don’t think is a great idea.

Olreich··on Unimpressed by online classes, college students file lawsuits for refunds
More like you ordered a three course meal, they brought out the appetizer, then kicked you out with a doggy bag of the main course, and told you they’d messenger you dessert later.
Olreich··on Unimpressed by online classes, college students file lawsuits for refunds
I don’t disagree with anything you said. I think it strongly argues for university being highly inefficient compared to optimal education strategies. University cohorts should probably be smaller, with smaller class sizes and more stringent entry requirements to work toward the ideal 1:1 student:teacher ratios. Sure it’s more expensive, but if you get 2 std deviations out of it, that’s huge.

For certain gen ed classes, maybe have the whole cohort in a single class, not for lectures or exams, but for discussion and collaboration. Make those courses fully project based and assign them uniformly across degree boundaries.

Right now, graduate level courses and prestigious institutions are the only ones even trying to offer a higher education. The majority of universities at this point are paper mills, rushing hundreds or thousands of students through programs without most of the benefits you described. It’s a system optimized for making money or university survival, rather than student achievement or societal benefit.

Olreich··on Hours
I find teaching is much less effective without someone there to learn. Part of the benefit is getting asked about things you didn’t realize were important or things that are welded into your mental models. It helps me step back at least.

Writing things down and explaining them is always good practice. It’s harder to gloss over mistakes or bad assumptions when you switch modes from “thing I’m working on” to “thing in explaining”.

Olreich··on Becoming a 10x Developer (2018)
I’d argue that there’s at least two problems: software is needlessly complex, and no one understands what the computer is doing.

You might say that second one is the same, but our model for what a processor is and what it’s doing and how fast it’s working hasn’t changed in at least 10 years. Graphics cards have gotten faster, but still have a similar operating model. If anything access to low level systems has gotten easier to understand and harness.

Because all of this stuff is still the same, you can usually take a look at any piece of software and make it faster by aligning the code to what the computer is good at. That could be done by increasing data locality and widening the processing pipe with SIMD. Caching and cheating the calculations are also often good since they essentially skip work that will go unnoticed. This will often increase the code complexity, but improve the software speed.

Olreich··on Becoming a 10x Developer (2018)
Maybe framing it different might help. “Be honest with yourself and others about how certain you are about your facts, and never state opinions as facts.”

If you do this, people will more readily challenge the ideas they have evidence against and trust you when they don’t. It also allows you to throw more ideas into the pot since you don’t always have to know the perfect answer before saying something.

Olreich··on Ask HN: How do you write code so it's easy to change?
Most of the responses focus on how you meet the current requirements. However, the most important thing to know is not actually about current requirements, but future ones.

Sure you can assume that all the requirements will change, but then you’ll need to make a system so flexible it becomes a nightmare to do anything (just look at JIRA or other software like it, with 100 configuration options for every piece). These systems require vast resources to maintain because there is so much code to make it flexible.

You can also assume the requirements won’t change at all, tightly following the spec and optimizing all the edge cases so you have a pristine black box no one can touch.

Finding the happy medium involves knowing which assumptions are likely to change, and which aren’t. Usually, languages won’t change often, so you can rely on most of those features. Certain well-maintained libraries and APIs won’t change much, so those can usually be baked-in too. The business logic around things like pricing, users, analytics, data visualization, and data processing are likely to have changes. My favorite one for web apps with databases is search. The filters very often change and grow, so getting a highly flexible search working is usually a big win for not too much effort.

Note, I’ve never said always. If you can get knowledge about the business needs you’re supporting, you’ll have a much better idea of which things need flexibility, and which things don’t. The longer the roadmap on a project, the more wins you can get when architecting systems too, as you can set yourself up for easier implementation of future features.

← PreviousPage 8 of 9Next →