HNHacker News
TopNewBestAskShowJobs

s3cur3

939 karma · joined December 5, 2012

I'm a software developer working at Felt building the future of mapmaking software, and I used to work on the X-Plane flight simulator. I work primarily in Elixir & React, but I've written a lot of C++, Swift, Elm, and Python as well.
submissionscomments
s3cur3··on Factorio 1.0
Obviously people might not like it, but can you summarize the moral arguments against it?
s3cur3··on Never use a dependency that you could replace with an afternoon of programming
So what I'm taking away from this is that for maximum productivity, you just have to:

1. Not evaluate any alternatives

2. Not read the docs

3. Not check the code

4. Not check the license

;)

(Thanks for a great blog post that articulates something I've felt for a long time.)

s3cur3··on Never use a dependency that you could replace with an afternoon of programming
I’ve been working on the same medium-size (fewer than 1M LoC) codebase for about 7 years now. I feel like over the years, my estimates of how long something will take have gotten better for one reason: I’ve found the scaling factor I have to apply to my intuitive estimate that brings into the realm of reason.

So, if I think something looks like about a day’s work, I’ll actually estimate it at about 3.5 or 4 days. Thus, for a project to qualify as “just an afternoon,” I’d have to naively estimate it at under an hour.

I rarely have time to spare, but I also rarely go over by more than maybe a third.

Your multiplier may vary depending on how horrifying your codebase is. On a side project with good test coverage, my multiplier is only about 2.

s3cur3··on Stop Abusing Semver
Because someone in your (presumably massive) org had some code somewhere that was parsing the source itself looking for... something. (The story Googlers tell is a program looking for a specific line number in a program’s output.)

More on Hyrum’s Law: https://www.hyrumslaw.com/

s3cur3··on Stop Abusing Semver
For another perspective on “semver is a lie,” see the “Live at Head” talk from Titus Winters of the Google core C++ team.

https://m.youtube.com/watch?v=tISy7EJQPzI

TL;DW: By Hyrum’s law, at sufficient scale, there’s no such thing as a non-breaking change (including changing comments). Embrace that, and test sufficiently that you can always take the latest dependency but detect when it breaks.

s3cur3··on ‘Strong Opinions, Weakly Held’ Doesn't Work That Well
This is a great way to put it. It’s a position I end up taking a lot—there are so many situations where no one involved has enough information to justify strong beliefs.
s3cur3··on The Zen of Erlang (2016)
The Erlang ecosystem (including my personal favorite BEAM language, Elixir) has been kind of a secret weapon for a lot of companies for years. There are a handful of freelancers in the community who have had the experience of going to work for a company doing Erlang/Elixir, only to be told they can never reveal the company’s identity because they consider the language a competitive advantage. One big corp went so far as to say they use Java in all their public-facing info (including hiring).
s3cur3··on George Floyd Protest – police brutality videos on Twitter
“Okay, so there are a few bad orchards...”
s3cur3··on America is giving up on the pandemic?
I don’t have a particularly strong opinion here either way, but I think it’s worth pointing out that all medical advice is (or at least should be) sensitive to the broader context of a person’s life. Consider: is it safe to take morphine? If I’m a healthy 20-something looking for escape, absolutely not. On the other hand, if I’m an 85 year old hospice patient, anything harm morphine causes is vastly outweighed by the good it does.

It doesn’t seem an irresponsible or unprecedented extension of that principle to say that if your country is rocked by civil unrest, dealing with that is more important than preventing the spread of disease.

s3cur3··on The Unmarked Federal Agents Occupying Washington, D.C
This is the least charitable interpretation of GP's proposal possible. A small amendment to GP's comment to apply only uniformed officers operating in public—as the D.C. troops from the article are—negates this reductio ad absurdum.
s3cur3··on US customs and border protection is flying a surveillance drone over Minneapolis
This is a really important distinction. The media really buried the lede calling it a Predator, which I associate with recon/surveillance only. The fact that it’s MQ-9, capable of carrying all manner of weaponry including 4 air-to-ground missiles and 2 laser-guided bombs (according to the Wikipedia page—who knows what this particular UAV is carrying) really changes my evaluation of how bad this is.
s3cur3··on Ask HN: Who regrets choosing Elixir?
I’m primarily a C++ dev, so that colors a lot of what I think about the 3rd party library situation in Elixir. Because of the abysmal state of package management in C++, it’s usually easier to implement stuff yourself (tailored exactly to your own needs, and therefore with an extremely limited scope) than it is to bring in a heavyweight third-party library.

For that reason, I was pretty comfortable coming to Elixir and implementing Somewhat esoteric, games-specific networking stuff myself. It would have been nice if the library had already existed, but I am so glad I went with Elixir rather than Node or PHP (which both do have the game networking library I needed).

My experience has basically been that the “fat head” of open source libraries exists in Elixir, but the long tail of more esoteric stuff does not. By its nature, though, you won’t need 99% of the esoteric stuff available in other languages.

s3cur3··on Game Programming Patterns (2014)
If you'd like a summary of the book, my study notes are here:

https://tylerayoung.com/2017/01/23/notes-on-game-programming...

s3cur3··on Rawdrawandroid: Build Android apps in C
This is what we do with X-Plane. It’s really, really nice to be able to debug code destined for mobile on the desktop sim first. It cuts the iteration time down by a huge factor.
s3cur3··on Ubuntu 20.04 LTS’ snap obsession has snapped me off of it
This is a calm, measured perspective on a hot-button emotional issue. Thanks for that. :)
s3cur3··on Crafting “Crafting Interpreters”
Agreed. I got a lot out of Game Programming Patterns. My notes, if anyone wants a summary, are here:

https://tylerayoung.com/2017/01/23/notes-on-game-programming...

