AboutAccidental lead dev, vi/vim
Joined devRant on 5/6/2019
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
Fun Fact: Did you know that ublock origin specifically hides the global store notice banner in WooCommerce by CSS? I found out tonight after fiddling with that shite for almost an hour.
Haha, fuck you.7
In other news, I have been forbidden by my boss to implement any security or performance improvements into the company infrastructure as this holds no business value. Furthermore, passwords are not to be a random alphanumeric+special-chars string but something legible.14
Fun Fact: Did you know that git clone starts a child process for downloading the repo but the parent process terminates, therefore working in an asynchrone way so &&-ing the next instruction, which might rely on those files, won't help you?
Well now you know, and so do I.
Fornicating piece of excrement, what a fun afternoon.18
Wait, I HAVE to use double quotes when referring to RiotJS tags within JS, otherwise the in-browser compiler just spits out errors? FU
I never dream about tech (at least not specific) but recently I had a dream rotating around the fact that terminators (e.g. T-800) are safe to be stored on Windows 95 as they can only boot from NES cartridge.5
So I had this JSON thingy, where I named the property containing a datetime string "timestamp".
For some reason, JS decided to convert that into a unix timestamp int on parse. Thx for nothing.6
Some of my previous rants mention a web application that I wrote for my then-employer. As it is still in use and I have the whole code, too, I figured to check on security a little with a friend. It's all fine, except for one page, were I was sloppy and didn't escape strings, thus allowing for SQL injection.
This is however only possible if already logged in, which has shown to be secure (and the tool is for employees only).
Nobody is ever going to find out, as the only one who knew what injection even is was me. I left 2 years ago.
After my first ever "thing" I wrote (see story here: https://devrant.com/rants/2132057/...) fast forward 7 years to my first project when I /* thought I */ knew what I was doing and didn't write just for myself.
I worked in a very small company distributing various materials for medical research, many of them bought from manufacturers and then relabelled as if we had produced it. One part of that was to indicate a production batch / lot number. Before I started there, they would just invent a random number on the spot and use that on the new label and somewhere write it down to document that, I at least used an Excel sheet to have numbers prepared and document it on the same line (still crappy but more than nothing). After some time my boss got the idea to have all of that documented in MS Access (because that was the only database he knew). I had just started with HTML, PHP and MySQL in apprentice school around the same time, so I proposed writing an appropriate solution using those and got permission.
I started coding and learnt so much that I didn't need to pay attention at school anymore as I was years ahead of the curriculum (the others were struggling with If-statements and the likes).
When I was done with Version 1.0 of my web application, it was of course still crude as hell. I used html forms to save input (like editor.php -> submit to save.php, do save -> redirect to editor.php), but it did what had not been done before: keeping it all together and force people to do it properly. 2 years later I wrote a version 2, adding features that showed to be useful and with improved structure, as my last project before leaving, and as far as I know, they are still using it, which is at this point 2 years after I've left.
Looking back I would do it differently, but for what I knew back then it was not bad at all.2
Back in grammar school we started programming in TI-Basic on a TI89 Titanium as it was part of math class (calculus and geometry). I didn't really understand much because the teacher thought it was a great idea to start with recursively calculating GCD (and we were in a sort of "linguist profile", nobody had ever touched a line of code in their lives before). I still liked it though and by some coincidence I got an old Win95 compaq notebook to play with from a friend.
I started playing around with the CMD prompt and batch files and could apply some of the things I had learned on the TI, like GOTO or If statements. I still didn't know what I was doing of course, and so it happened that I used the > file pipe when trying to compare two values. Suddenly there was a file with some code fragments and I started to get what I had done. I put the file pipe into an endless GOTO loop and was amused how those few lines filled up the whole desktop with nonsense files. I went on to refine this a little so I could control it with another file that acted as a kill switch when present. Over the next weeks I played some more with it and made it write out and start another batch file that would check whether the original script was still there and recreate it if not.
That notebook was so large and heavy I could not bring it to school, so I wrote all code by hand on paper and typed it in when I got home, that way I could still code in class when I was bored and no one would notice.
So my first ever "program" that I wrote myself was some lousy malware.5
Another anectode from my apprenticeship:
Boss comes into the office, looks at my screen: „So Mr Possum, writing scripts again? Process some customer orders instead.“
My Screen: html in notepad++ (as I was also responsible for the company website)
Me: */ wtf man? */ Alright sir.2
After @BobbyTables asked for super hero names, I'm curious for some supervillains.
I'll start with DOM Corleone8
So in my last rant I mentioned an ERP. This is its story:
When I started, all paperwork (including invoices, delivery slips, orders to suppliers etc.) was done on Word and some Excel, no specialised software whatsoever.
At some point (I already worked there for 2 years then), it became too much even for our boss, so he decided to spend some cash on the real deal.
After some looking around, he found software that seemed right (same vendor as our external bookkeeper used, so it would work with him too, nice). In order to save some money, he purchased it in Germany, as they offered a smaller product costing way less (we were based in Switzerland).
Once installed, we realised that this product was only meant to be used within the EU, as it only supported € as a currency and German VAT rates. We needed Swiss Francs and local VAT to work as well.
His solution looked as follows: I had the task to edit all forms via built-in MS Report Builder (god does it suck) to display the string CHF instead of €, and alter the on-sheet excel-like functions to use our VAT rates. Internally, the application of course still thought it was using € etc. For that reason, all output was unusable for bookkeeping, so we (as before) would just hand it in on paper.
If he had purchased the version sold here, all of the above would not have been the case, meaning support for multiple currencies and VATs, as well as direct transfer to the bookkeeper. He hardly saved 15k, in exchange for a non-working solution.2
Anecdote from when I used to be an apprentice:
Setting: Small company, number of employees -> ε, direct superior is the founder and owner, no tech background
Boss: I've looked at this backup directory of the ERP /* why is he even going through that stuff?*/, it looks messy as hell, I want you to tidy that up
Me: Those are incremental backups, I can't just go and delete some of them, the application manages them by itself
Boss: Get it tidy!8