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
Search - "resulting"
-
Google searches resulting in Github issues instead of StackOverflow questions is how you know you are really screwed.4
-
I think I've shown in my past rants and comments that I'm pretty experienced. Looking back though, I was really fucking stupid. Since I haven't posted a rant yet on the weekly topics, I figure I would share this humbling little gem.
Way back in the ancient era known as 2009, I was working my first desk job as a "web designer". Apparently the owner of this company didn't know the difference between "designer", which I'm not, and "developer", which I am, nor the responsibilities of each role.
It was a shitty job paying $12/hour. It was such a nightmare to work at. I guess the silver lining is that this company now no longer exists as it was because of my mistake, but it was definitely a learning experience I hold in high regard even today. Okay, enough filler...
I was told to wipe the Dev server in order to start fresh and set up an entirely new distro of Linux. I was to swap out the drives with whatever was available from the non-production machines, set up the RAID 5 array and route it through the router and firewall, as we needed to bring this Dev server online to allow clients to monitor the work. I had no idea what any of this meant, but I was expected to learn it that day because the next day I would be commencing with the task.
Astonishingly, I managed to set up the server and everything worked great! I got a pat on the back and the boss offered me a 4 day weekend with pay to get some R&R. I decided to take the time to go camping. I let him know I would be out of town and possibly unreachable because of cell service, to which he said no problem.
Tuesday afternoon I walked into work and noticed two of the field techs messing with the Dev server I built. One was holding a drive while the other was holding a clipboard. I was immediately called into the boss's office.
He told me the drives on the production server failed during the weekend, resulting in the loss of the data. He then asked me where I got the drives from for the Dev server upgrade. I told him that they came from one of the inactive systems on the shelf. What he told me next through the deafening screams rendered me speechless.
I had gutted the drives from our backup server that was just set up the week prior. Every Friday at midnight, it would turn on through a remote power switch on a schedule, then the system would boot and proceed to copy over the production server's files into an archive for that night and shutdown when it completed. Well, that last Friday night/Saturday morning, the machine kicked on, but guess what didn't happen? The files weren't copied. Not only were they not copied, but the existing files that got backed up previously we're gone. Why? Because I wiped those drives when I put them into the Dev server.
I would up quitting because the conversation was very hostile and I couldn't deal with it. The next week, I was served with a suit for damages to this company. Long story short, the employer was found in the wrong from emails I saved of him giving me the task and not once stating that machine was excluded in the inactive machines I could salvage drives from. The company sued me because they were being sued by a client, whose entire company presence was hosted by us and we lost the data. In total just shy of 1TB of data was lost, all because of my mistake. The company filed for bankruptcy as a result of the lawsuit against them and someone bought the company name and location, putting my boss and its employees out of a job.
If there's one lesson I have learned that I take with the utmost respect to even this day, it's this: Know your infrastructure front to back before you change it, especially when it comes to data.8 -
So because of the sheer number of interviews I’ve been doing I’m starting to get a bit brazen with them since I’ve started to really not give a fuck about most of them and I’ve started to notice patterns in common lines of questioning resulting in this unexpected gem today:
Interviewer: So we always start our devs off on the bottom end of our salary band.
Dev: Either give me the top or I’m not interested.
Interviewer: 😡. But if we start you at the top of the salary band we’ll have nothing to give you later. 🥺.
Dev: No need, I’ll take the money up front. Companies don’t give raises these days anyway, it’s just a carrot to dangle in front of the naive.
Interviewer: 😡. Well if all you care about is money so focussed on money you’ll just leave if a better offer comes around!
Dev: All the more reason to give me the highest number possible to defend against that possibility.
Interviewer: 😡. But there are other devs on the team with similar experience that will be making less than you.
Dev: Sounds like they fell for the negging and guilt tripping you are currently attempting on me in order to save a buck. Salary is not based on your skills or experience anymore, it’s based on your ability to negotiate. Here’s mine.
Interviewer: ………………. I’ll pass you along to the hiring manager.
Dev: ???? wtf
HOW THE FUCK DID THAT ACTUALLY WORK ARE YOU FUCKING KIDDING ME I WAS TRYING TO GET THEM TO HANG UP FOR SHITS AND GIGGLES AND NOW I’M LOOKING AT A 20K RAISE ALL BECAUSE I CONTINUALLY TOLD THEM TO GO FUCK THEMSELVES??? THIS IS ACTUALLY WHAT IT TAKES TO BE TREATED PROPERLY BY A COMPANY???13 -
A seasoned colleague just wrote this and I think it was very valuable:
On tech debt:
So the big challenge with technical debt is making non-technical management (CEO, COO, CFO, directors) understand what it means, and just how it operates. Sometimes it actually makes good sense to incur technical debt to get to market sooner, just as it sometimes makes sense to borrow money to get cash now and repay that loan later with (hopefully) resulting greater revenues from that investment. But just like a loan, tech debt always has to be paid some day. The longer the tech debt goes, the more expensive it gets. And also like a loan, the cost compounds, like compound interest on a loan. Tech debt should always be chosen with a clear plan to pay it off at some point in the not too distant future. The longer one waits to pay it, the more expensive it gets.7 -
I would absolutely love it if people would write their own stupid code instead of blindly mixing everyone else's mental diarrhea together and pouring the resulting mess into their bloody stupid IDE. At least then I could insult them properly. As it is, they're outsourcing their fucking stupidity to the lowest fucking bidder and then bragging about how quickly they get everything done. And management eats it up! No wonder everything is a slow, tangled, unmaintanable mess.
I can't fix much of anything because almost none of it is in my control. It's all autogenerated bullshit glued together with laziness and poor taste. "But Root, why is fixing this taking so long?" Gee, I wonder why. Maybe if someone had built it somewhere in realm of correctly the first time, it wouldn't have all fallen apart when someone looked at it the wrong way!
Seriously, there's no way this pile of stale fertilizer could have passed QA.rant idiots import * fragile monstrosity leggy devs why code when you can steal no independent thought npm mentality10 -
I wrote a database migration to add a column to a table and populated that column upon record creation.
But the code is so freaking convoluted that it took me four days of clawing my eyes out to manage this.
BUT IT'S FINALLY DONE.
FREAKING YAY.
Why so long, you ask? Just how convoluted could this possibly be? Follow my lead ~
There's an API to create a gift. (Possibly more; I have no bloody clue.)
I needed the mobile dev contractor to tell me which APIs he uses because there are lots of unused ones, and no reasoning to their naming, nor comments telling me what they do.
This API takes the supplied gift params, cherry-picks a few bits of useful data out (by passing both hashes by reference to several methods), replaces a couple of them with lookups / class instances (more pass-by-reference nonsense). After all of this, it logs the resulting (and very different) mess, and happily declares it the original supplied params. Utterly useless for basically everything, and so very wrong.
It then uses this data to call GiftSale#create, which returns an instance of GiftSale (that's actually a Gift; more on that soon).
GiftSale inherits from Gift, and redefines three of its methods.
GiftSale#create performs a lot of validations / data massaging, some by reference, some not. It uses `super` to call Gift#create which actually maps to the constructor Gift#initialize.
Gift#initialize calls Gift#pre_init (passing the data by reference again), which does nothing and returns null. But remember: GiftSale inherits from Gift, meaning GiftSale#pre_init supersedes Gift#pre_init, so that one is called instead. GiftSale#pre_init returns a Stripe charge object upon success, or a Gift (and a log entry containing '500 Internal') upon failure. But this is irrelevant because the return value is never actually used. Pass by reference, remember? I didn't.
We're now back at Gift#initialize, Rails finally creates a Gift object using the args modified [mostly] in-place by all of the above.
Another step back and we're at GiftSale#create again. This method returns either the shiny new Gift object or an error string (???), and the API logic branches on its type. For further confusion: not all of the method's returns are explicit, and those implicit return values are nested three levels deep. (In Ruby, a method will return the last executed line's return value automatically, allowing e.g. `def add(a,b); a+b; end`)
So, to summarize: GiftSale#create jumps back and forth between Gift five times before finally creating a Gift instance, and each jump further modifies the supplied params in-place.
Also. There are no rescue/catch blocks, meaning any issue with any of the above results in a 500. (A real 500, not a fake 500 like last time. A real 500, with tragic consequences.)
If you're having trouble following the above... yep! That's why it took FOUR FREAKING DAYS! I had no tests, no documentation, no already-built way of testing the API, and no idea what data to send it. especially considering it requires data from Stripe. It also requires an active session token + user data, and I likewise had no login API tests, documentation, logging, no idea how to create a user ... fucking hell, it's a mess.)
Also, and quite confusingly:
There's a class for GiftSale, but there's no table for it.
Gift and GiftSale are completely interchangeable except for their #create methods.
So, why does GiftSale exist?
I have no bloody idea.
All it seems to do is make everything far more complicated than it needs to be.
Anyway. My total commit?
Six lines.
IN FOUR FUCKING DAYS!
AHSKJGHALSKHGLKAHDSGJKASGH.7 -
Appearently you can entertain a little girl for ages by letting her type glibberish on a laptop and letting her hear the resulting speach synthesysis.7
-
Couple years ago, in an Indian web dev company I worked at, the management decided it would be a good idea to ask all employees to "justify their salary" and submit their answers via email.
(You read that right)
70% workforce submitted their resignation the same day, resulting in the HR (who came up with this idea) getting fired on the spot.
Good times.8 -
In our company the estimation is done by customer / PO. Usually, the deadline is set to the day before yesterday after the issue arrived. Always highest prio.
Oh, almost forgot: when a developer does his estimations, the resulting number gets divided by 7 by the PMs. Buffers? Who needs that. QA? Pfff. We are EFFICIENT.
Deadline not met? Bugs in the release? The developer must be bad.8 -
I wish people would stop claiming their product is an AI when it isn’t.
Guy on product hunt today says his name generator is an AI. This is how he describes the process:
- first it passes your input keywords through fasttext
- we get a random sampling of the top 100 or so words most related to your input keywords
- the top words are used as the dictionary input to a markov chain word generator, which generates 10~15000 random words
- the results are passed again through fasttext, we take the cosine distance of the resulting word to your input keywords (by using the out-of-vocab feature of fasttext)
- the top 100 most relevant results are returned6 -
Dev: This is the first version of this new app, we’re still experimenting with how it’s going to work but initial headway is looking promising. It cost very little to make, came together very quickly and is already resulting in productivity increases for users. We’re just doing a bit of code cleanup now and we’ll make a move on the next iteration.
Corporate IT: This project is being completely mishandled! In order to successfully build an app you have to determine every single requirement beforehand! It takes millions upon millions of dollars due to the complex system of governance and approval that needs to exist. Massive numbers of stakeholders need to be involved and coordinated to even make so much as a login screen! I bet your project doesn’t even have a documented list of core values.
Dev: Has you ever successfully built an app using that methodology?
Corporate IT: 😡 That’s a loaded question. I went to school to study project management and have over 25 years of experience in the field. If you had the training and experience I do you would know that tech projects are naturally very volatile and there’s nothing you can do about that!
Dev: …8 -
So my company had a client who was a doctor. He wanted to build an iOS app and will come everyday in the office to scope the project. The company's boss was a greedy guy who always tried to keep his hands in client's pocket. And on some occasions he even went on to scold my colleagues working on the client's project in front of the client. The client was too volatile to freeze the scope which was resulting in us not getting anywhere. One day the boss came onto me in front of the client and showed like he is doing me a favor by giving me salary. The salary day was after 2 days. But I raged out. Next day I departed from home for office but felt so raged that I mailed my resignation to the boss. I wandered in the city aimlessly the whole day, and the boss gave me 5 calls to make up for it and come back. Then he went on to go legal, and I told him to do whatever he could. In the end it was all bluff.
I worked freelance for next few months, those were the best. Got paid quite nice and learned Angular 5 with Node.js. Best decision in my career..1 -
So, I'm using a new MacBook Air (running Sierra), and while I'm still getting used to it (especially the different Sublime hotkeys), overall it really is quite wonderful. I particularly love the magic touchpad and ease of scrolling/swiping between desktops.
However, I ran into an issue this morning that gave me pause: apparent file caching.
My webpack setup auto-compiles my project when files change, and I noticed something was causing errors -- not really surprising since I was in the middle of fixing the project last night. However, the error it displayed wasn't something I was expecting, and referenced a line I was positive I had removed several hours before calling it a night. Whatever, I was probably mistaken, so I went to remove it.
... It wasn't there.
I double checked that I was looking at the right file. Yep, src/styles/header.scss -- that's the correct file. Figuring webpack was acting up, I killed and restarted it.
Same error.
So whatever, maybe Sublime cached it. Rather unexpected, but possible, and I am on a mac now... so maybe. So, I closed the file and reopened it. The line wasn't there. I did this twice more. It STILL wasn't there. Maybe I'm going crazy...? I checked the file with cat. The line was there. I checked with vim. The line was still there.
OKAY. I've seen a lot of people with beef with Sublime, and I often defended it. but maybe they're actually right. maybe Sublime really isn't the way to go. :( So, I killed and reopened Sublime, and I checked the file again.
The line STILL ISN'T THERE.
Maybe I'm going crazy? I double, triple, quadruple checked the path. all correct.
Alright; let's try again and make sure I do it properly. I closed everything I had open in sublime (two projects), and quit. I reopened Sublime, navigated to the correct path, and reopened the file...
The offending line STILL wasn't there.
I'm angry at this point and just mash the keyboard. I save the resulting garbage, and cat the file again. No visible changes.
KAJSFLK STUPID PIECE OF <redacted>
okay, whatever. Reboots fix everything, right? So I reboot, and keep the option to re-open everything again ticked.
The terminal comes back up, along with half(?) my browsers, but Sublime doesn't. grrrrrrr.
so I cat the damn thing.
GUESS WHAT.
THE GARBAGE IS THERE.
Sublime was doing its job. BUT EVERYTHING ELSE FAILED.
(Oh Sublime, why did I ever question you? 💚)
... but seriously, what the fuck could have caused that? Was the OS caching the file for some programs, but not others? Now I'm questioning the macbook...23 -
*Got a request for installing and configuring an online shop for a client*
Me: Do you have a web space already?
Client: No, I don't want to pay for it. (FYI: They only cost about 20€ a year)
Me: Okay, but free hosters are often slow and unprofessional. I really do not recommend using free hosting services.
Client: Doesn't matter, do it.
Me: *Working on the shop for several weeks, finally goes online*
One week later, client contacts me saying shop is offline. I realize the free hoster he used shut down their services (bankruptcy), resulting in the loss of about 90% of the work that I had done (no proper backups due to complexity)
Client: How can that even happen? You'll redo the shop, right?
♪~ ᕕ(ᐛ)ᕗ5 -
writing library code is hard.
there are sooo many details that go into writing good libraries:
designing intuitive and powerful apis
deciding good api option defaults, disallowing or warning for illegal operations
knowing when to throw, knowing when to warn/log
handling edge cases
having good code coverage with tests that doesn't suck shit, while ensuring thry don't take a hundred years to run
making the code easy to read, to maintain, robust
and also not vulnerable, which is probably the most overlooked quality.
"too many classes, too little classes"
the functions do too much it's hard to follow them
or the functions are so well abstracted, that every function has 1 line of code, resulting in code that is even harder to understand or debug (have fun drowning in those immense stack traces)
don't forget to be disciplined about the documentation.
most of these things are
deeply affected by the ecosystem, the tools of the language you're writing this in:
like 5 years ago I hated coding in nodejs, because I didn't know about linters, and now we have tools like eslint or babel, so it's more passable now
but now dealing with webpack/babel configs and plugins can literally obliterate your asshole.
some languages don't even have a stable line by line debugger (hard pass for me)
then there's also the several phases of the project:
you first conceive the idea, the api, and try to implement it, write some md's of usage examples.
as you do that, you iterate on the api, you notice that it could better, so you redesign it. once, twice, thrice.
so at that point you're spending days, weeks on this side project, and your boss is like "what the fuck are you doing right now?"
then, you reach fuckinnnnng 0.1.0, with a "frozen" api, put it on github with a shitton of badges like the badge whore you are.
then you drop it on forums, and slack communities and irc, and what do you get?
half of the community wants to ban you for doing self promotion
the other half thinks either
a) your library api is shitty
b) has no real need for it
c) "why reinvent the wheel bruh"
that's one scenario,
the other scenario is the project starts to get traction.
people start to star it and shit.
but now you have one peoblem you didn't have before: humans.
all sorts of shit:
people treating you like shit as if they were premium users.
people posting majestically written issues with titles like "people help, me no work, here" with bodies like "HAAAAAAAAAALP".
and if you have the blessing to work in the current js ecosystem, issues like "this doesn't work with esm, unpkg, cdnjs, babel, webpack, parcel, buble, A BROWSER".
with some occasional lunatic complaining about IE 4 having a very weird, obscure bug.
not the best prospect either.3 -
I’m adding some fucking commas.
It should be trivial, right?
They’re fucking commas. Displayed on a fucking webpage. So fucking hard.
What the fuck is this even? Specifically, what fucking looney morons can write something so fucking complicated it requires following the code path through ten fucking files to see where something gets fucking defined!?
There are seriously so fucking many layers of abstraction that I can’t even tell where the bloody fucking amount transforms from a currency into a string. I’m digging so deep in the codebase now that any change here will break countless other areas. There’s no excuse for this shit.
I have two options:
A) I convert the resulting magically conjured string into a currency again (and of course lose the actual currency, e.g. usd, peso, etc.), or
B) Refactor the code to actually pass around the currency like it’s fucking intended to be, and convert to a string only when displaying. Like it’s fucking intended to be.
Impossible decision here.
If I pick (A) I get yelled at because it’s bloody wrong. “it’s already for display” they’ll say. Except it isn’t. And on top of that, the “legendary” devs who wrote this monstrosity just assumed the currency will always be in USD. If I’m the last person to touch this, I take the blame. Doesn’t matter that “legendary Mr. Apple dev” wrote it this way. (How do I know? It’s not the first time this shit has happened.) So invariably it’ll be up to me to fix anyway.
But if I pick (B) and fix it now, I’ll get yelled at for refactoring their wonderful code, for making this into too big of a problem (again), and for taking on something that’s “just too much for me.” Assholes. My après Taco Bell bathroom experiences look and smell better than this codebase. But seriously, only those two “legendary” devs get to do any real refactoring or make any architecture decisions — despite many of them being horribly flawed. No one else is even close to qualified… and “qualified” apparently means circle jerking it in Silicon Valley with the other better-than-everyone snobs, bragging about themselves and about one another. MojoJojo. “It was terrible, but it fucking worked! It fucking worked!” And “I can’t believe <blah> wanted to fix that thing. No way, this is a piece of history!” Go fuck yourselves.
So sorry I don’t fit in your stupid club.
Oh, and as an pointed, close-at-hand example of their wonderful code? This API call I’m adding commas to (it’s only used by the frontend) uses a json instance variable to store the total, errors, displayed versions of fees/charges (yes they differ because of course they do), etc. … except that variable isn’t even defined anywhere in the class. It’s defined three. fucking. abstraction. layers. in. THREE! AND. That wonderful piece of smelly garbage they’re so proud of can situationally modify all of the other related instance variables like the various charges and fees, so I can’t just keep the original currency around, or even expect the types to remain the same. It’s global variable hell all over again.
Such fucking wonderful code.
I fucking hate this codebase and I hate this fucking company. And I fucking. hate. them.7 -
Here's a silly side project I've been working on just for fun:
https://soundofco.de/
It "programmatically" creates sound from code (or plain text) on GitHub. I wouldn't call it music, because it sounds kind of horrible almost all of the time :D It's very simple: The length of a line defines the note to be played. Really just a nerdy bit of fun.
Unfortunately I have absolutely zero knowledge in music theory and I have no idea how to make the resulting sounds more pleasant or even melodic. If you're interested in making this better or helping out with feedback, you can find the project at https://github.com/dneustadt/...
Also feel free to share if you find anything on GitHub that makes for some decent sounds :D (I doubt it)12 -
MAINTENANCE OF STACKOVERFLOW PLANNED
SHARE TO YOUR NEAREST DEV FRIENDS
Stackoverflow and its relative partners will be closed for two days due to maintenance, new design, and moving server infrastructure from United States to 1km below the Switzerland Alps for extra layers of security. This decision was made by the recent CloudFlare data leak.
Now our servers will be able to handle data leaks because even though the data was leaked, it will fill the empty places in the rocks resulting inaccessible from attackers.
Stackoverflow and its relative partners' maintenance estimated time is February 29 - 30. We will try to finish as fast as possible and bring you guys the best experience. If the maintenance delayes, we will tweet via @StackStatus or post details in our status blog.
Thank you for your support and have a happy day.
Best regards,
Stack Exchange team6 -
Dev: Hi Guys, we've noticed on crashlytics that one of your screens has a small crash. Can you look?
Me: Ok we had a look, and it looks to us to be a memory leak issue on most of the other screens. Homepage, Search, Product page etc. all seem to have sizeable memory leaks. We have a few crashes on our screens saying iPhone 11's (which have 4gb of ram) are crashing with only 1% of ram left.
What we think is happening is that we have weak references to avoid circular dependencies. Our weak references are most likely the only things the system would be able to free up, resulting in our UI not being able to contact the controller, breaking everything. Because of the custom libraries you built that we have to use, we can't really catch this.
Theres not really a lot we can do. We are following apples recommendations to avoid circular dependencies and memory leaks. The instruments say our screens are behaving fine. I think you guys will have to fix the leaks. Sorry.
Dev 1: hhhmm, what if you create a circular dependency? Then the UI won't loose any of the data.
Dev 2: Have you tried looking at our analytics to understand how the user is getting to your screens?
=================================
I've been sitting here for 15 minutes trying to figure out how to respond before they come online. I am fucking horrified by those responses to "every one of your screens have memory leaks"2 -
ChatGPT was asked to write a script for benchmarking some SQL and plotting the resulting data.
Not only was it able to do it, but, without further prompting, it realized it had made an error, explained what it 'thought' the error was and fixed it.
Excuse me, I need to go get my asshole sewn up because I'm hemorrhaging to death from the brick I just shat.
source:
https://simonwillison.net/2023/Apr/...6 -
Reminder to look after yourselves.
Today I found out I've had hypertension and possibly an unruptured aneurysm. Resulting from stress at work and home, overworking and bad diet from having to keep my engery up for work. (over the last around 2-3 years).
Luckly I've moved away from stressful situations now so I'm feeling like I've dodged a rather large bullet!
Look after yourselves guys, take breaks, check your caffeine, sugar and cholesterol intakes and keep active! I reckon the 6 days a week football training saved my life!
hypertension is a silent killer and can cause fatal damage to your organs such as kidneys, lungs, eyes, brain and heart.
Luckly it spotted it early with a blood test and optician visit. I had a hemorrhage in one of my eyes but wasn't until 6 months later GP noticed signs of kidney damage from my blood test it was found!
I should be fine but look after yourselves! You're more important than that deadline!7 -
I am part of a team running a rather big Discord bot. One day last year late in October some dude tried to tell us that he and his "team" had breached our infrastructure. I noticed he was full of shit and started trolling him back, and actually putting him under pressure to develop a solution for us, pretending to want to pay them for it. At the end, our bold hero ended up "losing their job" AND "their house burning down" to get out of it again, lol wat.
The whole resulting conversation is available as a set of screenshots: https://imgur.com/a/vczyX
Enjoy!4 -
I'm writing my bachelor thesis in LaTeX. As people who use LaTeX might know, it generates shitloads of files while compiling (like 10 files per .tex file).
To unclutter my project folder, I wrote a simple one-liner bash script that deletes all files which are not .tex or .bib files (literature references) and of course it will not delete itself (although that one also took me longer to figure out why my script 'kept disappearing for no reason after I ran it' than I'd like to admit).
However, I forgot that images are also files which are stored in the project-folder.
And this is how I suddenly lost all of my images for no reason at all, resulting in my PDF not building anymore. Luckily we all commit and push all regularely, right...
Edit: I just figured out that I'm even stupider than originally thought... My .gitignore ans more importantly, the '.git' folder also neither end in .tex nor .bib. Guess I'll just go fuck myself.10 -
Long rant ahead.. 5k characters pretty much completely used. So feel free to have another cup of coffee and have a seat 🙂
So.. a while back this flash drive was stolen from me, right. Well it turns out that other than me, the other guy in that incident also got to the police 😃
Now, let me explain the smiley face. At the time of the incident I was completely at fault. I had no real reason to throw a punch at this guy and my only "excuse" would be that I was drunk as fuck - I've never drank so much as I did that day. Needless to say, not a very good excuse and I don't treat it as such.
But that guy and whoever else it was that he was with, that was the guy (or at least part of the group that did) that stole that flash drive from me.
Context: https://devrant.com/rants/2049733 and https://devrant.com/rants/2088970
So that's great! I thought that I'd lost this flash drive and most importantly the data on it forever. But just this Friday evening as I was meeting with my friend to buy some illicit electronics (high voltage, low frequency arc generators if you catch my drift), a policeman came along and told me about that other guy filing a report as well, with apparently much of the blame now lying on his side due to him having punched me right into the hospital.
So I told the cop, well most of the blame is on me really, I shouldn't have started that fight to begin with, and for that matter not have drunk that much, yada yada yada.. anyway he walked away (good grief, as I was having that friend on visit to purchase those electronics at that exact time!) and he said that this case could just be classified then. Maybe just come along next week to the police office to file a proper explanation but maybe even that won't be needed.
So yeah, great. But for me there's more in it of course - that other guy knows more about that flash drive and the data on it that I care about. So I figured, let's go to the police office and arrange an appointment with this guy. And I got thinking about the technicalities for if I see that drive back and want to recover its data.
So I've got 2 phones, 1 rooted but reliant on the other one that's unrooted for a data connection to my home (because Android Q, and no bootable TWRP available for it yet). And theoretically a laptop that I can put Arch on it no problem but its display backlight is cooked. So if I want to bring that one I'd have to rely on a display from them. Good luck getting that done. No option. And then there's a flash drive that I can bake up with a portable Arch install that I can sideload from one of their machines but on that.. even more so - good luck getting that done. So my phones are my only option.
Just to be clear, the technical challenge is to read that flash drive and get as much data off of it as possible. The drive is 32GB large and has about 16GB used. So I'll need at least that much on whatever I decide to store a copy on, assuming unchanged contents (unlikely). My Nexus 6P with a VPN profile to connect to my home network has 32GB of storage. So theoretically I could use dd and pipe it to gzip to compress the zeroes. That'd give me a resulting file that's close to the actual usage on the flash drive in size. But just in case.. my OnePlus 6T has 256GB of storage but it's got no root access.. so I don't have block access to an attached flash drive from it. Worst case I'd have to open a WiFi hotspot to it and get an sshd going for the Nexus to connect to.
And there we have it! A large storage device, no root access, that nonetheless can make use of something else that doesn't have the storage but satisfies the other requirements.
And then we have things like parted to read out the partition table (and if unchanged, cryptsetup to read out LUKS). Now, I don't know if Termux has these and frankly I don't care. What I need for that is a chroot. But I can't just install Arch x86_64 on a flash drive and plug it into my phone. Linux Deploy to the rescue! 😁
It can make chrooted installations of common distributions on arm64, and it comes extremely close to actual Linux. With some Linux magic I could make that able to read the block device from Android and do all the required sorcery with it. Just a USB-C to 3x USB-A hub required (which I have), with the target flash drive and one to store my chroot on, connected to my Nexus. And fixed!
Let's see if I can get that flash drive back!
P.S.: if you're into electronics and worried about getting stuff like this stolen, customize it. I happen to know one particular property of that flash drive that I can use for verification, although it wasn't explicitly customized. But for instance in that flash drive there was a decorative LED. Those are current limited by a resistor. Factory default can be say 200 ohm - replace it with one with a higher value. That way you can without any doubt verify it to be yours. Along with other extra security additions, this is one of the things I'll be adding to my "keychain v2".11 -
After working for this company for only a couple years, I was tasked with designing and implementing the entire system for credit card encryption and storage and token management. I got it done, got it working, spent all day Sunday updating our system and updating the encryption on our existing data, then released it.
It wasn't long into Monday before we started getting calls from our clients not being able to void or credit payments once they had processed. Looking through the logs, I found the problem was tokens were getting crossed between companies, resulting in the wrong companies getting the wrong tokens. I was terrified. Fortunately I had including safe guards tying each token to a specific company, so they were not able to process the wrong cards. We fixed it that night.1 -
Agh, holy shit. devRant, I need some love.
I have successfully double-buffered the Windows console (cmd.exe) but all hell breaks loose when you resize the fucking window. The currently active buffer will receive the change in dimensions while the inactive buffer will not, resulting in the window quickly oscillating between the two sizes as the buffers change size.
That got me stuck for about a day. Today, I got it sort of working but it wasn't satisfying at all. I can get it to resize LARGER, but if you resize the window SMALLER, the actual buffer inside the window doesn't change size, so scrollbars appear and I have NO IDEA HOW TO FIX THAT. I somehow need to calculate, or use the API to find, the perfect dimensions (In rows and columns) for the console buffer INSIDE the window buffer for them to not have scrollbars.
And I just - -
I cannot gather the energy to do so right now.
I spent hours finding the solution to this bullshit and ONLY SOLVED HALF MY PROBLEM.
And stack overflow isn't exactly helpful. My problem is so specific that nobody even writes comments on the question.
I guess I need to calculate the amount of characters the screen can hold given the font size and the window size, but fuck, that's a lot of work to do just for something that probably won't even work anyways.
Well, off to the code editor again. Time to inevitably waste my time doing something that won't work.
Yay, programming.27 -
Fucking Amazon rant again...
TLDR: Amazon specializes in “the last mile”. They are repeatedly allowing a 3rd party shipper (Purolator) destroy their main value proposition. Thoughts at the end.
Me on the phone with their support...
Me: so it says my package was attempted to be delivered today. I did not get a call or notification or anything and I have been working from home all day to wait for the package.
Support: -Sigh- yes, I can see it was Purolator we have been having trouble with them lately.
Me: ok, so are you able to see what happened?
Support: let me put you on hold.
.......
Support: So they said they will not call for a delivery, did they use your building buzzer?
Me: Nope, just stood outside the building and then left I guess.
Support: -sigh- Well you can pick it up at their depot. Let me get you the address.
Me: The one by the airport?
Support: Yes it looks like it is about an hour away from where you are. And they are only open during work hours.
Me: So, after working from home to get this package you advice is to take 3 hours off work and go there to pick it up?
Support: Well, we can refund it? If thats what you want.
Me: No, I would like the package I ordered please.
Support: There is nothing I can do sir.
Me: So before I hang up let me see if I have it straight. When I order a package from Amazon, do I have an option of who ships it?
Support: No, I’m sorry but that is decided on our end.
Me: And I have had this problem before with this shipping agent. So, your telling me that when I ship things to me with Amazon that I have no control of wether I even get the package? Your telling me it is literally a coin toss as to wether or not I ever get my package?
Support: yes sir, I’m sorry but that is all I can do.
Me: So you realize that, for example, if I went to my local grocery store and it was a coin toss that I could take my groceries home (even after I paid for them) then I will always go to another store....
Support: yes, I know. There is nothing I can do.
Me: So from now on I have to order items, wait for them to be shipped, check the shipper and then cancel the order of it is them?
Support: -sigh- you cannot cancel an order after it has shipped...
Me: wow. Sure is great being a prime and audible member. I get fast delivery of 50% of my packages and no delivery at all of the other 50%. Sorry for the sarcasm...
Support: I’m sorry I can’t help more.
Me: So just to clarify. I can expect NOT to get the package I ordered?
Support: sorry
Me: have a nice day.
————
Here are my thoughts as a student of business...
Amazon specializes in “the last mile” (in their delivery service anyway) and when they deliver the package they also deliver on that value proposition.
However, now it seems that one of their shipping providers is failing at getting packages that last mile, which is resulting and destroying the idea of their value proposition in a customers eyes. (Affecting more than me as the rep said)
Now, instead of believing that Amazon will get things to me, saving me that last mile trip to the store etc., I firmly believe that it is a toss up as to wether I will ever receive my package (based on carrier)
I know that if I was in Amazon’s position (a carrier hurting my overall value proposition with consistently unacceptable service) that I would come down on them with a force they have never seen or drop them entirely.
But of course, every company reaches a point where they have such market share and sway that they take their eye off the ball when it comes to their value proposition to customers.16 -
brain storming about system design on miro board
at the beginning, all devs add components they think that might be relevant for the system.
PM heavily moves everything around, deletes or changes meaning of added boxes without asking. after five minutes, he is the only one using the board, rest of the team is just watching.
PM: come on, guys. don't just sit and watch, you can also participate.
besides that, the resulting system in the end was complete garbage.7 -
Why is it that pretty much zero package & framework maintainers understand semantic versioning?
1. If you do a complete rewrite of your package, but the resulting API is identical, you don't need to bump to the next major version. As a user, I'm thankful for your increased performance or cleaner internal code, but it doesn't really affect my update process.
2. If your package required some-framework 6.0.0, and now ALSO supports some-framework 7.0.0 but is still compatible with 6.0.0, you don't need to bump to the next major version. As a user, I can now upgrade the framework, and know that the package will keep working, but otherwise it doesn't really affect me.
3. Following your versioning along with the framework/language version is super annoying, especially if your library really doesn't need to differentiate between framework versions because it's not actually utilizing new framework functionality.
4. On the other hand, if you stop supporting a certain language, framework or shared library version, or change the public methods, exceptions, fields, etc, you MUST bump to a new major version.
Yet everyone gets this wrong.
For example, many of Laravel's underlying subpackages (for collections, filesystem, database, config, http, mail, etc) do not change their code in a breaking way, or do not even change at all between major framework versions.
Yet they follow along with the major framework version.
Now if someone makes a library "laravel-elasticsearch" which uses the support libraries and collections from laravel, they need to update their package to move along with the versions as well, and often they choose to number their library along with the framework in turn.
This means that to update the framework, you also need to update over 9000 dependencies.
FOR NO FUCKING REASON. THE ONLY CHANGE IN THOSE FUCKING DEPENDENCIES IS TO UPDATE COMPOSER.JSON TO BE COMPATIBLE WITH THE FUCKING FRAMEWORK.
Meanwhile, Laravel itself breaks repeatedly on minor/patch version updates, because breaking changes slip through their review process.
Ugh.3 -
tl;dr:
The Debian 10 live disc and installer say: Heavens me, just look at the time! I’m late for my <segmentation fault
—————
tl:
The Debian 10 live cd and its new “calamares” installer are both complete crap. I’ve never had any issues with installing Debian prior to this, save with getting WiFi to work (as expected). But this version? Ugh. Here are the things I’ve run into:
Unknown root password; easy enough to get around as there is no user password; still annoying after the 10th time.
Also, the login screen doesn’t work off-disc because it won’t accept a blank password, so don’t idle or you’ll get locked out.
The lock screen is overzealous and hard-locks the computer after awhile; not even the magic kernel keys work!
The live disc doesn’t have many standard utilities, or a graphical partition editor. Thankfully I’m comfortable with fdisk.
The graphical installer (calamares) randomly segfaults, even from innocuous things like clicking [change partition] when you don’t have a partition selected. Derp.
It also randomly segfaults while writing partitions to disk — usually on the second partition.
It strangely seems less likely to segfault if the partitions are already there, even if it needs to “reformat” (recreate) them.
It also defaults to using MBR instead of GPT for the partition table, despite the tooltip telling you that MBR is deprecated and limited, and that GPT is recommended for new systems. You cannot change this without doing the partitions manually.
If you do the partitions manually and it can’t figure out where to install things, it just crashes. This is great because you can’t tell it where to install things, and specifying mount points like /boot, /, and /home don’t seem to be enough.
It also tries installing 32bit grub instead of 64bit, causing the grub installer to fail.
If you tell it to install grub on /boot, it complains when that partition isn’t encrypted — fair — but if you tell it to encrypt /boot like it wants you to, it then tries installing grub on the encrypted partition it just created, apparently without decrypting it, so that obviously fails — specific error: cannot read file system.
On the rare chance that everything else goes correctly, the install process can still segfault.
The log does include entries for errors, but doesn’t include an error message. Literally: “ERROR: Installation failed:” and the log ends. Helpful!
If the installer doesn’t segfault and the install process manages to complete, the resulting install might not even boot, even when installed without any drive encryption. Why? My guess is it never bothered to install Grub, or put it in the wrong place, or didn’t mark it as bootable, or who knows what.
Even when using the live disc that includes non-free firmware (including Ath9k) it still cannot detect my wlan card (that uses Ath9k).
I’ve attempted to install thirty plus times now, and only managed to get a working install once — where I neglected to include the Ath9k firmware.
I’m now trying the cli-only installer option instead of the live session; it seems to behave at least. I’m just terrified that the resulting install will be just as unstable as the live session.
All of this to copy the contents of my encrypted disks over so I can use them on a different system. =/
I haven’t decided which I’m going with next, but likely Arch, Void, or Gentoo. I’d go with Qubes if I had more time to experiment.
But in all seriousness, the Debian devs need some serious help. I would be embarrassed if I released this quality of hot garbage.
(This same system ran both Debian 8 and 9 flawlessly for years)15 -
At a restaurant in Augustow there was a sign: "please wait for the waiter"
it confused me. If I'm waiting for the waiter, then what/who's the waiter: the one who's being waited for or the one waiting?
If I'm waiting for the waiter, do I become the waiter?
I think this is a good spot for a recursion bug to occur, resulting in waiter leaks.4 -
Why the fuck does Apple hate developers so much? I just want to test and play around a bit. Why do I have to own a fucking Mac? Why do I need to pay 99$ a year just to install a debug build on my own device?! It's literally impossible to get into ios development without being rich or having some kind of plan for revenue...
Testing my app on Android:
Install Android studio -> plug in phone -> run code in Android Studio or simply install the resulting apk on your phone.
Trying to test my app on my iPad:
Google how to build app for iPad -> reading that you have to own a Mac to run xcode when you want to build Code for iOS -> searching for a workaround -> find a way to build my app online -> setting the tool and building it -> Trying out 5 different tools to sideload the app, no one works -> finding out that you need a developer account to sign the app for testing purposes on MY OWN DEVICE. I really would appreciate it if I would be able to install personal stuff for testing and LEARNING without being forced into insolvency. Why are people putting up with this kind of bullshit?18 -
Really fed up with my colleague and possibly my job. Am starting to doubt am cut out to be a developer
Am a junior java dev , been working working for this company for about 2 years now. Although they hired me to be a java dev, they pretty much exclusively had me working on JavaScript crap because none of the other more senior devs wanted to do even so much as poke JS with a long stick....
Oh and the salary was crap but i figured since i had barely 3 years of exp i thought i would stick with it for a while
But a few months ago after seeing other opportunities I got fed up and threatened to quit , already started interviewing etc
Got an offer, not exactly what i wanted but better than where i was. Went to quit but they freaked out and started throwing money at me. They matched and exceed the other salary and promised to addressed the issues that made me want to leave. Ie get me to work more on the java side of the project and have me work with someone more senior who could sort of mentor me, i had been working semi solo on the js shit till then...
The problem is that my supposed mentor is selfish prick... he is the sort of guy who comes in real early, basically he goes to early morning prayer then come in at some ungodly hour and fuckoff home around 3pm
He does all his work early morning then spends the rest of the day with his headphones on stealthily watching youtube, amazon, watching cricket, reading about Palestine , how oppressed muslims are or building a website for some mosque.
I asked him to let me sit with him so that I could just learn how this or that part of the sys worked , he agreed then the very next day comes in and does all the work before i get in at 9 , i asked him how he did it and he tells me oh just read the code.
Its not as simple as that, out codebase is an old pile of non standard legacy dog shit. Nothing works as it should, i tried to go through documentation online for the various stuff we use , but invariably get stuck when i try the usual approach because it turns out the original devs had essentially done a lot of custom hacks and cowboy coding to get stuff working, they screwed around with some of the framework jars & edited libraries to get stuff to work, resulting in some really weird OSGI errors.
My point is that i cant really just "read the code" or google ...
I gotta know a bit more what was actually modified and a lot of this knowledge isn't fucking documented, theres a lot of " ohhh that weird bug yeah yeah that happens cuz x did this hack some years ago to fix this issue and we kinda built on it, yeah we weren't supposed to do that but heyyy what u gonna do, just do this or that instead"
I was asked to set up a web service to export something, since thats his area of expertise and he is suppose to be teaching me the ropes, i asked him to explain where i should start and what would the general workflow be, his response is to tell me to just copy the IMPORT service and rename it to export then "just do it um change it or something" very helpful indeed (building enterprise application here nothing complex at all!!)
He sits right next to me so i can see how much works he actually does, i know when he just idly sitting there so thats when i ask him questions, he always has his earphones on so each time i gotta find a way to get his attention with a poke or a wave, he will give a heavy sigh and a weary look as he removes his headphones, listen to my question then give me the shortest answer possible before IMMEDIATELY turning away and putting his headphones on as fast as possible regardless of whether I actually understood or even heard what he said. If i ask another question ( am talking like an immediate follow up question for a clarification or something) he will
Do the whole sigh + tired look routing to make me know yeah you are disturbing me. ( god was so happy the day he accidentally sat on and broke them)
Yesterday i caught a glance at his screen as i was sitting down and i think he and another dev were talking about me
That am slow with my work and take forever to get into gear.
Starting to have doubts about my own ability n wether am really cut out to be a developer. I know i can work hard but its impossible to do so when you have no clue where to start and unable to look it up since all the custom hacks doesn't really allow any frame of reference.
Feels like am being handicapped and mocked, yesterday i just picked up my gear n left the office.
I never talk ill about my colleagues, whenever i have a 121 with my mgr i always all is fine, x n y are really helpful etc
I tried to indirectly tell my other colleague about this guy, he told me that guy had kinda mentally checked out of this job and was just going through on auto pilot and just laughed it off (they have been working together for almost a decade and a buddies) my other colleague is pretty nice but he usually swamped with work so i feel bad to trouble him.
Am really Fed up with it all7 -
Wanna hear a story? The consultancy firm I work for has been hired to work on a WPF project for a big Fashion Industry giant.
We are talking of their most important project yet, the ones the "buyers" use to order them their products globally, for each of the retail stores this Fashion giant has around the world. Do you want to know what I found? Wel, come my sweet summer child.
DB: not even a single foreign key. Impossibile to understand without any priopr working experience on the application. Six "quantity" tables to keep aligned with values that will dictate the quantities to be sent to production (we are talking SKUs here: shoes, bags..)
BE: autogenerated controllers using T4 templates. Inputs directly serialized in headers. Async logging (i.e. await Logger.Error(ex)). Entities returned as response to the front end, no DTOs whatsoever.
WPF: riddled with code behind and third party components (dev express) and Business Logic that should belong to the Business Layer. No real api client, just a highly customized "Rest Helper". No error reporting or dealing with exceptions. Multiple endpoints call to get data that would be combined into one single model which happens to be the one needed by the UI. No save function: a timer checks the components for changes and autosaves them every x seconds. Saving for the most critical part occurring when switching cells or rows, often resulting in race conditions at DB level.
What do you think of this piece of shit?6 -
CSS quick maffs:
Using viewport units to define font size but sometimes it's too small?
Instead of font-size: 10vw;
use font-size: calc(10vw + 20px);
This will make sure that font size is AT LEAST 20 px no matter the viewport width. Treat the resulting font size like a function of viewport width and feel free to experiment with it. With calc in that case you can achieve the best typeface responsiveness possible.13 -
Me, two weeks ago, adding yet another function onto an increasingly complex webservice: "hey uh this is getting pretty confusing, why don't we structure the request this other way so at least it makes more sense."
Manager: "just leave it as is, let the other team worry about how confusing it is. It's their problem now, I want you to move on to a new assignment."
Now- the other team is confused by the webservice and does the requests wrong, resulting in failures. Does it become my problem again when they report that my webservice isn't working?
Yes, it does.3 -
This was about 3 years ago. I’m on vacation and just getting off the plane, when my boss calls me on his cellphone. Apparently the crontab on our main file upload server had gotten nuked, and he was asking if there were any backups.
A word about this server. I work with video, so this thing is doing about a few gigabits of traffic incoming at any moment. The cron jobs are necessary to move and organize these massive files into a sane scheme for processing. Hundreds of drop folders receiving thousands of files resulting in terabytes of data every single day. Our storage vendor tells us we have the third largest deployment they know about.
No cron jobs mean all of this content is just sitting around piling up. I tell him sorry, try contacting $otherAdmin since he’s more familiar with that system.
A few days later, after the vacation, I come back in. $boss and $otherAdmin have reconstructed the crontab from scratch after an all nighter.
I ask how it got deleted.
$boss was training some people how to set up new customers on this file server, and he told the trainees to open the crontab in read-only mode. One of them ran:
crontab -r
Yes, we back up our crontabs now.3 -
EoS1: This is the continuation of my previous rant, "The Ballad of The Six Witchers and The Undocumented Java Tool". Catch the first part here: https://devrant.com/rants/5009817/...
The Undocumented Java Tool, created by Those Who Came Before to fight the great battles of the past, is a swift beast. It reaches systems unknown and impacts many processes, unbeknownst even to said processes' masters. All from within it's lair, a foggy Windows Server swamp of moldy data streams and boggy flows.
One of The Six Witchers, the Wild One, scouted ahead to map the input and output data streams of the Unmapped Data Swamp. Accompanied only by his animal familiars, NetCat and WireShark.
Two others, bold and adventurous, raised their decompiling blades against the Undocumented Java Tool beast itself, to uncover it's data processing secrets.
Another of the witchers, of dark complexion and smooth speak, followed the data upstream to find where the fuck the limited excel sheets that feeds The Beast comes from, since it's handlers only know that "every other day a new one appears on this shared active directory location". WTF do people often have NPC-levels of unawareness about their own fucking jobs?!?!
The other witchers left to tend to the Burn-Rate Bonfire, for The Sprint is dark and full of terrors, and some bigwigs always manage to shoehorn their whims/unrelated stories into a otherwise lean sprint.
At the dawn of the new year, the witchers reconvened. "The Beast breathes a currency conversion API" - said The Wild One - "And it's claws and fangs strike mostly at two independent JIRA clusters, sometimes upserting issues. It uses a company-deprecated API to send emails. We're in deep shit."
"I've found The Source of Fucking Excel Sheets" - said the smooth witcher - "It is The Temple of Cash-Flow, where the priests weave the Tapestry of Transactions. Our Fucking Excel Sheets are but a snapshot of the latest updates on the balance of some billing accounts. I spoke with one of the priestesses, and she told me that The Oracle (DB) would be able to provide us with The Data directly, if we were to learn the way of the ODBC and the Query"
"We stroke at the beast" - said the bold and adventurous witchers, now deserving of the bragging rights to be called The Butchers of Jarfile - "It is actually fewer than twenty classes and modules. Most are API-drivers. And less than 40% of the code is ever even fucking used! We found fucking JIRA API tokens and URIs hard-coded. And it is all synchronous and monolithic - no wonder it takes almost 20 hours to run a single fucking excel sheet".
Together, the witchers figured out that each new billing account were morphed by The Beast into a new JIRA issue, if none was open yet for it. Transactions were used to update the outstanding balance on the issues regarding the billing accounts. The currency conversion API was used too often, and it's purpose was only to give a rough estimate of the total balance in each Jira issue in USD, since each issue could have transactions in several currencies. The Beast would consume the Excel sheet, do some cryptic transformations on it, and for each resulting line access the currency API and upsert a JIRA issue. The secrets of those transformations were still hidden from the witchers. When and why would The Beast send emails, was still a mistery.
As the Witchers Council approached an end and all were armed with knowledge and information, they decided on the next steps.
The Wild Witcher, known in every tavern in the land and by the sea, would create a connector to The Red Port of Redis, where every currency conversion is already updated by other processes and can be quickly retrieved inside the VPC. The Greenhorn Witcher is to follow him and build an offline process to update balances in JIRA issues.
The Butchers of Jarfile were to build The Juggler, an automation that should be able to receive a parquet file with an insertion plan and asynchronously update the JIRA API with scores of concurrent requests.
The Smooth Witcher, proud of his new lead, was to build The Oracle Watch, an order that would guard the Oracle (DB) at the Temple of Cash-Flow and report every qualifying transaction to parquet files in AWS S3. The Data would then be pushed to cross The Event Bridge into The Cluster of Sparks and Storms.
This Witcher Who Writes is to ride the Elephant of Hadoop into The Cluster of Sparks an Storms, to weave the signs of Map and Reduce and with speed and precision transform The Data into The Insertion Plan.
However, how exactly is The Data to be transformed is not yet known.
Will the Witchers be able to build The Data's New Path? Will they figure out the mysterious transformation? Will they discover the Undocumented Java Tool's secrets on notifying customers and aggregating data?
This story is still afoot. Only the future will tell, and I will keep you posted.6 -
I don't know if it's the craziest, but once we had an issue with a new release that caused a few forms inside the application to launch with a different scale, resulting very small on 4K monitors.
It turned out the issues were caused by importing "System.Windows" in a new module.2 -
Follow-up to my previous story: https://devrant.com/rants/1969484/...
If this seems to long to read, skip to the parts that interest you.
~ Background ~
Maybe you know TeamSpeak, it's basically a program to talk with other people on servers. In TeamSpeak you can generate identities, every identity has a security level. On your server you can set a minimum security level you need to connect. Upgrading the security level takes longer as the level goes up.
~ Technical background ~
The security level is computed by doing this:
SHA1(public_key + offset)
Where public_key is your public key in Base64 and offset is an 8 Byte unsigned long. Offset is incremented and the whole thing is hashed again. The security level comes from the amount of Zero-Bits at the beginning of the resulting hash.
My plan was to use my GPU to do this, because I heared GPUs are good at hashing. And now, I got it to work.
~ How I did it ~
I am using a start offset of 0, create 255 Threads on my GPU (apparently more are not possible) and let them compute those hashes. Then I increment the offset in every thread by 255. The GPU also does the job of counting the Zero-Bits, when there are more than 30 Zero-Bits I print the amount plus the offset to the console.
~ The speed ~
Well, speed was the reason I started this. It's faster than my CPU for sure. It takes about 2 minutes and 40 seconds to compute 2.55 Billion hashes which comes down to ~16 Million hashes per second.
Is this speed an expected result, is it slow or fast? I don't know, but for my needs, it is fucking fast!
~ What I learned from this ~
I come from a Java background and just recently started C/C++/C#. Which means this was a pretty hard challenge, since OpenCL uses C99 (I think?). CUDA sadly didn't work on my machine because I have an unsupported GPU (NVIDIA GeForce GTX 1050 Ti). I learned not to execute an endless loop on my GPU, and so much more about C in general. Though it was small, it was an amazing project.1 -
The more I learn about programming the more terrified I become about having huge knowledge gaps and learning something wrong by possibly making wrong assumptions about how certain things work or by falling on bad tutorials. I'm constantly hyped about coding, and at the same time I always feel I will never be able to say confidently "I know how to code".
How the hell do you make sure you are learning programming correctly as a self taught? Or do i just have to accept that no matter how and what I code there will always be a better way to do it, resulting in me constantly feeling as a low-skilled coder?3 -
In other news ... The company that booted me and 5 colleagues in april had a water leak and now the entire sales floor was flooded, resulting in +10.000 euro water damage 🤣 good luck making your Q1 sales targets 🤣
Karma much bitches 😂3 -
Just tried to install the english language pack for Visual Studio 2015 Enterprise (the thousands of bucks edition). Well... the setup displayed "DEU" for german and later tried to switch to "EN" resulting in "ENU". First WTF moment.
But what really killed me was the error message... please restart the PC BEFORE the installation? Just wow.9 -
That moment when code reuse makes you reuse reused code and you actually reuse a BUG.
You decide to go for code reusing when your boss asks: "Can you add an edit popup besides that 'add customer' popup button?". You do some little tweaks to the "new customer" code and it allows that to save over an existing entry, cool.
However, after a lot of time spent on reviewing the resulting PR, turns out there was a dormant bug on the code you reused, and it woke up with its new use.
That code was a bad copy-pasta from another, bigger form, which included a whole bunch of optional fields. As it was only used to save new entries, those now missing fields were simply being saved as empty. But as you reused that to save existing entries, you were now cleaning up all those optional fields without noticing.1 -
When the previous dev has written all datetime query lookups by date only, resulting in any values for the ladt day of the month to not be included.
THANK YOU.
Same wanker has copied and pasted same 100 lines of code over and over and literally changed one value in between. Obviously never heard of a function.3 -
I am actually kind of starting to see reacts usefulness and opportunities, but just can't let go the thought that many are blocking javascript, so those would be barred from the resulting site, doesn't that bother anybody else? or is that just generally ignored?14
-
Wellp, I just had a cowoker send me a screenshot. By that I mean a .pdf of the application we both work on that looks like she somehow manifested the program into the physical world and ran it through an early 90's copier, scanned the resulting piece of paper, and sent me that.
-
A few weeks ago, I was kept up until the wee hours of the morning trying to figure out how in the hell the Monty Hall problem works. After finally getting it (I'm slow, okay?), I decided to write a program to run simulations of it.
First incarnation of program took user input. User enters what door they choose (1, 2, or 3), then is told what door Monty opens, then given the decision of staying with the door they originally chose or switching, then informed how that worked out for them.
Second incarnation of program ran on a loop. At the start of each loop, a random door is picked for the user guess. Then the door Monty opens is calculated from the remaining doors (excludes user guess and prize door). Then user switches doors (choosing the door that was not their original door or the door Monty opened). At the end of each loop, if the door they switched to was the prize door, it would increment a win counter, else increment a loss counter. After running the loop 1000000000 times, it printed to console `You always switched doors, resulting in ${wins} wins and ${losses} losses`.
THEN I decided to write a variation to run a while loop on the outside of the loop to increase the number of total doors until the point where the decision to switch doors hurt more often than it helped. At this point, I decided to incorporate file I/O and write to a file rather than a console. And that was neat!
And then I decided it would be cool to go back to the three door variation, printing on each loop the original door, the door Monty opened, the door that was switched too, the result of the switch (win or lose) and what the prize door was.
But for the life of me, I couldn't seem to get the file to write properly. It would, like, always crash my terminal. I tried open + append, I tried append. I tried createWriteStream. Still just failure.
And then I changed it to an appendFileSync and happened to look at one of the files that I was writing to. "Huh, over a gig seems a lot."
"Well, how much are you writing each loop? Did you forget to keep in mind how many bytes that would be?"
TLDR: If you're going to write a program that's going to write data to a file on a loop, you might want to figure out how much it's going to end up writing .... before trying to run it. And running a loop 1000000000 times may be a little excessive.
*face palm*2 -
Man, people have the weirdest fetishes for using the most unreadable acrobatic shell garbage you have ever seen.
Some StackOverflow answers are hilarious, like the question could be something like "how do I capture regex groups and put them in a variable array?".
The answer would be some multiline command using every goddamn character possible, no indentation, no spaces to make sense of the pieces.
Regex in unix is an unholy mess. You have sed (with its modes), awk, grep (and grep -P), egrep.
I'll take js regex anytime of the day.
And everytime you need to do one simple single goddamn thing, each time it's a different broken ass syntax.
The resulting command that you end up picking is something that you'll probably forget in the next hour.
I like a good challenge, but readability is important too.
Or maybe I have very rudimentary shell skills.5 -
Ok, just built my first hello wold using react and after installing node babel react etc... The resulting folder is 51.7mb big. Makes me wonder what am I doing with my life why should I do this. what's the fucking point of it all.
Don't get me wrong I like react and I think it's really cool, but what is all this going to achieve at the end "build a website to sell rubber poop" like wtf... some company wants to sell shit and some monkey with an MBA is going to set the deadline and add Features. No one understands the shit we go through no one cares and we just build websites and Android apps... maybe there is no point here maybe there is nothing.
I remember when coding was fun now it's just building highly responsive web/Mobile based IT solutions to clients who wouldn't know a good website if it fucked them in the ass5 -
Proudest bug squash? Probably the time I fixed a few bugs by accident when I was just trying to clean up an ex-coworker's messy code.
So I used to work with a guy who was not a very good programmer. It's hard to explain exactly why other than to say that he never really grew out of the college mindset. He never really learned the importance of critical thinking and problem-solving. He did everything "by the book" to a point where if he ran into an issue that had no textbook solution, he would spin his wheels for weeks while constantly lying to us about his progress until one of us would finally notice and take the problem off his plate. His code was technically functional, but still very bad.
Quick Background: Our team is responsible for deploying and maintaining cloud resources in AWS and Azure. We do this with Terraform, a domain-specific language that lets us define all our infrastructure as code and automate everything.
After he left, I took on the work to modify some of the Terraform code he'd written. In the process, I discovered what I like to call "The Übervariable", a map of at least 80 items, many of them completely unrelated to each other, which were all referenced exactly once in his code and never modified. Basically it was a dynamic collection variable holding 80+ constants. Some of these constants were only used in mathematical expressions with multiple other constants from the same data structure, resulting in a new value that would also be a constant. Some of the constants were identical values that could never possibly differ, but were still stored as separate values in the map.
After I made the modification I was supposed to make, I decided I was so bothered by his shitty code that I would spend some extra time fixing and optimizing it. The end result: one week of work, 800 lines of code deleted, 30 lines added, and a massive increase in efficiency. I deleted the Übervariable and hardcoded most of the values it contained since there was no possible reason for any of them to change in the future. In the process, I accidentally fixed three bugs that had been printing ominous-sounding warnings to the console whenever the code was run.
I have a lot of stories about this guy. I should post some more of them eventually.2 -
When you've got a full time job and you don't have time to update all you personal apps, resulting in 35 emails from Apple saying your apps don't comply *meh*2
-
My company is (supposedly) all about collaborative work, pair programming, getting on calls and cRaCKinG tHinGs ToGEtheR. Also (and rightfully so) we’re not supposed to approve any PRs if tests weren’t created/updated.
Of course that applies to all but the old timers in the company who simply act like lone cowboys. They fall off the face of the earth for two-three days then reappear with monster PRs full of untested code.
Leave it up to the plebe then to try to make sense of the mess they’ve created, to challenge them with the fact that the PRs are lacking tests (only to be met with excuses about not having anymore time to spend on the subject).
Reprimand the plebe for not reviewing PRs thoroughly enough. Leave it up to them to fix the resulting bugs.
I’ve lost all trust in our managers, tech leads, lead devs and their guidelines and rules that only apply to others but rarely to themselves. These people that then have the audacity to criticize the tech team in it’s entirety for not being rigorous enough in its processes.
Fuck them all7 -
Is your code green?
I've been thinking a lot about this for the past year. There was recently an article on this on slashdot.
I like optimising things to a reasonable degree and avoid bloat. What are some signs of code that isn't green?
* Use of technology that says its fast without real expert review and measurement. Lots of tech out their claims to be fast but actually isn't or is doing so by saturation resources while being inefficient.
* It uses caching. Many might find that counter intuitive. In technology it is surprisingly common to see people scale or cache rather than directly fixing the thing that's watt expensive which is compounded when the cache has weak coverage.
* It uses scaling. Originally scaling was a last resort. The reason is simple, it introduces excessive complexity. Today it's common to see people scale things rather than make them efficient. You end up needing ten instances when a bit of skill could bring you down to one which could scale as well but likely wont need to.
* It uses a non-trivial framework. Frameworks are rarely fast. Most will fall in the range of ten to a thousand times slower in terms of CPU usage. Memory bloat may also force the need for more instances. Frameworks written on already slow high level languages may be especially bad.
* Lacks optimisations for obvious bottlenecks.
* It runs slowly.
* It lacks even basic resource usage measurement.
Unfortunately smells are not enough on their own but are a start. Real measurement and expert review is always the only way to get an idea of if your code is reasonably green.
I find it not uncommon to see things require tens to hundreds to thousands of resources than needed if not more.
In terms of cycles that can be the difference between needing a single core and a thousand cores.
This is common in the industry but it's not because people didn't write everything in assembly. It's usually leaning toward the extreme opposite.
Optimisations are often easy and don't require writing code in binary. In fact the resulting code is often simpler. Excess complexity and inefficient code tend to go hand in hand. Sometimes a code cleaning service is all you need to enhance your green.
I once rewrote a data parsing library that had to parse a hundred MB and was a performance hotspot into C from an interpreted language. I measured it and the results were good. It had been optimised as much as possible in the interpreted version but way still 50 times faster minimum in C.
I recently stumbled upon someone's attempt to do the same and I was able to optimise the interpreted version in five minutes to be twice as fast as the C++ version.
I see opportunity to optimise everywhere in software. A billion KG CO2 could be saved easy if a few green code shops popped up. It's also often a net win. Faster software, lower costs, lower management burden... I'm thinking of starting a consultancy.
The problem is after witnessing the likes of Greta Thunberg then if that's what the next generation has in store then as far as I'm concerned the world can fucking burn and her generation along with it.6 -
When you set up a process and find out a co-worker has been ignoring said process for weeks resulting in a lot of the wrong computers being replaced with new ones and leaving a lot of old computers out in the wild.
-
Dear app developers
The purpose of toasts is to report a few words in response to a single and repeatable action. Don't put long error messages resulting from submitting an 8-page form in a toast.1 -
Overengineering. Finding the right point between overdesign and no design at all. That's where fancy languages and unusual patterns being hit by real world problems, and you need to deal with all that utter mess you created being architecture astronaut. Isn't that funny how you realize that another fancy tool is fundamentally incompatible with the task you need to solve, and you realize it after a month of writing workarounds and hacks.
But on the other hand, duct tape slacking becomes a mess even quicker.
Not being able to promote projects. You may code the shit out of side project and still get zero response, absolutely no impact. That's why your side projects often becomes abandoned.
Oversleeping. You thought tomorrow was productive day, but you wake up oversleeped, your head aches, your mind is not clear and you be like "fuck that, I'm staying in bed watching memes all day". But there's job that has to be done, and that bothers you.
Writing tests. Oh, words can't describe how much I hate writing tests, any kind of. I tried testing so many times in high school, at university, even at production, but it seems like my mind is just doesn't accept it. I know that testing is fundamentally important, but my mind collapses every time I try to write a single fucking test, resulting in terrible headache. I don't know why it's like that, but it is, and I better repl the shit out of pure function than write fucking tests. -
So recently I had an argument with gamers on memory required in a graphics card. The guy suggested 8GB model of.. idk I forgot the model of GPU already, some Nvidia crap.
I argued on that, well why does memory size matter so much? I know that it takes bandwidth to generate and store a frame, and I know how much size and bandwidth that is. It's a fairly simple calculation - you take your horizontal and vertical resolution (e.g. 2560x1080 which I'll go with for the rest of the rant) times the amount of subpixels (so red, green and blue) times the amount of bit depth (i.e. the amount of values you can set the subpixel/color brightness to, usually 8 bits i.e. 0-255).
The calculation would thus look like this.
2560*1080*3*8 = the resulting size in bits. You can omit the last 8 to get the size in bytes, but only for an 8-bit display.
The resulting number you get is exactly 8100 KiB or roughly 8MB to store a frame. There is no more to storing a frame than that. Your GPU renders the frame (might need some memory for that but not 1000x the amount of the frame itself, that's ridiculous), stores it into a memory area known as a framebuffer, for the display to eventually actually take it to put it on the screen.
Assuming that the refresh rate for the display is 60Hz, and that you didn't overbuild your graphics card to display a bazillion lost frames for that, you need to display 60 frames a second at 8MB each. Now that is significant. You need 8x60MB/s for that, which is 480MB/s. For higher framerate (that's hopefully coupled with a display capable of driving that) you need higher bandwidth, and for higher resolution and/or higher bit depth, you'd need more memory to fit your frame. But it's not a lot, certainly not 8GB of video memory.
Question time for gamers: suppose you run your fancy game from an iGPU in a laptop or whatever, with 8GB of memory in that system you're resorting to running off the filthy iGPU from. Are you actually using all that shared general-purpose RAM for frames and "there's more to it" juicy game data? Where does the rest of the operating system's memory fit in such a case? Ahhh.. yeah it doesn't. The iGPU magically doesn't use all that 8GB memory you've just told me that the dGPU totally needs.
I compared it to displaying regular frames, yes. After all that's what a game mostly is, a lot of potentially rapidly changing frames. I took the entire bandwidth and size of any unique frame into account, whereas the display of regular system tasks *could* potentially get away with less, since most of the frame is unchanging most of the time. I did not make that assumption. And rapidly changing frames is also why the bitrate on e.g. screen recordings matters so much. Lower bitrate means that you will be compromising quality in rapidly changing scenes. I've been bit by that before. For those cases it's better to have a huge source file recorded at a bitrate that allows for all these rapidly changing frames, then reduce the final size in post-processing.
I've even proven that driving a 2560x1080 display doesn't take oodles of memory because I actually set the timings for such a display in order for a Raspberry Pi to be able to drive it at that resolution. Conveniently the memory split for the overall system and the GPU respectively is also tunable, and the total shared memory is a relatively meager 1GB. I used to set it at 256MB because just like the aforementioned gamers, I thought that a display would require that much memory. After running into issues that were driver-related (seems like the VideoCore driver in Raspbian buster is kinda fuckulated atm, while it works fine in stretch) I ended up tweaking that a bit, to see what ended up working. 64MB memory to drive a 2560x1080 display? You got it! Because a single frame is only 8MB in size, and 64MB of video memory can easily fit that and a few spares just in case.
I must've sucked all that data out of my ass though, I've only seen people build GPU's out of discrete components and went down to the realms of manually setting display timings.
Interesting build log / documentary style video on building a GPU on your own: https://youtube.com/watch/...
Have fun!20 -
I think the number 1 reason I hate PHP is not because the language itself is really really really bad; but because it's so easy to google "how to php" and get tons of tutorials (full of shit code) that most of the PHP programmers are bad and have no CS studies whatsoever, resulting in unmantainable tight-coupled pieces of [spaghetti] code that won't even encapsulate any business logic.
Anybody else feeling like changing to a different language a similar reason?5 -
Recently thanks to Whatsapp I've discovered a new pet peeve:
People pressing "send" after finishing a sentence (at best) instead of making new lines, resulting in around 5 new messages received at lightning speed.
Not to mention, they keep on going while I am trying to reply, losing my concentration in the process! 😡5 -
I wanted a personal website when I was 15. My brother-in-law sat me down, showed me Dreamweaver and told me "Learn this stuff. It will be valuable when you're older." I dragged and dropped and then looked at the resulting code. Then came sites for friends. Finally, college. I still learn new stuff all the time with each project. I couldn't be happier!10
-
I had a pretty good laugh just now.
There's this extension I wrote for our client's online shop which enables them to create template files via the backend. Essentially it's just an editor reading and writing files from/to a directory.
So I installed said extension using a package I found locally, thinking it was the latest release. Unfortunately it was not.
As I said the extension writes template files within it's own directory and back when I had packed up the extension, I must had forgotten to delete these template files resulting from tests and messing around.
Long story short, I just received a ticket about a line of text suddenly showing up below the product page description saying: "I like turtles!"
The ticket itself was very professional though and the client didn't forget to mention that the "notice" was not part of their product feed data. No shit! LOL2 -
1) Never be afraid to ask questions.
There are so many instances of situations where assumptions have been made that shouldn’t have been made, resulting in an oversight that could have been rectified earlier in a process and wasn’t.
Just because no one’s asking a question doesn’t mean you’re the only person who has it.
That being said, it’s really important to figure out how to ask questions. Provide enough context so that the audience for your question understands what you’re really asking. If you’re trying to troubleshoot a problem, list out the steps you’ve already tested and what those outcomes were.
2) When you’ve learned something, try to write about it. Try to break it down as though you were explaining it to a child. It’s through breaking down a concept into its most simple terms that you really know that you understand it.
3) Don’t feel like you have to code *all of the time*. Just because this is what you’re doing for a living doesn’t mean that you have to make it your life. Burnout is real, and it happens a lot faster if it’s all you do.
4) Find hobbies outside of tech!
5) Network. There are a number of great communities. I volunteer for and am a member of Virtual Coffee, and can vouch for that community being particularly friendly and approachable.
6) Don’t let a company pay you less than industry standard and convince you that they’re doing you the favor of employing you.
7) Negotiate salary. Always.
8) If you’re a career transitioner, don’t be afraid to talk about your previous work and how it gave you experience that you can use in programming. There’s a whole lot of jobs that require time management, multi-tasking, critical thinking, etc. Those skills are relevant no matter where you got them.
9) If it takes a while for you to get a gig, it’s not necessarily a reflection on you or your abilities.
10) Despite what some people would say, coding’s not for everyone. Don’t feel like you have to continue down a road just because you started walking down it. Life’s not a straight path. -
My manager’s manager (my superboss)..
Every time we go for a design discussion, this guy goes into his own world of inspiration, motivation, religion and damn things.. the more you think of pulling him back, the more lame jokes he starts to crack, the more you’ll bring in work related talks, the more stupid his output will be.. it is now resulting in a late delivery date, a frustrated manager, and a frustrated team. Moreover he says, he’s inspired from Elon Musk, dafuq, I mean seriously? What part of his approach on productivity you actually got inspired by? Sleep?4 -
Only 25 days left to get my Fanatic gold badge in stackoverflow and my browser decides to open up the new window instead of the old one with all my pinned tabs in it... So I forget to log into stack overflow for a day resulting in me going back to 99 days of everyday visiting the site until I get my Fanatic badge... I feel so fucking depressed FML4
-
One of our projects migrated their file-repository to another one during a major release.
Instead of giving this task to an experienced programmer, they gave it to the head of the respective dev department due to the usual release panic.
Soo.... He wrote the migration tool. It was executed during the release. Everything seemed fine so far.
A few days later. Someone from the above project came to my team due to some "strange behaviour on the production database".
They reported that they couldn't download some of the user's documents due to unknown reasons.
After quickly analyzing the current state of the new file-repository, we concluded that the affected documents did not exist in the new repository.
Then we took a look at the so called migration tool...
Well.. After nearly 30 min. we knew the root cause for that.
They only migrated the first 4 levels of the folder structure. Due to the assumption that "we don't use deeper nesting". (Facepalm)
As the head of their department wrote it, no one seems to questioned it either. Nor did they made a code review and ended up with a tool with hard coded urls to the production db, no version control, no build tool, no ci, nothing. Breaking nearly every possible company standard.
However.. That's not it. When analyzing their migration tool we noticed another even more dangerous thing.
They mixed up the id generation of the migrated documents resulting in a random assignment between customers and documents. Which is quite bad as this contains sensitive information. E.g. passports
They offered us quite a nice amount of money to fix this until EOB. We declinded as it was simply not possible in that time, but agreed to support them with the new tool.
After some time I heard that they migrated production again. And they fucked it up again. They never talked to us after we offered them support...
The third and final migration was written by us. Not only migrated it correctly. It was also way faster. By factor 20.
In the end we haven't gained anything from this rushed project as the penalties were piling up due to this fucked up migration.
After all this time I'm not sure who is to blame. In my opinion, partly all of them.
Head of department who can't and shouldn't code.
Seniors who didn't review the code and didn't ask for help.
Release mgmt who put way too much pressure on the devs. -
...another (probably about fourth) completely futile attempt at making MASM compiling pipeline work...
...what the fuck... seriously, i've spent together about two weeks of time trying to make a fucking default hello world compile... ml64 problems, then rc.exe problems, apparently i was missing some dumb CommonService.dll which not only doesn't exist anywhere on my computer, but it doesn't even seem to exist at all in this fucking dimension. After several hours I had the bright idea of "fuck MS rc, let's just grab any other random resource compiler that I can find, and see if that one works".
Funnily enough, it does. Except Visual MASM can't run it from it's build process because it fucks up the commandline call, so I need to run it manually, and then when I run the build from V-MASM, the rc call still fails, but then it checks for the resulting .res file and finds it, so it happily continues with success...
...and now fuckin... what even is it? *goes to check*
oh yeah, now linker is shitting itself:
LINK : fatal error LNK1104: cannot open file 'user32.lib'
And I'm just completely defeated, just searching system-wide for the lib intending to copy it into the linker folder because fuck this fucking bullshit, I've had enough of drowning in MS BuildTools versions and installations and uninstallations and fixes and modifys and repairs and all that FUCKING BULLSHIT.
HOW. THE. FUCK. is this in any way usable for anyone. I suspect nobody ever actually tried to build an assembler project in the last 30 years, so nobody noticed it DOESN'T. FUCKING. WORK.
THIS.
THIS is why I hate anything that's not a proper IDE where I install ONE thing, and do everything in that ONE IDE and let IT figure out all this linuxy-soft-coupled bullshit of twentyfuckingthousand fucking useless commandline apps threwn around the whole fucking system where I'm fucking supposed to know where the fuck what is and which version and GO FUCK YOURSELF.
GIMME. FUCKIN. ONE: IDE. WHICH. WILL. INSTALL. ALL. THAT. IT. NEEDS. TO. BE. FUCKING. ABLE. TO. FUCKING. WORK. AND. COMPILE. SHIT!!!
FUUUUUUUUUUUUUUUUUUUUUUUUUUCK.10 -
GODDAMN I HATE WIX!
I feel angry. I feel like smashing the developer's face who programmed this piece of shit editor. Everything I touch there just breaks and moves on its own. I fix the header, save, come back the next day and everything is shifted 5 pixels. WTF!?!
Plugins that they developed in-house aren't even compatible with their own systems. Custom code disappears suddenly. Editor doesn't allow two people to edit at the same time, resulting in lost work.
Seriously FUCK WIX.
Don't ever even consider touching this nightmare of an editor.
I could literally have hard-coded the entire site in React or Vue faster than building it in this editor, but my client wants the ability to edit things on their own later.
WIX: Not even once.4 -
Developer just emailed our team a complaint that our logging assembly was resulting in their poor test coverage and they sent a change request to give them the ability to mock the underlying log provider (ex. from the event log to ‘something else’).
Looked at their tests, and they are testing whether or not the .Log was executed (on an exception, if the .Log method was not executed, the test failed), which seemed a bit worthless because we’ve already got coverage in our unit tests.
We had a meeting to discuss the issue.
Me: “I’m OK with changing the logging code if it’s necessary, but I want to understand why.”
DevA: “Logging errors is crucial to the database transaction. If someone removes the logging, the tests should fail.”
Me: “If someone removes the error logging on purpose, then they likely have an agenda and will remove the test validation too. It wouldn’t be an accident.”
DevA: “That’s not my problem. They will have to deal with HR.”
Me: “We purposely prevented someone from intercepting the logging just for that purpose. Your test code already covers the business rule, testing the logging seems out of place. That would like writing a test to make sure the System.IO.File.ReadAllText actually reads all the text from a file. You kinda assume a few smart Microsoft engineers already wrote tests for that.”
DevA: “Yea, I guess that would be silly.”
Got cc’ed an email a little bit ago from DevA to his boss..
“We’re not going to be able to change logging assembly. This may have some impact on our overall test coverage as those lines of code will not get testing coverage. You will have to let the DevMgr know we will not meet our test coverage goals.”
WTF!1 -
Why is everyone on this platform close to a certain timezone resulting me being alone here right now. Just woke up. Can't sleep. It sucks53
-
!rant
We've got a small army of foreign contractors working with us both in the office and overseas. Syntax has become the thing that stands out to me the most. We can all speak the same language, but our partners don't quite have the syntax down, resulting in some rather amusing email exchanges. I can't fault them, if the shoe was on the other foot, I guarantee I'd be butchering any other language's conversational syntax. Overall, the experience has been a bit of an eye opener for me. -
When you have to debug a system made by a freelance agency that only had to get it working and not maintain and support it, leaves you with that feeling;
Their stack: https://m.xkcd.com/1636/
Their tool chain: https://m.xkcd.com/1579/
The actual resulting code: https://m.xkcd.com/1185/
And nobody can see why performance is suffering — it's all so simple and beautiful...undefined front end web dev tools stack wars my stack is bigger than yours tooling other people suck -
In an algorithm class, professor introduced us to some simple search algorithms (bubble sort, selection sort, insertion sort, shell sort). He did a quite decent job and most of the students were able to grasp the code and understand the differences in those algorithms. But then he spoiled his whole lecture with one additional slide. There he proposed an optimization: Instead of using a temporary swap variable, we just could use the first array element (or the zeroth element, respectively: the one ad index 0) for doing all the swapping. We just had to document that, so that the caller would "leave the first position of the array empty", resulting in "cleaner code". And he did that in the same class where he used Big-O notation to argue about runtime complexity. But having the caller to resize the array and to shift all the elements by one position did not matter to him at all, because it was "not part of the actual algorithm".2
-
So when we started this project like 4 years ago... new to the framework, kickstarting lot's of forms with file uploads. Everything seemed to work fine, uploads and downloads worked..
First version of the project got deployed to prod and for weeks or so users have been registering and submitting stuff...
Only problem was: most files were overridden by consecutive uploads as our central upload lib stored files with the same name on disk (normally the ID of the db row was injected but most files were saved before the db row was - resulting in 0 IDs...)
Yeah so... that hurt :(1 -
Usually, when I programme for myself or in a German-only team and they agree, I/we do it in German because it makes naming things much simpler (no naming conflicts, never, and a strict visible separation between your code and libraries).
This time, I thought: "Nooo, let's do it in English, because, you know, reasons and it fits into the situation"...
Booom, stack overflow!
"How in the hell did that happen?" I never had a stack overflow before outside of recursive programming.
And what was it? I had made a class to encapsulate an API, added a property with getter and setter, naming in English and similar to the said API... very similar... in fact, the property had the same name as the API function, resulting in a getter calling itself over and over again.
This was a harmless mistake, and found very quickly, but it's interesting so see how a habit (or working method) probably prevented similar or worse sources of error in the past.3 -
Well, I am not sure whether this is supposed to be about worst experience as a reviewER or a reviewEE so I'ma do both. First as a reviewer.
So, on my first project in this company, I introduced automated build scripting (read: suggested, was "volunteered" to do it, then had to bust my ads to get it done). Prior to this, our process was run the thing in Visual Studio a bunch of times (don't ask) and package the resulting files. Well, new requirements made this not sustainable.
So after many many meetings in which I assured my co-workers that the script wouldn't cock up and go sideways and format our server (HOW???) and showed them how to work it AND added all the features they requested. I finally send the script out for code review. Oh the joy. Questions like: "why did you implement this?" Came from the guy who told me to implement it. "Can you change the formatting?" I checked and no. "Why isn't this to the code standard?" Because the code standard doesn't include scripting languages.
And here is the piece that takes the whole piss soaked shitsicle pie "I don't understand why we're doing this in the first place. We have a build process already, why do we need a new one?" FUCKING REALLY?!?!? YOU WERE IN THE GODS DAMNED MEETING WHERE WE DECIDED TO DO THIS!!! SET OUT THE REQUIREMENTS!!! LITERALLY EVERYTHING TO DO WITH THIS SCRIPT YOU WERE THERE AND YOU'RE ASKING WHY WE'RE DOING IT NOW!?!?! Fucking hell. I forced it through anyway because I had the higher ups all signed off on it, but seriously. Just because we're doing something new that slightly inconveniences you, doesn't mean it doesn't need to be done. Stop being afraid of change.
Side note: these people actually would regularly hold up process and product improvement because change is scary.2 -
Today our so called "architects" chose the most complicated, most unmaintainable, prehistoric way to handle a simple, really easy REST problem...they stood around the white board, marveling at the alleged brilliancy of their imbecile drawings and tried to show us low life devs how we should implement this or that idiotic aspect of their crazy solution. We looked at each other desperately, raising our eyebrows at each new wave of insanity. No one spoke up...that includes me. I feel shit right now. Implementation sprint starts tomorrow. Thinking of grabbing a life vest and jumping overboard right now. Our customer will strangle us for this wannabe crap and I am already scared having to show the resulting API to them.4
-
Quality != more work + less talk
Quality = more talk resulting in less work.
That makes no sense mathematically.
“Let’s talk more about shit before we create shit”.
That’s a little better.
“Let’s talk more so we don’t create shit”.
Getting closer.
“Let’s talk more about what is needed till we all know what is best before we program a damn machine?”
...This is going nowhere fast.
Okay fuck it. Let’s just code some stuff. It’s more enjoyable.7 -
Context: This team has been constantly behind on deliveries, ignoring advice from other teams or more experienced colleague, making mistake after mistake and now, just revealed they have major performance issues, as warned...
So, in the most recent Sprint review they were, once again, criticized for their bad approach and inability as a team to receive feedback and work on that feedback, resulting in mediocre development...
As I left the room I heard one of them say:
"We make this huge rocket that most wouldn't be capable of doing and they cry that it's blue and not green... Others make a ls on a command line and everybody applauds"
Now, this is for everyone to whom the shoe fits...
Listen here you little entitled snotty prick, where do you think you are!? Yes most should not make a rocket when the requirement was a bike! That's overengineering and besides that most of your decisions were arguably wrong!
I will never applaud you or anyone else for doing your fucking job and being mediocre about it... What we applaud is value added! Value to the project, to the process or to the team... Bring value and I will applaud, do your job and you get a salary. Be a snotty childish dipshit and you might find yourself forcefully searching for new professional challenge! -
Old old organization makes me feel like I'm stuck in my career. I'm hanging out with boomer programmers when I'm not even 30.
I wouldn't call myself an exceptional programmer. But the way the organization does it's software development makes me cringe sometimes.
1. They use a ready made solution for the main system, which was coded in PL/SQL. The system isn't mobile friendly, looks like crap and cannot be updated via vendor (that you need to pay for anyway) because of so many code customizations being done to it over the years. The only way to update it is to code it yourself, making the paid solutions useless
2. Adding CloudFlare in the middle of everything without knowing how to use it. Resulting in some countries/networks not being able to access systems that are otherwise fine
3. When devs are asked to separate frontend and backend for in house systems, they have no clue about what are those and why should we do it (most are used to PHP spaghetti where everything is in php&html)
4. Too dependent on RDBMS that slows down development time due to having to design ERD and relationships that are often changed when users ask for process revisions anyway
5. Users directly contact programmers, including their personal whatsapp to ask for help/report errors that aren't even errors. They didn't read user guides
6. I have to become programmer-sysadm-helpdesk-product owner kind of thing. And blamed directly when theres one thing wrong (excuse me for getting one thing wrong, I have to do 4 kind of works at one time)
7. Overtime is sort of expected. It is in the culture
If you asked me if these were normal 4 years ago I would say no. But I'm so used to it to the point where this becomes kinda normal. Jack of all trades, master of none, just a young programmer acting like I was born in the era of PASCAL and COBOL9 -
Some things never change
> Have to deploy only one feature to production
> Create branch from latest tag, cherry pick the correct changes
> Mess up merge
> Almost deploy resulting broken code to production
> Realize at last moment
> Let out a loud sigh, start over
Every damn time.4 -
Myself. I started with PHP about 7 years ago. Most people nowadays don't really start writing vanilla code in language they are learning anymore. Everyone just want to see results and fast, I didn't. I needed everthing to be perfect from the start. It took me a little longer to get shit done as to anyone else and sometimes it really bothered me. Am I stupid? In the end it turned out, I was not *that* stupid. In the end I learned to hate half-baked solutions of these "fast" people.
Along the way, my coding style got better and better as I gained experience. In my opinion, coding standards are a good for helping you find your own coding style. You shouldn't use them blindly just because they exist. You and your colleagues should always find the optimal solution that works for you. I probably wouldn't be able to work in a company where the code is written the way I hate. It hurts when I have to write something under a lot of pressure and just glue things together resulting in a pile of mess.1 -
A gene development framework that could:
* simulates the resulting proteins correctly (folding and all)
* debug genetic sequences/proteins
* Design injectors for gene sequences into an existing genetic sequence
Etc'2 -
I once found a bug that I couldn't figure out from the code, so I started putting log statements that would print out the variables on screen (yes I have xDebug, but old habits die hard). Then the entire website didn't load anymore and eventually the entire container crashed.
It took me an hour to realize I was trying to var_dump an object from the ORM, resulting in a memory overload since there were like 20 related objects that recursively tried to load all the data in the database.
In my defense, it was friday afternoon... -
Flask people
so I was given this old flask project, around 3k lines written in py2, the code is simply old and not refactored. So, it's pile of shit. Migrations completely botched as the original author created reference to live data in models.
Very strict line formatting resulting in backslashed ternary conditions.
Even saw manually formatted json responses... _line by line_.
My job is to clean this mess and eventually do as much as possible to freshen the whole project.
Currently just refucktoring the code as it's the only easy thing to do out of everything that could be done (it's still slow process).
Any tricks and tips? currently considering to try upgrading it to py3 but it feels like throwing gunpowder into already burning house.3 -
My reasoning is stupid, I just think it's cute in a pimp my ride kind of way. I heard you like getting colossally pounded in the fucking ass, so we put a virtual machine inside your compiler so you can use your binaries while you compile your binaries.
But there is a practical angle to it, too. It's state, structures and execution within the code itself -- that is, in a sense, generators "embedded" within the source, but without any kind of special syntax.
Rather, the code is all the same, and I'd have the option to make calls at compile time: the output of these calls could, in turn, be part of the resulting binary or processed by further calls.
It'd greenlight the wildest fuckery in the jungle, because *that* is the true and ultimate abstraction: programs that write other programs with minimal human intervention. But is my (still) theoretical, cheap ass two-dollar prototype approach held together with clown jizz and prayers better than the endless cumloads worth of corporate investment that's dumped and pumped into generative AI on a daily basis?
Well... **lights cigarette**
That's what we're about to find out, mother fuckers.1 -
Sho Ha Ri
First, follow the tutorial and don't try to do anything fancy, finish it and have it in a working state
Second, start experimenting, can this be improved? How? Does it still work?
Last, transcend. Develop your own way of doing it.
If you don't go through these stages properly you might get stuck and frustrated and never get whatever you're working on in a working state, resulting in hating the technology.2 -
Finally managed to install nvidia driver on my ubuntu laptop after a couple of fucked up resulting in me formatting the ubuntu partition. Im sure there are solutions which didnt require reinstalling the OS but I gave up trying after wasting about hours tinkering with the installation, and restarting into blank screen.
Now that I can work and play dota on ubuntu, Im ready to get rid of the windows 10 dualboot2 -
For a new microservice we were designing, I recently had a design discussion with a team member on creating REST endpoints for a new entity. This discussion went on for almost 3 hours, most of the time was spent on why to have two endpoints for getting this resource, one is a POST using a graphQL-like query and another one is a GET using unique ID. I said, the client-side use case is different, one is a dashboard where search results need to be shown based on multiple fields and the unique ID won't be available there because it is a system generated value, second one will be used when the unique ID is present in the client as a result of previous search result. Their responses will be similar, first returns a list of entities, second returns a single entity of the same structure.
Then came the next argument: if both APIs are returning same response, why do we need two different requests ?
It was like saying, because 5+6=11, any sum of two numbers resulting in 11 should always use 5 & 6.
Are people so frustrated of working remotely all the time that they come with such weird arguments ?1 -
Linux is great - to tinker, to pull in all your FOSS, mess around...
But it's so fucked up, if you actually build and maintain a product on it, i.e. try to distribute s.th. in binary for money even. It's just not intended. If you offer your code for free, you can always say: "Ah, just compile it yourself. You might need these 29 dependencies, of which 2 are not even checked by configure, oops, and now it crashes, maybe in that qt library version, you picked there's still a bug?.. you know, it worked on my machine, sorry."
But if you sell it, it better install and run! And even if you target only the main distros of all that fragmented Linuverse - let's say, Debian, Ubuntu, RHEL, CentOS, Fedora, and if you're in Germany OpenSuSE and SLES, you'll start to see the crap of work you're up with. What you could try is to orchestrate a docker fleet with one container per distro, where you take the oldest version you still support compile a newer gcc there (to at least have C++11) and all your third party libs and then hope the resulting binary runs on all the newer versions of that distro, too.
(You could even be so brave as to try to pick a deb and rpm distro to build for all other distros.)
But ABI incompatibility can still bite you. For instance we once had the insane case, that our GUI would no longer start just by switching the Window-Manager to KDE.8 -
I saw one of my coworkers do a multi step bus ticket purchase in one file (we use angular 4) instead of using components he just hide and show the sections, resulting in a class that have about 2000 lines of code, unused variables, unused functions o just functions that console.log something, and many many lines of declaring variables. I tried to fix that, but this crazy deadlines were fucking with me3
-
To me, the single biggest coding distraction is other coding, i.e. When there are more things to work on than there are developers and priority changes on a whim. My runner's up would be people who come to you directly for non-urgent matters disregarding that you're busy. The third would be meetings, but I consider meetings to be a necessary evil. Almost nothing is worse than too little communication and the resulting mismatch in expectations.
-
So, I just recieved a welcome email from bit.ac, with my email and a random generated password. The fact is that, I have never registered on this website. Did someone just registered with my email? Or maybe it's a new marketing strategy, to collect emails from another databases and send them emails, "reminding" them their email and a random generated password, so that who recieve the email, to be confused and to access the website to see what is all about,resulting that the company gets more traffic & eventually new possible customers?undefined someone made an account on my email random mail mail maybe marketing strategy? bitcoin bit.ac7
-
Would it be plagiarism to convert a video tutorial to a text version write-up for others like myself who prefer not interpreting my music to learn
Or would the resulting documents be something to keep to myself for when I inevitably search the same things3 -
Client be like:
Pls, could you give the new Postgres user the same perms as this one other user?
Me:
Uh... Sure.
Then I find out that, for whatever reason, all of their user accounts have disabled inheritance... So, wtf.
Postgres doesn't really allow you to *copy* perms of a role A to role B. You can only grant role A to role B, but for the perms of A to carry over, B has to have inheritance allowed... Which... It doesn't.
So... After a bit of manual GRANT bla ON DATABASE foo TO user, I ping back that it is done and breath a sigh of relief.
Oooooonly... They ping back like -- Could you also copy the perms of A on all the existing objects in the schema to B???
Ugh. More work. Lets see... List all permissions in a schema and... Holy shit! That's thousands of tables and sequences, how tf am I ever gonna copy over all that???
Maybe I could... Disable the pager of psql, and pipe the list into a file, parse it by the magic of regex... And somehow generate a fuckload of GRANT statements? Uuuugh, but that'd kill so much time. Not to mention I'd need to find out what the individual permission letters in the output mean... And... Ugh, ye, no, too much work. Lets see if SO knows a solution!
And, surprise surprise, it did! The easiest, simplest to understand way, was to make a schema-only dump of the database, grep it for user A, substitute their name with B, and then input it back.
What I didn't expect is for the resulting filtered and altered grant list to be over 6800 LINES LONG. WHAT THE FUCK.
...And, shortly after I apply the insane number of grants... I get another ping. Turns out the customer's already figured out a way to grant all the necessary perms themselves, and I... No longer have to do anything :|
Joy. Utter, indescribable joy.
Is there any actual security reason for disabling inheritance in Postgres? (14.x) I'd think that if an account got compromised, it doesn't matter if it has the perms inherited or not, cuz you can just SET ROLE yourself to the granted role with the actual perms and go ham...3 -
when you're struggling to build small sized firmware on your 512Kb IoT Device resulting in bootloop every time... Then you see in the manual, that you have the 4Mb model and you frashed the rom to the wrong memory address for 2 weeks resulting in a bootloop... FML
-
Every once in a while the flexibility of dynamic types comes back and bites you in the ars:
So I created method that returns the date significance (day, month, year) or null when no date is set.
I chose a class constant DAY with the value 0.
This is not a problem in if statements as I always use === but in this case a switch made more sense. And as you can guess no date set (NULL) was handled in the self::DAY (0) case... 😐😑😶 Silently resulting in wrong results when no date is given! #£#@$& (and other comic swearing symbols)
Even though php7 finally has decent type hinting resulting in much clearer defined API's we can still go very wrong.
More love to Go for less verbose static typing! To bad we can rarely use it at the office 😥2 -
Worst mistake? Well nothing to bad since it only affected me. Tried out of curiosity to instantate an object every frame in unity that ran an infinite loop every frame. It crashed not only unity but also my computer resulting in about an hour of lost work :P
-
Ideas I've had over the years that could pan out and be useful:
SMS-DB: Stands for SMS-Data Burst. Used to allow those with low cell signal or no data plan to transfer data between a phone and some client via the standard SMS text space. Would be slow, but would act kinda like dial-up over SMS (as mobile lines are compressed on all service levels, even LTE, so traditional dial-up wouldn't work!) I have a general idea on how packets would be laid out, but that's about it so far...
everything2PNG: Allows one to transpose any file's data into a PNG with a 3 byte per pixel (full color RGB), which allows for a "compression" of sorts (about 91, 93% on preliminary tests) AND allowing further, more efficient compression of the resulting file. (Plus... it's just kinda cool to see files transposed as PNGs.) I actually have a simple transposer to go to PNG, but can't yet go back. Large files (around 600MB) use upwards of 4GB with efficient paging and other optimizations via NumPy so far, so it's not *viable* yet, but it's coming along nicely.
RPi-GPIO Interconnection Bus: A master/slave or round robin method to allow for Raspberry Pis to communicate using GPIO, which can help free up network bandwidth in RPi cloud computing clusters. At most, this'd allow for 4 bits used for pushing to the GPIO "bus", and 4 bits used for pulling from the "bus". 8 pins total are usually unused minimum, so either 3 or 4 pins for upload, 3 or 4 for download, and potentially 1 or 2 for commands, general non-data communication, etc. I made a version of this concept using Round Robin for a client, but it was horribly slow. (I also don't have distribution rights for the code, so i'm working from scratch.) Definitely doable. -
I got contacted by an other company and I am so unsure whether to accept their offer or stay at my current job.
For now I spend 2 years at my current company. The culture is great and everyone gets treated very well.
The bad part is, that it is located in a part of Germany I really can't stand and to this day fully remote is not an option.
Additionally lots of stuff is really frustrating in my daily work, e.g. colleagues that experiment with critical parts if our infrastructure, resulting in every developer who made the mistake to update the local development stack being unable to work for half a day or so.
This and the fact, that our techstack sucks hard. (mostly bad php for backend and server-rendered HTML and a weird mix of Typescript, Javascript, Vue and some old bits of deprecated angular for frontend). This company has it's own product (a web platform) and no real deadlines in the sense of "something bad happens, when your team won't achieve the project in the originally proposed time"
Company number two seems to work with a wide variety of technologies for very different projects (it's a consulting compan), would pay me ~28% more than my currently raised pay and allows for full remote.
When I try to look objectively on the facts everything points to accepting their offer, but on the other hand there is this weird feeling of this being a joice that would come to soon...
How do you make such decisions? I already talked to a great colleague of mine, who thinks it might not be a bad idea to stay at the company for an additional year or 2, because I haven't yet reached the point where there is not enough to learn here anymore, which I agree on, but this company seems to offer everything I want.
I feel overwhelmed with this situation :D that's why I would like to know how you people try to tackle such a situation8 -
just a thought : the advancement in AI is going to result in a lot of porn and fetishes reaching an even higher audience. comparing the advancements in generations :
gen x :
- porn is limited to magazines and comics
- people are crazy about sex but only in their homes
gen y :
- porn as an industry gets established. a few companies with good money starts hiring people and create porn as content.
- the governments are sceptical and puts lots of regulations in this industry resulting in those japenese sensored porns and porn being shared like drugs in market (secretively)
- only the curious people are able to get access porn with lots of hardwork
gen z/curren5 gen :
- porn as a concept is still a taboo in religions and general public , but government is lineant and does not /could not stop its distribution
- porn accessible to anyone with an internet
- content creation no longer a high investment business, lots of small companies and even individuals become content creators
- rule 34 flourishes resulting in a lot of fetishes . wherever there is an idea, there maybe some content creator making a video, comic or art on that idea.
next gen :
- AI creates realistic porn on any idea. the access to such ai models becomes cheap . thus anyone who is a consumer can become a producer, resulting in even more content generation
- since ai can use non real people to make porn, the stigma around porn reduces and mature content gets more mainstream ( r rated movies getting family friendly ratings)
- rise of hate porn, deep fakes, resulting in either the concept of hate porn getting less audience , or direct decrease of extroverted professions ( no real actors/actresses to shoot movies)
just some thoughts around porn lol11 -
When your co-worker thinks he's funny by adding a semicolon at the end of a condition resulting in a way too long bug search...1
-
tl;dr i am proud of my universal program but annoyed it won't get appreciation.
<brag type='slightly'>the last three days i refactored my various snippets to a kind of modular and scalable software package. restricted to a rigid company system i make use of the technologies i feel confident in. so i created a javascript app that can be used with internet explorer. it is a neat tool to work smarter and mainly to make repetitive writing tasks efficient using predefined textblocks that have automated linguistic adjustments and are multilingual usable. after refactoring it is possible to extend any desired functionality by just adding another module. i learned a lot about implementing separated data structures, data processing, output and asynchronous script loading (and the annoying limitations of ie11).</brag>
i kept in mind that this tool might not only help my personal duties to be done more efficient but also might come in handy to all my colleagues having similar tasks to do. the downside is my colleagues having irrational computerphobia and i know for sure they will proceed to do these repetitive writings manually resulting in inconsistencies and an inefficient time management. while my wise wife tries to convice me that at least i had fun coding this stuff and having it supporting me with annoying tasks, it still bothers me being the only user, as it means no progression for the company. it riddles me how the colleagues, acknowledging us all being craftspeople in the first place, avoid use of computers whenever possible and rather rely on medieval working flows.
i find it quite amusing to be the 'can you fix my printer'-guy, but i just cannot handle this attitude. and everyone complains about having so much to do. get your shit together and start clicking these few buttons goddammit! -
#justathought
Since a country is considered to be the strongest definition of a group of unified people, consider the following scenario:
Every country makes it mandatory that any foreign company can only sell their software products as free to use softwares, or one time cost software, or a membership software.
These foreign companies are NOT allowed to generate revenue via Advertisement services or data collection/sharing/analysis AT ALL.
The sole right to share/collect data and use Advertisments as a revenue model remains in the hands of domestic companies born, registered and working in that country only.
This would generate an equal chance for both domestic and international companies to grow(domestic companies getting a chance to grow with a better revenue model, while international companies getting a chance to grow by monetising their tools/algorithms and investing in domestic companies) , resulting in countries getting a chance to grow themselves.
Open source will still win, as open source majorly contains tools and technologies for general public use.
Premium tools and frameworks would become even more valuable, and would he shared among countries like the way they share space researches and resources on nuclear technology today.
Privacy will win, as the data of a particular country stayed within a country. Domestic Companies sharing data with other companies (or even their foreign parent companies) would be held against the respective country's laws only, and government would be more involved in protecting its citizens from data theft.
Is it feasible?11 -
You know that feeling that you get like 1% of the time when you feel like you're coding probably the best piece of code you wrote in your life and then you remember that without exclusion every piece of code you wrote in the past you end up considering a stinking pile of shit thus resulting in a total loss ego-rection?
*sigh*
is this the ego death junkies talk about?1 -
So I just got an insight from my PW session in SQLplus. I finally understood why the fridge did the SQL console under Oracle return the error:
ORA-00911: invalid character
on a line that seemed perfectly correct, but it's as if it spawned you an invalid character, just because.
But in fact, when I enter a character unintentionally like ç, then I remove it, it's as if the text prompt makes it look like it got removed, but there's still the cedilla, or at least its character code roaming around in the line I'm writing, and thus resulting in an error.
I'm not even salty now, that got me curious, and I think it's better like this, even if I'll require a bit of research on that thing later on.4 -
Another terrible rant from the inhereted Hydra source code. So deep in the dark dungeon of that code I noticed something interesting. They declare this INT32 array with an incredibly long (like 200 values) list of hard coded magic numbers. Something along the lines of:
INT32 array[200] = {-1,0,1,21,4,7,19,33...};
However, the resulting output was incorrect. After spending a fort night and a good chunk of my remaining sanity I had overcone the 437 levels of indirection left by the previous programmers, and narrowed it down to this line. But it looked perfectly fine.
I pull up the diffs and notice someone had checked in a change to the source. I track it to this line and find what the original data had been.
INT32 array[200] = {-1,0,1,2l,4,7,19,33...};
In VS the default font shows l and 1 as fucking identical. Someone had accidentally made that change to 21 from the original 2l and checked it in. I mean I can't really blame them. Who the fucking hell inatantiates a fucking int32 array and peppers in a fucking 2l (long) for no fucking reason?! -
If I get asked why I didn't complete a task tomorrow I will respond politely with "because we outsource all of our projects, I am fixing shitty bugs resulting from abismal code on 6 different project, merging requests, project managing even though I'm a developer, liaising with clients, writing scopes of works, estimating new projects whilst being the lead dev on 4 projects. Sorry you're right, like everyone else you need this today. I'll get right on that"
-
Ok, for what I saw here, many issues with management can be solved the most bureaucratic, ass-covering way possible – get that in writing and mention it when resulting issues come afloat.1
-
I write a quick prompt thinking nothing of it, just trying to generate an image to illustrate the next baddie in the dungeon, but I nail it on the first try and the resulting image PHYSICALLY affects me.
What the fuck, now I cannot unsee. I didn't think this was possible. I assumed the whole "cursed photo" thing was just kids being easily disturbed, turns I was wrong. DO NOT fucking mix hyper realistic 3D rendering and cryptids, do NOT fucking do it. THe moment you get anything resembling a """face""" on the other side you've just consumed years worth of nightmare fuel.
Unsettling? Fuck you, this is beyond that. The eyes I saw on the other side of the screen made me RECOIL in fear. You think you know what NOPE means, let me tell you, I have just *FELT* what __NOPE__ stands for.
I would hope I sleep well tonight, but I don't think I will. SHIIIIIIIIIIIIIIIIIIIIT18 -
This is a continuation of my previous rant about admob being not very informative when it comes to invalid traffic and the resulting restriction in ad delivery.
I then wanted to use admob mediation to hang in facebook ads. My app is written with Xamarin.Forms.
So first I needed to make some facebook configuration - create an account, let my app review, create some ad placements and other shit. I came to the point where I had to put in a link to my privacy policy and the link could not be accepted due to some SSL fuckup -.-'
I then found out that there is an issue with my SSL Chain. With the help of whatsmychaincert.com I solved that issue. Little side note here: I have limited knowledge of that stuff and my cousin helped me set up my homepage so I had no idea what I was doing. Did a snapshot and luckily I did not needed that as everything worked :)
This took me around half an hour just so I can paste the fucking link to activate my app in facebook developer portal.
After that I made the whole mediation configuration shit - not an issue as google documented this quite well but it took some time.
Now comes the shitty part. To use admob mediation you need adapters to the other ad network. I found a nuget package with exactly what I needed just to find out that it is outdated. So I pulled the repo and saw that this thing is an aar binding library. Never did that stuff so I read some docs again. Updated the package and consumed it in my app.
The google docs then said "Use this mediation test shit to check if you did everything correct before going prod" - aar binding nr. 2 (but I am now familiar with that :P). This thing then told me that facebook ads could not be loaded because the SDK version is outdated -.-' SDK version comes from another nuget package which is referenced by the first aar thingie. I tracked that thing back to a repo where I found out that they are indeed totally behind. So I downloaded the aar, made a binding lib and bound that to my first aar binding lib as that depends on this.
Put that all back in my app - tested mediation and fucking finally after 6 hours everything comes together! all lights are green and things work.
Sorry if this is not quite a rant but it was quite a journey and I just had to share it. -
I have this system that receives an image on Base64 or the URL (in that case the system makes an HTTP request and saves re response to disk). It works beautiful when I run the tests, it doesn't work at all in production (all the resulting files are corrupted). I don't know how to start to debug it so I'm going to bed and let my future self to resolve the issue.4
-
A Website where the user alterts us about a defect on his printer.
There are predefined categories (things like error messages in the printer display, issues with the prints, issues with paper jams, issues with noise and so on) maybe around 10 to 20 categories.
They decide which fields are shown when the user selects it.
Should I do a Dropdown? List field? Radio buttons?
Tech: PHP, Slim Framework, fontsawesome, resulting in a mail sent to our ticket system to pre-fill form items to avoid 1st level support...1 -
This one time last year a colleague found out that some data went missing and suggested to recover the data from a backup. When trying to create a new database instance in the Google Cloud Platform (if everything works it's amazing!) it failed.
Not knowing why this happened, I tried to revert that backup to the production database, after creating a backup using the GCP. Needless to say that failed as well, resulting in a corrupted database instance where I couldn't access the created backups anymore.
This all went at around 10pm and the only users of our product are currently in the same timezone and use it from around 7.30AM until 6PM so no one besides our team knew the server was down.
After a long night chatting Google's support team the database was successfully recovered and the only harm done was sleep depravation for me and a colleague.
Apparently there was a bug in the GCP. It was resolved in two hours and the last time a breaking bug was in that piece was more than seventy days earlier.
I did at least learn to create local backups as well, instead of relying on the tools of the same product...
Best: the moment I saw the corrupted database spin up again and not losing my job because of it. -
So I've only been at my current company for about 9 months but from about a month in I had quite a few concerns regarding the ability level and knowledge of my fellow developer and line manager. The other developers skill set is severely lacking.
And the line managers knowledge of the web is about 10 years out of date.
A potential client approached us with a web project with some interesting requirements and features which I was looking forward to building.
6 months later the project lands on me to start.
Line manager leaves company for another job
I build out the project. Happy with how everything works. Send off for approval, and to client to test.
Client starts getting pissed off, because what I've built doesn't do anything they require. I look back at my brief confused.
Turns out that the project had been scoped out completely wrong. Not enough questions had been asked, and a lot assumptions had been made by my ex-line manager
All resulting in a very pissed off client who want their money back, which I completely support.
I try to salvage the relationship by rescoping the project asking the questions that should've been asked in the first place. Give some very generous timings. Client appreciates my efforts but ultimately decided they don't want to work with my company anymore
And that's that, a project I was genuinely looking forward to building, completely spoilt senior staff being incompetent.
I was very close to handing in my notice, fortunately, my new line manager is actually a developer.3 -
This week started of so great...
Monday the client called if we can put the project live this week. Impossible since we’re already stressed out with a tight schedule .
“But what if we put more developers on the project?”
NO!
Now im busy with one of the latest pages and ofcourse the designer has a special opinion about the usability.
Asked second opinion by lead developer.
“Its all wrong and thats a learning point. So just do it like this and that”
Resulting in fucking responsive problems i already foresee.
I’m so screwed -
!Rant
TL;DR - Getting married can lead to installing life malware.
MARRIAGE SOFTWARE....
A young husband wrote this to a Systems Analyst -
(Marriage Software Div);
Dear Systems Analyst,
I am desperate for some help! I recently upgraded my program from Girlfriend 7.0 to Wife 1.0 and found that the new program began unexpected Child Processing and also took up a lot of space and valuable resources. This wasn't mentioned in the product brochure.
In addition Wife 1.0 installs itself into all other programs and launches during systems initialization and then it monitors all other system activities.
Applications such as "Boys' Night out 2.5" and "Golf 5.3" no longer run, and crashes the system whenever selected.
Attempting to operate selected "Soccer 6.3" always fails and "Shopping 7.1" runs instead.
I cannot seem to keep Wife 1.0 in the background whilst attempting to run any of my favorite applications. Be it online or offline.
.
I am thinking of going back to "Girlfriend 7.0", but uninstall doesn't work on this program. Can you please help?
.... The Systems Analyst replied:
Dear Customer,
This is a very common problem resulting from a basic misunderstanding of the functions of the Wife 1.0 program.
Many customers upgrade from Girlfriend 7.0 to Wife 1.0 thinking that Wife 1.0 is merely a UTILITY AND ENTERTAINMENT PROGRAM.
Actually, Wife 1.0 is an OPERATING SYSTEM designed by its Creator to run everything on your current platform.
You are unlikely to be able to purge Wife 1.0 and still convert back to Girlfriend 7.0, as Wife 1.0 was not designed to do this and it is impossible to uninstall, delete or purge the program files from the System once it is installed.
Some people have tried to install Girlfriend 8.0 or Wife 2.0 but have ended up with even more problems. (See Manual under Alimony/Child Support and Solicitors' Fees).
Having Wife 1.0 installed, I recommend you keep it Installed and deal with the difficulties as best as you can.
When any faults or problems occur, whatever you think has caused them, you must run the.........
C:\ APOLOGIZE\ FORGIVE ME.EXE Program and avoid attempting to use the *Esc-Key for it will freeze the entire system.
It may be necessary to run C:\ APOLOGIZE\ FORGIVE ME.EXE a number of times, and eventually hope that the operating system will return to normal.
Wife 1.0, although a very high maintenance programme, can be very rewarding.
To get the most out of it, consider buying additional Software such as "Flowers 2.0" and "Chocolates 5.0" or "HUGS\ KISSES 6.0" or "TENDERNESS\ UNDERSTANDING 10.0" or "even Eating Out Without the Kids 7.2.1" (if Child processing has already started).
DO NOT under any circumstances install "Secretary 2.1" (Short Skirt Version) or "One Nightstand 3.2" (Any Mood Version), as this is not a supported Application for Wife 1.0 and the system will almost certainly CRASH.
BEST WISHES!
Yours,"
Systems Analyst.
-----------------------------------------------
I'm not sure if this is a repost - if it is I apologise, but it's too good not to share.1 -
Is it possible to record the time a thread spends processing only it's code?
E.g. capture sys.ms in thread A -> A is sliced and thread B runs -> B is sliced -> A comes back and captures current sys.ms. The resulting delta of Anow - Ainit includes the time that B spent on the machine.
Is it possible to account for this and get just the time A spent processing?
Is this doable on any other languages?
If it is or isn't, any documentation or papers explain why is appreciated. Google is flooded with "how to time" questions so I'm not seeing any answer for this.7 -
Electron vs Java + a webkit browser for UI?
I'm really intrigued by your opinions.
Btw I'm considering the difference in resulting software quality (perfomance, weight, etc.).
Would the UI defeat the benefits of using Java?2 -
Last year we had a meeting to discuss lessening the frequency of meetings and let people work more of the day. After a three hours, it was decided that nothing was getting solved, resulting in three more meetings to be added to the calendar to follow up.
-
I see a lot of articles/posts about the difficult of CSS.
Finding it hard to maintain, or resulting in spaghetti code.
Is this a common occurrence?
Whilst I've come across it in a few projects before, I wouldn't say it's a regular.
Now a lot of our sites are built on CMS' (Umbraco), but here's my approach.
I'll style the generic elements first across all pages
User generated content is usually in its own CSS class (for nested targeting, e.g. ul/ol tags)
Then I'll give each Document Type (post type/page type) it's own body class and apply specific styling to that page where needed.
Hopefully that's of help to some of you. I'm interested to hear your approaches to it! :)5 -
In android 7.1, I've seen a lot of conflicting reports about crypto security.
If I do something like the following in the default android 7.1 browser...
var array = new Uint32Array(n);
window.crypto.getRandomValues(array);
How secure would the resulting numbers be overall? I'm asking because I've seen a lot of articles talking about it, but they never specifically mention the default 7.1 android *browser* and what or how it obtains secure random numbers. They only ever talk about the api, sdk, and developers working in java.4 -
I can't post a collab from the web client and I don't have a decent phone atm, anyways, this is an idea, tell me if you have any improvements or if you know of an implementation or would be interested in creating one.
A social network comment system that connects people across fields of interest and aids keeping relevant posts alive for a long time.
The basic principle is this: Every post may identify itself as a child to any number of other posts, or sections in other posts, which then act much like a bidirectional hyperlink between parent and child.
This leads to two unusual results:
1. that comments aren’t only added to posts, but specific paragraphs, sentences or even words.
2. that any comment may receive comments in much the same way the original post did, making comments identical to posts. (they could have their own pages and all).
This is in many ways like Reddit's infinite comment chains. The main difference is that here comments aren’t organized in trees but graphs, which makes it possible to connect related conversations from entirely different groups and times, resulting in a much more open yet concise discourse style with an increased persistence of topics. -
So we got new keyboards at the office. Turns out mine doesn't register the modifier keys well, resulting in plenty of selecting and replacing text with "z", "/" or whatever key I pressed along with it. You can't believe the amount of times my new toy almost flew out of a sixth story Brussels' window in the last couple of days. Anyway, still too lazy to go ask for a new keyboard.1
-
Any one running Symfony on a Docker container in production? I currently try to migrate our dev env to a docker compose setup (from a "monolith" vagrant vm). I'm atually not stuck at a Symfony specific thing, but on a, I guess Docker specific one(?), The issue is, I need to read and write with two users to one folder (in my case the /application/var/cache folder). Since I mount my whole code into the docker container (to use an IDE on the local files), I've got a volume (not mounted to the outside world) for that folder. (As far, as good). Now this folder is owned by root and root is also the user I get when I enter the container. When I then run a cli script, that writes to this folder, every thing works (as it's run by root) and the resulting entries in the cache dir are owned by root. Trouble starts when the php fpm process tries to write stuff in there too (as it's run by www-data).
If I add `USER www-data` (or create a new user foobar and add `USER foobar`) the container exits with status 0
So I guess the question is, is anyone running an Symfony app on Docker in Prod, if so how do you solve this? Or another question would be what is the best practice to do this? Sure on dev I could just `chmod 777` the whole folder or run the php-fpm process as root, but if that thing ever goes to prod, I wouldn't sleep very well... -
rant. Tried to fix a weird bug in gamemaker, with some unfamiliar technic, resulting in another bug. Then one hour later, still no solution to that bug until I look around in the code seeing that I already used the exact solution that fixes the first bug.
In gamemaker there are scripts. I tried to forcefead the fucking script with a variable when calling it. Inside the script, there where already variables working fine with the extension or what-to-call-it:
other.(insert variable).
And that pisses me off. -
"I think advertising is a brilliant concept that has been pooped upon by selfish marketers, resulting in corrupted motives and flawed execution." - Michael Mistretta1
-
My colleague just started using "something = null;", resulting in all my "if (something) {}" breaks... #someonehastogo
-
Hi devRant. Wanna rant with some shit about my company. First some good parts. I work in company with 600+ employees. It's one of the best companies in my region. They provide you with any kind of sweets(cookies, coffee, tea, etc), any hardware you need for your work (additional monitor, more ram, SSDs, processor, graphics card, whatever), just about everything you need to make your work faster/comfortable. Then, we have regular reviews (every 6 months), which rise salary from $0.75 to $1.5 per hour. (I live in poor country, where $15 per hour makes your more solvent then 70% of people, so having 100-200 bucks increase every half year is quite good rise).
The resulting increase of review depends on how team leader and project manager are satisfied with my work. And here starts the interesting (e.g. the shit comes in).
1) Seniority level in our company applies depending on the salary you have. That't right. It does not depend on your skill. Except the case when you're applying to vacancy. So if you tell that you're senior dev and prove it during interview, you'll have senior's salary. This is fine if you're just want money. But not if you love programming (as me) because of reasons bellow.
2) You don't need to have lots of programming experience to be a team leader. You can even be a junior team leader (but thanks god, on research projects only). You start from leading research projects and than move to billable if the director of research department is satisfied with your leading skills.
As a consequence our seniors are dumb AF. This pieces me off the most. Not all of them. A would say half of them are real pro guys, but the rest suck at programming (as for a senior). They are around junior/middle level.
I can understand if guy has $15 rate but still remains junior dev. That's fine. But hell no, he is treated as a middle, because his rate is $10+ now! And his mind has priority over middles and juniors. Not that junior have lof of good tougths but sometimes they do.
I'm lucky to work yet on small project so I'm the only dev, and so to speak TL for myself. But my colleague has this kind of senior team leader who is dumb AF. They work on ASP.NET Core project, the senior does not even know how to properly write generic constraints in C#. Seriously.
Just look at this shit. Instead of
MyClass<T> where T: class {}
he does this:
abstract class EnsureClass {}
MyClass<T> where T: EnsureClass {}
He writes empty abstract class, forces other classes to inherit it (thus, wasting the ability to inherit some useful class) just to ensure that generic T is a class. What thA FUCK is wrong with you dude?! You're a senior dev and you don't even know the language you're codding in.
And this shit is all over the company. Every monkey that had enough skill just to not be fired and enough patience to work 4-5 years becomes a senior! No-fucking-body cares and reviews your skill increase. The whole review is about department director asking TL and PM question like "how is this guy doing? is he OK or we should fire him?" That's the whole review. If TL does not like you, he can leave bad review and the company will set you on trial. If you confront TL during this period, pack your suitcase. Two cases of such shit I know personally. A good skilled guy could not just find common language with his TL and got fired. And the cherry on top of the case is that thay don't care about the fired dev's mind. They will only listen to reviewer. This is just absurd and just boils me down.
That's all i wanted to say. Thanks for your attention. -
Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..
Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode3 -
I recently moved to a house where my gf and me each have our separate office space. However, i’m sitting with my back to the door so whenever i’m in the zone with noise cancelling on and my gf walks in i don’t hear her. Resulting in me having a couple of almost heart attacks lately.
I have ideas about mirrors or sensors but since i’m working of three screens i din’t think it will do. The second option is ofcourse to move the desk to the other side of the room so that i’m facing the door more. But there are no power plugs.
My gf basically locks her door by sitting in front of it. Also she doesnt have a noise cancelling head set.6 -
My tech lead rookie mistake of the week. Makes ids in the MySql DB big integers.
Now react, python and pinecone are all converting them to scientific values resulting into invalid or missing values and lookups.
Fml I need to change companies.12 -
Could neural nets be used to solve a complex problem with a lot of predefined specific weights and biases related to real activities that could be numerically represented ?
Like if the various layers represented things who’s outcome would be cascading and a direct outcome of factors inputted to them resulting in limited number of outputs ? Like say maybe wind flow at locations resulting in a wind current at an expected time in another location and where a system would have to change to in order to result in the final expected i output ? Maybe a bad example as that could be affected by a lot of things .
But basically the gradual massaging of values that would relate to causal effects where a specific output was designed being intermediaries between the desired input and output ?16 -
When your laptop runs out of ram due to your environments and it begins writing to swap. Your hard drive fails resulting the computer to crash and restart -_-.
-
1. Create informative videos on YouTube about coding and grow my audience.
2. Quit my job and get one that pays better.
3. Learn NestJS/MongoDB stack good enough to finally add a new skill on my resume, hopefully resulting in a new job. -
The moment you realize the .net Framework's String.TrimEnd() method will actually modify your String prior to returning it, and there seems to be no convenient way of getting a copy without declaring a new variable...
Just wanted to get rid of excess empty lines in the log caused by trailing <CR><LF> when receiving lines of serial data:
Console.WriteLine(DateTime.Now.ToString("H:m:s.fff") + " - serial data received on " + com_port + ": " + serial_data.TrimEnd())
But suddenly the parser could not find its termination characters anymore...
Resulting in probably the most disgusting parentheses I had ever added to any code:
Console.WriteLine(DateTime.Now.ToString("H:m:s.fff") + " - serial data received on " + com_port + (": " + serial_data).TrimEnd())
Yes, I feel bad about it, but then again is VB .net and it kinda "works for me". I promise I will (try to remember to) remove these as soon as debugging is done...4 -
me vs my job at mnc laggard part 9/n . previous @ https://devrant.com/rants/6602068/...
====
I think i have now realised why working at corporate MNC sucks: they are reluctant to make a good product for their end users.
- they first come up with feature without a proper planning and research.
- then they are in a rush to release it to live audience by ignoring the possible issues that could arise
- when they see it fail, they are like, okay with that and blame it as a failed experiment
- instead of removing/disabling it, they are okay to keep it remain alive in the app, even if it causes customer inconveneience.
- meanwhile, they put false reports for their higher managers as a success and when an enhancement/modification comes for that feature from the higher up, they again start the loop by pushing a new feature without proper planning and a rush
as a dev, it fuckin kills me. I joined in the middle of one of these ugly loops. The app has a camera feature where the camera will generate voices to take pictures and record video , like "goto next car view" , "close the bonnet and focus", etc while the user follows instructions.
the ticket for me was to just add a flash button to this camera. But the more i dive into it, the more i hate it:
- the existing camera implementation provides api for toggling a camera flash, but when i attached it with a ui button, it would not work
- the existing implementation will send images /videos as direct payload data, resulting in generating very large payload curls . our app has a curl logger and it starts crashing.
- the existing implementation also crashes at uploading videos.
So where does it trouble me?well, I have a ticket to add just a fucking button, but i will have to replace the whole camera module and start from scratch. also the crash causing loggers will need some workarounds, otherwise i could not check the apis. and my manager will be like "why are you taking so long to add a flashlight?" and i would be like "coz i wanna put this flashlight up your -2 -
You know
When I first saw etherum talking about am distributed state machine i thought wow. Not very practical but NEAT. I envisioned being able to make a byte code that could be stored in transactions and run by individual clients in an async function and each step of the resulting execution and the values of managed ram would be stored at intervals so other clients could take over and execute a few more statements and compare what should always be expected results that are identical
A grand incredibly inefficient system however really neato from the theoretical computer nerd standpoint !
Boy was I disappointed lol all it is a basic contracts language but yet they state it could be like a word computer ! How ? I thought maybe if you had enough nodes participating maybe you could store registers and the like in transaction values ? Wouldn’t that be the way ?
Seems like as a word computer they’re stuck somewhere between very simplistic js and something prior to amptron in usability yet they advertised as a world computer
Am i missing something ? I mean you could create something that would translate higher level code into smal numeric statements and then send it additions values but what would it be useful for and how would you actually. Store anything ? -
!dev but rant/q
How fucking hard can it be to create a BTC transaction to override an unconfirmed one. Tried two tools but the resulting transaction gets rejected by the network.
Does anyone know one that works and is maybe even automated by any chance? Maybe I can try it if its still unconfirmed when I get home.1 -
Last question for today, I promise…
For my side project, I plan on saving a URL and an array of strings associated with that URL. I want to be able to search and sort the resulting DB from a frontend without needing complicated queries. Is this the use case for a key-value pair DB? Let me know if I’m not clear and thanks!14 -
Recently started a new role as a junior dev(second role). Three weeks in and I'm already starting to loathe the work setup & process.
Last week I was asked to fix a bug due to them not having anything in the pipeline for me(I had finished my allocated tasks for the sprint). There was no spec to this, no visible steps to replicate the error & no tests in place to validate it was working... I thought I had fixed it, even had one of the seniors reviewed it on my PR but also I walked him through my possible solution resulting in us moving forward with the "improved" solution.
After a bank holiday, I've come back to find that the "fix" I had deployed doesn't solve the problem at all. So here I am after 3.5hours of flying blind with a bug that I'm still not able to reproduce, bored and frustrated asf. Not to mention, that the codebase has little to no consistency, a lot of legacy and almost no form of tests.
Am I overreacting to this as junior?1