asyncrosaurus

joined 1 year ago
[–] asyncrosaurus 1 points 1 year ago

Plus, with server side rendering you also have to recompute the HTML for the entire site, which often means re-computing a whole bunch of non-trivial queries as well.

This is actually why I really like HTMX, you load a page once, then make AJAX requests that return html which you can use to replace or add to the DOM. It provides an interactive front end where the backend provides full rendered html partials. Simplifies the entire application by keeping logic and state only on the server, which means you never have to worry about synchronizing front-end and backed state.

[–] asyncrosaurus 67 points 1 year ago (13 children)

SPAs are mostly garbage, and the internet has been irreparably damaged by lazy devs chasing trends just to building simple sites with overly complicated fe frameworks.

90% of the internet actually should just be rendered server side with a bit of js for interactivity. JQuery was fine at the time, Javascript is better now and Alpinejs is actually awesome. Nowadays, REST w/HTMX and HATEOAS is the most productive, painless and enjoyable web development can get. Minimal dependencies, tiny file sizes, fast and simple.

Unless your web site needs to work offline (it probably doesn't), or it has to manage client state for dozen/hundreds of data points (e.g. Google Maps), you don't need a SPA. If your site only needs to track minimal state, just use a good SSR web framework (Rails, asp.net, Django, whatever).

[–] asyncrosaurus 7 points 1 year ago (4 children)

This is the correct comment.

Martin Fowler called them sociable tests. The only way to properly test your units' behavior is to pull in their dependencies. Isolated tests are useless, brittle and slow to write.

[–] asyncrosaurus 0 points 1 year ago (2 children)

Oh wow, aren't you a cranky bitch. I didn't say you "should " do anything, I linked a tool I've constantly been told good things about.

I bet you’re the type to follow the docker install instructions*, arent you?

You know what they say about when you assume, you turn out to be an ignorant dipshit.

[–] asyncrosaurus 3 points 1 year ago

Don’t use ~~exceptions in~~ C++ anymore

~~/s~~

[–] asyncrosaurus 7 points 1 year ago

It's a form of Black-Box Testing, essentially you want to validate expected behavior. Implementation can change, but your outcome should remain the same.

This is a big target for Test Driven Development, since your first step is to write the test with the expected outcome, then you write the most basic implementation, and when you can verify the behavior, then you are free to re-factor to improve implementation knowing your test will tell you if the behavior changes with each internal change.

[–] asyncrosaurus 14 points 1 year ago* (last edited 1 year ago)

Update: https://github.com/moq/moq/issues/1374#issuecomment-1671166436

Dev is still defending his action and apparently believes he's done nothing wrong. Harvesting developers email and extorting them by sabotaging builds is no big deal.

Absolute clown. OSS needs a better solution to funding devs hard work, but it is not a vehicle for an egomaniac to get rich.

I'm still pro-not mocking. Maybe this is a good opportunity to stop using so many mocks in our tests, and write validation on the actual behavior of your code.

[–] asyncrosaurus 17 points 1 year ago (2 children)

I was there for the first wave of SPAs, I even learned angularJs and Knockout. It did feel like a major atep forward, being able to make highly interactive applications. However, things quickly went off the rails when the tools stopped being about managing heavy client state, and became the default for everything, even when it ment using JavaScript to build extremely basic functionally browsers did natively with html, but extremely worse(e.g. navigation). The modern Web really is a victim of hype and trends.

Unless your app needs to work offline, or you have to manage dozens of constantly changing client side data points concurrently, your site doesn't need to be a big heavy js framework. My rule is if it looks like Google Maps, you need a SPA. if it looks like Gmail you need REST/HATEOS. and if it looks like google's mainpage, you need a server side rendering.

At some point you might see the light, and go back to making your websites simpler, but Im not hopeful. Until then I'm building the majority of things with HTMX and alpineJs.

[–] asyncrosaurus 3 points 1 year ago (5 children)

You couldn't pay me enough dollars to cover the therapy caused by having to maintain the "flexible" code that added complexity and abstraction for a single use case that was never expanded to handle more.

[–] asyncrosaurus 6 points 1 year ago

Ignore the weird tribalism over the languages other people prefer to use.

Just one thing to keep in mind about VB.Net, Microsoft considers it "done". Active development is done, yhe language won't receive any new enhancements anymore, so all the cool new C# features (like pattern matching) will not be back ported to VB.Net.

[–] asyncrosaurus 4 points 1 year ago

The sad truth is Twitter actually DDoSing itself.

view more: ‹ prev next ›