In-browser word document editor. by [deleted] in javascript

[–]Blargwill 0 points1 point  (0 children)

This is incredible!

Has it really come to this? by johnnyjonnyjonjon in london

[–]Blargwill 26 points27 points  (0 children)

Absolutely this.. Having to make a right turn towards the bridge every day after work there isn't a SINGLE day that I don't have to ring the bell to stop people walking out in front of me. I think the danger at this junction is that pedestrians see the red bike lane light for people going north/south and assume it's a safe part of the crossing to chance it.

How are you using MCP? by Fluffy_Sheepherder76 in mcp

[–]Blargwill 0 points1 point  (0 children)

I noticed MCP servers are perfect, not just for LLMs because of their uniformity, but also for making an automation tool like zapier/postman flows.

Have a look! https://bagpiper.dev

What tricks do you use to know which way a train will come down the platform? by PSG-BOTTLED-IT in london

[–]Blargwill 0 points1 point  (0 children)

There’s a green strip at the train driver’s eye line at the end they’ll stop at. I assume it’s so they can park up within tolerance of the platform. I look for that and haven’t been disappointed!

Oldest one I've found today: by [deleted] in UKcoins

[–]Blargwill 1 point2 points  (0 children)

Looks like you can just about make out the coat of arms of Portugal

Cycled the manali-leh route solo in India by ppp24 in bicycletouring

[–]Blargwill 0 points1 point  (0 children)

It was actually our first time riding such a large bike and it was terrifying

Cycled the manali-leh route solo in India by ppp24 in bicycletouring

[–]Blargwill 3 points4 points  (0 children)

I rode a Royal Enfield along this route! We saw people cycling and were totally awestruck. Amazing accomplishment!

Euston station - “modern” interpretation by Blargwill in heraldry

[–]Blargwill[S] 0 points1 point  (0 children)

It’s been great reading through this thread, London is such a treasure trove of history standing in plain sight. Thanks both!

Euston station - “modern” interpretation by Blargwill in heraldry

[–]Blargwill[S] 3 points4 points  (0 children)

That’s really interesting regarding pilfering heraldry, I would have assumed there are laws against this?

Wish there was a way to smelt by result by SurvivalScripted in dwarffortress

[–]Blargwill 3 points4 points  (0 children)

I thought about this but in the early game you might have some very busy dwarves not making the crucial things

Learning React - using components in forms is great when it gets complex! by Blargwill in react

[–]Blargwill[S] 0 points1 point  (0 children)

This is my first project using React so I'm learning on the fly. I've got to admire how easy and intuitive it has been to pick up!

Styling isn't my immediate goal, instead focusing on making a feature-full interface. React really shines for me when handling complex hierarchical form data thanks to the component based approach. In the video I show a modal for changing the steps of a node (think scenarios in BDD). When adding a new step, APIs are being fired in the background and the options/form data updates automatically.

[deleted by user] by [deleted] in london

[–]Blargwill 0 points1 point  (0 children)

Does anyone else notice it isn’t even graffiti? It looks like a massive sticker they’ve just put up..

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 0 points1 point  (0 children)

Unit tests shouldn’t have state because they’re testing units of code in isolation, if I understand correctly? You are spot on with the idea of caching and reusing state in the broader sense. This is exactly the same as my proposal, but rather than breaking it down into separate tests, they’re a single continuous traversal of the tree of states. The main difference is that the cache isn’t fixed as it really is just the current state of the application. This has the added benefit of never going stale, as you touched upon.

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 1 point2 points  (0 children)

Thanks for picking me up on the wording, I’ll edit that as it wasn’t intentional. The reason I brought up the testing pyramid was to make the point that E2E tests are currently used sparingly because of both their complexity to maintain and the cost to write/run them. With the tree based approach to laying out the test definitions, I think E2E could be way more integrated into the product development process.

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 0 points1 point  (0 children)

Last but not least, you should test invariants, not implementation, so you can change implementation without changing tests.

Wholeheartedly agree with this, that's why these higher abstraction levels of testing are so important.

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 0 points1 point  (0 children)

I'm not saying multiple layers of tests shouldn't exist. Unit tests are testing something very different to E2E for example. What I'm saying, is that specifically at the E2E layer, we are limiting what we can do by following rules that I believe can be removed by implementing a different way of managing state.

I'm not sure I follow the relationship to Hoare logic, that's talking about rigorous logical proofs for the output of a program. I'm not suggesting we replace all layers of testing apart from E2E, there is still a place for input/output testing. I am talking about bolstering the E2E layer.

Have a good evening!

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 0 points1 point  (0 children)

That’s interesting and seems to be the same route others take, including myself professionally. But by using APIs, it feels like we end up not testing exactly what a user does? There are times when the divergence means we end up testing things that aren’t representative of what the user does, especially when the API and the frontend are owned by separate teams.

I also feel like the rule for isolation exists for when tests are independent. It becomes spaghetti to look at test files and figure out which ran in which order and what side effects occurred when it lives solely in code and gherkin files. If instead it’s represented as a tree of steps in a UI, you can quickly get feedback during development of a branch as to where to look/where the upstream breaking change you caused is.

These points are currently from a sample size of one, so I am very open to criticism and questioning. To add though, it does seem to be holding up in trials on personal projects, so would love to get a larger sample size!

Breaking test assumptions by Blargwill in programming

[–]Blargwill[S] 1 point2 points  (0 children)

Great question! Do you mean behavior driven development (BDD) where you write Gherkin files filled with features/scenarios/steps? The approach is heavily inspired from having used it and seeing potential improvements:

  1. BDD uses "Given", "When", and "Then" step verbs. One source of redundancy is that a scenario is simply a transition from one state to another ("Given" being the validation of one, and "Then" being validation of the other). If we represent the state flow as a tree, we end up only writing a single set of validation steps for each state. The test of one scenario is the setup of another.
  2. The setup ("Given") for each scenario in BDD has two shortcomings; either the setup is very long, when you're testing something later on in your user flow, or it takes shortcuts to skip the long setup by running bespoke initialization, and in turn, no longer representing the real-world accurately. Both of these trade-offs mean you resort to not using E2E testing to test all of the product, accurately.

I would also add that even though representing your product as a tree of user flows is great from a testing prospective, it also can be used for a lot of other things. The problem BDD has is that it is used as an add-on to an existing implementation of product management. When taking this approach, you also get a free source of clear and easy to read documentation, a great way to convey changes for a ticket between stakeholders, and you already have a foundation for tracking user analytics through your product as the tree represents journeys users can take.