Live data from Hacker News

Software development topics I've changed my mind on

chriskiehl.com

261–270 of 788 posts

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

#261
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…

> They just needed some syntactic sugar to help redirect certain developers into less self-destructive ways of procrastinating on proper error handling. Syntactic sugar it needs is an easy way (like ! prefix) to turn it to a runtime exception. Procrastinating on exceptions is usually the correct thing to do in your typical business application - crash the current business transaction, log the error, return error resp…

How many errors are actually recoverable. I bet most thrown exceptions could be replaced with a printf(“it went wrong here”) for all their utility.

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

#262
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…

Yeah I wonder if his experience is mostly using JavaScript, which is absolutely impossible to maintain at scale. Most of my team comes from primarily backend-dev roles and they've all grown to love TypeScript over Python.

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

#263
post #181

Earlier quoted context omitted.

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 w…

Make the signature of your generic callback "throws Throwable". It's generic; it should never care about the specific types that the callback can throw. (Except that then you have to decide what your generic function is going to do if the callback throws an exception...)

By doing that you lose all the benefits of checked exceptions. If you have checked exceptions everywhere the compiler will tell you when an exception is not handled and in turn you can ensure you handle it.

Of course in general the manual effort to do that in a large code base ends up too hard and so in the real world nobody does that. Still the ideal is good, just the implementation is flawed.

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

#264
post #253

It felt good to read someone who thinks like me, honestly. Also the observation of "The trouble with functional programming is functional programmers" is absolutely correct . This needs to be said more. Way more. P.S.: You can ask why, and I can answer honestly, without hostility.

> The trouble with functional programming is functional programmers > This needs to be said more. Way more. In other words, why stop with an ad-hominem when you can do an ad-nauseam too.

There's a comment down there which I explain why I support this claim, without any attacks, but with citations from experience.

Why not give that one a read, then come again?

Maybe we can discuss, and we can both learn something from it?

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

#266
post #39

Earlier quoted context omitted.

Not really. Obsessing over breaking lines after famous 80 chars in Eclipse was, is and will be idiotic to be polite. Surprisingly large amount of people were obsessed by this long after we got much bigger screens, if that was ever an argument (it wasn't for me). 2 spaces vs 4 spaces or tab. Cases like these were not that rare, even though now it seems better. That's not productive focus of one's (or team's) energy an…

Reporting as an Eclipse user of 20+ years, and a person who cares about the craft: The choice for me is simple: If I'm going to view the code I'm writing in a 80x24 terminal later on, I'll break that lines, and will try really hard to not get closer to 80 chars per line. If that code is only going to be seen in Eclipse and only by me, I won't break that lines. I omitted your other examples for brevity. Having bigger…

I like 80 columns, I can tolerate 100 or 120. I get really annoyed with formatting standards, JS/TS in particular that waste a whole line for a closing brace. Standard aspect has screens more limited vertically than horizontally.

When dealing with tabular data, particularly test data, I find most formatting lacking. I want to be able to specify blocks that align on the decimal point. Especially when dealing with lists of dicts. This makes reading test fixtures much more intuitive than default indentation styles.

Has anyone seen a formatter where you can specify a block be formatted in that manner?

  [{'a':  3.89, 'b':  10},
   {'a': 12.3,  'b': 233}]
instead of

  [{'a': 3.89,
    'b': 10},
   {'a': 12.3,
    'b': 233}]

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

#267

> If I think something is easy, that's a sure sign I don't understand it. A lot of people (definitely here) need to understand this.

This was the one that resonated the most with me. As soon as I start to think "Why don't they just . . . ." I know I'm in for an epiphany.

“Just”(TM)

The bane of my life.

Glad I grew out of that eventually.

I completely agree.

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

#269

> Most programming should be done long before a single line of code is written Nah. I (16+ years developer) prefer to iteratively go between coding and designing. It happens way too often that when you're coding, you stumble across something that makes you go "oh f me, that would NEVER work", which forces you to approach a problem entirely differently. Quite often you also have eureka moments with better solutions th…

I agree coding should start early. The design might look good, but might not be easy to implement, so you need to change the design.

The statement sounds like something out of a book on the waterfall method of software development.

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

#270
post #68
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…

There's another way to look at this: if you consider the school of thought that says that the code is the design, and compilation is the construction process, then stressing over code style is equivalent to stressing over the formatting and conventions of the blueprint (to use a civil engineering metaphor), instead of stressing over load bearing, material costs and utility of the space. I'm fond of saying that anythi…

In many languages, types don't survive the compilation process (e.g. TypeScript, Java). Yet types describe which data structures are used.
Post reply on HN