Simple, really. Abs(x-y) is the difference between the two numbers, absolute, so positive value. So, adding abs(x-y) to the smaller of the two numbers turns it into the bigger number. Plus the bigger number, now you have 2 times the bigger number
Simple, really. Abs(x-y) is the difference between the two numbers, absolute, so positive value. So, adding abs(x-y) to the smaller of the two numbers turns it into the bigger number. Plus the bigger number, now you have 2 times the bigger number
I use vscode because I do a lot of embedded.
Used to be that you had to jump through some hoops to make it work - make your own makefiles and stuff. Now, all the major vendors of MCUs are starting to develop vscode plugins as their “IDE” instead of those horrible ultramodified eclipse installs.
For me it’s stfu
I wouldn’t call 1tb storate for 4$ and 1tb egress for 7$ “dirt cheap”. Hetzner storage boxes are cheaper.
YouTube premium to access the higher bitrates through Yt-dlp ;)
Yt-dlp is great for getting music from YouTube music.
You even get fairly good quality if you have premium (I do through Argentina, so it costs me cents per month)
For remote backup, always keep your data in multiple ‘importance levels’. There’s replaceable, irreplaceable and very important.
Replaceable is non-niche movies and all kinds of other things that are commonly available, data not ‘exclusive to you’. Irreplaceable is data that is (probably) only owned by you - photos, videos, source code, documents and so on. Very important are the few documents you really can’t afford to lose. Security keys, banking info and so on.
I don’t bother backing up replaceable data - I keep one local and one off site backup for the irreplaceable data and very important data (1tb hetzner storage box is enough for me), and I keep a few encrypted physical usb sticks and sd cards strewn around at my parents and at work for the irreplaceable data that periodically get updated.
If you think a block of code needs a comment, turn it into a method and give it a proper name instead.
Really depends. Yes, if someone doesn’t get what’s wrong with this statement, they should. But you shouldn’t wrap something in a method all the time just because. Sure, maybe you can make it an inline method, but usually, a method call takes time, and while it’s not a lot of time, in constrained or complex system that can accumulate. A lot. Sure, the compiler might optimize stuff away, but don’t just go blindly trusting your compiler.
Sure, a method call for something that gets called once a second is not a problem. But when you suddenly have thousands and thousands of method calls when say, you click a button, which calls method x which calls method x1 which calls y1 and y2 which call z1-10 and so on, then the method calls can suddenly turn into a problem.
Maybe not on a fast, modern device, but on an older or more constrained device. If your code never runs on there, sure, don’t bother.
If you lost all your devices right now, what files would you miss? That’s what you should back up.
Definitely. I assume the actual cost for the cable is <10$, but engineering work gets very expensive very fast if you’re small scale.
I’m interested in something - say you got an order for 1 million units, what’s the price per unit you could offer?
Edit: just looked at the DIY option - seems right now you’re just using off the shelf parts, which is fine. Clever use of them, even. Main part seems to be ‘present usb device - once the usb device gets removed, lock down the PC’. So, you specifically just need some usb device with a cord that attaches magnetically - and securely enough that it doesn’t disconnect randomly, with some mechanical way to fix it to yourself. So yeah, at million scale, seems you could definitely sell it for 10 bucks a piece.
To me, the main thing about writing on a phone is the lack of well, a physical, full size keyboard. There are some foldable keyboards you can get that connect over Bluetooth if you want to go for long writing sessions. Otherwise, phones work just fine, with portrait mode as well.
If you’re just interested in prebuilts, personally I like the keychron k pro series keyboards! No idea about the specific ducky, but usually they’re a good brand.
Might be the wireless card. My T14 Gen 2 had a shitty mediatek card that often had such errors. Switched to an AX210, all issues went away. Might be worth it :)