Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Shit.
Thought I had turned off the stove after making dinner but seems it stayed on.
Thankfully the kitchen automatically turns off after a set time, so only the pan and a couple nearby things were lost.
Still, seems some electric wire in the extractor got wrecked because the kitchen line breaker is down and won't go up.
Waking up to your house full of smoke really sends you into panic mode...20 -
In my latest installment of "Swift, WTF?", we look at the "if" conditional in terms of the Swift convention of:
if let x = y { /* ... */ }
so what this does :
1. declares x in the scope of the braced code
2. sets x to y (an ahem, "optional")
3. decides if x is not *nil*, then executes the braced code.
This is very similar in both the visual and the operation to the C code of:
if (int x = y) { /* ... */ }
1. declares x in the scope of the braced code
2. sets x to the value of y
3. if x is not zero, then executes the braced code
which is considered *exceptionally* poor style.
Neither the C nor the Swift construct result in a legitimate boolean value of "true" or "false", although C comes closer than Swift.
In the Swift case the *imaginary* "nil" value has to be interpreted as "false" and thus there must be extra code is for the conditional to check on whatever constitutes the **actual** value of nil in Swift and then set the condition to "false".
(remember boys and girls, "optionals" are not real, they are an imaginary language construct of Swift and have no legitimate counterpart in the CPU operations with memory and registers)
At least in the case of C, if the value of x is zero or NULL (which is 0) then it is technically a "false" which in C is 0. Regardless, it is really poor programming and anyone doing that on my team gets an ear full.
But in Swift this obfuscation of code is common and condoned! Well, why not put more of the program in the condition of the if? In fact, stuff the whole thing in there.. why not? 🙄
This just reenforces my opinion that Swift is not a bird but the stuff that comes out of the underside of the bird. 🐦💩24 -
You know what I find truly despicable? Consultants who grossly over-sell worthless digital products.
Take a guy who throws together 2 text boxes and a list in Figma and calls it: "The disruptive platform that will solve all your problems at once today!". Are you fucking kidding me? Such an insult to people's intelligence.
There is a saying: "A salesman will sell you a dirty cloth for the price of a house".7 -
Am I in a toxic work environment or not?
1. I suggested implementing some code guidelines for our team so we can all work the same way. Lead architect sends me a DM telling me to stop talking about it until after projectX is done because it might stress out other devs. Friday he talks about how important it is to use standardised tools and ways of doing things.
2. Spent a week working on a bug fix and they said solution is good, but then invalidated all of my work by DM-ing me saying it's unusable because i worked on wrong branch and he quickly fixed it over the weekend and I should just copy his (inefficient) code.
3. I ask him a basic question of what version the backend software is using and he doesn't even respond. I ask another team member who quickly helps me check. it would have taken 1 fucking integer to answer that question. i wanted to learn the backend stack, but not so much anymore.
4. Lead doesn't respond to project management software ticket mentions.
5. Lead randomly makes hotfixes to the QA server without prior notice so the backend randomly goes down at times during work hours and then my local copy of the front end stops working for no reason at all when I am trying to focus on bug fixes
6. UX/UI designer's screen designs look completely different than the actual app, so I spent weeks implementing a feature looking like his nice designs, then having to change it again, taking another week.
7. Generally poor comms
8. Leadership mentioned jobs are safe, then 2 months later retrenched a bunch of people.
9. People getting sick all of the time.
10. Nobody gives a shit about technical debt21 -
Finally got paid (apparently they sent my money to the wrong account lmao).
So I bought:
- A Guitar Rig Kontrol 3. It's an old hardware designed for some specific soft, but it contains a soundcard, 8 foot switches, one expression pedals (continuus), 2 other expression pedals input, 2 audio input, 2 audio output. So I'll be able to plug my guitar and control FX from there. All of this for 50 euros at the pawn shop
Being a programmer helped me tremendously for electronic music because I can write actual drivers for old hardware.
- I also found an old bike on the street. Brakes and transmission, seat and tyres are fucked, but the frame and wheels seems healthy enough. I can get a decent bike for the price of parts and labour.5 -
spent the whole week working on a bug fix last week.
implemented a method to filter some data to make it easier to use in the HTML template.
friday's session with other programmers to review code went well, they said the method is pretty good and works nice. (I must admit there was an elusive bug that prevented the component to render and none of us could figure it out)
i get back on monday to a message from the lead saying the code is unusable and they reverted to the previous (convoluted) way of doing things and i should do the same in the future. just copy their work.
i check the typescript class. fucking method that was used (which he told me not to use and I should copy and work off of), he went and just changed the method's name, and the body is EXACTLY the same as his existing method.
this code base is ridden with re-used methods (I managed to extract two reused ones into a service some time ago), the use of any for 90% of method return types and variables...
WTF. I am losing all of my respect for seniors and faith in this company.
This is why I am burned out. You are farting against a hurricane and everyone else's shit is coming back onto you. This is fucking insane. Or am I insane?13 -
Sometimes, Google's solutions are worse than the problem they intend to solve.
For example, Google ReCaptchas are worse than spam, especially those with the pictures that fade extremely slowly on purpose. Unlike bots, humans are likely to not finish deliberately annoying captchas to save their precious time. (see http://archive.today/2022.06.25-110... )
In Chrome (mobile version), pull-to-refresh saves the one second it takes to reach for the refresh button in the submenu, but poses a threat of accidental refreshes each time you swipe down intending to scroll up. Over two thousand people have complained about this. ( http://archive.today/2025.02.26-153... )
With Android 4.4, Google blocked write access to memory cards (MicroSD) from all user-installed apps with the exception of app-specific folders so apps can not leave files behind when uninstalling. Google provided no option to change this. (source: http://web.archive.org/web/... )
But for unwanted files, there is already a delete button! Why take away the freedom to use the MicroSD card properly?
Google crippled the usefulness of memory cards for this nonsensical reason.
Google solved these problems with solutions that are worse than the problem.3 -
Modern smartphones: "Powerful", "marvelous", but corporate overlords dictate what you actually get to do with it.
They lock your bootloader and prevent you from installing third-party operating systems.[1] Now they are starting to block third-party app installation only in certain situations, but this will sure as hell escalate.[2]
They block you from using the MicroSD card properly or take away the memory card slot entirely, decide what you are allowed to screenshot[3], and they lock your user data (like browsing history and saved pages) away from yourself to "protect you" from imagined evils. But this "protection" is actually the curse.
They also refuse to implement features people ask for like always starting with the rear camera regardless of the last used camera[4] and let the user backed up saved pages[5]. Something as simple as turning the flashlight on and off while recording a video took over a decade for Samsung to implement when shouldn't have taken a single afternoon.
----
Sources:
[1] Xiaomi prevents unlocking the bootloader but graciously allows it seven days after purchase. I believe that as the buyer, you should be able to install any operating system you like.
[2] (added through edit, hence last) Since Android 16, Google blocks APK installations during phone calls, supposedly to protect against scammers. But if history teaches us anything, it means this will quickly escalate and end with APKs being blocked completely or only installable through ADB, which requires an external computer and a USB cable.
[3] Google and Apple let app developers block users from taking screenshots. This is, for example, used by WhatsApp to prevent screenshots of profile pictures, even though everyone knows one should not put something in a visible spot on the Internet that one does not wish to be preserved. I believe people should have the freedom to screenshot anything that appears on their screen, like desktop operating systems (Windows and Linux) do. The buyer deserves to have the final say on a device they paid for.
[4] https://r1.community.samsung.com/t5...
[5] https://forum.developer.samsung.com/...34 -
I've finally put two and two together about my mother and why she acted the way she did with me my whole life.
Since four years old, she told me again and again that I will be a programmer and "earn as much as Bill Gates". Then, in fifth grade, without asking me, she made me take regular programming classes I was really bad at. Then, again without asking me, she sent me to an experimental, highly intensive CS learning program in my uni that accepted kids two years before they finish the high school to throw a metric ton of math, C and hardware design at them. After a year there, I completely lost the ability to enjoy videogames (at 15 years old). By the end of the program (four years), I started experiencing bipolar symptoms.
Then, at the age of 19, she insisted that I take the first draft order and join the army. The military service in russia is mandatory, and it's notorious for breaking people no worse than russian prison does. Knowing that I'm weird and autistic (I was stacking things as a kid), and knowing that the army _loves_ breaking weird people to keep them in line, she just wanted to break me. For context, draft orders are sent out en masse, and everybody dodges them with no repercussions. When they're 28, they just pay a small "fee" (a bribe) to get the military id. You can't be conscripted after you're 28.
I don't know my father. I have a stepdad though. My mother and my stepdad had a kid, nine years younger than me, and of course he was loved by my stepdad way more than I was.
I can recount a lot of instances where she was cruel to me, but oh how subtle and passive-aggressive she made it to be. Also, when I was bullied at school, she insisted on not changing schools, but rather for me to man up.
Her plan was to make a highly paid but mentally broken drone that would be a strong, steady stream of money while she enjoys a "proper" family with her husband and a "proper" child.
It's so unfortunate that the bastard kid turned out to be bipolar, and that bipolar disorder resets one's entire worldview from time to time, nullifying two decades of conditioning, isn't it?
Dear woman I crawled out of, I'm either wrong or right. If I'm wrong, and you did all this (and waaay more of cruel and fucked up shit) to me without any strategy in mind, because you wanted to, then congrats, you're a psychopath. If I'm right, and it was all a strategy, then you knew what you did was wrong, and every single time you did it took a bit of your soul away from you, because that's what evil does. Given that your scheme failed, was it worth it in the end?28 -
Codeium completely changed to windsurf whatever a fucking windsurf is. But the worst thing, it removed the statistics page that I dominated. Fuckers. It was cool having a 3rd party having some positive stats about you. The new profile page is private, only for yourself and is pure focussed on code generation converting my account from big numbers to no data available. Sad, was so proud.
Also, I had some personal communication with them before, but that's not available anymore either. Again, a nice company turned to some heartless corporate shell by investors.
Sad sad sad, was long ago I was so enthusiastic about a company. Traitors!7 -
- went to the store
- get shot
- call 911
- cops arrive before er
- they're suspicious bc you're black
- ask for your license and registration
- you reach for your pocket to get your driver's license
- "he's reaching!", they say as they mag dump into you
- you die
- your family can't afford funeral while m$ valuation goes from 3 trillion dollars to 4 trillion dollars
- murica!10 -
I am so confused about what I'm doing in the near future. I want to get out of this hellhole but there's a slight chance I could finish my PhD with someone, who's actually not a bad dude.(My current supervisor is... not helpful) But I will have to stay here and work very hard and not get paid, but PhD is over in less than a year. I'm fucked with system implementation tho, since I'll be changing directions and have to start fresh.
I could also get a job and move away, and be paid a decent wage. But then there's no telling when I'm gonna finish the PhD.
Which would you choose if you were me? Which one should I pursue?11 -
Imagine a workplace. A workplace that is planning a local event for tomorrow with deals and a free discount code for those who arrive.
Only thing is: everything is chaos, no one is taking responsibility for the event, no one communicates about changes or how the event is going to be.
Now you get a call off duty. You have to check a discount code that wasn't working. You were to set it up for the event. But apparently they decided to open the doors for the event TODAY. You get a call 5 minutes after the first. "Is it done yet?" NO. Because you have to FIX CODE and deploy changes because they don't have any staging environment, no proper testing environment and (best of all) development mostly connected directly to the production database.
This! This is my job.
I am so fucking mad.
I need courses on how to grow my spine even more and demand what should be fucking law at this point.
Or maybe just leave. I'm the only dev.. 😎6 -
Had my wisdom teeth removed today. Not feeling my entire jaw is a bit strange but I don't believe I had any other strange effects from the sedation and I've been assured that I didn't say anything embarrassing.
Not having those teeth there anymore feels weird. They grew in well, but one developed a cavity that was causing me a headache that has been getting worse for the last 6 weeks.6 -
So as mentioned by people earlier, devRant certificate is expired. Well, three things to do:
1. use dr.molodetz.nl for using devRant with a certificate.
2. write down snek.molodetz.nl or molodetz.online for when it really goes down, we're building a new community there. It's not ready yet, but is already in use for a long time. Literally everyone welcome. Just like dR, no moderation, freedom.
3. let's hope on not to loose too many friends!
devRant is a great site, but the wholesome, respectful community, is made by made by people.35 -
Cool, Snek has a new few members with new input to work on for now. It's still not released guys, it takes some tweaking. But i'm happy, earlier this day I went to beach, and when i came back, in the general chat there were 1200+ new messages. Holy fuck. I keep on preparing it for when it's needed. But I do hope to say within a month or so that it's <stable>. Finished, will never be the case! So many ideas to implement. One of the priorities is now, what you can do with the Snek app, because it's a lot, it has some sick features. Live typing was not appreciated by everyone but it's possible to disable it with /live.
Meh, stay tuned, will spam next month or so again. Happy that the cert is renewed and we can continue talk here.12 -
OK, I could maybe write a quick app in C++ and cross compile it so I can send it to my friends who use windows, what is wrong with you I am ashamed for us all.
But why do that? Let's just go the EXTREME route and do things in a very inappropriate way that is natively """portable""" so we can say that (((It Just Works™))).
So if you haven't guessed already, it's 100% js rawdogging and I'm doing the graphics in SVGOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO uoykuf OoOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOO it's not so bad but here's things I've learned:
If you're using inkscape to convert your lazy 8x8 pixels per frame spritesheet.png into an svg file, and don't know how to use inkscape, you have to stack each frame on top of one another. Yes.
Erase the layers, erase everything that isn't the paths you want. Also erase invisible paths generated by the pixelart mode of the trace bitmap thingy, sometimes these ghosts exist for mysterious reasons.
Then, neatly stack everything into one square big enough to hold all the frames, select all the frames, resize to selection. OK, now double check that the names of your layers werent changed to generic path94958509 out of the fucking blue AGAIN, all good.
Also double check that inkscape hasn't changed the name and extension of your output file AGAIN then make sure inkscape hasn't changed the dimensions of your export AGAIN and then AGAIN and AGAIN...
OK, so you've exported your svg, now we start doing even more stupid and questionable things. We go into the file and delete the header, specially the comment at the top that clearly states this file was made with inkscape, because my experience was so DELIGHTFUL that I very much require some abstract form of petty vengeance. Also a cigarette.
Hold on. Patiently erase useless tags such as defs and g and shit, all you want is the svg and paths. Then, painstakingly convert each <path id=$ .../> into <symbol id=$> <path .../>.
Why didn't I write a perl script for this part? Actually that's a good idea, goes on the todolist, I didn't write a todolist app though, because I have a textfile. I mean, just what kind of negative IQ troglodyte would do something like that? ;>;>;>;>;>;>;>
Anyway, now utilize your black-magic-infused devilspeak q$p e r l$ script to fasten together an entire webapp into a single html file, all done with duct tape and clown jizz of course, see previous rant for VERY technical details. Also I jjust time traveled and wrote the previous paragraph while writing this one everything is out of order oh noes.
No matter it works now me is happiee.
I got heart icon for health bar but no health bar implemented not aproblem.
Uh also outlines. Here, let's keep it topical, this is rom.rol:
```rol
# vars:
$:%peso;>
let sprite,"$.elems.srpite";
$:/peso;>
# css:
$:%asis;>
path {
· stroke: $080808;
· stroke-width: 0.1;
· stroke-linejoin: round;
· paint-order: stroke;
}
$:/asis;>
# html:
$:%asis;>
<svg width="2.1166811mm" height="2.1166601mm" viewBox="0 0 2.1166811 2.1166601" xmlns="http://www.w3.org/2000/svg">
<symbol id="{$$.%sprite}_hp_0">
<path d="M 0.264594,0.26458 V 0.52916 H 1.1e-5 V 0.79375 1.05833 1.32291 H 0.264594 V 1.5875 H 0.529177 V 1.85208 H 0.793761 V 2.11666 H 1.058344 1.322927 V 1.85208 H 1.587511 V 1.5875 H 1.852094 V 1.32291 H 2.116677 V 1.05833 0.79375 0.52916 H 1.852094 V 0.26458 H 1.587511 1.322927 V 0.52916 H 1.058344 0.793761 V 0.26458 H 0.529177 Z"/>
</symbol>
<!--NOW DO THE OTHER NINE FRAMES-->
</svg>
$:/asis;>
```
so now I can say (in base.rol):
```rol
$:%peso;>
lib "[based]";
rol "rom.rol";
let hud,"$.elems.hdu";
$:/peso;>
$:%asis;>
<svg viewBox="0 0 23.283329 2.1166601" width="16%" height="16%" fill="#880808">
<use id="{$$.%hud}_hp" href="#{$rom.%sprite}_hp_0"/>
</svg>
<script>
document.getElementById("{$$.%hud}_hp").setAttribute('href',"#{$rom.%sprite}_hp_" + n).
</script>
$:/asis;>
```
Where `n` is just some frame counter this is duct tape now request animation frames REQUEST THEM YOU MUST.
Anyway this is immensely stupid but it made me giggle so I share.
AAA RPG with full svg graphics when?1 -
when I die, I want to be cremated, because I do NOT want fungi to enter my cranium and do something to my brain. It doesn't matter if it's dead or not. It once held "me", and I wholeheartedly believe that fungi can make it tick again, or extract "me" out of it to make me a part of them. Who knows what they do to people. Just imagine dying and waking up suspended in mucus while 36TET microtonal music plays.16
-
Okay, summary of previous episodes:
1. Worked out a simple syntax to convert markdown into hashes/dictionaries, which is useful for say writing the data in a readable format and then generating a structured representation from it, like say JSON.
2. Added a preprocessor so I could declare and insert variables in the text, and soon enough realized that this was kinda useful for writing code, not just data. I went a little crazy on it and wound up assembling a simple app from this, just a bunch of stuff I wanted to share with friends, all packed into a single output html file so they could just run it from the browser with no setup.
3. I figured I might as well go all the way and turn this into a full-blown RPG for shits and giggles. First step was testing if I could do some simple sprites with SVG to see how far I could realistically get in the graphics department.
Now, the big problem with the last point is that using Inkscape to convert spritesheets into SVG was bit of a trouble, mostly because I am not very good at Inkscape. But I'm just doing very basic pixel art, so my thought process was maybe I can do this myself -- have a small tool handle the spritesheet to SVG conversion. And well... I did just that ;>
# pixel-to-svg:
- Input path-to-image, size.
- grep non-transparent pixels.
- Group pixels into 'islands' when they are horizontally or vertically adjacent.
- For each island, convert each pixel into *four* points because blocks:
· * (px*2+0, py*2+0), (px*2+1, py*2+0), (px*2+1, py*2+1), (px*2+0, py*2+1).
· * Each of the four generated coordinates gets saved to a hash unique to that island, where {coord: index}.
- Now walk that quad-ified output, and for each point, determine whether they are a corner. This is very wordy, but actually quite simple:
· * If a point immediately above (px, py-1) or below (px, py+1) this point doesn't exist in the coord hash, then you know it's either top or bottom side. You can determine whether they are right (px+1, py) or left (px-1, py) the same way.
· * A point is an outer corner if (top || bottom) && (left || right).
· * A point is an inner corner if ! ((top || bottom) && (left || right)) AND there is at least _one_ empty diagonal (TR, TL, BR, BL) adjacent to it, eg: (px+1, py+1) is not in the coord hash.
· * We take note of which direction (top, left, bottom, right) every outer or inner corner has, and every other point is discarded. Yes.
Finally, we connect the corners of each island to make a series of SVG paths:
- Get starting point, remember starting position. Keep the point in the coord hash, we want to check against it.
- Convert (px, py) back to non-quadriplied coords. Remember how I made four points from each pixel?
. * {px = px*0.5 + (px & 1)*0.5} will transform the coords from quadriple back to actual pixel space.
· * We do this for all coordinates we emit to the SVG path.
- We're on the first point of a shape, so emit "M${px} ${py}" or "m${dx} ${dy}", depending on whether absolute or relative positioning would take up less characters.
· * Delta (dx, dy) is just (last_position - point).
- We walk from the starting point towards the next:
· * Each corner has only two possible directions because corners.
· * We always begin with clockwise direction, and invert it if it would make us go backwards.
· * Iter in given direction until you find next corner.
· * Get new point, delete it from the coord hash, then get delta (last_position - new_point).
· * Emit "v${dy}" OR "h${dx}", depending on which direction we moved in.
· * Repeat until we arrive back at the start, at which point you just emit 'Z' to close the shape.
· * If there are still points in the coord hash, then just get the first one and keep going in the __inverse__ direction, else stop.
I'm simplifying here and there for the sake of """brevity""", but hopefully you get the picture: this fills out the `d` (for 'definition') of a <path/>. Been testing this a bit, likely I've missed certain edge cases but it seems to be working alright for the spritesheets I had, so me is happiee.
Elephant: this only works with bitmaps -- my entire idea was just adding cute little icons and calling it a day, but now... well, now I'm actually invested. I can _probably_ support full color, I'm just not sure what would be a somewhat efficient way to go about it... but it *is* possible.
Anyway, here's first output for retoori maybe uuuh mystery svg tag what could it be?? <svg viewBox="0 0 8 8" height="16" width="16"><path d="M0 2h1v-1h2v1h2v-1h2v1h1v3h-1v1h-1v1h-1v1h-2v-1h-1v-1h-1v-1h-1Z" fill="#B01030" stroke="#101010" stroke-width="0.2" paint-order="stroke"/></svg>6 -
What would I do if I traveled back in time? No, not buying bitcoin. It's probably eating datura seeds or other poison. or burning myself with acid. or drinking bleach. or blinding myself with that powerful laser pointer I had. maybe then my emotionless, cold stone wall of a mother could show me some affection and empathy. she for sure didn't when I broke my finger, so maybe the severity of the injure is where it's at?
the axe forgets, the tree remembers.5 -