4 ms·
Licensing is not the solution. Here are some things that can help: 1) Limit mutations, shared state, and side effects to very small sections of code. The maj
by bcheung 7y ago
Licensing is not the solution.
Here are some things that can help:
1) Limit mutations, shared state, and side effects to very small sections of code. The majority of code should be pure functions and immutable code.
2) Tooling and IDE's should have "code coverage" to show where code is pure and referentially transparent and where it is not.
3) Learn from mathematics / computer science. Adopt formal methods and proof based techniques.
4) Keep code simple and understandable. Category theory has many insights on how to better compose and structure code. Code that is in harmony with certain laws will be more predictable, simpler, and more reusable. Constraints == freedom.
5) Use strong typing. And by typing I mean types that limit what values can be and even what code can do. Types that are nullable are not sufficient for safety. Types that only describe the data format and not the allowed functionality are not sufficiently safe or descriptive. Dependent typing allows for even greater safety because it can specify acceptable values ("tolerances") not just the data format of the value.
6) Adopt metrics to measure complexity and other factors that affect reliability of code. Once we have metrics we can have better discussions different ways to write the same code and why certain ways might be better under certain circumstances.
7a) Expand your vocabulary of concepts. Words affect the very thoughts you are capable of thinking about (linguistic relativity). We went from machine code to assembly to higher level languages. Each requires more concepts to know and yet it gets simpler and less error prone each time. The more words you have the easier it is to describe, write, and understand code. Category theory has many new concepts that are not in common use that improve communication and understanding. What other fields can we borrow from?
7b) Keep code short and simple to maximize understanding. More code means more surface area for software defects. 'map' is easier to understand and less error prone than 2 different arrays, counters, conditionals, increments, and mutations.
8) Typing and pattern matching provide a framework where the compiler can determine if you have handled all the cases for all possible inputs (total function). Failure to do so is a compile time error.
- commandlinefan 7y ago> Licensing is not the solution. > Here are some things that can help: Maybe license people who can demonstrate that they really understand this stuff then?
- bcheung 7y agoCertification might be less heavy handed and flexible. It keeps control within the industry and out of gov't where there can be lots of other inefficiency and conflicting interests. Laws also tend to be very slow to change (software moves too fast). If colleges are struggling to keep up with relevant skills how much worse will it be for laws? Licensing typically also creates a paywall (student loan debt) and denies access to otherwise bright and capable people who don't have the resources to go through a college / licensing system.