Better HN
topnewbestaskshowjobs
Log inSign up

CodeMage

6,801 karma · joined Feb 26, 2009 (17y ago) · 1,367 submissions

Submissions

comment 10mo ago · link · parent

> Then I thought "why not just remove the borrow checker?" without any real motivation.

Reminds me of a chemistry kit I had as a kid. None of this tame, safe stuff you can buy these days. Mine was a gift from my dad and I never thought of asking him where he dug it up, but it had stuff like pure sulfuric acid in it.

One day, when I was done with all of the experiments I had planned to do, I decided to mix a few things and heat them up, just for fun, without any real motivation other than "let's see what happens".

Let's just say I was lucky we only had to replace some of the clothes my mom had left out for me to put away. ;)

> Another point is, as you guys are well aware, the borrow checker will reject some valid programs in order to never pass any invalid program. What if I'm sure about what I'm doing and I don't want that check to run?

Then you do it using the "unsafe" keyword, and you think long and hard about how to design and structure the code so that the unsafe code is small in scope, surface, and blast radius.

That's precisely what unsafe code is for: to get around the borrow checker and assert you know what you're doing. Of course, if you're wrong, that means your program will blow up, but at least you know that the culprit is hiding in one of those unsafe areas, rather than literally anywhere in the whole codebase.

Alternately, you can switch to a language with a different ethos.

The ethos of Rust is caring for memory safety so much that you willingly limit yourself in terms of what kind of code you write and you only step out of those limits reluctantly and with great care. That's something that resonates with a lot of people and Rust has been built on top of that for years.

If you suddenly take the product of those years of hard work, strip out the foundation it has been built on, and unironically offer it as a good idea, a lot of people won't like it and will tell you so. Mind, I'm not excusing the personal attacks, I'm just explaining the reaction.

comment 11mo ago · link · parent

Yes, and I agree with that. But my reply was to a comment that seemed to dispute that idea and imply that if you wanted to stop growing at some point, then you should shift to academia.

That said, there is an expectation of unlimited growth and it comes from a different source: ageism. At my age, the implicit expectation is that I will apply for a staff or even principal role. Applying for a "merely" senior role often rings alarm bells.

That trend -- and certain others -- are what's making me consider taking up teaching instead.

comment 11mo ago · link · parent

FWIW, I'm starting to seriously consider this as a strategy that will allow me to get to retirement without completely messing up my health due to stress and burnout.

That said, there's something deeply wrong with our industry if that's the way we expect things to work. I never felt that teaching was my calling, but I might end up being forced into it anyway and taking up a job that someone with proper passion and vocation could fill. Why? Because my own industry doesn't understand that unlimited growth is not sustainable.

For that matter, "growth" is not the right word, either. We're all being told that scaling the ladder is the same thing as growing and developing, but it's not.

comment 11mo ago · link · parent

What makes this whole thing worse is the concept of "non-terminal" levels, i.e. levels that you're not allowed to stay at indefinitely, which means that you must either get promoted or fired.

I can understand not wanting to let people stay in a junior position forever, but I've seen this taken to a ridiculous extreme, where the ladder starts at a junior level, then goes through intermediate and senior to settle on staff engineer as the first "terminal" position.

Someone should explain to the people who dream up these policies that the Peter Principle is not something we should aim for.

It's even worse when you combine this with age. I'm nearing 47 years old now and have 26 years of professional experience, and I'm not just tired, but exhausted by the relentless push to make me go higher up on the ladder. Let me settle down where I'm at my most competent and let me build shit instead of going to interminable meetings to figure out what we want to build and who should be responsible for it. I'm old enough to remember the time when managers were at least expected to be more useful in that regard.

comment 11mo ago · link · parent

First, let me make one thing clear: my comment was in no way meant to be a substitute for reading the post. I was not writing some kind of a review for people to decide whether they should read the post, or presenting a summary. I was commenting on what I disliked about it and everyone should read the post to form their own opinions.

That said, I disagree with you about the context. Yes, what you quoted is the immediate context, but I think the bigger context -- the one I described in the rest of my comment -- is the more important one.

