Jerry Yoakum's thoughts on software engineering and architecture from experience working with code, computer science, python, java, APIs, NASA, data mining, math, etc.
Monday, April 29, 2019
Evita anidar demasiado profundo
El anidamiento de las instrucciones IF-THEN-ELSE simplifica enormemente la lógica de programación. Por otro lado, anidarlos más que, por ejemplo, tres niveles de profundidad reduce en gran medida su capacidad de comprensión. La mente humana es capaz de recordar solo una cierta cantidad de lógica antes de que se confunda. Se puede utilizar una variedad de técnicas simples para reducir el anidamiento.
Don't Nest Too Deep
Nesting IF-THEN-ELSE statements greatly simplifies programming logic. On the other hand, nesting them more than, say, three levels deep decreases their understandability considerably. The human mind is capable of remembering only a certain amount of logic before it becomes confused. A variety of simple techniques can be used to reduce nesting.
Reference:
McConnell, S., Code Complete, Redmond, WA: Microsoft Press, 1993.
Friday, April 26, 2019
Structured Code Is Not Necessarily Good Code
The original definition of structured programming presented by Edsger Dijkstra was provided to facilitate program proving. The constructs he recommended (IF-THEN-ELSE, DO-WHILE, etc) have now become so commonplace (though program proving has not) that their use is now called "programming" rather than "structured programming." It is important to note; however, that not all "structured" programs are good. One can write incredibly obscure programs that are still structured. Structure is almost a necessary, but far from a sufficient, condition for quality programming.
Reference:
Yourdon, E., How to Manage Structured Programming, New York: Yourdon, Inc., 1976.
You Can Use Unstructured Languages
Unstructured code violates Edsger Dijkstra's guidance to restrict control structures to IF-THEN-ELSE, DO-WHILE, DO-UNTIL, and CASE. Notice that it is possible to write structured code in languages without these structures, such as in assembly languages, by documenting the use of GOTOs to implementing these structures only.
To do this, first write your algorithms using the aforementioned control structures. Next, convert these into in-line comments. Next, translate the comments into their equivalent programming language statements. GOTOs will appear, but they will be implementing the better constructs and will facilitate, not hamper, readability, maintainability, and provability.
Reference:
McConnell, S., Code Complete, Redmond, WA: Microsoft Press, 1993.
Thursday, April 25, 2019
Dumbheart
Dumbheart: A Get Fuzzy Collection by Darby Conley
My rating: 5 of 5 stars
Despite be 10 years old, I find all the republican/democrat jokes to be spot on. I'm not sure they were balanced by it was nice to see both sides lampooned.
View all my reviews
My rating: 5 of 5 stars
Despite be 10 years old, I find all the republican/democrat jokes to be spot on. I'm not sure they were balanced by it was nice to see both sides lampooned.
View all my reviews
Wednesday, April 10, 2019
Google AutoML And Thinking Machines
After attending a machine learning presentation I got the chance to talk to the presenter about AutoML. He said that it is out-performing a lot of data scientists at Google. Which really peaked my interest. I asked him if the software was similar to the software Daniel Hillis wrote back in the '90s to generate code that was out-performing human coders (see The Pattern on the Stone). Sadly, he had no idea who Daniel Hillis is. I think the idea of software generated code never caught on because no one could understand why it was faster but everyone could agree that it wasn't safe because it was so difficult to decide if it would always work correctly. Which brings to mind the question - is AutoML safe? Will it create bias because the data is formatted a certain way?
I look forward to learning more about how AutoML works. I'm also interested in learning how to use AutoML but am vastly more interested in its internals.
Subscribe to:
Posts (Atom)