Readit News logoReadit News
aswerty commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
aswerty · a month ago
The Zen of Python: there should be one obvious way to do things.

Python in practice: there is more ways of doing it than in any other programming language.

Oh Python, how I love and hate you.

aswerty commented on So you're a manager now   scottkosman.com/post/blog... · Posted by u/mooreds
paulcole · a month ago
Agree 100%.

This is the difficult conversation template I put together and use:

https://docs.google.com/document/d/1gHyfR0XAc5ehRoqRImV1yAFh...

aswerty · a month ago
Great template.

It certainly reflects the process I've gone during some difficult conversations, at least when I did them well. And I've certainly done the other approach where I just dug my trench and they dug theirs; oh lord, is it a terrible approach!

aswerty commented on It's time for modern CSS to kill the SPA   jonoalderson.com/conjectu... · Posted by u/tambourine_man
aswerty · a month ago
I'm not a fan of the SPA, or at least in practice, but there is something very attractive about going with a solution that everybody knows.

At work we are building a new "website like" frontend and it is a SPA (that internally operates as a MPA) built with React. The main reasons are we: know this setup well and know when hiring we will find people who know this setup as well. Beyond that, it will allow us to build out more application like features in the future if needed.

This approach has been popular in the industry for over 10 years now. Whereas most of the current discussion and tech on the frontend feels like churn and betting on the next thing. A lot of people just want tools that are mature and can get the job done regardless of them being the best tool under specific criteria.

aswerty commented on Astro is a return to the fundamentals of the web   websmith.studio/blog/astr... · Posted by u/pumbaa
aswerty · 2 months ago
It's clear to me that the frontend conversation space is broken. Not even just the ecosystem being a mess.

Boiling down the conversation I see in the article, it just seems to be: the browser as a HMI vs the browser as a an application runtime. Depending on what you want to do one might be a better fit than the other. But the points it puts forward are fluff arguments like "it's a breadth of fresh air" or "it loads faster".

It's difficult to articulate the source of just how broken the discussion space is; nor have I made a particularly strong argument myself. But I think it's important to keep pushing back on conversations that position framework's like they are brands winning hearts and minds. Ala the fashion industry.

Dead Comment

aswerty commented on Why Property Testing Finds Bugs Unit Testing Does Not (2021)   buttondown.com/hillelwayn... · Posted by u/Tomte
Akronymus · 3 months ago
That's a fair concern. I can only really suggest upping the amount of test cases that are ran when merging so that you get a much more extensive run for that time, and later dial it back. Along with having the seed included in the failure case, so that you can bisect to check what actually broke that test. Also, implementing a standard test alongside the property based on, for all bugs you encounter over time (basically "hard coding" one of the failure cases)

But yeah, probabilistic testing isn't perfect.

aswerty · 3 months ago
Potentially using the git hash as a seed would make sense, so for a given snapshot of code it is always going to be deterministic. When the git hash changes (i.e. your code) then that would result in a different set of test inputs running.

Allowing reproducibility for a given change set.

aswerty commented on Why Property Testing Finds Bugs Unit Testing Does Not (2021)   buttondown.com/hillelwayn... · Posted by u/Tomte
alkonaut · 3 months ago
I think it goes without saying. PBT shouldn't be random-random (e.g. use a timestamp or cryptographic seed), it should be deterministically pseudorandom if it uses random values. You shouldn't be able to run it 10 times and get 9 pass and one failure. It's either 10 passes or 10 failures.
aswerty · 3 months ago
Just as an anecdotal experience. It doesn't necessarily go without saying.

The most memorable discussion I had around PBT was with a colleague (a skip report) who saw "true" randomness as a net benefit and that reproducibility was not a critical characteristic of the test suite (I guess the reasoning was then it could catch things at a later date?). To be honest, it scared the hell out of me and I pushed back pretty hard on them and the broader team.

I have no issue with a psuedo-random set of test cases that are declaratively generated. That makes sense if that is what is meant by PBT. Since it is just a more efficient way of testing (and you would assume this would allow you to cast a wider net).

aswerty commented on Ask HN: SPA vs. SSR in 2024?    · Posted by u/_bin_
aswerty · 4 months ago
My 2 cents

The SSR game is peak frontend fashion.

The players in this space sell hosting solutions and getting you onto their platform and spending money is their primary goal (i.e. increasing the amount of server side compute and ancillary "services" needed to deliver a frontend solution). Regardless even if you go SSR the backend elements should just be used for SSR, and potentially things like auth, but otherwise just go with a data API as normal that provides the SSR backend with data. Rule of thumb, the SSR solution should never be considered "backend" even if it is running on a server and not the client.

SSR means it is way more difficult to open the network tab in developer tools and understand how your frontend is driving your API. I don't think I fully appreciated looking at the JSON sent over the wire in this tab until I did some SSR work.

If you go with SSR expect ridiculous churn in your technology space.

In the end I have latched onto vanilla React (e.g. no framework like Next) SPA that lazy loads components so you don't have a huge download on the first page load. I use wouter for routing and am pretty much trying to minimize all other deps where possible. I've gone with Preact but am questioning that a little now since it feels like I'm going off-road a bit on my simple setup.

I'm no expert on the frontend but thought I'd share my experience walking down this same path over the last 3 months or so.

Edit: how ironic that I'm calling React "my simple setup"...

aswerty commented on Show HN: I made a live multiplayer Minesweeper game   minesweeperpro.com/... · Posted by u/bluelegacy
vladde · 5 months ago
This is super fun!... until you meet someone who is just sweeps (pun intended) the floor.

There is no way for me to even play with some players. I wish I could "block" them, because the fun is gone when every tile is gets completed before I can even react.

My best game was my first, where I played against people my skill. Whenever the user "rapidash" is in the lobby, I might as well just quit, since I won't be able to get in more than one or two correct placements.

aswerty · 5 months ago
I just assumed they were bots since they seem to be clicking at the rate limit.
aswerty commented on Google to buy Wiz for $32B   reuters.com/technology/cy... · Posted by u/uncertainrhymes
aswerty · 5 months ago
Wiz seems to only be about 4 years old, as per wikipedia. That valuation in such a short amount of time surely must be some kind of record? Or am I missing something?

u/aswerty

KarmaCake day353June 6, 2012View Original