Managers are welcome to try to integrate IC activities into their job. In fact, I wish more of them did it, so I didn't have to deal with managers who equate coding to "typing" and can't wait for the AI to replace those of us who have spent years honing that particular skill.

But the IC work should not come at the cost of doing what the manager is supposed to do in the first place: provide a higher level of integration and problem solving for their ICs. By "higher", I mean in the hierarchical sense. A manager is higher on the ladder than I am, and that means they should be able to see a wider perspective and help me integrate it into my work. And their manager should do that for them, so that they can pass it on to me, etc.

The author doesn't want to be a "paper-shuffler"? Guess what, that's one of the most important aspects of their job and, incidentally, one of the reasons why I didn't pick management as my career.

I can relate to the feeling of frustration one occasionally gets when a core aspect of one's job becomes unpleasant, but that's no excuse for straw man arguments.

comment 11mo ago · link · parent

From the post: "The middle manager that doesn't perform any useful work is a fun stereotype, but I also think it's a good target to aim for."

This is the kind of argument that makes people come up with middle manager stereotypes in the first place. In fact, the whole post is a great example of why middle manager stereotypes exist: it starts with a straw man argument and comes up with a "better alternative" that makes life easier for the manager, regardless of what the manager's reports really need.

I've seen this whole "I will empower you to do everything on your own" principle in action and it's exhausting. Especially when the word "empower" is a used as a euphemism for "have you take on additional responsibilities".

Look, boss, sometimes empowering me is just what I need, but sometimes I need you to solve a specific problem for me, so I can keep solving all the other problems I already have on my plate.

comment 11mo ago · link · parent

Do arguments even matter when the article is clearly clickbait? If the title is not enough to identify it as clickbait, the first 4 paragraphs make it clear, with the whole "imprinting" bit.

My first programming language was BASIC. My second programming language was assembly (for Z80A, then for 6502, later for x86). My third programming language, the one the author would call "formative" was Pascal.

None of these languages left me "imprinted" to the point of forever shaping my tastes and making me unable to adapt to or appreciate newer languages.

In fact, if we're talking about formative experiences, I remember one professor at the university who said, quite seriously, that "Anyone who has programmed in BASIC has been damaged for life and will never be a good programmer." The reason why that was a formative experience is that it taught me that people in which we put our trust can be assholes who ruin people's lives because they think some bit of dogmatic bullshit they came up with is clever.

And that's really what the article is about: the author wants to show off how clever they are. I'm okay with that, in general. I remember reading Steve Yegge's blog posts and finding them entertaining, regardless of whether I agreed with them. Thing is, Yegge had a lot more to say than just "look at how clever I am".

comment 11mo ago · link · parent

Now it does. It didn't when the original comment was made.

comment 1y ago · link · parent

The vast majority of users want their apps to work. They don't care whether that happens through automatic updates or not.

It's the developers who don't want the headache of not having automatic updates.

comment 1y ago · link · parent

Would you say cocaine makes those people happy?

comment 1y ago · link · parent

Yes. Most gas stations in the US are self-serve, with screens and buttons next to them. Some are even switching to touch screens. And now some of those screens display ads while you're fueling your car. Hell, some even have sound and it's set at a rather obnoxious volume.

comment 1y ago · link · parent

> You went to university [...]

> by your decision you computed that this decision was worth it

> The only thing that you need to complain about

> you did a wrong calculation

Is that a general "you" or are you replying directly to me? Because if it's the latter, you need to read what I wrote more carefully.

I'm one of those immigrants I wrote about. My education, back where I was born and grew up, was both free and top-notch.

The point of my reply was to explain why "if we eliminated all H1B workers, Americans in the IT industry would be at full employment" is a disturbingly naive idea.

Speaking of disturbing oversimplifications:

> The only thing that you need to complain about is yourself that you did a wrong calculation for such a life-influencing decision of going to college.

If you think that life is as simple as that, you either haven't lived very long or were privileged enough to live in a bubble where things are so cut-and-dried black-and-white.

comment 1y ago · link · parent

