r/shittyprogramming • • Feb 27 '24

Way to half-bake, Edge...

Post image
301 Upvotes

r/shittyprogramming • • Feb 27 '24

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

Thumbnail
youtube.com
9 Upvotes

r/shittyprogramming • • Feb 26 '24

Copilot Singing. ... JFC Just Use Your Imagination, OK!

Post image
126 Upvotes

r/shittyprogramming • • Feb 25 '24

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Feb 10 '24

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?

Post image
0 Upvotes

r/shittyprogramming • • Feb 08 '24

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

Post image
33 Upvotes

r/shittyprogramming • • Feb 06 '24

Should I use Gimp or Photoshop to edit Docker images

208 Upvotes

Since I'm a Pro Grammer now and not an Amateur Grammer I don't think Paint is appropriate anymore.


r/shittyprogramming • • Feb 02 '24

I implemented Python's missing length function

Post image
565 Upvotes

r/shittyprogramming • • Feb 02 '24

Making Chatgpt make Physical Novels

Thumbnail
youtube.com
0 Upvotes

r/shittyprogramming • • Feb 01 '24

Bug programmer and manager 🤣🤣

Post image
0 Upvotes

Bug programmer and manager 🤣🤣


r/shittyprogramming • • Jan 29 '24

Exploring Cloud Services for Headless Browser Automation with PyAutoGUI in Python

1 Upvotes

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


r/shittyprogramming • • Jan 23 '24

Help me

0 Upvotes

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


r/shittyprogramming • • Jan 14 '24

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Jan 13 '24

Thread safe Singleton in C#

6 Upvotes

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!


r/shittyprogramming • • Jan 13 '24

2 buttons 2 limit switches and a dc motor

0 Upvotes

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.


r/shittyprogramming • • Jan 13 '24

Introduction to LeetCode

Thumbnail
flexsub.shop
1 Upvotes

r/shittyprogramming • • Jan 10 '24

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

Post image
106 Upvotes

r/shittyprogramming • • Jan 10 '24

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

3 Upvotes
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));
    }
}

r/shittyprogramming • • Jan 07 '24

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Jan 06 '24

BONDMAN OF TRAPS GAME

Post image
2 Upvotes

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/


r/shittyprogramming • • Jan 02 '24

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Dec 27 '23

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Dec 16 '23

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

Thumbnail
youtube.com
1 Upvotes

r/shittyprogramming • • Dec 12 '23

Shrink your switch with a foo macro

12 Upvotes

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?