[2019 oracle code one] inspecting in CD pipelines

Silence of the Lambs: Inspecting Source Code and Binaries in Continuous Delivery Pipelines

Speaker: Michael Huettermann @Huettermann

For more blog posts, see The Oracle Code One table of contents



General

  • More than one solution.
  • First “DevOps” book – Adam Smith – Wealth of Nations – talks about division of labor
  • Holistic/shared goals/processes/tools
  • Cycle time – across functions, create own definition

Pipelines/cycle time

  • Start with value stream map
  • Identify areas for improvements
  • Every chain has a bottleneck.
  • Consider theory of constraints. Fixing one bottleneck will expose another.
  • Consider as doughnuts, not tubes. Want feedback.
  • Glue together existing tools.
  • Identify stages and quality gates
  • Automate
  • ex: continuous build, dev build, RC build, GA build
  • “Pushing around binaries is a vintage approach” – should add context info

Many tools

  • Binary repo (Nexus, Artifactory)
  • Containerized infrastructure
  • Cloud enabled setup
  • Continuous Inspection (SonarQube for code, Twistlock for Docker)
  • Supporting/cross cutting tools
  • Middleware (Tomcat, JBoss)
  • Functional monitoring (ELK)
  • Automation engine: (Jenkins)

My take

The images were a good case study. While I would have rather have seen a live demo than a video, it was a video the speaker made so pretty equivalent. And he narrated it well.

[2019 oracle code one] modules

Java Modules: Why and How?

Speaker: Venkat  Subramaniam @venkat_s

For more blog posts, see The Oracle Code One table of contents



Why modules?

  • Modules designed to make the JDK itself modular
  • It’s like bringing these 70 suitcases with you on vacation in case you need something.
  • Better security. Can’t create another jar with same package and access package private.
  • Easier to make new things secure
  • In law mode – The build team drops a few jars until you call that functionality and get class not found. With modules, runs in mother mode. Pre-check what need. Fail fast
  • Reuse release equivalency principle – reuse the whole of what released. USPS gives partial packages. Don’t want that. You export packages but receive/require module. This is a handshake. Both have to extend hands. One must export and the other must require.

Module example

  • Showed compiling, jarring up and running the java command
  • -p modulePath
  • -m modName/my.package.MyClass
  • jar -f myJar.jar -d – tells you about jar file metadata. Will show derived info for old modules that lack formal metadata

Module types

  • Unnamed module – exactly one. Contains everything you dump in the classpath. Whether it is a module jar or not
  • Automatic module – legacy jars on module path
  • Explicitly named modules – jars with module descriptor on module path

Module info

  • exports – package that other code on module path should be able to access.
  • Public is no longer public. Public without exports is not available
  • requires – want to use module
  • requires transitive – never use for third party library. Only use when refactoring a ball of mud into pieces

Rules

  • Any jar running in the classpath is called an unnamed module
  • Any transitional jar running in the module path is called an automatic module
  • Any jar with a module descriptor running in t classpath is a n unnamed module
  • Any jar with a module descriptor running in the modulepath is an explicitly nmaed module
  • Modules can’t share packages
  • Unnamed modules can talk to other unnamed modules
  • Automatic modules can talk to other automatic modules
  • Automatic modules can talk to unnamed module
  • Unnamed modules cannot talk to automatic module (Get class not found across module path/classpath when can’t access because doesn’t even look there)
  • An explicit named module can talk to other explicit named modules
  • An explicit named module can talk to automatic modules
  • An explicit named modules cannot talk to unnamed module
  • An explicit named module has to require any modules it needs incudling automatic modules (so please give a decent name)
  • An explicit named module exports only what it specifically exports
  • An unnamed module automatically exports all its packages

Migration path

  • Run all in classpath in old Java
  • Run all in classpath in latest Java
  • Fix any errors
  • Run them all in module path
    Give names for automatic modules
  • COnvert from top to bottom to explict modules

My take

I like Venkat’s laptop stand so he can type and use the computer. I also enjoyed seeing his enthusiasm. I’ve been writing about modules lately so seeing it explained a different way is useful. The demos are good. The list of rules is a good reference (or review) as well

[2019 oracle code one] java keynote

For more blog posts, see The Oracle Code One table of contents


Quantum Computing – Jessica Pointing

