Merge VS Rebase
Si eres programador junior y cada vez que ves esa decisión en Git copias el comando y cruzas los dedos, este hilo es para ti.
Te explico cuándo usar cada uno de forma muy fácil 🧵👇
"¿Mensajes que parecen otro idioma?😅
Toma una foto o comparte tu pantalla con Gemini Live y dile:
“Gemini, ayúdame a traducir lo que quiso decir mi hija en este mensaje”
Comenta Gemini + lo más raro que te haya escrito tu hijo alguna vez."
50 acrónimos y términos técnicos que cualquier programador debería conocer.
De SPA a CI/CD pasando por SOLID y TDD.
Los vas a ver en PRs, reuniones y documentación.
Guárdalo. Te vas a cruzar con todos:
Artículo para aprender Clean Architecture con ejemplos.
✓ Casos de Uso, Servicios, Repositorios...
✓ Entiende las capas de la arquitectura
✓ Sin usar clases, sólo funciones
✓ Con TypeScript
https://t.co/1YhLHbfruJ
How Java's JVM Executes Bytecode
You write Java source code in a .java file.
The Java compiler (javac) translates your code into platform-independent bytecode, stored in .class files.
The Java Virtual Machine (JVM) then loads these bytecode files into memory for execution.
At runtime:
→ The Class Loader loads bytecode into the JVM and ensures classes are available when needed.
→ The Bytecode Verifier checks the code for security and type safety before execution.
→ The Interpreter starts executing bytecode instructions line by line.
→ The Just-In-Time (JIT) Compiler identifies frequently executed code (hotspots) and compiles them into optimized machine code for faster performance.
→ The Garbage Collector (GC) automatically manages memory by removing unused objects from the heap.
→ The Runtime Environment provides essential libraries, thread management, and exception handling for smooth execution.
The result: your Java program runs efficiently across all platforms using the JVM, combining portability with runtime optimization and automatic memory management.
Want to go deeper? Check out this ebook:
Mastering Java: From Fundamentals to Advanced Concepts
https://t.co/xQ68nAYOGl
API Endpoint Structure
1. Overview
→ An API endpoint is a specific URL where a client interacts with the server.
→ Each endpoint represents a resource, such as users, products, or orders.
→ A well-structured endpoint follows logical and predictable naming conventions.
2. Basic Structure
→ General format:
https://t.co/jnnCs5jWI6
→ Example:
https://t.co/zASfFyKc5g
→ Components:
✓ Protocol: `https` ensures secure communication.
✓ Domain: Identifies the API’s host.
✓ Resource Path: Defines which data or functionality the client is accessing.
3. Resource Naming Conventions
→ Use nouns instead of verbs.
✓ Correct: `/users`, `/products`, `/orders`
✓ Avoid: `/getUsers`, `/createUser`
→ Use plural nouns for collections.
✓ `/users` for all users
✓ `/users/{id}` for a specific user
→ Keep lowercase letters and separate words with hyphens.
✓ `/user-profiles` instead of `/userProfiles`
4. CRUD Operations Example
→ `GET /users` → Retrieve all users
→ `GET /users/{id}` → Retrieve a specific user
→ `POST /users` → Create a new user
→ `PUT /users/{id}` → Update user information
→ `DELETE /users/{id}` → Delete a user
5. Nested Resources
→ Represent relationships between entities using subpaths.
✓ Example:
GET /users/{id}/orders
→ Meaning: Retrieve all orders for a specific user.
6. Query Parameters
→ Use query parameters for filtering, sorting, and pagination.
✓ Example:
GET /products?category=electronics&sort=price&page=2
→ Common uses:
✓ `filter` → Limit results by condition
✓ `sort` → Order data by attribute
✓ `page` and `limit` → Handle pagination
7. Versioning
→ Include versioning to manage API updates.
✓ Example:
https://t.co/DOl7Qu0XLb
→ Ensures backward compatibility for clients using older API versions.
8. Response Format
→ Use consistent data representation (commonly JSON).
→ Example response:
json
{
"id": 101,
"name": "John Doe",
"email": "[email protected]"
}
9. Tip
✓ Endpoints represent resources using predictable structures.
✓ Follow consistent naming and HTTP methods.
✓ Use query parameters for filtering and pagination.
✓ Version your API to support long-term maintenance.
Grab this Ebook to Master APIs: https://t.co/NDhPt2nklK
6 Software architecture patterns you should know.
Choosing the right architecture isn’t about following trends.
It’s about aligning with your application’s needs, your team’s expertise, and long-term scalability and maintainability.
And it's one of the biggest decisions you'll make for your application.
1) Monolithic
2) Modular monolith
3) Microservices
4) Domain-driven design
5) Serverless architecture
6) Event-driven architecture
These are some of the most important architectures.
But there are many more.
What else would you include?
PS: To help with this critical area of system design, we created the Architecture Patterns Playbook.
It's complete with visuals, tradeoffs, real-world examples, and more. And it's free for our readers.
Grab your copy here (for free): https://t.co/lijgOufs4l
--
🔖 Save for later • ♻️ Repost to help others
🙋🏻♀️ Follow Nikki Siapno • Turn on notifications 🔔
𝗪𝗵𝗮𝘁 𝗮𝗿𝗲 𝘁𝗵𝗲 𝗸𝗲𝘆 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲𝘀 𝗼𝗳 𝗵𝗶𝗴𝗵-𝗾𝘂𝗮𝗹𝗶𝘁𝘆 𝗰𝗼𝗱𝗲
𝗦𝗢𝗟𝗜𝗗 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲𝘀 are a cornerstone of object-oriented programming that guide developers in creating maintainable, scalable, and robust software architectures.
They were introduced by Robert C. Martin (Uncle Bob), though they were influenced by earlier work.
Here is the list:
𝟭. 𝗦𝗶𝗻𝗴𝗹𝗲 𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗶𝗯𝗶𝗹𝗶𝘁𝘆 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗦𝗥𝗣)
Each class should have a single focus or responsibility, making the system modular and easier to manage. This means a class should have only one reason to change.
When a class encapsulates a single responsibility, changes to the specification are likely to affect fewer components, making maintenance simpler. It also reduces coupling between different components.
For example, we can create a 𝚄𝚜𝚎𝚛𝙼𝚊𝚗𝚊𝚐𝚎𝚛 class to handle user-related operations, including authentication, database interactions, and email notifications. If we change, e.g., the e-mail notification logic, it could affect other areas, such as user authentication. Such classes are sometimes called God classes.
𝟮. 𝗢𝗽𝗲𝗻/𝗖𝗹𝗼𝘀𝗲𝗱 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗢𝗖𝗣)
Software entities (classes, methods, etc.) should be open to extension but closed to modification, promoting stability and extensibility. This means you can add a new functionality to a class without changing its existing code.
𝟯. 𝗟𝗶𝘀𝗸𝗼𝘃 𝗦𝘂𝗯𝘀𝘁𝗶𝘁𝘂𝘁𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗟𝗦𝗣)
Subtypes should be substitutable for their base types, ensuring seamless integration and robustness. This means that if a class inherits from another class, you should be able to use it in the same way as the base class.
𝟰. 𝗜𝗻𝘁𝗲𝗿𝗳𝗮𝗰𝗲 𝗦𝗲𝗴𝗿𝗲𝗴𝗮𝘁𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗜𝗦𝗣)
A class should not be forced to implement interfaces it does not use. This means creating specific interfaces for each class rather than a single, all-encompassing one.
𝟱. 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗜𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗗𝗜𝗣)
High-level modules should not depend on low-level ones; both should depend on abstractions, encouraging a decoupled architecture. Also, abstractions should not rely on details; details should depend on abstractions.
We should also note that these rules should not be followed blindly. We should know the rules so we know when to break them.
15 ways to learn Java:
1. Read: The Official Java Developer Tutorials and Training from Oracle - https://t.co/wmGvAXDtmD
2. Code: Use Exercism’s Java Track - https://t.co/LcVrenf92g
3. Read: Learning Java: An Introduction to Real-World Programming with Java - https://t.co/geYwbp4eLb
4. Build Projects: Build some real-world applications in Java - https://t.co/KpYrmkmXca
5. Read Code: Explore the Java solutions to the Coding Challenges - https://t.co/Wy7NuVv643
6. Read: Learn Java with Projects: A concise practical guide to learning everything a Java professional really needs to know - https://t.co/UI3UjrjCso
7. Read: Java in a Nutshell - https://t.co/fLIuB4bLG8
8. Read: Java Concurrency in Practice - https://t.co/zOg0dmVfch
9. Read: Java Performance 2e: In-depth Advice for Tuning and Programming Java 8, 11, and Beyond - https://t.co/fZixFshmJF
10. Read: Java Cookbook, 4e: Problems and Solutions for Java Developers - https://t.co/jMNaKzAzLq
11. Watch: Intro to Java Programming - Course for Absolute Beginners by freeCodeCamp - https://t.co/WCaV9m5rNg
12. Read: The JDK Documentation - https://t.co/ce2kiedUrC
13. Course: Object Oriented Programming in Java Specialization - https://t.co/cDBHJgCldw
14. Course: Java Programming: Solving Problems with Software - https://t.co/ByIsVfSTXo
15. Courses: JetBrains Academy Java Tutorials - https://t.co/47LNlNUz87