|
Shaggar posted:javadoc type docs are almost optional if your api is simple enough and doesn't have retarded method names. except that a lot of java libs nowadays define their own exception hierarchy descended from runtimeexception so you need the javadoc to find out wtf
|
# ? Apr 26, 2013 23:37 |
|
|
# ? May 23, 2024 17:43 |
|
one of the things i like about ember.js is that they do a decent job of pairing getting started guides, task-specific guides, conceptual guides, and then a shitload of api documentation built w/ yuidoc (which is javadoc for any language with /* block comments */) not all of those things are very well-done, but at least they're trying to be more robust than most
|
# ? Apr 26, 2013 23:40 |
|
MononcQc posted:Yes and no. The question is about the same topic, but the answer you expect isn't the same. It's possible to get the answer to the higher-level question using the API doc, the same way it's possible to get it from the source. It doesn't mean it's desirable, though. thanks for this post, i enjoyed reading it
|
# ? Apr 26, 2013 23:57 |
|
Nomnom Cookie posted:except that a lot of java libs nowadays define their own exception hierarchy descended from runtimeexception so you need the javadoc to find out wtf anyone who does that should be murdered unless they have a damned good reason to do it
|
# ? Apr 27, 2013 00:00 |
|
B-smooth posted:thanks for this post, i enjoyed reading it
|
# ? Apr 27, 2013 00:15 |
|
Shaggar posted:anyone who does that should be murdered unless they have a damned good reason to do it i agree but i'll settle for decent docs
|
# ? Apr 27, 2013 00:25 |
|
exceptions coming from libs i write are unchecked but thats because if they were checked my coworkers would catch(Exception e) { e.printStackTrace(); } if they're unchecked then they just ignore exceptions and they can bubble up to a sane catch block (also written by me)
|
# ? Apr 27, 2013 00:30 |
|
MononcQc posted:Yes and no. The question is about the same topic, but the answer you expect isn't the same. It's possible to get the answer to the higher-level question using the API doc, the same way it's possible to get it from the source. It doesn't mean it's desirable, though. ahem, did you actually compare the two examples posted earlier critically? because when I looked at those to answer the question "what's this useful for?", the tutorial went off on some weird invented wombat creature tangent to talk about state machines in erlang and the edoc answered the question in 3 sentences: Given a callback module implementing the proper_statem behaviour (i.e. defining an abstract state machine of the system under test), PropEr can generate random symbolic sequences of calls to that system. As a next step, generated symbolic calls are actually performed, while monitoring the system's responses to ensure it behaves as expected. Upon failure, the shrinking mechanism attempts to find a minimal sequence of calls provoking the same error. i'll admit i'd have never found the edoc page on my own so it's not perfect or anything, but that's mainly because Prop-E, Stat'Em! is a name for a disney movie, not for a source code module MononcQc posted:The person or team who produces the code and the javadoc should also provide a simple tutorial, instructions on how to get started, how to install and/or configure the app or library, or point to a place that shows how to. It should tell the user why it was written, what it does, etc. sure, but what about the quality of the documentation? your source code may be covered by tests, you may have a lint-tool to show if apidocs are missing or contradicting the API. what about the code that gets published in various tutorials and guides, is that code covered by tests like the other code? if something breaks a tutorial,
|
# ? Apr 27, 2013 00:32 |
|
Win8 Hetro Experie posted:ahem, did you actually compare the two examples posted earlier critically? because when I looked at those to answer the question "what's this useful for?", the tutorial went off on some weird invented wombat creature tangent to talk about state machines in erlang Near the beginning of the tutorial: "PropEr fsm offers a convenient way to test systems exhibiting a finite state machine behaviour. That is, systems that can be modeled as a finite collection of named states and transitions between them." It then goes on and describes a finite state machine, and writes tests for it. It also lists prerequisite documents to read if you want to be sure to understand everything. Win8 Hetro Experie posted:sure, but what about the quality of the documentation? your source code may be covered by tests, you may have a lint-tool to show if apidocs are missing or contradicting the API. what about the code that gets published in various tutorials and guides, is that code covered by tests like the other code? if something breaks a tutorial, Well, documentation is hard. There's no way around it for now. Let's go shopping. I know I wrote tests for all of LYSE's code, and can still run them (anyone can, it's shipped with the .zip file you download). It actually caught errors in the text when tests would pass with the final snippet but an update was forgotten in the book. They got fixed or added to the errata. Some Haskell book's source content can be scanned, compiled, and tests ran over it (it might have been Real World Haskell, I can't remember). Python has doctests so that the documentation's examples also function as unit tests. Knuth recommended literate programming as a way to do things. If anything, the difficulty of verifying that code snippets in documentation are executing as planned is a problem with the tools, not with the nature of documentation itself. Tracking changes in tools was likely lovely as hell before decent source control. Things are far from perfect, and it's absolutely painful to write documentation and then have to update it. Software has bugs, and documentation will similarly have errors in it. It's a bit stupid to pretend otherwise, but it can be improved, I think.
|
# ? Apr 27, 2013 01:03 |
|
MononcQc posted:Near the beginning of the tutorial: "PropEr fsm offers a convenient way to test systems exhibiting a finite state machine behaviour. That is, systems that can be modeled as a finite collection of named states and transitions between them." It then goes on and describes a finite state machine, and writes tests for it. It also lists prerequisite documents to read if you want to be sure to understand everything. that's so generic it's meaningless. ok, so I could model all of my code as a state machine and use this to test it, but should I? will it be a lot of work and if so, what is my upside? but no, let's talk about this cheese-eating wombat and his trips to the cheese-store I couldn't care less about MononcQc posted:Well, documentation is hard. There's no way around it for now. Let's go shopping. this is cool and I applaud you for keeping your example code working. MononcQc posted:If anything, the difficulty of verifying that code snippets in documentation are executing as planned is a problem with the tools, not with the nature of documentation itself. Tracking changes in tools was likely lovely as hell before decent source control. the way you create documentation is heavily dependent on the tools that are available for documenting. your documentation is only ever as good as your tools enforce, or better. so what to do help things along? ewll, you mentioned a .zip of code examples, so here's an idea: people should take their example code snippets and turn them into a new project that depends on the original code. it has to be a different project so the example code doesn't become deprecated or dead, and ideally have a different maintainer too and if this new project is programmed using literate programming, we'll arrive back where we started: the code is again the documentation
|
# ? Apr 27, 2013 14:09 |
|
MononcQc posted:Well, documentation is hard. There's no way around it for now. Let's go shopping. and, many professional outlets employ technical writers. programmers are not expected to be good at it. programming education focuses very little on effective communication, and for some, the motive for learning to code was to avoid writing things in a human language. writing effectively, clearly is a similar challenge to writing code. both require practice to refine the skill. we just don't practice writing docs as much as we do code. quote:Python has doctests so that the documentation's examples also function as unit tests. Knuth recommended literate programming as a way to do things. Python can run the code inside documentation to check it works. they make for lovely unit tests. Literate Programming as Knuth Recommended is really only something that Knuth has pulled off (tex). (if you recall the classic rebuttal "tr -cs A-Za-z '\n' | tr A-Z a-z | sort | uniq -c | sort -rn | sed ${1}q". ) quote:If anything, the difficulty of verifying that code snippets in documentation are executing as planned is a problem with the tools, not with the nature of documentation itself. Tracking changes in tools was likely lovely as hell before decent source control. i dunno, we've had things like pod, and javadoc, and docstrings and a whole slew of things over the years. that isn't to say that the tools can't improve, but they aren't so bad that documentation is significantly harder. Win8 Hetro Experie posted:and if this new project is programmed using literate programming, we'll arrive back where we started: the code is again the documentation there is also a difference between knuth's 'literate programming', and the 'code is the documentation'. the first is organized into chapters and paragraphs, the second is split into modules and classes. one has a start, a middle, and an end, the other has an index of every identifier broken down by namespace.
|
# ? Apr 27, 2013 15:01 |
|
literate programs are organized for the convenience of the programmer, not the compiler
|
# ? Apr 27, 2013 15:06 |
|
tef posted:there is also a difference between knuth's 'literate programming', and the 'code is the documentation'. how well it fits depends on the project in this case with a documentation project that depends on the fully-fledged implementation project that produces your documentation website when run, it doesn't sound that bad. if the project is showcasing several important features, separately and with each one self-contained, literally programming it sounds like a natural fit
|
# ? Apr 27, 2013 23:43 |
|
im' totally ok with having to read the source, as long as i can have access to it. at least it doesnt loving lie to my face
|
# ? Apr 29, 2013 03:49 |
|
literate programming has nothing at all to do with documentation as it's understood by API consumers
|
# ? Apr 29, 2013 04:04 |
|
i don't know if i can make that change boss, it would mess up the narrative
|
# ? Apr 29, 2013 04:30 |
|
interrupting a book project for 40 years or whatever to get all of the typesetting JUST RIGHT is an achievement that will go down in sperg history, the only thing i can imagine topping that is if ted nelson ever releases a usable xanadu
|
# ? Apr 29, 2013 04:38 |
|
Gazpacho posted:interrupting a book project for 40 years or whatever to get all of the typesetting JUST RIGHT is an achievement that will go down in sperg history
|
# ? Apr 29, 2013 05:04 |
|
Gazpacho posted:i don't know if i can make that change boss, it would mess up the narrative gonna use this
|
# ? Apr 29, 2013 05:16 |
|
Gazpacho posted:interrupting a book project for 40 years or whatever to get all of the typesetting JUST RIGHT is an achievement that will go down in sperg history, the only thing i can imagine topping that is if ted nelson ever releases a usable xanadu compuserved fucked around with this message at 05:04 on Apr 30, 2013 |
# ? Apr 30, 2013 02:07 |
|
im the digraphs
|
# ? Apr 30, 2013 03:19 |
|
python makes me mad. let's wrap some, but not all, of our important methods as ugly global functions:quote:There are two bits of "Python rationale" that I'd like to explain first. hepatizon fucked around with this message at 05:22 on Apr 30, 2013 |
# ? Apr 30, 2013 05:19 |
|
http://first-website.web.cern.ch/blog/first-url-active-once-more
|
# ? Apr 30, 2013 12:00 |
|
hepatizon posted:python makes me mad. let's wrap some, but not all, of our important methods as ugly global functions: whiny ruby/smalltalk user spotted
|
# ? Apr 30, 2013 12:00 |
|
java doesn't have functions because it's properly OO
|
# ? Apr 30, 2013 12:10 |
|
hepatizon posted:python makes me mad. let's wrap some, but not all, of our important methods as ugly global functions: language purity makes a language easier to learn, not easier to use that said re prefix notation I don't see how print(myString.trim().upperCase()) is somehow less readable than print(upperCase().trim().myString)
|
# ? Apr 30, 2013 12:46 |
|
Rt Clicked > View Source was not disappointed
|
# ? Apr 30, 2013 12:48 |
|
hmm yes it's almost like Java-style OOP is arbitrary and inconsistent trash Just have explicit multimethods with a special syntax like foo!(bar, baz, qux) and forget all the other cargo cult nonsense. Might be a bit awkward outside of a managed environment if you have multimethod tables interacting with dynamic module loading but eh, I liek to think of myself as more of an ideas guy
|
# ? Apr 30, 2013 12:51 |
|
Mr Dog posted:hmm yes it's almost like Java-style OOP is arbitrary and inconsistent trash learn ocaml
|
# ? Apr 30, 2013 14:21 |
|
ocaml, my caml!
|
# ? Apr 30, 2013 14:22 |
|
hepatizon posted:python makes me mad. let's wrap some, but not all, of our important methods as ugly global functions: don't use python or trust anything from someone named guido
|
# ? Apr 30, 2013 14:29 |
shaggar was right
|
|
# ? Apr 30, 2013 14:29 |
|
Stringent posted:ocaml, my caml!
|
# ? Apr 30, 2013 15:12 |
|
interviewed a guy yesterday who had "deep knowledge of C" on his resume and couldn't explain what volatile means :/ he also listed common lisp as one of his "core languages" and when asked about it explained that what he actually meant was that he pokes at elisp for his emacs config
|
# ? Apr 30, 2013 15:14 |
|
hepatizon posted:python makes me mad. let's wrap some, but not all, of our important methods as ugly global functions: i hate to agree with a python but len(x) is way better than x.len()
|
# ? Apr 30, 2013 15:33 |
|
Shaggar posted:don't use python or trust anything from someone named guido pythowns, and guidowns
|
# ? Apr 30, 2013 15:34 |
|
nope
|
# ? Apr 30, 2013 15:35 |
Shaggar posted:nope
|
|
# ? Apr 30, 2013 15:43 |
|
Shaggar posted:nope
|
# ? Apr 30, 2013 15:50 |
|
|
# ? May 23, 2024 17:43 |
|
Otto Skorzeny posted:interviewed a guy yesterday who had "deep knowledge of C" on his resume and couldn't explain what volatile means :/ this is probably most C programmers
|
# ? Apr 30, 2013 16:15 |