[-] python@lemmy.world 29 points 1 month ago

The genders are actually Bouba and Kiki

345
And so it begins (lemmy.world)
submitted 2 months ago by python@lemmy.world to c/linux@lemmy.ml

I installed Linux Mint for the first time on my personal Laptop just a few months ago, and it ran so well that I didn't want to mess with it to try out different distros.

But today, my company's IT department announced that they have some spare old Laptops to give away (technically because they didn't meet the specs for Windows 11, didn't stop the IT department from giving them out with Windows 11 pre installed though)

So now I got a few devices to play around with!! They're a Precision 7530 and a Latitude 7390 2-in-1!

I already got ZorinOS running on the little guy because apparently Zorin is nice for Touchscreen support. For the big guy I was initially thinking that I could try Bazzite, but the installer was like "Intel UHD Graphics aren't really recommended" so I might try something else first. Any recommendations? I mainly just want to try as many different flavors of Linux as I can haha

[-] python@lemmy.world 46 points 2 months ago

Hehe stable... like where the horsey lives

[-] python@lemmy.world 41 points 3 months ago

The fucking documentation for the libraries we program with, apparently. Everyone else at work either just vibecodes or goes "aw I don't know how to do that, it probably can't be done :c"

5

Not really a shower thought, but a "spraying my hair with dry shampoo before a Teams meeting" thought.

[-] python@lemmy.world 80 points 3 months ago

Not to spread concern or anything, but the electrical grid is managed and controlled by software. And that software may or may not be very reliant on AWS. I'm probably not allowed to say more than that.

8

That is such a cursed combination of words. She climbed into my credit card holders metal loop while I was answering a Teams message and got stuck. Only started backing out voluntarily when I lubed her up. She's all right now, there was only a slight hint of a dent about 5 minutes later and it's all gone by now.

This is a shitpost because I realize that this situation is fertile grounds for puns and innuendos. Go ahead.

[-] python@lemmy.world 33 points 3 months ago

Gross, I only date people who are Views or Controllers

37
submitted 4 months ago by python@lemmy.world to c/webdev@programming.dev

Okay so, context, I've come across this video last night. It's a short comparison between React and Svelte. Point 9 - Shared state (6:20) mentions that React doesn't really have a primitive way to share state between nested components and that you basically need to use something like Redux to get that working.

But... I've been sharing state between nested Components in just React for a while now and didn't know that I can't?? But I also don't remember where I learned to do it, so the chances are high that I just hallucinated up this method as a Junior.

Basically, when I want to share state I just make a new Context and ContextProvider, wrap it around the highest level Component I need it in, and use it lower down in the component tree.
If I need a state, I put the two outputs of the useState hook into the context (which feels nice because when I look through the code, I can see right away which children only read the value in the state and which children actually take the setter and have the capacity to change that state). Sometimes I don't even hand out the actual setter from the state, but a new function that also does some input validation before calling the setState itself. Doing it this way has always felt pretty clean to me.

From the React documentation, it seems to me like that's exactly how you're supposed to use Context. But I've also never seen anyone else do it like that. So is it incredibly ill advised and I've been shooting myself in the foot this whole time?

