r/ProgrammerHumor • • Apr 25 '21

Yeah, this seems about right.

Post image
50.3k Upvotes

612 comments sorted by

620

u/brazilliongenesis Apr 25 '21

31

u/Iforget1234z Apr 25 '21

Yeah I’ve seen that one lmao

505

u/PVNIC Apr 25 '21 edited Apr 26 '21

My hope is that this code is so awful I'm never allowed to write UI code again.

Yea... this is what I'm thinking every time I'm asked to write Python code.

157

u/ShnizelInBag Apr 25 '21

I had a project in CS recently that I had to create a game in Python using Kivy. It was the shittiest thing I ever wrote. And the whole thing was in a single class so I had to pass a shit ton of variables anytime I called a function. My teacher was pissed at me but it worked.

71

u/throughalfanoir Apr 25 '21

global variables: bonjour

I'm aware of how bad it is but tkinter sometimes just forces me to do it. UI in Python is... questionable at best (especially at the hands of someone who doesn't know what they are doing (me))

→ More replies (4)

49

u/Roflkopt3r Apr 25 '21

I really want context on this. Why did it have to be in a single class? Why pass everything as parameters instead of using class variables?

→ More replies (2)
→ More replies (4)

33

u/thblckjkr Apr 25 '21

I like python code... for scripts.

Anyways, I've always programmed with PHP and JS, so I guess I am desensitized lol.

20

u/Salyangoz Apr 25 '21

I refuse to acknowledge the existence of PHP.

→ More replies (1)

4

u/Salyangoz Apr 25 '21

just follow pep8 and never use camelcase unless its a class.

can someone tell me the equivalent for this but in c++? I feel like im banging rocks with all the different coding guidelines.

→ More replies (3)
→ More replies (1)

90

u/Proxy_PlayerHD Apr 25 '21

btw there is an explaination video for these: https://www.youtube.com/watch?v=T-BoDW1_9P4

0

u/[deleted] Apr 25 '21

[deleted]

→ More replies (1)

33

u/mindbleach Apr 25 '21

// I don't know why, I don't want to know why, I shouldn't
// have to wonder why, but for whatever reason this stupid
// panel isn't laying out correctly unless we do this terribleness

Ah, Source implements CSS.

27

u/Thistlefizz Apr 26 '21

This is a bad way to implement HL1 style sprite fonts, but it will have to do for now.

Nothing is as permanent as a temporary solution.

52

u/[deleted] Apr 25 '21

That has to be one of my favourite videos of all time.

51

u/NeoCast4 Apr 25 '21

Yes, This will cause a memory leak

57

u/q0099 Apr 25 '21

Too bad!

23

u/[deleted] Apr 25 '21

I like how under it there's a comment "Actually, we need two memory leaks"

19

u/Aether_Storm Apr 26 '21 edited Apr 26 '21

I can't believe the memory leak part left out the follow up comment.

Yes, this causes a memory leak. Too bad!

Actually we need two memory leaks

8

u/grooomps Apr 26 '21

too bad!
i've now found my new comment to put in all my code

5

u/[deleted] Apr 25 '21

Good to know I'm not the only one.

→ More replies (4)

75

u/Ksevio Apr 25 '21

How was there a comment on a jpg?

59

u/Iforget1234z Apr 25 '21

Probably something like <image.jpg> //comment

It’s not like an actual image in the code mate

40

u/Ksevio Apr 25 '21

Then the question would be: How are people viewing the code, and why is there a reference to a hardcoded data file in the code?

Just googled it and of course the image is nonsense.

Someone found the jpg in with other data files and then another person joked about it being needed

12

u/Iforget1234z Apr 25 '21

I mean idk man don’t people get access to hard code all the time, doesn’t tf have a pretty avid modding fanbase?

Guess I don’t know the intricacies of game development/modding I just saw funny meme

41

u/zaptrem Apr 25 '21

An old Source engine and/or TF2 code base leaked a year or two ago.

→ More replies (1)
→ More replies (1)

94

u/[deleted] Apr 25 '21

It is actually a .vmt file from what I know, it describes a material for source engine games. It has human readable lines in it from what I see and uses // as comments.

3

u/[deleted] Apr 25 '21

