News for hackers. Stuff that matters.
Re:Facts every web dev should know before they burn out and ... by tharkun__ on Wednesday October 20, 2021 @09:18PM (#28939098)
This, so much this.

Just know though, that there are different places out there. I surely am tempting Murphy right now. Please recognize my sacrifice.

My current place is rather good in this regard. People actually care. The Devs genuinely care about both their work environment and code base. We actively try to hire other people that care and not let in the ones that don't.

We do hire 'inexperienced' as well but that doesn't mean you gotta take bad dev experience. For example I have a really 'inexperienced' guy on my team. But we hire him anyway because he showed signs of 'caring' during the interview and coding challenge (take home - I know what you think. It's different than you think and I'd be happy to elaborate if you want to). He is awesome! I try as hard as I can to give him the space to be awesome and not let the 'bad parts' of the company (which exist even in awesome companies) reach and discourage him (and others like him).

We keep our builds fast, we spend a bunch of money on giving every dev a prod like environment. A monorepo.

Re:Facts every web dev should know before they burn out and ... by bob1029 on Thursday October 21, 2021 @04:44AM (#28941934)
This sounds like our shop. One big fat monorepo, every merge to master must satisfy a checkbuild.

Speed is a big deal for us too. The entire thing can be built from clean in ~3 minutes by GH action workers. We buy our developers threadripper workstations, so local rebuild times of the solution during typical development iterations are closer to 15 seconds. We are much more interested in developer ergonomics than with simulating prod environment.

I genuinely believe having fast builds is the most important part of the developer experience. Somewhere around a build taking more than 30 seconds is when bad things start to happen to my engagement loop. If I can keep it under 30, I can stay in flow the whole time. Other developers on the team have expressed similar tolerances.

Re:Facts every web dev should know before they burn out and ... by selfhoster11 on Thursday October 21, 2021 @06:03AM (#28942396)
> I genuinely believe having fast builds is the most important part of the developer experience. Somewhere around a build taking more than 30 seconds is when bad things start to happen to my engagement loop. If I can keep it under 30, I can stay in flow the whole time. Other developers on the team have expressed similar tolerances.

This, a thousand times. Anything after 30 seconds is where you start to lose your focus, and your work output suffers for it.

Re:Facts every web dev should know before they burn out and ... by rightbyte on Thursday October 21, 2021 @05:40AM (#28942267)
I don't get the initial short build time thing. My prior work project took 15h too build from clean - obviously a nightmare. It was due to bad layout of dependencies and a lot of generation. So it is still important to not mess up.

I care mostly about cached build time. A clean build time of eg. 1h does not bother me.

Re:Facts every web dev should know before they burn out and ... by selfhoster11 on Thursday October 21, 2021 @06:02AM (#28942382)
With a bad enough (or just unfortunate) codebase or technology choices, every build could easily turn into a full build. I care about cold build and cold restart times exactly for this reason.
Re:Facts every web dev should know before they burn out and ... by phnofive on Wednesday October 20, 2021 @10:35PM (#28939592)
Please do elaborate on your take-home; in a profession with no formal credentials (i.e. no MSBE for SDEs), I don't mind putting a little skin in them game for the same purpose.
Re:Facts every web dev should know before they burn out and ... by tharkun__ on Wednesday October 20, 2021 @11:43PM (#28939952)
Well why I said that is because of all the discussions on HN about people hating leetcode, hating take homes hating... well just about any form of interview if I read it right.

Now I am/have been on both sides of this.

I happen to like take home for devs. I like it because it takes out some of the stress of interviewing. If done right. I have been advocating internally at my company for stripping down the take home test. Who wants to do a "this should take you 4-8 hours" test? Which nobody internally actually tried to do themselves in that timeframe. Nobody! Especially not if you have a job at the moment. And a family. But want to take advantage of the market and/or look for a better company.

What do I look for in a take home?

Not running code! I couldn't care less! I have never in my life run up a take home test someone sent in (backend). I look for code cleanliness, consistency, abstractions, DRY, WHY comments. If you send in something without any tests you are out. If you have a hundred tests to show 'you do tests', you are out. If you have 5 tests that are of awesome quality and show that you know what is worth testing and how to write tests that will survive a refactoring of the code and actually tell you that your refactoring didn't break anything I will hire you and pay you money to write a hundred of those tests when it actually matters. Maybe add a comment that you could write the same kind of tests for the rest of the code but your kid needed a good night song and the deadline for the test was up.

I was hired on such a take home. My code deliberately did not run. I called out to external services that I did not bother to include in the take home test because it asked to solve the problem and I knew they used microservices. And business wise those things should've been handled in those other microservices and not the one I was writing. I also left out the database. Not worth even an h2 in pom.xml. They happened to use gradle. They didn't care I used maven. Still love them for it. Had the best interview ever. Loved the pros and cons discussion with my interviewer. Awesome guy.

Now depending on what position you get hired for this might change. An architect position for example a whiteboarding session might be more appropriate. Just have a problem to solve (e.g. one of your own main use cases) and have them design it with you. Who cares if they come up with the same solution you did. It's about the discussion. The pros and cons. The general attitude towards solving the problem. If they admit they don't have the answer to something off hand but its a 'googleable thing' they've just never had to solve before, that's fine!

Re:Facts every web dev should know before they burn out and ... by Osiris on Thursday October 21, 2021 @03:06AM (#28941316)
We do take home tests and I find them valuable. We do, however ask them to host it somewhere to be used.

1) we want the time investment to be <4 hours

2) the test uses public APIs and is directly related to our work (crypto)

3) we had the team (mine) do the test themselves before making it official

4) we also are looking for things like tests, thoughtful architecture, etc. It's hard for a junior dev to fake well structured and organized code because it takes experience and thought to do it that way.

If I were interviewing I would much prefer a take home rather than an in person leetcode interview. I also don't mind in person pair programming (like help us fix the bug in this code or whatever).

Re:Facts every web dev should know before they burn out and ... by disgruntledphd2 on Thursday October 21, 2021 @05:55AM (#28942333)
> If I were interviewing I would much prefer a take home rather than an in person leetcode interview.

It's tricky, because this can vary within one person across time. For example, in my area (DS), i think that the take-home gives the best signal for the actual work (as long as its well scoped).

But, as a parent of a small child, I'd much prefer to just do in-person tests/discussions as it takes less time away from my family.

So it's hard, and whatever you choose will lead to you missing good candidates.

Unfortunately, as in many areas, there's no silver bullet.

Re:Facts every web dev should know before they burn out and ... by stavros on Thursday October 21, 2021 @04:26AM (#28941827)
Exactly agreed. We implemented such a take-home as well, hopefully it takes candidates 1-2 hours to complete, but we need more data on that. You're scored on various well-defined areas, and it is, as you say, to show us that you know how to organize code. We don't even try to run it (though CI should pass).
Re:Facts every web dev should know before they burn out and ... by Ternari on Thursday October 21, 2021 @12:53AM (#28940424)
Your company sounds great. Are you hiring?
Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @12:47AM (#28940384)
You lost me at monorepo. That might work at a very small scale, but past that monorepos create more problems than they solve.
Re:Facts every web dev should know before they burn out and ... by ratww on Thursday October 21, 2021 @04:01AM (#28941662)
Such cargo-cult statements never work in absolutes.

Saying that "monorepos are only good for large scale" is pure bullshit, and something that only someone very inexperienced would say.

I'm in a very small company (less than 10 devs) but we still use a monorepo, because we have a set of common libraries for all our products, and having a monorepo helps us update those libraries without breaking anything. On the other hand, some very large companies have tried and have failed.

Monorepos are just a tool. The implementation and the context matters more than anything else.

Re:Facts every web dev should know before they burn out and ... by hbn on Thursday October 21, 2021 @09:48AM (#28944316)
Not disagreeing, but I think he was saying the opposite of "monorepos are only good for large scale"
Re:Facts every web dev should know before they burn out and ... by bob1029 on Thursday October 21, 2021 @04:23AM (#28941810)
A monorepo saved our company. When you let every developer have their own personal repo like it's some isolated minecraft instance, you will struggle to create 1 big valuable thing.

Monorepo forces the tough conversations. Maybe the organization should only use 1 language now. Maybe we should talk about code review policies and standardization of other processes since everyone is in the same bucket. Why can't everything just compile to 1 exe?

Another massive advantage with a monorepo if you use GitHub is that you now have 1 issue bucket that covers the entire enterprise. Linking issues to commits is super powerful when this technique covers 100% of your code and exists under 1 labeling scope.

Re:Facts every web dev should know before they burn out and ... by delta1 on Thursday October 21, 2021 @01:10AM (#28940539)
Like google scale?
Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @12:16PM (#28946695)
Sure, if you want to write your own version control system and also your own computer language to support it.
Re:Facts every web dev should know before they burn out and ... by delta1 on Thursday October 21, 2021 @01:18PM (#28947752)
There are many other examples of large scale monorepos. They in no way require custom version control nor programming language.
Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @01:42PM (#28948129)
What are the other examples you’re referencing?
Re:Facts every web dev should know before they burn out and ... by Osiris on Thursday October 21, 2021 @03:09AM (#28941329)
I'm not a fan either. In my opinion to do monorepos right you have to have a lot of tooling to handle all the special cases and scenarios and small teams just don't have the bandwidth so they use off the shelf tools that force them into a specific workflow and they end up at the mercy of the tools.
Re:Facts every web dev should know before they burn out and ... by hsn915 on Thursday October 21, 2021 @12:55AM (#28940434)
like what?
Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @01:01AM (#28940487)
Like versioning services, deployment of the code base, breaking out new microservices, transitioning to any container based deployment solution. Monorepos aren’t just a nightmare for release management, they’re a nightmare for any sort of single responsibility oriented architecture. I’m really exhausted of “senior devs” that believe they’re architects championing monorepos just because they’re too lazy to change minor versions in a repo.
Re:Facts every web dev should know before they burn out and ... by hsn915 on Thursday October 21, 2021 @01:26AM (#28940657)
Why is any of this necessary?

You have to understand, many of us think microservices is a stupid idea, so the fact that the core of your argument is "monorepos make microservices difficult" is not an appealing argument.

Re:Facts every web dev should know before they burn out and ... by wirrbel on Thursday October 21, 2021 @02:03AM (#28940902)
Where is this 'microservices is not the answer to everything' club? I want to sign up.
Re:Facts every web dev should know before they burn out and ... by funcDropShadow on Thursday October 21, 2021 @02:58AM (#28941268)
The definition of an ideology is a school of thought that claims to have the answer for everything. What does that tell us about the microservices fan club?
Re:Facts every web dev should know before they burn out and ... by exikyut on Thursday October 21, 2021 @05:14AM (#28942126)
Possibly that `problem-solving` is an external microservice that the microservices fan club depends on for all their answers.
Re:Facts every web dev should know before they burn out and ... by wirrbel on Thursday October 21, 2021 @07:57AM (#28943147)
If you have a hammer everything looks like a nail.
Re:Facts every web dev should know before they burn out and ... by hsn915 on Thursday October 21, 2021 @09:08AM (#28943824)
I don't know any online community that esposes some of the ideas I believe about web technology. There's "handmade network" but they don't seem to be much into web programming.
Re:Facts every web dev should know before they burn out and ... by Trasmatta on Thursday October 21, 2021 @02:13AM (#28940971)
I think you're massively misrepresenting the senior devs you've worked with if you think the reason they've advocated for monorepos is because they're "too lazy to change minor versions".

If a monorepo puts a barrier in the way of turning everything into a microservice, then all the better, as far as I'm concerned.

Re:Facts every web dev should know before they burn out and ... by hamandcheese on Thursday October 21, 2021 @03:01AM (#28941283)
How does a monorepo make any of these things harder? Make a new folder, slap a version on it, push your versioned artifacts.

Container based solutions become harder? Again… build your artifacts and deploy all the containers you want? What is so hard about this?

Meanwhile, with multi-repo you lose out on a whole host of opportunities to robustly track dependencies and keep things up to date.

Re:Facts every web dev should know before they burn out and ... by urthor on Thursday October 21, 2021 @03:48AM (#28941563)
Monorepos don't make it harder.

Everything in software is about dependencies, and monorepos are playing double or nothing with dependencies.

The issue with Monorepos is that they can amplify bad decisions and tech debt. Any bad decisions are magnified across the organization. But they definitely don't make it easier or harder to make that initial bad decision.

The upside is that dependencies are just there and not hidden behind interfaces.

The downside is that a bad dependency cannot be abstracted behind a micro-service interface. Once it's out in the wild it can do crazy things.

Re:Facts every web dev should know before they burn out and ... by bryanrasmussen on Thursday October 21, 2021 @04:15AM (#28941751)
>How does a monorepo make any of these things harder? Make a new folder, slap a version on it, push your versioned artifacts.

not liking microservices myself but - if I did this wouldn't it mean that the code in version 19 was now removed from the code in version 18 and back in git history making it more difficult to figure out just where things went wrong on a difficult little edge case.

Re:Facts every web dev should know before they burn out and ... by tharkun__ on Thursday October 21, 2021 @10:14AM (#28944720)
I don't see where microservices or not have much to do with having a monorepo or not. We have a monorepo and we have both. We have "microservices" and we don't. It's also a huge variable term. What I call microservices you guys might call "a bunch of monoliths communicating with each other". Same difference.

git bisect helps to easily identify hard to find but reproducible bugs. Since we try to have small PRs once you found the breaking commit it is usually easy enough to the find the bug. Murphy and exceptions obviously apply.

Re:Facts every web dev should know before they burn out and ... by fossuser on Thursday October 21, 2021 @02:54AM (#28941234)
Like anything it's a tradeoff.

You trade simplicity of having everything in one place vs. ability to independently version pieces at the cost of more complex tooling and build systems required to test.

Usually there's some sweet spot, but the answer isn't obvious and one isn't clearly better.

Re:Facts every web dev should know before they burn out and ... by tharkun__ on Thursday October 21, 2021 @09:55AM (#28944417)
OP here.

We do not version our services in that sense. It's a monorepo after all.

We do have microservices.

We use kubernetes.

Deployment is a breeze. Only services with changes are actually deployed.

We do hourly deploys to production.

None of the issues you describe apply here and the monorepo works awesomely for us. This is a SaaS situation where all services making up that SaaS solution and that we host are in that monorepo.

YMMV if you are in a different situation such as having to ship versioned software for customers to self host/install for example. Our accompanying software that is usable in conjunction with the SaaS solution is not part of that Monorepo and each of those are versioned and deployed to various external marketplaces.

Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @12:27PM (#28946888)
There’s plenty of reasons to want to version APIs in a SaaS offering…
Re:Facts every web dev should know before they burn out and ... by tharkun__ on Thursday October 21, 2021 @06:09PM (#28951433)
That's a different story and a monorepo has zero effect on that. The versioning that was mentioned before was versioning of the services themselves, i.e. this build produces version 1.5.4, next build is 1.5.5 etc. We don't do that any longer since moving to a monorepo. We deploy by commit hash basically.

That is way different from providing v1 of your API and changes come out in v2 of the API while you also still provide v1 of the same API. You can (and we do) do that perfectly well with or without a monorepo. Mostly for the public API. Internal API's often don't need to do versioning and one can go with backwards compatible changes and/or rolling a change out over multiple commit deploy cycles.

Some of this will depend on your size I suppose. The larger the org, the more services etc. the more stable versioning I would suppose happening.

Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @06:54PM (#28951831)
> The larger the org, the more services etc. the more stable versioning I would suppose happening.

Which is why I said in my original comment this may work fine in a small environment, but it won’t scale well.

Re:Facts every web dev should know before they burn out and ... by tharkun__ on Thursday October 21, 2021 @09:40PM (#28952886)
I do agree to some degree with that (I'm the OP not the siblings :)). We just have to define what small means. Netflix or Google are way up there in scale. In relation to them we are small. We also don't actually have microservices vs. what I'm reading about Netflix's architecture. We probably have "macroservices" in comparison with them but we definitely aren't one monolith. We got a bunch of "small monoliths" so to speak.

That said, we're not small either. In our niche, which you might recognize if I said more, we're the top solution customers choose (but I won't go into much more detail than that for obvious reasons).

Re:Facts every web dev should know before they burn out and ... by randmeerkat on Thursday October 21, 2021 @10:41PM (#28953186)
I actually couldn’t agree more. Figuring out what “small” means really is the key and that thoughtful level of analysis is what’s really important for determining what the right architecture is for a business. I must’ve articulated my thoughts poorly earlier, while I’m not crazy about monoliths, I’m not opposed to them either. It’s the monorepos that contain many monoliths that concern me. Microservices in general are hard to execute on, and even the most successful companies that have realized microservices have monoliths running somewhere in the background. Your enterprise sounds interesting and they’re fortunate to have such a self reflective engineer on their team.