Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "k-means"
My boss is technically restricted shall we say.
As the cto I have also been designated office IT guy. Which means apparently fixing the printer. Which is ok I guess. I mean it's bullsh*t but hey.
Anyway, about 6 months ago he said he needed a new laptop. He lives his life in excel and outlook, and even though the whole company uses google docs for everything he still exports everything to excel, makes a copy, then saves it back to drive so everything gets out of sync.
It's a fun problem that I have banned everyone from doing obviously but he continues.
Anyway, anyway, he wanted a new windows laptop naturally. I said to spend about £700 on a decent machine rather than buying something cheap that will frustrate and not last long.
He doesn't listen and gets some old windows 7 machine for £300. It's an alright spec for 2009; he must not have got the memo about it being 2017.
4 months go by and he says he needs a new laptop because this one is too slow (not least because he opens 400 chrome tabs and never reboots his machine). Anyway, I fix the problem of uninstalling all his bloatware and it runs quicker but he has his heart set on a new machine.
I suggest he spend the money this time so he literally doesn't buy a new one in 4 months. I suggest the surface book that's £1200. A little overpriced but he will love the touch screen, it's powerful enough and it's windows. Ticks all the boxes for him.
He suddenly decides he wants a Mac.
I tell him it will be a nightmare for everyone if he does that.
I suggest the Mac book pro as I've had mine for 6 years now and it's still going strong. It's a little more expensive than the surface but it will last.
He then says he wants the air.
I say they haven't updated them in ages and they aren't actually that powerful.
That night he just buys an air from the Apple Store.
WHY THE FU*k ARE YOU ASKING ME FOR ADVICE IF YOURE NOT GOING TO LISTEN YOU MOTHERFUC*er. WASTING MY TIME AND YOURS.
Was very close to rage quitting when he wanted me to back up his old machine but didn't bring in his hard drive and didn't want to put it in the cloud. #whatDoYouWantMeToDoWithYourOldPornCollection
To top it all off I ran some benchmarks and my 6 year old Mac book pro is more powerful than his "brand new" air.27
Actual email I just sent to a customer:
"I logged into your account and I see the problem. I will update you and have it fixed either by tonight or tomorrow morning. It is a rare bug we have encountered before, and we are working on it as you read this. "
"Im fucking drunk right now. I know that error. I put off fixing it for awhile now hoping it wouldn't come up because it's fucking annoying to fix. I'll try to fix it tomorrow morning, k no promises though. If I can't I'll still have your problem taken cats of it just means I'll have to do it manually. Anyway.. Gonna drink some more now, bye. "
P. S. There is no we. It's just me. K bye.4
I don't understand people who write "Fu*k" instead of "Fuck", dude everyone know what's that means anyway and you definitely not going to become a Honorable man or you will go to heaven by doing this. Seriously.12
))| THE BEST AND WORST WAY|((
))| TO DELETE A LINE IN BASH |((
(Think you can do better? Vote
now on your phones!)
WORST: Hold backspace until satisfied
BEST: Using a pen or other pointing device capable of causing semi or permanent damage to your screen, count how many characters the line in question consists of. Write this down on a piece of paper (after all, your terminal is occupied) and using long division, or any other means, divide this number by two, rounding as you please. Press the "right arrow" key as many times as necessary to reach the end of the line. This might be 0 - if so, congratulations, you may skip this step! Once complete, refer to your piece of paper, and taking your newly calculated number, press the "left arrow" key exactly that many times. If you have a short attention span or are worried you will lose count, take a tally or use some other primitive count recording method. Once the key has been pressed the correct number of times, hold down either control key on your keyboard and take a deep breath - there's no going back now (!) - press the "k" key (you should still be holding a control key!) and take a sigh of relief. You're halfway there! If you need a break, take one. When you're ready to finish the task, hold a control key again and take another deep breath. When you are ready to complete the task (don't hold your breath too long!) press the "w" key. Congratulations!! Your line has been deleted!! Some may call you a fucking idiot for not just pressing ctrl-w at the start, but don't listen to those people! They probably delete stuff by accident all the time! Now, take a lie down, and give a moment's silence for the poor poor line you just brutally dissected and murdered.
Think you can do better? Vote now on your phones!9
I'm a C++/Obj-C programmer finding it ludicrously hard to switch to Swift.
I find that the constant ability (leading to very poor programmer code) to reduce syntax and add tokens reduces readability and nowhere is this more apparent that with closures.
I'm working through (to my shame) Ray Wenderlich's Swift course and the closure chapter has this:
PS I loathe K&R as much as I do Swift so it's all in Allman formatting for clarity.
let multiply: (Int, Int) -> Int =
(a: Int, b: Int) -> Int in
// do Something else
return a * b
Why oh why isn't this more simply and elegantly written as:
let multiply = (a: Int, b: Int) -> Int
// do Something else
return a * b
The equals sign shows clearly that it's a closure definition assignment, as does the starting 'let'. But this way all of the stupid excesses, like the 'in' keyword, the repetition of the params / return type only this time with useful labels and additional tokens are removed and it looks and reads much more like a regular function and certainly a lot more clearly.
Now I know that with the stupid ability of Swift you can reduce all this down to return $0 * $1, but the point I'm making is that a) that's not as clear and more importantly b) if this closure does something more than just one line of code, then all that complicated stuff - hinted to by the comment '// do Something else' means you can't reduce it to stupid tokens.
So, when you have a clousure that has a lot of stuff going on and you can't reduce it to stupid minimalism, then why isn't is formatted and syntactically better like the suggestion above?
I've mentioned this on the Swift.org (and got banned for criticising Swift) but the suggestions they came up with were 'use type inference' to remove the first set of params / return type and token.
But that still means the param list and return type are NOT on the same line as the declaration and you still need the stupid 'in' keyword!5
I went to a machine learning meet up.. I asked every one over there to explain me K-means algorithm. I got K different answers, then I applied K-means algorithm on K different answers to form K clusters..1
Reading the internets in 2020, I've seen an increase in the usage of the term "Orwellian." It has led to many Inigo-Montoya moments.3
oh microsoft... never change. In EVERY OTHER desktop app I use cmd-K means add a link. Except Outlook for Mac where apparently it means "Send/Receive".2
Just finished my finals.
Had to run k-means with pen and paper only. I find this kind of question stupid but why not. BUT WHY THE FUCK DID YOU CHOSE SOME INITIALIZATION THAT TAKES 13(!!!!) FUCKING ITERATIONS TO CONVERGE ? Just in case my first 12 iterations are correct by chance ? Guess what, you fucktard, I GOT IT.
And doing the same calculus by hand 13 FUCKING TIMES is moronic as hell, you retarded piece of shit ! When you train your neural networks, do you also backpropagate your gradient all by yourself, mongoloid baboon? Getting sick of those stupid assignements1