s3cur3··on Static Analysis in GCC 10
I’d be interested to know which company (if you’re free to say). IIUC, this is very different from the way Coverity (the biggest commercial player I’m aware of in this space) operates.
s3cur3··on Effect of economic crisis on America’s small businesses [slides]
I have to think that as a society, we’re going to be introducing a lot of slack that never existed before. Consider commercial real estate: there are going to be loads of small businesses that can’t make rent in the next 3 months... but from a landlord’s perspective, it probably doesn’t make sense to terminate the lease (or hound the business into bankruptcy or something), because who the hell else are they going to get to rent the place?
s3cur3··on DefaultApp
I've been toying around with a macOS app idea for awhile. This looks like a great starting point for someone like me with no macOS native dev experience. Thanks!
s3cur3··on Covid-19 Fatalities Dashboard
I mostly agree, but for areas that haven’t been hit yet, this kind of up-to-the-minute info can help you decide when you need to put you/your family “on lockdown.” Here in Kansas City, we only got our first confirmed case on Saturday—prior to that, my wife & I agreed we should continue business as usual.
s3cur3··on 6 months in and $1k MRR: my biggest mistakes so far
I _wish_ I could have this good an attitude about people being assholes over tiny mistakes I make in public. One rude comment like the GP’s can easily ruin my mood for hours.

People forget that the person on the other side of the keyboard is a human. :(

s3cur3··on Simple Systems Have Less Downtime
In general, arguments by analogy tend to get hung up on the aptness of the analogy. I find it helps short-circuit a lot of long, unproductive discussions at work by just straightforwardly stating my thoughts—“we should do x because y,” rather than “system A is like system B (which does x because y), so we should do x.”
s3cur3··on An optimization to help code compilation times on big CPUs
Replacing Make in “your” project is relatively easy. Replacing it in all your dependencies is both a technical pain in the ass and a massive political problem if you want to upstream the change. If you have a lot of dependencies, it’s probably easier just to improve Make. ;)
s3cur3··on New in PHP 8
There are just so, so many problems with these benchmarks. (This comment from the author of Servant, a Haskell framework, nicely sums up a lot of the criticism: https://www.reddit.com/r/haskell/comments/6b3dlt/techempower...) But cherry picking the single query benchmark in particular makes the issue worse. Like... how many web apps do you stand up where you have one client you want to serve? At least the "multiple requests" benchmark is sort of plausible for the kind of workload you'd want to handle.

In most cases, though, you care a lot more about the 95th or even 99th percentile response times than you do the mean; I'd trade quite a bit percentage-wise off my mean response time if it brought the 95th percentile way down.

(This isn't to hate on PHP; PHP is fine. But you shouldn't choose it because the "single query" benchmark says it's fast.)

s3cur3··on Elixir v1.10
Erlang's type checker Dialyzer has an Elixir wrapper called Dialyxir (https://github.com/jeremyjh/dialyxir). As someone coming from C++, Dialyzer leaves a lot to be desired—I still miss C++ type checking—but it's better than nothing.

The Norm library (https://github.com/keathley/norm) is an attempt at higher-level, more expressive type checking which I think shows a lot of promise, but I've not adopted it in a real project yet.

s3cur3··on Elixir v1.10
Even if you prefer the Erlang syntax, you might choose Elixir for the libraries. E.g., as far as I know, Phoenix isn't available from "plain" Erlang.
s3cur3··on Elixir v1.10
I've been writing Elixir professionally for about a month now. I previously had zero experience with Elixir, Erlang, Ruby, or even any functional languages (though I have read quite a bit about functional programming, and adopted a lot of functional techniques in my C++ & Python).

The learning process has been, frankly, incredibly easy. I read a bit of Saša Jurić's "Elixir in Action" and Dave Thomas's "Programming Elixir," but mostly I just dove in with the Elixir docs' tutorial (https://elixir-lang.org/getting-started/mix-otp/introduction...). I'm not claiming to be writing the best Elixir ever, but I shipped my first production app in the first week and it's been rock solid.

I think most companies massively overvalue hiring people with "x years' experience" in whatever tech they're using. Better to hire smart people with a solid foundation in writing good code and train them on your particular tech stack.

s3cur3··on Elixir v1.10
Elixir (really, the Erlang VM it's built on) is designed for highly concurrent, reliable systems. For my org, building a distributed webapp, we chose it over the languages you listed because of how much you get "out of the box" with Elixir.

Saša Jurić's talk "The Soul of Erlang and Elixir" (https://www.youtube.com/watch?v=JvBT4XBdoUE) is a good introduction to why someone might choose Elixir. The payoff is the slide (https://imgur.com/gallery/G6lfUW6) where he compares the stack of a "traditional" web app (Nginx + Ruby on Rails + Go + Redis + Mongo + Cron + Upstart) to the Erlang rewrite of the same app, which is... just Erlang.

This isn't to say that Erlang ships a complete replacement for Redis, Mongo, Upstart, etc.—but it provides most of the functionality that most apps will need, such that your dependency tree can be much simpler. It's really nice to not have to become an expert in all the infrastructure surrounding a normal web app and instead just learn Erlang/Elixir.

s3cur3··on WordPad Is Gettings Ads in Windows 10
Agreed. Most of my Windows-using family members wouldn't be able to tell the difference between WordPad and Word... until they go to share the file and discover that RTF looks different on every other person's machine. This is entirely a positive for the tech-illiterate portion of Microsoft's userbase, who probably intended to be using Word anyway.
s3cur3··on The Real Class War
> all work is valuable, otherwise it wouldn’t be desired.

Have you had such a good experience with managers that you

a) have never been assigned bullshit work that should have never been done, or

b) have never seen a manager invent work to make themselves seem important?

← PreviousPage 3 of 5Next →