Most active commenters
  • coryrc(7)
  • hammock(3)

←back to thread

179 points yatrios | 56 comments | | HN request time: 1.742s | source | bottom
1. 0xbadcafebee ◴[] No.42184298[source]
For those not aware, Shift Left[1] is (at this point) an old term that was coined for a specific use case, but now refers to a general concept. The concept is that, if you do needed things earlier in a product cycle, it will end up reducing your expense and time in the long run, even if it seems like it's taking longer for you to "get somewhere" earlier on. I think this[2] article is a good no-nonsense explainer for "Why Shift Left?".

[1] https://en.wikipedia.org/wiki/Shift-left_testing [2] https://www.dynatrace.com/news/blog/what-is-shift-left-and-w...

replies(13): >>42185611 #>>42186878 #>>42187331 #>>42187375 #>>42187393 #>>42187419 #>>42187454 #>>42187463 #>>42187501 #>>42188834 #>>42192801 #>>42194403 #>>42207068 #
2. leoc ◴[] No.42185611[source]
So “shift left” is roughly equivalent to “tests first” or “TDD”?
replies(5): >>42185876 #>>42185932 #>>42185960 #>>42186122 #>>42188425 #
3. marcellus23 ◴[] No.42185876[source]
I would say tests first/TDD is a form of shifting left, but it can encompass more than that.
4. 01HNNWZ0MV43FF ◴[] No.42185932[source]
It can also mean manual testing earlier. Valve credits playtesting early and playtesting often for their success with Half-Life, Half-Life 2, and other games.
replies(1): >>42186139 #
5. mehagar ◴[] No.42185960[source]
More broadly it includes moving activities that are normally performed at a later stage so that they are earlier in the process. The idea is that defects found later in the process are more costly.
6. hitchstory ◴[] No.42186122[source]
That's just one example of it.

Other examples:

* Replacing automated tests with (quicker) type checking and running it on a git commit hook instead of CI.

* Replacing slower tests with faster tests.

* Running tests before merging a PR instead of after.

* Replacing a suite of manual tests with automation tests.

etc.

replies(2): >>42186754 #>>42187010 #
7. Fuzzwah ◴[] No.42186139{3}[source]
Not just when they play tested but how. Silently watching someone play, only taking notes. No debrief.

Source: the week I spent in the Valve offices in 2005, having Valve staff playing our in development HL2 mod.

replies(1): >>42187265 #
8. 0xbadcafebee ◴[] No.42186754{3}[source]
Or, again more generally:

- implementing security features earlier (DevSecOps)

- implement tracing and metrics/analysis tools earlier, use them to test and debug apps earlier (as opposed to laptop-based solutions)

- building the reliable production model earlier (don't start with a toy model on your laptop if you're gonna end up with an RDS instance in AWS; build the big production thing first, and use it early on)

- add synthetic end-to-end tests early on

The linked article is talking about Shift Left in the context of developing semiconductors, so you can see how it can be applied to anything. Just do the needed thing earlier, in order to iterate faster, improve quality, reduce cost, ship faster.

replies(1): >>42191133 #
9. coryrc ◴[] No.42186878[source]
No evidence most of the activities actually save money with modern ways of delivering software (or even ancient ways of delivering software; I looked back and the IBM study showing increasing costs for finding bugs later in the pipeline was actually made up data!)
replies(4): >>42186930 #>>42187047 #>>42187893 #>>42187928 #
10. coryrc ◴[] No.42186930[source]
To be more specific, let's say I can write an e2e test on an actual pre-prod environment, or I can invest much development and ongoing maintenance to develop stub responses so that the test can run before submit in a partial system. How much is "shifting left" worth versus investing in speeding up the deployment pipeline and fast flag rollout and monitoring?

Nobody I've worked with can ever quantify the ROI for elaborate take test environments, but somebody made an okr so there you go. Far be it we follow actual research done on modern software... http://dora.dev

