Robustness versus brittleness
If a software system:
• can cope with errors
• can handle erroneous input
• allows modifications to its source code without losing reliability
it is said to be robust and not brittle.
Follow these principles to ensure robustness:
• Users may intentionally try to break your code
⇒ Disallow all such possibilities
• Users may try incorrect inputs
⇒ Display appropriate messages to inform the user
• When providing a higher level means to a lower level access, the interface may allow loopholes
⇒ Reenforce interfaces
• Nothing is impossible: the code may be modified later and this may turn an impossible case to a possibility
⇒ Treat impossibility as unlikely
If a software system:
• can cope with errors
• can handle erroneous input
• allows modifications to its source code without losing reliability
it is said to be robust and not brittle.
Follow these principles to ensure robustness:
• Users may intentionally try to break your code
⇒ Disallow all such possibilities
• Users may try incorrect inputs
⇒ Display appropriate messages to inform the user
• When providing a higher level means to a lower level access, the interface may allow loopholes
⇒ Reenforce interfaces
• Nothing is impossible: the code may be modified later and this may turn an impossible case to a possibility
⇒ Treat impossibility as unlikely
Obeying artificial laws before personally concluding them is irrational.
A fair judge is an unbiased judge.
A self-aware subject is biased.
A subject cannot be a fair judge.
A self-aware subject is biased.
A subject cannot be a fair judge.
#Nile
Recur
- is a syntactic construct used in recursive functions, especially helpful in anonymous recursive functions and scripts:
Recur
- is a syntactic construct used in recursive functions, especially helpful in anonymous recursive functions and scripts:
{if x==0 return 0 else if x fits even return recur(x/2)/2 else return recur((x-1)/2)/2-0.5}
ComputerScientist
#Python The Zen of Python Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't…
#Nile
Guidelines
when faced with an ambiguity, choose the obvious option based on the mixed contexts, if none or more than one exist, report back and do nothing.
Guidelines
when faced with an ambiguity, choose the obvious option based on the mixed contexts, if none or more than one exist, report back and do nothing.
#mathematics
Tensor
Tensors are generalizations of scalars (that have no indices), vectors (that have exactly one index), and matrices (that have exactly two indices) to an arbitrary number of indices.
A tensor of rank|order n is a mathematical object that has n indices|dimensions|axes
• A scalar is a 0-dimensional tensor.
• A vector is a 1-dimensional tensor.
• A matrix is a 2-dimensional tensor.
• ...
Etymology: from the Latin word tendere meaning "to stretch"
Applications: data science, machine learning, computer vision, field theory, elasticity, fluid mechanics, general relativity, etc.
Tensor
Tensors are generalizations of scalars (that have no indices), vectors (that have exactly one index), and matrices (that have exactly two indices) to an arbitrary number of indices.
A tensor of rank|order n is a mathematical object that has n indices|dimensions|axes
• A scalar is a 0-dimensional tensor.
• A vector is a 1-dimensional tensor.
• A matrix is a 2-dimensional tensor.
• ...
Etymology: from the Latin word tendere meaning "to stretch"
Applications: data science, machine learning, computer vision, field theory, elasticity, fluid mechanics, general relativity, etc.
“The mind of man may be compared to a musical instrument with a certain range of notes, beyond which in both directions we have an infinitude of silence.”
— John Tyndall
— John Tyndall
“We used to think that if we knew one, we knew two, because one and one are two. We are finding that we must learn a great deal more about 'and'.”
— Arthur Eddington
— Arthur Eddington
“Objects are state data with attached behavior; closures are behaviors with attached state data and without the overhead of classes.”
— Peter Norvig
— Peter Norvig
“By continuously improving the design of code, we make it easier and easier to work with. This is in sharp contrast to what typically happens: little refactoring and a great deal of attention paid to expediently adding new features. If you get into the hygienic habit of refactoring continuously, you'll find that it is easier to extend and maintain code.”
— Joshua Kerievsky, Refactoring to Patterns
— Joshua Kerievsky, Refactoring to Patterns
Robustness += being prepared for every scenario, no matter how unlikely.
Quine
- is a non-empty computer program which produces a copy of its own source code as its only output, and cannot receive any form of input, including reading a file, which means a quine is considered to be "cheating" if it looks at its own source code. Quines are possible in any Turing complete programming language, as a direct consequence of Kleene's recursion theorem.
A quine in #Python:
- is a non-empty computer program which produces a copy of its own source code as its only output, and cannot receive any form of input, including reading a file, which means a quine is considered to be "cheating" if it looks at its own source code. Quines are possible in any Turing complete programming language, as a direct consequence of Kleene's recursion theorem.
A quine in #Python:
s = 's = %r\nprint(s%%s)'
print(s%s)
#Office
Excel versus Access
Both are from Microsoft, and both handle tabular data; but that is where the similarities end.
Differences in usage:
• Excel is a spreadsheet app, Access is a #DBMS
• Excel is useful in a greater scope, but Access is much more useful in one specific area
• Excel is used for paperwork and data visualization (formulas, charts, graphs etc.), Access is used in storing, sorting and searching information that can be accessed by many people
• Excel is used by financial and statistical analysts; Access is used by small business owners
• Excel users need not have any programming knowledge; Access users, to take full advantage from it, do need it.
• Excel is much more easier to learn, and to use, than Access
Differences in structure:
• Excel is flat; Access is relational
• Excel stores entire sheets; Access stores records
• Excel handles huge data less efficiently than Access
• Excel is more flexibile, and adaptabile to the needs of the user, than Access
• Excel file format is .xlsx; Access file format is .accdb and .mdb
Excel versus Access
Both are from Microsoft, and both handle tabular data; but that is where the similarities end.
Differences in usage:
• Excel is a spreadsheet app, Access is a #DBMS
• Excel is useful in a greater scope, but Access is much more useful in one specific area
• Excel is used for paperwork and data visualization (formulas, charts, graphs etc.), Access is used in storing, sorting and searching information that can be accessed by many people
• Excel is used by financial and statistical analysts; Access is used by small business owners
• Excel users need not have any programming knowledge; Access users, to take full advantage from it, do need it.
• Excel is much more easier to learn, and to use, than Access
Differences in structure:
• Excel is flat; Access is relational
• Excel stores entire sheets; Access stores records
• Excel handles huge data less efficiently than Access
• Excel is more flexibile, and adaptabile to the needs of the user, than Access
• Excel file format is .xlsx; Access file format is .accdb and .mdb