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 - "how often do you commit"
-
When you stare into git, git stares back.
It's fucking infinite.
Me 2 years ago:
"uh was it git fetch or git pull?"
Me 1 year ago:
"Look, I printed these 5 git commands on a laptop sticker, this is all I need for my workflow! branch, pull, commit, merge, push! Git is easy!"
Me now:
"Hold my beer, I'll just do git format-patch -k --stdout HEAD..feature -- script.js | git am -3 -k to steal that file from your branch, then git rebase master && git rebase -i HEAD~$(git rev-list --count master..HEAD) to clean up the commit messages, and a git branch --merged | grep -v "\*" | xargs -n 1 git branch -d to clean up the branches, oh lets see how many words you've added with git diff --word-diff=porcelain | grep -e '^+[^+]' | wc -w, hmm maybe I should alias some of this stuff..."
Do you have any git tricks/favorites which you use so often that you've aliased them?50 -
TL; DR: Bringing up quantum computing is going to be the next catchall for everything and I'm already fucking sick of it.
Actual convo i had:
"You should really secure your AWS instance."
"Isnt my SSH key alone a good enough barrier?"
"There are hundreds of thousands of incidents where people either get hacked or commit it to github."
"Well i wont"
"Just start using IP/CIDR based filtering, or i will take your instance down."
"But SSH keys are going to be useless in a couple years due to QUANTUM FUCKING COMPUTING, so why wouldnt IP spoofing get even better?"
"Listen motherfucker, i may actually kill you, because today i dont have time for this. The whole point of IP-based security is that you cant look on Shodan for machines with open SSH ports. You want to talk about quantum computing??!! Lets fucking roll motherfucker. I dont think it will be in the next thousand years that we will even come close to fault-tolerant quantum computing.
And even if it did, there have been vulnerabilities in SSH before. How often do you update your instance? I can see the uptime is 395 days, so probably not fucking often! I bet you "dont have anything important anyways" on there! No stored passwords, no stored keys, no nothing, right (she absolutely did)? If you actually think I'm going to back down on this when i sit in the same room as the dude with the root keys to our account, you can kindly take your keyboard and shove it up your ass.
Christ, I bet that the reason you like quantum computing so much is because then you'll be able to get your deepfakes of miley cyrus easier you perv."9 -
"Couldn't have written it better myself"
"You might be Taylor Swift because damn you commit often"
"These commit messages are so helpful i could find my way through the Paris catacombs with them"
"Damn we might need to open-source this... How are people living without it??"
"It would be interesting to see if everyone feels as comfortable with this UI as i do"
"Doesn't matter how long this takes, just do it the way you do it." -
I got a REALLY nice compliment from my dev team today. But first, the setup...
Tuesday night, I pushed some changes before I left that totally borked the build today when my team pulled changes (this is an off-shore team, so we more or less work opposite hours). Fortunately, my team dealt with it easy enough since (a) it was pretty obvious what happened, and (b) my commit message had enough information to help them know for sure, and they just reverted one file and were good to go for the day (they didn't fix the problem, left that for me to do, which is proper).
It was an absolutely stupid, careless mistake: I somehow copied the contents of a JS file into a JSP and pushed it. Just a simple case of too many tabs open at once and too many interruptions while I'm trying to code (which is typical most days, unfortunately, but this day it had an impact other than just slowing me down).
But, those are the reasons it happened, they aren't excuses. It was carelessness, plain and simple.
So, once I fixed it, I sent a note to the team explaining it. It basically said "Look, that was a dumb, careless mistake on my part, my bad, sorry for the inconvenience, it's fixed now."
I had a message waiting for me in my inbox this morning that said how I'm an inspiration because despite all my knowledge and experience, despite being a long-time lead, they (a) appreciate the fact that I'm human and still make mistakes, and (b) I stand up and take responsibility when it happens and then do what's necessary to reverse the mistake.
That made my day :)
To me, it's just the right way to be (I credit my parents 100%), never occurs to me to do otherwise, but the truth is not everyone can say the same. Some people are insecure and play the CYA game right away, every time. Some people act like they never make mistakes in the first place.
I don't care if you're an experienced dev or a junior, always take responsibility for your actions, especially your mistakes. Don't try and bullshit your way out of them. Sure, it's fine to explain why it happened if there were factors beyond your control, but at the end of the day, own up to them, apologize where necessary, and then put in the effort to make it right. Most people have no problem with people who make mistakes every so often - everyone does, whether everyone admits to it or not - but those who try and shirk responsibility don't last long in this or any endeavor (you know, putting aside the professional bullshitters who build their careers around it... that's not most people, thankfully).10 -
I'd argue to say that committing often, even if the commits aren't always meaningful, has saved me numerous times from bad code gone awry.
-
!tech
I am yet to start the phase of life where i am more than just a student but i often see things around and have some thoughts. Recently i was feeling that the 2 biggest crimes a person could commit is being repetitively irresponsible or being always dependent.
Like, if i am a father , a husband , a sole earner or have someone dependent on me, i could not afford to make simple everyday mistakes that i often do in my current youth age and people ignore. These days i sleep at 5 am after watching movies, wake up at 3pm , knowing that mom has already made me food, my college mates have already made assignment, and there's nothing better that i could do . Life is relaxing.
But my dad cannot afford mu luxurious lifestyle. He cannot waltz on the bike at 90, he can't sleep till 3 , he can't afford to watch long webseries. Heck, he can't even afford to have a platform like this and rant or post stuff. He has to run at 6 am in morning to get groceries for our restaurant. I wonder how he or any other mature person relaxes their mind.
Similarly everyone has to show some boss characters in life. You can't rely on a stick forever, you got to have your own spine. Dad used to have a biz partner who took most of our restaurant decisions, but then business went low and he ran away. So at the end dad himself had to take up all the things in his hand.
I on the other hand am totally spinless. Clg has taken the decision for me that i gotta give papers that's why am studying. Later company will take decision to fuck me up and work infinitely and i might just do that . I usually never come up with a good innovative app idea with a solid vision and therefore end up following other people's ideas , visions, etc and that too rather incompetently.
I wish i had more courage.
'Responsible' people of devrant (bread earners, family runners, etc you know if you are one) , would you like to share your life tips or let me know if my thoughts are wrong?2 -
I need some advice to avoid stressing myself out. I'm in a situation where I feel stuck between a rock and a hard place at work, and it feels like there's no one to turn to. This is a long one, because context is needed.
I've been working on a fairly big CMS based website for a few years that's turned into multiple solutions that I'm more or less responsible for. During that time I've been optimizing the code base with proper design patterns, setting up continuous delivery, updating packaging etc. because I care that the next developer can quickly grasp what's going on, should they take over the project in the future. During that time I've been accused of over-engineering, which to an extent is true. It's something I've gotten a lot better at over the years, but I'm only human and error prone, so sometimes that's just how it is.
Anyways, after a few years of working on the project I get a new colleague that's going to help me on my CMS projects. It doesn't take long for me to realize that their code style is a mess. Inconsistent line breaks and naming conventions, really god awful anti-pattern code. There's no attempt to mimic the code style I've been using throughout the project, it's just complete chaos. The code "works", although it's not something I'd call production code. But they're new and learning, so I just sort of deal with it and remain patient, pointing out where they could optimize their code, teaching them basic object oriented design patterns like... just using freaking objects once in a while.
Fast forward a few years until now. They've learned nothing. Every time I read their code it's the same mess it's always been.
Concrete example: a part of the project uses Vue to render some common components in the frontend. Looking through the code, there is currently *no* attempt to include any air between functions, or any part of the code for that matter. Everything gets transpiled and minified so there's absolutely NO REASON to "compress" the code like this. Furthermore, they have often directly manipulated the DOM from the JavaScript code rather than rendering the component based on the model state. Completely rendering the use of Vue pointless.
And this is just the frontend part of the code. The backend is often orders of magnitude worse. They will - COMPLETELY RANDOMLY - sometimes leave in 5-10 lines of whitespace for no discernable reason. It frustrates me to no end. I keep asking them to verify their staged changes before every commit, but nothing changes. They also blatantly copy/paste bits of my code to other components without thinking about what they do. So I'll have this random bit of backend code that injects 3-5 dependencies there's simply no reason for and aren't being used. When I ask why they put them there I simply get a “I don't know, I just did it like you did it”.
I simply cannot trust this person to write production code, and the more I let them take over things, the more the technical debt we accumulate. I have talked to my boss about this, and things have improved, but nowhere near where I need it to be.
On the other side of this are my project manager and my boss. They, of course, both want me to implement solutions with low estimates, and as fast and simply as possible. Which would be fine if I wasn't the only person fighting against this technical debt on my team. Add in the fact that specs are oftentimes VERY implicit, so I'm stuck guessing what we actually need and having to constantly ask if this or that feature should exist.
And then, out of nowhere, I get assigned a another project after some colleague quits, during a time I’m already overbooked. The project is very complex and I'm expected to give estimates on tasks that would take me several hours just to research.
I'm super stressed and have no one I can turn to for help, hence this post. I haven't put the people in this post in the best light, but they're honestly good people that I genuinely like. I just want to write good code, but it's like I have to fight for my right to do it.1