Posts

Top 10 Things I Learned in 7 Years of Software Engineering

Below are the top 10 things I’ve learned from my 7 years of experience in software engineering. While there are many other lessons, I’ve selected these top 10 as the most impactful from my journey 1. Be Pragmatic   Being pragmatic means focusing on what’s realistic and practical rather than purely theoretical. While best practices like TDD (Test-Driven Development) and Pair Programming are highly beneficial, they aren't always feasible. Context matters. For example, in a time-sensitive proof of concept (POC), you might need to prioritise rapid implementation over adhering strictly to TDD, especially if you're still mastering it. The key is to understand the trade-offs and make informed decisions based on the situation. 2. Ask. Ask. Ask.   Asking for help is crucial for keeping both yourself and your team moving forward. If you find yourself stuck on a problem despite extensive research, it’s often more efficient to ask for assistance. Chances are, someone else has encountered ...

Partial Indexes - Postgres

What is a Partial Index? A partial index is an index that is built on a subset of rows in a database table. This subset is defined by a conditional expression, also known as a predicate. By indexing only the rows that meet specific criteria, partial indexes can significantly improve query performance and reduce storage requirements. Why Use a Partial Index? Partial indexes are particularly useful in scenarios where only a limited number of rows are frequently accessed or queried. This is often the case with datasets that exhibit a long-tail distribution , where a small subset of data is accessed much more frequently than the rest. By creating an index only on the frequently accessed rows, you can: Improve query performance by reducing the number of rows scanned. Save storage space since the index is smaller. Reduce maintenance overhead because fewer rows need to be updated in the index when the table is modified. Example Consider a table candidates with a column pr...