I’m a staff software engineer at Sunrun, the USA’s largest residential solar installer.

I mostly work with kotlin, but also java, python, ruby, javascript, typescript. My hobby is picking up new hobbies. Currently bird photography and camping.

  • 2 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: June 6th, 2023

help-circle

  • Anything but the last one. Don’t duplicate the http code in the body, else you’re now maintaining something you don’t need to maintain.

    I’m not a fan of codes that repeat information in the body either, but I think if you had used a different example like “INVALID_BLAH” or something then the message covered what was invalid, then it would be fine. Like someone else said, the error data should be in an object as well, so that you don’t have to use polymorphism to figure out whether it’s an error or not. That also allows partially complete responses, e.g. data returns, along with an error.








  • It’s also just a huge fallacy. He’s saying that people just choose to not write memory safe code, not that writing memory safe code in C/C++ is almost impossible. Just look at NASA’s manual for writing safe C++ code. It’s insanity. No one except them can write code that’s safe and they’ve stripped out half the language to do so. No matter how hard you try, you’re going to let memory bugs through with C/C++, while Rust and other memory safe languages have all but nullified a lot of that.







  • Really weird to compare to Python and C/++ when Java’s closest competitors are definitely C# and Kotlin. If you were to rewrite that list comparing Kotlin and Java it would literally be nothing in favor of Java and all the same benefits for Kotlin plus more safety features. Honestly the whole article seemed forced, like @balder1993 said below. The part about java having ‘functional programming’ is also a laugh. It’s all based on interfaces, and you have to use terminal operations to do anything on a stream, it’s terrible design.