TypeScript’s “readonly” is weird

Most of my posts on this blog are about Java but in recent years I worked a lot with TypeScript. I think the reason I never wrote about it is that most of the the weirdness comes from EcmaScript, which is so often weird that enough other people have written about it and TypeScript itself is actually quite well done in my opinion.

Continue reading “TypeScript’s “readonly” is weird”

No, ChatGPT can’t replace human programmers

ChatGPT and other bots aren’t even general artificial intelligence. Those who claim they could replace human programmers are wrong or lying.

ChatGPT and other bots aren’t even general artificial intelligence. They don’t understand anything. Some people are now pushing the misconception that the large language models we have now are already AI and can replace human workers.

Continue reading “No, ChatGPT can’t replace human programmers”

It’s about RTFM, not BOMDAS!

Different results can both be correct. This depends on the grammar used to parse the expression. Some handle implied multiplication with higher precedence, others don’t.

There’s this meme on the internet about two calculators (or phone calculator apps) with different results. This is a common misconception and therefore a perfect topic for my blog.

Continue reading “It’s about RTFM, not BOMDAS!”

Is Java easy?

Java isn’t easy. It’s often more complex than needed. But being easy for beginners shouldn’t be a design goal with high priority.

Should a programming language be easy?

I don’t know why so many educational establishments use Java to teach programming. They often start with Java in the first semester. Even the Oracle tutorials expect the reader to already know some basics.  Java was designed for programmers who already know C/C++ as seen in this example.

The main method is similar to the main function in C and C++; it’s the entry point for your application and will subsequently invoke all the other methods required by your program. [Lesson: A Closer Look at the “Hello World!” Application]

Continue reading “Is Java easy?”

Misconceptions about Dates and Time

Was 1900 a leap year and does every minute have 60 seconds?

In Java we have a new API for Date and Time since Java SE 8. Before that, there was already an API with mutable dates and fore some reason there was a date just for SQL.
Many were not happy with the old API. There was Joda-Time, which later became the basis for JSR-310 and is now found in the package “java.time”.

Continue reading “Misconceptions about Dates and Time”