QCon 2018 – Ask me Anything – Josh Bloch

Title: AMA (ask me anyhing)
Speaker: Joshua Bloch @joshbloch

See the table of contents for more blog posts from the conference.


Law

  • Idea expression dichotomy – Words copyrightable but not ideas. Methods of operations not copyrightable  like QWERTY
  • Ideas may be protected by patents so can’t reimplement for 20 years. Ex: +++ on Hayes Modem
  • Now legal strategy to include a patent in copyright so goes to desirable court
  • Technically implementing your own list is a problem. But selective enforcement implies won’t enforce.

Microsoft vs Sun

  • had signed agreement and fought
  • not broader implications

APIs

  • How document scalability, performance and other non-logical constraints? Better to specify even if implmentations get to choose. That way it is specified that can’t rely on.
  • Some requirements/behavior is in spec when buy a product. Not just in API. Ex: copy machine can make X copies a second while API is press button to make copy.
  • Balancing act – don’t want implementation details in API that might change as callers will rely on them. But if not enough, developers assume/infer

Java

  • Eventually languages keel over from own weight. Good thing.   Just like people, not meant to live forever.
  • Need to decide what to learn
  • Need to decide which API to use.
  • Makes room for new entrants when people can’t deal with current languages
  • Not just language. Also VM, libraries, etc. Much harder to move away from a platform. Harder than moving off JVM  than changing from C to Java.
  • Josh’s favorite editors – IntelliJ and Emacs
  • Type erasure is present so could be migration compatible (vs a whole new collections library)
  • As languages age, some decisions make sense only due to history and past decisions.
  • Josh wishes Java supported unsigned integers and especially bytes. Gosling designed  by gut originally and was usually right. This was a bad one. He felt it would have been unneeded complexity. Solution is a library since not in the language
  • Josh would have added methods to return an arbitrary element and leave (or remove) from collection.
  • Josh would have returned Collection itself instead of a boolean as to state. That would have allowed fluent calls
  • Josh expects modules to get used mainly within the JDK

Java and six months release cycle

  • Platforms require stability. Can’t have major changes each 6 months.
  • Lots of stuff that in there and not used
  • Books released less frequently than release cycle even when more reasonable.
  • Changes minisule so not worth updating for each

Josh’s future

  • Josh teaching OO and APIs courses next semester
  • APIs course may turn into book on API design

My take

At Josh’s keynote, he commented that there was no time for questions, but there was this AMA. This was awesome! The people who were interested got to ask lots of questions and everyone else didn’t have to sit through it.

 

QCon 2018 – A brief, opinionated history of the API

Title: A brief, opinionated history of the API
Speaker: Joshua Bloch @joshbloch

See the table of contents for more blog posts from the conference.


In 2012,  Josh testified in he Oracle vs Google  lawsuit.  He therefore studied APIs   And this talk came from there

History

  • First subroutine libraries – 1948  paper from Princeton. Showed ol yellowed paper with assembly language. However, woul have required manual changes each time.
  • Wilkes won Turing award in 60’s for actually creating a reusable subroutine library. EDSAC. World’s first stored program computer. Kept simple to get it done so fast!
  • Wilkes and Wheeler wrote boot loader (first 30 words) to make reusable so programmers didn’t have to deal with binary machine code. Instead, programmers use assembly language.
  • In first program on first computer ”… realization came over me that a good part of the remainder of my life was going to be  spent in  finding the errors in my own programs” —— Maurice Wilkes. Subroutine library  is a partial fix.
  • Wilkes  made his student Wheeler deal with that
  • ”The wheeler jump” —— call function by jumping. Requires self  modifying ocde which would be  a security nightmare now.
  • 1951 – “The Preparation of programs for digital computers”. Called WWG for last names of authors.  World’s first text on computer programming and remained primary text until higher level languages arose.   Introduced subroutines to the word.
  • 1952 –   Wheeler wrote about   Concepts including higher order functions. Whole paper is only  two pages long and  covers so much. Doesn’t cover platform independence because only one machine architecture. Doesn’t cover legacy code because first program
  • 1968 – first reference to word API.  Josh submitted to add reference in dictionary
  • 2006 – people still don’t know importance of good API design