replies(3): >>42187551 #>>42187771 #>>42188365 #
11. js8 ◴[] No.42187010{3}[source]
So aside from automation (which also has tradeoffs), when you shift left, what gets shifted right?
replies(1): >>42187322 #
12. coryrc ◴[] No.42187047[source]
Last rant: everybody is testing in production, but only some people are looking at the results. If you aren't then there's better ROI to be found than "shifting left" your e2e tests.
13. CodeAndCuffs ◴[] No.42187265{4}[source]
Was it Dystopia, by chance?
14. saynay ◴[] No.42187322{4}[source]
The knowledge needed to do the 'shift-left' tasks. The downside of making your developers take on more tasks that used to be handled by someone further down the chain is they need to know how to do those tasks.
replies(1): >>42187451 #
15. ◴[] No.42187331[source]
16. 98codes ◴[] No.42187375[source]
What helped me finally remember "left of what, exactly" is to imagine a timeline, left to right. Shifting left is moving things earlier in that timeline.
17. DeathArrow ◴[] No.42187393[source]
Do the hard things first?
replies(1): >>42187644 #
18. hammock ◴[] No.42187419[source]
Sounds like the bottleneck concept from Goldratt’s The Goal
replies(1): >>42188363 #
19. hammock ◴[] No.42187451{5}[source]
Why can’t you shift the “someone further down the line” left along with the task?
replies(1): >>42188527 #
20. rusk ◴[] No.42187454[source]
”a stitch in time saves nine”

”prevention is better than cure”

[ante-] ”closing the stable door after the horse has bolted”

21. bigs ◴[] No.42187463[source]
Sounds like a similar/parallel thought to the project management waterfall paradigm whereby the earlier you get things correct (left) the less costly it is in the long run or conversely if you have to go and re-do things later on (right) you’re in for a shock (either cost, time or quality).
replies(2): >>42188286 #>>42190614 #
22. polishdude20 ◴[] No.42187501[source]
Sounds like the exact thing we never did at my previous employer. Just do the bare minimum to get it out the door and then fix it later.
replies(4): >>42188321 #>>42189061 #>>42189787 #>>42190553 #
23. cogman10 ◴[] No.42187551{3}[source]
In fact, in my experience, these elaborate test environments and procedures cripple products.

I'm firmly of the opinion that if a test can't be run completely locally then it shouldn't be run. These test environments can be super fragile. They often rely on a symphony of teams ensuring everything is in a good state all the time. But, what happens more often than not, is one team somewhere deploys a broken version of their software to the test environment (because, of course they do) in order to run their fleet of e2e tests. That invariably ends up blowing up the rest of the org depending on that broken software and heaven help you if the person that deployed did it at 5pm and is gone on vacation.

This rippling failure mode happens because it's easier to write e2e tests which depend on a functional environment than it is to write and maintain mock services and mock data. Yet the mock services and data are precisely what you need to ensure someone doesn't screw up the test environment in the first place.

replies(2): >>42187642 #>>42187699 #
24. coryrc ◴[] No.42187642{4}[source]
There are many reasons you want to be able to turn up your whole stack quickly; disaster recovery is just one of them. And if you can turn up your environment quickly then why not have multiple staging environments? You start with the most recent of yours and everyone else's prod version, then carrots combinations from there

Obviously this is for large-scale systems and not small teams.

25. Buttons840 ◴[] No.42187644[source]
Do the things that are hard and important first.
26. jeltz ◴[] No.42187699{4}[source]
You are not wrong but I have had many experiences where mock services resulted in totally broken systems since they were incorrectly mocked. In complex systems it is very hard to accurately mock interactions.

Personally I think the real issue is not the testing strategy but the system itself. Many organizations make systems overly complex. A well structured monolith with a few supporting services is usually easy to test while micro service/SOA hell is not.