As a more specific example, my most common use case is that I need to render fetched data in a grid. This data can be filtered, but the component that sets the filter state is either on the same level as the grid (the grid's built in filter menu) or above it (a button that sets a predefined quick filter) or even further above that (a useEffect that looks for query parameters in the URL and sets those before the data is fetched for the first time).
So what I'd do is const [filterModel, setFilterModel] =useState() at the highest level and pass it to <FilterContext value={{filterModel, setFilterModel}}>. Then, I'd just use const {setFilterModel} = useContext(FilterContext) within all the components that write the filter and const {filterModel} = useContext(FilterContext) everywhere where I just need to read the filter, like in the hook that actually fetches my data. Does that make sense? Is there an easier/safer way to do it that doesn't involve adopting yet another external library?

2
75
submitted 5 months ago by python@lemmy.world to c/asklemmy@lemmy.ml

I'd give laser pointers to Neanderthals. Even if they did figure out some useful application for them (maybe hunting?) they'd run out of batteries eventually.

0

On a touchscreen !!
Within a pan-pinch resizeable container !!
With a weirdly-shaped Grid !!

(Didn't know where else to post this, since it doesn't seem very relevant to !webdev@programming.dev, but I needed to exclaim this somewhere haha)

7
submitted 5 months ago* (last edited 5 months ago) by python@lemmy.world to c/webdev@programming.dev

Hello! I'm messing around with some PWA features and getting really stuck when it comes to display modes. Basically every browser and device I test on behaves wildly differently, and I'm having a hard time distinguishing which of those behaviors are errors on my part and which are just browser funkiness.

(Link to my PWA if you want to check the manifest or see how it displays for you)

In my manifest, I try to set the display mode to fullscreen. This setting seems to only be properly and consistently applied when I test on my Lenovo Tab 11 running Chrome. Firefox on the same tablet does not respect it and starts in standalone mode, unless I also have the Chrome Version of the PWA installed. Once that is the case, Firefox is beautiful and consistent. I have no idea why the different versions installed by the different browsers would interact with each other like this.

When I install the PWA on my phone (Pixel 9 Pro running GrapheneOS), via Chrome or Vanadium, the site thinks it's running in fullscreen, but I still have a black bar at the top (it doesn't apply the theme color set in the manifest!). This wouldn't be a problem per se, but the browser also sets a safe-area-inset parameter, which, when I respect it, leads to a very fat distance from the top (the safe inset is green):

spoiler

When I install it on my phone via Firefox, the app sometimes thinks it's display-mode:browser but displays perfectly fine as fullscreen, and sometimes it thinks it's fullscreen but displays more like a standalone. It seems completely random and can change any time I close the app or navigate away from it:
spoiler

When I install the PWA on my secondary phone (Moto G100) via Chrome, it has similar issues as on my main phone (it thinks it's fullscreen but is actually standalone) but it does not apply that ridiculous safe-area-inset. That backfires sometimes as navigating back via gesture will catapult the page to take up the full height, so the header shifts into the top bar. Would have been nice to have that safe-area here...
When I install it via Firefox on the Moto G100, it looks good about half of the time! Actual fullscreen with proper safe-area that doesn't break on navigation. Sometimes it randomly starts in standalone mode, but with the proper theme color applied to the top bar. Everything breaks if I have the Chrome version installed at the same time though. Then, the firefox version will never show up as proper fullscreen, but always have almost the same display issues as the Chrome version on that same phone.

I haven't even tested the PWA on iOS yet (I'll have access to an iPhone in about 2 weeks though so I'll test it then) but I'm guessing it will have its own display challenges as well. I'm also still battling the display issues from swapping my SVGs to generate with colors from the OKLCH system (it seems to really mess with any open source browser I've tried). So maybe, I should just ignore the browser display issues for now and focus on my color display issues instead?

