ComputerScientist
174 subscribers
14 photos
3 files
206 links
▜ The Inventor

Stuff that inspire you to create.

See also: ▙ @LitMind
Download Telegram
big-o-cheatsheet.pdf
254.8 KB
The space and time complexities for common algorithms and data structures.

bigocheatsheet.com
“I'm afraid of losing my obscurity. Genuineness only thrives in the dark.”
— Aldous Huxley
Shape ideas and then name them; do not make up ideas for the sake of the names.
To lie convincingly; that is intelligence.
Never copy information, only refer to it.
One man's GPL is another's DSL.
“Anything on the screen should be purely informative about my prior actions, "what you've typed", not "what you can type"”
— the semicolon, advocating CLI over GUI
1. Create a name set surrounding your idea.
2. Partition your idea to properties.
3. Group properties to intensions and essence.
4. Optionally separate one idea to a hierarchy of ideas.
5. Evaluate your name set.
6. Name each idea.
7. Formally describe ideas.
For every unformalized general problem there is a set of informal specific problems that if they become formalized, sufficiently lead to said generalization.
“Using case-insensitive filenames and commands is an act of evil and the sinners must be punished with deprecation.”
— the semicolon
“I feel no need to cater to bad programmers.”
— Charles H. Moore, #Forth
“Chuck's greatest contribution was teaching that understanding and simplifying the problem was far more effective than adding complexity to a solution.”
— massung, GitHub comment
Test, even after the smallest of changes.
How to keep your code clean

Modularize: break it down to pieces that make sense alone and may be reused elsewhere

• Have general conventions for naming files, modules, functions, variables, etc.

Document everything: write comments, docstrings and function helplines

• Keep performance in mind: free files, resources and dynamic memory

• Abstain from repeated code: use procedures and functions instead

• Keep your code readable using indentation and alignment

• Keep global variables to a minimum by using singletons

• No surprises: handle exceptional cases
A worthy abstraction is one which is achieved through introducing little indirection.
What can't be automated?
It is recreational, to recreate in Recreate.
Following standards while fixing a bug prevents future bugs and a messy codebase.
I don't think in any language. I think in images. I don't believe that people think in languages. They don't move their lips when they think. It is only a certain type of illiterate person who moves his lips as he reads or ruminates. No, I think in images, and now and then a Russian phrase or an English phrase will form with the foam of the brainwave, but that’s about all. ”
— Vladimir Nabokov, Strong Opinions (1973)