Presented at JAX London 2013
When you write and run Java code, the JVM makes several allocations on your behalf, but do you have an understanding of how much that is? This session provides insight into the memory usage of Java code, covering the memory overhead of putting int into an integer object and the cost of object delegation and the memory efficiency of the different collection types. It also gives you an understanding of the off-Java (native) heap memory usage of some types of Java objects, such as threads and sockets.
37. Cost of the status quo…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Test cycles increase
Reuse less
Value of your code base declines
Editor's Notes
“Architecture” connotes up-front design and enforcement. Retrofitting means working as much as possible with the code as it is, discovering natural structures and boundaries, and then making minimal changes to the implementation in order to fit this “discovered” structure. Our goal is to reorganize the mass of code we have, into a shape that is much easier to understand and evolve.Depending on your start point it may not be what you would ideally have created, but it will be infinitely better than the BBOM you have now.As Brian said yesterday, BBOMs have made millionaires, but very rarely, for the most part they wreck projects, and make developers miserable.
Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.
How does this transfer to software?
Ward Cunningham
Too complex to understandNo encapsulation so no constraints on what uses what, no sheltering from change.
You KNOW when you see a class if it is too complex
Assuming each of the packages is within Compositional Complexity thresholdAnd this packaging needs further composition…Another aspect to the structure at this levelAs long as it looks something like this…
Levelized
Strongly connected componentsDrives coupling up dramatically, CCD
Think of tangles as canceling CCCoupling
A structured codebase is a great milestoneMuch easier to work withMeasurable– keep it structuredEasy to strengthen modularity, define architecture
Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.
Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.