mmpro (@mmpro34) 's Twitter Profile
mmpro

@mmpro34

ID: 1628983551512268800

calendar_today24-02-2023 05:02:08

1,1K Tweet

27 Followers

86 Following

mmpro (@mmpro34) 's Twitter Profile Photo

Java: Python vs. Java✨️ Ever wondered what happens behind the scenes when you run a Python script or a Java program? Let’s find out: Python (CPython Runtime): - Python source code (.py) is compiled into bytecode automatically in memory. - Bytecode can also be cached in .pyc

Java: Python vs. Java✨️

Ever wondered what happens behind the scenes when you run a Python script or a Java program? Let’s find out:

Python (CPython Runtime):

- Python source code (.py) is compiled into bytecode automatically in memory.
- Bytecode can also be cached in .pyc
mmpro (@mmpro34) 's Twitter Profile Photo

Java: Do you know the difference between <?>, <T>, <E>, <K,V> in Java Generics?✨️ <?> is for unknown types, often read-only. <T> is a general type parameter for reusable code. <E> is a type parameter for collection elements. <K,V> are type parameters for maps with keys and

mmpro (@mmpro34) 's Twitter Profile Photo

Java: The Java Memory Model and Garbage Collection: The Java Memory Model (JMM) defines how the Java Virtual Machine (JVM) manages memory, with the heap divided into Young Generation (Eden, Survivor spaces), Old Generation, and Metaspace (for class metadata). Garbage collectors

Java: The Java Memory Model and Garbage Collection:
 
The Java Memory Model (JMM) defines how the Java Virtual Machine (JVM) manages memory, with the heap divided into Young Generation (Eden, Survivor spaces), Old Generation, and Metaspace (for class metadata). Garbage collectors
mmpro (@mmpro34) 's Twitter Profile Photo

Java: Implementing Cross-Cutting Concerns with AOP: Spring Boot with Aspect-Oriented Programming (AOP) enables modular handling of cross-cutting concerns like logging, caching, or transaction management using @Aspect and @Pointcut. The @Aspect annotation defines a class as an

Java: Implementing Cross-Cutting Concerns with AOP:
 
Spring Boot with Aspect-Oriented Programming (AOP) enables modular handling of cross-cutting concerns like logging, caching, or transaction management using @Aspect and @Pointcut. The @Aspect annotation defines a class as an
mmpro (@mmpro34) 's Twitter Profile Photo

Java: Efficient Testing with Spring Boot Test Slices: Spring Boot test slices, like @WebMvcTest and @DataJpaTest, allow isolated testing of specific application layers (e.g., controllers, repositories) without loading the full application context. ->

Java: Efficient Testing with Spring Boot Test Slices:
Spring Boot test slices, like @WebMvcTest and @DataJpaTest, allow isolated testing of specific application layers (e.g., controllers, repositories) without loading the full application context. 
 
-&gt;
mmpro (@mmpro34) 's Twitter Profile Photo

Java: Understanding Annotations Built-in and Custom✨️ Java annotations, like @Override and @Deprecated, provide metadata for code. Custom annotations, defined using @interface, enable developers to add custom metadata. These are processed at compile-time or runtime via

Java: Understanding Annotations Built-in and Custom✨️
Java annotations, like @Override and @Deprecated, provide metadata for code. Custom annotations, defined using @interface, enable developers to add custom metadata. These are processed at compile-time or runtime via
mmpro (@mmpro34) 's Twitter Profile Photo

Dev: 𝗥𝗘𝗦𝗧 𝗔𝗣𝗜 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀 𝗶𝗻 𝟮𝟬𝟮𝟱✨️ I've built 100+ APIs, here's what I learned 👇 Most developers struggle with REST API design. 𝟭. 𝗥𝗘𝗦𝗧 𝗠𝗮𝘁𝘂𝗿𝗶𝘁𝘆 𝗟𝗲𝘃𝗲𝗹𝘀 Level 0: Single endpoint (❌ avoid) Level 1: Multiple resources Level 2:

Dev: 𝗥𝗘𝗦𝗧 𝗔𝗣𝗜 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀 𝗶𝗻 𝟮𝟬𝟮𝟱✨️

I've built 100+ APIs, here's what I learned 👇

Most developers struggle with REST API design.

𝟭. 𝗥𝗘𝗦𝗧 𝗠𝗮𝘁𝘂𝗿𝗶𝘁𝘆 𝗟𝗲𝘃𝗲𝗹𝘀
Level 0: Single endpoint (❌ avoid)
Level 1: Multiple resources
Level 2:
mmpro (@mmpro34) 's Twitter Profile Photo

Java: In Java “creating an object” normally means two steps: one, allocate memory on the heap for the object; two, run instance initialization and the constructor so the object reaches its intended state. new MyClass() does both.✨️ There are a few ways to get an object

Java: In Java “creating an object” normally means two steps: one, allocate memory on the heap for the object; two, run instance initialization and the constructor so the object reaches its intended state. new MyClass() does both.✨️

There are a few ways to get an object
mmpro (@mmpro34) 's Twitter Profile Photo

Java: JPA Entity Lifecycle Management ✨️ New State → Entity created but not persisted Persist Call → EntityManager.persist() invoked Managed State → Entity tracked by persistence context Dirty Checking → Hibernate monitors changes Transaction Commit → Changes flushed

mmpro (@mmpro34) 's Twitter Profile Photo

MS: Many Kubernetes Engineers don’t fully understand Kubernetes autoscaling and how HPA vs VPA vs KEDA work.✨️

MS: Many Kubernetes Engineers don’t fully understand Kubernetes autoscaling and how HPA vs VPA vs KEDA work.✨️
mmpro (@mmpro34) 's Twitter Profile Photo

Design: Load Balancers in System Design ➤ Role of Load Balancers → Distribute incoming traffic across multiple servers → Prevent overload on a single server → Improve availability, scalability, and fault tolerance ➤ Round Robin Load Balancing → Definition: Assigns

Design: Load Balancers in System Design

➤ Role of Load Balancers

→ Distribute incoming traffic across multiple servers
→ Prevent overload on a single server
→ Improve availability, scalability, and fault tolerance

➤ Round Robin Load Balancing

→ Definition: Assigns
mmpro (@mmpro34) 's Twitter Profile Photo

Java: Spring Data Repository Choice ✨️ If it's simple CRUD → CrudRepository If you need pagination → PagingAndSortingRepository If it's complex queries → JpaRepository If it's custom logic → @ Query annotations If it's native SQL → @ Query(nativeQuery = true) If it's