27. wrs ◴[] No.42187771{3}[source]
No argument, but there can be limitations on how much you can speed up the deployment pipeline. In particular, the article is about integrated circuit development (actually about systems made of many ICs), where a “production deployment” takes months and many, many millions of dollars, and there’s not much you can do about it.

I heard a story decades ago about a software team that got a new member transferred in from the IC design department. The new engineer checked in essentially zero bugs. The manager asked what the secret was, and the new engineer said “wait, we’re allowed to have bugs?”

replies(1): >>42189565 #
28. 1propionyl ◴[] No.42187893[source]
Are you referring to the IBM Systems Science claims (likely apocryphal) in the Pressman paper, or Barry Boehm's figure in "Software Engineering" 1976 paper which did include some IBM sourcing (literally drawn on) but was primarily based on survey data from within TRW?

It baffles me that anyone would continue to promulgate the Pressman numbers (which claim ~exponential growth in cost) based on... it's not entirely clear what data, as opposed to Boehm's paper which only claims a linear relative cost increase, but is far more credible.

replies(1): >>42189508 #
29. tromp ◴[] No.42188286[source]
Funny how correct is not associated with right. The normal association is reflected in he Haskell Either datatype for describing computations that either run into some error (Left error) or run successfully producing a value (Right value).
replies(2): >>42189226 #>>42201048 #
30. infotecht ◴[] No.42188321[source]
Shift Left is about doing more work earlier in a process for efficiency -- it sounds like you at your previous employer were shifting right instead?
31. infogulch ◴[] No.42188363[source]
I'm familiar with both concepts and they don't seem related imo. Maybe if you applied bottleneck theory to process design in the abstract? Sorry I can't evaluate this comparison further, I must have run out of my quota for Abstract Reasoning Tokens today.
replies(1): >>42188799 #
32. crabbone ◴[] No.42188365{3}[source]
Shift-left comes from the world before everyone was selling services. In that world shipping service packs was the way to fix problems discovered after a release, and releases were years apart.

From a QA perspective, I greatly regret that the world of infrequent releases is mostly gone. There are few kinds of products that still hold onto the old strategy, but this is a dying art.

I see the world of services with DevOps, push on green etc. strategies as a kind of fast-food of software development. A kind of way of doing things that allows one to borrow from the future self by promising to improve the quality eventually, but charging for that future improved quality today.

There are products where speeding the rollout is a bad idea. Anything that requires high reliability is in that category. And the reason is that highly reliable systems need to collect mileage before being released. For example, in storage products, it's typical to have systems run for few months before they are "cleared for release". Of course, it's possible to continue development during this time, but it's a dangerous time for development because at any moment the system can be sent back to developers, and they would have to incorporate their more recent changes into the patched system when they restart the development process. I.e. a lot of development effort can be potentially wasted before the system is sent out to QA and the actual release. And, to amortize this waste, it's better to release less frequently. It's also better to approach the time when the system is handed to QA with a system already well-tested, as this will minimize the back-and-forth between the QA and the development -- and that's the problem shift-left was intended to solve.

NB. Here's another, perhaps novel thought for the "push on green" people. Once it was considered a bad idea for the QA to be aware of implementation details. Testing was seen as an experiment, where the QA were the test subjects. This also meant that exposing the QA to the internal details of the systems or the rationale that went into building it would "spoil" the results. In such a world, allowing the QA to see a half-baked system would be equivalent to exposing them to the details of the system's implementation, thus undermining their testing effort. The QA were supposed to receive the technical documentation for the system and work from it, trying to use the system as documented.

replies(2): >>42189545 #>>42207104 #
33. crabbone ◴[] No.42188425[source]
No, not really. It's a concept from the bygone era, before X-as-a-service took over a lot of software categories. It was intended to minimize friction between the QA and the development teams at the time the product was handed to QA. If the product had multiple defects, incrementally discovered, it would have to travel back and forth between the QA and the developers, stalling the development of the next version and generally creating a lot of noise and inconvenience due to the surrounding bureaucracy.