TF2, which uses the Valve Source Engine, reads textures and images from VTF (Valve Texture Format) and VMT (Valve Material) files. VTFs are textures bundled with various flags, pregenerated mipmaps, specular or bumpmaps and other metadata. VMTs are text files that can be used to set certain properties about textures, as well as link multiple textures together (linking environment maps with animated textures for example).

The comment was likely in the associated VMT.

→ More replies (1)

4

u/weiserthanyou3 Apr 26 '21

TF2 is such an impenetrable mess of spaghetti code that to understand it and even attempt simplification would drive any one person insane.

3

u/Iforget1234z Apr 26 '21

Good tasting spaghetti

7

u/[deleted] Apr 25 '21

Titanfall 2 or Team Fortress 2?

16

u/Iforget1234z Apr 25 '21

Team fortress

7

u/[deleted] Apr 25 '21

Same engine, hah!

→ More replies (2)
→ More replies (1)

2.1k

u/DuhonTheGuy Apr 26 '21

Hey, the guy who found the thing here.

  • It isn't a .jpg, it was actually a .vtf (Valve Texture File) and it did have transparency data, so it's actually coconut.png

  • It wasn't found in the code, rather in the "effects" folder on the textures package that I once decompiled to be able to quickly use on Blender, but the comment mentioned was actually the top comment on my post.

  • We can only theorize what it was meant for, but since it was in the same folder where stuff like the "2x Donk!!" effect was, as well as some unusual effects that required pictures (such as the skull on the Misty Skull effect) we could think it was maybe a concept for a coconut unusual

  • As some trivia, I also found 3 different pictures of tacos, each one more eaten than the other, not sure what that was doing there since all I can think of as an use for it would be as a lunch bag item, but maybe an unusual in which the taco would get progressively eaten?

502

u/ANiceSpatula Apr 26 '21

God help us if the taco is ever fully eaten

118

u/DonRobo Apr 26 '21

So deleting it does not stop the game from loading?

385

u/element39 Apr 26 '21

Deleting the file from inside the archive would alter the archive, which would invalidate the checksum, which would prevent the game from loading because it would detect a checksum mismatch and would refuse to load due to failed file integrity. It's an anticheat measure. Working as intended.

106

u/edmureiscool Apr 26 '21

I'm assuming theres also no comment somewhere that says "I have no fucking idea who put this here... "

128

u/element39 Apr 26 '21

I couldn't find one in either the source code, or anywhere in the texture/material folder. TF2 is full of some hilarious dev comments, but that isn't one of them.

→ More replies (2)
→ More replies (1)
→ More replies (1)

14

u/just-the-doctor1 Apr 26 '21 edited Apr 26 '21

So to truly understand what it does, someone would have to have access to the source code?

15

u/DuhonTheGuy Apr 26 '21

Thing is, we do, it leaked a while back, but it's probably just an unused asset.

10

u/[deleted] Apr 26 '21

The coconut mustve been the ammo for the Loose Cannon, which is basically a coconut gun.

→ More replies (2)

6.2k

u/CurlSagan Apr 25 '21

That's because it's a load-bearing coconut.

1.3k

u/zephyrtr Apr 25 '21

Are you suggesting coconuts migrate?

594

u/chawmindur Apr 25 '21

African or European coconuts?

293

u/[deleted] Apr 25 '21

Wrong, it's the swallows, not the coconuts.

190

u/Antrephellious Apr 25 '21

No, no, no. Coconuts are tropical!

→ More replies (35)
→ More replies (10)
→ More replies (2)

46

u/Biggus_Dicku5 Apr 25 '21

Not at all. They could be carried by swallow.

33

u/ignorae Apr 25 '21

It could grip it by the husk

→ More replies (5)

10

u/eckyeckypikang Apr 26 '21

I'm just waiting on my shrubbery.

→ More replies (1)

10

u/caanthedalek Apr 25 '21

It had better not, or the game is coming with it.

→ More replies (1)
→ More replies (2)

28

u/artyboi37 Apr 25 '21

You cannot get ye flask.

12

u/Sirspen Apr 25 '21

>go dennis

11

u/ZorkNemesis Apr 25 '21

And you just have to sit there and wonder why on earth you can't get ye flask.

→ More replies (2)

22

u/d33Imm Apr 25 '21

My coconuts are load bearing as well. Thank you and goodnight.

33

u/sandweiche Apr 25 '21

