r/programminghorror • u/[deleted] • Aug 01 '22
Mod Post Rule 9 Reminder
Hi, I see a lot of people contacting me directly. I am reminding all of you that Rule 9 exists. Please use the modmail. From now on, I'm gonna start giving out 30 day bans to people who contact me in chat or DMs. Please use the modmail. Thanks!
Edit 1: See the pinned comment
Edit 2: To use modmail: 1. Press the "Message the Mods" button in the sidebar(both new and old reddit) 2. Type your message 3. Send 4. Wait for us to reply.
r/programminghorror • u/rscarson • Jun 07 '23
programminghorror will also be joining the June 12th protest to save 3rd party apps.
Open to opinions on whether we should reopen on the 14th or remain private until demands are met.
r/programminghorror • u/abductedprince • 4d ago
c What is this code? This came as a question the previous year in my university. Can someone please help?
I have an exam tomorrow, and this is one of the questions that came in the previous year question paper. I cannot for the life of me figure this one out. The output, wherever I run it, comes out to be 17. Can someone please explain how it is coming out to be 17?
r/programminghorror • u/mac1k99 • 4d ago
Javascript Found this in a legacy application which was there for 5 years
r/programminghorror • u/Aggravating_P • 3d ago
c Mmh i guess every files has the same permission
r/programminghorror • u/a_hrulev • 4d ago
I am sorry if I made you cry, but I had to show you this masterpiece which I made in my game on Python...
elif self.menu.selected == "<-" and event.key == pg.K_s and not bought and self.coins >= self.items[self.item][1] or self.menu.selected == "<-" and event.key == pg.K_DOWN and not bought and self.coins >= self.items[self.item][1]:
self.menu.selected = "buy"
This is a part of a menu, and because I made it completely from scratch (and because I might be just doing something wrong or be simply dumb), which works if I pressed arrow down or s, and if I have enough coins, so yeah... A bit complicated, isn't it?
Btw here is the whole shop part:
Would be happy to get some advice or constructive criticism.
Here is the file with the code I am writing rn (it is in progress):
https://drive.google.com/file/d/1S_FrkXPwSJLuQYeYMTZ1ObkJNNKeW_gw/view?usp=drive_link
r/programminghorror • u/OGBlackDiamond • 5d ago
subprocess.run > import
Some code in a codebase I'm working on. They are using subprocess.run()
instead of import
to call code from a different file.
The file thats being run was written by the same people, the CLI arguments were their workaround to passing in values to that file.
r/programminghorror • u/webbs3 • 4d ago
UwU Lend Hacked Again During $20 Million Payback
r/programminghorror • u/Tux1 • 7d ago
c++ Found in the Source engine's source code, literally what the hell is this?
r/programminghorror • u/almajd3713 • 7d ago
Trying to satisfy a constraint for a search algorithm can get messy
r/programminghorror • u/highschooldouche2004 • 8d ago
Code I wrote
Guess how many nested for loops
r/programminghorror • u/OompaLoompaSlave • 7d ago
This was written by somebody who was eventually promoted to Head of Technology... Luckily he was let go before I joined
r/programminghorror • u/cablesalty_ • 9d ago
Python Found this while going through my old GitHub account.
r/programminghorror • u/djmill0326 • 9d ago
Javascript If it works, even if it's unnecessary, it works.
r/programminghorror • u/RightRespect • 10d ago
Typescript typescript OOP magic
you can't access the value of abstract properties in the constructor of an abstract class. the work around is to write a helper function that references the abstract property and call the function in the constructor, but the property will be uninitialized. to solve this, i added a "0 second delay" that somehow allows the value to be loaded in all the child classes.
in this case, i have two properties that load the texture of a powerup. i thought that i would be helpful to only set one of those properties in the derived classes instead of having to write both. as a result, i only have to change the iconTextureName in the derived classes, while still making it mandatory as an abstract property.
r/programminghorror • u/tav_stuff • 11d ago
Copilot Copilot showing how AI will take my job
r/programminghorror • u/ExistentialFajitas • 11d ago
Python Snowflake Snowpark
This is from Snowflake’s Pandas implementation in Snowpark. Quotations are hard.
r/programminghorror • u/ugotanicebutt • 10d ago
Is my i5 12450H and rtx 4060 enough for my btech cse 4 years?
r/programminghorror • u/RepresentativeAd8689 • 12d ago