Live data from Hacker News

Confessions of a Software Developer: No More Self-Censorship

kerrick.blog

271–280 of 372 posts

Re: Confessions of a Software Developer: No More Self-Censorship

#271
post #7

My knowledge-gap confession: even after many years with the languages, I can't write a main() in Python or Java without looking up the format.

LLMs are wonderful for this. I can't write hardly a line of shell script without looking something up. And then there are three different ways to do so I spend time beard-tugging as to which way to do it. Now I just tell the LLM what I want changed about this shell script and look at what it comes up with. 100% of the time it's fine.

Lol! This is probably my sneaky number one productivity benefit from LLMs, I would never want to go back to writing shell scripts pre-llm. So many hours wasted debugging and deciphering stack overflow over the years, dropping &,$, [[]], “”,|, in different places hoping to get my .shitty scripts working. Like conceptually I understand shell scripting very well, but anyone nobody can argue that bash isn’t footgun central.

Re: Confessions of a Software Developer: No More Self-Censorship

#272
post #34

Earlier quoted context omitted.

All the confessions are highly subjective. If someone tried a refactor like the one at https://refactoring.com/catalog/replaceConditionalWithPolymo... there is a decent chance it should get picked up and reverted on code review. Taking a switch statement and spreading it out over 3x classes is not a general improvement, it is very context specific. It makes the code difficult to navigate because what used to all be i…

It's not as subjective as it is more of a case by case decision. This example is quite misleading but polymorphic classes are sometimes useful when the domain grows, when you have have to update new behaviors all the time.. In that case then the switch becomes harder to maintain. Classes isolate behavior so new types don't modify existing code. I'd stick with switch statements in all the other cases. Sure, this could…

Yeah, the problem is when people create extra classes just to avoid the switch statement.

Re: Confessions of a Software Developer: No More Self-Censorship

#273

I'm retired for health reasons. When I was working, I hated dealing with 2 overlapping categories of people: 0. anti-excellence: 0.a. slobs/jerks who didn't care about system or code entropy, or the effects of their carelessness on other developers, users, or other stakeholders 0.b. uncurious people who lacked knowledge and didn't care about learning because it was "just a job to them" 1. "competitive" egotists who s…

[deleted]

Re: Confessions of a Software Developer: No More Self-Censorship

#274

Earlier quoted context omitted.

I have encountered people who are scared to post in large public channels. Part of growing up in chatrooms was an implicit bravery of saying something out loud in a room full of thousands of people. There seems to have been a shift, somewhat, in the comfort level of different generations about saying things "out loud" in large public rooms. Chatrooms have evolved in a really interesting way. I think the first generat…

The "water-cooler" chats are in the same place/app as the more important conversations. I don't like getting pinged constantly for people just chatting, but I wouldn't want to mute it in case someone actually has something urgent to say. It's weird to have that all in one place with one set of notification settings on all of it.

notification sounds destroy my ability to concentrate so per-channel notification settings were a game changer.

I typically have busy but important channels muted with a carve out for @mentions, watercooler channels are just muted but I check on them a few times a day.

Re: Confessions of a Software Developer: No More Self-Censorship

#275
post #85

Earlier quoted context omitted.

Awfully nice, isn't it? You get all the privileges of being a remote worker, while "confessing" that remote work sucks to upper management who read your blog, giving them justification to deny other people the same opportunity you have. If you genuinely believe remote work sucks, you should own up to it, sell your property, and move to a city rather than reaping the benefits of it to the extent of your entire life be…

> giving them justification to deny other people the same opportunity you have I don't fear they'll deny others the opportunity for remote work. The company is "headquartered" in California, but I don't know if they even lease an office anymore. The CTO lives in the upper midwest, the architect lives on the east coast, my manager lives along the Mississippi River, and I live in the Ozarks. > enjoy the benefits more t…

Pretty sure that the comment "upper management who reads your blog" wasn't discussing your upper management.

Would upper management from other companies read your blog?

Sure, maybe not organically, but certainly via a google search, looking for support for motivated reasoning for why all the plebs should be brought back to the office.

