Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "this can't go on forever"
Worst legacy code experience?
Well grab your spelunking gear and follow me down this rabbit hole!
It started early this year when our biggest customer asked us to send ETAs for deliveries. Simple enough, how bad could it be? Just need to add an ETA form for the drivers in their mobile app. And yes, that part was easy, but then we had to go from our mobile app to our internal system.
Welcome to the IBM AS/400! Where time has stood still for two decades and the mainframe is alive and well.
The shitshow started in March and, spoiler alert, it's still not working.
We begin by dumping the mobile app data in to a table that an RPG program watches. I'm not sure if it's a limitation of RPG or a limitation on the brains of our RPG developers, but timestamps do not exist here. There are only varchars. There are also a multitude of formats for these timestamps, because that makes life more interesting. This program breaks frequently.
If by some miracle the RPG program processes the data, then the ETA goes to a table that's completely separate from the entity it belongs on. If the data is needed, it is JOINed. The old ETA field is now permanently blank.
Why, you ask? Because RPG programs need to be recompiled every time the underlying database changes, and half our system hasn't been compiled in like 10 years. God only knows if we *can* recompile at this point. We extensively use Synon/2E, which compiles to RPG, which can (and has) been hand-modified to fix bugs instead of fixing them in the "higher" language. So now if we try to recompile, we might be losing those fixes *forever*.
Naturally, there is NO referential integrity between this tables. There's orphan rows all through the system. There's also one-to-many relationships in tables meant for one-to-one. Also there's no unique keys. You have to combine multiple fields to get a (potentially) unique key.
Now, there's a series Synon programs that run every 5 minutes to check if any data needs to be sent out. These Synon/2E programs do *full table scans* of the database and check for changes. And, of course, they're buggy as shit.
But you can't debug it there, oh no no no, the output gets pumped straight to...
Wait for it..
A fucking COBOL program.
This COBOL program takes the data from the Synon/2E programs and puts it in a horrible format called X12. X12 looks something like this:
This shit is why JSON was invented. Yes, that's what an ETA for 2017-06-10 14:00:00 looks like. The timezone is "Local Time", whatever the fuck that's supposed to mean.
So this COBOL program has logs, which should make life easy, right?
Using the 'search and audit' function in the program dumps 90 char lines of text on the screen with no line breaks. Worse, the terminal can only show 87 of those lines, so you have to push Shift+F8 to move to the right by three characters. There's no way to search for the actual ETA events using the program, and while you can filter by reference number all this garbage is sent in 5 minute batches, so you'll get a dump of irrelevant data along with the thing you're looking for. Also there's no such thing is grep in this environment, or anything even close to it.
I have hundreds of these bad data transfers to debug, so there's no way in hell I'm doing this manually.
I never did figure out exactly where the raw data is kept, but apparently it's tucked away in one of a thousand tables associated in something called "multiple member files". It seems IBM tried the "schemaless" thing long before MongoDB thought it'd be hip, and like so many MongoDB projects this too ended up a shitshow. Multiple member files are now deprecated I believe, and IBM documentation + resources are sparse anyway so that's pretty much a non-starter.
But I did figure out that the "Print" function of this program can be called directly with a batch number... So here's what I do:
Get the dates of the oldest and newest bad ETAs I'm looking at. Find those two manually and note that batch numbers. Call the "Print" function with these batch numbers (provided the difference is less than 32,767 because yay 16-bit programs). Take the print file and convert it to a "PC-Style ACII" stream and put it on the emulated file system and ancient SMB server. Copy that file and parse that garbage to find the relevant events, and finally dump it to a CSV for quick and easy viewing.
That last paragraph took me a couple weeks to figure out. Fuck IBM.
Now, finally, after fixing all the bugs I found on our side, we've finally come to the conclusion that the data we're sending is good. But! The customer is still having trouble parsing it...
You see, they're having some problems with their IBM AS/400. There's a lot of old code that's supposed to parse the data we're sending, and they're just not quite sure why it isn't working.17
Every single one of them, and every one that will come after them.
Google, it started out as 2 people in their garage, wanting to make a search engine that was better than the others. Nothing else, nothing evil. Just make the world a little bit better. And look what it's become now. A megacorporation with little to no regards for their user base. Because who cares about users anyway?
Microsoft, it started out with Bill Gates - young high school computer nerd - who wanted to make an operating system for the world to use. Something that's better than the competition. And boy did he do so. Well "better than the competition" aside, he did make it for the world to use. And the world adopted it. And look what it's become now. A megacorporation with little to no regards for their user base. Because who cares about users anyway?
See where I'm going here?
Apple, it started out with Steve Jobs and Steve Wozniak in their garage, just like Google did, wanting to make hardware that was better than the others. Nothing else, nothing evil. Just to make the world a little bit better. And look what it's become now. Planned obsolescence has been baked into it, just like it is in every other piece of technology. Quality control and thinking through the design has become a thing of the past. User choice, yeah who cares about that.
Samsung, it started out centuries ago actually, and I don't really remember the details of it.. ColdFusion has a video on it if memory serves me right. Do watch it if you're interested. Anyway, just like all the others they started out as a company which wanted to make the world a little bit better. And damn right did they do so.. initially. Look what they've become now. Forcing their stupid TouchWiz UI upon their customers (or products?), a Bixby button that can't even be reprogrammed.. and the latest thing.. Knox, advertised as a security feature, but as everyone who likes rooting their devices and mucking with it knows, it is an anti-feature that only serves for lockdown. Why shouldn't you be able to turn in a phone for RMA when a hardware error occurs, when all you've personally modified is the software? Why should changing the software blow that eFuse, so that you can be sure that you can't replace it without specialized equipment and a very steady hand?
I could go on and on forever about more of the tech giants out there, but I feel like this suffices for now. Otherwise I won't have anything else left for future rants! But one thing I know for sure. Every tech company started, starts, and will start out with a desire to make the world a better place, and once they gain a significant customer base, they will without exception turn into the same kind of Evil Megacorp., just like the ones before them. Some may say that capitalism itself is to blame for this, the greed for more when you already have a lot. Who knows? I'd rather say that the very human nature itself is to blame for it. We're by design greedy beings, and I hate it. I hate being human for that. I don't want humans to be evil towards one another, and be greedy for ever more. But I guess that that's just the way it is, and some things do actually never change...20
Bug report comes in from a coworker. "Cloudinary uploads aren't working. I can't sign up new customers."
"I'll look into it" I say.
I go to one of our sites, and lo! No Cloudinary image loads. Well that can't be good.
I check out mobile app -- our only customer-facing platform. None of the images load! Multiple "Oops!" snackbars from 500 errors on every screen / after every action.
"None of our Cloudinary images load, even in the mobile app," I report.
Nobody seems to notice, but they're probably busy.
I go to log into the Cloudinary site, and realize I don't have the credentials.
"What are the Cloudinary credentials, @ceo?" I ask.
I'm met with more silence. I use this opportunity to look through the logs, try different URLs/transforms directly. Oddly, everything seems fine except on our site.
I check Slack again, and see nothing's changed, so I set about trying to guess the credentials.
Let's see... the ceo is basically illiterate when it come to tech, so it's probably not his email. It's a startup, and custom emails for things cost money, and haven't been a thing here forever, so it's probably oen of the CTO's email aliases. he likes dots and full names so that narrows it down. Now for the password.... his are always crappy (so they're "easy to remember") and usually have the abbreviated company name in them. He also likes adding numbers, generally two-digit numbers, and has a thing for 7s and 9s. Mix in some caps, spaces, order...
Took me a few minutes, but I managed to figured it out.
"Nevermind, I guessed them." I reported.
After getting into Cloudinary, I couldn't find anything amiss. Everything looked great. No outage warnings, metrics looked fine, images all loaded. Ex-cto didn't revoke payment or cancel the account.
I checked our app; everything started loading -- albeit slowly.
I checked the aforementioned site; after a few minutes, everything loaded there, too.
Not sure what else to do, and with everything appearing to work, I said "Fixed!" and closed the issue.
About 20 minutes later, the original person said "thanks" -- never did hear anything from the ceo. I've heard him chatting away in the other room the entire time.
Regardless, good thing for crappy passwords, eh?21
Microsoft be like :
"Oh, you're moving away from your computer for a while with all this stuff open? It would a shame if some were to.. UPDATE it!"
It asks with a pop up, and if you don't answer it, it thinks "Oh, you're not telling me if I should update now or not, but I think you probably want me to update. UPDATE!"
For me, if I keep ignoring the update, it starts to create problems for me out of nowhere. It starts to lag and then the task manager starts to lag. EVERYTHING IS NOT RESPONDING.
When I finally update it, it acts like there were no issues at all. Everything is fine..
Even with Xbox, if it wants to update, it doesn't let you go online until you do. If it loses connection mid-update for some reason, it begins the update again from the friggin START. All that time updating gone to waste. Recently, I'm having a lot of issues with it. It doesn't let me sign in a lot of times. "We couldn't sign you in" for some reason. It JUST CAN'T. If you have a slow internet connection, you can't play any game at all. I contacted Microsoft Support about that issue and they concluded that it was all because of the slow internet connection and there were no issues on their end and they told me to GIT GOOD (Not exactly those words). If it does sign you in, it kicks you out mid-game for some reason with the evil pop up saying "Bye User_Name". The game says that YOU signed out (Dumb game, doesn't understand Microsoft shenanigans) and returns you to the main menu. If your game didn't save, well, GOOD luck to you!
Everything takes forever to load, if it decides it's not gonna load, it gives me a really helpful error saying "Something went wrong".
Maybe it's just me, it just hates me particularly. It makes me think that Microsoft intentionally acts like a douche just to get attention..
(In the end I think, maybe, this all is not a big deal if you surrender and accept Microsoft as your overlord)
I tried a few ways to stop Windows from updating automatically, but nothing worked (Maybe, I should try again).
Maybe I should dual boot Linux, but that brings a whole new set of things that I'd have to deal with, doesn't it?
I wrote in a rant here that I couldn't access my 1TB external hard-drive anymore because I refused to "Safely remove" it from my computer.
My brother sent me today an image with it, showing me that he managed to open it.
I can't tell you how happy I am!
The solution: if you encounter the same problem (it takes forever for windows to scan it and you can't open it/ on linux it tells you to go to windows and and properly eject it), just go to `Device Manager` and `Scan for new hardware`. This should find it & solve it5
Was forced to do some work on Windows this week (CAD tools that runs only on Windows). I spent a few days just setting up the tools. There were quite a few things I realized I forgot about Windows (as compared to Linux).
1) Installation times are down right horrific. What exactly are the installer doing for 10 minutes?
2) .NET is a cluster fuck. Not even Microsofts repair tool can fix it, but rather just hangs. I ended up using another tool to nuke it and reinstall.
3) Windows binary installs are insanely huge, thus, takes forever to download.
4) The registry is a pointless database that must have been written in hell with the single intent of destroying users will to live. The sole existence of the registry is another proof that completely incompetent engineers designed Windows.
5) Rebooting is the only way to solve many problems. This is another sure sign of a fundamentally fucked up OS design.
6) What the heck is wrong with the GUIs designers? The control panel must be the worst design ever. There are so many levels to get to a particular setting I'm getting dizzy. Nothing gets better by the illogical organisation.
7) Windows networking. A perversion of the tcp/ip stack that makes it virtually impossible to understand a damn thing about the current network configuration. There are at least 3 different places that effects the settings.
8) Windows command prompt. Why did they even bother to leave it in? The interpreter is as intelligent as retarded donut. You can't do anything with it, except typing "exit" and Google for another solution.
8) Updates. Why does it takes hundreds of updates per month to keep that thing safe?
9) Despite all updates that is flying out of Redmond like confetti, it is still necessary to install antivirus to keep the damn thing safe. That cost extra money, and further cost you by degrading performance of your hardware.
10) Window performance. Software runs like it was swimming in molasses. The final stab in the back on your hardware investment, and pretty much sends performance on your hardware back a few hundred bucks more.
11) Closed source is evil. If something crash consistently, you might find a forum that address the issues you have. Otherwise you're out of luck. On the other hand, it might be for the better. I imagine reading the code for Windows can lead to severe depression.
I'm lucky to be a Linux dev, and should probably not complain too much... But really, Windows, go get yourself hit by a truck and die. I won't miss you.14
So I'm making an app with a classmate at school, but there's one huge problem. All the PC's and laptops at school are shit. The ICT departement at my school blocks almost everything on them. I can't install any program, open any file and I can't even open the command prompt! So I can't install Visual studio or any other IDE and basically can't do anything besides browse websites that aren't blocked. And they expect me and my classmate to make an app. Fortunately, my classmate has a spare laptop we can use, but it's really difficult for two guys to code on just one laptop. I asked my school if they could buy new laptops or if they could remove they restrictions on two laptops, but they don't want to do any of those things and now we're stuck with just one laptop. I don't know what to do. I fucking hate this!
(This doesn't have anything to do with the topic of the rant, but I just want to complain.)
There are a couple more things I hate about my school. At my school, everyone is forced to use iPads. I don't know why they don't just give us laptops instead of iPads (maybe just because there lazy). So my iPad's headphonejack and homebutton where broken for no reason and I had to get it repaired. But instead of going to an apple store or a repair shop, you need to go to the school's ICT department and get it fixed there. If you don't do that and go to a apple store or something, they will take your iPad and keep it forever! Even though you pay €200 for it every year! Also, the ICT department at my school is lazy as hell! You expect them to repair the iPad themselves, but they just send it to a repair shop. So it wouldn't even matter if I would go to the store myself! 😠 And they even do a really bad job at checking if the device even works after the repair, because I needed to get it repaired three times in a row! And don't even get me started on the bad WiFi connection.11
SMB/CIFS support on Linux distros is a nightmare! Switching from wired to wireless will cause ALL mounts to freeze, and they all become impossible to dismount normally. You can't even ls the root folder anymore if there are frozen mount folders inside. It's f#&%ing retarded to have to reboot your PC twice a day because you lost WiFi signal for one second, and the underlying processes don't understand SIGTERM. And I could go on about MTP! Standard file transfer protocol for Android but boy it is hellish. Trying to copy a structure with subfolders will take forever because every ls call to the phone is like an API call to some free webhosting company in Australia, takes forever, if it even succeeds. I won't even get started on WebDAV and SSHFS (the latter is even worse than CIFS). Those make me want to do unpleasant things to my computer. So frustrating! I can't be the only one who has experienced this, right?1