Tomas Petricek, Charles University, Prague


The history of programming, told through the lens of interactions between five cultures of programming.
Cultures cooperate, exchange ideas, disagree, struggle for control.




Software update activated unused and wrong code
Reflections on the issue

Software not formally verified correct!
Poor testing and engineering practice
Incorrect implementation of oversight processes

Managerial
Hacker
Humanistic
Mathematical
Engineering




Translation metaphor for programming (1950s)
From human language to formal logic and linguistics
Formal grammars for language description


Clever tricks (1950s)
External form allows subroutine libraries
Interpretive routines for extra EDSAC codes


User groups and computer installation managers
Common universal notations
Cross-machine compatibility
Allow program exchange
Teaching at universities






Algol becomes the language of academic computer science
Algorithms in CACM
Formal proofs take
time to appear!


Program as a formal mathematical object
Ensure correctness using mathematical methods!


"I must admit I still feel a little surprised it’s as long as it is - I guess Algol 60 is just not nearly as 'well-behaved' as one tends to think it is."
See Astarte (2019)!

#include <stdio.h>
main()
{
printf("hello, world\n");
}
Program prints the specified sequence of characters
Greeting! With social contact between the speaker and the hearer





"Adele was an active type of programmer, trying things very quickly.
I was more laid back and given to attempting to figure out things logically before doing anything."
Betty Jean Jennings



TX-0 at MIT (1958)
"Debugging at the console regarded as professional sin."
FLIT, DDT, DEBUG
Set breakpoints, interactively modify program & state.



Testing distinguished
from debugging
Companies hire test managers and test technicians
Test automation establishes
a test as an artifact
Engineering and mathematical takes on testing



Testing after coding in Waterfall (1970)
Unit testing separate from acceptance tests
Managerial take on software testing




"It has been possible .. to find a bug while at a breakpoint in running a test case, call the [structure] editor to make a correction, run the program on a simpler test case to verify the correctness of the change, then resume execution of the original test case from the breakpoint."


Set breakpoint
Make correction
Resume execution
To be fair...
Time-traveling debuggers, etc.





Activity declarations
and processes
Remote accessing
Classes and objects
Record handling inspired by Hoare

"Computer for Children of All Ages"
Learning and educational focus
Experimentation tool at Xerox PARC
From Tektronix to IBM Visual Age
Test-driven development, design patterns

How do you design
software using objects?
Objects as active actors
Responsibilities of objects

From objects to software development processes
Objects support requirements analysis, team structuring




Learn and reuse components using view source


Engineering reasons
Delivering large files over slow network...
Large software requires proper languages!



Cultures of programming map the space of ideas
Avoid narrow engineering or mathematical views
Call for more pluralism in computing!
Tomas Petricek, Charles University, Prague
tomas@tomasp.net |
tomasp.net
Open-access book and exhibition
Available at tomasp.net/cultures




“Programming in the early 1950s was a black art,
a private arcane matter involving only a programmer,
a problem, a computer, ... and a primitive assembly program.”
John Backus (1976)


“Program testing can be used to show the presence of bugs, but never to show their absence!” Rather than verifying programs through their testing, we should prove them correct.
Edsger Dijkstra (1969)


“The phrase software engineering was deliberately chosen as provocative... We undoubtedly produce software by backward techniques.”
The black art of programming has to make way for the science of software engineering!
NATO Conference on Software Engineering (1968)


“Alan Kay is more interested in us kids. He repudiates the manipulative arrogance .. and serves the dictum of Seymour Papert, Should the computer program the kid or should the kid program the computer?”
Brand, Rolling Stone (1972)


“With SAGE, we were faced with programs too large for one person to grasp entirely and also with the need to hire and train large numbers of people to become programmers... We were faced with organizing and managing a whole new art.”
Herbert Benington (1956)



float Q_rsqrt( float number )
{
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
// evil floating point bit level hacking
i = * ( long * ) &y;
// what the fuck?
i = 0x5f3759df - ( i >> 1 );
y = * ( float * ) &i;
// 1st iteration
y = y * ( threehalfs - ( x2 * y * y ) );
// 2nd iteration, this can be removed
// y = y * ( threehalfs - ( x2 * y * y ) );
return y;
}
Hacker culture
Values clever code that shows understanding of the machine operation

#define submerge const char*_=O%239?" ":"\t;\t";O*=2654435761;int
#define _cOb8(...) int s,on,__VA_ARGS__;int main(int O, char**Q)
_cOb8(o_, _oO8ocQOcOb, _ocQbo8oo, _oO8ocOb_
){ ; { ;;; ;;} ;{
;; ;{ ; } {;;}
} float the;; static things ;; for (;;){ us :;;
; ; break; the; ;; long grass ;unsigned squall ; }
{ } ; while (1){soft:; submerge us;; in: sleep (0) ;
; ; printf (_); quietly :on ;; the; soil:; };
{{ }; ; ; ;; ;{ ; }; {
{ ; shake: time (1) ;register *_, the =clock(s );
;} ; volatile *_, winds ; ; double wills ;{
; char the ,* fire ;; short companion,*_;}
; { union {}*_, together ;; ; void *warms ;}
} ;; ;{; ;} ; ;;
; ; if (1) wet :; raise (1); struct{}ure ;; ;
; ; free (0);for(;;){ newborn :; ; daughter :; ;
;{ ; extern al, ** world ,*re;const ructed ;};
; ; ; continue;on:;; floods :; ; of: water :;};}
; ;{ ; ; ;; { ; ; } ; } ; ; }
Humanistic culture
Use double coding to speak to the human as well as
to the machine


Engineering culture
Simple, well-structured. Readability is valued more than cleverness.


Mathematical culture
Code achieves great expressivity using a combination of small number of orthogonal features.


Managerial culture
Structure of code enables appropriate organization of development teams and project management.




FORmula TRANslator
rather than a language
Arguments in fixed or
floating-point mode

Algorithmic Language
Types (integer, real, Boolean) denote properties of values;
Subscripts for arrays



Electronic versions of paper-based records
Data records with specific string formatting


Models type checking via derivation rules
Authentication and secrecy problems
Now in Cedar system at Xerox PARC
Type checking done at runtime in Clu
Cites Reynolds ("personal communication")


Abstract data types
for proof terms
Data types
for convenient programming
Type checking
for proof correctness

