HNHacker News
TopNewBestAskShowJobs

larzang

706 karma · joined July 4, 2014

submissionscomments
larzang··on GM and Fiat Chrysler Unmasked as Tesla’s Source of Cash
Infrastructure is absolutely the deciding factor for those of us who are not suburban home owners. I live in a building which has 1 EV space for 200-something units. I work in an office building which has 2 EV spaces installed, but they're reserved for the Tesla-driving building owners. There are no public charging stations remotely convenient to either location.

My next car will absolutely be a Prius/Insight/Ioniq, but a full EV is not a reasonable consideration, and not because of range or habits but 100% because of infrastructure. Despite a majority-freeway commute I still pass 5 or 6 gas stations going to and from work every day. I ought to be passing at least one charging station.

larzang··on Cloudflare Workers
We tried using a worker for a bit, and while it's mostly very convenient, the request/response cache API does NOT support Vary headers, which was a major dealbreaker for us.
larzang··on Is High Quality Software Worth the Cost?
"In the real world...", "Nobody cares about how it works as long it works...", etc. This is a company where the top level management 1) thinks it knows best about everything, 2) micromanages everything, and 3) trusts absolutely no one to do their jobs. The CEO has a software degree but never really worked as a programmer professionally and is as obsessed with exclusively shipping features as any MBA, and it flows down from there.

When you hire subject-matter experts to do professional work and then refuse to believe that they might know more than you about how to do that work, you're going to have deep dysfunction.

larzang··on Is High Quality Software Worth the Cost?
> No one made a conscious decision not to write tests, not to do PR reviews, or not to refactor.

Then you've never worked at a company like my current one. The developers all very much want to do those things, but are forced not to by a management that is suspicious of the value of these things no matter how many times avoidable bugs pop up or massive refactors become unavoidable to add new functionality and management gets "I told you so"-ed. Tests are regularly postponed to follow-up issues that mysteriously never make it into sprints and preventative refactoring is a non-starter.

What the developers want or are capable of is meaningless in a situation where they have no leverage over how they spend their time.

larzang··on On SQS
Locking is no longer 100% reliable as soon as you have horizontal distribution of the same data over multiple nodes (for redundancy, so you can guarantee delivery) instead of sourcing from e.g. a monolithic rdbms. Eventual consistency is the model for a whole lot of distributed systems, e.g. S3 or Mongo. The CAP theorem applies to more than just databases, so MQs tend to use eventual consistency as well, which looks like at-least-once and not guaranteed exactly-once delivery.

While dealing with at-most-once delivery is easier in isolation as an application developer on the consumer side, dealing with lost messages is in practice MUCH MUCH harder on the producer side than idempotent handling where required on the consumer side. You end up building elaborate mechanisms for locking and retries and receipt validation which can all fail.

Just think about emails, there are a lot of situations where you can't be 100% certain whether the other side received the message or not. For something low-priority it may be better to ignore partial failures, but if it's important it may be better to send a second message to guarantee delivery. If you're modeled on never sending the same message twice AND the messages matter, you're in trouble.

larzang··on I don't know how CPUs work so I simulated one in code
The absolute best coding I get done every day is during my morning shower. Letting your brain indirectly work on something is often the best approach to our kind of work.
larzang··on PHP in 2019
As a primary PHP developer, PHP has improved by leaps and bounds in the ten years I've been working with it, however there's still a major fundamental issue that has seen improvement but remains unresolved: function overhead.

Contrived example: - https://3v4l.org/eEtFl - https://3v4l.org/8QMFh

Two identical ways to do the same thing, one with nicer FP-like syntax, but because of function overhead even on 7.3.x it's significantly slower.

If you're building large-scale PHP applications you have to stay away from a bunch of shiny new features in anything remotely performance-sensitive, and it causes you to write worse code in general (e.g. this monolith would be a lot cleaner as multiple sub-functions, but it's going to be called in a loop 5 million times so I have to keep it ugly).

With compiled languages you can write clean code and then have the compiler optimize it. With PHP, you have to make development-time sacrifices in legibility and maintainability in order to not make runtime sacrifices in performance, which is both worse as an any-stage dev and a huge footgun as a junior dev.

larzang··on Friday Deploy Freezes Are Like Murdering Puppies – Charity.wtf
This post seems written assuming that engineers are calling all the shots. If you work at a company like that, great, I envy you.