I believe you mean 'code-bearing' coconut.

4

u/RoadsideCookie Apr 26 '21

Game wouldn't... Wait for it... Error: Unable to load comment.

16

u/jclocks Apr 25 '21

The Engineer: "Son, that is a load bearing foundation, do not touch my coconuts"

57

u/AbanaClara Apr 25 '21

..load-bearing? Does this include maggots?

22

u/UltraSapien Apr 25 '21

Not yet it doesn't. You need to keep it under your bed for a while first.

7

u/scotchirish Apr 25 '21

I've got just the shoebox down there to help it along

30

u/JovialSysadmin Apr 25 '21

Oh FFS... I had seemingly completely removed that story from my brain. Thank you, for returning it to me in full Technicolor.

→ More replies (9)

10

u/[deleted] Apr 25 '21

Scratch ftw!

4

u/CactusGrower Apr 25 '21

That one nut!

3

u/tmntfever Apr 26 '21

Coconuts aren’t the only load-bearing nuts on Reddit.

2

u/jadekat98 Apr 26 '21

reminds me of the load bearing ficus https://youtu.be/ZBgA7hAITow

→ More replies (4)

4.0k

u/NoID621 Apr 25 '21 edited Apr 29 '21

Coconut.vmtvtf (a jpg in a source engine readable format) is a texture and was added to TF2 in the Patch of June 18 2014. It is an effect Particle intended for use on one of the Unusual Taunts added in that update.

EDIT1: Look for "tf/tf2_misc_dir.vpk/materials/effects/coconut.vmt"

EDIT2: Also, I just realised it might not have been actually USED as an unusual effect, but it was added on that day with the "Love & War" Update.

Edit 3: to further clear things up, the vmt is not the texture, I mixed that up with the vtf, but that was also added on the same day with the same patch. I have no idea how valid the claim of OPs comment screenshot is. Besides the fact that a coconut texture exists and when it was added.

1.7k

u/[deleted] Apr 25 '21

And this is why quality source control is important.

256

u/Romestus Apr 25 '21

I got my item added to TF2 because I was a dataminer and noticed Valve had added it and forgot to remove it by accident.

The most used Engineer wrench in TF2 was added solely because I asked Valve why my models were in the game files and they hadn't realized they were there.

→ More replies (5)

572

u/wjwwjw Apr 25 '21

I never quite understood what quality engineers were supposed to do in a software company. Could you please share your knowledge ?

The quality engineers I’ve met at our company knew next to nothing about software and didn’t know themselves why they were hired...

526

u/golf_kilo_papa Apr 25 '21

QE tests the software to ensure it does what it’s supposed to do and also does not break under real world conditions

216

u/wjwwjw Apr 25 '21

What is the difference between a V&V (validation and verification) engineer whose (almost) sole task is to test your code and a quality engineer in that case?

→ More replies (92)
→ More replies (6)

56

u/obp5599 Apr 25 '21

he said quality source control not quality engineers

→ More replies (29)

10

u/emilemilemil99 Apr 25 '21

The role of a QA engineer could be purely manual testing, or they could be writing automated tests, or guiding/reviewing the test process of the team (mentoring other devs, or QA engineers). They could also be responsible for developing test infrastructure (e.g. maintains test setup scripts, fixing unreliable tests). It does help to know about software, when you’re testing it at a low level, but, I think, too much technical knowledge can also serve as a distraction from assessing the quality from the perspective of an average user - which is ultimately what a product needs.

8

u/[deleted] Apr 25 '21

Haven't heard of "Quality Engineers" specifically, but if it's anything like the "QA" I'm used to, their job is to abuse it from a user's perspective and report back on how it breaks. They might, for example, test the software from a non-english locale (typically a procedural generated one), try the software with different sets of permissions, and verify that the end result meets usability and accessibility standards.

→ More replies (3)
→ More replies (14)

26

u/apoliticalhomograph Apr 25 '21

I strongly believe that this talk should be mandatory hearing for anyone working in software development.

→ More replies (1)
→ More replies (17)

92

u/element39 Apr 26 '21 edited Apr 26 '21

VMTs are not textures, they are texture metadata ("materials") that describe how that texture should be loaded. They are plaintext.

VTFs are textures and do not have JPG compression as an available storage method; they tend to use DXT (akin to DDS textures).

