frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

It's OK to hardcode feature flags (2025)

https://code.mendhak.com/hardcode-feature-flags/
26•biscuits1•1h ago

Comments

mhog_hn•1h ago
note that this is a "pre-november 2025 opus 4.5" post folks
Xirdus•47m ago
Hardcoding feature flags prevents you from deploying the same build with different flag sets side by side and comparing results. Depending on the nature of the project, it might be irrelevant or it might be a deal breaker. Especially in cloud environments, it's usually the latter. And everything is in the cloud nowadays.
aksappy•45m ago
Unclear how the arguments against feature flags can be used to justify hardcoding them or using a JSON file to manage them. Feature flag decisions are at the end of the day, tradeoffs to solve a problem that may occur for another person at a different place/time. If you are a solo developer, hardcode, use bytes or mail your feature flags - it does not matter. If you are not, there is a lot to take care of beyond a single hardcoded json file.
cassianoleal•42m ago
Why wouldn't it be? The post does a good job explaining why not only it's not a problem, but also likely desirable in many (I'd wager the vast majority) of circumstances.

Simple, effective, cheap, easy to understand and manage. Not dependent on an external service, not dependent on a third-party.

maxidog•41m ago
I’m currently reverse engineering a large enterprise app and the feature flag bloat is truly astounding. Imho excessive feature flag complexity is a symptom of management who are indecisive and mistrusted by the developers.
Lucasoato•36m ago
This of course depends on the quantity and the depth of these feature flags. It’s ok to hard code few of them, maybe it’s not when it becomes a practice and you have tens of them. I think you would have a much easier life if there was a standardized, well documented, way to define them.
Gigachad•31m ago
You need to be actively deleting them after the feature has gone live
forgotaccount3•11m ago
Create story to add feature flag controlling access to the feature.

Immediately create story to remove said feature flag controlling access to the feature and review it during backlog refinements.

jasonjayr•39m ago
Do all modern compilers do tree-shaking at this point? Unless you use compiler-based flags, If you hard code them into your code, the dead code paths may still be in the shipped binary. Depending on what you are doing, the security issues mentioned in the article are still present, or you may prematurely reveal an upcoming feature.
jdwyah•35m ago
I am on my second feature flag startup, but I also somewhat agree with this.

Every project should have flags, but many projects need just the basics and a service is overkill.

Rolling your own JSON still feels like something we ought avoid though. Yes to start out it’s 95% booleans. But then you want a rollout. And then you want some targeting rules. And then you want non booleans… maybe some json. Oo wouldn’t it be nice if the json could conform to a schema… and then eventually you are like damn I really want to change these without deploying. Or you want to read the same flag from multiple services.

I’ve tried to incorporate this lowest common denominator into https://quonfig.com Use it totally free & open source as SDK, and it’s just loading JSON that you can track in git. Agents love it, hot reloads, SDK in lots of languages. But vs rolling your own you’ve got a lot of headroom on the design. A bunch of targeting operators. Segments etc. And then if you do want to get a nice UI / delivery network for real time updates, then you can use the paid side of things.

Local use description: https://docs.quonfig.com/docs/how-tos/open-source-local

jameshart•33m ago
In my experience these (configuration based feature flags and feature flag services) are actually two complimentary capabilities that solve two completely different problems but that happen to share the same name: feature flags.

The config approach is critical for using feature flags as a software development lifecycle tool. It is how you manage having a codebase which contains the unfinished code for new feature x, but can still be deployed and pass all tests without feature x being turned on.

In this model you need a mechanism which allows a developer who is working on feature x to enable it for local testing, and for your CI system to be able to interact with the flag system to test that the application works in both states - with x turned on and off.

This is ideal for trunk based development models; feature branches are an alternative approach that doesn’t really benefit from this (indeed it adds complexity to working in feature branches).

Meanwhile feature flag services are to solve the problem that different people using the same software need different features turned on. That can be as simple as internal testers or beta users, it can be holding features to roll out in fixed update windows per tenant, or it can be part of a risk management strategy where features are rolled out through progressive exposure.

It can also be tempting to mix up your feature flags system with an A/B testing system - you can use a feature flag service to expose a feature to a test cohort and measure performance changes.

There can be reasons for doing that but it’s really important not to tie all these things together: not every development lifecycle change is an ab test hypothesis. Not every ab test hypothesis is a development lifecycle change (often it is really about testing changes in data, and feature config is just one piece of data you might want to change). Similarly some other data changes than code changes need to roll out progressively to mitigate risk.

So all these things might be feature-flag shaped, but that doesn’t mean you can substitute different feature flag solutions in and solve the same problems.

This post is saying ‘it’s okay not to have an exposure control solution; you can have a config file’ - which is obviously true, if what you have is a config management problem, not an exposure control problem.

jdwyah•21m ago
Strongly agree that Config & FeatureFlags are two different things. But as I've tried building tools in the space: man is it difficult to really nail down what the difference is.

For Quonfig I landed on:

- Data model wise they are identical. Flags and configs can both be targeted. They can both use segments. They can both do partial rollouts. They can both have the same range of values (bool/number/duration/json/json-w-schema/etc)

- Its fine to use Flags for your Experiments/AB Tests, but that's just the "allocation engine". The rest of experimentation is the exposure tracking and goal tracking. Those ought live in your product analytics stack, because they are really just events. But its helpful to have a single place (flags) for the experiment allocation because then you can re-use segments for things like hold out groups / and just general targeting.

- The only real difference is that Flags are intended to be ephemeral and configs are intended to be permanent. A good UI should show you how long a flag has been alive and help you clean it up (or convert it to a config) if it's been true for everyone for too long.

- The use cases are different enough that it's worth keeping them in two separate UI.

drdexebtjl•26m ago
To do safe deployments, you must have a way to run versions X and X+1 side by side serving an arbitrary proportion of your users while you inspect metrics.

That covers a lot of uses of feature flags without the bloat.

andy_ppp•13m ago
I've never found feature flag systems complex and you can build one yourself in a few functions. The services I have used in the past were extremely simple to integrate so I don't understand the issue either way honestly.
gps372•12m ago
Hardcoded feature flags becomes a big issue if your release process is long and error prone. Original article also suggest to enhance incrementally. But you don't want the interval between increments to be too big.

Commodore 64 released September 1, 1982

https://dfarq.homeip.net/commodore-64-released-september-1-1982/
162•giuliomagnifico•4h ago•74 comments

Claude Fable 5.1 and Claude Mythos 5.1

https://www.anthropic.com/claude-fable-and-mythos-5-1
1311•denysvitali•19h ago•1236 comments

The Emergent Symbolic Structure of Artificial Neural Networks

https://arxiv.org/abs/2608.29530
197•schmuhblaster•8h ago•64 comments

Quasar 438B: Europe's Leading AI Model

https://multiversecomputing.com/resources/introducing-quasar-438b-europe-s-leading-ai-model
38•amunozo•2h ago•22 comments

Move in C++ without a std:move

https://andreasfertig.com/blog/2026/09/move-in-cpp-without-a-stdmove/
11•dalvrosa•23h ago•4 comments

How accurate have Ed Zitron's AI skeptic predictions been?

https://danluu.com/zitron/
772•jatins•18h ago•848 comments

A Small Telescope That Surprised Me

https://adfr.io/thoughts/20260831_a_small_telescope_that_surprised_me/
6•speckx•21h ago•0 comments

You Know Who Hates AI? Insurance Claims Adjusters

https://www.wired.com/story/insurance-claims-adjusters-really-hate-ai/
61•joozio•2d ago•31 comments

Fine, I'll build my own text editor

https://dbushell.com/2026/09/01/text-editor/
173•Alephinitesimal•19h ago•157 comments

FBI Probes Service Selling 153M+ Drivers Licenses

https://krebsonsecurity.com/2026/09/fbi-probes-service-selling-153m-drivers-licenses/
282•tatersolid•13h ago•145 comments

Open Battery Information

https://github.com/mnh-jansson/open-battery-information
27•toomuchtodo•3d ago•9 comments

Sweden pauses Denmark power cable over EU grid rules

https://www.nordiskpost.com/2026/05/08/sweden-power-cable-dispute-freezes-link-to-denmark/
37•leonidasrup•3h ago•24 comments

It's OK to hardcode feature flags (2025)

https://code.mendhak.com/hardcode-feature-flags/
27•biscuits1•1h ago•15 comments

Telli (YC F24) is hiring engineers and designers [Berlin, on-site]

https://careers.telli.com/
1•sebselassie•4h ago

Introducing Ad Blocker for Firefox on iOS

https://blog.mozilla.org/en/firefox/ad-blocker-on-ios/
520•HieronymusBosch•23h ago•169 comments

Praearcturus gigas: giant scorpion from Lower Devonian (Lochkovian) of Britain

https://onlinelibrary.wiley.com/doi/10.1111/pala.70064
3•bryanrasmussen•22h ago•0 comments

Sonic Pi

https://sonic-pi.net/
200•Bluestein•4d ago•46 comments

Show HN: Weedout – Safari extension that hides YouTube AI-labeled videos

https://masteranza.github.io/weedout/
157•masteranza•14h ago•71 comments

Bugs happen: The easy way to compare solo PQ to ECC+PQ

https://blog.cr.yp.to/20260704-bugs.html
6•zdw•15h ago•2 comments

WebFPGA (2019)

https://webfpga.io/
92•gurjeet•8h ago•32 comments

Launch HN: Nori Robotics (YC S26) – A low-cost humanoid robot for development

https://www.norirobotics.com/
184•AntonioLi•19h ago•58 comments

The efficient frontier of LLM inference

https://www.baseten.co/blog/the-efficient-frontier-of-llm-inference/
133•philipkiely•13h ago•38 comments

Movie Scene Map – 13,312 films, series, games, anime and manga

https://moviescenemap.com/
287•Flightmussy•20h ago•38 comments

Ambient CSS v3 – Blender meets CSS

https://ambientcss.vercel.app/
286•kikkupico•21h ago•82 comments

My local model setup on an M4 Pro Mac Mini

https://lws.io/blog/my-local-model-setup/
244•raybb•14h ago•151 comments

The creator of Jujutsu has joined ERSC

https://ersc.io/blog/martin-joins-ersc
251•steveklabnik•19h ago•194 comments

The ChatGPT/Codex app bundles a full copy of LibreOffice

https://simonwillison.net/2026/Sep/1/codex-libreoffice/
441•timpera•16h ago•205 comments

Banca Etica Suspends A/I's Account While Condemning the Sanctions Behind It

https://sabot.media/post/banca-etica-statement-english
6•rendx•3h ago•0 comments

Refurbishing a Tektronix TDS7104 Oscilloscope

https://tomverbeure.github.io/2026/08/23/Tektronix-TDS7104-Refurbishing.html
135•jwise0•16h ago•59 comments

Why are there no flow batteries with symmetric ferrocyanide electrolytes?

https://chemisting.com/2026/09/02/why-are-there-no-flow-batteries-with-symmetric-ferrocyanide-ele...
15•DamonHD•2h ago•2 comments