/r/shittyprogramming

Photograph via snooOG

r/ShittyProgramming is participating in the Reddit blackout begging June 12th to protest the planned API changes that will kill third party apps.

More here: https://www.theverge.com/2023/6/10/23756476/ & https://archive.is/RtZdp.

For general news and info on the situation: r/Save3rdPartyApps and r/ModCoord.

Join the r/ShittyProgramming Discord server to discuss whatever: https://discord.gg/shittyprogramming

We will not be adding approved users to the subreddit during the blackout.

Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?

Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.

/r/shittyprogramming

102,518 Subscribers

20

Hello World in Python (Attempt 2)

1 Comment
2024/03/24
11:34 UTC

4

Using AI to generate (Fake) Ad Spam (On Myself) (Useful)

1 Comment
2024/02/27
15:52 UTC

1

https://www.youtube.com/watch?v=pTaezybYgQ8&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8FNZ

0 Comments
2024/02/25
08:10 UTC

0

I am working on css basics by freecodecamp, I followed the exact step they provided and it also working in the site. What is the error showing?

5 Comments
2024/02/10
12:04 UTC

24

I finished authoring the coding style i will ~~force on~~ standardize for my team. Here is a demo. Any suggestions?

12 Comments
2024/02/08
03:23 UTC

1

Mine Digital Currency Anywhere, Anytime! Using Your Smartphone Turn your smartphone into a digital gold mine with Minepay! Easy setup, passive earnings – Download now and start mining! Tap into the future of Digital Currency: https://play.google.com/store/apps/details?id=com.minepay.appss

0 Comments
2024/02/06
19:57 UTC

542

I implemented Python's missing length function

26 Comments
2024/02/02
12:42 UTC

0

Making Chatgpt make Physical Novels

1 Comment
2024/02/02
00:21 UTC

0

Bug programmer and manager 🤣🤣

Bug programmer and manager 🤣🤣

3 Comments
2024/02/01
17:54 UTC

1

Exploring Cloud Services for Headless Browser Automation with PyAutoGUI in Python

I am seeking a cloud service where a Python script, using PyAutoGUI or a similar tool, can interact with website elements, including mouse clicks, within a headless environment or through remote access. The challenge lies in finding a platform that supports such graphical interactions in a headless or remotely accessed setting

0 Comments
2024/01/29
09:26 UTC

0

DevMatch - a decentralized platform for developers to meet other developers with similar interests | an all in 1 place for developers to find their technical cofounder/hackathon teammate/remote job/tech friend

built this platform during the winter break and now it has a lot of features and good amount of active users so thought of sharing here

DevMatch - a platform for developer to meet other developers with similar interests, you can like, dislike and communicate with users using a decentralized chat protocol that you're matched with.

It has a job portal as well where you don't really have to add anything manually, it just goes through your github public repositories, gets all the tech stack that you've worked with and recommends you jobs as per that

You can check it out using the below link!

