Live data from Hacker News

Software development topics I've changed my mind on

chriskiehl.com

181–190 of 788 posts

Re: Software development topics I've changed my mind on

#181
post #2

> Java is a great language because it's boring [...] Types are assertions we make about the world This is less of a mind-was-changed case and more just controversial, but... Checked Exceptions were a fundamentally good idea. They just needed some syntactic sugar to help redirect certain developers into less self-destructive ways of procrastinating on proper error handling. In brief for non-Java folks: Checked Excepti…

remind me why they don’t work? because “throws Exception” propagates virally to every method in the codebase?

Because you can't capture the evaluation of a function as a value, or write the type of it. E.g. try to write a generic function that takes a list and a callback, and applies the callback to every element of the list. Now what happens if your callback throws a checked exception? It doesn't work and there's no way to make it work, you just have to write another overload of your function and copy/paste your code. Now what happens if your callback throws two checked exceptions? It doesn't work and there's no way to make it work, you just have to write another overload of your function and copy/paste your code. And you'll never guess what happens if your callback throws three checked exceptions!

Re: Software development topics I've changed my mind on

#182
post #83

> People who stress over code style, lining You can do it whatever way you want but match the style of the project. I've worked on too many projects where someone decides their way is best and you end up with a mix of everything. If you want to change the code style, okay, but change it everywhere and don't forget to test everything you've changed. > Frontend development is a nightmare But is it weird I kind of enjoy…

Code style is one thing - formatting that is - but there's others like how features are implemented tend to change over time and with different developers as well, which is difficult to automatically test and hard to keep in line except with good code reviews, but for that to work you already need to install a culture of consistency, which also means that innovation may be stifled and developers demotivated (e.g. because the better solution requires the 100 existing solutions to be rewritten, which is too expensive or requires a whole team to be blocked until it's done).

Consistency trumps a lot of things IMO, but not everyone is on board with that... myself included, I'm guilty of breaking with my own consistency all the time.

Re: Software development topics I've changed my mind on

#183
post #127

One more that has opened my eyes recently: Good, empathetic UI design is invaluable . Get a professional UI designer. Engineers are (in the main) appalling at it and will cost you time and sales.

In my experience, finding an actually good UI designer is hard.

Obviously they exist, but I don't know how to find them. It seems many — if not most — professional UI designers don't even understand that form inputs need labels.

Got any tips?

Re: Software development topics I've changed my mind on

#184
post #163
post #22

> Most won't care about the craft. Cherish the ones that do, meet the rest where they are > (…) > People who stress over code style, linting rules, or other minutia remain insane weirdos to me. Focus on more important things. What you call “stressing over minutiae” others might call “caring for the craft”. Revered artisans are precisely the ones who care for the details. “Stressing” is your value judgement, not neces…

If you want to compare to artisans - they were stressing about details that customers see, details that customers don’t see were to cut corners on. Making fuss about indentation in code file is not artisanal. It is insane weirdo if we are charitable and if not clueless and childish.

Everyone wants a particular style. Except when they have to use someone elses style.

Pick a style stick with it. Review it every 6 months to year to see if anything needs to be tweaked.

If you hear 'we are professionals' you are about to see code that has 20 different styles and design patterns.

I worked with one guy who could not make up his mind and changed the whole style guide about every 2-3 weeks. It royal made him mad the original style guide fit on a couple of postit notes. Me and two other engineers bashed it out in a 1-2 hour meeting at the start of the project (odd number of people to vote on anything). It came down to the fact he came in after the fact and had no say in it. Then proceeded to change everything. One week it was tabs everywhere then spaces then tabs again. One day camel case, week later all lower, another partial hungarian, upper on random things, etc. Waste of time.

Re: Software development topics I've changed my mind on

#185

No, objects aren't generally 'good', unless you think keeping multiple state machines in sync is 'good'. OO is not evil, but it also shouldn't be your default solution to everything. Also, who is this person? I immediately distrust someone who calls themselves 'a pretty cool guy'. That's for the rest of us to decide.

The way I like to use OO (usually not real OO, but rather class-based languages) is to minimize its mutable state. Often mutability is merely a lack of using builder patterns. Some state can be useful as long as it's easy and makes sense to globally reset or control. It's like writing a process as a construction of monads before any data is passed into it. Similarly a tree of processing objects can be assembled before running it on the input.

Re: Software development topics I've changed my mind on

#186
> Most programming should be done long before a single line of code is written

This is the only point I strongly disagree with. I have been doing this for twenty years now and every time we've gone into something with a STRONG plan for how it's going to be built, it's ended up an inflexible nightmare when we inevitably end up having to work around things that were not considered in the design phase.

The plan always ends up bumping into unforeseen realities, and you end up with sunk cost around the planning so instead of pivoting you keep on suboptimal course.

You can spend months planning the smallest feature and there will always be something you did not consider.

Rapid prototyping in my experience is the way. Throw something together that works, see how it can be improved, don't be afraid to throw the entire thing out.

Re: Software development topics I've changed my mind on

#187
> You literally cannot add too many comments to test code (I challenge anyone to try)

I think it is possible, depending how you write them. If you write long comments interspersed with the code, you have a lot of scrolling to do follow the control-flow. Long block comments should go at the top to "set the stage", and then lightly interspersed comments throughout to remind of the specific steps, where necessary.

> Very few abstractions exist in general application development. Just write the code you need

I think they exist, but they're either not well known or are hard to engineer because of missing context; good abstractions are just hard. Solve the immediate problem and you'll maybe, eventually converge on the abstraction and you'll have your "aha!" moment.

Re: Software development topics I've changed my mind on

#188
post #168

>Frontend development is a nightmare world of Kafkaesque awfulness I no longer enjoy As a backend/systems engineer I recently had to look at a React + Typescript + MobX app from 2019/2020. It is true that that some things, especially the webpack config and Typescript loading, were outdated but the overall design and architecture of the app was still understandable and modern. With some help from ChatGPT it took very…

it's the best comment in the entire post IMHO and made me LOL

Re: Software development topics I've changed my mind on

#189
post #26

Earlier quoted context omitted.

Maybe say it less but it explain it more. I don't get it at all.

Let me try to explain it a bit more. From my experience, functional programmers come in two flavors. The ones who constantly nag others by telling them "everything you do is wrong", and "hey, come here, I want to show you something!". Unfortunately, the first camp is way more dominant than others. Again, from the same article, there's observation "People who care about the craft are rare. Cherish the who cares, meet…

Really? You think most functional programmers are arrogant?

Have you considered that your position is lazy, and that actually you have the problem?

Re: Software development topics I've changed my mind on

#190
Hard to have any kind of productive discussion when it's just a set of claims without rationales. I agree with some and disagree with some (RDBMSes are overrated and solve the wrong problem; ORMs are a useful tool and bypassing the ORM because you want to use your l33t SQL skillz is the devil; programming should be done by writing lots of code from the earliest stage on (and throwing most of it away)).
Post reply on HN