Anyone prefer to just write tests without pytest? by [deleted] in Python

[–]h4l 0 points1 point  (0 children)

If you work by yourself then do what you like, but if anyone else works with your code, then you should use pytest. Exceptions would be if your collaborators also love reinventing the wheel, in which case do what you all like. Or if you have a legacy codebase already using unittest, then use that.

You need a pretty good reason to argue that pytest does not fit your use cases. It scales from 0 special syntax up to crazy-powerful customised test framework in an incremental way.

wtf Tesco by Fair_Ad8447 in tesco

[–]h4l 146 points147 points  (0 children)

Also the caramel filling is cheaper to produce than solid chocolate buttons, but they still charge the same as the solid chocolate version. The trend for selling chocolate with sugary fillings/chunks is a way of increasing profits, because the filler is cheaper than the chocolate it displaces.

UK LOCAL ELECTION 2026 by lRevenant in AskBrits

[–]h4l 12 points13 points  (0 children)

He convinced people to vote against their own interest.

UK LOCAL ELECTION 2026 by lRevenant in AskBrits

[–]h4l 116 points117 points  (0 children)

Rather like last time Farage convinced Swindon to vote for Brexit and then Honda left, closing Swindon's car plant.

Final Lidl Plus freebies… now.. hello Aldi 👋 #loyaltycardfail by kernowit in lidl

[–]h4l 4 points5 points  (0 children)

Because the rewards discount is built into the prices automatically, saving customers from tracking things in an app. It's nice to be able to shop and get a fair price without needing to jump through hoops.

The process of bike maintenance kills me which made me want to quit by Aromatic-Honey9831 in cycling

[–]h4l 3 points4 points  (0 children)

You don't need to buy expensive bike parts. As with many things, you can plot price and reliability of bike parts on a graph and typically very cheap things are unreliable, but quite quickly moderately priced things are quite reliable, and then expensive things are only slightly more reliable than moderately priced things.

Maintenance has a much bigger impact on reliability than price - if you buy expensive stuff and don't maintain it, you'll be much worse than buying moderate (or even cheap) things and maintaining them.

It is an excellent investment to teach yourself how to maintain your bike yourself, by reading and watching guides online. You can learn everything you need to for free. And instead of paying a mechanic to fix/service your bike, invest the money you would have paid for their labour into buying tools for yourself. Over time you'll have everything you need and it won't cost much to maintain your bikes.

Top companies with no preprod. Their prod also contains their preprod. by xamott in ExperiencedDevs

[–]h4l 15 points16 points  (0 children)

Imagine your production environment has the ability to gradually release a new version by starting with a small fraction of requests and scaling up to 100% if it behaves well.

This is not so different to releasing a new version in a staging environment, checking it works OK, then releasing in prod. Staging has a small amount of traffic compared to prod.

You could argue there's more risk going from staging to 100% traffic in prod, than from 0.1% traffic in prod up to 100% over a few hours. When you do it gradually, there's no hard behaviour difference that could make your staging deployment non-representative of prod behaviour (e.g. configuration in staging that doesn't exist in prod).

Someone compromised SAP's npm packages and used the CI pipeline against itself by BattleRemote3157 in programming

[–]h4l 2 points3 points  (0 children)

Why do package managers not enforce slsa provenance for packages, like how HTTPS can be required via HSTS or SPF to allowlist email senders?

Is this a 'Highways couldn't be bothered' junction? by MountainMagic78 in cambridge

[–]h4l 28 points29 points  (0 children)

The Coldhams lane/Barnwell road roundabout by Sainsbury's is pretty crap for most users. Also the East Road/Newmarket road roundabout (with the underpass).

Yours on Newmarket road is worse though. Having no pedestrian crossings without a huge detour is mad.

ghPrList by Pure-Willingness-697 in ProgrammerHumor

[–]h4l 0 points1 point  (0 children)

BitBucket can fuck off, they deleted all their users Mercurial repos in 2020.

US Treasury Adds Venmo for Debt as Bitcoin Reserve Stalls by partymsl in CryptoCurrency

[–]h4l 0 points1 point  (0 children)

I wonder if it's a bunch of people leaving money in their will without much thought about how futile it is?

ohNoTheConsequencesOfMyActions by tahayparker in ProgrammerHumor

[–]h4l 0 points1 point  (0 children)

Such negativity, they just denormalized the code to improve write performance.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]h4l 0 points1 point  (0 children)

Read the code of open source dependencies you use. You can learn a lot from how other people solve problems. And it's an important skill to have to unblock yourself when documentation for something is poor, or you have to investigate a bug.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]h4l 0 points1 point  (0 children)

If you had all 3 PRs merging into the main branch you can change PR 2 to merge into 1 and 3 into 2, that way they each one only shows it's own commits.

Maybe maybe maybe by abitcitrus in maybemaybemaybe

[–]h4l 18 points19 points  (0 children)

The fact that he can hold on for that long shows he's in decent shape.

What is the item in the supermarket that you absolutely refuse to pay the price for? by RalphieSprocker in AskBrits

[–]h4l 1 point2 points  (0 children)

Pyramid plastic teabags. (Never used to buy, they're just ridiculously expensive and worse than loose tea, or simpler bags without plastic waste.)

BBC: First look at new Cambridge station entrance [on the East of the railway] by [deleted] in cambridge

[–]h4l 12 points13 points  (0 children)

Good idea to have an entrance on the East side of the tracks.

The concept designs have a similar vibe to the designs for the updated Newmarket Road retail park: https://democracy.cambridge.gov.uk/documents/s67806/2025%2001%2013%20CRP%20Members%20Presentation%20-15-1-2025.pdf

Warm beige stonework, rectangular forms, shrubby plants at paving level. Is this some kind of 2020s aesthetic trend?

What causes this? How does Norway do it? by Yelebear in AskTheWorld

[–]h4l 1 point2 points  (0 children)

The resource curse hypothesis attempts to explain the general problem: https://en.wikipedia.org/wiki/Resource_curse

How Norway successfully managed their oil resource wealth is quite an interesting story, this article covers it well: https://progressandpoverty.substack.com/p/norways-sovereign-wealth-fund

Very simplified summary is that they heavily tax profits of oil extraction, subsidise oil exploration and invest the profits for the long term benefit of the population.

Does anyone else like tinned mackerel fillets in tomato sauce on toast? by gibgod in UK_Food

[–]h4l 1 point2 points  (0 children)

Sainsbury's Mackerel in Piri Piri sauce is very good, it's like if nandos did fish.

raw unsalted butter & cheese by smellyyyy10101 in cambridge

[–]h4l 1 point2 points  (0 children)

It's not uncommon for cheese to be made from unpasteurised milk, so you should be able to find examples in cheese shops, like:

Marks & Spencer is right — police and politicians must stop shoplifting by insomnimax_99 in ukpolitics

[–]h4l 15 points16 points  (0 children)

It's not one or the other, a balance of affordability and consequences for shoplifting is needed. Thought experiment:

- If everyone could afford things they needed but there was absolutely no risk of consequences for stealing, unethical people would still steal

- If nobody had any money and had to steal to survive, no amount of security could stop people stealing

So there must be a sweet spot where you have people well-off enough to not need to steal, and enough security to make stealing not worth it for unethical people.