Details
-
AboutEmbedded Software Engineer with Electronics Background. Also likes cats, homebrew, gardening, DIY, computer games, climbing and other stuff.
-
SkillsGo, C, C++, Ruby (no not Rails, Ruby), GNU Make, Linux (mainly Debian now, I can just about work CentOS), Yocto, IP networks, CI, CD (Delivery and Deployment)
-
LocationFarnborough, Hampshire, UK
-
Website
-
Github
Joined devRant on 7/17/2018
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
-
Aha, more c++ knowledge. An implementation of a List (already provided by vector).
Lots of learning here, including use of the placement new operator, which is required for containers like this because if you just use the normal new operator, the buffer will construct a million items.
Also, the buffer is of type char*, not of type T, which really confused me in the beginning.
Lastly, with placement new, you need to call destructors yourself.
Interesting stuff.1 -
I been teaching someone python for a few day with 2-3 hour each day. It has been very pleasant to teach him programming since he have a goal in mind. He already know what kind of program we wanted to build.
He is a novice and not familiar with programming. It have been a good chance to see how the novice look at the python. I been given a chance to ask the answer like
"Why do we throw exception?" ,
"Why do we put define function at the top of the file and not at __main__?"
"Why do I need to use constructor?" ,
"Why should I call parent constructor in the child constructor?"
Here is the main question.
I have been wondering "should I teach him multi inheritance and the diamond problem?" I haven't been using multi inheritance for a while other than the exercise I done when I started programming and cannot think of the situation to use multi inheritance. I know in other language we use multi inheritance (kind of) regularly by extending multiple interface. I wanted to ask if multi inheritance is common in python.
Another question I have is how should I introduce him to gui programming in a simple manner? I am thinking of introduction him to the gui framework which haved WYSIWYG editor like "Remi"10 -
*Now that's what I call a Hacker*
MOTHER OF ALL AUTOMATIONS
This seems a long post. but you will definitely +1 the post after reading this.
xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.
xxx: So we're sitting here, looking through his, uhm, "legacy"
xxx: You're gonna love this
xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.
xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".
xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.
xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
xxx: holy sh*t I'm keeping those
Credit: http://bit.ly/1jcTuTT
The bash scripts weren't bogus, you can find his scripts on the this github URL:
https://github.com/narkoz/...56 -
Duplicate question
Too opinion based
Fuck you this is a dumb question
But if you actual got a question and give all the information that's needed nobody fucking responds
Yeah well fuck you StackOverflow
It's like they only want to bash people and not actually help1 -
"Jim, can you tell me why my e-mails aren't getting to clients?"
They're being marked as spam...
"oh damn, how can we fix that?"
You can't. You can change the structure of your e-mails to look less spammy, but it's on their end.
"This is a disaster, we can't have our marketing e-mails marked SPAM!!"
Have you tried not spamming people?
"WE'RE NOT SPAMMING PEOPLE, THEY EXPRESSED A LEGITIMATE BUSINESS INTEREST"
No, you bought a mailing list and put together an e-mail campaign.
"But we aren't spamming people!"
IT VS Marketing 100% of the time13 -
This week at work I spent 20 hours debugging automated tests to avoid manual testing that would've taken a few hours.5
-
Just did some initial programming of my Arduino to run the alcohol sensor.. seems to be working well. So, looks like it's time for testing 🤤 cheers!32
-
People in my office sing me praises for what I can do with Linux even though I joke with them that “I have no idea how to do that - but give me half an hour and an internet connection and I’ll figure something out for you.” I even once specifically said in response to my boss commenting on my skills, “You do realize that I just like…google stuff when you ask me to do something with Linux that I don’t know how to do, right?”
But his praise didn’t change at all. There was no “Wait, that’s all it is?”
Instead, he said “Yes, but the fact that you think to do that - and that you know exactly how to phrase your searches and how to sift through the results to get the right answer, and you then integrate what you’ve learned and use it going forward - is still so much more than any of the rest of us can do. To you, it’s “just googling stuff,” but it’s still a unique and valuable skill you bring, so don’t shrug off the compliments so cavalierly, okay?“
And this was coming from an executive with an MBA. Don’t undervalue your googling skills, kids. It’s not lying if you know you can figure it out.8 -
Our team changed to Linux about 3 years ago already and I can see some of them struggling to insert some commands when I'm talking to them.
How the fuck do you struggle to `cd` into a fucking directory?
Ok,ok... I've linuxing full time for 8 years already, I understand I've been through this... But come on! If some one said to me on day ONE "dude, you can cd /full/path/of/fucking/whatever" or " ~/ means home" I would be doing it from day one.
Probably I'm overreacting but wtf dudes? 3 years... Step up your game.18