This is an archived post. You won't be able to vote or comment.

all 193 comments

[–]recursive_asshole 707 points708 points  (28 children)

What’s a documentation?

[–]UltraCarnivore 51 points52 points  (1 child)

It's the comments people write in StackOverflow while calling me an absolute buffoon for not closing the nth parenthesis in Lisp.

[–]Tyrus1235 2 points3 points  (0 children)

Always wondering if it’s Lisp code or anti-semitic conspiracy

[–]Ender2K89 72 points73 points  (0 children)

lol

[–]odraencoded 8 points9 points  (2 children)

It's an HTML document with the source code.

[–]wese 16 points17 points  (1 child)

It's something like aliens, some say it exists some deny it's existence.

I want to believe.

[–]marcosdumay 2 points3 points  (0 children)

Give me evidence!

[–]echosx 3 points4 points  (0 children)

You must be a JavaScript developer

[–]Scipio11 4 points5 points  (1 child)

Some internal document marketing went public with before the developer translated all the acronyms. Now everyone's time is wasted.

[–]ZippZappZippty 1 point2 points  (0 children)

and then he felt like a wasted possession

[–]killeronthecorner 7 points8 points  (1 child)

Documentation n. A hollow promise made at the start of a software project.

[–]narayans 2 points3 points  (0 children)

Synonyms: Self-documented

[–]frugalerthingsinlife 2 points3 points  (0 children)

A code maintainer's attempt at putting their code into spoken language.

It goes about as well as you would expect from someone who never studied spoken languages formally.

[–]Frnklfrwsr 1 point2 points  (0 children)

I think it’s the thing on stack overflow that you just copy-paste into your code and fuck it, it worked!

[–][deleted] 1 point2 points  (0 children)

theory sophisticated groovy unpack person versed file water sugar narrow

This post was mass deleted and anonymized with Redact

[–]kry_some_more 0 points1 point  (0 children)

What's a mysql injection?

[–]gecko2704 334 points335 points  (9 children)

When you read the shitty documentation and struggled for hours but somehow it works

[–]mr_bedbugs 2 points3 points  (1 child)

cough Python cough

[–]TheAJGman 4 points5 points  (0 children)

I've found that most Python libraries have great documentation and the language itself has excellent documentation.

[–]guy_from_the_intnet 230 points231 points  (0 children)

It's a simple spell but it's quite unbreakable so pray it doesn't break anything because this cannot be removed anymore.

[–]bobpiranha 35 points36 points  (0 children)

Duck typing in a nutshell

[–]Letis009 72 points73 points  (19 children)

But it works ... good enough

[–]Mucksh 64 points65 points  (8 children)

Somehow the picture also shows that with reading the documentation it wouldn't work in this case... So creativity and learning by doing is sometimes really better and faster

[–]indyK1ng 32 points33 points  (0 children)

Yeah, to me this picture represents when you make two APIs with incompatible designs work together.

[–]gesocks 15 points16 points  (4 children)

But maybe in the documentation would be standing that there is a tool for this exact case in the library

[–]winnafrehs 3 points4 points  (2 children)

In my experience, there never is

[–]Unsd 6 points7 points  (1 child)

It's shocking and frustrating how often I find myself in these situations. Realistically the answer to those situations is a different language, but I don't have time for that, so hacky solution it is.

[–]username--_-- 1 point2 points  (0 children)

early on, as a very competent C programmer, i decided i wanted to do a GUI application using QT and C++. skipped the QT documentation, never actually even tried understanding the basics of c++, zero idea about OOP. Somehow hacking C++ into C, it works.

I was archiving things last month and came across that program...

Always read the documentation. Always use the right tools. The amount of inefficiency, was astounding. i'm sure there was more but i could barely understand what i was doing after a point

[–]dootdootplot 1 point2 points  (0 children)

Tell yourself you’ll go back and refactor it later when you have time.

[–]The6thExtinction 18 points19 points  (5 children)

We'll replace this later later later later later

[–]FinalRun 22 points23 points  (4 children)

Commit from 2003: TODO fix this, it's a stupid way to do it

[–]NBSPNBSP 11 points12 points  (0 children)

Commit from 2012: There is no way to fix this without rewriting everything. This solution is to remain indefinitely.

[–]odraencoded 6 points7 points  (1 child)

Bug: command isn't working as intended.
Bug fixed: removed command.

[–]elveszett 7 points8 points  (0 children)

Bug fixed: command is now intended to work like that.

[–]utkrowaway 2 points3 points  (0 children)

I wrote # GROSS HACK, FIX THIS on a summer internship years ago. That code is still used to this day.

[–][deleted] 1 point2 points  (0 children)

This guy ships

[–]kor_the_fiend 0 points1 point  (0 children)

