HNHacker News
TopNewBestAskShowJobs

jkoudys

882 karma · joined May 26, 2014

submissionscomments
jkoudys··on The Unix timestamp will begin with 16 this Sunday
"A society grows great when old devs allocate timestamps whose higher bits they shall never set."
jkoudys··on Single Page Applications using Rust
It's barely even lib-dependent -- we use rxjs instead of redux; react hooks have a useReducer now, and the "reduce" function isn't a new idea so it shows up in many more places where it can easily trigger events. I'll often use this approach along with a "controller component", which manages the less directly visible components. It's common already for things like routing.
jkoudys··on PHP the Wrong Way
It's more a difference in weight and opinion. Laravel carries a lot with it; symfony nearly as much. But you could install composer and install the parts you like and not need everything shipped together. I agree you're normally inventing a framework, but I left the article feeling like there's a false dichotomy between monoliths and pure PHP as a framework.

For what I do, throwing up Slim, Guzzle, and Doctrine works well. You could make the argument that any one of those individually is a "framework", or that collectively I've made a new framework in 3 lines of composer.json by combining them. Point is many (and the article suggests) see framework or no framework as some massive all-or-nothing choice, when picking the parts you want, even after you've built your system out, us also an option.

jkoudys··on PHP the Wrong Way
Odd that the author ends on saying to make apps secure from the start, when this is often the intent in using bulkier frameworks to do "simple" things. It's also odd to criticise abstraction on abstraction since that's what literally all computer programming is. The simplest and least abstracted approach would be running SQL directly.
jkoudys··on GPU Accelerated JavaScript
Ran fine for me: https://gpu.rocks/#/benchmark
jkoudys··on US economy suffers worst quarter since WWII as GDP shrinks 32.9%
Great to know you'd only hit 1/3 the level needed to cause the apocalypse.
jkoudys··on Brown M&Ms, or Why No One Reads the Manual
Oh god yes. Otherwise it's always the same: try to bargain you down to billing 30 minutes work, then complaining that you didn't do the 1.5h of work they'd agreed wouldn't be done to save costs. The usual "in lieu of paying you more, we'll complain harder" nonsense every client from hell pulls.
jkoudys··on Brown M&Ms, or Why No One Reads the Manual
I agree with all of that, except for making it a reasonable rate. Go up to the edge of reasonable, then bump it up by $15/h.
jkoudys··on Not an Amazon Problem
Yes the bias is huge, and doubly bothersome because even attempts at inclusion are framed from the perspective of the currently powerful. I look at how many big-name white male devs on my twitter feed make a big show of trying to raise up others. Yet it's a wildly disproportionate group of conventionally attractive women in their early 20s making corny 5-second comedy clips that are getting all the attention. That, or pushing model minority stereotypes that are more about making the man sharing them look good. Heaven forbid they include a woman with the same 5-pack of hoodies wardrobe and under-the-chin, poorly lit selfie they have, just because she's actually a good dev.

While I can understand the resistance to selection criteria if it removes more nuanced decisions necessary in building a team, I can't think of a better way to offset those biases you describe. Those biases are extreme and clearly, left to our own devices, we do a bad job addressing or recognizing them.

jkoudys··on Not an Amazon Problem
The difficult challenge is that the skills aren't uniformly distributed, because the discrimination goes back way earlier than the interview. I remember how aggressively hostile the general culture was towards girls focusing on "geeky" pursuits like computer hardware and software when I was a kid, and that's been amplified into self-perpetuating disparities today as those things became more important. It's obviously influenced the perception of interviewers as you've described, but education, training, representation in media, etc are all essential.

Much like the other problems in the article, there's no obvious villain, and it's a long process to change a deeply flawed system.

jkoudys··on Teaching isn’t about managing behavior
I won't dispute that "patriarchy" (or even white supremecy) are forms of order, but they're order built by forcing roles on people based on gender and race. Anyone wrapping punctuality up into that is enforcing such a system by assigning someone's station based on race, not fighting against it.
jkoudys··on BBS Graphics History: Pretty awesome, until the web showed up
The best way I remember enhancing the graphics of my door games, was with those local versions of the game you could install that'd connect using its own protocol to the BBS. Versions of The Pit where you'd get local images and sound files. In a lot of ways that feels closer in step to the web, which focused more on protocols and structure of your data than on how to render your image. RIPscrip maybe intersects with the <form> element.

Flash seems like the more direct competitor that he touches on. It's easier to see in hindsight, but they really won by taking care of the content creators. I tried a few times to make RIP graphics back in the day but could never really figure it out. Flash, in contrast, had an experience for the designers and artists that is still remembered fondly today. It set the course for a whole new generation of animation.

