Joined devRant on 11/14/2017
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
I did my first ever open source contrinbutions yesterday! It was quite refreshing working in a different code base and fixing bugs! :D1
Soo I got a new keyboard called EVGA Z10.
Plug & Play is what I'd expect in 2021 amirite? Hell no.
This piece of shit arrived, got plugged in and the keys worked, that's cool and all but it got advertised with a display that.. stayed blank (or rather, it just showed "EVGA"). Installation guide says to install their crappy software.
So I install the software and so far so good. Now my display literally turns blank and displays nothing. I restart the pc to no avail, the software just shows an endless loading indicator when I try to set any settings to it. Great.
A few google searches later I found out I had to uninstall the current drivers, install drivers with version 54 and then to update to version 72, NOT 73 because.. that apparently breaks shit.
Now everything works as far as I can tell but what the fuck?4
Thank you PHPStorm for being helpful!
PPS: Yes I know PHPStorm wasn't built for Sass
Its finally fucking over.
Ive done it.
Finished my internship and can finally leave this shithole for good!6
So you wanna sign up to our useless newsletter? You really do? Alright just fill out , and . Thanks for taking your time!
Why are some devs just so fucking lazy :|1
300 global variables.. THREE HUNDRED FUCKING GLOBAL VARIABLES?
Are you for real?
Now let me check the line numbers again..
hmm.. line 97 to .. yep line 410, just a few new lines to seperate some of them or.. group? Idk, I've given up on trying to understand those.
Now you may ask "But ThatPerlDeb, where did you see this and what was the intention?"
Low and behold, take a chair and I may explain this to you.
First of all: Fuck the dev that wrote this!
Second: Fuck all the devs that kept up with this practice or whatever you want to fucking call this!
Now, the application is our POS system that our customers can use for a monthly fee (That this piece of garbage even requires payment is disgusting) but anyway..
The global variables sometimes are declared for labels, sometimes for some frames, sometimes just for random values to be there.
We're using Perl for the POS system and Perl ain't the best at OOP, so in the dev's defense I can understand why you'd use a few global variables, but not fucking 300!! FUCK OFF WITH THIS BULLSHIT!!
So now I'm going through this torture slowly but surely deleting globals and putting them into some sort of scope and always MANUALLY test if something broke. Again, this company sucks ass and there's nothing that could even be considered a "unit test" or something like that, so fuck that, too.
After two hours I've brought down the count of global variables to about 260, so there's progress being made..
But then, there comes more!
"But how???" you may ask, and you're right, I've asked that myself.
Now to resolve the global stuff in each file some of the initial globals are used, we got about 20-30 files which do different stuff, all fair and square, at least there was an attempt at seperating functions but god this mess is so fucking fucked up. So in order to "safely" delete a global variable I have to check if any of the variables are used in another file, and if so, in which scope and how they are used.
Spaghetti would be a compliment for this fucking disgusting piece of utter bullshit.
Let alone the code quality of this "code"
Indendation? Dafuq is dat?
Scope? Nah, we got everything global anyway
Function size? Well, some are 5 lines, some are 900 lines, who cares anyways, right?
I'm so fucking glad once I leave this shithole, for real.6
So I had this conversation yesterday while fixing yet another Windows laptop for someone else.
Other Guy = OG
Me = Me (Duh)
OG: So what are your plans after your apprenticeship?
Me: Uh, I'll probably start somewhere that's e-commerce related, kinda like my current company but somewhere else.
OG: Uh have you thought about being your own boss?
Me: Well yeah, but I wouldn't know how to attract customers and shit
-- This is the moment shit gets real
OG: OH BTW I heard that Germany is lacking AI developers, you should do that! It earns you shitloads of cash!
Me: Uhm.. well, that might be true b-
OG: There's no but dude, it's free money, you're smart.. I mean you can fix any computer, right? AI will be just as easy
Me: It's not like-
OG: Duh, don't make yourself look so bad I know you can do it!
Me: B..But I'm not interested in it at all
*silence for 5 seconds*
OG: Well.. I guess you do you then
After that we continued to have random chit-chat about his job and experience (He's a mechanic)
God I hate when people throw buzzwords around and try to convince other people to do what *they* want.
No, I don't want to develop a structure of 1000 ifs/elses, I'd rather keep doing what I'm doing, thanks!6
Excuse me what the fuck? I deny your access to collect my data and you won't show me any content? Fine. Time to leave your shitty site then8
I am in-fucking-love with myself and packages contributed to OSS communities!
TL;DR: inotify is great and I am lazy bitch so I wrote a script to kinda do my work
I took some time to write a script that takes a folder with images (Screenshots) and move them somewhere else with the last modify time as their new name (something like "Screenshot_DATE_TIME.png) because my current screenshot software for Windows (Lightshot) only saves their screenshots like this: Screenshot_<Incrementing Number>.
Once in a while I'd like to move those images away to "clean up" that folder, but I always have to create a new folder like "OLD" but that already exists so it becomes "OLD_1" which.. also existed up to "OLD_3" and I finally grew sick of it!
2ish hours later my Perl script now automatically gets triggered by inotify once a new file (Screenshot for that matter) is written or moved to the Screenshot folder and auto-fucking-matically moves it to the "new" folder with the new filename so I don't have the issue of having "OLD_1" .. "OLD_INFINITY" anymore.
Little things / scripts like these really make me feel good about what myself and my coding skills (I know, this is a somewhat trivial task but still a great experience)2
> Monitoring: Load Average of 57!! ALERT!!!!
> me: What? That's not possible?
> *Monitoring froze 14 hours ago*
> *sshs into server*
> *see attached image*
The issue was ~1200 df processes that were issued by our monitoring system and all of them didn't finish because the external cluster we mounted onto that server died a few minutes before that. Just re-mounting the cluster fixed it but still a funny sight!24
Not specifially one but a couple of minor mentoring moments.
I started out at a rather small company (<10 people) with a completely new language to me (Perl).
I had some trouble following along some tasks since I wasn't familiar with Perl or generally backend stuffs at all.
So the person that was supposed to "mentor" me was just giving me tasks without any hints of how to do things, this is where my "true" mentor came in to play.
I asked him a couple of things after a few unsuccesful searches on the internet and he always seemed to have the answer to it right away! It seemed like he knew everything and I really appreciated his patience and help. He did point me in the right directions when I needed it.
He left the company about 3 months ago and I still somewhat miss his mentoring existance, as he wasn't only a code but also a life mentor.
I really hope that one day I can be just like that guy, helpful, patient and be a mentor for someone else. :)
Ive decided to also become a supporter to help out devrant :)3
I think the most excited I've been about my code was when I wrote my first own library to communicate to Google spreadsheets via their rest API.
I didn't find any working modules in perl for that so I wrote my own. Still using it every now and again! 😁
How're those umlauts going for you NordWestBahn?
For non-germans: this is supposed to mean düsseldorf if you couldn't guess it already1
OK what the actual fuck is going on within this company.
TL;DR: Spaghetti Copy/Pasted code that made me mad because it's just a mess
I just looked into a code file to search for a specific procedure regarding the creation of invoices.
I thought "Oh this is gonna be a quick look-through of like 1000 lines MAX" turns out this script is 11317 fucking lines long and most of it's logic is written there multiple (up to 6-7 times). And I'm not talking about a simple 10 lines or something. No! Logic of over 300 lines.. copy & pasted over .. and over .. and over?! I mean what the fuck did this guy drink when he wrote this.
Alsooo 10000 of those 11317 lines is ONE FUNCTION.. I kid you not! It's just a gigantic if / else if construct that, as I said before, contains copy-pasted code all over the place.
Sadly my TL thinks that code cleanup / optimization is "not necessary as long as it works" like wtf dude. If anyone wants to ever fix something in this mess or add a new feature they take a few hours longer just to "adjust" to this fucking shit.
This is a nightmare. The worst part: This is not the only script that has shit like this. We got over 150 "modules" (Yeah, we ATTEMPTED something OOP-ish but failed miserably) that sometimes have over 15000 lines which could be easily cut down to 1/3 and/or splitted into multiple files.
Let's not start about centralization of methods or encoding handling or coding standards or work code review or .. you get the point because there's a character limit for one rant and I guess I'd overshoot that by a lot if I'd start with that. Holy shit I can't wait until my internship is over and I can leave this code-hell!!2
500 Internal server error.
Or at least that's what my ++ count now says 😅
Devrant is such a great community and is so much better than most if not all other online communities I've ever been part of.
Thank you all for being such awesome and inspiring people!4
Asp seems to actually have feelings.
Today I tried to get an asp page to run for company stuff. Ok fair enough I load apache and all the modules required for it to run on Ubuntu. Everything went fine and nothing complained what a great start!
Let's create a directory called /var/www/html/astrash ( I wanted to be fun ok? ) and created a sample index.asp file and configured the paths etc accordingly.
So I went to my beloved browser and typed in localhost/astrash/index.asp
Guess what happened? Right. I could only download the file.
Tried to change several things and Googled a bit but the things I tried didn't work.
So I figured let's create the directory /var/www/html/asp and an index.asp to go along. Same content. Same owner same access bits.
Went to localhost/index.asp and I saw the sample page!
I laughed my ass off at this actually thinking asp knew that I was a dick in naming the folder like that 😂
PS: yes I know it's probably a misconfiguration but it's funny nonetheless1
It was one of those "I need more coffee days"..
I was writing some checking function called "check" (now to clarify my company is not coding oop style so no classes etc.) And as I went on I included another file for some functions and what not. Pretty normal stuff right? Right. In that file I required there also was a function called "check".
Guess who tried to use the "check" function of the imported file in the "check" function?! Right! A Fucking genius aka. me!!
So I tried to figure out why the page wouldn't load and why the server was starting to lag more and more.
After killing all the apache tasks three times i finally realized what I did.
Took me 10 minutes to figure out that i was causing endless recursion. That day wasn't my best and clearly not filled with enough coffee.
PS: yes I know oop would have probably eliminated the possibility for this but I'm just adapting to the coding style of my company as I can't really change things since I'm just an intern.1
My family thinks I'm the tech nerd that can basically solve anything related to technical stuff within a blink of an eye.
I'm just better at googling than them mostly
Would it be possible to extend the shop with a perl rubber duck? I feel left alone as one of the few perl coders here... everyone seems to be using php and python etc.
I'd probably be willing to pay more12
Customer calls since they got problem x
C: Hey its xyz we got a problem
Me: hey what's it About?
C: <explains problem pretty poorly>
Me: uuuuuh.. I've written it down and look to fix it as soon as possible
C: why? Just TURN OFF the problem
No. This is not how it works. This is not how any of this works.5
This "Last up vote didn't get through because of network issues" is probably the best thing ever5
I hate how Google play always wants me to "complete my account" by adding a payment method
I don't want to okay Google? Do you understand? I guess not because you're asking me all the f***ing time!2