Ranter
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
Comments
-
chadd1746317yI feel sorry for this guy. I feel like if he knew how much simpler and easier he could do that, he might actually appreciate it.
-
@chadd17 When I rewrote the code in front of him I explained what I did and why. He did not send much feedback of appreciation... It was more "you're demolishing what I did" :/
-
Here's the version of the file that I wrote in front of him. Note that the response was replaced with a single constant relative to a motion, but that's not the point of course. The very same code with a little bit of editing was adapted to use 2 sonars on the sides of the robot, and 2 IR sensors on the grabbing system. If you're curious you can find everything on my github (nickname: magicleon94, file robot.py in the main root of the robotics2017 repository, in the "reactive(blah blah args)" function)
-
@magicleon I literally just learned the 'variable (boolean) = argument == value' statement by reading your code. Don't know why I never stumbled across this until now. Either way thanks for the inadvertent lesson!
Related Rants
Today I finished my robotics project. I had in my team a total idiot (the one who used the hidden divs, some might remember from another rant). I wanted to share with you the beginning of a ranting adventure.
Me: "you can begin with a simple task. I will send you the obstacle avoidance sensors values from Arduino, and you will send the data for the Arduino motors to dodge the obstacle".
The sensors give 1 if clear, 0 if obstacle is detected.
Below is his code (which I brutally rewrote in front of him).
Now, in the final version of the robot we have something like 9 sensors of the same time to work with.
Imagine what would have happened if we kept him coding. (Guess it: 2^9 statements! :D)
I was not that evil, I tried to give him some chances to prove himself willing to improve. None of them were used rightfully.
I'm so fucking glad we finished. I'm not gonna see him anymore, even if I'd like to be a technical interviewer for hiring just to demolish him.
I'm not always that evil, I promise (?)
Ps. He didn't even have any idea on what JSON is, even if we had already seen it during FIVE YEARS of computer engineering. (And should've known anyway if he had a bit of curiosity for the stuff he "studies")
undefined
evil
if statement
exponential explosion
python