際際滷

際際滷Share a Scribd company logo
Those Who Know History

Are Doomed to Watch Others Repeat It
Who Is This
Guy?
Guy Royse, Consultant
Pillar Technology
guy@guyroyse.com

@guyroyse
History
doesnt
repeat
itself, but
it often
rhymes
Mark Twain
Java is the
New COBOL
Those Who Know History are Doomed to Watch Others Repeat It
Completely
Obsolete
Business
Oriented
Language
Those Who Know History are Doomed to Watch Others Repeat It
Those Who Know History are Doomed to Watch Others Repeat It
Those Who Know History are Doomed to Watch Others Repeat It
Those Who Know History are Doomed to Watch Others Repeat It
A
Simple
Problem
Java Class Diagram
AddressValidator
booleanvalidate(Address)

ContactValidator
booleanvalidate(Contact)

PhoneValidator

booleanvalidate(Phone)
COBOL System Diagram
ADDRESS-VALIDATOR

CONTACT-VALIDATOR

PHONE-VALIDATOR
Java Data Structures
Phone

String areaCode
String exchange
String number

Contact

String name
Address address
Phone cell
Phone home

Address

String street
String city
String state
String zipCode
COBOL Data Structures
01

10

CN-CONTACT.
05 CN-NAME
PIC
05 CN-ADDRESS.
10 CN-ADDR-STREET
PIC
10 CN-ADDR-CITY
PIC
10 CN-ADDR-STATE
PIC
10 CN-ADDR-ZIP-CODE PIC
05 CN-HOME-PHONE.
10 CN-HOME-AREA-CD
PIC
10 CN-HOME-EXCHANGE PIC
10 CN-HOME-NUMBER
PIC
05 CN-CELL-PHONE.
CN-CELL-AREA-CD
PIC 9(3).
10 CN-CELL-EXCHANGE PIC
10 CN-CELL-NUMBER
PIC

X(40).
X(30).
X(20).
X(2).
X(5).
9(3).
9(3).
9(4).

9(3).
9(4).
public class Contact {
private String name;
private Phone home;
private Phone cell;
private Address address;

01
05

10

CN-CONTACT.
05 CN-NAME
PIC
CN-ADDRESS.
10 CN-ADDR-STREET
PIC
10 CN-ADDR-CITY
PIC
10 CN-ADDR-STATE
PIC
10 CN-ADDR-ZIP-CODE PIC
05 CN-HOME-PHONE.
10 CN-HOME-AREA-CD
PIC
10 CN-HOME-EXCHANGE PIC
10 CN-HOME-NUMBER
PIC
05 CN-CELL-PHONE.
CN-CELL-AREA-CD
PIC 9(3).
10 CN-CELL-EXCHANGE PIC
10 CN-CELL-NUMBER
PIC

X(40).
X(30).
X(20).
X(2).
X(5).
9(3).
9(3).
9(4).

public String getName() { return name; }
public void setName(String name) {
this.name = name;
}
... more setters and getters here ...
}
public class Phone {
private String areaCode;
private String exchange;
private String number;
... setters and getters here ...

9(3).
9(4).

}
public class Address {
private String street;
private String city;
private String state;
private String zipCode;
... setters and getters here ...
}
IDENTIFICATION DIVISION.
PROGRAM-ID. CONTACT-VALIDATOR.

