“reading versus writing is
well over 10 to 1.
We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.”
(with a small brain)
how seniors do it
Hypotheses based on existing knowledge
Search for places to prove or falsify them
Search for things you recognize
Combine known units to understand
larger sections
ca 1995
Project Size | Lines of Code/Day/Dev |
---|---|
10.000 | 10 - 125 |
100.000 | 5 - 100 |
1.000.000 | 3,5 - 50 |
10.000.000 | 1.5 - 25 |
Source: Steve McConnell, Software Sizing
Catalog
Inventory
Orders
Payment
ca 2005
Catalog
Service
Elastic
Search
Inventory
Service
PostgreSQL
Orders
Service
MySQL
Payment
Service
-
ca 2013
Dan North
Automate All The Things!
ca 2015
Text
Text
5 years, full-time
"10.000 hours for mastery"
backed by scientific research
for program comprehension
Coding-Dojos & Pair Programming:
Understand your work/
co-workers:
IDE Support
Automation
Observability
Trained on existing fixes from Github
Analyses your code and recommends known patches
import java.io.*;
import java.util.*;
public class TestIO {
void read(File file) {
{
/// call:readLine type:FileReader type:BufferedReader
}
}
}
import java.io.*;
import java.util.*;
import java.io.FileReader;
import java.io.File;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.io.BufferedReader;
public class TestIO {
void read(File file) {
{
FileReader fr1;
BufferedReader br1;
String s1;
try {
fr1 = new FileReader(file);
br1 = new BufferedReader(fr1);
while ((s1 = br1.readLine()) != null) {}
br1.close();
} catch (FileNotFoundException _e) {
} catch (IOException _e) {
}
return;
}
}
}
We didn't win, but we didn't loose, either.