Also, does anyone know if I can just let the user decide on their own preferred display mode? It would probably be the best solution to just let the user set the display mode that actually works in their specific browser. But as far as I understand how manifest files work, I can't really change much once the app is already installed, and I haven't found any online documentation that would suggest that I could programatically change the display property in the manifest based on user input :( But maybe there's some workaround you know about?

I would be very happy about some pointers and feedback on how I might get this display thing halfway consistent!

[-] python@lemmy.world 29 points 6 months ago

Alpha bros and pickup artists make a lot more sense once you know about the Diagnostic Checklist for Psychopathy.

spoilerItem 1: Glibness/superficial charm
Item 2: Grandiose sense of self-worth
Item 3: Need for stimulation/proneness to boredom
Item 4: Pathological lying
Item 5: Conning/manipulative
Item 6: Lack of remorse or guilt
Item 7: Shallow affect
Item 8: Callous/lack of empathy
Item 9: Parasitic lifestyle
Item 10: Poor behavioral controls
Item 11: Promiscuous sexual behavior
Item 12: Early behavior problems
Item 13: Lack of realistic, long-term goals
Item 14: Impulsivity
Item 15: Irresponsibility
Item 16: Failure to accept responsibility for own actions
Item 17: Many short-term marital relationships
Item 18: Juvenile delinquency
Item 19: Revocation of conditional release
Item 20: Criminal versatility

One of the most commonly observed traits in psychopathy (the actual mental disorder, not the distorted tiktok pop-sci version of it) is that someone suffering from it has very reduced feelings of anxiety and shame. Makes sense that they'd be confused by someone else feeling anxious and not really understanding why they'd choose to present like that.

[-] python@lemmy.world 59 points 6 months ago* (last edited 6 months ago)

Software devs also hate UX/UI Designers.
And Product Owners.
And Scrum Masters.
And Software Architects.
And Security/Compliance Managers.
And QA Testers.
And worst of all... Software devs.

77

The cobblestone roads shook up all the drinks I was carrying home on my bike 😠

[-] python@lemmy.world 104 points 6 months ago

Sex probably isn't even FOSS

22

As in, I remember that back in my apprentice days I knew how much I got paid per hour.
Now recently I had to look trough my documents to find out what my monthly salary even is because it's raise season and I have to give my manager a number higher than that so that he can advocate for it to the board of directors.

I still remember my yearly salary semi-accurately (like within 10%), but I bet super rich people either go by decades or don't know at all what they make in a year.

On the other side, my friends who work retail jobs have a decent estimate of what they make per week or two week span, even if they are paid monthly.

1
submitted 8 months ago by python@lemmy.world to c/fitness@lemmy.world

I've been exclusively on Garmin watches since my interest in fitness started, my current Watch is a Forerunner 255s that I bought around 3 years ago. Thing is, it's been slowly starting to decline in battery life (one charge maybe lasts 5-7 days) and my height sensor started to really drift around, giving me that "You climbed 10 stories!" achievement like 7 times every day.

I was going to get a new Garmin when this one completely bit the dust, but due to a weird bundle deal at the Google Store, it was 300€ cheaper to buy a Pixel 9 and a Fitbit Charge 6 than it was to just buy the phone.

I can't sell the Fitbit for at least two years, since I bought the bundle as a "work expense" without paying taxes. So my options are to either use it myself or to give it to someone who I could quickly get it back from if the Tax Agency comes to check on whether I'm not reselling.

Sooo... does anyone here use Fitbit and could share their opinion on how it holds up? I'm especially interested in hearing how long the battery lasts and whether it works well with ANT+ devices (I use a Polar HR Strap and occasionally a bike cadence sensor)

Also, how annoying is it to listen to music on it? I bought the Music variant of the Garmin just to find out that it only really works with Spotify Premium... which I'm way too cheap to get. And manually transferring MP3s to it is really annoying haha

83
submitted 8 months ago by python@lemmy.world to c/196@lemmy.blahaj.zone
[-] python@lemmy.world 113 points 1 year ago

She's a long sandwich???

[-] python@lemmy.world 29 points 1 year ago

We'd get along fine, but feeding two people on one salary will definitely be annoying (my job has a non-competition clause where I can't pick up a second job in the same field), and getting enough adhd meds for the both of us will be impossible due to strict regulations here.

One of us still could bring value to the household by being the designated bangmaid though

[-] python@lemmy.world 31 points 1 year ago

tummy ache city

[-] python@lemmy.world 61 points 1 year ago

I'm only a regular so far, but my theory is that seniors don't have that much more knowledge or skill - they're just much more comfortable in putting out fires and don't get as stressed when they don't know what to do. I aspire to become as hardened as that some day haha

view more: next ›

python

joined 2 years ago