Raul Junco Profile picture
I simplify System Design, and System Design will make you a better Software Engineer. System Design • Databases • Algorithms • AI Enthusiast
Nov 1, 2023 7 tweets 3 min read
Code Problems will cause Data Problems.

Even the smallest bugs will result in an unpredictable state for the data.
You validate data in front-ends and back-ends.

Yet, you need database-level constraints.

PRIMARY Key Constraint

This means that the column’s values are both not null and unique as well.

Each table in the database should have a primary key to identify its records.

FOREIGN Key Constraint

This means the column’s values must match those in another table column, which is usually a primary key.

Establishes a relationship between two tables using a column or set of columns.

UNIQUE Constraint

This means that the column cannot have duplicate values across the whole table.

Great for a username or email field on a User's table.

CHECK Constraint

The data must meet a custom expression for acceptance.

For example, if you have a Score percentage column whose values have to be between 0 and 100, you can use a check constraint to enforce that.

NOT NULL Constraint

Ensures that a column does not contain NULL values. The column must have a value for each row.

Define NOT NULL columns when your application assumes the existence of a value.

DEFAULT Constraint

If you don't provide an explicit value, the system assigns a default value to the column.

It is Useful when you want to provide a default value instead of leaving it NULL.

Are you protecting your Data?
Image PRIMARY Key Constraint Image
Aug 11, 2023 5 tweets 3 min read
Finding the data we need is an age-old problem.

But without the right search algorithms, you might be lost in the jungle.

Here are 7 Search Algorithms you need to know!

1. Linear Search: This is the simplest searching algorithm.

Elements are searched one by one in a linear… https://t.co/9aaEbIxQdFtwitter.com/i/web/status/1…



Image
Image
Image
Image
Interpolation Search: https://t.co/RTYYolHbQEtwitter.com/i/web/status/1…
Image
Aug 7, 2023 7 tweets 2 min read
Talking to a Junior developer, I was stunned at how confused he was about 3 primary concepts.

But also remembered nobody explained these concepts back in my college days.

I hope this helps some young engineers out there. Image 1. Hashing: this is a one-way process used for data integrity verification.

It converts input data (plaintext) into a fixed-length string (hash value) using a hash function.

Hashing helps ensure data hasn't been tampered with, but it's irreversible! Image
Aug 5, 2023 8 tweets 3 min read
Everybody who writes tests knows the hard part is getting started.

Here are 5 steps to help you start writing tests like a Real Software Developer. Write Your First Test

Start small and simple! Pick an isolated function—it doesn’t have dependencies, that is.

Set your test framework, and run your first test.

If you can test all the isolated functions, you’ll be a thousand times better off than without any tests. Image
Jul 24, 2023 4 tweets 2 min read
Technical interviews are hard.

5 Do's and Don'ts

Do: Ask questions; the requirements are never complete; clarify them.
Don't: Assume requirements.

Do: Justify your trade-offs. Explain why you left that line there.
Don't: Assume your interviewer understands your solution.

Do:… https://t.co/FrkLnGbukxtwitter.com/i/web/status/1…
Technical interviews are hard, 5 Do's and Don'ts Every week I write about my experiences and challenges as Software Engineer.

Threads break down complex tech into simple terms.

Share if you liked it.
Jul 18, 2023 13 tweets 4 min read
HashMap is a Data Structure every SWE should know.

They provide an efficient way to store and retrieve data by mapping keys to values.

Here are 6 things you need to know about Hashmaps: Image A hashmap is a collection of key-value pairs where each key is unique.

It uses a hashing function to convert the key into an index (hash code) that maps to a location in an underlying array.

In simple terms, they map keys to values. Image
Jul 13, 2023 10 tweets 3 min read
Over the last 6 years, I learned something I’ll never forget:

Frameworks and languages come and go, but the fundamentals always stay with you.

Here are 5 ideas you need to master: Image 1. Problem Decomposition

Breaking down complex problems into manageable parts is the first step.

Techniques like Divide and Conquer have been used since the beginning.

This technique reduces complexity and makes problem-solving more approachable.
Jul 7, 2023 9 tweets 3 min read
Ten years ago, you only needed to know GoF patterns, and you could call yourself a good developer.

That's not true anymore. If you want to build Hight Quality software, you need architectural knowledge.

4 basic architecture to start. N-Layered Architecture

This architecture organizes applications into horizontal layers, each responsible for specific tasks.

- Presentation
- Business logic
- Data access

These layers promote separation of concerns and modularity.
Jul 5, 2023 8 tweets 2 min read
Seasoned developers have a cheat sheet with common problems and their solutions; they secretly call it Design Patterns!

