[-] python@lemmy.world 8 points 1 hour ago

scream in happiness maybe. No more taxes to pay, no more emails to read.

[-] python@lemmy.world 8 points 1 day ago

Behold, one of the best purchases I have ever made:

It weighs like 3kg so you can even pull off some tape with just one hand

[-] python@lemmy.world 2 points 4 days ago

the "living" part is optional too

[-] python@lemmy.world 3 points 4 days ago

yes, basic Grapheneos feature.

[-] python@lemmy.world 41 points 4 days ago
[-] python@lemmy.world 164 points 6 days ago

It's a sauna hat, where else would you wear it?

[-] python@lemmy.world 9 points 6 days ago

Java is weird and I don't like it. It's the go-to language to learn as a first programming language in school and university, but the kind of Java that is actually used in corporate jobs, with all the weird frameworks and libraries, is so far removed from school Java that it feels like a whole different thing. Maven is weird and confusing and I don't get it (but I'm perfectly fine with Php's Composer and JS npm/yarn). And I have yet to come across any sort of real life problem where OOP is a better solution than Functional Programming.

51
submitted 2 months ago by python@lemmy.world to c/Dullsters@dullsters.net

I have it in a comically undersized pot because I'm only keeping it around as backup pollination. It doesn't know that and still tries to make fruit. They're so cute. Medium sized zucchini from one of my other plants for scale:

52

This is really stupid, because I've never believed in anything supernatural or astrology-adjacent at all.

But I've been working on a satirical plugin for YouTrack (Jetbrain's alternative to Jira) called Scrum Tarot, the equally accurate alternative to Scrum Poker. So I had to kinda look into what sort of Tarot cards exist, and played around with online tarot drawing tools like dailytarotdraw.com. And while the project is now in a "I've lost interest so I'll never finish it" sort of state, I do keep coming back to that tarot website.

It's just ..fun? Like obviously I know this stuff only works because the description of the cards is purposely vague so that your brain fills in the gaps and makes them fit whatever situation you're in. But drawing three at the end of the day and seeing how I'll interpret them has been very meditative and actually kind of a good way to figure out the things that weigh on my mind without realizing.

107
Friday evening (lemmy.nz)
submitted 3 months ago by python@lemmy.world to c/artshare@lemmy.world
87
refactor rule (lemmy.nz)
submitted 4 months ago by python@lemmy.world to c/196@lemmy.blahaj.zone
26
submitted 4 months ago* (last edited 4 months ago) by python@lemmy.world to c/homeassistant@lemmy.world

My home assistant setup is super simple: pre-configured Home Assistant Green box, Zigbee dongle and some assorted Zigbee devices scattered around my home. I have the Home Assistant app on my phone to see the Dashboard while I'm at home, but since I never configured the box to be accessible from outside of my network, I obviously can't see the Dashboard if I'm not at home. Very basic stuff so far.

A few weeks ago, I built a little automation. I shoved a vibration sensor into my doorbell box (it's one of those that uses an electric motor to hit an actual bell) and when it detects the doorbell ringing, it flickers my light and sends a notification that says "ding dong" to my phone. The purpose is just to hear the doorbell ring when I have headphones on. The lights work perfectly fine, the notification is a bit delayed sometimes because I probably don't give the App enough permissions to hang out in the background all the time. I've never felt like fixing it though, since the lights are good enough by themselves.

Now I'm on my first longer trip since setting up that automation and I've noticed that I occasionally get the "dong dong" notification on my phone. First few times I've ignored it, because I assumed it's just old notifications that got queued while I was home but didn't fire until the app was allowed to sync. But the notifications started coming in at way too reasonable times and I checked in with my husband at home -- turns out they're actually completely correct and I'm getting actual real-time notifications for the doorbell ringing.

But like - how?! I thought my Home Assistant Green box isn't set up to send anything to the outside world?! I can't see my dashboard from other networks, so why would notifications be any different? Does anyone have any ideas as to why I'm getting those notifications?

edit: Thought it would make sense to include a screenshot of my settings; As you see, my home assistant URL is a local IP address. I have no idea why my phone would be able to talk to that? It can't talk to my local-IP-only Jellyfin server either, so why would this be any different?

121
Radish update (lemmy.nz)
submitted 5 months ago* (last edited 5 months ago) by python@lemmy.world to c/dull_mens_club@lemmy.world

All my radishes have now sprouted! I thinned them out last week and had the spare ones on top of some potato salad.
Yesterday I also planted 10 Brokkoli saplings in between the radishes so that the planter isn't empty once the radishes are ready to go (should be in like 1-2 weeks I think?)
Oh, and I'm working on transitioning my sugar snap peas to the outside world. They're outside during the day and inside at night for now, but I'm hoping to keep them outside permanently pretty soon.

202

I know the radish trend ended like a month ago, but I'm still very excited haha

48
submitted 5 months ago by python@lemmy.world to c/justpost@lemmy.world

First time building a PC. The only somewhat reasonably priced DDR5 ram in my area was 2x 8GB SODIMM for 50 bucks.

341
submitted 9 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

124

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

192

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.

37
submitted 10 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?

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

nah they're right, I eat like shit

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

Sex probably isn't even FOSS

[-] python@lemmy.world 168 points 2 years ago

She's a long sandwich???

[-] python@lemmy.world 102 points 2 years ago

Oh god, mom is one of those project managers that sets up way too many Teams meetings

view more: next ›

python

0 post score
0 comment score
joined 3 years ago
MODERATOR OF