What is an API

  • subroutine definitions/protocols (Josh disagrees with tools being included)
  • communicate with  software and hardware
  • If it provides operations defined by inputs/outputs and allows reimplementation without compromising user, it is an API. Can ammend definition to make programming language level
  • glue that connects digital universe
  • ex:   Fortran standard library. 28 math functions
  • ex: IBM instructon set [about half audience considers API]
  • ex: C standard library
  • ex: UNIX system calls – operating system kernels have APIs
  • ex: DEC VT100 escape sequences – peripheral control interface. Smart terminals could blink or moe around on screen
  • ex: IBM PC BIOS   – control underlying hardware
  • ex: MS DOS comand line interace – not exactly API, but serves as one if using scripting language.
  • ex: Hayes modem AT command set – used to type manually. Been reimplemented any times since
  • ex: Adobe PostScript – language and/or API
  • ex: Perl regex – API within a language
  • ex:   Server Message Block – wire level protocols. Don’t program with it directly
  • ex: Windows API
  • ex: Java class libraries – core languages
  • ex: REST API for web service

Law

  • Always had freedom to reimplement APIs.
  • EDSAC was even reimplemented in Japan without any communication
  • 2010 – Oracle sued Google over Java APIs in Android. Claimed patent and copyright infringement. Ruled no patent infringement and cannot copyrightable. Oracle appealed and won. Supreme Court declined to hear. Appeals court determined fair use. So right now, APIs are copyrightable and need permission to reimplement. Google currently petitionining to rehear. Many parties supported Google.
  • Currently need author’s permission to reimplement API. Might have to pay. Author has monopoly on API. Copyright problem is worse than patents because lasts 95 years.

My take

This was awesome! I’ve seen Josh do Java talks and I liked  this topic as well

 

 

 

1951

 

QCon 2018 – Behavioral Economics and Chatbots

Title: Behavioral Economics and Chatbots
Speaker: Jim Clark

See the table of contents for more blog posts from the conference.


Urinal with a fly is an example of behavioral economics. The idea is to give something to aim at.

Psychology

  • Nudge theory – alter decision making
  • Value-action gaps – how want to be working vs how actually work
  • Information deficits  – know right thing when need to know it
  • Diffusion of innovation – why do teams succeed vs get stuck

OODA loop

  • Observe – unmet goal
  • Orient – provide context
  • Decision – should action be taken. choose appropriate action
  • Action – take appropriate action

Demo – follow the leader

  • find out what others are doing/if issues
  • chatbot notices when library version changed and if different from others/standard
  • chatbot offers to set new version to others that should use later version. testifying it is safe
  • then chatbot can nudge users on older version to upgrade
  • can tell chatbot to upgrade it for you and chatbot creates the pull request for the update. ex: action: accept/set target/ignore

Demo – Libbis? (he said only two people call it that)

  • When change code in one project, the projects that copied it get a pull request to change. For reuse smaller than libraries [seems like a hack to enable copy/paste reuse]
  • Recognizes same code fingerprints
  • Action: accept/reject pull request

Demo – Value Action Gaps

  • Reports vulnerable libraries and whether a fixed version is available
  • Artifactory can block more downloads/builds with artifacts
  • Action: deal with violation/block download/upgrade
  • The command is important. The nudge lowers the barrier to actual acting. Timely suggestions.

Demo – Innovation diffusion

  • Shared goals
  • When one project gets a new feature/microservice, encourage others to as well.

General

  • Always be innovating – need to be able to try things without getting permission from a committee.
  • The chatbot committed so much to github that it got recommended to do a code review.
  • Make it easy to create new projects. Won’t do it if it is hard. If ceremony isn’t something you want to do, take it away.
  • Lower barrier for good ideas spreading.
  • Bots are not mobile CLIs. They are agents for collaboration and automate in a social context.

My take

This talk uses live demos in slack. Very cool! The range of benefit to developers is really useful. Seeing real Slack examples and real code was great.  I missed a little bit because I had to make a change to my deck for tomorrow’s presentation. (Java 11 goes feature complete tomorrow and a new feature was added.) I wish I could rate this session higher than “green”.