There's no need to write tests upfront for you to shift left. All shift left means is that testing happens during development. Whether you start by writing tests and then write the actual program or the other way around -- doesn't matter.

34. ElevenLathe ◴[] No.42188527{6}[source]
This is interesting. Seems like it would mean something like having QA or infosec pair program with app devs. I'm sure somebody does this and am curious how it works out in practice.
35. hammock ◴[] No.42188799{3}[source]
"Shifting left" is like moving the fat kid on the hike to the front of the line
36. bloodyplonker22 ◴[] No.42188834[source]
I had management who were so enthused about "shift left" that we shifted far left and broke the shifter, or perhaps, mis-shifted. Now we spend too much time developing test plan and testing and arguing about PRD that we actually deliver more slowly than competitor by a lot.
replies(1): >>42188861 #
37. hinkley ◴[] No.42188861[source]
Another flavor of this I've encountered is people in the management chain who can only think about faults per time interval and not about faults per interaction.

So you make a tool that prevents errors and speeds up a process, now people use it four times as much, and now they wonder why they're only seeing half as many faults instead of an order of magnitude less.

We are humans. We cannot eliminate errors, we can only replace them with a smaller number of different errors. Or as in your case, a larger number of them.

38. ajross ◴[] No.42189061[source]
That's an orthogonal concept. The idea of "shift left" is that you have work that needs to be done regardless (it's not an analysis of "bare minimum"), but tends strongly to be serialized for organizational reasons. And you find ways to parallelize the tasks.

The classic example is driver development. No one, even today, sits down and writes e.g. a Linux driver until after first silicon has reached the software developers. Early software is all test stuff, and tends to be written to hardware specs and doesn't understand the way it'll be integrated. So inevitably your driver team can't deliver on time because they need to work around nonsense.

And it feeds back. The nonsense currently being discovered by the driver folks doesn't get back to the hardware team in time to fix it, because they're already taping out the next version. So nonsense persists in version after version.

Shift left is about trying to fix that by bringing the later stages of development on board earlier.

replies(1): >>42194416 #
39. lolinder ◴[] No.42189226{3}[source]
That's because the association isn't right or wrong, it's progressing or not progressing, deriving from reading order. A Left value typically halts computation there and returns something to the user, whereas a Right value allows you to move on.

One nice side effect of tying the mnemonic to reading direction rather than homonyms is that it carries over across languages better (though still imperfectly).

40. coryrc ◴[] No.42189508{3}[source]
Pressman i.e. https://www.theregister.com/2021/07/22/bugs_expense_bs/

In a waterfall, single-deliverable model it wouldn't surprise me there is some increase in costs the later a bug is discovered, but if you're in that world you have more obvious problems to tackle.

People still use the Pressman numbers. So much for "data-driven decision making"...

41. coryrc ◴[] No.42189545{4}[source]
Companies won't pay enough for quality QA people, so you can't get good people to do it instead of a more lucrative dev position. So now everybody has to do testing, except they only want to do the bare minimum and they aren't as practiced at it so they aren't as good as someone with equivalent talent but more experience writing comprehensive tests.

Start paying "QA" more than their dev partners consistently and with better promotion opportunities and you can get better testing, but everybody seems to be making plenty of money without it.

42. coryrc ◴[] No.42189565{4}[source]
ICs are about the only exception, but semiconductor engineers are no dummies and have been building the appropriate simulation tools for a long time now.

If you could spin a chip every day that would mostly be a huge waste of time.

