• 0 Posts
  • 35 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle
  • Counter point… Both are generating perfectly valid JSON, so who cares?

    Python 3.13.2 (main, Feb  5 2025, 08:05:21) [GCC 14.2.1 20250128]
    Type 'copyright', 'credits' or 'license' for more information
    IPython 9.0.2 -- An enhanced Interactive Python. Type '?' for help.
    Tip: IPython 9.0+ have hooks to integrate AI/LLM completions.
    
    In [1]: import json
    
    In [2]: json.loads('{"x": 1e-05}')
    Out[2]: {'x': 1e-05}
    
    In [3]: json.loads('{"x":0.00001}')
    Out[3]: {'x': 1e-05}
    
    Welcome to Node.js v20.3.1.
    Type ".help" for more information.
    > JSON.parse('{"x":0.00001}')
    { x: 0.00001 }
    > JSON.parse('{"x": 1e-05}')
    { x: 0.00001 }
    

    Javascript and Python both happily accept either format from the string and convert it into a float they are happy with.


  • https://en.wikipedia.org/wiki/Fast_inverse_square_root

    even if you can figure out specifically WHAT a function does, it’s not always clear WHY a function does, and honestly, if this function wasnt labeled in the code, no way in hell would I know what it does.

    It has an entire wiki page dedicated to explaining it, and it involves enough math that most people wouldn’t be able to follow along.

    Nothing this atrocious lives in any current codebases I work on… but if you work at an old enough company, some of the load-bearing code will be tricky to figure out what is calling it, but also it was written in a time where little hacks were needed to eke out performance.

    You only have to experience it once for it to be a memorable enough thing that you will cite it for the rest of your days.

    Or more realistically, it IS comprehensible, but the level of effort necessary to comprehend it is not worth it. So you leave it as “undecipherable” and move on.







  • If we assume “half a day” is 4 hours, and 500 pounds. That’s 125 pounds per hour. Which isn’t the worst rate. Assuming it’s actually capped at 4 hours and we all know that if it’s your dad’s friend, this is not going to be a set and forget kind of thing. So that 4 hours quickly becomes 10. And suddenly you’re down to 50 pounds per hour. And then if it’s actually static and simple and good, you still have high odds of getting insane feedback demanding changes to make it worse. A motherfucking website would actually be the best option, but wouldn’t get you paid. At that point youre just doing it for the lols.

    But ultimately, this isn’t even about the rate or how much time this will take. this whole scenario depends heavily on the son here. Is the son unemployed and living in dad’s basement for free? Then yeah. Sorry, he should probably take any work he can get for any rate he can get. His dad gets a lot more say in how things work financially if the son is relying on him financially. But if the son is already working a full time job and living in his own house? Then no, I don’t care what the rate is. Don’t commandeer other people’s time. Don’t make deals that people haven’t agreed to. Come to me with opportunities, not demands.


  • The “start button” is the kde plasma logo. So this would be Linux of some sort (makes sense given the community and what OP has said) and not windows

    The question is just whether OP is using steamOS that comes on the deck (and uses KDE plasma for desktop mode) or if they have installed a different distro that fits the desktop use case a bit better.




  • You’re right. There are multiple definitions of the word stable, and “unchanging” is a valid one of them.

    It’s just that every where else I’ve seen it in computing, it refers to a build of something being not-crashy enough to actually ship. “Can’t be knocked over” sort of stability. And everyone I’ve ever talked to outside of Lemmy has assumed that was what “stable” meant to Debian. but it doesn’t. It just means “versions won’t change so you won’t have version compatibility issues, but you’ll also be left with several month to year old software that wasn’t even up to date when this version released, but at least you don’t have to think about the compatibility issues!”


  • Debian aims for rock solid stability

    To be clear, Debian “stability” refers to “unchanging packages”, not “doesn’t crash.” Debian would rather ship a known bug for a year than update the package if it’s not explicitly a security bug (and then only certain packages).

    So if you have a crash in Debian, you will always have that crash until the next version of debian a year or so from now. That’s not what I’d consider “stable” but rather “consistent”


  • Definitely make sure you think through all the physical security implications of having your house automatically unlock in any scenario.

    Have the house auto unlock when getting home on a bicycle, sounds convenient until, as you point out, they could get stolen and now the thief has a convenient way to unlock your house. So you would not want that.

    You would definitely not want the house to STAY unlocked when something like a tag is in range. If your kid is home alone, you want them to be able to re-lock the house (or in general, you want to be able to lock your house while the kid is home).

    Whatever solution you wind up with, you are going to be trading physical security for ease of use (and complicated fun task). Be safe. Make sure the tradeoffs are actually thought through and worth it.



  • bisby@lemmy.worldtoProgrammer Humor@programming.devAI Suggestions
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    10 months ago

    too lazy to type this obvious thing in?

    This has been the thing for me. I get really bored and lose focus when doing all the obvious repetitive stuff. And the obvious stuff is the stuff I find copilot does best. For anything that requires thought I’m engaged. Those are the fun parts of the job. It lets me do more of the fun part.

    The one major downside that I’ve found is that sometimes I just want to tab complete a long variable/function name, and because of copilot i dont have “old style” tab completion anymore. (I could definitely still handle this myself, but i haven’t)

    edit: this all to say that I don’t use copilot to write code that I don’t know how to write, I use copilot to write code that I’ve written 1000 times before and don’t want to write again. Copilot does a good job of looking through all the open files for context to help make sure the suggestions actually fit into the codebase’s pre-existing style.



  • bisby@lemmy.worldtoProgrammer Humor@programming.devkno.wled.ge
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I didn’t realize that. I use a .xyz for a lot of my personal stuff and didn’t realize this. I wanted basically .website … i didnt want .com or .org or anything with tld that meant something, so xyz felt nice. Also, the domain I wanted with any popular tld was insanely expensive and i got my xyz for cheap when it was brand new (not for 1 dollar though).

    Maybe I need to look into new domains, but I probably will just stick with it since its primarily for personal use anyway.


  • bisby@lemmy.worldtoProgrammer Humor@programming.devHilarious
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    11 months ago

    Caveat: This is all written assuming the message is being written on a computer with a real keyboard. But if we’re assuming this is written on a phone, then my analysis doesn’t apply, but then again, writing a java program to execute in your messaging app is also a terrible idea. Which means we’re suspending disbelief, so I choose to believe that a computer keyboard and shortcuts are available.

    Type the phrase once. Select all. copy, paste, paste (the first paste replaces what you already have highlighted, the second paste adds a second copy). Now you have 2. Control + A, Control + C, Control + V… Now you have 4.

    It will take you only 7 cycles of this get 128*, you only need to copy/paste it one by one if you want to send each message separately. and even then, it’s would purely be copy the original, then paste, send, paste, send, paste send, paste, send.

    Assuming you can hold down control and just hit ACVV 7 times, that’s 28 keystrokes. I’d bet I can get that done in 5 seconds or less (i tried it, it’s less than that), so now I only save 5 seconds. Which means I only get 25 seconds to write the script. Which he chose to write in java for some reason?

    [print("I'm sorry") for x in range(0, 100)] is actually a script I could write in less than 25 seconds.

    *And I disagree with the “reason 4” given. She didn’t say “exactly 100 times” she said “100 times before I forgive you” and to me, “before” implies >= and not ==. So if you drop it in 128 times, that exceeds the criteria. No one has ever rescinded forgiveness for receiving extra apologies.


  • Its enough for me too. But not everyone has the same use case and environment. I definitely see why someone would want this.

    What I disagree with is that it needs to communicate to the internet to do this. It adds delay and potential for outage if your internet is out. But they do this so they can force you to get their app and milk you for extra data to sell. Internet capable smart devices are to harvest data not grant features. Features could be done better by ZigBee and a hub, but that doesnt grant the device a way to phone home