Live data from Hacker News

Everything as code: How we manage our company in one monorepo

kasava.dev

141–150 of 232 posts

Re: Everything as code: How we manage our company in one monorepo

#141
Good Christ. Imagine having decided that your price structures should be a JSON file instead of persisted in a database and then thinking that any decision made by that person/team is a good idea.

I look forward to when we see the article about breaking the monorepo nightmare.

Re: Everything as code: How we manage our company in one monorepo

#142

Earlier quoted context omitted.

Do you take down all of your projects and then bring them back up at the new version? If not, then you have times at which the change is only partially complete.

People that Blue Green are doing that, aren't they? Canary/Incremental, not so much

Blue/green might allow you to do (approximately) atomic deploys for one service, but it doesn't allow you to do an atomic deploy of the clients of that service as well.

Re: Everything as code: How we manage our company in one monorepo

#143
post #68

Earlier quoted context omitted.

it's also very easy to rewrite commit history in a few seconds.

If I'm rewriting history ... why not just squash? But also, rewriting history only works if you haven't pushed code and are working as a solo developer. It doesn't work when the team is working on a feature in a branch and we need to be pushing to run and test deployment via pipelines.

> But also, rewriting history only works if you haven't pushed code and are working as a solo developer.

Weird, works fine in our team. Force with lease allows me to push again and the most common type of branch is per-dev and short lived.

Re: Everything as code: How we manage our company in one monorepo

#144

Earlier quoted context omitted.

I'm very fortunate to not have to use PR style forges at work (branch based, that is). Instead each commit is its own unit of code to review, test, and merge individually. I never touch branches anymore since I also use JJ locally.

What is JJ?

https://github.com/jj-vcs/jj

Re: Everything as code: How we manage our company in one monorepo

#145

Good Christ. Imagine having decided that your price structures should be a JSON file instead of persisted in a database and then thinking that any decision made by that person/team is a good idea. I look forward to when we see the article about breaking the monorepo nightmare.

Depending on how often you need to change your pricing and how many products you offer, flat files might make a lot of sense.

Re: Everything as code: How we manage our company in one monorepo

#146
post #6
post #3

Earlier quoted context omitted.

Opening Claude from the parent directory is what I do, and it seems to work pretty well, but I do like this monorepo idea so that a single commit can change things in the front end and back end together, since this is a use case that's quite common

Except of course rollout will not be atomic anyway and making changes in a single commit might lead Devs to make changes without thinking about backwards compat

Even if the rollout was atomic to the servers, you will still have old clients with cached old front ends talking to updated front ends. Depending on the importance of the changes in question, you can sometimes accept breakage or force a full UI refresh. But that should be a conscious decision. It’s better to support old clients as the same time as new clients and deprecate the old behavior and remove it over time. Likewise, if there’s a critical change where you can’t risk new front ends breaking when talking to old front ends (what if you had to rollback), you can often deploy support for new changes, and activate the UI changes in a subsequent release or with a feature flag.

I think it’s better to always ask your devs to be concerned about backwards compatibility, and sometimes forwards compatibility, and to add test suites if possible to monitor for unexpected incompatible changes.

Re: Everything as code: How we manage our company in one monorepo

#147
post #35

This is sort of a whole product , but it’s hardly managing the whole company . Financials? HR? Contracts? Pictures of the last team meeting? It just looks like a normal frontend+backend product monorepo, with the only somewhat unusual inclusion of the marketing folder.

It's worth noting with a few clicks from the linked article, you can find that this company is (at least according to LinkedIn) a single person. Which explains how the whole company can fit into a repo. But also makes you question how valuable the "insights" here are, like obviously a single-person project should be using a monorepo...

Re: Everything as code: How we manage our company in one monorepo

#148

Good Christ. Imagine having decided that your price structures should be a JSON file instead of persisted in a database and then thinking that any decision made by that person/team is a good idea. I look forward to when we see the article about breaking the monorepo nightmare.

Sometimes this sort of thing is not a bad idea. If it's a simple data structure that doesn't change very often, you get an admin interface (vi), change tracking, and audit trail for free. Just think of it as configuration rather than data and most folks would think it's normal to do this.

Re: Everything as code: How we manage our company in one monorepo

#149

people talk about "one change, everywhere, all at once." That is a great way to break production on any api change. if you have a db and >2 nodes, you will have the old system using the old schema and the new system using the new schema unless you design for forwards-backwards compatible changes. While more obvious with a db schema, it is true for any networked api. At some point, you will have many teams. And one of…

> At some point, you will have many teams. And one of them _will not_ be able to validate and accept some upgrade. Maybe a regression causes something only they use to break. Now the entire org is held hostage by the version needs of one team. Yes, this happens at slightly larger orgs. I've seen it many times.

The alternative of every service being on their own version of libraries and never updating is worse.

Re: Everything as code: How we manage our company in one monorepo

#150
post #147
post #35

This is sort of a whole product , but it’s hardly managing the whole company . Financials? HR? Contracts? Pictures of the last team meeting? It just looks like a normal frontend+backend product monorepo, with the only somewhat unusual inclusion of the marketing folder.

It's worth noting with a few clicks from the linked article, you can find that this company is (at least according to LinkedIn) a single person. Which explains how the whole company can fit into a repo. But also makes you question how valuable the "insights" here are, like obviously a single-person project should be using a monorepo...

Ah, so "our" company is referring to "me and Claude"? Actually. Claude might be a pretty good co-founder. Half the job is therapy conversations anyway. :)
Post reply on HN