jkoudys··on The saddest “Just Ship It” story
Being too much behind a product idea is doubly bad, because an idea isn't a business. You need some plan for how that'll progress over time, or how does any delivery, licensing, or potential investment get managed?

I'm about 1.5y into a startup that's picking up steam, and I've stopped feeling worried about similar "ideas". We have a plan for who wants our product, what they care about, and how much they'll pay for it. We have an platform that can be used to support a plethora of unique marketable products. We have a sales team in place. There's so much more going on than the original "what if we used version control thinking with contracts and legal knowledge?"

jkoudys··on Booting a 486 from floppy with the most up-to-date stable Linux kernel
Extra hard when a 2 year old keeps cramming half-eaten fruit into everything.
jkoudys··on De-escalating social media conflict
Forgiveness certainly does not require being correct. The "mistake" language is excellent, because it covers cases where you may not have been badgered at all. You could feel it was a mistake to post something based on its timing (eg a tasteless joke)
jkoudys··on Hardcoded secrets, unverified tokens, and other common JWT mistakes
We'd recently moved our jwt code into rust (using the jsonwebtoken crate), and it's wonderful to have this article to read in that context. The pitfalls listed in the article were mostly handled by design, so we had to correct mistakes in the PHP implementation that were impossible to make now.

Eg we'd been using the `iss` field, a claim, to determine which key to use, when we should've used the `kid` in the header. All claims are now completely inaccessible until verified to the point where there's no way to access them short of manually deserializing the jwt. We'd also allowed some invalid tokens where the `exp` was in the past, only if you were refreshing the token of an active session. This could've caused problems if we ever wanted to issue a token that expired very quickly, since you could have a token that's theoretically 10-times longer lived than you intended.

jkoudys··on What gives you anxiety at work?
It's a common stressor because it's obviously going to be used to assess your job performance, and you need to put effort both into reporting accurately and making you look good. It can get excessive, depending on the quality of management. I've seen bad software managers essentially demand that devs live demo everything they're working on, three times a day, with no notice.

I find good managers are capable of measuring progress without demanding frequent "status updates". It varies from job to job, but I find getting frequent, small PRs (even to dev branches) works well.

jkoudys··on How I Make Yogurt (2019)
I do a lot of yoghurts at home. I find skim milk powder is really excellent for thickening it up before you culture it. I also enjoy browning it a teensy bit on the bottom of the pot - gives it a nice caramel flavour.
jkoudys··on Rust: Dropping heavy things in another thread can make your code 10000x faster
If you're bottlenecked, then certainly. There's no free lunch, but for us, problems that can be solved by simply scaling up the resources on the host as relatively cheap as free vs expensive developer time. When we're purely focused on sales and not anywhere close to hitting a full mem/cpu bottleneck, this would bee good.

This situation you describe sounds a lot like dealing with garbage-collection cycles, so you give a good recommendation on something to watch out for, as rust performing at the level of a GC'd language removes a big reason for choosing rust.

jkoudys··on Rust: Dropping heavy things in another thread can make your code 10000x faster
It'd be interesting to implement this on a type that would defer all of these drop threads (or one big drop threads built off a bunch of futures) until the end of some major action, like sending the http response on an actix-web thread. Could be a great way to get the fastest possible response time, since then the client has their response before any delay on cleanup.
jkoudys··on Things I hate about Rust
I'd even made your same comment about Strings over on reddit last week - it's not like the ways it's doing it are wrong at all. It's more that newbies can suffer decision paralysis when you are obsessed with learning the "right way" to do something, but there's no clear answer. Do I `.map(String::from)`, do I `.map(From::from)` and let things infer? Do I `.map(|s| s.into())`? `.map(|s| s.to_owned())`? `.map(|s| s.to_string())`? You can drive yourself crazy over the most meaningless, pointless questions in your code.

The surprising thing is, I find rust an incredibly effective language at sparing me from worrying about trivialities. Once you learn the slight differences in what all those things mean, you can be pretty direct. Overall I find rust one of the harder languages to write, but one of the easiest to read, and reading code is generally where you'll spend more time.

jkoudys··on Ask HN: Do kids drag your career down?
I'm the CTO of a small company (about a dozen people), and I don't know that my career has been hurt, but I've certainly had to reprioritize. Doing dev work, where the occasional task can take 30m to 30h, and you have to be focused for hours on end, is less practical when you have to rush out for daycare pickup, have a toddler jumping on you, or try to work during nap time which often ends earlier than you'd like. Consequently I find myself doing a lot more business development, product planning and people management. I still write some code, even if it's often more efficient to delegate. I like to keep my skills up to date and to not become slowly ignorant of my own company (a problem I've seen plenty of times before).

