AboutI'm a fast typer and a slow eater. I enjoy long walks off short piers. I am the Florida Man.
LocationAmerica (38.8976074, -77.0365946)
Joined devRant on 1/8/2017
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
We got DDoS attacked by some spam bot crawler thing.
Higher ups called a meeting so that one of our seniors could present ways to mitigate these attacks.
- If a custom, "obscure" header is missing (from api endpoints), send back a basic HTTP challenge. Deny all credentials.
- Some basic implementation of rate limiting on the web server
We can't implement DDoS protection at the network level because "we don't even have the new load balancer yet and we've been waiting on that for what... Two years now?" (See: spineless managers don't make the lazy network guys do anything)
So now we implement security through obscurity and DDoS protection... Using the very same machines that are supposed to be protected from DDoS attacks.18
My boss. Always forgets what he assigned me to do and assigns me to do something different just about each time we meet1
Okay c/c++ megaminds, I have a question about how something is generally designed that I feel like is too broad for SO or to be effectively Googled (though my Google-Jitsu may just be a tad weak, idk)
Lets say I have, for example, a simple graphical interface system where each widget/ control may have child controls. We could store it as a simple list/ array/ vector/ whatever - say Widget.children
Now these children could be added with a function like addChild(Widget*). This function would accept widgets allocated both on the stack and on the heap... but only widgets allocated on the heap would need to be freed.
My question is: on the destructor of the parent widget, how would it free all of its child widgets, if some are on the stack and some are on the heap and we don't know which is which...
And my broader question is what's the general design for this sort of thing? Should all items just be heap allocated always? Should it never be the responsibility of the parent widget to free the child widgets?9
This is not a joke. This is not something I wrote to be funny. This is not found randomly off the internet. This is a real part of the project I inherited: a function that not only is more cumbersome to use than the simple <Array>.contains that it wraps, but rather than returning the boolean result from the function, sends it through an if statement and returns hardcoded true and false values for... Good luck? I guess?37
Ever had your computer give up on you?
I have a pretty slow work desktop and I restarted it and clicked the start menu button for outlook.
It froze for a second, and after trying for about five seconds, it just REMOVED THE BUTTON from under my mouse?? As if to say "nah, I quit". Seriously??6
I was limited to how much time a day I could play video games, but I was told that if I made my own games I could play them as much as I wanted.
I took an HTML course on Codeacademy unaware that it had nothing to do with game dev and that's where it all started.2
Firefox faceslapped me with a UI change this morning. Looks like the default CSS is changed too. Outlines are not dashed boxes but solid dark blue lines. I feel weird.5
Interesting fact: Dogecoin is popular because of a Reddit bot that stole everyone's money.
DogeTipBot, a Reddit bot that was designed as a 3rd party resource for tipping Reddit users for good content was a bot that used Dogecoin as a micro-tipping service, giving many users their first crypto experience and popularizing the coin.
The creator of DogeTipBot went bankrupt, sold all of his coins, AND all of the coins of his users, and shut down the bot.
A currency born as a joke, made intentionally as backwards as possible, and popularized by a scam, is now worth $50 billion USD... now that's a meme.18
Dogecoin hit USD $0.40 recently, which means it's time for the Crypto Rant.
TL;DR: Dogecoin is shit and is logically guaranteed to eventually fall unless it is fundamentally changed.
If you know how Crypto works under the hood, you can skip to the next section. If you don't, here's the general xyz-coin formula:
Money is sent via transactions, which are validated by *anybody*.
Since transactions are validated by anybody, the system needs to make sure you're not fucking it up on purpose.
The current idea (that most coins use today) is called proof-of-work. In short, you're given an extremely difficult task, and the general idea is you wouldn't be willing to do that work if you were just going to fuck up the system.
For validating these transactions, you are rewarded twofold:
1) You are given a fixed-size prize of the currency from the system itself. This is how new currency is introduced, or "minted" if you prefer.
2) You are given variable-size and user-determined prize called "transaction fees", but it could be more accurately called a "bribe" since it's sole purpose is to entice miners to add YOUR transaction to their block.
This system of validation and reward is called mining.
This smaller section compares the design o f BTC to Dogecoin - which will lead to my final argument
In BTC, the time between blocks (chunks of data which record transactions and are added to the chain, hence blockchain) is ten minutes. Every ten minutes, BTC transactions are validated and new Bitcoins are born.
In Dogecoin, the time between blocks is only one minute. In Theory, this means that mining Dogecoin is about ten times easier, because the system expects you to be able to solve the proof of work in an average of one minute.
The huge difference between BTC and Doge is the block reward (Fixed amount; new coins minted). The block reward for BTC is somewhat complicated compared to Doge: It started as 50 BTC per block and every 4 years it is halved ("the great halving"). Right now it's 6.25 BTC per block. Soon, the block reward will be almost nothing until BTC hits it's max of 21 million bitcoins "minted".
Dogecoin reward is 10,000 coins per block. And it will be that way for the end of time - no maximum, no great halving. And remember, for every 1 BTC block mined, 10 Doge blocks are mined.
Bitcoin and Dogecoin are now the two most popular coins in pop culture. What makes me angry is the widespread misunderstanding of the differences between the two. It is likely that most investors buy Dogecoin thinking they're getting in "early" because it's so cheap. They think it's cheap because it isn't as popular as Bitcoin yet. They're wrong. It's cheap because of what's outlined in section two of this rant.
Dogecoin is actually not very far off Bitcoin. Do the math: there's a bit over 100 billion Dogecoin in circulation (130b). There's about 20 million BTC. Calculate their total CURRENT values:
130b * $0.40 = 52b
20m * $60k = 1.2t
...and Doge is rising much, much faster than BTC because of the aforementioned lack of understanding.
The most common thing I hear about Doge is that "nobody expects it to reach Bitcoin levels" (referring to being worth 60k a fucking coin). They don't realize that if Doge gets to be worth just $10 a coin, it will not just reach Bitcoin levels but overtake Bitcoin in value ($1.3T).
It's worth highlighting that Dogecoin is literally designed to fail. Since it lacks a cap on new coins being introduced, it's just simple math that no matter how much Doge rises, it will eventually be worthless. And it won't take centuries, remember that 100k new Doge are mined EVERY TEN MINUTES. 1,440 minutes in a day * 10K per minute is 14.4 million new coins per day. That's damn near every Bitcoin to ever exist mined every day in Dogecoin9
Today, implemented Binary Tree from scratch and then wrote a unit testing suite from scratch in my personal project.
Oops accidentally created this Angular component in the wrong directory. Better run the Ng command to remove the component so I don't need to remove the files and references in app.module.ts otherwise it would take an annoying amount of time to track down the right lines there and it also opens the door to human error!
I have a discord server where I'm writing the bot. I'm making games, utilities and other activities.
It's a very small server because I have not been actively recruiting players, but if you would like to join, here is the link. I would be happy to make some devRant commands and integrations.
Right now, we have Blackjack, connect 4, crossword, and trivia. There's also a "stock market" where you buy shares of other players (rather than stocks).
It's early. There's some stuff to do but I'll admit, not a ton just yet. Maybe a few bugs, testing team is considerably small. But it is good fun and I am actively working on it. Maybe join and play while you're "working" from home :)5
Fucking MySQL workbench won't even tell me what's wrong with my PL/SQL script. It has no output whatsoever. I click the run button and its like "y'all say sum?"
Why are all tools for SQL development so shit. All the time.5
Jesus Christ, how did that even get past QA. Non-resizable widget that nobody asked for where the text doesn't even fucking fit.. and that's not devRant compression... the text is fucking blurry for some reason????11
It's always two tokens. Not one. It's NOT like python's "elif".
It's ALWAYS chaining an additional and DISTINCT if statement in the else clause of the first. It is NOT creating multiple comparison paths in the same if statement as it would seem.
else if(b) console.log(b);
Simply needs more proper indentation to show which "if" the "else" actually belongs to:
else console.log (c);10
The debugging process is often complicated.
There are often many factors involved in troubleshooting an error, but usually I have a hunch.
Sometimes I'll ignore my hunch and try other, smaller fixes first. This will irritate me for a while until I actually go after my hunch, run the program, and INSTANTLY everything works again.
Found myself relating that to real life today when I had a slight belly ache and eventually decided to take a massive shit and INSTANTLY felt better. The relief was so quick that I actually looked up and paused in surprise.3
Pulled my hair out over one today (and a week ago when I first saw the issue)
Setting up development environment. Created test user and test database and used mysqldump to copy data over.
MySQL was executing a function as the wrong user. Checked my config files, checked my config reader, checked my database connection, checked checked checked. Checked everything twice, I felt like Santa.
Changed the password in the config file to make sure it was logging in right. It threw an error still but not one I had expected so I figured the login still worked (My bias was that I thought the config file was not working or the mysql library was caching authentication. Both were wrong but this blinded my debugging. Foolish, I have forgotten my training)
Logged into the database directly via client. *didn't bother executing the function because I was only testing auth*
Search entire project for database username. It's gotta be hard coded by accident SOMEWHERE.
-- Flashback to how the test db was created -- What's actually in this damn script?
DEFINER `production_user` CREATE PROCEDURE `old_db`.`procedure_name`
Two issues: definer is old user (this is the error I was seeing) and its creating the procedure on the old db (this would be the next error I would have found if I kept going)
Fuck mysqldump. Install mysqldbcopy. Works
Put hair back in head.
Broke: logging into GitHub to pull changes from a private repo
Woke: changing the repo from private to public, pulling unauthenticated, and then changing back to private.