Skip to main content

Posts

Showing posts from November, 2015

Throw Code Away

The third and final part of my agile architecture series.Part 1 - You Cannot Iterate upon ArchitecturePart 2 - Don't Build a ThingPart one suggested walking skeletons for new features or projects. Part two suggested building the limited, smallest and simplest functionality possible. However you do not always have the luxury of deferral. Likewise if the project already exists and you are amending functionality, a walking skeleton is going to be limited.SolutionThrow code away. This sounds brutal and overkill, but throwing code away has many advantages.BenefitsThe second time around you will solve the problem quicker having benefited from first time. The first attempt is a prototype in this case. Throwing away prototypes is expected. They are not production ready, usually built with short cuts or quality comprises intentionally.The cleanest code is no code. Your following attempts will be cleaner. Knowing the issues from the previous attempt allows the ability to put code and proced…

Don't Build a Thing

Part two of my agile architecture series. Part 1 - You Cannot Iterate upon ArchitecturePart 3 - Throw Code AwayHere is a real life example of where I treated a unknown project incorrectly. Why I handled this is badly and how I should have handled it if I could rewind time.WhoopsAn external client had a proposal for a web service which would power part their new web application. This service sounded very simple. Data import and some basic querying. There were plans to add additional bells and whistles at a later date. After an initial meeting development began.A week later a second meeting was placed. A good few hours of development had been invested by this point. The meeting was useful, however some changes had cropped up. The data format had been modified, my solution could not handle the new format. Also the querying needed various modifications.A week later, after several more hours of changes, the second meeting landed. There were more changes. This time technical adjustments ba…

You Cannot Iterate upon Architecture

This is the first part of a series of posts as to why gradual iteration, doing the simplest thing that can possibly work over a software project fails in many cases. This series will explain why this is the case, and provide solutions.Part 2 - Don't Build a ThingPart 3 - Throw Code AwaySpotify has gave a talk on how it builds products and manages teams internally. This provides some great insights and advice. As part of this an incredibly effective image is used. This shows the production of a form of transport to travel from A to B.In the first half of the image, the product is built in iterations. Each step adds to the next. It is not until the fourth step that the product is able to take passengers from A to B. Agile development aims to solves the issues around this.The second half of the image is built iteratively. The goal is still the same. A product to travel from A to B. From the first version this goal is complete. However the team would be embarrassed to release in this …

Pre Computation

Caching is a common technique, especially with HTTP as it is made so easy. However pre computation is an alternative that can be used to reduce failures as well as speed up processing and response times.Caching ExampleAssume a list of countries to be displayed on the UI. These are often stored in one logical place, the database. A remote call is issued to query the database and return the results. The results are then manipulated and inserted into the UI. Repeat calls will then be cached for some period by the web server and/or proxy.Pre Computed ExampleAs part of the build process have the same query performed, dynamically building up the result set. Using a templating language modify a base source file which simply inserts the dynamic result set. The end result of this would be a source file containing a collection of countries as if you had hardcoded the values. The difference is these values are pulled from a single source of truth as part of the pre build step.In a statically co…