Yup, a lot of my work involves open source projects so I have the benefit of being able to go through the authoritative source code myself if need be. Really sucks for stuff like "black box" appliances though.
This is one of those situations where even though I believe a motivated human could do a better job, in practice AI will produce better results because humans just aren't motivated to write good documentation.
But it's a much easier task to have the AI just verify that the documentation is correct. It still has the possibility of error, but with both the documentation and the code, the chances are pretty low.
Basically the idea is that in whatever docstring that you usually add to a function for documentation, you include some special syntax to illustrate an example of how to use that function, you have some tool to extract and run that example. Thus, you become able to catch outdated documentation as a part of your build process.
It's easily one of my favorite things about Python. I can set up some quick-and-dirty tiny functional unit test and keep it in version control with the rest of the code. Personally I like writing my doctests similar to this:
#!/usr/bin/env python3
importdoctestdefis_this_good(thing:str)->bool:"""
Checks if the thing is a good thing.
Doctests are good.
>>> assert is_this_good("doctests")
Facism is not.
>>> assert is_this_good("facism") == False
Being able to drop into the python debugger when an assertion fails from a
doctest is cool, but not something to include in CI/CD
>>> some_bullshit_condition = False
>>> assert some_bullshit_condition, breakpoint()
"""good_things={"doctests","puppies","boobs","world peace"}returnthingingood_thingsdefmain():doctest.testmod()if__name__=="__main__":main()
Oh, so functionally you're just writing your tests directly in your code without a tests.py for the basic stuff. That's really cool, I think I might start integrating it into my codebases too.
PHP has a lot going against it but it has the best docs, even if they were wrong they have community comments on every page so there are usually corrections in them and plenty of real world examples on usage.
In may situations, the documentation only covers 7% of the actual behaviour and almost none of the corner cases and the user's only choice is to empirically discover stuff.
Yeah, I honestly don’t understand it when people say “just read the docs” when every time I look at docs I go “I have no idea how the hell to even get started.”
It’s like if LEGO instructions were just the inventory of all the pieces, and assumes the reader knows how to put them together.
Damn, it works for your language? It almost works for what I code in, but then it'll give some completely unhinged answer formed by confusing three generations of hardware, each with increasingly worse documentation.
Just curious what do you work on? At this point, even the google search overview *usually* answers any question I type in accurately, and if not that then chatgpt will explain anything I ask and is almost never wrong on like... any technical question I ask, about anything. It's kind of frightening. And then agentic coding is its own thing, of course.
I work on ladder logic/CNC/Sinumerik. It's good enough with CNC, can usually answer questions about PLC, but I wouldn't trust it with more than a few rungs (and it's hard for it to read in ladder logic). On Sinumerik it get about halfway to an answer, then again, I only give it difficult tasks that I can't already do, there's about a 30% task that whatever I'm asking it to do is actually bugged and won't work (either because of actual bugs or because of electrical issues).
yea i dont think there was very much publicly available material for industrial applications like that. its the same reason it's so hard to get a fuckin' inverse kinematics controller working on like old used robotic arms. there's a guy on youtube whose literal channel is devoted to reverse engineering industrial controllers, excessive overkill, where he's spent years tinkering with PLCs to get second hand arms working. compare that to the 10,000 hours of CSS tutorials that AI companies can feed to the machine.
what you personally might wanna do is digitize every scrap of siemens coding docs or whatever you have and feed that into training/recontexting one of the programming AIs on hugging_face. i only vaguely know how to do that, but that is one of the things you can ask the robots/youtube videos to help with lol.
Oh yeah it's horrible for PLC stuff. I use TwinCAT 3, and for example when i look for a function block i either get deprecated documentation from TwinCAT 2, some documentation from a completely unrelated package, or something related to configuration instead of PLC programming.
Yeah seriously, most SDK documents I've read are basically "Here is a list of classes". That's nice, but what the f*ck do those classes do and how am I supposed to use them? What am I supposed to use ExternalIntentBoxSub.func_a() for?
Even worse, "this is a wrapper in language A for language B" but the functions use different names so you can't even compare the wrapper functions to the somewhat decent documentation in the native language.
This wasn't even true back in the day. Documentation was often horse shit, which is why stack overflow was so big. Often times it would just be a single example that didn't even use the same function. Even stuff that should be super well documented like a Microsoft library is often lacking.
The last place I worked at preferred everyone to look busy. This justified why there wasn't any documentation for anyone to study. Why let a job take an hour if we can bill the customer for a month?
Assuming that you had any freaking documentation or that the documentation was worth anything, I would read it! This instead of actually making me rely on YouTube where some YouTuber did your own freaking job for you and wrote a tutorial on how to implement your freaking software when you should have freaking done it yourself!
Also: I remember reading the documentation to a well known REST server framework, only to find that the consensus was "Of course you're not supposed to use it like literally any of the examples suggest, that'd work only for a handful of endpoints and would be stunningly unscaleable."
I had a coworker…. We traveled the world doing work as a team. I never read documentation and figured things out through trial and error… lots of error. He, on the other hand, would sit and read the whole owner’s manual first. We usually accomplished the tasks at the same time. But the whole time he was upset at me for not going slow and logically, and I was mad at him for not taking actions and just sitting around reading. What a great guy. Became the godfather of my son. But still, wildly different approaches. Neither was wrong.
Which documentation? The vendor documentation is sometimes worthwhile, although mostly it tells me stuff I could learn by introspecting the code. Internal documentation is just about never worth reading, it is so rarely complete and up-to-date. Neither kind is likely to come with much about theory of operation.
Given the volume of documentation for public APIs that's flat wrong, outdated, incomplete (or all three)... I've just come to accept that poking at it is part of the job.
And now with the magic of AI, we can let the machine spend a few minutes randomly trying things instead, and then when it doesn't work we spend a few hours figuring out what it broke and why!
Documentation be like ThingMaDongFactory produces ThingMaDongs. Here's 5 different overloads for using it all requiring you to pass in a ThingMaTangConfig. Why would you even want a ThingMaDong? Who knows?
Documentation is only useful, when it was produced with more effort than just running Doxygen. Signatures I can get from autocomplete.
It would be interesting to know if there's a gender difference here. Like, is there a parallel to asking for directions or reading the instructions on kit furniture?
Psh, if I read the docs I wouldn't understand the ins and outs of how the multiprocessing manager was implemented in python and how to hit it with a hammer in order to get it to support the use of data descriptors.
Nowadays it's: why would you spend 10 minutes reading the documentation when you could spent several hours confused about what your AI incorrectly summarized from it?
Technical documentation really sucks for consumption. Clicking around between various pages to find information is actually hard compared to thumbing through a book.
Depends how much time you're given to build/implement something. Critical bug, solution required ASAP? Go RTFM. A low-pressure new feature implementation where you ran into a particular non-straightforward problem? Sure, go explore.
Because the documentation only shows the trivial use case that a blind chimp could figure out in 10 seconds! Show the complex example ffs, or don't bother documenting it at all, since I'm going to have to read the code anyway
Unfortunately if the only way to "try things" is to go through CICD pipeline because shit you're trying to access is only available from the cluster, it becomes way less fun.
What documentation? All developers that I know despise writing any sort of documentation. They are more likely to implement some AI agent to write it for them
Reading the documentation doesn’t bring experience… it’s like you’ve got ‘university textbook devs’ and ‘at young age trying shit out devs’…. The textbook devs shit their pants when they get out of school and have to do what’s asked of them…. The ones that started young where hardend from the start 🤣
464
u/The_Fresh_Wince 2d ago •
Trying things is why I got into the biz. Who cares about my boss' goals?
198
u/xgabipandax 2d ago
Because often documentations are written in a way that is easy to understand if you already know how things work.
206
u/minaolensinaolet 2d ago
Man I remember what this was like. Back when we didn't have the "answers any specific technical question instantly" machine
24
u/DragonfruitGrand5683 2d ago
When you look at the documentation and it's like:
"Yeah this is the plugin for program A, feel free to contribute"
Followed by code with oddly named everything, no comments and a bizarre design.
14
u/Zefirus 2d ago
This wasn't even true back in the day. Documentation was often horse shit, which is why stack overflow was so big. Often times it would just be a single example that didn't even use the same function. Even stuff that should be super well documented like a Microsoft library is often lacking.
7
u/whydoucare64 2d ago
What documentation?
7
u/howtotailslide 2d ago
The version of this I frequently quote is
“Why spent 10 seconds doing something when I can spend 10 hours failing to automate it?”
6
u/jhill515 2d ago
The last place I worked at preferred everyone to look busy. This justified why there wasn't any documentation for anyone to study. Why let a job take an hour if we can bill the customer for a month?
5
u/Adventurous_Cycle_85 2d ago
Assuming that you had any freaking documentation or that the documentation was worth anything, I would read it! This instead of actually making me rely on YouTube where some YouTuber did your own freaking job for you and wrote a tutorial on how to implement your freaking software when you should have freaking done it yourself!
5
u/EuenovAyabayya 2d ago
Why would you ever believe anything you read in the documentation? Looking at you, Microsoft.
25
u/Objectionne 2d ago
Outdated tweet. I have Claude to do this shit for me now.
3
u/Turbulent_Stick1445 2d ago
What documentation?
Also: I remember reading the documentation to a well known REST server framework, only to find that the consensus was "Of course you're not supposed to use it like literally any of the examples suggest, that'd work only for a handful of endpoints and would be stunningly unscaleable."
And that at least had documentation...
3
u/-Casey-Diaz- 2d ago
The documentation was outdated the second is was written, and it doesn't cover what I need to know.
5
u/ganja_and_code 2d ago
The latest version:
Why would you ever spend a few hours randomly trying things when you can spend a few days asking an LLM to randomly try things?
2
u/Alex_Strgzr 2d ago
Cos the documentation is often... Wrong. Or doesn't answer what I'm looking for
2
u/ieatpickleswithmilk 2d ago
read? I do enough of that scrolling through the autocomplete function options
2
u/SaltyDogBill 2d ago
I had a coworker…. We traveled the world doing work as a team. I never read documentation and figured things out through trial and error… lots of error. He, on the other hand, would sit and read the whole owner’s manual first. We usually accomplished the tasks at the same time. But the whole time he was upset at me for not going slow and logically, and I was mad at him for not taking actions and just sitting around reading. What a great guy. Became the godfather of my son. But still, wildly different approaches. Neither was wrong.
2
u/Groundskeepr 1d ago
Which documentation? The vendor documentation is sometimes worthwhile, although mostly it tells me stuff I could learn by introspecting the code. Internal documentation is just about never worth reading, it is so rarely complete and up-to-date. Neither kind is likely to come with much about theory of operation.
3
u/Valkyrie17 2d ago
This sub keeps living in the past huh
3
u/Woofie10 2d ago
Now you can argue with AI
2
u/Silly_Guidance_8871 2d ago
Given the volume of documentation for public APIs that's flat wrong, outdated, incomplete (or all three)... I've just come to accept that poking at it is part of the job.
1
u/xaviernoodlebrain 2d ago
1
u/alvares169 2d ago
I mean it is funnier
or was
ehh
1
u/Cactusjuicesupplier 2d ago
This is the way.
1
u/echtogammut 2d ago
I learn a lot more trying things randomly and often the documentation is wrong.
1
u/mmulligan03 2d ago
Or ask a senior engineer. So they can point you to the exact documentation needed to do your task
1
u/stackoverflow21 2d ago
It’s for the satisfaction of figuring it out
1
u/-Redstoneboi- 2d ago
damn, pre-ai meme. god knows what the current workflows are.
1
u/ZeMoose 2d ago
Porque no los dos?
1
u/Ma8e 2d ago
I like the variation that I found at an office door at university: "A month in the lab saves an hour in the library."
1
u/slaaneshStoic 2d ago
Man i miss this
Now that ai is here i no longer have these moments
1
u/red286 2d ago
Reminds me of when I used to pirate C64 games as a kid.
No instructions, and those games usually didn't have any sort of help menu or anything either. You figured out the game by trying random shit.
1
u/YetMoreSpaceDust 2d ago
Because management gets way pissed when they catch you reading documentation, but they love seeing you flail around.
1
u/PassiveMenis88M 2d ago
Why spend a few minutes making your own meme when you can just repost things from years ago?
1
u/ZunoJ 2d ago
The good old days
1
u/56kul 2d ago
Trying things sounds more fun, tbh. You get to kinda tinker and explore things yourself.
1
u/squat_bench_press 2d ago
Thankful for this, it keeps me in a job because our customers dont read manuals.
1
u/Quicker_Fixer 2d ago
1
u/thegreatpotatogod 2d ago
And now with the magic of AI, we can let the machine spend a few minutes randomly trying things instead, and then when it doesn't work we spend a few hours figuring out what it broke and why!
1
u/ac_cossack 2d ago
That's right, the square hole.
1
u/luisduck 2d ago
Documentation be like ThingMaDongFactory produces ThingMaDongs. Here's 5 different overloads for using it all requiring you to pass in a ThingMaTangConfig. Why would you even want a ThingMaDong? Who knows?
Documentation is only useful, when it was produced with more effort than just running Doxygen. Signatures I can get from autocomplete.
1
u/IlliterateJedi 2d ago
Just ask how to do it on StackOverflow bazinga
1
u/Illustrious-One9026 2d ago
Good old days i guess
1
u/thisguyfightsyourmom 2d ago
This post assumes docs are up to date. That’s a hit or miss proposition in reality though.
Plus, the undocumented edges are potentially going to reveal potential issues and opportunities you will probably trip over or miss in the docs.
Reading the source is literally where it’s at.
1
u/Sad_Split_9983 2d ago
You mean spend a few minutes having Claude figure it out ?
1
u/InDaBauhaus 2d ago
half of the documentation is just weird names of objects with no explanation of anything anywhere
1
u/dallenbaldwin 2d ago
1
u/Glum-Welder1704 2d ago
It's a man thing. "When all else fails, read the directions."
1
u/az987654 2d ago
Spend an hour begging claude to "do it right"
1
u/bmr42 2d ago
Unfortunately they do neither. Instead they don’t read it, don’t try anything and call support to fix it because it doesn’t work like magic.
1
u/barnabusbrown 2d ago
I'm afraid to admit I have a nasty habit of this...
1
u/bwwatr 2d ago
It would be interesting to know if there's a gender difference here. Like, is there a parallel to asking for directions or reading the instructions on kit furniture?
1
u/tubbstosterone 2d ago
Psh, if I read the docs I wouldn't understand the ins and outs of how the multiprocessing manager was implemented in python and how to hit it with a hammer in order to get it to support the use of data descriptors.
1
u/firedog7881 2d ago
Undocumented Features *UNLOCKED*
1
u/Captain_Forge 2d ago
LLMs be like
1
u/Danjou667 2d ago
Good old times ffs.
1
u/darkslide3000 2d ago
Nowadays it's: why would you spend 10 minutes reading the documentation when you could spent several hours confused about what your AI incorrectly summarized from it?
1
u/Resident-Spirit808 2d ago
Technical documentation really sucks for consumption. Clicking around between various pages to find information is actually hard compared to thumbing through a book.
1
u/corgilordazula 2d ago
You guys have documentation??
1
u/i-sage 2d ago
My AI agents gulps it and still hallucinates
1
u/strife25 2d ago
Jokes on you -getting lost in confusing docs for hours is how I do it.
1
u/sexarseshortage 2d ago
Show me an engineer that reads the instructions and I'll show you a liar. Reading that shit feels like cheating at the puzzle.
1
u/BigWangersIncTm 2d ago
Because the documentation is either outdated or non-existant, so randomly trying things is your best shot at understanding it.
That's what it was like in my old company at least, lol
1
u/ryanstephendavis 2d ago
Why read the documentation when you can have an agent give you half hallucinated slop versions of them
1
u/DTCreeperMCL6 2d ago
You activated my trap card: I can do both at lnce
1
u/yiliu 2d ago
You never know, maybe I'll get it right on the first try! Worth a shot.
Hmm, that didn't work, but I just thought of another possibility, might as well at least try it...
Okay, so that wasn't it, but now that I think of it...
1
u/Digital_001 2d ago
What if there's no documentation
1
u/Somanath444 2d ago
Probably of 2 things.
1
u/BusinessBroccoli4313 2d ago
"nooo still broken fix it"
1
u/MrDilbert 2d ago
Depends how much time you're given to build/implement something. Critical bug, solution required ASAP? Go RTFM. A low-pressure new feature implementation where you ran into a particular non-straightforward problem? Sure, go explore.
1
u/OhNeutralOne 2d ago
Just feed AI the documentation instead! Then spend a few hours trying things...
1
u/Que_te_cojan_stultus 2d ago
Unironically read the documentation when I first got RPG maker MZ, made it WAAAAY less confusing
1
u/Tenezill 1d ago
Things of the past
1
u/contentatlast 1d ago
Don't call me out like this
1
u/jimlapine 1d ago
This is the way
1
u/jaded-potato 1d ago
Ah yes, back when humans wrote code by hand.
1
u/millebi 1d ago
Because the documentation only shows the trivial use case that a blind chimp could figure out in 10 seconds! Show the complex example ffs, or don't bother documenting it at all, since I'm going to have to read the code anyway
1
u/robin_888 1d ago
The next thing you try could work, saving you the time to look up if there is proper documentation.
1
u/LogicBalm 1d ago
Meanwhile the documentation is like:
X: a variable named X where data is temporarily stored
1
u/Ronin-s_Spirit 1d ago
Sometimes the documentation is so ass shit that it is begging me to type random things until it works.
1
u/funnyFrank 1d ago
I feel attacked 😑
1
u/LieutenantNitwit 1d ago
I feel attacked
1
u/octelium 1d ago
I can't read the documentation, there are only ad sponsored youtube tutorials about it.
1
u/Gurnug 1d ago
Then you go to documentation and you already know it is outdated and wrong because it describes things that you already tried and it failed.
1
u/sleepy771 1d ago
no!
1
u/124k3 1d ago
There is a saying "fk around find out". Builds character and teaches you things
1
u/_Weyland_ 1d ago
Unfortunately if the only way to "try things" is to go through CICD pipeline because shit you're trying to access is only available from the cluster, it becomes way less fun.
1
u/zqipz 1d ago
Testing how intuitive a thing is.
1
u/jack_nomad_8 1d ago
AI reads the docs, I try random stuff, then I ask wtf I'm doing wrong.
1
u/guidedhand 1d ago
Why would you read documentation when it's all ai generated?
1
u/sefres 19h ago
yeah thas right
1
u/GeorgeBlackhole 17h ago
What documentation? All developers that I know despise writing any sort of documentation. They are more likely to implement some AI agent to write it for them
1
u/3dutchie3dprinting 15h ago
Reading the documentation doesn’t bring experience… it’s like you’ve got ‘university textbook devs’ and ‘at young age trying shit out devs’…. The textbook devs shit their pants when they get out of school and have to do what’s asked of them…. The ones that started young where hardend from the start 🤣
-1
u/Acclynn 2d ago
Can we have a rule in this sub to stop reposting outdated shit
It's 2026, everyone offloaded the "read the documentation" part to agents, then agents are the ones randomly trying things
0
u/RayzorDragon 2d ago
-1
u/MornwindShoma 2d ago
Nowadays... Ask AI. Unfortunately