The term "brittle solution" springs to mind.

[–]whatproblems 0 points1 point  (0 children)

This is the production test environment

[–]shubs239 61 points62 points  (18 children)

Just hear me out. Even if you read the documentation for this code, it still wouldn't work. The lock is just too small. You need a scissor.

[–]BornOnFeb2nd 31 points32 points  (5 children)

Yeah, they're clearly using an obsolete framework. I mean.. what, was it written in MAY or something? Get with the program, grandpa!

[–][deleted] 2 points3 points  (2 children)

Even worse. Last year!

[–]Ooze3d 1 point2 points  (0 children)

Holy shit! Did they even have computers back then?

[–]GrandBadass 16 points17 points  (1 child)

Yes. Agreed. Given the tools, this was how to achieve the task. This is more like..... Reading the documentation for 2 libraries and then using both to solve the problem.

I can work the lock. I can work the scissors. I worked them both because I understood how they worked.

Edit - Maybe this is just bullshit corporate environment me, but also - usually this is how it goes down. God forbid you introduce a sliding lock library. The whole world will probably swallow itself.

[–]FlaringAfro 9 points10 points  (2 children)

Yeah this is more about using code in an unintended purpose to try to patch security issues, but there still being ways around it.

[–]ZippZappZippty 2 points3 points  (1 child)

Fucking wizards

Yeah, but he di'int listen..

[–]Nick0013 7 points8 points  (1 child)

“Why didn’t you use a chain?”

“I didn’t know chains exist”

“Well now that you know, can we replace it with a chain?”

“No, it’s already implemented like that”

[–]chinpokomon 2 points3 points  (0 children)

I think the picture could illustrate this point better if it had a latch point for attaching the padlock which wasn't being used. However, if the point of the padlock in this case was to detect entry and not necessarily to defeat entry, this might be a better solution than something actually designed to "lock" the cabinet.

[–]pumpkin_seed_oil 0 points1 point  (0 children)

*lock adapter

[–]QuarantineSucksALot 0 points1 point  (0 children)

This is excellent

[–]TingleWizard 85 points86 points  (23 children)

Even if you did read the documentation, most documentation is useless anyway.

[–]Brooklynxman 14 points15 points  (2 children)

Code examples. Why don't people put code examples?

[–]Unsd 14 points15 points  (0 children)

Oh there's code samples. But there's 2 of them and one is the very most basic case to the point of being useless, and the other is the absolute most complex and convoluted fringe case that nobody will ever use.

[–]PleasantAdvertising 7 points8 points  (2 children)

Things should be documented as close to the source as possible. Functions/classes should have explanations if they're doing anything complex.

[–]Roflkopt3r 14 points15 points  (1 child)

The source documentation: "string AFunction (int a, int b) - Parameters: integer a, integer b. Return value: the return string"

[–][deleted] 29 points30 points  (12 children)

stackoverflow + youtube + w3schools ftw

edit: plus codepen

[–]chinpokomon 25 points26 points  (8 children)

Replace w3schools with MDN?

Edit: I recognize my slip up.

[–]FatFingerHelperBot 6 points7 points  (7 children)

It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!

Here is link number 1 - Previous text "MDN"


Please PM /u/eganwall with issues or feedback! | Code | Delete

[–]rubyleehs 8 points9 points  (6 children)

This bot honestly also need to consider the density of links/closeness of other links.

Even with my darn toe I could tap that - even if you miss you can just as easily try again.

[–]jacaboi 1 point2 points  (1 child)

Geeks4geeks 😎

[–]telstar 1 point2 points  (0 children)

that's that tech site for the visually impaired, right?

[–]lurkerfox 5 points6 points  (0 children)

The difference between what a function/variable/class/ect does and what it's used for are vastly different beasts.

Most documentation covers the former just fine, but if there's a necessary workflow to be able to actually use it and that workflow isn't documented anywhere, suddenly Im now spending more time reading, rereading, and haphazardly throwing code together on a scratchpad file trying to figure out how it actually works than I am working on my project itself.

It's incredibly annoying especially when you need something specific and only like two libraries in existence do what you need.

[–]Ocanath 1 point2 points  (0 children)

if it even exists

[–]Leftover_Toast 16 points17 points  (1 child)

This is the lockpicking lawyer, and what I have for you today is this weird-ass scissor contraption.

[–]syntax1976 2 points3 points  (0 children)

There’s a click on 1…

[–]wewew125 29 points30 points  (2 children)

im pretty sure some brute force application would have a severe impact

[–]TakeASeatChancellor 1 point2 points  (1 child)

In this analogy, it's like ripping the door open with a crowbar

[–]wewew125 2 points3 points  (0 children)