public class ContactValidator {

private PhoneValidatorphoneValidator =
new PhoneValidator();
private AddressValidatoraddrValidator =
new AddressValidator();

PROCEDURE DIVISION
USING CN-IS-VALID, CN-CONTACT.
MAIN-LINE.
PERFORM VALIDATE-NAME.
CALL ADDRESS-VALIDATOR USING
CN-ADDRESS, WS-ADDRESS-IS-VALID.
CALL PHONE-VALIDATOR USING
CN-HOME-PHONE, WS-HOME-PH-IS-VALID
CALL PHONE-VALIDATOR USING
CN-CELL-PHONE, WS-CELL-PH-IS-VALID.
PERFORM DETERMINE-IF-VALID.
GOBACK.
VALIDATE-NAME.
MOVE Y TO WS-NAME-IS-VALID.
IF CN-NAME IS SPACES
MOVE N TO WS-NAME-IS-VALID.

public booleanvalidate(Contactcntct) {
boolean valid =
validateName(cntct.getName());
valid &= addrValidator.validate(
cntct.getAddress());
valid &= phoneValidator.validate(
cntct.getHome());
valid &= phoneValidator.validate(
cntct.getCell());
return valid;

DETERMINE-IF-VALID.
MOVE N to CN-IS-VALID.
IF WS-NAME-IS-VALID IS Y AND
WS-HOME-PH-IS-VALID IS Y AND
WS-CELL-PH-IS-VALID IS Y AND
WS-ADDRESS-IS-VALID IS Y
MOVE Y TO CN-IS-VALID.

}
private void validateName(String name) {
return !StringUtils.isEmpty(name);
}
}
Automating the Process
Those Who Know History are Doomed to Watch Others Repeat It
Those Who Know History are Doomed to Watch Others Repeat It
Node is
Single-Threaded
Those Who Know History are Doomed to Watch Others Repeat It
So Why Do We Keep Reinventing the
Past and Calling it the Future?
People
in the
Past
Were
Dumb
Im just a cave
man. Your world
frightens and
confuses me.
Look back over the
past, with its
changing empires
that rose and fell,
and you can foresee
the future too.
 Marcus Aurelius,
Meditations
If history is deprived
of the Truth, we are
left with nothing but
an idle, unprofitable
tale.
 Polybius,
The Rise of the Roman
Empire
Anacyclosis
Autocracy

Democracy

Aristocracy
Basic Cycle

A
C

B
How Projects Run
Single
Manager

Whole
Team

Leadership
Team
How We Code
Solo
Coder

Swarm

Pairing
How We Design Applications
Client

Server

Client
Server
The 40s and 50s
Computing Timeline
40s & 50s

60s & 70s

80s

90s
Server-side

UNIVAC
Z3

Mark 1

ENIAC

Client-side

2000s

2010s

???
The 60s and 70s
Computing Timeline
40s & 50s

60s & 70s

80s

90s
Server-side

CICS
Terminals
Teletypes
Mainframes

UNIX

UNIVAC
Z3

Mark 1

ENIAC

Client-side

2000s

2010s

???
The Late 70s
Computing Timeline
40s & 50s

60s & 70s

80s

90s
Server-side

CICS
Terminals
Teletypes
Mainframes

UNIX

UNIVAC
Z3

Mark 1

Early PCs

ENIAC

Client-side

2000s

2010s

???
The 80s
Computing Timeline
40s & 50s

60s & 70s

80s

90s
Server-side

CICS
Terminals
Teletypes
Mainframes

UNIX

UNIVAC
Z3

Mark 1

ENIAC

Early PCs
PCs

Client-side

2000s

2010s

???
The 90s
Computing Timeline
40s & 50s

60s & 70s

80s

90s
Server-side

Browser
CICS
Terminals
Teletypes
Mainframes

UNIX

Internet
Client
Server

UNIVAC
Z3

Mark 1

ENIAC

Early PCs
PCs

Client-side

2000s

2010s

???
In The Year 2000
Computing Timeline
40s & 50s

60s & 70s

80s

90s

2000s

Server-side

Browser
CICS
Terminals
Teletypes
Mainframes

UNIX

Internet
Client
Server

UNIVAC
Z3

Mark 1

ENIAC

AJAX

Early PCs
Mobile
PCs

Client-side

2010s

???
2010s
Computing Timeline
40s & 50s

60s & 70s

80s

90s

2000s

2010s

Server-side

Cloud

Browser
CICS
Terminals
Teletypes

HTML5

Mainframes

UNIX

Internet
Client
Server

UNIVAC
Z3

Mark 1

ENIAC

AJAX
Pi

Early PCs
Mobile
PCs

Client-side

???
Computing Timeline
40s & 50s

60s & 70s

80s

90s

2000s

2010s

???

Server-side

Cloud

Browser
CICS
Terminals
Teletypes

HTML5

Mainframes

UNIX

Internet
Client
Server

UNIVAC
Z3

Mark 1

ENIAC

AJAX
Pi

Early PCs
Mobile
PCs

?
Client-side
It is not
worthwhile to try
to keep history
from repeating
itself, for man's
character will
always make the
preventing of the
repetitions
impossible.

 Mark Twain
Those Who Know History are Doomed to Watch Others Repeat It
Guy Royse, Consultant
Pillar Technology
guy@guyroyse.com
@guyroyse

More Related Content

Those Who Know History are Doomed to Watch Others Repeat It