5 Patterns you need to know. Factory Pattern
Object creation can get messy. The Factory pattern comes to the rescue!

It encapsulates object creation logic, providing a central place to create instances.

It promotes loose coupling and allows you to create objects without specifying their concrete classes.
Jun 29, 2023 10 tweets 2 min read
They asked me this question in a nerve-wracking interview, and I did not know the answer.

What's the difference between mutex and semaphore? Mutexes and semaphores are synchronization mechanisms used in concurrent programming.

They are designed to coordinate access to shared resources and protect them from simultaneous access by multiple threads or processes.

However, there are some key differences between the two:
Jun 26, 2023 7 tweets 2 min read
99% of Software developers think simplifying their system is about building less functionality.

They are wrong; making your system simpler is about reducing accidental complexity.

3 techniques to reduce Complexity! Accidental Complexity refers to the unnecessary complexities that occur during the development process but are not inherent to the problem being solved.

What are those?
- Complicated design
- Redundant features
- Convoluted implementation choices

This is how you solve it.
Jun 23, 2023 13 tweets 3 min read
RESTful APIs are the backbone of modern web development.

A CheatSheet For Junior Software Engineers. HTTP Methods/Verbs:

- GET retrieves a resource
- POST creates a new resource
- PUT updates an existing resource
- PATCH updates part of a resource
- DELETE removes a resource
Jun 22, 2023 10 tweets 2 min read
Data management is the core of 99% of software!

And yet people try to use the wrong persistence mechanism to solve the wrong problem.

5 building blocks every software engineer must know to manage data correctly. 1. Databases

It is the simplest way if you need to store data that your application or a different application will read/update/delete later.

There are different flavors; you can pick between:
- SQL
- NoSQL
- NewSQL
- In-memory
- Time-series
- Spatial
- Graph
Jun 20, 2023 10 tweets 2 min read
It’s not the diagramming tool; it’s the visual thinking that matters.

5 diagrams you must know and when to use them. 1. Flow diagrams
They are the starting point for any architect.

They map out the steps in a process or system and provide a high-level view. Useful for identifying bottlenecks and opportunities for improvement.

When? Generally technical, architecture board.
May 10, 2023 11 tweets 3 min read
99% of software engineers need to work with legacy code, and many don't know where to start.

A pattern you need to know to migrate a legacy system to a new architecture. Image Migrating a legacy system to a new architecture is challenging.

If your application is small, maybe you can afford a total replacement.

But in most cases, the best approach is gradual migration, which is when The Strangler Fig pattern comes in handy.
May 8, 2023 12 tweets 3 min read
Even the best documentation will never beat a good prototype.

What is a prototype, and 4 situations when you need to build one? Image A prototype is a preliminary version of a solution.

It can be physical or digital and is developed to:
-Test and validate ideas
-Demonstrate functionality
-Gain feedback before investing significant time and resources into a full-fledged implementation.

When to build one?👇
May 5, 2023 6 tweets 2 min read
Great Software Engineers write less code. Image Great Software Engineers think before writing, never the other way around.

As software systems grow, it is important to prioritize simplicity and maintainability.
May 3, 2023 8 tweets 2 min read
Reliability and Resilience are related concepts in software systems.

People tend to mix them, but they are distinct from each other.

Demystifying these two critical concepts👇 Image Reliability refers to the ability of a system or service to perform its functions:
- Consistently and accurately
- Without failure

A reliable system can always be trusted to work correctly without unexpected downtime or errors.
May 1, 2023 12 tweets 4 min read
Dealing with large responses in APIs is complex.

3 strategies to solve this problem. Image Pagination: This strategy involves breaking up the response into smaller data pages and allowing the client to request each page separately.

The client specifies the number of records to be returned per page and an offset to indicate which page to fetch.
Apr 28, 2023 9 tweets 2 min read
100% availability is tough, if not impossible!

Our hardware, our code, and our DB can fail.

4 practical advice to help you build a fault-tolerant system. Image In simple terms, Fault Tolerance is the ability of a system to continue operating even when one or more components fail.

Fault Tolerance aims to minimize downtime and ensure that the system can continue operating even in the face of unexpected events.

But how?
Apr 26, 2023 8 tweets 2 min read
Everybody agrees communication is critical.

But explaining a Software Solution using hand gestures and meetings is not an option.

5 diagrams you need and their audience. Image 1. Flow diagrams
They are the starting point for any architect.

They map out the steps in a process or system and provide a high-level view. Useful for identifying bottlenecks and opportunities for improvement.

Audience: Generally technical, architecture board.