mirror of
https://github.com/dwmkerr/hacker-laws.git
synced 2025-12-18 05:05:10 +01:00
Compare commits
1 Commits
add-code-o
...
feat/moore
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d226417a6 |
76
.github/CODE_OF_CONDUCT.md
vendored
76
.github/CODE_OF_CONDUCT.md
vendored
@@ -1,76 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at dwmkerr@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
46
.github/contributing.md
vendored
46
.github/contributing.md
vendored
@@ -1,46 +0,0 @@
|
||||
# Contributing Guidelines
|
||||
|
||||
The goal of this project is to have a set of _concise_ definitions to laws, principles, methodologies and patterns which hackers will find useful. They should be:
|
||||
|
||||
1. Short - one or two paragraphs.
|
||||
2. Include the original source.
|
||||
3. Quote the law if possible, with the author's name.
|
||||
4. Link to related laws in the 'See also' section.
|
||||
5. Include real-world examples if possible in the 'Real-world examples' section.
|
||||
|
||||
Some other tips:
|
||||
|
||||
- It is fine to include laws which are humorous or not serious.
|
||||
- Don't worry about managing the table of contents, I can generate it.
|
||||
- Feel free to include images, but aim to keep it down to one image per law.
|
||||
- Be careful not to copy-and-paste content (unless it is explicitly quoted), as it might violate copyright.
|
||||
- Include hyperlinks to referenced material.
|
||||
- Do not advocate for the law, or aim to be opinionated on the correctness or incorrectness of the law, as this repository is simply the descriptions and links.
|
||||
|
||||
An example law is shown below, which covers most of the key points:
|
||||
|
||||
---
|
||||
|
||||
### The Law of Leaky Abstractions
|
||||
|
||||
[The Law of Leaky Abstractions on Joel on Software](https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/)
|
||||
|
||||
> All non-trivial abstractions, to some degree, are leaky.
|
||||
>
|
||||
> (Joel Spolsky)
|
||||
|
||||
This law states that abstractions, which are generally used in computing to simplify working with complicated systems, will in certain situations 'leak' elements of the underlying system, this making the abstraction behave in an unexpected way.
|
||||
|
||||
An example might be loading a file and reading its contents. The file system APIs are an _abstraction_ of the lower level kernel systems, which are themselves an abstraction over the physical processes relating to changing data on a magnetic platter (or flash memory for an SSD). In most cases, the abstraction of treating a file like a stream of binary data will work. However, for a magnetic drive, reading data sequentially will be *significantly* faster than random access (due to increased overhead of page faults), but for an SSD drive, this overhead will not be present. Underlying details will need to be understood to deal with this case (for example, database index files are structured to reduce the overhead of random access), the abstraction 'leaks' implementation details the developer may need to be aware of.
|
||||
|
||||
The example above can become more complex when _more_ abstractions are introduced. The Linux operating system allows files to be accessed over a network, but represented locally as 'normal' files. This abstraction will 'leak' if there are network failures. If a developer treats these files as 'normal' files, without considering the fact that they may be subject to network latency and failures, the solutions will be buggy.
|
||||
|
||||
The article describing the law suggests that an over-reliance on abstractions, combined with a poor understanding of the underlying processes, actually makes dealing with the problem at hand _more_ complex in some cases.
|
||||
|
||||
See also:
|
||||
|
||||
- [Hyrum's Law](#hyrums-law-the-law-of-implicit-interfaces)
|
||||
|
||||
Real-world examples:
|
||||
|
||||
- [Photoshop Slow Startup](https://forums.adobe.com/thread/376152) - an issue I encountered in the past. Photoshop would be slow to startup, sometimes taking minutes. It seems the issue was that on startup it reads some information about the current default printer. However, if that printer is actually a network printer, this could take an extremely long time. The _abstraction_ of a network printer being presented to the system similar to a local printer caused an issue for users in poor connectivity situations.
|
||||
14
.github/pull_request_template.md
vendored
14
.github/pull_request_template.md
vendored
@@ -1,14 +0,0 @@
|
||||
**Pull Request Checklist**
|
||||
|
||||
Please double check the items below!
|
||||
|
||||
- [ ] I have read the [Contributing Guidelines](./.github/contributing.md).
|
||||
- [ ] I have not directly copied text from another location (unless explicitly indicated as a quote) or violated copyright.
|
||||
- [ ] I have linked to the original Law.
|
||||
- [ ] I have quote the law (if possible) and the author's name (if possible).
|
||||
- [ ] I am happy to have my changes merged, so that I appear as a contributor, but also the text altered if required to keep the language consistent in the project.
|
||||
|
||||
And don't forget:
|
||||
|
||||
- I can handle the table of contents, feel free to leave it out.
|
||||
- Check to see if other laws should link back to the law you have added.
|
||||
95
README.md
95
README.md
@@ -1,4 +1,4 @@
|
||||
# 💻📖 hacker-laws
|
||||
# hacker-laws
|
||||
|
||||
Laws, Theories, Principles and Patterns that developers will find useful.
|
||||
|
||||
@@ -9,14 +9,11 @@ Laws, Theories, Principles and Patterns that developers will find useful.
|
||||
* [Amdahl's Law](#amdahls-law)
|
||||
* [Brooks's Law](#brookss-law)
|
||||
* [Conway's Law](#conways-law)
|
||||
* [Hofstadter's Law](#hofstadters-law)
|
||||
* [The Hype Cycle & Amara's Law](#the-hype-cycle--amaras-law)
|
||||
* [Hyrum's Law (The Law of Implicit Interfaces)](#hyrums-law-the-law-of-implicit-interfaces)
|
||||
* [Hofstadter's Law](#hofstadters-law)
|
||||
* [Moore's Law](#moores-law)
|
||||
* [Parkinson's Law](#parkinsons-law)
|
||||
* [Putt's Law](#putts-law)
|
||||
* [The Law of Conservation of Complexity (Tesler's Law)](#the-law-of-conservation-of-complexity-teslers-law)
|
||||
* [The Law of Leaky Abstractions](#the-law-of-leaky-abstractions)
|
||||
* [The Law of Triviality](#the-law-of-triviality)
|
||||
* [The Unix Philosophy](#the-unix-philosophy)
|
||||
* [The Spotify Model](#the-spotify-model)
|
||||
@@ -59,12 +56,12 @@ The diagram below shows some examples of potential improvements in speed:
|
||||
|
||||
As can be seen, even a program which is 50% parallelisable will benefit very little beyond 10 processing units, where as a program which is 95% parallelisable can still achieve significant speed improvements with over a thousand processing units.
|
||||
|
||||
As [Moore's Law](#moores-law) slows, and the acceleration of individual processor speed slows, parallelisation is key to improving performance. Graphics programming is an excellent example - with modern Shader based computing, individual pixels or fragments can be rendered in parallel - this is why modern graphics cards often have many thousands of processing cores (GPUs or Shader Units).
|
||||
As [Moore's Law](#TODO) slows, and the acceleration of individual processor speed slows, parallelisation is key to improving performance. Graphics programming is an excellent example - with modern Shader based computing, individual pixels or fragments can be rendered in parallel - this is why modern graphics cards often have many thousands of processing cores (GPUs or Shader Units).
|
||||
|
||||
See also:
|
||||
|
||||
- [Brooks's Law](#brookss-law)
|
||||
- [Moore's Law](#moores-law)
|
||||
- [Moore's Law](#TODO)
|
||||
|
||||
### Brooks's Law
|
||||
|
||||
@@ -86,17 +83,7 @@ See also:
|
||||
|
||||
This law suggests that the technical boundaries of a system will reflect the structure of the organisation. It is commonly referred to when looking at organisation improvements, Conway's Law suggests that if an organisation is structured into many small, disconnected units, the software it produces will be. If an organisation is built more around 'verticals' which are orientated around features or services, the software systems will also reflect this.
|
||||
|
||||
See also:
|
||||
|
||||
- [The Spotify Model](#the-spotify-model)
|
||||
|
||||
### Hofstadter's Law
|
||||
|
||||
[Hofstadter's Law on Wikipedia](https://en.wikipedia.org/wiki/Hofstadter%27s_law)
|
||||
|
||||
> It always takes longer than you expect, even when you take into account Hofstadter's Law.
|
||||
|
||||
You might hear this law referred to when looking at estimates for how long something will take. It seems a truism in software development that we tend to not be very good at accurately estimating how long something will take to deliver.
|
||||
See also: 'The Spotify Model'.
|
||||
|
||||
### The Hype Cycle & Amara's Law
|
||||
|
||||
@@ -112,25 +99,15 @@ The Hype Cycle is a visual representation of the excitement and development of t
|
||||
|
||||
*(Image Reference: By Jeremykemp at English Wikipedia, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=10547051)*
|
||||
|
||||
In short, this cycle suggests that there is typically a burst of excitement around new technology and its potential impact. Teams often jump into these technologies quickly, and sometimes find themselves disappointed with the results. This might be because the technology is not yet mature enough, or real-world applications are not yet fully realised. After a certain amount of time, the capabilities of the technology increase and practical opportunities to use it increase, and teams can finally become productive. Roy Amara's quote sums this up most succinctly - "We tend to overestimate the effect of a technology in the short run and underestimate in the long run".
|
||||
In short, this cycle suggests that there is typically a burst of excitement around new technology and its potential impact. Teams often jump into these technologies quickly, and sometimes fund themselves disappointed with the results. This might be because the technology is not yet mature enough, or real-world applications are not yet fully realised. After a certain amount of time, the capabilities of the technology increase and practical opportunities to use it increase, and teams can finally become productive. Roy Amara's quote sums this up most succinctly - "We tend to overestimate the effect of a technology in the short run and underestimate in the long run".
|
||||
|
||||
### Hyrum's Law (The Law of Implicit Interfaces)
|
||||
### Hofstadter's Law
|
||||
|
||||
[Hyrum's Law Online](http://www.hyrumslaw.com/)
|
||||
[Hofstadter's Law on Wikipedia](https://en.wikipedia.org/wiki/Hofstadter%27s_law)
|
||||
|
||||
> With a sufficient number of users of an API,
|
||||
> it does not matter what you promise in the contract:
|
||||
> all observable behaviours of your system
|
||||
> will be depended on by somebody.
|
||||
>
|
||||
> (Hyrum Wright)
|
||||
> It always takes longer than you expect, even when you take into account Hofstadter's Law.
|
||||
|
||||
Hyrum's Law states that when you have a _large enough number of consumers_ of an API, all behaviours of the API (even those not defined as part of a public contract) will eventually come to be depended on by someone. A trivial examples may be non-functional elements such as the response time of an API. A more subtle example might be consumers who are relying on applying a regex to an error message to determine the *type* of error of an API. Even if the public contract of the API states nothing about the contents of the message, indicating users should use an associated error code, _some_ users may use the message, and changing the message essentially breaks the API for those users.
|
||||
|
||||
See also:
|
||||
|
||||
- [The Law of Leaky Abstractions](#the-law-of-leaky-abstractions)
|
||||
- [XKCD 1172](https://xkcd.com/1172/)
|
||||
You might hear this law referred to when looking at estimates for how long something will take. It seems a truism in software development that we tend to not be very good at accurately estimating how long something will take to deliver.
|
||||
|
||||
### Moore's Law
|
||||
|
||||
@@ -146,34 +123,14 @@ Often used to illustrate the sheer speed at which semiconductor and chip technol
|
||||
|
||||
> Work expands so as to fill the time available for its completion.
|
||||
|
||||
In its original context, this Law was based on studies of bureaucracies. It may be pessimistically applied to software development initiatives, the theory being that teams will be inefficient until deadlines near, then rush to complete work by the deadline, thus making the actual deadline somewhat arbitrary.
|
||||
In it's original context, this Law was based on studies of bureaucracies. It may be pessimistically applied to software development initiatives, the theory being that teams will be inefficient until deadlines near, then rush to complete work by the deadline, thus making the actual deadline somewhat arbitrary.
|
||||
|
||||
If this law were combined with [Hofstadter's Law](#hofstadters-law), an even more pessimistic viewpoint is reached - work will expand to fill the time available for its completion and *still take longer than expected*.
|
||||
If this law were combined with [Hofstadter's Law](#hofstadters-law), an even more pessimistic viewpoint is reached - work will expand to fill the time available for it's completion and *still take longer than expected*.
|
||||
|
||||
See also:
|
||||
|
||||
- [Hofstadter's Law](#hofstadters-law)
|
||||
|
||||
### Putt's Law
|
||||
|
||||
[Putt's Law on Wikipedia](https://en.wikipedia.org/wiki/Putt%27s_Law_and_the_Successful_Technocrat)
|
||||
|
||||
> Technology is dominated by two types of people, those who understand what they do not manage and those who manage what they do not understand.
|
||||
|
||||
Putt's Law is often followed by Putt's Corollary:
|
||||
|
||||
> Every technical hierarchy, in time, develops a competence inversion.
|
||||
|
||||
These statements suggest that due to various selection criteria and trends in how groups organise, there will be a number of skilled people at working levels of a technical organisations, and a number of people in managerial roles who are not aware of the complexities and challenges of the work they are managing. This can be due to phenomena such as [The Peter Principle](#TODO) or [Dilbert's Law](#TODO).
|
||||
|
||||
However, it should be stressed that Laws such as this are vast generalisations and may apply to _some_ types of organisations, and not apply to others.
|
||||
|
||||
See also:
|
||||
|
||||
- [The Peter Principle](#TODO)
|
||||
- [Dilbert's Law](#TODO).
|
||||
|
||||
|
||||
### The Law of Conservation of Complexity (Tesler's Law)
|
||||
|
||||
[The Law of Conservation of Complexity on Wikipedia](https://en.wikipedia.org/wiki/Law_of_conservation_of_complexity)
|
||||
@@ -184,30 +141,6 @@ Some complexity in a system is 'inadvertent'. It is a consequence of poor struct
|
||||
|
||||
One interesting element to this law is the suggestion that even by simplifying the entire system, the intrinsic complexity is not reduced, it is _moved to the user_, who must behave in a more complex way.
|
||||
|
||||
### The Law of Leaky Abstractions
|
||||
|
||||
[The Law of Leaky Abstractions on Joel on Software](https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/)
|
||||
|
||||
> All non-trivial abstractions, to some degree, are leaky.
|
||||
>
|
||||
> (Joel Spolsky)
|
||||
|
||||
This law states that abstractions, which are generally used in computing to simplify working with complicated systems, will in certain situations 'leak' elements of the underlying system, this making the abstraction behave in an unexpected way.
|
||||
|
||||
An example might be loading a file and reading its contents. The file system APIs are an _abstraction_ of the lower level kernel systems, which are themselves an abstraction over the physical processes relating to changing data on a magnetic platter (or flash memory for an SSD). In most cases, the abstraction of treating a file like a stream of binary data will work. However, for a magnetic drive, reading data sequentially will be *significantly* faster than random access (due to increased overhead of page faults), but for an SSD drive, this overhead will not be present. Underlying details will need to be understood to deal with this case (for example, database index files are structured to reduce the overhead of random access), the abstraction 'leaks' implementation details the developer may need to be aware of.
|
||||
|
||||
The example above can become more complex when _more_ abstractions are introduced. The Linux operating system allows files to be accessed over a network, but represented locally as 'normal' files. This abstraction will 'leak' if there are network failures. If a developer treats these files as 'normal' files, without considering the fact that they may be subject to network latency and failures, the solutions will be buggy.
|
||||
|
||||
The article describing the law suggests that an over-reliance on abstractions, combined with a poor understanding of the underlying processes, actually makes dealing with the problem at hand _more_ complex in some cases.
|
||||
|
||||
See also:
|
||||
|
||||
- [Hyrum's Law](#hyrums-law-the-law-of-implicit-interfaces)
|
||||
|
||||
Real-world examples:
|
||||
|
||||
- [Photoshop Slow Startup](https://forums.adobe.com/thread/376152) - an issue I encountered in the past. Photoshop would be slow to startup, sometimes taking minutes. It seems the issue was that on startup it reads some information about the current default printer. However, if that printer is actually a network printer, this could take an extremely long time. The _abstraction_ of a network printer being presented to the system similar to a local printer caused an issue for users in poor connectivity situations.
|
||||
|
||||
### The Law of Triviality
|
||||
|
||||
[The Law of Triviality on Wikipedia](https://en.wikipedia.org/wiki/Law_of_triviality)
|
||||
@@ -368,6 +301,4 @@ See also:
|
||||
|
||||
## TODO
|
||||
|
||||
Hi! If you land here, you've clicked on a link to a topic I've not written up yet, sorry about this - this is work in progress!
|
||||
|
||||
Feel free to [Raise an Issue](https://github.com/dwmkerr/hacker-laws/issues) requesting more details, or [Open a Pull Request](https://github.com/dwmkerr/hacker-laws/pulls) to submit your proposed definition of the topic.
|
||||
Hi! If you land here, you've clicked on a link to a topic I've not written up yet. Feel free to [Raise an Issue](https://github.com/dwmkerr/hacker-laws/issues) requesting more details, or [Open a Pull Request](https://github.com/dwmkerr/hacker-laws/pulls) to submit your proposed definition of the topic.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 178 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user