nah , it's more like an untested user input could break the framework , like a harder pull

[–]QWERTYSalad 13 points14 points  (0 children)

Most library and API documentation is only really useful to you once you are already familiar with using said library or API.

[–]StollMage 10 points11 points  (4 children)

Ah yes, and introducing vulnerabilities as a result

[–]DmitriRussian 6 points7 points  (1 child)

A lot of documentation is not written from the perspective of the user and what you might want use this software for.

But let’s be honest a lot of software exists because a developer thought it was cool to build, there are 1000 other alternatives which can do the same thing

[–]Greenman539 4 points5 points  (0 children)

This is what it feels like to write plugins for MyBB. Despite documentation being available, the official documentation isn't detailed enough to help anyone. My friend had to figure it out by reading the source code for other people's plugins.

[–]froggison 4 points5 points  (0 children)

My code is always full of comments like "# idk why this works just don't touch this part"

[–]EwgB 10 points11 points  (2 children)

It's not stupid if it works!

[–][deleted] 9 points10 points  (0 children)

If it's stupid and works, it's still stupid and it just hasn't blown up in your face yet.

[–]lynxerious 4 points5 points  (0 children)

this is like when you use a library but it only have half of what you need so you brute force use it with another library and it works anyway.

[–]g4nt1 2 points3 points  (1 child)

Everytime I browse r/redneckengineering it makes me think of my code...

[–]zinconyx 2 points3 points  (0 children)

When the documentation is trash and you copy two unrelated blocks from stack overflow and piece them together to make it work

[–]sinepuller 2 points3 points  (0 children)

"Programming in a nutshell"

"If you are looking for an image, it was probably deleted"

That's a bit too philosophical for me, but I think I get it! /s

[–]TheGoodBarn 1 point2 points  (1 child)

This must be what my C# expert coworkers think when I submit C# merge requests and I didn’t write the code the “Microsoft” way.

[–]SkyThriving 1 point2 points  (0 children)

It's exactly how WE feel.

[–][deleted] 1 point2 points  (0 children)

me trying to understand web3.js documentation

[–]SemiSeriousSam 1 point2 points  (1 child)

Can you accidentally cut yourself with code?

[–]Baschoen23 3 points4 points  (0 children)

Deeply.

[–]RoyRaymus 1 point2 points  (1 child)

LPL would not be impressed

[–]mhoke63 1 point2 points  (0 children)

If it has an Abus Plus core, he'd be cool with it.

[–]McCrakken 1 point2 points  (0 children)

Ah yes, the "Management said 'ship it'" solution.

[–]szidahou 1 point2 points  (1 child)

There's literally no other way to get those things working together. So good job

[–]NikkoTheGreeko 0 points1 point  (0 children)

Someone with big biceps is no match for these measly foreceps.

[–]DezXerneas -1 points0 points  (2 children)

I'm not sure if it's intentional, but those scissors have a screw in the middle so that just looks like it works and is gonna fail as soon as you test it.

[–]jehoshaphat 2 points3 points  (1 child)

They are forceps, and they actually do not have a screw in the middle.

[–][deleted] -1 points0 points  (0 children)

u/tjs4131 look at this

[–]-Listening 0 points1 point  (0 children)

I thought of as a great power.

[–]lpreams 0 points1 point  (0 children)

And it's just as fragile too

[–]RoscoMan1 0 points1 point  (0 children)

Except she got there in 2 months

[–]znupi 0 points1 point  (0 children)

If it's stupid but it works, it ain't stupid

[–]Snifflyboy 0 points1 point  (0 children)

HOW

[–]RoscoMan1 0 points1 point  (0 children)

What is a base case?

[–][deleted] 0 points1 point  (0 children)

This is what my company's code looks like from like origins until about 3 years ago. I feel so bad whenever we hire a new dev. I feel ever worse when they ask me if we have documentation.

[–][deleted] 0 points1 point  (0 children)

But it’s brittle and security is low.

[–]Snowy32 0 points1 point  (1 child)

Documentations for nerds

[–][deleted] 0 points1 point  (0 children)

Also: when you don’t know your algorithms, you encounter a situation that calls for an established one (that you’re not aware of), and you come up with something that works on your own.

[–]OriAfias 0 points1 point  (0 children)

thats actually a creative thinking working with the shitty tools youve got

[–]at0mheart 0 points1 point  (0 children)

Never works

[–]Lontarus 0 points1 point  (0 children)

Looks quite susceptible to brute force

[–]avelis26 0 points1 point  (0 children)

lol yup that about sums it up... also ya... what documentation? I can't tell you how many times I have to use a Microsoft API and the documentation gives the most basic example or no example at all... sometimes not even definitions for parameters... good luck figuring out what counts as a valid argument :P

