1,196 karma · joined October 10, 2022
Senior Software Architect @ Austrian railways ÖBB
Blog: https://www.fabianzeindl.com/
Also the Startup depends on how much memory you allocate, but much of it is due to verifying class security, a feature that other runtimes don't even have. Or badly used reflection, another feature others don't have.
In any case I really never found it an issue if a server takes 3 seconds to start and I never understood why people complained about Java startup. My guess is they complain about clunky desktop application with a million classes written in it.
Regarding the bytecode: the interpretation and just in time recompilation gives Java sometimes better than native performance.
It also allows you to hook into the code on the fly and transform it with agents. Can native do that?
Which is also the reason why kotlin is so popular there. Using extensions function and concise syntax you can build clutches around this terrible abomination of an SDK.
How exactly do you consider it a big disadvantage?
Especially editor integration works great as opposed to YAML which is so ambiguous that it IntelliJ IDEA constantly breaks indentation during copy and paste.
xmlstarlet is a great tool if you want to query xml on the commandline using xpath or do some xslt transformations.
Similar to jq's utility for processing json.
They are not famous for longterm project management.
And also with fibers/virtual threads (project loom) you can actually have a million threads using blocking hand-off on one machine. So the performance argument is kind of gone.
Agreed. JavaScript was actually my first language after TurboPascal in 1996.
I was also there listening to the first podcasts when node came out.
JavaScript is a very interesting language, especially with it's prototype memory model. And the eventloop apart from the language is interesting as well. And it's no coincidence Apple went as far as baking optimizations for JavaScript primitive operations into the M1 microcode.
But I still think multithreading is best done by using blocking operations.
NIO can be implemented on top of blocking IO as far as I know but not the other way round.
Also, sidenote, I think JavaScript's only real failure is the lack of a canonical module/import system. That error lead to countless re-implementations of buildsystems and tens of thousands of hours wasted debugging.
Async/await was a terrible idea for fixing JavaScript's lack of proper blocked threading that is currently being bolted onto every language. It splits every language and every library-ecosystem in half and will cause pains for many years to come.
Everyone who worked with multi-threading outside of JavaScript knows that using actors/communicating sequential processes is the best way to do multi-threading.
I recently found an explanation for that in Joe Armstrong's thesis. He argues that the only way to understand multi-threaded programs is writing strictly sequential code for every thread and not muddling all the code for all the threads in one place:
"The structure of the program should exactly follow the structure of the problem. Each real world concurrent activity should be mapped onto exactly one concurrent process in our programming language. If there is a 1:1 mapping of the problem onto the program we say that the program is isomorphic to the problem.
It is extremely important that the mapping is exactly 1:1. The reason for this is that it minimizes the conceptual gap between the problem and the solution. If this mapping is not 1:1 the program will quickly degenerate, and become difficult to understand. This degeneration is often observed when non-CO languages ["non concurrency-oriented", looking at you JavaScript!] are used to solve concurrent problems. Often the only way to get the program to work is to force several independent activities to be controlled by the same language thread or process. This leads to a inevitable loss of clarity, and makes the programs subject to complex and irreproducible interference errors." [0]
[0] https://erlang.org/download/armstrong_thesis_2003.pdf
There is also a good rant against async/await by Ron Pressler who implemented project loom in java: https://www.youtube.com/watch?v=oNnITaBseYQ
* Nullsafe typing.
* Nullsafe typing!
* Inline extension functions for existing APIs. These are supremely useful. You can write features like locking and unlocking around a block, or try-with-resources in a one-liner, without compromising performance.
* (Nested) When statements, if-else as expression etc.
* Reified generics. You can actually write: "if (xy is T)" or use T::class
* Nullsafe typing
* Data classes
* Getter/Setter syntax as property and indexing syntax.
* Only unchecked exceptions
Kotlin really is Java 2.0.
So now SCRUM has a feedback cycle that prevents that from happening.
It makes sense for UX and interaction-heavy parts, but not at all for systems and backend programming, which are much harder to divide into a workable backlog.
That is very good advice. I know about a datacenter outage/degradation in a very large company, which all of you know.
A couple of network switches got overloaded. The switches connected the SAN to the VMs, so it caused all kinds of weird problems in different applications.
Why that specific number in your example. That looks like a supermarket price tag. Is that common in the US?
Tangentially related: Android still doesn't get this. Turn on the screen refresh flashes in the developer menu and then look a your static screen and be amazed who often android draws even though nothing changed.
Maybe they should expire comments or remove them alltogether.
"In the libet Experiment, Libet asked subjects when they felt the intention to move, he asked them to watch the second hand of a clock and report its position when they felt that they had felt the conscious will to move.
Libet found that the unconscious brain activity leading up to the conscious decision by the subject to flick their wrist began approximately half a second before the subject consciously felt that they had decided to move."
<--- the bug could be chronostasis. They subjects perception of time is warped when looking at the clock.
Also check out this study which links software quality to deviations in estimation: https://dl.acm.org/doi/10.1145/3524843.3528091
Also read up on branchless programming, lock-free data structures and avoiding heap-allocations.
Maybe Amazon used this to test step functions and lambdas.