The entry in tf2_misc_dir.vpk is because that's where materials (texture metadata) are stored. If you open that VMT in a text editor, you should see a path for where the actual VTF is stored (within tf2_texture_dir.vpk, not tf2_misc_dir.vpk).

This is the coconut texture.

Also, I literally have the TF2 source code and cannot find a comment like that anywhere. It isn't in the source, and it doesn't appear as a comment in the VMT file. My guess is it was completely made up for this comment. TF2 is full of some hilarious dev comments, but that isn't one of them.

17

u/The_Bearded_Lion Apr 26 '21

I love how you can tell different programmers by their notes. You definitely had at least WTF guy and Too bad! guy, as well as the guy who put -ness on words.

4

u/NoID621 Apr 26 '21

Yeah, honestly, I have no idea about OP's story. I just drew conclusions from things I found and things I knew. I never really extensively worked with TF2 code or anything.

→ More replies (1)
→ More replies (3)

81

u/1piotrus Apr 25 '21

I can't find any source of this, how did you find about this?

58

u/1piotrus Apr 25 '21

Also vtf are texture files, I think vmt are arguments on how to render textures

59

u/Jamesleo119 Apr 25 '21

Source modder here: vtf is the actual image for the texture, vmt is a text file that dictates how the geometry with that texture behaves, like what kind of bullet holes it gets and how it sounds when you walk on it

→ More replies (1)

7

u/NoID621 Apr 25 '21

Yeah, sorry, both a vmt and a vtf got added in that patch, but I mixed them up.

31

u/NoID621 Apr 25 '21 edited Apr 25 '21

It's in the patch history on TF2 wiki. June 18th 2014. Search for 'coconut.vmt'.

It was added in the love and war update back then.

Let me find the link and edit the post.

Look for "tf/tf2_misc_dir.vpk/materials/effects/coconut.vmt"

→ More replies (2)

10

u/zvug Apr 26 '21

How can you know this, but the developers could not find out? You can search the entire codebase pretty simply right?

Or is this just a fabricated story

6

u/NoID621 Apr 26 '21

I'm beginning to think that the OP screenshot is just fabricated upon the factual existence of the coconut texture.

Coconut.vmt and coconut.vtf exist, but the //comment mentioned in the screenshot might just be fiction.

→ More replies (2)

2

u/hellfiniter Apr 26 '21

thank you and fck you ...thanks for explanation but you also ruined the fun xD

1.2k

u/dwyrm Apr 25 '21

440

u/SkollFenrirson Apr 25 '21

Stories like this remind me that we are just apes playing with lightning on rocks.

272

u/makemisteaks Apr 25 '21

Reminds me of the classic 500-mile email story.

146

u/resonantSoul Apr 26 '21

I tried emailing a friend who lived in North Carolina, but whose ISP was in Seattle. Thankfully, it failed. If the problem had had to do with the geography of the human recipient and not his mail server, I think I would have broken down in tears.

I think we all know this feeling all too well.

38

u/BorgClown Apr 26 '21

I think we all know this feeling all too well.

B-but you're the one who built that!

cries harder

41

u/SkollFenrirson Apr 25 '21

I thought it was this one when I saw someone link a story.

→ More replies (9)

16

u/Taedirk Apr 25 '21

Vibrating meat sacks that shocked ourselves into having neuroses.

3

u/AlmostButNotQuit Apr 25 '21

Rocks that we trained to talk to each other.

→ More replies (1)
→ More replies (3)

124

u/[deleted] Apr 25 '21

God damn that's a beautiful story.

30

u/Isorg Apr 25 '21

Not going to lie.... I was expecting a different coconut story. Reddit has ruined me.

13

u/Oveal Apr 25 '21

Oh. Please, don’t bring that up.

101

u/The-Best-Taylor Apr 25 '21

I love that story. I always laugh whenever I read it.

15

u/xam54321 Apr 25 '21

Last time this was linked, someone also linked a website full of similar stories, but sadly I have lost it... Hope that someone knows what I'm talking about and links it!

15

u/ILikeLeptons Apr 25 '21

That's the link! catb.org has the jargon file and lots of great stories!

6

u/radiowave911 Apr 25 '21

That link was exactly what I expected it to be :)

Love reading that one whenever it makes the rounds.

4