Good analogy to electric bike

  • Fundamentally new type of computer
  • Solves specific type of problems faster
  • Encryption
    • 100 seconds to find multipliers of very large number
    • Shor’s algorithm
    • Can break encryption methods.
    • Need a large quantum computer to do so which hasn’t been built yet
    • Research on post quantum cryptography
  • Simulate atoms and molecules
    • Can simulate interactions and discover new medicines
    • Can design new materials
  • Quantum machine learning
  • Unstructured search – can find match in square root of n tries – grover’s algorithm
  • Superposition – can see multiple states at same time. This means can process multiple states at same time.
  • 10^90 states if have 300 qbits
  • Quantum gates – combine to solve problem
  • At end of quantum algorithm, do measurement to get classical result
  • Upcoming book: Quantum Computing for Java Developers Code examples: https://github.com/johanvos/quantumjava
  • Can build quantum computers with superconductors, trapped ions, photons (light), diamonds. Still TBD which is equivalent of transitiors.
  • Currently 50 physical quantum bits
  • Goal is large scale quantum computer with millions of qbits
  • Currently compare quantum algorithm to best classical supercomputers
  • MATHS – Milestone, Applications, Theory, Hardware, Shift

Java SE

Stability – Gil Tene (Azul) and Bruno Souza

  • Java surfing to the cloud Duke is the Java 13 mascot
  • Need to keep stability with faster cadence
  • JCP was 20 years old last year
  • Need compatibility/stability so companies can compete on their products
  • TCK ensures compatibility

Motivation – Videos

  • Migrating to Java 11 Modules
  • Most widely used libraries now work with Java 9+ plus
  • Plugged Java 13 and licensing/support [If you care about support, you should be on 11 not 13]
  • Keep dependencies up to date so easy to upgrade and should anyway [we should also floss every day]

Compatibility – Three people [missed names but one is Mala Gupta]

  • New Relic will be compatible with Java 13 this month
  • CI/CD pipeline. Run tests against multiple JDKs.
  • Early access builds of 14 already availability
  • Used to take months/years for IDE to support
  • JetBrains has 4 months release cycle. Release new version with all new language features

Subscription – Sabre

  • When down, passengers stranded and some planes can’t fly
  • Support important

New generation

  • Book Emmy in the Key of Code
  • 12 year old girl learns code
  • Novel in verse/poetry
  • [This book looks awesome!]
  • public static void main(String[] args) – “You aren’t going to understand what this means so memorize it like a song”

Java Language Architect – Brian Goetz

  • Rapid release cadence – more features, change in how plan/design/deliver new features
  • Missing the boat by 6 months isn’t as significant. So less time on release management.
  • Less time one feature blocked on another
  • Did quick walkthru of features added in Java 10+
  • Each release has hundreds of smaller enhancements and bug fixes
  • With big releases, motivation to upgrade.
  • Now big features broken up into smaller features and delivered in phases. Need to adjust sense of what constitutes something new
  • Language improvements make us more productive
  • Platform improvements increase performance and other non functional requirements without changing code

Java 13 – Michael Vidstedt

  • Chart showing performance improvements over time for new features
  • AppCDS improves startup (Application Class Data Sharing). VM can refer to information from build time
  • Also investing in GC performance

Projects – Brian Goetz

  • Amber – Right sizing lambda ceremony
    • Switch expressions. IntelliJ offers to refactor switch statement into expression
    • Text blocks/multi line strings. Leading space before columns with “”” on each line considered accidental and not preserved.
    • Domain class – “record” type instead of class. Don’t need to specify equals/hash code/getter/setter. Heard this last year because some features take more than 6 months to develop
  • Valhalla – linking up language with modern hardware
    • “inline” declares that object identity not important so fields can be stored near each other in memory
  • Panama – interacting with native code. expect preview version for accessing off heap memory in next year. Also working on vector API
  • Loom – continuations in JVM and fibers in JDK

My take:

The quantum talk was great. Lots of props and concepts. The imagery of spinning a tourist giant frosted donut reinforced the message really well. I like that Bruno wore is flag/cape. Added some fun. I like that the “commercial” bits were short. The children’s book looks awesome. Excellent start to the conference.

Also, awesome that there were some tables in the back with power for laptops and typing.