One way it's helped, is it's a really easy topic to bring up with clients or on sales calls. It makes me more relatable, and gives a good first impression since people assume I'm at least competent enough to provide basic care to a child.

jkoudys··on Ask HN: Is there a search engine which excludes the world's biggest websites?
Complaining about pedantry is the new pedantry.
jkoudys··on Async-GraphQL: A GraphQL server framework
Yeah I've been using it - took a while but pretty happy with it so far.
jkoudys··on Async-GraphQL: A GraphQL server framework
Came here to ask how it compares to juniper. Juniper has been the one part of my stack of crates that's made async difficult for a while now. Building a rust app with full futures support from top to bottom has huge benefits, but support on juniper has been slow in coming (a lot of existing code to move along with it), and the main error being GraphQLError<'a> with a lifetime and no impl of std::error::Error has been a huge nuisance to deal with.

That said, constructing the resolvers with the `#[juniper::graphql_object` macro has been incredibly easy. They used to use some clunky DSL, but since the move it's been great. Don't think I'd consider moving if async-graphql isn't as strong on that, but I won't really know until I try both.

jkoudys··on U.S. Economy Shrinks at 4.8% Pace, Signaling Start of Recession
It's studying for the test. It's too common to see a stock index as the stock market as the economy, buy they're all distinct things. Ideally an index _should_ represent that market, but when an economy becomes massively centrally planned by an overreaching fed, it's too easy to prop up those in the index to make the "economy" look strong. Ultimately, purchasing power, people's ability to save, liquidity of assets, etc were pretty bad before this recession. Those are the things we should actually care about - maximizing utility.

It's especially galling because the people pushing for these nigh-Stalinist levels of fed intervention and central planning (look how much support oddly favoured industries like manufacturing and coal get) are also posturing as champions of the Free Market. It's like we can't make any progress because nobody in charge is willing to argue in good faith.

jkoudys··on Perfect UX Is Impossible (2019)
We often divide UX into those two broad "inexperienced" and "powerusers" categories, but in my experience those are only what we see for Good Software that could at worst miss its demographic. More frequently, I see Bad Software written, where the UX targets either looking good on a sales demo, or impressing an audience of 1-3 people (the CEO and/or other execs). Good sales demos may lean more to the simple side, but often they'll cram menus full of features purely to check off things on the client's list and look impressive on paper, even if in practice those features are too clunky to use. For CEO-targeting software, it may lean to "poweruser", but execs may also demand their product put the few things that they personally are interested in front-and-centre, at the expense of everything else.

As a programmer, I want Good Software to align with work that they'll pay me for. I'm fortunate enough that this is the case with my current work, though I can recognize that this hasn't always been the case over my career.

jkoudys··on We Are Living in a Failing State
The US also got hit pretty late, yet is taking it the worst. The extra time could've been used to prepare - everyone in this comments section wants to compare to Europe, but there's a much better reference point sitting on America's border. Canada took it seriously from the start, and despite having a greater diaspora that might transmit the "Chinese virus" into densely populated areas, has had a flatter curve, a less catastrophic economic impact on individuals, and most importantly a far lower morbidity.

The big problem with comparing directly to europe, is not only the timing but the demographics. Italy was hard hit because they have a lot of old people. Canada already has a lifespan 4 years longer than America's, which if you think about it is probably better proof that America is failing than most of the article.

jkoudys··on Why should I have written ZeroMQ in C, not C++ (2012)
It seems like they're trying to solve a problem (manual destructor call to free memory) that is important in other languages but not rust on account of borrowing. Even in the author's examples I feel like it's a problem directly solved by lifetimes, since all the reasoning about freeing that memory is already there.

Interestingly they picked the best possible case to showcase rust's strengths, where the free happens on drop. If it were a case where you needed strict control over where that memory came from and _when_ it gets freed, C would seem like a nice fit, but rust is great when you only care that the memory is gone once your variable's out of scope.

jkoudys··on UTF-8 Everywhere
Not quite at that level, but rust does have OsStrings (managed the same way as the OS, often but not always utf8), and CStrings (basically just byte buffers - just like c likes). There are special rules around inclusion of nulls and null terminators. It'll give the benefits of the behaviour you mentioned - not allowing an invalid string type for a function call.

The sqlx crate for rust also has a macro called query!, which (at compile time) validates the SQL and created a value of type "record". Similar idea there, since you'll get early exceptions thrown by the compiler if you write sql with errors in it.

← PreviousPage 3 of 11Next →