(you don't need any kind of external wallet to use it, just authenticate using your github, it only takes your username from there and scrapes the data that are already public)

🔗https://devmatch.tech/

0 Comments
2024/01/25
21:39 UTC

0

Help me

Un amigo que tiene una empresa independiente esta teniendo problemas con el correo de Hostinger le podrían dar una manito, ya vimos hasta los tutoriales de indues para hacerlo funcionar y no anda.. el E-mail de contacto es el siguiente. innova_web@outlook.com

6 Comments
2024/01/23
15:41 UTC

1

https://www.youtube.com/watch?v=9_Hi04auwxc&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8FNZ

0 Comments
2024/01/14
08:44 UTC

5

Thread safe Singleton in C#

This Singleton can only be accessed by one thread at a time and uses modern .NET!

    public class MySingleton
    {
        public static void Init()
        {
            //Make sure the static constructor gets called
        }
        private MySingleton() { }
        static MySingleton()
        {
            var array = ArrayPool<MySingleton>.Shared.Rent(1);
            array[0] = new MySingleton();
            ArrayPool<MySingleton>.Shared.Return(array);
        }
    }

You need to call MySingleton.Init(); once or however often you please, the invocation of the static construcotr is thread safe. To use the Singleton call ArrayPool<MySingleton>.Shared.Rent(1); if the array you got has the instance at [0] you are the thread that gets the instance. If not, try again later. Remember to return the instance with ArrayPool<MySingleton>.Shared.Return(array, false); If you no longer need the singleton, set the second parameter of Return to true to destroy the instance and it can never be used again. Very secure!

1 Comment
2024/01/13
14:25 UTC

0

2 buttons 2 limit switches and a dc motor

Hi! Could I have a brief C++ code on two push buttons with 2 limit switches and a DC motor? The process will be button 1 will is pressed then the motor will move clockwise and when the limit switch 1 is triggered then the dc motor will stop. And if the button 2 is pressed (while the limit switch 1 might still be pressed) then it will rotate counter clockwise then it will stop if the limit switch 2 is turned on. This process will repeat itself and there are instances where button 2 will be pressed while limit switch 1 is still pressed and vice versa but it should still work. I'm also using an Arduino Uno board and a L298N motor driver as an H bridge. I wasn't able to do it and would be very very grateful if someone could help me or preferably write me the code! I'm just starting out with Arduino.

3 Comments
2024/01/13
02:19 UTC

96

I gave myself the challenge to code the doomsday algorithm in Python using as little characters as I can. The result is an abomination

8 Comments
2024/01/10
20:49 UTC

1

Try to make this for loop in java worse (It's almost impossible)

public class BadClass {
    public static void main(String[] args) {
        int $I = 0;
        int _1 = 1;

        do {
            $I += _1;
            System.out.println($I);

        } while (_1 != ($I > 9 ? 0 : 1) && (Math.random() > 0.2 || Math.random() < 0.8));
    }
}

0 Comments
2024/01/10
18:00 UTC

1

https://www.youtube.com/watch?v=5_Sn1mC1CZA&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8FNZ

0 Comments
2024/01/07
09:43 UTC

1

BONDMAN OF TRAPS GAME

Hello friends, as two amateur developers, we are about to release our first game. Since this is our first game, there may be mistakes and shortcomings, so we need your help. Our request is for you to go to our game's Steam page, download the demo, play it briefly, and provide us with feedback. Additionally, you can support us by adding it to your wish list.

https://store.steampowered.com/app/2703290/Bondman_Of_Traps/

0 Comments
2024/01/06
20:37 UTC

1

https://www.youtube.com/watch?v=h2FdETqJDqI&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8

0 Comments
2024/01/02
07:01 UTC

1

https://www.youtube.com/watch?v=vEpvbPp5J2A&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8FNZ

0 Comments
2023/12/27
17:22 UTC

0

Help wanted, contributions welcome

2 Comments
2023/12/21
16:56 UTC

1

https://www.youtube.com/watch?v=6zvnrQnFPrc&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8

0 Comments
2023/12/16
08:29 UTC

10

Shrink your switch with a foo macro

Look at this switch...

int opt;
do switch (opt = getopt(argc, argv, "w:h:q:n:m:k:z:s:t:x:y:r:i:b:g:a:p:o:c:")) {
case 'w': width    = atoi(optarg); break;
case 'h': height   = atoi(optarg); break;
case 'q': samppp   = atoi(optarg); break;
case 'n': maxi     = atoi(optarg); break;
case 'm': bias     = atoi(optarg); break;
case 'z': invert   = atoi(optarg); break;
case 'k': kappa    = atoi(optarg); break;
case 's': scale    = atof(optarg); break;
case 't': theta    = atof(optarg); break;
case 'x': vreal    = atof(optarg); break;
case 'y': vimag    = atof(optarg); break;
case 'r': jreal    = atof(optarg); break;
case 'i': jimag    = atof(optarg); break;
case 'b': bailout  = atof(optarg); break;
case 'g': gam      = atof(optarg); break;
case 'a': alpha    = atof(optarg); break;
case 'p': gain     = atof(optarg); break;
case 'o': fout1    = optarg;       break;
case 'c': fin1     = optarg;       break;
default: /* '?' */                 break;
} while (opt != -1);

The twinkle in your eye...
The fizzle on your tongue...
Your fingers electric...
Your lips parting to grin...

int opt;
do switch (opt = getopt(argc, argv, "w:h:q:n:m:k:z:s:t:x:y:r:i:b:g:a:p:o:c:")) {
#define foo(ch, var, func) case ch: var = func(optarg); break;
foo('w', width,  atoi); foo('h', height, atoi); foo('q', samppp, atoi);
foo('n', maxi,   atoi); foo('m', bias,   atoi); foo('z', invert, atoi); 
foo('k', kappa,  atoi); foo('s', scale,  atof); foo('t', theta,  atof); 
foo('x', vreal,  atof); foo('y', vimag,  atof); foo('r', jreal,  atof);	
foo('i', jimag,  atof); foo('b', bradi,  atof); foo('g', gamma,  atof); 
foo('a', alpha,  atof); foo('p', gain,   atof); foo('o', fout1,      ); 
foo('c', fin1,       ); default: /* '?' */ break; } while (opt != -1);
#undef foo

Did you flinch?

1 Comment
2023/12/12
23:00 UTC

0

Programmer levels

5 Comments
2023/11/29
09:36 UTC

1

https://www.youtube.com/watch?v=y8J_E5DKGXo&list=PLc_cDVa-WktBDJN5ezxvfiZF0CIod8FNZ

0 Comments
2023/11/23
07:28 UTC

0

Really Terrible "Webscraping"

0 Comments
2023/11/21
21:32 UTC

Back To Top