> And don’t try to convince me that a Java developer from India possesses skills that our university graduates don’t.

Skills? Not necessarily, but there's something a lot of immigrants possess that your university graduates don't: freedom from the weight of student loans.

I'm not from India, so I can't speak for them. Plus, I imagine that the situation in India changed over the years and it's probably not the same as when this trend started. But I can speak for myself and people I know from many other countries, including China. Most of us have had an education that is on par with a lot of American colleges and universities, but without the crushing cost.

Get rid of all immigrant workers and the industry will collapse, because your graduates need to pay off a huge debt that immigrants don't have.

comment 1y ago · link · parent

This fails to address the question you replied to. When "our code" is memory-safe and "their code" isn't, it's still "Our Product™" that ends up with a CVE that costs us money and reputation, because users don't care about whose code it was.

comment 1y ago · link · parent

> Keep in mind the goal is to teach someone who has zero ideas about datastructures what they are, not to give some analogies to an experienced software engineer.

I agree, which is exactly the problem I have with your objections. If you're teaching data structures to a kid with zero knowledge, you do it gradually, rather than trying to turn them into an experienced software engineer right from the start.

Start with an oversimplification and then build on top of that. The point of an introductory example is to focus on a single concept or a single aspect, and communicate it in a way that is intuitive to someone with no knowledge of it, without overwhelming them or distracting them with additional details. Then, once they've grokked it, challenge them to find flaws in the oversimplification and use that to teach the next concept.

> Ask a kid to draw you a mock recipe, you won't just get a list of steps in return.

Depends on the age. When they're young enough and haven't actually done any serious cooking, kids tend to think that recipes are a series of steps.

Hell, a lot of adults I know, when I ask them something like "how do you make X", start by explaining the steps instead of laying out all the ingredients and their quantities.

This is exactly what I'm talking about when I refer to overwhelming or distracting your students with additional details. You're not trying to build a cookbook app, you're trying to teach someone about a specific data structure.

> Ingredients have quantities attached. If I tell you to make a cake you need sugar, an egg and flour and give you all the steps but no quantities, you're not making a cake. A map is the obvious choice for storing ingredients.

If you're trying to teach sets and your domain of choice is cooking, it makes sense to start with a "list of unique ingredients". You're focusing on uniqueness as a property of sets. Then, once you've explained sets, you can point out that a list of ingredients without quantities isn't very useful, which gives you a great way to introduce maps.

As a bonus, if you've already taught your students about tuples, you can then compare a set of tuples and a map, drawing parallels and pointing out important differences.

> At best it would be somewhat understandable if it said a map can be used for a cookbook, with dish names mapping to recipes, but even this would be a stretch and assume a dish can be made in a single way.

Again, you're thinking like an experienced software engineer. Yes, you can totally assume a dish can be made in a single way if you're teaching kids.

If I'm introducing "string" as a concept for the first time, I won't immediately start explaining the difference between a byte, a Unicode code point, and a glyph.

comment 1y ago · link · parent

My bad, I didn't realize :)

comment 1y ago · link · parent

I don't see any part of my comment where I blamed the kids. I explicitly said that it's a flaw in the way our society approaches education.

comment 1y ago · link · parent

That was pretty much my point. Most kids won't use trig in real life, so making trig more interesting is only half of what we need to do. The other half is making kids more interested in learning.

comment 1y ago · link · parent

Okay, maybe I'm dumb, but I don't get how the first 3 are "simply plain wrong". They're open-ended enough that I have no trouble imagining how you could use those 3 data structures for those 3 purposes, so I must be missing some aspect of what you're trying to say.

comment 1y ago · link · parent

"When do I ever need to use trig in real life" is an interesting question, because it points out certain flaws in the way our society approaches education. One of those flaws is the one you pointed out: the examples we use are not very interesting.

But there's another flaw that gets overlooked most of the time, which is that we're raising kids to believe that "why are you teaching me something that you're not 100% sure I will need in my day-to-day life" is a sensible question, when it really isn't.