> Yes. I'm sorry, I thought I made that clear in the post.

Maybe for someone doing a close read. Honestly, with the discussion about the cost and the mortgage, it reads more like you are stuck there.

Re: Confessions of a Software Developer: No More Self-Censorship

#276
post #27
post #17

> Remote work sucks Work sucks in general. Remote work is of course not perfect, but its problems need to be compared against non-remote work problems..

Remote work isn’t for everyone. Their point of view is just as valid as your point of view. And this is my biggest complaint about arguments about remote working. People turn it into something that’s evidence-based when actually it’s a deeply subjective topic and thus different personality types thrive in different working environments.

[deleted]

Re: Confessions of a Software Developer: No More Self-Censorship

#277

> software development is better when you breathe the same air as the folks you work with Ever heard of flu season? What if you have a family and don't want to bring diseases home? > Attempts to represent ideas spatially get mutilated by online whiteboard and sticky note software. Right... like, the Linux kernel team? Or any of the major open source key pieces of technology you use? Built by large teams that worked r…

[deleted]

Re: Confessions of a Software Developer: No More Self-Censorship

#278
post #163

> Remote work eliminates a lot of problems with office work: commutes, inefficient use of real estate, and land value distortion. But software development is better when you breathe the same air as the folks you work with. Even with a camera-on policy, video calls are a low-bandwidth medium. You lose ambient awareness of coworkers’ problems, and asking for help is a bigger burden. Pair programming is less fruitful. A…

[deleted]

Re: Confessions of a Software Developer: No More Self-Censorship

#279
post #168

Earlier quoted context omitted.

That blog post is a poor example. It replaced a simple straightforward if-else loop with a hard to understand abstraction spaghetti. A few unit tests and you'd be well on your way to shipping rather than messing around with beautiful patterns.

Obviously, because it was a fictional, simplified example for the post. My real use case was more complicated and involved multiple developers working on different parts of that flow. The problem with if-else chains is it's easy for a programmer to forget to handle a case that another developer added in the called component. Unit tests can't help a spec miscommunication. But, visitor pattern can as it forces the hand…

As a "half way" point, modern (21+) java brings pattern matching switch statements to the language, but you'd probably construct the F# version in Java using a sealed "marker" interface. Something like

    sealed interface Result permits ValidationError, SearchQuery, UserProfile {}
Along with the specific implementations of those ValidationError, SearchQuery and UserProfile classes and then a switch statement like:

    Result res = db.query(input);
    return switch(res) {
      case ValidationError ve -> context.renderError(ve);
      case SearchQuery sq -> context.redirect("Search", Map.of("q", sq));
      case UserProfile up -> context.redirect("Profile", Map.of("user", up));
    };
The sealed interface gives you compile time checks that your switch statement is exhaustive wherever you use it.

Before that pattern matching, I might have used a Function instead in the Result interface. This is off the top of my head without the benefit of an IDE telling me if I've done a stupid with the generics and type erasure but something like:

    interface Result {
      public R handleWithContext(Context c);
    }

    class ValidationError {
      public RenderedError handleWithContext(Context c) {
        return c.renderError(this);
      }
    }

    class SearchQuery {
      public Redirect handleWithContext(Context c) {
        return c.redirect("Search", Map.of("q", this);
      }
    }
etc. In either case though I think you're right that an empty interface is something that should be examined closer.

Re: Confessions of a Software Developer: No More Self-Censorship

#280
post #271

Earlier quoted context omitted.

LLMs are wonderful for this. I can't write hardly a line of shell script without looking something up. And then there are three different ways to do so I spend time beard-tugging as to which way to do it. Now I just tell the LLM what I want changed about this shell script and look at what it comes up with. 100% of the time it's fine.

Lol! This is probably my sneaky number one productivity benefit from LLMs, I would never want to go back to writing shell scripts pre-llm. So many hours wasted debugging and deciphering stack overflow over the years, dropping &,$, [[]], “”,|, in different places hoping to get my .shitty scripts working. Like conceptually I understand shell scripting very well, but anyone nobody can argue that bash isn’t footgun centr…

what
Post reply on HN