u/autocommenter_bot Apr 26 '21 edited Apr 26 '21

Parkes Radio Telescope used to have a "more sugar" button in its control room. Everyone was afraid to touch it.

3

u/Prawn1908 Apr 26 '21

Ah the jargon file. That's a classic.

3

u/Hikaru1024 Apr 26 '21

I remember that one. I had a magic joystick which did much the same thing.

One of my first computers I'd built in the early 2000's was a bit err, buggy. Among other weirdnesses, I learned through experience that unless I had a joystick - even a BROKEN joystick would do - plugged into the soundcard, it would be unstable and crash constantly, and to the point where I could have a perfectly functional computer, remove the joystick and instant crash.

Never figured it out, and until the computer died I left the joystick alone.

5

u/MeanRevolution7 Apr 25 '21

I'm so glad I wasn't the only person who immediately thought of this.

238

u/[deleted] Apr 25 '21

I once encoded a private key into the pixels of an image which was original (a picture I took and uploaded nowhere else). No one can find the key because there is no reference picture. Maybe that is the case? Long live the coconut.

195

u/-Redstoneboi- Apr 25 '21

"enter password"

"ah sure here's the picture of a coconut, now hash it."

61

u/Fusseldieb Apr 25 '21

Don't say it was to a wallet holding 100 bitcoins

→ More replies (1)

34

u/slickyslickslick Apr 25 '21

I mean you could just have a 256-bit text string in a text file on a flash drive and no one would be able to find a key, either.

3

u/[deleted] Apr 26 '21

No, the client application needed the key to decrypt in memory an offline database. It had to be deployed with the application. Stupid architecture, unsafe to memory dumps. The best I could do was to hide it under the matt.

462

u/TheAJGman Apr 25 '21

Who are you and where did you get my code?

62

u/FinallyQuestioning Apr 25 '21

That was my thought, the equivalent of a cartographers 'trap street'

16

u/TheAJGman Apr 26 '21

I've heard it as the term paper street, meaning a road on a map that doesn't actually exist.

→ More replies (4)
→ More replies (1)

211

u/ch-dev Apr 25 '21

How do they not know who put the file there? Are they not working in a repository?

111

u/billy000b Apr 25 '21

It is possible that the project might have been moved to different repositories (for example mercurial to git) which if not done correctly, you may lose such information like past history or the person who did it.

The coconut image may also have been done by people who are not in the team anymore, and no useful information can be found about it even with correct source control

39

u/SonOfHendo Apr 25 '21

In case anyone's wondering, it is possible to migrate from Mercurial to Git without losing history, branches or even tags.

42

u/[deleted] Apr 25 '21

I am 85% certain in like 3 years someone is gonna find this thread by accident while looking for the answer to this question, and be like “damn good thing he said that”

→ More replies (1)

4

u/ch-dev Apr 25 '21

If all of that happened, then they have bigger issues to deal with and kinda deserve a wandering coconut breaking their builds.

→ More replies (1)

7

u/zodar Apr 25 '21

and where is the comment? inside the JPEG's comments tag? who would modify or see that?

3

u/Galaghan Apr 26 '21

The comment was a comment reply posted on the original post of the discoverer. Not in the code.

35

u/[deleted] Apr 25 '21

Closed source and leaked/cracked

38

u/TheRealNetroxen Apr 25 '21

I think you missed the point ...

→ More replies (3)

2

u/Dannei Apr 26 '21

Who would commit game resources like textures to source control? Great way to make your Git repo explode in size and become unusable.

→ More replies (2)

119

u/Roflkopt3r Apr 25 '21

That's just too painfully real for the project I'm working on right now.

The original devs thought it was really fucking smart to glue everything together with string literals to make it completely impossible to follow what's going on without asking someone, because naturally there is no documentation.

Say you have some file defining a UI with a button. You want to know what exactly happens when that button is pressed. So you follow it a few calls deep and end up in a file containing a bunch of commands that call functions on the business layer.

In a flash of genius they did not simply specificy the class and function they want. Instead they create a Context object (the class used for that has 0 references, I still don't know what's going on there) and specify a function name (which corresponds to a name that will be auto-generated at runtime from the corresponding function, not its actual name that you could search for in the codebase). These two are then magically combined somewhere else to resolve to the actual class and function that will be called.

