Better HN
topnewbestaskshowjobs
Log inSign up

hakunin

2,515 karma · joined Mar 4, 2010 (16y ago) · 549 submissions

https://max.engineer, mastodon:ruby.social/@maxim, x.com/hakunin, bsky.app/profile/max.engineer

meet.hn/city/43.1009031,-75.2326641/City-of-Utica

---

Submissions

comment 1y ago · link · parent

> If I try to actually educate someone or do my research fully, either someone will know more than me, and an expert will weigh in to invalidate some section of my posting- or people will pretend to be an expert- and you’ll spend a day trying to discuss why what they’re saying is incorrect. Both will cause the discussion for other people to die.

Personally, I love the debates that stress-test my posts, they're the most interesting part for me. If I put effort into writing something, might as well defend it, and wouldn't want any punches pulled. Oftentimes people's attempts at debunking my message end up doing quite the opposite to what I'd expect — further validating what I wrote. Other times I need to clarify something in the post.

comment 1y ago · link · parent

Makes sense, I recognize the LLM output now. In fact as I was posting the story here, it kinda dawned on me. Problem is, this happened before ChatGPT went mainstream, so I wasn't 100%. Definitely sympathetic to the hard decision made here, in light of this.

comment 1y ago · link · parent

Yeah, looking at it today I do smell the AI. Nearly 2.5 years ago I had no experience to suspect it. I'm less annoyed with it getting deleted now, but it was still a useful and relevant explanation at the time.

comment 1y ago · link · parent

My most recent (nearly 3 years ago) StackOverflow story:

I posted a question[1]. Got some answers, but not quite complete. Then someone came along and provided a good detailed answer. A couple of upvotes later, that answer got deleted by Community Bot. I voted to undelete it, but it still needs another vote to undelete. So I ended up copying it into my own notes blog[2].

I'm not sure why the best answer was deleted. It would've been a loss if it wasn't preserved somewhere I think.

[1]: https://stackoverflow.com/q/73954228/155351

[2]: https://notes.max.engineer/creating-common-interfaces-in-gol...

comment 1y ago · link · parent

It's interesting to me how I didn't know where the "vibe coding" term came from originally, and thought someone has decided to push and hype it up really hard as an alternative approach to writing software in general. And now that I see it, it sounds way more reasonable than the way it's been spreading out of context.

I'm sure it will go down in history as some sort of intentional movement, and then someone will occasionally point out "did you know that originally this idea was never meant to be used for serious work, Andrej literally said it was only okay for throwaway weekend projects." Big not-always-good things[1] started this way — by misinterpreting something.

Of course, it's possible that in the future code written this way will actually be maintainable, performant, and secure enough that you could start trusting it, and this will morph into a legit way of writing software, but right now the hype is way ahead of what Andrej meant when he coined the term.

[1]: Examples come to mind: Agile, Scrum, Javascript (2 week project originally), there're definitely more examples.

comment 1y ago · link · parent

If you don't run anything different on the CI machine than locally, then how is your post an argument against signoffs? Why is it not continuous integration if the step is run on a different computer?

comment 1y ago · link · parent

I find there's a good way to not commit, slightly different from this article.

There's a non-committal way of designing software that I think we should all strive to follow. It's not things like "let's use an ORM so that we can swap the database later" or "let's write abstractions over everything so we can swap everything later". It's more that you're trying to keep the code as simple and static as possible, naively doing the exact business function, and rarely generalizing. There are a few practices I've picked up over the years for non-committal architecture of this kind (for example: doing more at "build" time, passing the functions what they need instead of what you have, keeping IO in shell layer, and a few more). The goal is not to end up with a codebase that has foretold all the possible futures, but that implements just what it needs to do now in the most straightforward way, such that it's easy to read, understand, and change. I think this kind of non-commitment is the ideal to strive for. The less committed you are in this way, the easier it remains the change the codebase as it evolves, the less shackled it is with over-engineered "solutions".

