Details
-
Aboutsoftware engineering student. here for a good time.
-
Skillsjava, js,
-
LocationNew Zealand
Joined devRant on 4/23/2017
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
-
People with programming languages named after them:
Haskell Curry
Ada Lovelace
Agner Erlang
Blaise Pascal
Taylor Swift30 -
It finally hit me the other day.
I'm working on an IoT project for a late-stage ALS patient. The setup is that he has a tablet he controls with his eye movements, and he wants to be able to control furnishings in his room without relying on anyone else.
I set up a socket connection between his tablet and the Raspberry Pi. From there it was a simple matter of using GPIO to turn a lamp or fan on or off. I did the whole thing in C, even the socket programming on the Pi.
As I was finishing up the main control of the program on the Pi I realized that I need to be more certain of this than anything I've ever done before.
If something breaks, the client may be forced to go days without being able to turn his room light on, or his fan off.
Understand he is totally trapped in his own body so it's not like he can simply turn the fan off. The nursing staff are not particularly helpful and his wife is tied up a lot with work and their two small children so she can't spend all day every day doting on him.
Think of how annoying it is when you're trying to sleep and someone turns the light on in your room; now imagine you can't turn it off yourself, and it would take you about twenty minutes to tell someone to turn it off -- that is once you get their attention, again without being able to move any part of your body except your eyes.
As programmers and devs, it's a skill to do thorough testing and iron-out all the bugs. It is an entirely different experience when your client will be depending on what you're doing to drastically improve his quality of life, by being able to control his comfort level directly without relying on others -- that is, to do the simplest of tasks that we all take for granted.
Giving this man some independence back to his life is a huge honor; however, it carries the burden of knowing that I need to be damned confident in what I am doing, and that I have designed the system to recover from any catastrophe as quickly as possible.
In case you were wondering how I did it all: The Pi launches a wrapper for the socket connection on boot.
The wrapper launches the actual socket connection in a child process, then waits for it to exit. When the socket connection exits, the wrapper analyzes the cause for the exit.
If the socket connection exited safely -- by passing a special command from the tablet to the Pi -- then the wrapper exits the main function, which allows updating the Pi. If the socket connection exited unexpectedly, then the Pi reboots automatically -- which is the fastest way to return functionality and to safeguard against any resource leaks.
The socket program itself launches its own child process, which is an executable on the Pi. The data sent by the tablet is the name of the executable on the Pi. This allows a dynamic number of programs that can be controlled from the tablet, without having to reprogram the Pi, except for loding the executable onto it. If this child of the socket program fails, it will not disrupt its parent process, which is the socket program itself.13 -
Girl : I like dangerous men.
Me : I didn't run test cases while committing my changes last night.
Girl : my hero!
Me : *wakes up from the dream*14 -
Relative phones up worried about installing Adblocker as it "can store and modify the websites you visit"...my answer.."so can GCHQ, NSA AND CIA so just give in to the fact that you have no privacy and click ok"...*long pause*.."ok one more question, what's a chrome extension?"..FML
-
My friend said this,
Roses are red,
The screen turned blue,
I'm not a programmer,
What the fuck do I do.26 -
I'm not getting kicked out of school! Yaaaaaay!
I've got a lot of work to do this summer but I know I can do it (`・ω・´)b2 -
My old phone is dead forever but I'm back :-D
AND I JUST GOT AN INTERNSHIP :-DDDD I GET TO PROGRAM IN AN ACTUAL WORK ENVIRONMENT LIKE A BIG KID
AND KINDA GETTING A HOUSE THIS SUMMER I THINK?! (I have to share with my sister and her boyfriend but that means I get to cook without people interfering MOM JUST LET ME MAKE FRENCH TOAST JEEZ)
(and I'm probably like 99.9% getting kicked out of school but everything is going to be fine I hope :-s )
BUT I MIGHT GO TO *COMMUNITY COLLEGE* SOMEDAY SO EVERYTHING IS FINE :-D15 -
How it should be:
- First: solve the problem
- Second: Write your code.
How many people do:
- First: Write code
- Second: solve code problems
- Third: Adapt code with requirements
- Forth: get lost on your spaghetti code
- Sixth: make a suicide8 -
When you accidentally run " rm -rf * " in the directory containing ALL you projects, not in the directory of a single project.
That's right. You just encountered THE DEATH STAR.9 -
Working on a group project for uni and this dude asks me "why would you ever use github instead of google drive?" because git gud you cunt1
-
Just finished writing a script with all the classes and variables named after the characters from Sherlock Holmes. I regret nothing.7
-
Girlfriend: babe where are you?
Me : at the gym
Girlfriend: waoh nice babe
Me: ya the system crashed again
Girlfriend: oh I went too far
Hahaha2 -
!rant
Me and friend1: talking about Linux friend2: "what is this Linux"
Me:"it's an OS"
Friend2:"so it's something like excel and powerpoint."
Unfortunately there wasn't a cliff to jump off in that moment.13 -
I once set a customers server on fire.
Litterally.
I put my laptop ontop of the server rack and the additional heat generated caused blue smoke to fill the room.
The whole building had to be evacuated.
Firetrucks came.
The customer eyeballed me quite a bit after he talked to the firemarshal regarding where the fire had originated.10 -
I swear to god I am this close to writing myself a Sudoku solver for those damn Mass Effect Andromeda Puzzles3