Earlier quoted context omitted.
Good naming practice. Either pull each line of non-trivial code out into it's own method, or assign the output of the code to a variable that tells you what it's doing. If you find yourself repeating an assignment, pull it out into a function and remove the duplication. Rinse and repeat until everything in the file is assigned to a descriptive function or variable. Doing this with someone else's code gives you a feel…
This a total non sequitur. What does this have to do with alternatives file formats for code?
Code is not Literature
81–88 of 88 posts
Re: Code is not Literature
#82I think the author has a somewhat limited definition of “literature”, though he ultimately comes to the right conclusion that code must be “studied”, not “read”. It’s true, code is typically less linear than a pulp novel, but other types of literature are also involved, with layered meanings, which must be examined carefully, with reference material handy, and lots of flipping back and forth between sections. For ins…
Re: Code is not Literature
#83Why do we still embed natural language descriptions of source code (i.e., the reason why a line of code was written) within the source code to the exclusion of intrinsically linked separate documents? http://i.stack.imgur.com/JlUiE.png The potential advantages include: - More source code and more documentation on the screen(s) at once - Ability to edit documentation independently of source code (regardless of languag…
Re: Code is not Literature
#84In particular I, and the IT shop at Tachyus, have chosen F# as the way to go forward for a number of reasons. Sticking to readability, F# (and other FPs to a greater or lesser extent) allow production code that "reads" more expressively in terms of conveying what the code is actually accomplishing to the reader (and to the compiler) rather than the frequently tangled instructions to the compiler on how to accomplish the task coming from traditional imperative and OO languages. F# also has some very useful tools to emit a form of literate code that produces publication ready HTML or MD, http://tpetricek.github.io/FSharp.Formatting/ (This project will soon be accepted as a top-tier project by the F# Software Foundation, http://fsharp.org/) It may not be to the letter of Knuth's idea of literate programming, but certainly in the spirit.
I did read some code lately. Actually I had to go so far as stepping through it in the debugger to properly decode it, http://jackfoxy.com/transparent-heterogeneous-parallel-async... (the code snippets here have tool-tips in my article, just one of the features available with FSharp.Formatting), but this is really the exception in F#. The vast majority of code is easily accessible to any programmer of reasonable quality (with proper introduction to FP) in any IT shop. The deeper functional stuff like Continuation Passing Style and Applicative Functors (e.g. heterogeneous parallel async) in most cases is already available in core libraries. And when not a literature search and/or getting in touch with the FP community helps.
Re: Code is not Literature
#85Re: Code is not Literature
#86Earlier quoted context omitted.
This a total non sequitur. What does this have to do with alternatives file formats for code?
What do alternative file formats for code have to do with readability?
Code which can be represented as plaintext is versatile and portable and, more importantly, has its comprehensibility decoupled from any specific company, or project or group providing the necessary tools to make it human-readable. If an alternative file format isn't natively human-readable then it is by my definition less readable regardless of the standards put into writing the code itself.
Re: Code is not Literature
#87Re: Code is not Literature
#88Earlier quoted context omitted.
Most browsers have a "Development Tools" option that provides a number of tools including a step-through debugger similar to those in XCode/Eclipse/Visual Studio. I personally use the development tools in Safari most of the time.
Really? Why Safari in particular?
I think Chrome and/or Firefox provide more support for live editing of the current web page, however I've never made much use of that functionality.