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
Search - "algorithm"
-
Friend: "What is devRant?"
Me: "A place where programmers tell jokes and complain."
Friend: "Why dont you just do that irl?"
Me: "Because we never test in production"15 -
Friend texted me some binary.
Decided to impress him and decode it by hand.
Spent 5 minutes decoding "I eat ass".6 -
So a few days ago I felt pretty h*ckin professional.
I'm an intern and my job was to get the last 2003 server off the racks (It's a government job, so it's a wonder we only have one 2003 server left). The problem being that the service running on that server cannot just be placed on a new OS. It's some custom engineering document server that was built in 2003 on a 1995 tech stack and it had been abandoned for so long that it was apparently lost to time with no hope of recovery.
"Please redesign the system. Use a modern tech stack. Have at it, she's your project, do as you wish."
Music to my ears.
First challenge is getting the data off the old server. It's a 1995 .mdb file, so the most recent version of Access that would be able to open it is 2010.
Option two: There's an "export" button that literally just vomits all 16,644 records into a tab-delimited text file. Since this option didn't require scavenging up an old version of Access, I wrote a Python script to just read the export file.
And something like 30% of the records were invalid. Why? Well, one of the fields allowed for newline characters. This was an issue because records were separated by newline. So any record with a field containing newline became invalid.
Although, this did not stop me. Not even close. I figured it out and fixed it in about 10 minutes. All records read into the program without issue.
Next for designing the database. My stack is MySQL and NodeJS, which my supervisors approved of. There was a lot of data that looked like it would fit into an integer, but one or two odd records would have something like "1050b" which mean that just a few items prevented me from having as slick of a database design as I wanted. I designed the tables, about 18 columns per record, mostly varchar(64).
Next challenge was putting the exported data into the database. At first I thought of doing it record by record from my python script. Connect to the MySQL server and just iterate over all the data I had. But what I ended up actually doing was generating a .sql file and running that on the server. This took a few tries thanks to a lot of inconsistencies in the data, but eventually, I got all 16k records in the new database and I had never been so happy.
The next two hours were very productive, designing a front end which was very clean. I had just enough time to design a rough prototype that works totally off ajax requests. I want to keep it that way so that other services can contact this data, as it may be useful to have an engineering data API.
Anyways, that was my win story of the week. I was handed a challenge; an old, decaying server full of important data, and despite the hitches one might expect from archaic data, I was able to rescue every byte. I will probably be presenting my prototype to the higher ups in Engineering sometime this week.
Happy Algo!8 -
Proud moment today when I actually made an hsv to rgb conversion algorithm by following a formula rather than copying code from stack overflow28
-
git blame
git fired
git depression
git divorce
git homeless
git commit
git job
git house
git wife --better
exit11 -
I came up with a single pass O(n) sort algorithm I call StalinSort. U iterate down the list of elements checking if they are in order. Any element which is out of order is eliminated. At the end u have a sorted list.
@mathew@mastodon.social11 -
The cool thing about side projects is you can do whatever you want.
The shitty thing is you never complete whatever you want.7 -
CS Teacher: *provides shitty code written in (I kid you FUCKING NOT) Microsoft Word, sans font*
Me: *Submits beautiful, fully working and commented code*
Half a point off because I didnt write how many points the assignment was worth at the very top of the code.
ARE YOU FUCKING KIDDING ME YOU CUNT GOBBLER?! YOU JUST **HAD** TO TAKE THAT HALF A POINT OFF, DIDNT YOU? MAYBE YOU'RE INTIMIDATED BY THE FACT I DONT USE MICROSOFT WORD TO WRITE C++?? God, I hope you take a nail gun to the eye.16 -
Algorithm: from the Greek "algos" (pain) and rhythmos (repetition), we derive the true meaning of this word: REPEATED PAIN.
:D5 -
Had two choices: shut down and update, or shut down.
Clicked shut down.
Working on updates, 30% complete.
Cunts. Why did you even ask.10 -
dfox please put in a "support us" feature of some sort that lets us watch ads of our own free will. I hate using your resources while not working for it at all.46
-
I was googling what happens when an ambulance gets stuck in traffic, but was reminded that I am a dev...11
-
Pi Project
It's pinging Google and measuring the response time every three seconds, then graphs the result on the LED SenseHat. It's graphing wifi stability.13 -
SO GUESS WHAT
IF YOUR SHITTY WIFI CRAPS OUT DURING A VISUAL STUDIO UPDATE, VISUAL STUDIO FUCKING COMMITS SUICIDE
MICROSOFT CAN SUCK A BIG, VEINY COCK. IM SO DONE WITH THEIR SENSITIVE, CONVOLUTED, SLOW IDE.21 -
There are two things about arrays that sometimes confuse me:
[0]: They start at zero
[1]: They end at one less than the length15 -
Progress on my UWP file explorer! Here's some screenshots. I really enjoy the Acrylic material, and my favorite page is the "There's nothing here" page because it came out EXACTLY as I wanted it. More images in the comments!34
-
In a previous rant I said I was gonna flip some bits. I couldn't wait until the weekend. I flipped some fucking bits, right fuckin now.17
-
A story of love, loss, and devRant.
My favorite sunglasses were a victim of hurricane Irma. They were sitting on the park bench when a powerful gust of wind blew them onto the cement floor, where both lenses were fucked right where I look out of them. I bought these sunglasses at Disney with my family and have not stopped wearing them since. I was pretty upset.
Enter devRant. Sad and without sunglasses, I hoped that virtual ones might suffice. Lo and fucking behold, in the profile editor, there they were: my exact sunglasses, even with the choice between silver and gold. Absolutely fucking perfect. Made my day.10 -
People on Stack Overflow are SUCH FUCKING ASSHOLES
"You didn't show us where you declared this unimportant array, please review this article for how to ask questions"
My question doesn't concern the array, my question concerns how the system works, all code I provided was only for clarity. Read my fucking question you arrogant asshole. You have lots of points, fine, go tell your mother, but you assume I don't know how to ask a question which you clearly did not read.9 -
"Fuck JavaScript, its such a shitty language" seems to be quite a common rant today. It seems as if JS is actually getting more hate than PHP, which is certainly odd, considering the stereotype.
So, as someone who has spent a lot of time in JS and a lot of time elsewhere, here are my views. Please, discuss your opinions with me as well. I am genuinely interested in an intelligent conversation about this topic.
So here's my background: learned HTML/CSS/JS in that order when I was 12 because I liked computers. I was pretty shitty at JS until U was at least 15, but you get the point, Ive had it sploshing about in my brain for a while.
Now, JS certainly has its quirks, no doubt, but theres nothing about the language itself that I would say makes it shitty. Its a very easy leanguage to use, but isn't overdeveloped like VB.net (Or, as I like to call it, TheresAFunctionForThat)
Most of the hate is centered around JS being used for a very broad range of systems. I doubt JS would be in the rant feed so often if it were to stay in its native ecosystem of web browsers. JS can be used in server backend, web frontent, desktop and mobile applications, and even in some system services (Although this isn't very popular as of yet). People seem to be terrified that one very easy to learn language can go so far. And, oh god, its interpreted... How can a system app run off an interpreted language? That's absurd.
My opinion on JSEverything is that it's progress. Thats what we're all about, right? The technologies already in place are unthreatened by JS, it isn't a gamechanger. The only thing JS integration is doing is making tedius and simple tasks easier. Big companies with large systems aren't going to jump ship and migrate to JS. A startup, however, could save a fucking ton of development time by using a JS framework, however. I want to live in a world where startups can become the next Google, because technology will stagnate when youre trying to protect your fortune, (Look at Apple for fucks sake) but innovation is born of small people with big ideas.
I have a feeling the hate for JS is coming from fear of abandoning what you're already doing. You don't have to do that. JS is only another option (And a very good one, which is why it's becoming so popular).
As for my personal opinion from my experiences... I've left this part til the end on purpose. I love programming and learning and creating, so I've never hated a lamguage, really. It all depends on what I want to do. In the times i've played arpund with JS, I've loved it. Very very easy. The idea of having it on both ends of web development makes a lot of sense too, no conversion, just direct communication. I would imagine this really helps with speed, as well. I wouldn't use it in a complicated system, though. Small things, medium size projects: perfect. Running a bank? No.
So what do you think about this JSUniverse?13 -
I've always wanted to experiment with encryption but never do. This weekend, I'm fucking doing it. Even if I'm just flipping a few bits around, I'm fucking gonna flip those bits like they've never been flipped before and they are gonna FUCKING LIKE IT.4
-
Interesting thing I did yesterday:
This is a program which loops over every word in the wamerican word database and checks if the username is available on the Mojang servers, thus, this is a Minecraft OG username finder, and it works beautifully.
I'm checking 72,000 words, the only thing is I can only check one per second, so the entire process takes about 20 hours. Any usernames which are available are sent into a text file for later viewing, and it remembers which word it looked at last if you can't have your computer on for 20 hours straight.
Very happy! Found quite a few good names so far!14 -
The devRant community:
@dfox: Our lord and savior, a rockstar who gets his comments ++'d just for being dfox
@trogus: The designer who lives in the shadow of dfox, but is still beloved
@tisaconundrum: Has 1 ++ for every time someone has tried, and failed, to pronounce his username in their head. (It's a lot)
@letmecode: The most consistently angry rants
@calmyourtities: I see him a lot
@me: I get mentioned every time the google assistant makes the "algo-rhythm" joke
@linux, @linuxxx, and @linuxforfun are linux users.
Continue in the comments!60 -
Websites got ads, so user got adblock, and thus, websites got adblockblock and users got adblockblockblock and websites got adblockblockblockblock and users got adblockblockblockblockblock and websites got ad blockblockblockblockblockblock and users got adblockblockblockblock blockblockblockblockblockblock and websites...20
-
If I keep ignoring issues they'll eventually overflow and I'll have a negative amount of bugs, right?4
-
Dabbling in 3D modeling, I noticed the top of one of these fireworks has polygons visible while the others are shaded smoothly. Good job, Clash of Clans...11
-
I spent three hours coding some algorithm and then looked it up on Stack Overflow out of curiosity. Big surprise. Someone did the exact same thing but more effeciently, and had all the code in his answer on SO.
Ughhhhhhhh 😓4 -
After a long time in .NET and JavaScript, I have returned to Java today. I was quite happy about it for a few minutes!3
-
I always use brackets for clarity even if there is only one statement inside them
if (boolean){
function ();
}
Cus it's so much easier to read, and if I need to add statements after the if I don't need to remember to add brackets. Plus the else may need brackets and an if with no brackets but an else with brackets looks awful.14 -
Seeing someone prototype a 3D game with complex lighting using OpenGL in a 15 minute video (It was sped up about 4x but, still, fuck me)
Using c. Not c++.
He also did 3D graphics in BASIC from scratch to explain how they work, generally.15 -
"I thought you were supposed to be good with computers"...
Yeah, let me just pull my fucking printer fixing degree out of my crusty asshole so you can bitch more about some other technology that I almost never use but assume I can just immediately fix just because I'm a dev
...mom2 -
Me: *Has 3 difficult exams to study for and hours of work*
Also me: I should try my hand at encryption in Python.7 -
This one hits home a bit.
So my friend from my first college hits me up, asks about what's going on and shit. It's all chill, we took a bunch of programming classes together, so it we weren't intimate friends just kinda familiar with each other. He says he's having trouble finding work, they all turn him down due to a lack of experience. I suggest we work on a project together. Anything. He thinks it's a good idea and we plan to meet up.
We meet up, long story short decided on an Android app. I failed setting up git but whatever, I'll fix it at home. He seems excited, I'm excited...
...Never heard back from him again. Won't answer texts, Skype, anything.10 -
I have a co-worker that always uses "I'm too old" as an excuse.
You're 33. You're just a lazy piece of shit that doesn't take care of his body.
Fuck you, do work.7 -
Not sure if it was the missing spaces in the title, the text lingo and bad grammar in the description, or the clickbait-style graphic but I AM SOLD.5
-
Boils my fucking blood.
How many billions of dollars is Microsoft worth again? And they still make me update my fucking updater?
Why is there even a separate program for updating??18 -
I didnt make my root partition big enough fuuuuuuuuck
Stupid fucking tutorial said "10GB should be enough!"
Should have listened to myself. Fuck me.18 -
Like a bad relationship
Be really excited for the first month or so then once the new car smell starts to fade, lose interest and dump it.3 -
HURRICANE INSPIRED PI PROJECT!
So in anticipation of hurricane Irma I built this little thing which measures barometric pressure using my raspberry pi's sense hat! It also adds the data to a graph. Very fun!9 -
My first real "rant", okay...
So I decided today to hop back on the horse and open Android Studio for the first time in a couple months.
I decided I was going to make a random color generator. One of my favorite projects. Very excited.
Got all the layouts set up, and got a new color every tap with RGB and hex codes, too. Took more time to open Android Studio, really.
Excited with my speedy progress, I think "This'll be done in no time!". Text a friend and tell them what I'm up to. Shes very nice, wants the app. "As soon as I'm done". I expected that to be within the hour.
I want to be able to save the colors for future reference. Got the longClickListener set up just fine. Cute little toast pops up every time. Now I just need to save the color to a file.
Easy, just a semicolon-deliminated text file in my app's cache folder.
Three hours later, and my file still won't write any data. Friend has gone to sleep. Homework has gone undone. My hatred for Android is reborn.
Stay tuned, the adventure continues tomorrow...11 -
All right Bois, it's my first 3D model in years: a lamp post's base.
Jesus fuck this shit has a learning curve.15 -
Why do you wake up tired?? Isn't that what you go to bed to fix?! What the fuck kind of bullshit is this?!13
-
Scripting languages, markup languages, database querying languages, etc. Are all types of programming languages. A program is a set of instructions for a computer to follow.
HTML is a programming language, fight me.48 -
My PlayStation 1 has never needed an update, but these days, everything comes with an updater. Like, "oh, boy, my TV needs to update again". There's something wrong.50
-
When you can code thousands of lines but is lost of words when trying to communicate to humans how you did it.4
-
Since I have been working a LOT with terminal graphics lately, I made a really shit bitmap machine in JavaScript so I can draw bitmaps and get the int value instantly! Very proud of self, took 10 minutes between Overwatch games.8
-
Asked a question on stack overflow, immediately got an upvote. Maybe 2018 will be different after all.3
-
Was writing a comment with an unsmiley emoji
IDE auto-completed the open parenthesis.
I was surprised.
:()3 -
Me: *unsubscribes from Twitter emails*
Twitter: successfully unsubscribed! We're still gonna see you emails tho, lmaoo2 -
This spring I was working on a library for an algorithm class at uni with some friends and one of the algorithm was extremely slow, we were using Python to study graphs of roads on a map and a medium example took about 6-7h of commission to finish (I never actually waited for so long, so maybe more).
I got so pissed of for that code that I left the lab and went to eat. Once I got back I rewrote just the god-damned data structure we were using and the time got down to 300ms. Milliseconds!
Lessons learned:
- If you're pissed go take a walk and when you'll come back it will be much easier;
- Don't generalize to much a library, the data structure I write before was optimized for a different kind of usage and complete garbage for that last one;
- Never fucking use frozen sets in Python unless you really need them, they're so fricking slow!3 -
Got arch Linux working on my laptop.
Installed Budgie GNOME, Cairo dock, Termite, VS Code, Code::Blocks, Android Studio, IntelliJ....
It's so beautiful9 -
For all you meme lovers
namespace Improvise {
static class Adapt {
int Overcome;
}
}
Improvise.Adapt.Overcome2 -
Juste design a new algorithm to evaluate the chance of a project (any kind of project) will exceed the budget (time of cost). This algorithm been proven to be right almost all the time.1
-
Okay, sublime text is amazing. Super fast and easy on the eyes. If I had $70 I would purchase a license.20
-
Someone should write a really infectious virus for Linux to make all the fanboys shut the fuck up about security.11
-
Recently, Comcast limited my bandwidth to 1TB. I'd be upset, but my service is so slow I don't think I could use it all in just a month!7
-
Today, social media databases around the world will be forced to accept billions of shitty firework photos.1
-
I just experienced the opposite of rant.
I spent 1 entire day ranting about a algorithm I couldn't write with no issues, it occupied all my mind and got me pissed of.
And today, I rewrote it entirely, and it works perfectly everywhere.
I was like : "No it can't work here. Oh ok", "And here's the bug ! No ? Nice.", "Don't tell me it'll work here. I'm a God".
That's why I love being a dev :D
Thank you, you freaking problem I had !7 -
Not a rant about anything in particular. Just a summary of some feelings stored in the hateful part of my heart.
Developing for Android: Add this third-party library to your Gradle build. Use (this) built-in Android class to make the thing work.
*Clicks link
Deprecated since API version SUCKMYDICK-7. Use (this) instead
*Clicks link
Deprecated since API version LICKMYBALLS-32. Use...
Developing for Windows: Please use (this) API call. It was literally already available before Bill Gates was born. Carbon dating has placed this item to older than the universe itself and it is likely the entry point for the big bang. It is also still the best way to accomplish (task).
Developing for Linux: "Hmm, I wonder how to use this"
> > > Some shitty mailing list in small blue monospace font tells you to reference a man page that is three versions behind but the only version available.
What? Those three sentences didn't explain it enough? Well, maybe you aren't cut out for this type of thing.
JavaScript: you know how it is.
SQL: You expect a decent-quality answer from stack overflow but you always get an outdated and hacky response and it's using syntax from Microsoft SQL. You need MySQL.
C#: A surprising number of Microsoft forum results ranking high on Google. You click on one in hopes that it will be of any sort of quality. You quickly close the tab and wonder why you ever even had hope.
Literally any REST API: Is it "query" or "q"? "UserID" or "user_id"? Oh, fuck, where's the docs again?
You thought you escaped JavaScript, but it was a trick!: Some bullshit library you downloaded to make your other library work redefined one of the global variables in the project you inherited. Now you get 347 "<x> is not a function" errors in your console. Good luck, asshole.
FontAwesome/ Material fonts/ Any icon font pack: You search "Close" for a close button icon. No results. You search "Simplified railroad crossing sign without the railroad". You get a close icon.
I think that's all of my pent up rage. Each of them were too small for an individual rant so I had to do this essay.2 -
Spent two days debugging my algo to figure it was a problem with the colors they picked and my logic was fucking flawless!
Sweetest feeling ever :D
I'm sort of color blind so I never check colors and I'm really straight about it with everyone: I don't pick colors.
Its a rant with a happy ending :)6 -
Genuinely upset that I don't have wifi
Fuck Irma
Fuck this.
I can deal without a/c, not wifi.
Kill me.4 -
The worst part about using the computers at my school is that my $200 mechanical rgb programmable keyboard with macro keys is at home.6
-
uhh interesting, bing search engine algorithm open sourced.
Will anybody have a look at it?
https://techcrunch.com/2019/05/...6 -
Since everyone seems to be talking about getting places late, here's my not-so-significant story about my most recent interview.
So I was told that GPS probably wouldn't work. But the instructions that I got were not specific enough to guide me - something I learned only once I arrived in the general area that I was supposed to be in.
Ended up going one street too far and talking to the wrong front desk. They kindly gave me instructions to get to my destination.
These instructions were also wrong. They left out one step and viola, I'm at the gate of the sheriff dog training facility.
Turn 'er around and finally get on the correct road. My 20 minutes early turned into 10 minutes late, just like that.
They were understanding and I got the job.5 -
!rant
After reading the wiki page over and over, I was finally able to implement Dijkstra's algorithm 😃4 -
Is there a bug in the way it's decided which posts are displayed? This is on algorithm mode. There are a lot more 250++ posts below here with a couole of 1++ posts in between. And almost all of them I've seen before and ++d them23
-
my Input: want from A -> B
The algorithm of my Public transport App result:
Walk from A to B, then take the tram from B to A. From there you walk to B.
Ooooookay.3 -
Power-out inspired pi project!
Just a simple flashlight. Brightness and color can be controlled by the joystick. It runs off a phone battery pack7 -
Can anyone recommend good books for coding algorithms?
Any tips and tricks would also be helpful. Thanks.12 -
Computer science students and data scientists rejoice, "All algorithms" implemented in many common languages:
https://github.com/TheAlgorithms16 -
I know it's not done yet but OOOOOH boy I'm proud already.
Writing a JSON parser in Lua and MMMM it can parse arrays! It converts to valid Lua types, respects the different quotation marks, works with nested objects, and even is fault-tolerant to a degree (ignoring most invalid syntax)
Here's the JSON array I wrote to test, the call to my function, and another call to another function I wrote to pretty print the result. You can see the types are correctly parsed, and the indentation shows the nested structure! (You can see the auto-key re-start at 1)
Very proud. Just gotta make it work for key/value objects (curly bracket bois) and I'm golden! (Easier said than done. Also it's 3am so fuck, dude)15 -
A LOT of this article makes me fairly upset. (Second screenshot in comments). Sure, Java is difficult, especially as an introductory language, but fuck me, replace it with ANYTHING OTHER THAN JAVASCRIPT PLEASE. JavaScript is not a good language to learn from - it is cheaty and makes script kiddies, not programmers. Fuck, they went from a strong-typed, verbose language to a shit show where you can turn an integer into a function without so much as a peep from the interpreter.
And fUCK ME WHY NOT PYTHON?? It's a weak typed but dynamic language that FORCES good indentation and actually has ACCESS TO THE FILE SYSTEM instead of just the web APIs that don't let you do SHIT compared to what you SHOULD learn.
OH AND TO PUT THE ICING ON THE CAKE, the article was comparing hello worlds, and they did the whole Java thing right but used ALERT instead of CONSOLE.LOG for JavaScript??? Sure, you can communicate with the user that way too but if you're comparing the languages, write text to the console in both languages, don't write text to the console in Java and use the alert api in JavaScript.
Fuck you Stanford, I expected better you shitty cockmunchers.31 -
FUCK capitalist greed! I have befallen to their tricks once again. The daily dosage on my gummy vitamins was three a day but the total gummies in the container wasn't divisible by three so I had to buy three containers and eat one from each per day!21
-
For God sake tinder, fix your fucking algorithm.
Why are you showing my beautiful and out of my league girls. I don't want depression everytime I open tinder.
Please show me avarage looking girls.12 -
Dear management,
I require one vertical monitor for my JS, one vertical monitor for my HTML, one vertical monitor for my CSS, and two stacked ultrawide monitors for testing in browser.
Thanks,
Many loves,
Algo.17 -
I finally finished my implementation of a suffix array construction algorithm! 😄
It takes about 30 mins to process 1GB of text and uses all available RAM, but it works! 🎉
Now I can optimize it, the original algorithm is 3x faster.9 -
Works as backend developer for 2 years now; Almost fails simple university algorithm course.
I'm contemplating my whole life and career choice right about now.2 -
Algo algo1 = new Algo();
Algo algo2 = new Algo();
algo1.setOpacity(.5);
algo2.setOpacity(.5);
// The following image is ENTIRELY unedited:11 -
People who actually implement DRY: "Don't repeat yourself!"
People who "implement" DRY but are morons: "Don't repeat yourself, never say the same thing twice, and try not to be redundant."11 -
The Luhn algorithm implemented in cobol to validate Swedish personal identification number.
What do you think?9 -
My mind is crippled but I have always wanted to implement Dijkstra’s algorithm, in cobol. Solved by using adjacency matrix. What do you think?8
-
Reasons 1 and 2 arent that important to me. The main reason I code is #3.
1) Brain exercise. I always feel sharp after a coding session, even if it ended in disaster.
2) Lots to do! There's never a full day in code. Make your own universe, if you so desire.
3) Pride. I have a pride problem. I never felt proud of myself no matter what I do. I graduated with a melancholy feeling, same deal when getting my license, same deal when passing a test (God, glad that's over!)... But code makes me proud. I love what I make. I want to show everyone. I want to show it to everyone before it's even finished because I just can't wait. I want everyone to use it and to love it. Because I sure do, and it's the best thing ever.
I could make a viral video, produce a triple platinum record, or build a billion dollar business and still not feel the same level of genuine satisfaction and happiness that I may get from writing good code.
It always keeps me coming back. -
The code for some of the backend of my 100% custom media server in front of the blurred frontend of my media server. It just looks cool7
-
Historically, in operating rooms, surgeons would discard biomedical waste in buckets. When a patient died on the operating table, the lead surgeon would get so upset that he would "kick the bucket", which is now a term for when someone dies.
That's a fake fact, just like "Java runs on 4 billion devices"2 -
Caught a nice pair with the algorithm today...
Here's hoping your mornings were all something a little more in-between!1 -
I FREAKED OUT
I WAS A DIFFERENT PERSON FOR SOME REASON
Dfox thanks for the heart attack, I thought I got hacked.7 -
When you don't want to explain what you've done with application's code base so you play the "algorithm" card.
Boss: tell me about the new release.
Me: updated the search algorithms boss.
Boss: cool. Release!
Me: 😎 -
Lots of oof in one image.
I like how they had the audacity to say (and I fucking quote): "this is good news!"
I don't like to complain about sites generating revenue. I understand it is important and I even feel morally obligated not to use an adblocker. But all I will say is that the site has sustained itself for a very long time without the use of poor-quality and unrelated ads, and this feels like a lot more of a money grab than something the site actually requires.
Anyways, happy to see a -400 score on it. And I guess I can't wait to get Amazon ads on SO.7 -
Probably the last person to enter this, but fuck, it's done! Somewhat, but not totally inspired by this week's theme, I went to Ikea today and bought this brand-new beauty, along with a rug and small LED strip and OH. MY. GOD.
Technically didn't clean it off because it has never been dirty before. More pics in the comments. Holy shit I love it.8 -
after hours of trying to get the wifi working... Manjaro KDE is functional... and it's beautiful
Look at the blurred background behind the terminal! Magic!
Everything's so snappy... and the dark theme... I'm in love.4 -
I made a devRant bot!!
It's an anti-devRant bot bot that spams the notifications of devRant bots.
Just call @fuckbots <bot name> <message to have the attacked bot execute>
@fuckbots doesn't have a blacklist, so once all other bots have been defeated, I will call @fuckbots fuckbots. It's a wonderful circle.12 -
We all know you can't "learn x programming language in a day" without travelling to the Arctic and catching a day that last half a year.
But what's the worst language to try and learn in a day?
I vote c++. Manual memory management, multiple inheritance, static compilation, operator overloading, and generally non-human syntax ( Like std::cout << "This is how you print!" << std::endl; ) make it a difficult one to attempt in a day.27 -
Writing some algorithm:
me: *codes for half an hour*
"hmm... isn't working... wait wtf this isn't right..."
me: *codes for an hour again*
"still not working hmmm... wait what no this isn't supposed to work..."
me: *codes for a few hours*
"still not working God damnit.... it's supposed to work now..."
me after another few hours: MOTHERFUCKER CAN YOU START FCKING WORKING FUUUUUUUUUUU1 -
We were going over man in the middle attacks today and I honestly just could not stop thinking about that SpongeBob episode where Squidward keeps intercepting the bubble messages between SpongeBob and Patrick and it was so dumb that I could not stop smiling.3
-
What the fuck happened? Yesterday I spent about an hour downloading ~40 files and after a restart they disappeared???20
-
According to Steam Stats, Ethiopia has downloaded 1.5 terabytes of games in the past 7 days. Madagascar has downloaded 5.2
China is in the lead with 79 PB, followed closely by America with 60.12 -
Depends. No one took for the job. VSCode is really good for web and Python. I use Visual Studio for c#, c++ and c. Jetbrains for Java stuff, including Android studio.
When writing SQL I usually use vendor-provided editors like MySQL Workbench. They're the tool made for the job.
Visual Studio Code is my generic editor thanks to it's easy-access terminal. Makes running anything a breeze.
It doesn't feel as snappy as other editors though and installing plugins just for intellisense to work can be annoying, which is why I use other tools for other workflows.
Generally, I avoid things like vim. Sorry, but I have a mouse AND a keyboard. Paid for em both, and I intend to use em. Sometimes I wanna find a setting in a menu and not fuck around with config files after googling what the right setting is called.
I used Sublime for a while, but never really got too into it. It's okay.1 -
I FUCKING HATE THE INSTAGRAM ALGORITHM FOR SUGGESTED POSTS TO EXPLORE.
You piece of shit; I have NEVER EVER looked at pictures of nature, but I get a shit load of suggested pictures of nature. Can't forget the time they spammed it with memes in a random language I can't read.
OH. AND LETS NOT FORGET YOUR TIMELINE ALGO. IT'S JUST AS SHITTY.
"Hmm. Let him see a picture posted a few minutes ago or one from a week ago? Fuck it, a week ago it is!"7 -
It's official. I'm making multiplayer Minesweeper.
There's a Trello board, Discord server, and GitHub repo.
Initial gamemodes will be singleplayer, public (like agar.io) and vs (2+ players, support for teams is planned).
My big idea besides that is to have interesting powerups you can buy or find, adding a component of luck and some exciting new rules to the game.
And I may even put ads on it and try to feed myself.14 -
Whenever I feel like too much of an idiot to be a developer, I go to settings and tap my device info 10 times.2
-
Last night tried to use VLC to rip DVDs for my home media server.
All three failed in some manner! What a waste of time! Trying HandBrake today.23 -
Well not bad for my first try eh? I implemented a std::vector-like container and it's about 4 times as fast as std::vector10
-
It has taught me to accept that I am frequently wrong. Not just when faced with code but with people too.
All the years of "It can't possibly be MY code that's wrong" which of course always turns into "Well, I guess it was my code..." Had helped me think critically in relationships, politics, and many other areas of my life.
Programming had actually heavily influenced my behavior and I would say it is largely for the better.
However, one negative effect it has had on me is that I am less of an optimist. Code is very "cause and effect". This means a lot of my life is "no surprises" and "you get what you give"
So I often feel like the most likely outcome is probably just the one that's gonna happen. There are no surprises, no miracles. Life is cause and effect.1 -
*Writes email*
*Reads over email*
*Reads over a second time*
*Skims over one last time*
*Sends*
*Goes to outbox*
*Reads what I just sent*
"Hope I didn't miss anything"2 -
Facebook's algorithm is so bad that I can't believe that. In the past few days I marked ~20 posts from the same person with the same/similar content as "Hide post - see fewer posts like this". And now, not that I see fewer of these posts, they are literally throwing all such posts of that person to my feed. I know that I can unfollow this person but I don't want to. I just want to filter out these specific posts (they are all the same, some link, image of an old black and white photo and some description).8
-
Hey Machine Learners and AI pips, whats the algorithm for detecting if a person is an asshole? :p11
-
When you spend a couple of hours considering how to change your implementation of Dijkstra's algorithm to be directional only to realise it already was
Fuck!
Self.setIntelligence(-1)3 -
So during a test I was to write an algo of binary search tree traversal and I got a zero....Why? Cause I wrote a recursive algorithm and also because I wrote "English" instead of pseudocode, which she thought is called algorithm and on showing her the exact same recursive Algo on various websites and books, she just declared all of them wrong1
-
There's this little, self-loathing sigh I do every time my program locks up because I forgot to iterate inside a while loop
-
"Pokemon Let's Go" review:
I knew it would be a very easy game, made to transition Pokemon Go players to the core series of games, but this game is just poorly thought out. The multiplayer was obviously an afterthought; there is no split-screen. When the other player goes off-screen, they are lost off camera. Player 2 cannot interact with anything: they cannot talk to people, collect items, or initiate battles (They walk right through Pokemon)
The game is too easy by design. You cannot fight wild Pokemon, so you end up having 6 Pokemon by the beginning of the game all at full health (And everything gets XP when you catch something, so most of your Pokemon will be up to level 6-10 by your first battles) and the opposition will only have one level 3-4 Pokemon.
This trend continues throughout the game.
The map is tiny. You could walk the whole thing in an hour. Even Gameboy Pokemon maps were larger.
I knew this going into it, but it only has gen 1, which means pretty much no Pokemon, and they're the ones that I'm bored of. Every shitty game starts with generation 1 pokemon then ever introduces anything else. I'm sick of pidgeys!
Plus the hefty price tag of $60 just makes this game not worth much, despite the hype they tried to give it. That's probably why they were to secretive about the gameplay before launch: they knew it was bad,6 -
Y'all know those classes where you get 100s on the assignments and understand the material, and participate in class discussions, but get low 50s on the tests?
yea. Fuck those classes.4 -
Just fixed an error that I seeked for a long time in my optimization algorithm.
Results are much worse now.
Feature it is.1 -
Written coding test, first question :
Form the minimum spanning tree of the given graph using Kruskals algorithm.
Plot twist : No weights given. Assume unweighted graph4 -
Has anybody noticed that "this" in JavaScript is sort of a pain in the ass to keep track of? It appears to have identity issues.22
-
A funny story I just remember while my code is compiling :
Back in high school, in Math, we were taught how algorithm works, and we made some exercises with practical examples.
I didn't know anything about it back then, so was curious. Was pretty fun, but one day, my teacher said that a IF is a loop. I said "no, this is a test" but she keeps saying that it was a loop, ignoring me (I dunno if she actually heard me) and no one actually noticed it as she repeated it several times (while I was saying that it's not). I just gave up trying to say it's wrong.8 -
Me trying to impress my girlfriend with the light painting.
Motivated me to develop my own algorithm for the effect.joke/meme algorithms camera light light painting algorithm image algorithms painting love images image google4 -
I think God is a developer. I have to say a most impressive feat, even for God, is the idiot algorithm. It has persisted through millennia of attempts to remove it, but it just keeps refining itself. While it's incredibly brief, its functions are yet to find an environment in which they cannot operate. It's full adaptable to any task, impressively modular, and self replicating.
No matter how what problem you present it with the idiot algorithm can always find a solution. It never leaves well enough alone. It can even give you an answer before everything is fully processed!4 -
Here's some screenshots of my c++ learning project, CursesWidgets! (Or ConsoleWidgets, it's officially just named "CW")
Just got layout managers done - pretty nice step forwards since now widgets don't need to render their children themselves; they can (and by default DO) delegate the work to a layout manager.
Here are the StackingLayoutManagers, which are the equivalent of WPF StackPanels or just the normal way HTML works. They have different orientations, however, and will soon have different alignments (Start, Middle, and End, which is the same thing as the typical Top, Middle, Bottom, Left, Center, Right, except SME can be used for either horizontal or vertical alignments)
Anyways, enough of my rambling. Here are some screenshots. If you made it this far you earned the knowledge that I plan to make a beastly terminal devRant client using this technology.3 -
I love how odd very intelligent things can (seem to) be. Cryptography is incredibly complex, and the reason the computer was created in the first place. But that doesn't stop them from being all
"Heyyyy, y'all got any of them P R I M E N U M B E R S? We like em BIG, we'll paaaaay"3 -
Anyone played Human Resource Machine yet? It's fun to solve and optimize these algorithm puzzles after a hard work day.
Does anyone know other games like this?5 -
We have phonetic alphabets to clearly describe spellings (d as in Delta, etc.)
What's your best misleading phonetic alphabets? I'll start:
P as in pneumonia
H as in honest18 -
Do you guys find yourself ignoring things you should be using just because you're too stubborn to learn how they work? Because I just used std::shared_ptr for the first time today.1
-
SELECT * FROM PEOPLE WHERE GIRLFRIEND = 'Y';
> 0 rows returned
*Sigh*
SELECT VIDEO FROM WEBSITES WHERE URL LIKE '%hub%';20 -
While I know I can save a few characters, I think that
if(username.length > 0 && password.length > 0)
looks a lot nicer than just
if(username.length && password.length)
However, I am so lazy that I will probably always use the uglier version just to save like 0.00001 seconds typing.17 -
One of my favorite things to do in Secondary School was to go around telling people I had written a program that uses the 'Doomsday Algorithm' which sounded really cool and always scared those who didn't understand it.
Truth is, the 'Doomsday Algorithm' is just an Algorithm that used to determine the Day of the Week of a given date.
I wrote this when I was 13/14 years old and I'm still super proud of it today.... well I mean I probably would be if I could read my own code.1 -
Guess I asked for it by joining the Windows Insider fast lane but my desktop background has disappeared :((3
-
Dear Windows,
Why can't you FUCKING remember my choice to "Open folder to view files"? WHY BOTHER asking every single time I plug in a USB if you can't be fucked to remember what I say?? Why is this even an issue?3 -
I'm getting caught up on my personal project because I need to generate a lot of Dynamic HTML using JS and it's just a pain. I hate adding dependencies to a project, especially personal projects with no deadlines, so tomorrow I will be writing a vanilla templating system, and hopefully that will un-funk me.3
-
I’m really liking the Algorithm Design Manual so far, except for the fact that there’s not a glossary somewhere for “random mathematical symbols you have probably never had to deal with but we will use in psuedocode examples”1
-
Facebook don’t give a single fuck if you have a million years of experience, you’re going to fucking solve the “algorithm” shit —while they still admit you won’t remember much about it.
The HR guy was damn straight about it: you have to practice a lot.
Bitch, I’m out.11 -
I’m stressing out man. I can look at let’s just say a sorting algorithm for now. I can look at that insertion sort and I can understand what’s happening, but if you were to tell me I was supposed to be able to write that just based off a description I couldn’t. I need to be able to design and understand algorithms but I don’t know where or how to start. There was some course I was gonna try and see what that does. I put aside JS completely to focus on C# but I’m just stressing out over here. I learned the basics of C# although I feel like I’m learning it wrong but I’m moving on to SQLite and it’s my first Database experience and it’s confusing me and I also don’t know how I’m going to be able to use it for my future applications yet I’m just expecting too much out of me idk I love programming but sometimes it’s a cruel mistress13
-
This is more of a story than a rant, but it has some rant-ey elements, so whetever...
I work for a pretty big company. Several departments, teams, many different markets...so it's a big orchestration. The programming department (aprox. 5% of all employees) is the core of the whole company, because everybody else uses software we've written...(a bit off topic, the point is there are a lot of people)
So today, I got assigned with a side-project. The project spec arrives, and as I read through it, I start realizing that upper-management whats me to build an app to fire people instead for them. The app is supposed to track salary, connect with Trello (for departments that use it) to track finished tasks, track sick days, work attendence...a lot of stuff, and at the end, if the situation requires, spit out a person that is of least benefit to the company, to be fired...
Now from coding perspective, this will be very interesting and fun to build, but from a moral standpoint, I'm a bit woried...simply because, indirectly, I'm firing those people. Because, the way I tune the the app(specifically the algorithm that weighs the value of an employee to the company) will cause certain people to get fired...
So I'm woried I'm gonna have a small breakdown when the app goes live and I see someone saying goodbye to theie colegues of something similar...heck, the app might even spit out my name some day(I should probably add a tiny if statement somewhere in there :) )
What do you guys think about this, from a moral standpoint? Would you be okay with building something like this?
(Sorry for the long post :/ )8 -
Has anyone else worked in business environments and found... em.. "wannabe-tech decisions?"
For example, naming stuff with shortened words and underscores instead of spaces.... for no real reason? Or maybe using the word "database" a little too often, just to use the word? (similar to the way you might call someone by name, only to confirm to them that you have learned their name?)
It doesn't actually bother me, rather, I think it's a bit cute that these people are interested in our culture and want to be a part of it, even if it's in sort of silly ways like this.4 -
Spent a good minute figuring it out, but ES modules are pretty great. Using Node.JS 13 (and the --no-warnings flag) I can use the exact same file on both client and server. Wonderful!2
-
The moment you beat seniors solving complex algorithm challenge....
Actually what I did was I split the challenge into smaller piece and posted the miniature on stackoverlfow. 2 minutes later I stood in front of everyone explaining my solution. -
deep thoughts on algorithm design final exam ...
He wanted to make sure we fully understood the idea. :)
No idea about my score -
The worst realtime coding you'll ever see.."Require efficient.... correction normal shipping/delivery algorithm"1
-
Anyone else notice that the error checking in Visual Studio sucks sometimes? I'll see the error pop up in the editor, read what it's complaining about, double check all the code, think for a minute, get confused about it, comment out some stuff - wait no, it wasn't that, uncomment it....
then save the file and it rescans. Boom, error gone. It was just a phantom error wasting my time.3 -
Few days back, I developed an app for a client where users can buy textile designs online.
The designs to be uploaded on the server must be square to display correctly on the app. so I had to make them square manually (by either pattern repetition or by filling extra space).
I was like "fuck me!", 800 design image to make it square and each takes like 1 and half minute. I did uploaded 30 to 40 images and then...
I got really frustrated and I was lazy to make more designs square anymore.. So I developed an algorithm that would identify the type of design and then it automatically makes it square by self decision.
so that was my little anti-laziness for my big laziness. -
Another GeeksForGeeks rant
Wisecrack got me a bit interested in primes (just a passing interest). I looked up their python implementation of "Sieve of Atkin". Wow, is it bad.
First of all, they use PascalCase instead of underscore_natation so that's points off right there.
Their function takes a limit as a parameter (pretty obviously).
Their program breaks if you pass a prime number as a limit. That's right, if you give it a 2, it breaks. Pretty pathetic.
Reading the comments, their Java implementation is wrong too.
For fucks sake guys, if you're going to have an algorithm blog at least write good algorithms.6 -
Teacher explained how genetic algorithm works by using us as a population. Best way to hear about GA for first time.2
-
anybody ever work with ProjectQ or QISKit? I'm doing a project for my algorithms class on Shor's algorithm, and I'm trying to find a guide for an implementation.
-
Captain America: Winter Soldier
Thug officer: "Deploy Algorithm"
Me as random operator: "Like all of them? At once? There are tens of thousands running on this thing" -
This is probably a standard pattern/algorithm, but I feel pretty good about myself figuring this out.
I was doing a programming challenge and found myself with 2 lists of integer points (x,y). I needed to see where the points converged and identify those locations. Of course I started with a brute force approach and did nested loops to find these locations. This was taking WAY TOO LONG. These lists were 200K each. So checking with naive looping is 200K * 200K operations. Which is a lot.
Then I thought, well I am checking equality, so I will create a third map. The index to the map will be the point, and the data will be an integer. I then go through each list once incrementing the integer for each point that exists in each respective list. Any point with a value greater than 1 is a point convergence.
Like I said, this has got to be a standard thing, so can someone tell me what algorithm this is? I am not sure how to search for this.
I am fuzzy on complexity notation but I think the complexity started at n^2 and was reduced to n. Each list is cycled over once.4 -
There should be algorithm in DevRant to identify duplicate photos - same memes/photos posted in the last 48hours or less.
To stop seeing the same meme posted by 5 developers on the same day.
Thoughts?20 -
Despair +
Craving sweet stuff +
Quarantine lead to a new interesting search algorithm.
I call it diabetes search.
It find's anything edible with enough sweetness or taste.
Current result is promising.
I found couverture chocolate, cocoa powder, maple syrup, vanilla sugar, crunched haselnuts...
I had some eggs, flour, and milk left.
The kitchen looks like in the movies.... When a martial arts battle took place inside a kitchen.
And I'm slightly comatose.
But: Pancakes with something Nutella like. Just more nutty.
Diabetes search very successful.3 -
How to deduce the time complexity of any algorithm faster?
And is there any software that calculates it and suggest another optimal algorithm instead?1 -
Update to Doomsday !rant which can be found here: https://devrant.com/rants/1000628
Hey Everyone I'd like to let everyone know that I finally found the original file for my Doomsday Algorithm and thought it would be fun to show you the dirtiest code I've ever written (I was 12 when I wrote it).
here is the github link, https://github.com/LiamHolmesEPD/... , and I'll likely update it will more cleaner languages in the future.2 -
Whenever I had to pronounce Djikstra's Algorithm. My tongue be like - dijjuuksstrra... Fuck you I am commiting suicide between these teeth.8
-
I need to compare the JSON results of an API before and after a code change. But it was also moved to another API.
However some fields are auto-generated like timestamp or derived off the url (resource links).
Also if a JSON list is returned it maybe in different order...
Wondering is there a quick way to test text likeness?
I've done it before but just used matching status code and maybe measuring the diff in response size7 -
Trying to make my first genetic algorithm program "to be or not to be" in javascript.... (coming from java and experimenting a bit)
Can't even get past instantiating a function/class Gene.js file into the main.js file. -_-
I got a long way to go...2 -
What is the best string comparison algorithm ?
Example Use case: group messages from your telco into groups of related messages.
I have gone through the various algos and implanted them. I just want your opinion if you have experience on this.15 -
with the while demonetize drama around youtube and google blaming the "algorithm", one would think that TESTING ON THE FUCKING PRODUCTION SERVER WAS A BAD IDEA 😡1
-
I got one task left... One algorithm to solve... That's the second day I'm on it... And I need to sleep so much... Fix yourself please, let me write random lines and please work...1
-
I am a cs student at first class. Obviously we take an algorithm lesson. However, despite we have learned all things related to OOP , we didn't even learn switch case statement not even bubble sort algorithm or anything related to the algorithms. Because of that in my free time I learn this stuff individually. I know we will learn these things in the second class but it doesn't make sense to program anything without knowing them because you need to use them. You can use standard library but that doesn't mean you don't need to know how that works.
-
I have experiences and I am able to show what I've done,including spare time projects that I do during non-working hours. But i were given a algorithm question in the interview, that just marked the end of my 2 years efforts. I want to shout to the interviewer next time please don't write lies on your description, state it clearly that someone have to answer algorithm questions to get the job, so that I won't bother to apply and attend to the interview. Thanks!2
-
The Devrant Algorithm not only reads everything and then sort by sarcasm but sees everything and then sort by sarcasm.
Even puts Google's cloud vision to shame. -
If we can transform the search space or properties of a product into a graph problem
we could possibly use Kirchhoff's theorem to reveal products which are 'low complexity'
in particular search spaces, yeah?
Now according to
https://en.wikipedia.org/wiki/...
"n Cycle Space, A family of sets closed under the symmetric difference operation can be described algebraically as a vector space over the two-element finite field Z 2 {\displaystyle \mathbb {Z} _{2}} \mathbb{Z } _{2}.[4] This field has two elements, 0 and 1, and its addition and multiplication operations can be described as the familiar addition and multiplication of integers, taken modulo 2"
Wouldn't this relate to pollards algorithm, because it involves looking for factors of coprimes modulo N or am I mistaken?
Now, according to wikipedia, "in a group, the additive identity is the identity element of the group, is often denoted 0, and is unique."
If we make the multiplicative identity of our ring or field a tuple of the ratio of a/b for some product p, or a (and a/w, where w is the square root of p), or any other set such that n*m allows us to derive a or b, we could reduce the additive identity to the multiplicative identity, making the ring trivial. Solving for p would then mean finding a function from R to R, mapping every number to 0, i.e. finding the additive identity.
Now in a system with a multiplication operation the distributes over addition, the "additive
identity annihilates ring elements", so naturally, the function that maps to 0, gives us
our additive identity, we need only find the subset, no?
Forgive me if I'm wrong, but shouldn't this be convertible to a graph search?
I'm WAY out of my depth here so if anyone is familiar and can enlighten me I'd be grateful.
It's all unknown unknowns to me. -
#include <stdio.h>
/*
* Windows Update Algorithm
*/
int main()
{
int percent = 1;
while (percent <= 100) {
printf("Working on updates\n");
printf("%i %% complete\n", percent);
printf("Don't turn off your computer\n\n");
if (percent == 30) {
printf("Restarting\n");
break;
}
percent++;
}
return 0;
} -
Hi.
I know python and javascript and I'm interested in solving algorithms. But I have a problem, that is I don't the algorithm that I have designed is optimum. I mean it has lower order complexity. I want to know if I want to improve my skills, I should solve programming challenges or, start to read data structures and algorithm design?
I should add my ultimate goal is machine learning.5 -
Anybody here implemented Dynamic Time Warping (DTW) algorithm? I need to implement it for a school project. Its basically an android application and want to authenticate users using this algorithm.
Will appreciate any help possible.2 -
Algorithm suggestions for 2d and 3d volumetric combination of voxels?
I built an image to voxel converter for exporting to the game Avorion over the weekend. I am using a naive approach and treating each pixel as a box shape. I need to learn how to write an algorithm for combining voxels with the same color into rectangular cuboids. This will reduce the imported shapes. As is the game has issues with 64x64x1 images on import. It would be good to reduce the object count by creating cuboids with the pixels that can be combined. I would like to learn to write the algorithm for both 2d and 3d.4 -
3D Engines, and A* algorithm (aswell as pathfinding in usual), this is something I still can't get my head around and it is bothering me to the bone.