It's deceptively hard to do this in practice. Everybody wants to implement their over-engineered "system for doing a thing" layered on top of the programming language. Sometimes we forget that the programming language itself is a great tool for expressing business logic.

comment 1y ago · link · parent

Worth noting that the poor performance of erb has been debunked[1] and it'd be helpful to add some caveat or clarification in the rendering solutions table.

[1]: https://news.ycombinator.com/item?id=43550721

comment 1y ago · link · parent

On the contrary, I don't want political _nonsense_. What loss would it be if we couldn't discuss politics under the same guidelines[1] we use for other HN discussions. Places like Reddit allow chaotic non-thoughtful one-liner slogan/meme discourse. If we manage to discuss politics according to HN guidelines, I don't know where else you'd find this level of thoughtful discourse on the internet. It does stress-test this site, but so far it's been able to handle it.

[1]: https://news.ycombinator.com/newsguidelines.html

comment 1y ago · link · parent

I find that this short <3m video explains it well: https://x.com/Ark_Editing/status/1900522055038058803 (start at about 40s)

comment 1y ago · link · parent

For slightly more advanced value objects, check out the gem[1] I wrote. It has a bit more depth in how it "enhances" every attribute to behave as you'd expect, to improve the object's clone-ability, freezability, inheritability, declarative style of attribute definition, and a few more perks. All while remaining super small/simple in the way it's implemented.

[1]: https://github.com/maxim/portrayal

comment 1y ago · link · parent

Odds are very strongly in your favor, not in theory, but in practice. If you can't handle "the possibility", I have some bad news about a huge amount of way more likely possibilities of what can happen to someone simply… living.

The only reason you're afraid of some things more than others is because you came across some stories, and not others. We're all wired like this evolutionarily, on purpose. When we see stories, we're supposed to alter our behavior, because all the stories used to be local and relevant. "A bear ate Timmy near the river" is a good warning to be extra careful near there. Now that we have internet, and the entire planet's worth of carefully selected bears eating Timmys is getting fed into everyone's mind, we must learn a new trick: understanding how odds and relevancy works.

comment 1y ago · link · parent

Whenever someone feels that travel is risky due to news stories (especially in a generally known to be safer area of the world), I always suggest to imagine that right now as you're reading a news story, hundreds of thousands-to-millions are boarding and onboarding planes at the same time, thousands of planes are in the air, thousands are landing and taking off, hundreds of conferences and events are happening continuously all throughout the country, millions of people are traveling on the roads. Try to paint that visceral picture in your mind. It helps put things in perspective.

comment 1y ago · link · parent

Yes. It is reasonable to ask them to turn off these things temporarily as an exercise, if you think it will help junior engineers write better code.

All teaching works this way. Would it be totally reasonable to have junior pilots only practice with autopilot?

comment 1y ago · link · parent

I'm not a game dev, but I watch Tim Cain's[1] YouTube channel, and I think it's a treasure trove of experience-based stories and advice.

https://www.youtube.com/@CainOnGames

[1]: Tim Cain created the original Fallout (pretty much designed the whole universe), and a number of other successful games after. He's an engineer through and through, but wore a lot of different hats, and has an interesting perspective on all aspects of game dev.

comment 1y ago · link · parent

The only point I was making is that short name signals that nothing unusual is going on, and long name signals that you have to pay extra attention. I never suggest to replace a comment with a long name. Here's my 4 reasons to leave a comment: https://max.engineer/reasons-to-leave-comment Comments are crucial for "why", and additional context. Name shouldn't go beyond "what". More on that here: https://max.engineer/maintainable-code (Check the "What" section that focuses on naming).

comment 1y ago · link · parent

