Details
-
AboutI take that code and massage it so the robots don't destroy themselves when you fail to sanitize an input and someone asks the laser to cut -3/4 pi circles at a radius of "ice cream" millimeters.
-
SkillsJack of all codes, master only of transistor logic.
Joined devRant on 10/11/2020
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
-
You know what?
Young cocky React devs can suck my old fuckin LAMP and Objective-C balls.
Got a new freelance job and got brought in to triage a React Native iOS/Android app. Lead dev's first comment to me is: "Bro, have you ever used React Native".
To which I had to reply to save my honor publicly, "No, but I have like 8 years with Objective-C and 3 years with Swift, and 3 years with Node, so I maybe I'll still be able help. Sometimes it just helps to have a fresh set of eyes."
"Well, nobody but me can work on this code."
And that, as it turned out was almost true.
After going back and forth with our PM and this dev I finally get his code base.
"Just run "npm install" he says".
Like no fuckin shit junior... lets see if that will actually work.
Node 14... nope whole project dies.
Node 12 LTS... nope whole project dies.
Install all of react native globally because fuck it, try again... still dies.
Node 10 LTS... project installs but still won't run or build complaining about some conflict with React Native libraries and Cocoa pods.
Go back to my PM... "Um, this project won't work on any version of Node newer than about 5 years old... and even if it did it still won't build, and even if it would build it still runs like shit. And even if we fix all of that Apple might still tell us to fuck off because it's React Native.
Spend like a week in npm and node hell just trying to fucking hand install enough dependencies to unfuck this turds project.
All the while the original dev is still trying TO FIX HIS OWN FUCKING CODE while also being a cocky ass the entire time. Now, I can appreciate a cocky dev... I was horrendously cocky in my younger days and have only gotten marginally better with age. But if you're gonna be cocky, you also have to be good at it. And this guy was not.
Lo, we're not done. OG Dev comes down with "Corona Virus"... I put this in quotes because the dude ends up drawing out his "virus" for over 4 months before finally putting us in touch with "another dev team he sometimes uses".
Next, me and my PM get on a MS Teams call with this Indian house. No problems there, I've worked with the Indians before... but... these are guys are not good. They're talking about how they've already built the iOS build... but then I ask them what they did to sort out the ReactNative/Cocoa Pods conflict and they have no idea what I'm talking about.
Why?
Well, one of these suckers sends a link to some repo and I find out why. When he sends the link it exposes his email...
This Indian dude's emails was our-devs-name@gmail.com...
We'd been played.
Company sued the shit out of the OG dev and the Indian company he was selling off his work to.
I rewrote the app in Swift.
So, lets review... the React dev fucked up his own project so bad even he couldn't fix it... had to get a team of Indians to help who also couldn't fix it... was still a dickhead to me when I couldn't fix it... and in the end it was all so broken we had to just do a rewrite.
None of you get npm. None of you get React. None of you get that doing the web the way Mark Zucherberg does it just makes you a choad locked into that ecosystem. None of you can fix your own damn projects when one of the 6,000 dependency developers pushes breaking changes. None of you ever even bother with "npm audit fix" because if security was a concern you'd be using a server side language for fucking server side programming like a grown up.
So, next time a senior dev with 20 years exp. gets brought in to help triage a project that you yourself fucked up... Remember that the new thing you know and think makes you cool? It's not new and it's not cool. It's just JavaScript on the server so you script kiddies never have to learn anything but JavaScript... which makes you inarguably worse programmers.
And, MF, I was literally writing javascript while you were sucking your mommas titties so just chill... this shit ain't new and I've got a dozen of my own Node daemons running right now... difference is?
Mine are still working.34 -
fork() can fail: this is important
Ah, fork(). The way processes make more processes. Well, one of them, anyway. It seems I have another story to tell about it.
It can fail. Got that? Are you taking this seriously? You should. fork can fail. Just like malloc, it can fail. Neither of them fail often, but when they do, you can't just ignore it. You have to do something intelligent about it.
People seem to know that fork will return 0 if you're the child and some positive number if you're the parent -- that number is the child's pid. They sock this number away and then use it later.
Guess what happens when you don't test for failure? Yep, that's right, you probably treat "-1" (fork's error result) as a pid.
That's the beginning of the pain. The true pain comes later when it's time to send a signal. Maybe you want to shut down a child process.
Do you kill(pid, signal)? Maybe you do kill(pid, 9).
Do you know what happens when pid is -1? You really should. It's Important. Yes, with a capital I.
...
...
...
Here, I'll paste from the kill(2) man page on my Linux box.
If pid equals -1, then sig is sent to every process for which the calling process has permission to send signals, except for process 1 (init), ...
See that? Killing "pid -1" is equivalent to massacring every other process you are permitted to signal. If you're root, that's probably everything. You live and init lives, but that's it. Everything else is gone gone gone.
Do you have code which manages processes? Have you ever found a machine totally dead except for the text console getty/login (which are respawned by init, naturally) and the process manager? Did you blame the oomkiller in the kernel?
It might not be the guilty party here. Go see if you killed -1.
Unix: just enough potholes and bear traps to keep an entire valley going.
Source: https://rachelbythebay.com/w/2014/...12 -
I'm at my Community College as a member of the engineering club requesting funds for a software and hardware-related physical project.
The code was mostly pre-written in Python from a university already, but we needed to build essentially a gaming-level PC to run it, do some welding and metalwork for the hardware, cables, et citera. I don't want to get too detailed in case anyone involved is reading this story.
To get funding, we needed to go before the student senate. I didn't go the first time, but later when we needed more funding for the project to do expansions, we attended.
I came in with a few pages of documentation explaining how the project operated, it's scope, and why we needed the additional $500 on top of the previous $1000 or so spent. I went in woefully behind the times on what a student senate meeting was like.
For starters, I thought this would be somewhat formal, being "Student Senate" in Week 8, and prepared to defend my project fully. Instead, we spent the first 15 minutes going around the table explaining what animal we would be and why, if we had to turn into an animal. It just kept going hilariously, painfully downhill from there.
They did ask some questions about what my project was and how it operated (as not many had seen it), and they wanted explanations even though it was clear absolutely nobody else in the room understood anything. My partner virtually shut down and let me do all the talking for my project and his because he couldn't take the ignorance of some of the questions and the assorted nonsense spread throughout the meeting.
Amazingly, we got funding. We had to sit for the rest of the meeting though, which (among other things) included a segment about whether we should create a new committee called the "Fundamental Insecurities committee" to help out with, well, "Fundamental Insecurities." There was only one member on this proposed committee.
When I brought up the question on why we were making a one-person committee alongside the, like, three one-person committees already in existence, they congratulated me for asking good questions and said I should come more often. They then said the exact same thing again when I pointed out there were better names than "Fundamental Insecurities." It's such a reality check that you are trying to impress people to get funding, when you can't help but feel that everyone is an utter idiot in the back of your head.
Almost a year later, I had to go back with a list of parts we needed. I wrote a whole complex list of things we needed for the project. Even though they tried to ask questions about what certain parts were (to appear like they weren't totally incompetent), and despite asking questions about a bunch of the items, nobody cared about what the $10 for "C418" was (google it if you don't get this joke). I spent about 30 minutes talking with them and succeeded in getting $600 more in funding. We then, to my surprise, spent less than 5 minutes debating whether to send 2 students on a field trip for $700. 30 minutes for $600, for a permanently installed project. <5 minutes for a $700 one-time thing.
And, because this is already a long rant, here's one more thing: The Student Senate's voting rules initially gave everyone who showed up 1 vote. We're all students, we all get a say, right?
Well, I soon put together that Student Senate had fairly low attendance. Engineering Club had high attendance. Student Senate and Engineering Club took place at the same date and time. I then, of course, asked why we couldn't bring the whole Engineering Club into Senate one day, and then proceed to pass an order by simple majority saying that all Student Life funding goes to us.
They then said that the administrators (the heads of Student Senate) could override that, but I pointed out that kind of defeats the purpose of voting in the first place. They then switched script and said they wouldn't do that and would honor such a vote. Shortly after, they changed the rules saying that you only get a vote on your 2nd consecutive visit; and again said I should visit more often because I was brilliant.
You can't make this stuff up.3 -
Hated function naming in python, because some functions are like "dothisorthat", some are "do_this_or_that", some are "doThisOrThat", some are, I don't know, what new technique of naming would python devs invent in the near future. Honestly, these naming creeps me out4
-
When you make a typo in a command and spend 20 minutes googling why it isn't working trust me its time to sleep and reboot.4