Live data from Hacker News

Software development topics I've changed my mind on

chriskiehl.com

1–10 of 788 posts

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

#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 Exceptions are a subset of all Exceptions. To throw them, they must be part of the function's type signature. To call that function, the caller code must make some kind of decision about what to do when that Checked Exception arrives. [0] It's basically another return type for the method, married with the conventions and flow-control features of Exceptions.

[0] Ex: Let it bubble up unimpeded, adding it to your own function signature; catch it and wrap it in your own exception with a type more appropriate to the layer of abstraction; catch it and log it; catch it and ignore it... Alas, many caught it and wrapped it in a generic RuntimeException.

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

#3
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?

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

#4
> ORMs are the devil in all languages and all implementations. Just write the damn SQL

This week wrote an article on this, since I found there's a lot to explain wrt this topic:

https://dev.to/cies/the-case-against-orms-5bh4

On HN:

https://news.ycombinator.com/item?id=42922014

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

#6
> Gradual, dependently typed languages are the future

I really interested why the author thinks this.

I've seen the general sentiment wrt "the future" go from C to C++ to Java to Ruby to JS (also server-side) and Python.

My own sentiment went from Ruby to Haskell to, well, Kotlin I guess...

I looked into Idris (dependently typed), but did not think it would fit the Overton window[1], to be a reasonable expectation for the future.

1: https://en.wikipedia.org/wiki/Overton_window

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

#7
> People who stress over code style, linting rules, or other minutia remain insane weirdos to me. Focus on more important things.

I just want to set up a linter that’s standard for the language and let CI deal with it. Anything other than that is mental to me.

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

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

It was botched from the start because there's so many opportunities for unchecked exceptions as well. Without a more sophisticated type system that represented nullability, you can get NullPointerException anywhere. Divide by zero. And so on.

You also have a problem similar to "monads and logging": if you want to log from anywhere in your program, your logging function needs to be exception-tight and deal with all the possible problems such as running out of disk space, otherwise you have to add those everywhere.

Post reply on HN