From .NET Core Bliss to Java Spring Boot Stress: A Roast Served Hot

Muhamad Zulfa Assyfa
4 min readNov 23, 2024

--

Ah, Java. The programming language equivalent of your strict high school principal — old-fashioned, strict, and somehow still running the show. But if you’re coming from the paradise that is .NET Core, diving back into Java Spring Boot feels like trading your comfy gaming chair for a wooden stool with splinters. Let me walk you through my love-hate relationship with Java, spiced up with some brutally honest roasting.\“Java is good for beginners,” said my lying professor

Let’s start with the biggest betrayal of my life. Back in college, my professor stood there, all confident, saying:
“Java is good for beginners. It’s straightforward, and you’ll love it.”

ME: “Wow, thanks, Professor! I can already see myself building cool apps!”
REALITY: “Surprise, nerd! You’re going to spend half your career deciphering error logs and begging Spring to just run.”

Here’s the bait they fed us back in school:
What They Showed Us (a.k.a. Java Heaven):

public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

Ten lines of code, a single file, and boom — you’re a “programmer.” That little dopamine hit of running a Hello, World! program was enough to hook me. Little did I know that once you enter the Java jungle, there’s no turning back.

What I Face Now (a.k.a. Java Hell):

@RestController
@RequestMapping("/api/v1/users")
public class UserController {

private final UserService userService;

@Autowired
public UserController(UserService userService) {
this.userService = userService;
}

@GetMapping
public ResponseEntity<List<User>> getAllUsers() {
return ResponseEntity.ok(userService.getAllUsers());
}
}

That’s not even half the story. Behind this “simple” endpoint are:

  • A service layer.
  • A repository layer.
  • A User entity class.
  • A database configuration file.
  • AND a mapper, because apparently, Java wants us to manually convert objects like it’s 2005.

LINQ vs. JPQL: Let’s Cry Together

In .NET Core, data queries are as smooth as butter. You grab LINQ, whisper your query in English, and boom — it works. LINQ is your coding bestie who’s always got your back.

LINQ Example (a Hug in Code):

var activeUsers = dbContext.Users
.Where(u => u.IsActive)
.OrderBy(u => u.Name)
.ToList();

Done. It’s clean, beautiful, and makes you feel like a genius.

Now, Java? Oh, Java doesn’t just want you to work — it wants you to suffer.
Meet JPQL: the evil twin of LINQ who’s never heard of chill.

JPQL Example (a Slap in the Face):

@Query("SELECT u FROM User u WHERE u.isActive = true ORDER BY u.name ASC")
List<User> findActiveUsers();

Wait, you’re not done. You’ll also need:

  1. A repository interface.
  2. An entity class with 12 annotations.
  3. A database connection file that breaks if you forget to include spring.datasource.hikari.pool-name.

JPQL isn’t just a query language — it’s a workout plan for your patience.

Dependency Injection: Java’s Obsession with Annotations

.NET Core’s dependency injection is like a supportive friend. You say, “Hey, I need this,” and it’s like, “No problem, I got you.”

.NET Core DI Example:

services.AddScoped<IUserService, UserService>();

Java Spring Boot, on the other hand, is that one friend who won’t stop asking “Why?”

Java DI Example:

@Service
public class UserService {
private final UserRepository userRepository;

@Autowired
public UserService(UserRepository userRepository) {
this.userRepository = userRepository;
}
}

Java forces you to slap annotations on every single thing. @Autowired, @Service, @Component, @Repository, @Bean — by the time you’re done, your code looks like it belongs in a museum of modern art.

So, Why Do We Stick With Java?

Now you’re probably wondering, “If Java is so bad, why are you still using it?” Two words: money, honey.

Java is like that toxic ex you can’t quit because they’re loaded. Banks, Fortune 500 companies, and government systems all run on Java. And when they say, “Hey, we need this app to be rock-solid and survive the apocalypse,” you know they’re bringing bags of cash with them.

.NET Core is the tech darling of startups and small businesses, but Java? Java is for the big leagues. You’re not just writing code; you’re building systems that handle billions of transactions while screaming, “I AM ENTERPRISE!”

The Love-Hate Relationship

Here’s the thing: Java frustrates me. It makes me question my life choices. It makes me Google “how to deal with Spring Boot errors without crying.” But it also forces me to level up. And when you finally ship a production-ready Java app, it’s like climbing Mount Everest — painful, exhausting, but undeniably satisfying.

Plus, when that paycheck hits, it’s hard to stay mad at Java. It may be verbose, annoying, and stuck in the early 2000s, but it’s also the reason I can afford overpriced lattes.

Final Thoughts

To all the professors out there still saying, “Java is good for beginners,” I have one thing to say: Stop lying to these kids. You’re setting them up for a world of hurt. Java isn’t beginner-friendly; it’s a hazing ritual.

But hey, it’s also the language that runs the world — and the one that pays my rent. So here’s to Java: the most infuriating, rewarding, and lucrative programming language out there. Cheers to the grind. 🥂

--

--

Muhamad Zulfa Assyfa
Muhamad Zulfa Assyfa

Written by Muhamad Zulfa Assyfa

I write these for myself || self-upgrade on progress..

No responses yet