Short version: when designing new software, you don't have its architectural picture in the beginning. So when starting from scratch, the architecture shouldn't be screaming, but rather, it has to be non-committal/non-speculative to allow wiggle room for the future. (How to achieve non-committal architecture is the biggest topic I'm interested in, and I find 1 good tactic every few years). Specifically, the architecture should ephasize entry points and outputs. That's exactly what frameworks like Rails provide. You go by entry points until some sort of custom architecture starts emerging from the middle, which is when it can slowly begin "screaming" over time.

comment 1y ago · link · parent

It happened in the article we’re discussing, and seems to be something Robert advocates for.

comment 1y ago · link · parent

For anyone like me who at first skipped over this article because it seems from the title that someone just compared two approaches:

No, it’s an actual debate between the actual John and Bob. Them debating each other. It’s an amazing read.

comment 1y ago · link · parent

That’s exactly why you should save that length only for a method that’s indeed doing something weird. If every method is long, the codebase turns into noise. (IOW I agree)

comment 1y ago · link · parent

Another example of not quite pragmatic advice is Screaming Architecture. If you take some time to think about it, it’s actually not a good idea. One of the blog posts I’m working on is a counter argument to it.

comment 1y ago · link · parent

Not the author, but I’ve been coding since the 90s and also ended up switching between light and dark depending on the time of day. The trick is to also adjust screen brightness. With light background you can lower overall brightness. With dark background if you’re in a well lit room, you have to increase brightness to the point where bright words on the screen actually shine too strongly in relation to the dark background. So it actually feels gentler when the background is light but screen brightness is dimmer overall.

comment 1y ago · link · parent

Wait, are you asking why what USSR did to its own citizens is different than what USA is doing to other countries? Of course we want our views and values to be propagandized to other countries, why is that bad? We want other countries to become more like USA.

comment 1y ago · link · parent

I don't think I ever try to verify the correctness of the code in code review. That seems hopeless to me. The original developer should be assumed to produce working code, which is covered with tests and maybe will go through QA (if you have that). Of course there are occasional bugs you can spot, but the main goal is to review the architectural approach and code clarity. You can also note if something isn't properly covered with tests. If you managed to make any security, performance, or edge case handing suggestions, that's a nice bonus.

Maybe we're in a very different context, but to me if you can't understand what the code does without a debugger, then you ask the author to make the code clearer.

comment 1y ago · link · parent

I think relying on your judgement of character to determine trust is a decent tactic in personal life and interactions, but it doesn't work at scale.

People place trust in faceless institutions all the time. That's why you sit in a box that produces about 50 explosions per second when you drive a car. I don't think you would've gained much by being comfortable with the character of your car designer. If you think building cars is complex, laws and regulations are just as complex. And it takes teams of lawyers, hundreds of pages of documents, and a lot of data to figure out what makes sense. But it's easy to armchair-judge all of that as "just some faceless institution".

> what forces exist to prevent them from being corrupted?

Why are you right now not stealing from your work, or vulnerable people around you? Why are you not trying to screw over everybody you meet? Those forces and more. There's a lot of scrutiny built into most institutions.

> the growing cynicism in institutions is because of evidence of corruption

I don't think we use the word "evidence" the same way. Having perverse incentives is not evidence.

comment 1y ago · link · parent

That feeling you just expressed of higher trust to your local doctor than to a head of a large institution: it came from having a pretty good idea what your local doctor does, and no idea what a head of an institution does. The growing problem with cynicism in our society is not because there's evidence of corruption, it's because nobody knows how anything works, but everybody gets fed "look at these bad incentives" by pundits (especially alternative media ones) all day. Everything is complex. Just because it is doesn't make it nefarious.

An institution's whole point is to be a system where you don't have to trust individuals. It's a way to deal with complex nature of our reality. People should really learn what institutions are, how they function, what accountability mechanisms they contain, instead of blaming them based on conjecture. "Look, this bad thing happened. And this person has this bad incentive. Now we know the whole story." We don't.

comment 1y ago · link · parent

Every single thing in our society has perverse incentives. Every single person who ever sells you something has incentive to sell you as little as possible for as much money as possible. Every single employer has incentive to pay you as little as possible for as much labor as possible. But that's not how things end up happening, because other forces are at play.

People who worked their entire life in an industry and became experts on it, then become regulators for the same industry, have incentives to favor their industry, sure. But who else should be regulating the industry if not the expert in that industry? If you get someone who is not an insider, wouldn't they just fail at regulating, because they have no idea how it works? Also, the people who put someone in that position, isn't there a chain of accountability there? There are many people working side by side with the "evil person trying to enrich themselves". Bad acts come out. Incentives tend to balance each other out. It's not wrong that part of a regulator's job is to find a balance as to not destroy an industry while regulating it.

comment 1y ago · link · parent

> I've seen those exact questions in PR templates […] understanding a PR takes time […] when anyone is under any kind of pressure to deliver. […] is this the case frequently enough for the process to have a positive ROI.

Not templates. The culture HAS TO be for everyone to calm down and treat PR reviews as first class citizens, not unwanted distractions. If ya'll stop stressing each other out that reviews are bs, I'm sure they'll stop being that.

> […] we still had, design reviews, white board sessions, code reviews, pairing sessions, planning meetings etc...

You know that feeling when you get a design idea, you start implementing, and a single plot twist makes you realize it doesn't fit? What do you think happens when a white board session bumps against reality? That's likely a session down the drain.

What if we replace it with the following process: 1) Discover all the plot twists up front by writing out the solution. Publish a PR. 2) When a reviewer comes in, give them time to grok it, welcome redesign ideas. 3) Easily assess and validate their ideas using the stupid amounts of expertise you temporarily gained by having written a working solution. 4) Discuss or proceed with fixups.

