r/shittyprogramming • • Aug 22 '20

Rubber duck debugging has solved 100% of my coding problems so far. Let me show you how it's done.

Thumbnail
youtu.be
120 Upvotes

r/shittyprogramming • • Aug 22 '20

How do I use this "BIOS Dehancer" I got from AI Dungeon? The instructions aren't working for me.

Thumbnail
pastebin.com
3 Upvotes

r/shittyprogramming • • Aug 22 '20

A Conspiracy Robot

Thumbnail
youtu.be
36 Upvotes

r/shittyprogramming • • Aug 19 '20

Everyone knows that the fewer lines you have, and the longer each line is, the better the code is. It's just common sense.

140 Upvotes
(lambda a:lambda v:a(a,v))(lambda f,n:(f(f,n-1),(lambda x:(lambda y:y(-~x))((lambda s:__import__(s).__getattribute__(dir(__import__(s))[-19]))('\x69'.join(["bu","ka","lt","oi","ns"][::2]))))(eval(f"~-vars()[chr({(int)(bin(6)[2:])})]")))[0]if n>0 else 0)(sum((lambda f:lambda x:f(f,x))(lambda f,n,i=2:False if n%i==0 else f(n,i+1)if i+1<__import__('math').sqrt(n)else True)(a)for a in range(20)))

r/shittyprogramming • • Aug 19 '20

The WORST Investment AI

Thumbnail
youtube.com
20 Upvotes

r/shittyprogramming • • Aug 18 '20

This is how I do includes.

145 Upvotes

Seriously guys, it's time to stop all the "Did I include this?" "Did I include that?" that comes with every project ever.

Just make a single file on your disk named "everything.h" and throw inside all the include statements you will ever need. All your stdios, stdlibs and the whole thing in one neat place!

Then, you just include everything.h in your source files and you are good to go.

Really, it´s the best way to do it. It's how us, REAL™ programmers, do it. Anyone telling you not to do it is probably a Microsoft simp or something like that.


r/shittyprogramming • • Aug 17 '20

I present you The Lazy Sort

Post image
1.9k Upvotes

r/shittyprogramming • • Aug 16 '20

What's the point of breakpoints when I can do this?

Post image
388 Upvotes

r/shittyprogramming • • Aug 13 '20

Why only handle one or two keys when you can handle ALL of them?

Thumbnail
i.imgur.com
150 Upvotes

r/shittyprogramming • • Aug 12 '20

Playing CSGO Without Hands (code in video description)

Thumbnail
youtube.com
12 Upvotes

r/shittyprogramming • • Aug 07 '20

Scientists rename genes because Microsoft Excel reads them as dates

Thumbnail
engadget.com
317 Upvotes

r/shittyprogramming • • Aug 06 '20

My stickers finally arrived!

Post image
870 Upvotes

r/shittyprogramming • • Aug 07 '20

What's the worst advice someone gave you on an IRC server and you actually tried it with your computer?

15 Upvotes

r/shittyprogramming • • Aug 04 '20

How to program as a project manager. No prior coding experience required!

Thumbnail
youtu.be
122 Upvotes

r/shittyprogramming • • Jul 21 '20

Python really is an amazing programming language to do hyper-realistic linguistic analysis like this

Post image
567 Upvotes

r/shittyprogramming • • Jul 19 '20

Virgin Project Euler vs Chad Python one-liner

171 Upvotes

I was doing some Project Euler challenges as part of my weekend routine (below 100, so don't worry about spoilers too much), when I decided to try if I could solve Challenge 22, using one line, without having the data file separately downloaded.

Well, it turns out I managed to do exactly that. Feast yer eyes on the best solution ever known to man!

(lambda u:sum(map(lambda t:sum(map(lambda c:ord(c)-ord('A')+1,t[1]))*t[0],enumerate(sorted(list(map(lambda x: x[1:-1],__import__('urllib.request').request.urlopen(u, context=__import__('ssl').create_default_context(cafile=__import__('certifi').where())).read().decode('utf-8').split(',')))),1))))('https://projecteuler.net/project/resources/p022_names.txt')

r/shittyprogramming • • Jul 18 '20

super approved Raytracer written in bbc basic

380 Upvotes

r/shittyprogramming • • Jul 18 '20

CMV: Best version control is CTRL-Z

8 Upvotes

r/shittyprogramming • • Jul 14 '20

How Viruses Work in Movies

Thumbnail
youtu.be
48 Upvotes

r/shittyprogramming • • Jul 12 '20

How to be the best programmer in your company

Thumbnail
youtu.be
46 Upvotes

r/shittyprogramming • • Jul 10 '20

I've been excessively commenting my code since 1970 but this is the best use of code commenting i've ever seen

Thumbnail
gfycat.com
787 Upvotes

r/shittyprogramming • • Jul 09 '20

Creating a microservices architecture for my company and came up with this. Is it too concise?

Post image
169 Upvotes

r/shittyprogramming • • Jul 07 '20

Stack Overflow, GitHub or Reddit?

97 Upvotes

You're Googling an error and you see a Stack Overflow, GitHub, and Reddit link. Which do you click on first? Why?

Copied from Twitter


r/shittyprogramming • • Jul 08 '20

Can anyone help me figure out how to calculate some numbers?

3 Upvotes

I need the numbers 3, 5, 6, 10, 12, 20 inside a double "for" loop. I could just make an array and use "i" for index, like any sane person would

int[] numbers = { 3, 5, 6, 10, 12, 20 };

but I don't feel like it...

for (int i = 0; i < 6; ++i)
{
    for (int j = 0; j < 12; ++j)
    {
        // Here I need numbers 3, 5, 6, 10, 12, 20 in any order
        int number = numbers[i]; // and I don't want to use this
    }
}

Is there any way to get these numbers just from using "i" and "j"?