News for hackers. Stuff that matters.
Re:One Year After Switching from Java to Go: Our Experiences by smusamashah on Wednesday February 19, 2025 @04:37AM (#43100330)
At work we work on a Java code base 20 years old and it is written like C. No dependency injection or other Java Web development like shenanigans. Almost every lib etc has been built in-house. It runs an MMO, it's fast. Its just way more productive/faster to work and implement something in the Java codebase than a C++ codebase that we have.

Someone shared a Job posting which asked for "no java experience". It was funny.

Re:One Year After Switching from Java to Go: Our Experiences by theshrike79 on Wednesday February 19, 2025 @06:53AM (#43101098)
It's kinda understandable. I've seen "Java coders" write Python for example.

The first thing they do is create a class and maybe even a Factory or Interface.

You can see instantly where their experience is from and it's hard to unlearn.

Re:One Year After Switching from Java to Go: Our Experiences by kuschku on Wednesday February 19, 2025 @08:02AM (#43101649)
Java developers may write verbose python, but that doesn't compare to the crimes actual python devs commit.

Currently trying to modernize a python project that doesn't use modules, just executable python files that import each other with custom sys.path hackery, which is also used for globals, no type annotations, GLib used for everything including math and string to int parsing.

Re:One Year After Switching from Java to Go: Our Experiences by hlpn on Wednesday February 19, 2025 @08:33AM (#43101965)
Do we work at the same place?
Re:One Year After Switching from Java to Go: Our Experiences by Twirrim on Wednesday February 19, 2025 @08:41AM (#43102040)
People can write bad code in any language
Re:One Year After Switching from Java to Go: Our Experiences by gorjusborg on Wednesday February 19, 2025 @08:50AM (#43102140)
It is almost like language is a conduit for something, I wonder what though. I will have to think on it.
Re:One Year After Switching from Java to Go: Our Experiences by CBLT on Wednesday February 19, 2025 @10:38AM (#43103223)
Hey, sorry, that might have been me. I did that then left the company.

In my defense, I had to hack around a different Python library also manipulating sys.path, which nobody likes except this one dev team in a different timezone. They somehow got a director to declare that I would fix this issue they self-created before they woke up in 8h, and I wasn't allowed to rip out the library. So, ugly sys.path manipulation in the exact way that library wants. Not proud of it, but it sounds like you were given time to engineer an actually correct solution.

Re:One Year After Switching from Java to Go: Our Experiences by kuschku on Thursday February 20, 2025 @05:05AM (#43112986)
The project is an open source project, so it's likely not your fault :)

I can fully see how and why this might have grown historically in ye olden days of python2, but it's not sustainable to continue adding floors ontop of a rotten foundation. Code needs maintenance like anything else, and far too often there's no budget or time available for it. Even if that maintenance would reduce the overall workload.

Re:One Year After Switching from Java to Go: Our Experiences by skapadia on Wednesday February 19, 2025 @09:58AM (#43102781)
That is funny, because I was a Java developer for many years, then Scala for a few years, and these days I mainly write Python, but the last thing I go for is creating a class. That's generally only when a set of functions in a single responsibility module need to share / mutate some state, and it's more self-documenting than passing around dictionaries.
Re:One Year After Switching from Java to Go: Our Experiences by watt on Wednesday February 19, 2025 @05:11AM (#43100514)
If you write Java just like you would write Go - meaning, no reflection shenanigans, use Jigsaw to cut out unneeded JVM stuff, or use GraalVM and compile natively (which you will be able to, because you did not use any of JVM reflection magic), Java will absolutely be competitive.
Re:One Year After Switching from Java to Go: Our Experiences by wvh on Wednesday February 19, 2025 @08:04AM (#43101672)
In the end it all boils down to higher-level logic compiling down to machine code that has to run. A language's culture and philosophical choices are tied to the language itself as much as syntax or compiler, so maybe the largest difference between languages like Java and Go is really the whole developer attitude and aesthetic choices.