How can it get more concrete and grounded in reality than this? One of you knows every tree, the other one can still see the forest. I'd argue, you rarely need to talk before this point. This is the best point.

(Obviously you shouldn't just suffer in silence if you're stuck or your diff is getting out of control. Run it by somebody sooner than later.)

> I highly doubt you'd be able to do this outside of a small company, or a small self-contained team.

Thankfully most companies or teams are indeed small.

comment 1y ago · link · parent

> 9/10 when people do make those kinds of suggestions it's not objectively better, and 9/10 changing it won't move the needle with respect to maintainability or meaningful performance.

The 9/10 number seems incongruent with my experience, but that could be because I often help set the PR review culture, and encourage people to identify the questions: is it "how" (…is it working), "what" (…is it doing), or "why" (…is it done this way). If you recognize those, it makes it way easier for the author to address the specifics without a total redesign. (How = hard to follow the logic, what = better names needed, why = comments needed).

But sometimes a redesign can be super compelling to everyone, and the question is: do we want to be stuck with the subpar version? Because really, the closer you are to remembering how it all works, the easier it is to rewrite it. Not later, when it faded from memory and overgrew with dependent code.

> Comparing the software we produced before the whole PR review for every merge request thing became common, and the software we produce now, I don't think software quality has improved at all. So for me to change my mind, I'm going to need to see hard data that says the opposite.

The kind of subjective reviews we're discussing (not security, performance, consistency, edge case issues, or major simplifications) are not really about quality, they're about your specific team understanding your specific code. Help your colleagues (just the small circle of maintainers) have more confidence in coming in later to change this code. If you're working alone, this isn't as big an issue.

To collect data on this, you would need to witness what happens when everyone architects their own way, and then you have to find the person who wrote that part to decipher it, and compare the amount of slowdown that can cause. Nearly impossible to measure in practice, I think.

> not everything needs to be asynchronous

I completely agree. PRs provide great tools for discussing code asynchronously so it's good to lean on them sometimes, and discuss the work on a call other times. This is however a big departure from your original statement that PRs are the absolute worst time to review the code.

comment 1y ago · link · parent

The biggest issue with PR reviews in my experience is not how long they take, but the justifications people provide for their feedback. I don't think you should ever leave a comment if you don't have a convincing answer to "why" you left it.

The change request must either make the code objectively better (i.e. performance, memory, security, adherence to a consistent architectural pattern, simplification), or subjectively clearer (it's hard for you to understand what is happening, how it happens, or why it's done this way).

If the reason is solid, then the feedback is usually well received. Except in unfortunate environments where PRs are treated as annoying disruptions. I hope I never have to work in that kind of place.

1
8910
19