However in a company where engineering's desire for a stable deploy pipeline with excellent visibility is matched up against business' insistence that all dev hours go into features and SEO improvements and every sprint issue regarding non-user-facing-improvements has to be fought for tooth and nail, "don't deploy on Friday" is a very reasonable compromise for avoiding weekend fires.

larzang··on Ask HN: What is your money-making side project outside programming?
I paint. I don't take commissions and the stuff I've sold doesn't even come close to the total I've spent, but who cares, that isn't the point. I love coding, but doing something totally expressive rather than logical is a valuable part of my life too.
larzang··on Why I rewrote the mesh generator of Dust3D from Rust to C++
I actually find strong typing speeds up green-field development rather than hampering it, because it cuts down on the little avoidable things that inevitably creep in when you're trying to architect and evaluate and code all at the same time. The kinds of things that make you smack yourself in the face for an hour wasted by the most trivial mistakes.

In addition to my own personal experience this has been incredibly well illustrated to me because I'm overseeing two junior JS devs right now where one starts any new code with "any" types and tries to make Flow happy later and the other starts with real types. The former has a LOT more "this isn't working and I have no idea why, help" moments.

larzang··on Future JavaScript: what is still missing?
Or even more basic things like "a date/time implementation that isn't a horror show" or "\w that behaves like \w in every single other regex implementation out there when the unicode flag is on".
larzang··on My PHP Development Setup
Yeah, PHPStorm is a mediocre to terrible text editor but an amazing IDE. I used Sublime Text for many years prior and PHPStorm can't even come close in terms of ease of keyboard navigation, responsiveness, multi-file organization, etc BUT after 3 years of PHPStorm I won't use anything else.
larzang··on Illinois Bet on Video Gambling and Lost
The main east-west street corridors through the outer west burbs (Lake St, North Ave, Roosevelt Rd, etc) are choked with them. Addison for example has one every 5 feet.
larzang··on Fear, trust and JavaScript: When types and functional programming fail
Weekly, sometimes daily, I run into a situation where flow is straight up wrong in baffling ways, or needlessly developer-hostile, and I end up having to help my junior team members write worse (or at least more verbose) code to compensate.

It's still a million times better than JS without TS/flow.

larzang··on AMD Responds to Intel's 9th Gen Benchmarks
The controversial benchmarks are always at the 1080p level, and I have to wonder: who are these magical consumers who are willing to consider shelling out for an i9 and yet are still playing at 1080p.

Of course such marketing benchmarking HAS to be done at 1080p, because anything more challenging and you're entirely gpu bound with cpu differences becoming margin of error fractions of a percent.

larzang··on React Fire: Modernizing React DOM
> Which is one reason why I don't quite understand why there are class based components at all.

Classes in js are just syntax sugar, so even if you're writing classes you're still actually writing function prototypes. As such there's little reason not to support them, and they're very welcome when you have a team of developers that are adapting to modern js development almost exclusively from traditional OO languages.

larzang··on Amazon Prime Day deals 'not what they seem'
Sure, just look at buying parts on Newegg vs Amazon. Newegg has amazing search capabilities tailored to what they're selling, while on Amazon it's a crapshoot whether electronics stuff will even be in the right broadest-level category, so even brand new builders still get pointed to Newegg for their shopping.
larzang··on CopperheadOS has imploded
SWE refers to software engineer, not being a Swede.
larzang··on Show HN: “Is this loss?”: A TensorFlow Lite app to detect Loss.jpg
10 years ago, a moderator on the Something Awful forums posted a home-improvement thread in which he chronicled building an addition to his house, a noble goal.

It was a disaster. He insulted his stairs. He had load-bearing drywall. None of the windows matched, making a big ugly box even uglier. The foundation settled and the addition separated from the original house. He fucked up the plumbing real bad and swamped his yard multiple times. He tried to get certified as an inspector because no professional inspectors would touch his work.

It quickly became a legend, and is fondly remembered even today as one of the good old stories of the internet.

Sometimes someone with poor talents and awe-inspiring arrogance does something so monumentally stupid, tasteless, and just plain bad, that it gains a life of its own. Sometimes that's bad siding, sometimes that's bad comics.

Pictures and more details saved for posterity: https://twitter.com/3liza/status/891475977183739905

larzang··on Avoid getters and setters whenever possible
Generic data types aren't necessarily a better approach. My primary language for many years has been PHP, where the default approach used to be just to pass generic maps around for all data, and it was hell.

