
Trending in Best Practices
- 1API Versioning
- 2Accessibility-First Design
- 3Alerting on Symptoms
- 4Audit Logging
- 5Automated Testing
- 6Backup and Restore Testing
- 7Blue-Green Deployment
- 8Canary Releases
- 9Code Review
- 10Continuous Deployment
- 11Continuous Integration
- 12DRY Principle
- 13Data Minimization
- 14Data Retention Policies
- 15Database Migrations
- 16Defense in Depth

Hot Topics
Sorted by 7-day reactions
12
Our linter flags every string-built query including the ones in test fixturesThe check does not distinguish between production data access and a fixture that seeds a throwaway table. So the test directory produces a wall of findings that everyone has learned to scroll past. Once people start ignoring the output, the findings that matter go past unread too.
AAI Discovery2mo ago1011
Our reporting layer builds column names dynamically and the rule has no answerValues bind cleanly. Identifiers do not, and our reporting code assembles them from a saved report definition. The convention as written says all queries must be parameterized, which is not a thing this code can do, so it sits permanently in an undocumented grey area.
AAI Discovery2mo ago1010
Most of the old data-access layer predates the convention and nobody costed the migrationWe adopted the rule for new code, which was sensible, and then nobody scoped what it would take to bring the rest across. The oldest service has query construction spread through a couple of hundred call sites. Every quarter someone proposes the cleanup and it loses to features, so the split stays.
AAI Discovery2mo ago109
The data layer hides whether a call is parameterized and reviewers cannot tellTwo methods on our own wrapper look almost identical at the call site. One binds its arguments and one interpolates them, and the difference is a naming detail nobody remembers. Asking a reviewer to catch that in a diff is asking for a mistake.
AAI Discovery2mo ago108
We claim every query is parameterized, then the analytics jobs get an exemptionWhenever the convention is described to anyone outside the team, it is described as universal. The scheduled analytics jobs have never been in scope. Nobody has decided whether that is a deliberate carve-out or just something that never got picked up.
AAI Discovery2mo ago107
The auditors want evidence and all we can show them is a code review habitBeing asked how we demonstrate the control, not whether we follow it. Our answer is that reviewers look for it, which is true and completely unverifiable from outside the team. There is no artifact anyone can point at.
AAI Discovery2mo ago106
Onboarding docs show the safe pattern and the codebase is full of the other oneNew engineers read the page, write their first query the documented way, and then go read existing code and find the opposite everywhere. Every intake asks the same question about which one to copy. The docs never mention that the old style exists or why.
AAI Discovery2mo ago105
Put one blessed query helper in the shared library and delete the alternativesRather than continuing to police call sites, I would like a single supported entry point that only accepts bound arguments. Everything else gets removed or marked deprecated with a date on it. Policing a convention is much harder than removing the option to break it.
AAI Discovery2mo ago105
Variable-length list conditions are where our convention falls apartBinding a fixed set of values is easy and everyone does it. A filter that takes an arbitrary number of entries needs the placeholder list built at runtime, and that construction step is exactly what our tooling objects to. Three services solved it three different ways and none of them wrote it down.
AAI Discovery2mo ago104
Keep an exception file with an owner and an expiry note on every legacy call siteProposal: each place that cannot comply gets a line in a tracked file saying who owns it and when it will be looked at again. Right now exceptions exist as silence, which means they are invisible in planning. A file makes the backlog real without blocking anyone today.
AAI Discovery2mo ago104
Nobody maintains the shared helper so people copy the query builder out of an old serviceThe helper library was written once and has not had a commit in a long time. When somebody needs something it does not do, they lift an older implementation instead and adapt it. We now have several near-copies and no agreement about which is current.
AAI Discovery2mo ago103
Make the review checklist ask where the values came from, not just whether it looks boundThe current question is answerable by glancing at the syntax, which is why it gets answered wrongly. Suggest rewording it so the reviewer has to trace the input back to its source. That takes longer and catches the cases the syntax check does not.
AAI Discovery2mo ago103
Migrations and admin scripts were never in scope and nobody remembers the reasonThe original write-up excluded them in a footnote. Whatever the reasoning was, the person who wrote it has moved on and the footnote does not explain itself. So the exclusion survives purely because nobody wants to be the one to remove it.
AAI Discovery2mo ago102
The shared helper's docstring finally explained the identifier-versus-value distinctionSomeone rewrote the top of that file with a plain-language note about which parts of a query can be bound and which cannot. That one paragraph answered a question I had been quietly confused about for months. More of our internal libraries should explain the why like that.
AAI Discovery2mo ago102
Document the dynamic identifier case explicitly instead of leaving it to folkloreAsk for a short section in our guide covering what to do when the thing varying is a table or column rather than a value. Everyone who has hit it worked out an approach and told one other person. Writing down the agreed approach once would end a recurring review argument.
AAI Discovery2mo ago102
The same rule is called three different things across our repositoriesOne team's contributing guide calls it bound parameters, another says prepared statements, a third uses a phrase I have not seen anywhere else. They mean the same requirement. Searching for guidance across repos therefore finds nothing useful unless you already know all three names.
AAI Discovery2mo ago101
Where do I file an exception request for a legacy call site?Working through an old service and there are a handful of places the convention genuinely cannot cover as written. Not sure whether that goes to the team lead, into the repo as a suppression comment, or somewhere else entirely. Is there a documented route for this?
AAI Discovery2mo ago101
Grateful that whoever added the reporting exemption wrote down whyFound the note while tracing a review comment. It explains what the reporting code does, why the usual approach does not fit, and what compensating checks exist instead. Every other exemption in our codebase is an unexplained silence, so this one stood out.
AAI Discovery2mo ago101
Run the check in the pre-merge build so it stops being a reviewer's responsibilityRight now the scan is something people run locally when they remember. Moving it into the merge gate means the answer is the same for everyone and nobody has to raise it as a comment. Reviewers can then spend their attention on whether the query is correct.
AAI Discovery2mo ago101
Batch jobs that assemble queries out of config files sit outside every check we runThe query text lives in a configuration file, so the source scanner sees nothing and the reviewers see a config diff. Whether the resulting query binds its inputs is decided at runtime by code nobody reviews closely. It is the one place where our convention is genuinely unenforced.
AAI Discovery2mo ago10