Editor's Notes

  • #3: Where I workWhat I doBackground - COBOL through Ruby - C++, Java, & JavaScript
  • #4: Theres no proof that Mark Twain said this but so what!He who doesnt know history is doomed to repeat it Not if you do x then y happens, so dont do x Instead it given us insight into the present Ive seen this movie before storyImma show you some instances of history rhyming that I have encountered in my careerAnd like Mark Twain, I might offend you with the truth.
  • #5: This might seem a bit offensive if youre a Java developer. After all..
  • #6: COBOL is not well regarded in general
  • #7: and is openly mocked. Of course, this is true of Java as well
  • #8: Of course, this is true of Java as well.
  • #10: But, they are used by the same customers
  • #11: And the companies that own them view them in the same way
  • #12: But, they have a similar architecture as well, at least in as much as how they are implemented. Lets look at a simple problem. Validate contact information including name, address, home, and cell phone numbers.
  • #13: Java has classes - typically written as something that ends in er or or - typically has a single entry point (execute, run, invoke, doIt) - subdivided into private helper method
  • #14: COBOL has programs - single entry point - args in, args out - subdivided into paragraphs
  • #15: Data is typically represented in java using beans
  • #16: Data is represented using a hierarchical notation and stored in copybooksHard to build a diagram for this, easier to show the codeBut the structure is the same, with a little redundancyHowever
  • #17: The COBOL code, know for its verbosity is actually shorter.
  • #18: Observations Java and COBOL code are about the same size COBOL code has a smidgeon or redundancyOtherwise, they are pretty much the same
  • #19: I know this is procedural code. There are better ways to write Java. But, this is how most Java is written and, in all fairness, its a useful metaphor.After all, what are we automating? Business processes. What did we do before we had automation?Papers moved about.
  • #20: Node is cool. Wicked fast Uses JavaScript Scales like crazy How does it do that?
  • #21: Typical environments are multi-threaded like Java-- often blocked waiting on IO and shared memory-- thread are managed in pools-- some threads are blocked waiting on threads from the pool-- and dont forget shared memory
  • #22: Node has one thread, just oneDoesnt block on IO, does it asynchronouslyEvents are propagated when the IO completes, or when the user fires oneThis makes one-thread really busy but eliminates all shared memory and all the overheadThere is another platform that worked this way
  • #23: Windows was famously single-processed single-threadedAt the core of windows is an event loop, just like in NodeApplications responded to these events and triggered code, blocking other applicationsThere was even a wonderful shared memory space.. Which was a lot of fun since apps were written in C and memory leaks/buffer overruns were a problemWordPerfect could crash Minesweeper
  • #24: First off, I dont think we are aware were doing it, at least not all of us, I think it just happens.What I mean is, why cant we see that weve ripped of the past?Arrogance & Ignorance
  • #25: Our culture, our era, our generation are enlightened Its easy to call someone foolish for thinking the earth is flat, the sun circles the earth, and youll never need more than 640k of memory. But, given the time period those were reasonable conclusions earth looks flat suns looks like it circles the earth and 640k well that was stupid People in past has the same brain as you, I tell my son that we are cave men
  • #27: Want a cure for that, read Meditations by Marcus Aurelius
  • #28: 2nd Century BCOr read Polybiuss Histories in there is both a cure for arrogance and I description of ignorance
  • #29: Built upon ideas by Plato AristotleTri-state cycleAristocracy is made up of the wise folksUltimately, 1 some or all
  • #30: People forget A by the time they get to C-- except for that old man who everyone ignores
  • #32: Prediction:Swarming is gonna be a thing
  • #33: This ones a little different but it still has the three statesClient all computers, islands of dataClient Server Some of the computers, share that dataServer one computer, all the datas in one placeTechnology snaps to client computing when hardware/cost inovation makes something possible -> Moores law in effectThe hardware is interesting in this one so I wanted to explore this one more so I made chart
  • #48: Look at the bottom. Dollars,size, trendLearn the arduino, the pi, and stuff like thatWhats the point?
  • #49: Mark Twain did actually say thisIts a lost cause history will move where it moves because humans are broken, fallen creaturesTurns out, the title of this talk isnt just crass, its also true
  • #50: I dont believe that we can change these trends, they are bigger than us and they come from us in aggregate.But, we can see them coming and position ourselves well so that we can survive and thrive.
  • #51: Where I workWhat I doBackground - COBOL through Ruby - C++, Java, & JavaScript