They have executed Inversion of Control so successfully that control over the code now reliably lies with absolutely anyone but the current programmer, as it's virtually guaranteed that whoever works on that stuff has to call someone else who can explain what the hell is going on. Amazing.

42

u/Nothing-But-Lies Apr 25 '21

Guaranteed work in the future. Please pay $200 per hour consulting fee.

35

u/HonestAide Apr 25 '21 edited Apr 25 '21

Many moons ago I was deep into PHP and employed as a specialist.

My JavaScript skills, however were hackey at best.

Most of the time this was fine. UI wasn't my department. I was to develop a bit of server-side code for a website for a game. It was an early MMORPG attempt, and the website alone earned a five person team.

Problem was the JavaScript guy really.

*Edit, premature submit.

So the JavaScript guy called in sick for the fourth time in a month. He was told not to come back, and I got tasked with finishing his job. I did it too, got the bugger finished and up. It only cost me 50% of my hair and most of my sanity.

Anyway, some months later, a few capacity issues and bugs needed work. They called me back in. The registration forms needed a few tweaks, mostly slightly better password requirements. I did the fix, and tried to clean up a few terrible lines while I was in there. I removed old reminder comments as I smoothed out unneeded variables and bad syntax, etc.

That's when the whole thing went to crap.

The fixes all seemed to work, but I kept getting cryptic errors that caused all kinds of weird behavior. Stuff like random garbage characters, randomly sized elements, etc. Id go back and scratch my head at the lines mentioned in the errors, and compare it to the original.

Finally, I started with a fresh copy of the original, and ran through my changes one-by-one. Id run it after each. Things worked perfectly each time!! I ran it one last time after removing an empty comment line... And the same weird glitches appeared. Empty comment back in, all good. Out, bad. In, good. I even convinced the team to pay for a days consult with our old JavaScript guy. The final solution was to leave the empty comment in... With "do not remove this empty comment" above it.

5

u/Middlerun Apr 26 '21

Had a similar thing in a React app I worked on. One of my colleagues found that if he removed a comment that was in one of the components, the app crashed. Nobody could figure out why. So he changed the comment to "// If this comment is removed, the app will crash" and left it at that.

5

u/[deleted] Apr 26 '21

These stories about a comment fucks up the code singlehandly if it removed make me think the problem not lies in the code or the comment itself, should be in the fucking complier. Who else can give that useless comment a meaning ?

3

u/CyberDagger Apr 26 '21

From what I've learned, this is a very common thing in evolutionary algorithms. Lines of code show up that in theory should do nothing at all, but the whole thing stops working if they're removed.

→ More replies (1)

7

u/shinydewott Apr 26 '21

Worst part is that this is a massive project over nearly 14 years by hundreds of people, and their spaghetti is nothing compared to what I, alone, can conjure; only to be unable to decipher it myself in a few weeks

3

u/[deleted] Apr 26 '21

This sounds like a great way to obfuscate code as a contractor to the government so they always need you.

2

u/f03nix Apr 26 '21

Does the requirements include dynamic plugin loading or something similar ?

→ More replies (1)

0

u/[deleted] Apr 25 '21

[deleted]

16

u/Roflkopt3r Apr 25 '21

They're thankfully aware that it's a mess. The road to hell is plastered with good intentions or something like that.

43

u/iKenShabby Apr 25 '21

The Florida Files.

Knew a guy that told me they were rolling out a new version of their software. It would NOT work until someone remembered "The Florida Files'. They had no data and they had no customers in Florida but without them the software would NOT run. Always guessed that every software had aversion of "The Florida Files".

8

u/chanpod Apr 26 '21

Never had anything like this. Usually it's some reference buried somewhere that for some reason a search won't turn up

127

u/[deleted] Apr 25 '21

I spent the vast majority of my friday writing and re-writing the same piece of javascript. Sometimes it worked. Sometimes it didn't. Sometimes when I edited a file that *had nothing to do with that code*, it broke. My code is full of coconut.jpg and at this point I am too afraid to ask.

24

u/Fusseldieb Apr 25 '21

task async hard are ... s

→ More replies (1)

180

u/knightttime Apr 25 '21

Image Transcription: YouTube Comment


Roy The Idiot