You cannot tell if a map passed to you has any of the members you expect, hasn't had additional unexpected members added, or anything else about it without parsing it, it's a mystery bag. There are times when a mystery bag is fine and you're going to be inspecting it anyway, but most of the time your code has at least some expectations about the structure of your data, and for that you need real specific types to maintain any kind of sanity. Otherwise, you're re-validating data over and over or writing code that relies on hope and faith instead of correctness.

larzang··on Why I hate all articles about design patterns (2016)
That's basically the role of frameworks. Any web application I build is going to need at least some subset of functionality common to all web applications, and implementing everything from first principles is absurd, so I use a framework.

Someone else building something completely different with the same language doesn't need those things, so cooking my needs into the language itself is just going to add overhead or force unwanted design choices on to them, but there's probably a different framework for whatever they're doing too.

larzang··on Boosting the performance of PostgreSQL’s COPY command by dropping indexes
Heads are going to explode when they discover the arcane rarely-utilized tool known, nay, merely whispered of, only as "transactions".
larzang··on “Username or password is incorrect” is bullshit
I have a commonish firstlast@gmail account and frequently receive what is the obvious result of people in various parts of the country incorrectly providing my email to apply for jobs, order pizzas, and use other services.

It is absolutely common for users to supply the incorrect username/email.

larzang··on Millennials Are Screwed
Gen X gets rightfully ignored in these discussions because they're less affected by it, having come of age before the big downturn, and less responsible for it, having come of age after the damage was done.

I'm 34, I graduated high school just in time to watch the economic prosperity I had viewed through the eyes of older friends and relatives immediately explode out from under me. I can remember when everything wasn't totally doomed forever, but I never got to experience it first hand.

Gen X did, and while it's not like they haven't suffered along with us since, it's not quite the same. You don't get our sympathy, but you don't get our anger either.

larzang··on Transpiled For-Of Loops Are Bad for the Client
The problem is that IE11 is not eol until the end of 2020, and management can be loathe to drop support for it while it still makes a blip in the traffic, even a tiny one.

It's one thing to wait for the actually supported browsers to all catch up on a new feature, but IE11 is abandonware that can't be abandoned, and the situation just keeps getting worse.

larzang··on PHP 7.2.0 Released
The modern ecosystem (Symfony 3/4 especially) and practices enabled by 7.0+ are good, but all the old horror is still lurking behind the curtain, and there's not much to prevent naive coders from writing garbage like it's 1999. It's not that dissimilar from the Javascript situation, where you have some people still writing spaghetti jquery in random globally-namespaced places and some people in basically a whole other world writing type-checked and compiled modular code.

Some important things like sensible fast native data types (php-ds) are still in extensions instead of core because they're recent developments, and there are still a lot of traps and dead-ends from past failures in the standard library, but it's improving with each release. The addition of sodium to core in 7.2 is a really important step forward.

larzang··on Intel Core i9 Mobile, 9th Gen Coffee Lake Processors Detailed in AIDA64 Update
Having to refresh coffee lake again before we see cannon lake doesn't exactly bode well for those of us waiting for any reason at all to upgrade from haswell (or even sandy bridge). Core count went up with coffee lake, but ipc has been flat for years now and thermal loads have gone up while oc headroom has gone down.
larzang··on The Best Monitor for Programming: A Cheap 40" 4K TV
I've had a UM95 for several years and just bought a cheap 4K 40" tv (Samsung MU7000) to replace it as my primary. They have equivalent pixel density and the tv has nicer colors and contrast with less backlight bleed (VA panel instead of IPS) and more real estate. The only advantages the UM95 has are the displayport input and the screen being more matte.
larzang··on Ask HN: Why is software quality an afterthought for many people/companies?
Clients don't care about quality, they care about features, so management doesn't care about delivering quality, they care about delivering features, so engineers aren't allocated enough time to care about quality, only features. And then it's still the engineers fault when everything explodes or takes 10x longer than it should to rework or expand a feature later.

Basically it comes down to management that is willing and able to tell a client no, or convince the client to budget to do things right, and not management like my current company, which has in the past threatened to disallow even unit test writing and code review as slowing the process down too much.

"Code quality is time and money you're saving your future self" is an argument that only makes sense to people who write code, apparently, until you actually lose a client to avoidable problems.

larzang··on ES7 brings two new features
It's honestly pretty irrelevant. Even if management doesn't require you to still support IE11, you're still almost certainly going to have babel in your pipeline, which means you can use brand new features before browsers support them.
← PreviousPage 3 of 6Next →