r/programminghorror • • Aug 03 '25

How lazy do you have to be to get this code snippet generated by AI? Spotted on Linkedin

Post image
546 Upvotes

r/programminghorror • • Aug 05 '25

Github pr pages seem to be down

Thumbnail
reddit.com
0 Upvotes

r/programminghorror • • Aug 03 '25

Rust "congrats, you outplayed yourself"

Post image
127 Upvotes

r/programminghorror • • Aug 03 '25

c My first quiz in C

Thumbnail
gallery
166 Upvotes

It's just macros behind this In the future I want to make this read the questions from a .txt file If someone wants to see the macros https://github.com/Junaiyo/JustANormalQuizInC.git


r/programminghorror • • Jul 31 '25

Javascript 0 sense

Post image
375 Upvotes

r/programminghorror • • Jul 31 '25

Javascript JavaStroke

Post image
138 Upvotes

r/programminghorror • • Aug 01 '25

C# CSX: Helping C(++) Devs transition to C Sharp one macro at a time

Thumbnail
gallery
22 Upvotes

Have you ever felt like C# lacked the essential features from c++, like I don't know.. macros?
Fear no more, for CSX is a 'transpiler' which translates CSXTM code to C# code.

Above is some CSX code translated to C# code, I hope this helps you c++ devs who are struggling to cope with the lack of macros present in c sharp.

Find CSX here
Inspiration


r/programminghorror • • Jul 31 '25

C# (names changed to protect the guilty)

34 Upvotes

we were returning ZABINGA when we weren't expecting to and I had to figure out why

if ((isQux 
        && foo.IsBar 
        && foo.IsZorp 
        && isBaz)
    || foo.BarAction.Equals(ZOUNDS)
    || (self.IsStatusCodeIn(ZORTCH, ZINGO)
        && isBaz 
        && (fooDocument.DocumentInformation
                          .DocumentFailedRules
                          .All(rule => !rule.IsCritical 
                                    || rule.IsOverride)
                                    || foo.IsFake))
    || (target.IsStatusCodeIn(qux.Code, ZORTCH, ZINGO)
        && activeDocument != null 
        && activeDocument.IsNew))
    return ZABINGA;

r/programminghorror • • Jul 30 '25

Typescript is this programming horror or am I just shit ?

Post image
253 Upvotes

r/programminghorror • • Jul 30 '25

c++ I created some better syntax for c++

77 Upvotes

Sooooooooo... I used a bit of macros to make arguably the best syntax for c++ there ever was and will ever be, take a look:

#ifndef COOL_SYNTAX_H
#define COOL_SYNTAX_H

#define fn auto
#define declare auto
#define maybe_do_this while
#define def_do_this while (true)

#define start_circle (
#define end_circle )

#define get_out return
#define plus +
#define minus -
#define divide /
#define star *
#define modulo %
#define equals =
#define equals_squared ==
#define doesnt_equals_squared !=
#define semicolon ;

#define i_am_weak struct
#define     struct++ class //Edit: i know that '+' doesn't work, just... imagine struct_pp... oh, no, that sound worse, imagine structpp
#define not_secure public
#define secure private
#define who_uses_this protected
#define cool_symbol_thing operator

#define ref &
#define double_ref &&

#define array_start [
#define array_end ]

#define curl_start {
#define curl_end }

#define umhh_start <
#define umhh_end >

#define thing template
#define name_but_type typename

#define i_dont_need_this namespace
#define i_dont_like_hardcoding enum

#define use using

#define i_guess if
#define why_not else

#define bool_1 true
#define bool_0 false

#define i_use_arch_linux switch

#define i_dont_shower new
#define what_is_a_shower delete

#define cant_be_efficient std::vector
#define just_a_pair_array std::map
#define just_a_pair_set std::unordered_map
#define que std::queue
#define dq std::deque

#define five for

#define i_need_a_bag throw

#define standard_library_from_the_holy_cpp std
#define do_surgery ::
#define get_this_mail_sent_to_the_console cout
#define fetch_a_api_request_to_the_console cin
#define with <<
#define with_v2 >>

#define mur_ur_equal >=
#define les_ur_equal <=

#define i_dont_want_my_app_to_crash try
#define phew catch

#define what_is_this *
#define cpp_is_getting_good ->
#define get_the_memory_or_whatever &


#endif //COOL_SYNTAX_H


r/programminghorror • • Jul 29 '25

Lisp lint

Post image
149 Upvotes

r/programminghorror • • Jul 28 '25

HTML HTML Status Code Handling

Post image
1.5k Upvotes

r/programminghorror • • Jul 28 '25

Crazy

52 Upvotes

r/programminghorror • • Jul 26 '25

regex Yeah an optimization (Out of context)

Post image
970 Upvotes

r/programminghorror • • Jul 28 '25

Best way to encrypt your code

Post image
0 Upvotes

r/programminghorror • • Jul 28 '25

Python Guys, is there anything I can do to improve my code?

0 Upvotes

r/programminghorror • • Jul 25 '25

Other Matlab coders are on another level

755 Upvotes

I found this in my company's old matlab code. Ok I guess:

ok = 1
if condition
ok = true;
if ok
    // code
end
else
    ok = 0
    continue
end
end


r/programminghorror • • Jul 22 '25

Vintage encoding stored in UTF8

226 Upvotes

Guys didn't care that incoming encoding was Win-1250, just dumped that into MySQL UTF8 table as-is, then they created appropriate queries:


r/programminghorror • • Jul 21 '25

Python ✨ Memory Magic ✨

Post image
1.3k Upvotes

r/programminghorror • • Jul 21 '25

Javascript backtick as default!

Post image
422 Upvotes

r/programminghorror • • Jul 21 '25

Python Didnt know this existed in my code hahahahahahah

Post image
312 Upvotes

r/programminghorror • • Jul 20 '25

C# Also got inspired by a post, c sharp code with unsafe shenanigans.

Post image
91 Upvotes

Saw this post and also this one and got inspired to check back on a old project I done for fun. Made some additions and now there is this unholy mess of code that 50/50 leaks memory honestly lol. ;w;

full repo in comments whenever I can be bothered to push to github for anyone interested xD

(if anyone has stories or pics of unsafe code in c sharp do share, it's quite interesting on unsafeness in c sharp imo)


r/programminghorror • • Jul 22 '25

I hope this doesn't break

Post image
0 Upvotes

created the objective class for my game. the only way I could think of doing the waypoint locations was accepting a lambda function that returns a list of vectors. seemed horrific to me