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 - "wk302"
-
I’m happiest about code I deleted.
Deleted code is easy to maintain, easy to read and it makes applications run faster.
Moreover applications take less disk space and are faster to download.
The more happy than about deleted code I’m about deleted software or destroyed computers.3 -
Current work project is microservices architecture out of 4 - 8 components.
It is fully Infrastructure as a Code automatized. I just change somewhere code, git pushing
And it automatically invokes Gitlab CI, terraform, ansible, kubernetes helm charts.
Auto checking itself with unit and integration tests in autoredeployed staging env. Then it saves tested results to docker registry and asks for one button verificating click to be rereleased to prod.
I just go for drink or eat food. While all the stuff is happening.
And I am proud that all the infrastructure, backend and frontend I made on my own.
I don't need to remember how to Deploy it. It is all automatized3 -
Years ago I used to work a guvmant site. They had really strict security rules for internet and how you spent your time. Makes sense considering what that site did. I was a support engineer for some of their process control equipment.
I was approached by an operator supervisor to install dvd player software on a business machine (non process related). Basically just a general purpose PC with no function other than time cards and general office use. I was fine with the request, but the reason was for watching movies during a holiday period by the operators. Not for anything official. So I made some noise about my dislike of this request feigning moral superiority. But the supervisor swore up and down it was for "training" dvds.
So I wrote a simple windows script. The script basically popped up a window that said:
"Security has detected unauthorized media inserted into this machine. Please state the reason for this infraction." It provided a dialog to enter a justification. After you entered the justification it said: "Security has been contacted and your user logged. You will be contacted shortly."
This script was then attached to the supervisors Start folder so it ran when he, and only he logged in. We made sure the "training" video (some movie) was already inserted at this point.
He logged in. He just about shit his pants when reading this. He promptly logged and left the building to walk somewhere else in the site. We called him and let him know it was a gag. His response: That son of a bitch Demolishun!2 -
i made a mock code that wouldn't close to prank my colleagues. this boy tried the x button and it didn't work, so he went for ctrl alt del and the pop up showed up to confirm and when pressing yes it still wouldn't close1
-
I am happy about a lot of code i have written but most recently speaking, the fuck you github page mentioned in https://devrant.com/rants/4934026/...1
-
Oh, as a noob dev my team was using a dropdown library for our filters in the website. The code was messed up cause they kept changing the design halfway through dev and after releases and then finally after some releases, the client wanted multilevel options as a new requirement.
So I scrapped the whole thing and made my own multilevel dropdown component (there were no decent libraries then) and we used that from then on. It has many issues now that I look back (who cares about keyboard interaction right?). But that is a refactor for another day. -
probably every time I see my tests failing.
Each time I am writing tests I'm convincing myself "it's an investment", "spend 2 hours now to save 2 days later", "unit-tests are good".
And each time I'm chasing away ideas like "perhaps they are right, perhaps writing unit tests is a waste of time..", "this code is simple, it should ever break - why test it??", "In the 2 hours I'll spend writing those UT I could build another feature"
Yes, it is terribly annoying to write tests, especially after writing the production code (code-first approach). Why test code that you know works, right?
But after a few weeks, months or years, when the time comes to change your feature: enhance it, refactor it, build an integration with/from it, etc, I feel like a child who found a forgotten favourite candy in his pocket when I see my tests failing.
It means I did a very good job writing them
It means it was not a waste of time
it means these tests will now save me hours or days of trial-and-error change→compile→deploy→test cycles.
So yeah, whenever I see my tests fail, I feel warm and fussy inside :)2 -
I implemented the equivalent of “?.” In typescript with a function callled safeRetrieve(descend into the field only if the object is not null).
We could not update typescript, so I just created this function and it made me used to use ‘keyof T’ as a parameter type… I still feel very satisfied after I use this approach with anything because it really feels like using typescript correctly!4 -
My CSS-only hamburger menu.
It's cool and all, just a few lines of code, but some days ago I tried to do a 2 sides hamburger menu.
Based on that I just copied it and changed every left for right. Worked. Like. A. Charm. I had to apply some z-index stuff of course but nothing out of ordinary.
I'm so cool. I'll upload it to GitHub ASAP, but it's not a priority rn. -
Anytime I write a line of code that works correctly the first time, I’m ecstatic. If I write a whole block or function that works right the first time, I freak out with happiness. Yes, I’m that bad at coding. The rest of y’all probably do such things on the regular and it no biggie. But for me, it’s vanishingly rare.
-
Sometimes while working I find a subproblem that is isolated from the original problem domain, for example token renewal in an RTR authentication system. I take note of what I've been working on, clear my head of the broader problem write an exact specification of the subproblem. Then I code to that specification. The result is usually a self-contained open-source module which continues to improve my pace of work for years to come.
-
When I tuned angry birds with spotify and made the speed the beat of the song.
App didn't work out but who cares. Had so much f*cking fun building it.