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 - "independence day"
-
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 -
Today is Independence Day here in Brazil. Holiday n the middle of the week. I swear to not touch a computer today :P3
-
Fuck the Fourth of July.
I was already feeling pretty unpatriotic after all the terrible things the USA has been doing lately, and then to top it all off, they closed down almost every street within a one-mile radius of my apartment just because I happen to live near the place where they're shooting off fireworks. I spent the evening with my girlfriend, enjoying a nice dinner and sort of forgetting it was even really a holiday, then got in my car at 9:00 expecting to be home by 9:30. Nope. I spent over an hour driving in a huge circle around my apartment, searching for even one single road that the police hadn't closed to traffic. Finally managed to get into the area on a back road and get home, but it took so long that I went through all five stages of grief before I got home at 11:00.
They also closed the nearest bridge across the river so I couldn't go shopping for groceries today, either. My pantry is almost completely empty. At least I'm working from home tomorrow so I'll have time to buy food then.8 -
my dearest president decides to greet us this Independence Day morning with this!
this country is a big joke13 -
Today is a national holiday because of Independence Day.
And weirdly I feel like coding today. For fucks sake, I wanna be an example you know. 😏😏😏2 -
And there I was thinking Maven is going to make life simpler, with this granular dependency management and IDE independence (no extraneous classpath and module management required). But wait, it turns out that to run simple Ant task I need all my dependencies to have *.pom. Every. Fricking. Dependency.
I mean, sure, only if I knew which sub-dependencies they all had, but that seems like heck a lot of work to make external JAR libraries to work with Maven process.
WHY TODAY? Yesterday I had no issue: uploaded few libraries in corporate repository, refreshed index, dependencies downloaded, even had time appending javadoc to one of them and it worked. But today is the day, right? I just run simple task with maven-antrun-plugin (mvn antrun:run@<executionID>), and it starts scanning each dependency for *.pom file. I DON'T WANT THIS. Google, help me. Oh, no direct answers and clues?
Just... fuck you, Maven. With all 2 days effort I could just litter in IDE's classpath, write build.xml in no time, make normal webservice, but that would require me to also litter sources with required libraries. FML!4 -
Jiff files have begun encroaching on my charmed life. I keep forgetting to search for an online converter and have done with it. I thought I'd hit upon one and I remembered to go to my search engine of choice and key in, "XXX malware." I learnt to do this years ago with my Mac, and I'm happy to say I've only slipped once or twice. Anyway, it's great to apply what I've learned instead of noticing weird things happening with my screen. Happy Independence Day from The Colonies,5