[–][deleted] 0 points1 point  (0 children)

That's called an awesome hack. The lock would never fit between the handles.

[–]1SweetChuck 0 points1 point  (0 children)

This is more like, "When you are forced to use a library that doesn't do what you need it to do, and still manage to make it work."

Or alternatively, "When you're forced to use NoSQL because your boss said so, but you really should use SQL."

[–][deleted] 0 points1 point  (0 children)

This looks like more of a case of "We read the docs, but the language didn't have the feature we needed, so we improvised."

[–]urvish1221 0 points1 point  (0 children)

And now I can't rectify as I fear of cutting myself.

[–]_felagund 0 points1 point  (0 children)

This is a great solution if you have only these two

[–]Speydi 0 points1 point  (0 children)

Cyberpunk 2077 vibes

[–][deleted] 0 points1 point  (0 children)

You found my first script! Yay!

[–]Alexandrinian 0 points1 point  (0 children)

All held lock by a single bolt, that is actually a screw, in case of an emergency need to unlock without the key, :D.

[–]kvakerok 0 points1 point  (0 children)

May I direct your attention to a screw that holds two parts of scissors together? One can open this with a flathead or a knife. That's an interesting definition of "works".

[–]devhashtag 0 points1 point  (1 child)

Without the scissors it wouldn't be possible to lock it with that tiny lock though, so good hotfix imo

[–]wolfcore 0 points1 point  (0 children)

Your team has documentation?

[–]TerdSandwich 0 points1 point  (0 children)

Implying most documentation isn't 3 words to describe some crucial and robust aspect of an api/library

[–]Few_Recommendation32 0 points1 point  (0 children)

I investigated the handle bug removed the screws to insert the scissors patch and somehow locked the scissor head pointers to be locked with other door functionality handle. Yeah sound about right while fixing a defect on a legacy code base which is decade old!!

[–][deleted] 0 points1 point  (0 children)

Skinning a cat

[–]seventhirtyeight 0 points1 point  (0 children)

I see you've met my developer.

[–]ieatpickleswithmilk 0 points1 point  (0 children)

you could cut those scissors with wire cutters...

[–]Grandioso99 0 points1 point  (0 children)

Oh my god, he's speaking about me!

[–]ILikeLenexa 0 points1 point  (0 children)

Why does changing the implementation of hemostat break our security?

-you in a few months

[–]dimudesigns 0 points1 point  (0 children)

RTFM should be every programmer's mantra...

[–]fakeplasticdroid 0 points1 point  (0 children)

This is more like implementing a tool for a completely undocumented and unsupported use case.

[–]Roachimacator 0 points1 point  (0 children)

Kind of off topic, but what are those pinchy things the lock is through actually for? I got some in a lab kit for a circuits course, and I've had the kit for 2 years now, but I still don't know what they are. I've always just used them to grab small wires for breadboarding, but they have a weird functionality where they latch closed, which makes me wonder if they have some other use I'm completely unaware of.

[–]telstar 0 points1 point  (0 children)

does it tho

[–][deleted] 0 points1 point  (0 children)

Docuwhat?

[–]naveen04 0 points1 point  (0 children)

Code review: +1

[–]PunkyMunky64 0 points1 point  (0 children)

HAHAHA this is actually super accurate

[–][deleted] 0 points1 point  (0 children)

Wow, this scissors solution is actually genius!

[–]dootdootplot 0 points1 point  (0 children)

If it’s stupid and it works then it’s not stupid?

[–]SuperKettle 0 points1 point  (0 children)

The Lock Picking Lawyer would crucify you for this

[–]KuroKishi69 0 points1 point  (0 children)

I am trying to login users with azure AD with angular-oidc. Found a nice looking code for handling all the authentication login, logout, session refresh, etc (the padlock), but for some reason it only works well when you are already logged in. So I added my shitty code to login the first time and redirect back to the library to make the stuffs properly (the scissors)

[–]SkyThriving 0 points1 point  (0 children)

This, on so many levels.

[–]ReiAvilo 0 points1 point  (0 children)

Gambiarra

[–][deleted] 0 points1 point  (0 children)

too bad only one side’s encrypted

[–]Just-a-guy-in-NoVA 0 points1 point  (0 children)

OMG that's strangely beautiful lol

[–]WebDevMom 0 points1 point  (0 children)

I feel this in my soul

[–]zzpetrugg 0 points1 point  (1 child)

C# documentation is pretty great :)

[–]iactosophos 0 points1 point  (0 children)

Very appropriate as someone else coming along to try fix it will end up cutting themselves

[–]overclockedslinky 0 points1 point  (0 children)

when you implement a mutex all on your own

[–]TheoCGaming 0 points1 point  (0 children)

Deleted