43. createaccount99 ◴[] No.42190553[source]
To me that makes sense, you'd want stuff out the door asap and see if it can work at all, not waste time on unproven ideas.
44. brightball ◴[] No.42190614[source]
I’ve come to the conclusion that Kent Beck got just about everything right with Extreme Programming. There’s just not a formal training industry out there pushing it so many more people are selling and invested in other approaches with a lot of warts.
replies(1): >>42193756 #
45. skybrian ◴[] No.42191133{4}[source]
Yes, it can be applied to anything, but might not pay off with software like it does with semiconductors? Better tests and more static analysis are useful, but teams will often work on making their releases faster and easier, iterating more frequently, and then testing some things in production. We don’t want our software to be too brittle, so it should tolerate more variation in performance.

But with chip design, they can’t iterate that fast and performance is more important, so they are doing more design and testing before the expensive part, using increasingly elaborate simulations.

46. theGnuMe ◴[] No.42192801[source]
Except it doesn’t work. What does work is domain experience. You get this by iterating quickly.
47. devjab ◴[] No.42193756{3}[source]
XP is almost the opposite or shift right, similar to how every other “agile” development form pushes the necessary work forward. I think it’s telling that none of the modern software design systems seem to have given us a world where our industry is capable of delivering software on time and within budget. They’ve been around for 20 years, places follow them religiously and still fail.

Maybe everything about those concepts are just wrong? I mean, you can have people like Uncle Bob who’ll tell you that “you just got it wrong”. He’s also always correct in this, but if so many teams “get it wrong” then maybe things like clean, xp and so on simply suck?

replies(2): >>42195278 #>>42198637 #
48. MintChipMonk ◴[] No.42194403[source]
> The concept is that, if you do needed things earlier in a product cycle, it will end up reducing your expense and time in the long run, even if it seems like it's taking longer for you to "get somewhere" earlier on.

Isn't ignoring the early steps that could save time later also known as false economy?

https://en.wikipedia.org/wiki/False_economy

replies(1): >>42195188 #
49. cellular ◴[] No.42194416{3}[source]
Everywhere i worked we had drivers running well before silicon came back.

We used simulators for hardware. Using parts of existing hardware when possible and hacked Microsoft sw emulation to behave as our hardware would.

When the hardware came back, it was less than a day to get the driver running.

50. marcosdumay ◴[] No.42195188[source]
Ignoring earlier steps is the basis of Agile.

It's only a false economy if they are the correct steps. If it turns out that they are wrong, it's a very real one.

51. marcosdumay ◴[] No.42195278{4}[source]
> I think it’s telling that none of the modern software design systems seem to have given us a world where our industry is capable of delivering software on time and within budget.

It's worth noting that left-leaning systems were widely used once too, and they had about half of the overall success rate of the right-leaning ones on those criteria.

replies(1): >>42196665 #
52. devjab ◴[] No.42196665{5}[source]
I’ve never seen any actual metrics on it that weren’t pseudoscience at best. If you have some I would genuinely like to see them.

From my anecdotal experience YAGNI and making sure it’s easy to delete everything is the only way to build lasting maintainability in software. All those fancy methods like SOLID, DRY, XP are basically just invitations for building complexity you’ll never actually need. Not that you can really say that something like XP is all wrong, nothing about it is bad. It’s just that nothing about it is good without extreme moderation either.

I guess it depends on where you work. If it’s for customers or a business, then I think you should just get things out there. Running into scalability issues is good, it means you’ve made it further than 95% of all software projects.

53. brightball ◴[] No.42198637{4}[source]
I’m curious what you think about XP is “shift right”?
54. Centigonal ◴[] No.42201048{3}[source]
a sinister observation, dexterously phrased.
55. JohnFen ◴[] No.42207068[source]
Thanks for the explanation.

I have always called this "front loading" and it's a concept that's been around for decades. Front loading almost always reduces development time and increases quality, but to many devs, it feels like time-wasting.

56. JohnFen ◴[] No.42207104{4}[source]
> From a QA perspective, I greatly regret that the world of infrequent releases is mostly gone.

From the perspective of a software user, I greatly regret the same thing. I really think that rapid/continuous release has done more harm than good.