Outside of my 2-year stint in the game development industry, I never really needed most of what I learned about trigonometry in my day-to-day life. But that doesn't mean it wasn't useful.

Yes, we should make the subject matter more approachable to kids, but we should also try to shift the paradigm so that kids are more open to learning new things.

comment 1y ago · link · parent

Dependency management should most definitely be one of the main criteria for evaluating how good a build system is. What's misguided is intentionally opting for worse dependency management in an attempt to solve a people problem, i.e. being careless about adding dependencies to your project in circumstances when you should be careful.

comment 1y ago · link · parent

Is it a reference? It doesn't look like something anyone would consistently be reaching for. It looks more like a fun visualization of some core concepts, something you would show people as a cool thing you made.

Even if it was a reference, the same criticism about left-right scrolling would still apply, at least if you're using the combination of resolution and DPI that people like me do. In fact, if it's meant to be a reference, then it's even more important to make it ergonomic.

comment 1y ago · link · parent

I occasionally read about programming when I'm not programming. Some of that reading happens on my phone.

comment 1y ago · link · parent

No, it's not. The key concept here is the reduction of coverage.

The opening part of the post makes certain claims -- "catch bugs before they ship" and "keep our master branch always clean" -- that can only be true if the coverage is not reduced. But, as other replies point out, if the heuristic for test selection has false negatives, the coverage is effectively reduced, which can result in bugs.

That problem can be bad enough when the heuristic is deterministic. AI throws determinism out of the window, which only exacerbates the problem.

comment 1y ago · link · parent

When you press Enter in the search box, Firefox finds the next occurrence of your search pattern. An easy fix that doesn't require an extension is to press Esc first, which closes the search box, and then you can press Enter.

comment 1y ago · link · parent

It's coding, it just isn't professional software engineering.

The first non-toy program I ever wrote was in BASIC, on ZX Spectrum 48, and although I don't have it anymore, I remember it was one of the shittiest, most atrocious examples of spaghetti code that I've ever seen in my life.

Everyone starts somewhere.

comment 1y ago · link · parent

Bingo! Not to mention that "dealing with juniors" is one of the critical ways for a senior engineer to grow.

comment 1y ago · link · parent

> All of my senior, staff, principals love it because we can make something faster than having to deal with a junior because it’s trivial to write the spec/requirement for Claude etc…

How will you make new senior, staff, and principal engineers without "having to deal with a junior"?

comment 1y ago · link · parent

That's interesting and sounds like a hole in my knowledge of history. I'm curious, were those monarchies actually dictatorships? The UK still has a monarch, but it's not a dictatorship.

comment 1y ago · link · parent

> We (Eastern Europeans) could not do neither of those things without risking jail time and we still managed to topple dictatorships.

As someone who was born and grew up in post-Communist Yugoslavia, there are a few things I can offer as an observation here. Please don't take these as a disagreement or a criticism. It's just additional context I would like to offer to everyone who happens to read this.

One is that people are perfectly fine with a dictatorship as long as the life is good enough for the majority. That's why no one toppled Tito, but they got rid of Milošević in the end, after all the wars, sanctions, and bombings.

Another is that all those things that you said Americans can do without risking jail time aren't the things that toppled dictatorships. Don't get me wrong, I'm not saying they're worthless. On the contrary, things like talking to your neighbor, protesting, and sparking dialogues are all indispensable ingredients for overthrowing a dictator, but they're not the endgame. They're just the stepping stones.

Which brings me to my final observation: the only way to overthrow a dictatorship is through a revolution. It doesn't have to be a violent revolution, but it does have to be a revolution and not just a bunch of limited, scattered, uncoordinated protests.

Whether Trump's administration is a dictatorship or not is not something I'm interested in discussing on HN, but the fact remains that the sentiment GP expressed -- that they're "resigned to the fact that there's nothing we as individuals can do about it" -- indicates that the people who are trying to resist the erosion of democracy in the US lack organization and coordination. The things you listed could help them with that, but I don't think that will happen until there's a critical mass of people willing to take risks, and we're still not in the situation where things are bad enough for that to happen.

12345
46