Pinned Tweet
Backend Engineering Question:
If XML and JSON can both represent structured data, why do most modern REST APIs use JSON?
What advantages does JSON offer?
And are there situations where XML would still be a better choice?
SQL injection isn't some mysterious vulnerability that only affects inexperienced developers.
It often starts with something that looks harmless:
Building an SQL query by concatenating user input.
Prepared statements separate the SQL command from the supplied values, allowing the database driver to handle parameterization properly.
Please stop constructing SQL queries by joining strings and trusting that nobody will enter something unexpected
1
5
285
A developer checks whether an email already exists before registering a user.
Looks good.
But two registration requests arrive at almost exactly the same time.
Both check the database.
Both discover that the email doesn't exist.
Both attempt to insert it.
What prevents the duplicate?
This is one reason application-level validation should be backed by database constraints.
The database must protect the invariant even when requests race.
Augustus O. retweeted
A developer checks whether an email already exists before registering a user.
Looks good.
But two registration requests arrive at almost exactly the same time.
Both check the database.
Both discover that the email doesn't exist.
Both attempt to insert it.
What prevents the duplicate?
This is one reason application-level validation should be backed by database constraints.
The database must protect the invariant even when requests race.
One of the most dangerous assumptions in backend engineering is believing that a request will only be processed once.
Networks fail.
Clients retry.
Queues redeliver messages.
Webhooks get sent again.
Design important operations to be idempotent.
Your system should be able to survive repeated requests without repeating unintended side effects
7
Augustus O. retweeted
A is a saga. B is a distributed commit.
Which one survives a slow third service, and why?
Augustus O. retweeted
There is something interesting about exposing database IDs in public APIs.
Your first user has ID 101.
The next has 102.
Someone changes the URL to /users/103 and discovers another user's record if authorization isn't properly enforced.
UUIDs can make identifiers harder to enumerate, but they don't replace authorization.
An unpredictable ID isn't a security boundary
There is something interesting about exposing database IDs in public APIs.
Your first user has ID 101.
The next has 102.
Someone changes the URL to /users/103 and discovers another user's record if authorization isn't properly enforced.
UUIDs can make identifiers harder to enumerate, but they don't replace authorization.
An unpredictable ID isn't a security boundary
Augustus O. retweeted
A database schema isn't something you create once and forget.
Applications evolve.
A column gets renamed, a relationship changes, a new constraint becomes necessary, and existing records need to be transformed.
That's why database migrations matter.
Your production database needs a controlled history of structural changes, not someone manually running SQL commands and hoping they remember everything
Augustus O. retweeted
You can have beautifully formatted code with terrible engineering decisions underneath.
Good naming won't prevent a race condition.
Consistent indentation won't stop a security vulnerability.
Arrow functions won't save you when a payment provider times out.
Readable code is good engineering.
Correct behaviour is non negotiable
A database schema isn't something you create once and forget.
Applications evolve.
A column gets renamed, a relationship changes, a new constraint becomes necessary, and existing records need to be transformed.
That's why database migrations matter.
Your production database needs a controlled history of structural changes, not someone manually running SQL commands and hoping they remember everything
You can have beautifully formatted code with terrible engineering decisions underneath.
Good naming won't prevent a race condition.
Consistent indentation won't stop a security vulnerability.
Arrow functions won't save you when a payment provider times out.
Readable code is good engineering.
Correct behaviour is non negotiable
Android Interview Question:
Why did so many Android teams move from Java to Kotlin?
Apart from cleaner syntax, what specific bugs does Kotlin help developers avoid that are easier to introduce in Java?
Interview question:
Java was already powering Android applications. So why did Google push Kotlin as the preferred language for Android development?
Was it simply about cleaner syntax and less boilerplate, or were there real engineering problems Kotlin addressed better?
For developers who've worked with both, what was the biggest practical improvement?
8


