Details
-
LocationPoland
Joined devRant on 8/16/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
-
Hey guys and girls ^~^
I hope this question is ok as it's not entirely dev related.
I'm planning on building a custom cattracking device that i can attach to a cat harness. It obviously has to be very small and light. This is why i had the pi zero in mind.
I want to track my cat via Gps and send location via gsm (and use a trigger if he connects to my wifi to set off an alarm so i can let him in).
My experience with pi's is limited but i have some with arduinos.
Besides that i would need a case which keeps the pi save from dust, humidity and maybe rain but won't interfere too much with the gsm signal.
First: is this even possible?
If yes, what would you recommend?
Are there better ways to do this?
Thanks to all in advance35 -
TL;DR: don't fuck with your IT guy.
One of the guys in our office treats his laptop like shit, has dropped it a number of times and had managed to break the screen. There was a nice crack diagonally corner to corner across the screen with a nice black splotch around it making a good chunk of his screen unusable. Servicing the laptop would be too expensive and would mean being without the machine for several weeks forced to use a Mac.
I offered to replace the screen for him since I have experience doing laptop repairs. Once the screen arrived I kept the laptop for the evening and spent an hour replacing the screen. I left a note telling him he owed me $60 for my time.
He sees the note, laughs and says "I'll buy you lunch."
Not only does this guy only keep his word when offering to buy lunch about 10% of the time, when he does actually do it he charges it on the company card so it isn't really him paying for it. So I spent my lunch break writing up a little Python app which randomly fucks with his mouse and keyboard.
I sent him a message that I needed to run some tests on his new screen tonight so I'll be able to install it and set it to run on boot.
The app does things like:
Jiggle the mouse
Minimize all windows to show the desktop
Double click
Right click
Can't decide if I want to add in reboots as well.
I figure I'll leave it going until I get $60 worth of entertainment out of it.17 -
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
It took forever to get SSH access to our office network computers from outside. Me and other coworkers were often told to "just use teamviewer", but we finally managed to get our way.
But bloody incompetents! There is a machine with SSH listening on port 22, user & root login enabled via password on the personal office computer.
"I CBA to setup a private key. It's useless anyways, who's ever gonna hack this computer? Don't be paranoid, a password is enough!"
A little more than 30 minutes later, I added the following to his .bashrc:
alias cat="eject -T && \cat"
alias cp="eject -T && \cp"
alias find="eject -T && \find"
alias grep="eject -T && \grep"
alias ls="eject -T && \ls"
alias mv="eject -T && \mv"
alias nano="eject -T && \nano"
alias rm="eject -T && \rm"
alias rsync="eject -T && \rsync"
alias ssh="eject -T && \ssh"
alias su="eject -T && \su"
alias sudo="eject -T && \sudo"
alias vboxmanage="eject -T && \vboxmanage"
alias vim="eject -T && \vim"
He's still trying to figure out what is happening.5 -
Question!
I am 26, and recently diagnosed with autism. An incredibly late diagnosis due to my absolutely amazing ability to keep everything internal.. It has caused my countless headaches and heartaches over the years and its good to finally understand what it is thst makes me how I am...
I am also aware that IT goes hand in hand with autism due to our thought process being so 'logical' and our acceptance of failure is.... Er... Not the best. But we also have the stubborness/determination to keep going, learn what it is we did wrong and improve upon it.
So my question really is, are many of you on the spectrum also? If so, are there any coping strategies that you can share with me/everyone who reads this?
By coping I don't mean just dealing with it, but I mean in the workplace. I've never had a job formally in IT because I never did any qualifications in it. Rebuilt my first pc at age 7 and been hooked since.
I have always been a mechanic because again, logic reasons.
I'm currently in contact with an organisation here in Norway called 'Unicus' who are specialised in employing people on the spectrum, specifically in the IT sector... Have any of you heard of them? They seem promising to me
Thanks for reading guys and please feel free to delete this if this really isn't the place for it, I just feel that within this community there are more of us and I would like to open the door for communication16