Live data from Hacker News

How Netflix uses Java

infoq.com

151–160 of 205 posts

Re: How Netflix uses Java

#151
post #103

Earlier quoted context omitted.

I never hated Spring, I got used to working with it. I found the annotation-based approach to configuring classes really opaque though, and it was hard to understand how to configure things because those were also magic annotations, and then some things were beans and others weren't and... ugh. I don't fault Spring for it, and we were on Java 11 back then with just a little bit of new hotness. Java itself just didn't…

I'm always interested in hearing people's alternatives. Modern C# and ASP.NET is likewise annotation based. Most contemporary Python frameworks heavily leverage decorators, which is just another name for annotations. Decorators have made their way into Typescript. Rust code is chock full of attributes, and I've even seen Golang libraries simulate annotations with the `reflect` package. This never really sounds like a…

I'm not saying annotations are bad though, I'm saying Spring's over-reliance on them makes the code harder to follow. Some of those annotations are actually done at compile-time via Lombok, which makes it even harder to know what the hell is happening.

Decorators and annotations are essentialy higher-order functions and higher-order classes, but there is nothing about them that makes it intuitive. They actually become quite difficult to write and much harder to debug, OOP's shit version of a monad.

Re: How Netflix uses Java

#152
post #118
post #115

Early on (15+ years ago) I spent a few weeks there on contract and I noticed they used Java EVERYWHERE, and not always well. They had a CS app named after a key Star Wars character that was in all likelihood a breach of the Geneva Convention. A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell.

Evocative description there, bravo

It's so evocative that I don't even care about Netflix or Java anymore.

I just want to know where I can buy a bong ripping sloth [1] and whether they're legal in California.

[1] https://imgur.com/a/S3NVS16

Re: How Netflix uses Java

#153
post #145
post #115

Early on (15+ years ago) I spent a few weeks there on contract and I noticed they used Java EVERYWHERE, and not always well. They had a CS app named after a key Star Wars character that was in all likelihood a breach of the Geneva Convention. A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell.

What does CS stand for here? I guess it's not computer science? Also, that description made me lmao, thanks

Customer service.

Re: How Netflix uses Java

#154

Earlier quoted context omitted.

I implemented a microservice with micronaut starting 3,5 years back. The fragility of krush/exposed is not very fun tho. we introduce another hurdle because we only use Kotlin. I'm open for ideas though. PS: we replaced/will replace all microservices with Go.

Hah, yeah, we have a number of microservices implemented with golang. As 'clunky' as the language can feel sometimes the tooling is first class.

Absolutely! I love how fast it is and how easy it is to write stuff real fast. Not a lot of footguns, except the pointer-for-loop thing afaik. It does feel clunky and quite manual sometimes!

Re: How Netflix uses Java

#155
post #115

Early on (15+ years ago) I spent a few weeks there on contract and I noticed they used Java EVERYWHERE, and not always well. They had a CS app named after a key Star Wars character that was in all likelihood a breach of the Geneva Convention. A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell.

"A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell." Sounds like Apple Music.

I was thinking of Jira

Re: How Netflix uses Java

#156
post #103

Earlier quoted context omitted.

I'm not sure what "no compile time safety in this stack" even means in the context of a strongly-typed compiled language. If you are referring to the dependency injection container making use of reflection, then Spring Native graduated from experimental add-on to part of the core framework some years ago. You can now opt for Quarkus/Micronaut-style static build-time dependency injection, and even AOT compilation to G…

I never hated Spring, I got used to working with it. I found the annotation-based approach to configuring classes really opaque though, and it was hard to understand how to configure things because those were also magic annotations, and then some things were beans and others weren't and... ugh. I don't fault Spring for it, and we were on Java 11 back then with just a little bit of new hotness. Java itself just didn't…

I was once dropped into a Spring codebase. I consider myself a decent programmer, but I couldn't navigate it at all. Other than that time I've been able to avoid magical frameworks in my career.

But I do want to learn Spring. What material would you recommend?

Re: How Netflix uses Java

#157
post #105

Earlier quoted context omitted.

I assume they mean problems with dependency injection. If that's what they mean, I agree. I've seen dependency injection frameworks used in a bunch of different companies, and there are always people who consider it an essential lifesaver, like they just can't imagine working without it, and it always baffles me, because I've worked on equally large codebases that didn't use it, and it was occasionally a significant…

> "...it was occasionally a significant annoyance to pass dependencies by hand..." Your comments are confusing on whether you eschew a dependency injection framework, or eschew dependency injection as a pattern in general. If it's the former, then you are certainly free to roll your own DI rather than leveraging a library such as Spring, Quarkus, Micronaut, Guice, Dagger, or any of the others out there. I strongly do…

I think you're blurring some lines when you present a choice between using a DI framework, rolling your own framework, or not using "dependency injection as a pattern in general." "Dependency injection as a pattern in general" is unavoidable in complex software and undoubtedly a necessary thing in many contexts, whereas dependency injection frameworks are tools that are not necessary for using "dependency injection as a pattern."

My preferred approach to dependency injection is using the plain mechanisms of the language I'm using to pass dependencies as constructor and function parameters, without any framework.

I pass test fakes the same way. When doing things this way feels burdensome due to overly complex method signatures or overly complex initialization code, I look for ways to improve my design.

This works at every scale of code I've worked at. It's possible there's some size of project that it doesn't scale to, but for every project I've worked on where another engineer swore that dependency injection was absolutely necessary on the project, I've worked on a larger project where nobody ever suggested dependency injection and everything was fine.

My experience doesn't prove that dependency injection isn't necessary at some larger scale that I haven't experienced, of course, but it does convince me that the industry is rife with programmers who think they can't get by without it at scales where it is not only unnecessary but probably harmful.

Re: How Netflix uses Java

#158
post #103

Earlier quoted context omitted.

I never hated Spring, I got used to working with it. I found the annotation-based approach to configuring classes really opaque though, and it was hard to understand how to configure things because those were also magic annotations, and then some things were beans and others weren't and... ugh. I don't fault Spring for it, and we were on Java 11 back then with just a little bit of new hotness. Java itself just didn't…

I was once dropped into a Spring codebase. I consider myself a decent programmer, but I couldn't navigate it at all. Other than that time I've been able to avoid magical frameworks in my career. But I do want to learn Spring. What material would you recommend?

Not to be glib or state the obvious but the Spring project has excellent docs: https://docs.spring.io/spring-framework/reference/index.html

Re: How Netflix uses Java

#159

Earlier quoted context omitted.

Hah, yeah, we have a number of microservices implemented with golang. As 'clunky' as the language can feel sometimes the tooling is first class.

Absolutely! I love how fast it is and how easy it is to write stuff real fast. Not a lot of footguns, except the pointer-for-loop thing afaik. It does feel clunky and quite manual sometimes!

The whole language is a footgun..
Post reply on HN