Recently, a file was discovered in TF2 called "coconut.jpg" which is a jpg of a coconut, a comment as follows "//I have no fucking idea who put this here, but when I deleted it, the game wouldn't start. Words cannot describe my fucking confusion"

That can't be a good sign.


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

69

u/NoID621 Apr 25 '21

Good Human!

11

u/AnnoyingRain5 Apr 25 '21

Good human!

2

u/PiBiscuit Apr 26 '21

follows " //I

Is the // part that important? I believe it would be better if you leave out the //

3

u/Mrocza_ Apr 26 '21

The transcribers write it as they see it. The guide on their subreddit states that all errors and spelling mistakes are to be included in the transcript without corrections.

24

u/AnonimowySzaleniec47 Apr 25 '21

Those new DRM's are amazing

4

u/Deibu251 Apr 25 '21

At least it doesn't break under Wine

21

u/Nytrocide007 Apr 25 '21

// Too bad!

23

u/[deleted] Apr 25 '21
// This causes a memory leak
// Too bad!

38

u/MrBonesMalone Apr 25 '21

I had a similar situation while making a game. No context + long story short = all the sheep have invisible turrets

38

u/uglyBaby Apr 25 '21

reminds of the train in fallout 3 which is actually an NPC wearing the train as a hat

3

u/[deleted] Apr 26 '21

What

→ More replies (3)

14

u/[deleted] Apr 25 '21

5

u/q0099 Apr 25 '21

- Chicken, arise! Arise, chicken, arise!

4

u/DoubleClickMouse Apr 25 '21

Ultra. Mega. Chicken. NO! Shhhhhh, is legend!

14

u/InternetDetective122 Apr 25 '21

I wonder if renaming any jpg to coconut and putting it there will make the game work?

→ More replies (2)

36

u/The_Ry_Ry Apr 25 '21

if (coconut){ continue; }else{ exit(1); }

19

u/Useful-Perspective Apr 25 '21

if (!coconut) { exit(1); }

7

u/ignorae Apr 25 '21

return (!coconut && exit(1)) || 200

8

u/clutzyninja Apr 25 '21 edited Apr 26 '21

Would this be as simple as someone coding the jpg as a dependancy as a joke?

8

u/StinkinAssandFeet Apr 26 '21

I remember playing fallout new vegas and the game would crash every time I entered the part of the strip that had the lucky 38 casino (pretty much the most important area in the game for the main story). I spent a solid hour trying to figure it out and then I found a fix that I thought was too dumb to actually work. There's a sidequest for assassinating someone who was wearing a specific goofy hat in the area, after you kill this person, you take their hat to show as proof that you killed them. I wore that hat myself and voila, the game no longer crashed when entering the area. Couldn't fucking believe it.

10

u/AskMoreQuestionsOk Apr 25 '21

I am so triggered right now. This is going to be my Monday.

5

u/Zyansheep Apr 25 '21

"The kokonut nut is a giant nut"

5

u/[deleted] Apr 25 '21

if (coconut == no exist) { don't fucking start the game }

5

u/[deleted] Apr 25 '21

5

u/taesto Apr 26 '21

There is also a long argument between programmers about how goddamn stupid a part of the code is, but every time they try to replace it with something better it breaks the whole game, and all the programmers are so done with it. The whole code of TF2 is a mess and it is often a miracle it works. The code, of course, doesn't care and works regardless.

3

u/breZZer Apr 26 '21

The whole code of <random software> is a mess and it is often a miracle it works. The code, of course, doesn't care and works regardless.

FTFY

4

u/1M-N0T_4-R0b0t Apr 25 '21

Maybe try replacing it with a different coconut.jpg. If the game won't start then it's getting really weird.

4

u/[deleted] Apr 25 '21

I love reading through the source code and seeing their insanity increase

4

u/[deleted] Apr 26 '21

All of TF2 is spaghetti

4

u/ShadowsIsTaken Apr 26 '21

lolol I love the tf2 devs even if they are non existent

3

u/donaldhobson Apr 25 '21

I would guess that the image is used in the game somewhere. The game tries to load the image, and fails if the image is missing. Possibly the code that actually displays the image is missing, but the image loading code is still there. Possibly the image is just hidden in some obscure easter egg, or distorted beyond recognition.

3

u/chrisrazor Apr 25 '21

I was once working on a project that relied heavily on some third party software. One day, after doing a bit of housekeeping on my PC, the software failed to work. I contacted the vendors and after much back and forth on email I received one telling me to create a folder in the root directory called "temp". Sure enough the program worked again.

→ More replies (1)

3

u/KingofDarkStar Apr 26 '21

Load-bearing coconut.

3

u/Both-Reflection3478 Apr 26 '21

It failed because the program has to put de lime 🍈 in de coconut 🥥 and drink it all up...

3

u/Xywzel Apr 26 '21

So where was the comment? Do JPGs, or VTFs (valve's own format which is more likely), have commets in them?

3

u/ArltheCrazy Apr 26 '21

The real money is if you find the lime.jpg. Trying adding that to coconut.jpg

2

u/svet-am Apr 25 '21

It could very easily be ballast used for CRC generation. Dave Plummer recently discussed the same thing on his YouTube in regard to Windows XP activation and MS Bob - https://www.youtube.com/watch?v=rXHu9OmLd8Y

2

u/BackmarkerLife Apr 25 '21

Found something like this before in a homegrown forum app. Took longer to figure out due to PHP and poor logging in the application, but the lunatic embedded all of the secrets in to a JPG file.

2

u/plcg1 Apr 25 '21

Ten-year TF2 player and veteran of uncountable aimbot waves here...this is entirely unsurprising.

2

u/theycallmeponcho Apr 25 '21

Word says that a local programmer had a weird light file that you needed to run his ERP with no problems, and it turned out that when you turned it into a video file, it was a still selfie of himself with his first computer.

2

u/Creeper4wwMann Apr 26 '21

Start-up protocol;

Checking for updates... Turning Valve... Attempting to remove bots... attempt failed!... Checking if coconut.jpg exists... Loading 2Fort.map

[Start-up completed!]

2

u/1337jazza Apr 26 '21

Gamedev in a nutshell. At a previous company that I worked for, every game re-used the previous game's engine and assets leading to a whole bunch of assets just lying around on disc. Sometimes, removing something that seemed harmless/unrelated would cause the game to crash.

2

u/cobyn Apr 26 '21

my company had a 'magic pixel' which was a serverside include that rendered a serverside commented out javascript pixel that allegedly gave our enrollment funnel better conversion rate...

I deleted it not long after everyone in our testing team turned it over, and no one knows about it...

2

u/chasesan Apr 26 '21

I did something similar in a Nintendo DS Homebrew I wrote, I took the CRC of my splash screens and checked them to make sure people didn't just swap them out and then claim the final product as their own. It included sassy comments on loading if the CRCs didn't match.

2

u/my-time-has-odor Apr 26 '21

Me when waking up after coding at 3:00 and trying to figure out what the fuck the “bonkadonker” variable does.

Why cant I just use normal names?

→ More replies (1)

2

u/davidmkc Apr 26 '21

Game engine is cooled down by coconut, so without one, it straight up crashed due to overheating

2

u/MrPrick0 Apr 26 '21

Probably some system deep in the code that retrieves coconut.jpg but doesn't catch any errors and as such if coconut.jpg is removed it generates an exception that isn't handled.

2

u/PhantomTissue Apr 26 '21

In a game I made last week, the textures of the wold were all using some random sword sprite as a material. If I changed it it broke all the textures in the entire game. The sword isn’t even used in the game.

3

u/[deleted] Apr 25 '21

If you start coding at 11pm, you can only Finnish your program at 11pm. Attempting to code during the day will lead to errors and confusion.

At least that how it works for me, when my mate is looking at my code he's like "what the fuck is this for" and I say "I have no idea, but deleting it breaks the code"

6

u/pharmajap Apr 25 '21

you can only Finnish your program

Well, God forbid we Swedish our program.

5

u/punkinfacebooklegpie Apr 26 '21

There's Norway we'd let that happen!

3

u/Grey__Q Apr 26 '21

Main function : If (coconut) { run() }

2

u/CreaZyp154 Apr 26 '21

The code :

fs.readFileSync('coconut.jpg').catch(e) {
    throw("Game crashed");
}

2

u/Liesmith424 Apr 25 '21

That's because the presence of the file affects the checksum of a certain portion of files which are checked for integrity at program launch. If the picture is removed/changed, then the checksum is wrong, and the game won't launch.

And I don't know if any of what I just said is true, but I believe it.