@TobiasTernent

GitHub: Tobias-Ternent

Thursday, 21 July 2016

How assign bean's property an Enum value in Spring config file?

Had this exact problem today of having to assign a bean's property with an Enum in a Spring XML configuration file. Seems that the answer is easier than expected! You just type in the enum's name directly for the value e.g.
<bean:property name="searchType" value="PRIVATE"/>

http://stackoverflow.com/a/516899

Tuesday, 28 June 2016

Preparing Your Code for JDK 9

Preparing Your Code for JDK 9: Erik Costlow discusses what to consider when upgrading to Java 9, where to find early access releases and how to analyze library dependencies for unintentional reliance internal APIs.

Thursday, 23 June 2016

Scrum and Kanban

The DevOps paradigm can be implemented through many different methodologies. The 2 most popular are: Scrum and Kanban. 

Scrum 
In essence, this is Scrum:


Everything that needs to be done is part of a product backlog. These tasks are then put into the Spring Backlog, and a spring is like a month long. Then anything blocking is reviewed daily for a "stand-up" meeting, and everything should be delivered incrementally with a view to the end of the spring. Then this process starts over again. 

You're supposed to have certain roles to ensure this runs effectively: a product master to manage the product/spring backlog, a sprint master so that the Scrum is being followed. Then the sprint backlogs are supposed to be estimated, people are supposed to take ownership of tasks, nothing is supposed to interrupt the sprint, stand-ups are supposed to be useful, multiple people are working on the same project, and tasks are done throughout the sprint so that "burn-down" and "velocity" can be shown in a chart. 

In reality from my experiences nothing like that ever happens, there is a great potential for misuse of Scrum mandates, which are arguably out-of-date in today's world. Especially for a small project I would recommend implementing a Scrum-ban (hybrid, or Kanban methodology which is less restrictive, and has a greater allowance for testing in order to help ensure high code quality, instead of having such an importance of deliverables at the end of a sprint. In theory sprints are supposed to be a way for developers to be protected from immediate changes to requirements, but with the flexibility to make changes to your plans as you go along. But in reality a lot of time that doesn't happen that way, and development get interrupted, and medium/long-term vision of projects are not as highly regarded as they should be. 

Kanban 
Simply put, this is Kanban:



It's a method for continuous improvement, that is you add things you want done to the "To Do" list, and prioritize them. Then when you're free, take a couple things to the "Doing" list. Set a conservative limit on how much work you can do at any one time. When they're done, but them across to another "Testing/Waiting" or "Done" list. When you've freed up a slot on the Done list, then pull something from the To Do list. If something bounces back into Doing from Testing, Waiting, or Done, then either move something back to To Do, repiroritise, or just carry on and deal with it, and only pull something new from To Do when you're free and back to a normal workflow. So it's supposed to be a way for "pulling" work instead of "pushing" work, e.g. work being pushed onto you constantly. Rather, you constantly pulling work onto yourself when you have the capacity to is much better. This way if things are taking too long, or if they are problems in the chain from To Do -> Done, then it should be quickly realised where bottlenecks are, and how to overcome them. This is something that Scrum normally fails at doing, what with its Sprints, Velocity, Poker Chips estimation, etc.

Build/Package/Test/Release/Deploy

To build/package/test/release/deploy, there are many software options out there in order to help streamline and automate the processes. There are tools available from Atlassian, AWS, and many others. Some of the most popular choices are listed below.

Atlassian 
Bamboo - for both automated code deployment and continuous integration.  ($10 for 5 users, one-time payment, self-hosted, or $10/month hosted). 
SourceTree - standalone tool for visualising Git repos (free). 
FishEye - search/monitor Git repos.  ($10 for 5 users, one-time payment, self-hosted). 
Crucible - for code reviews ($10 for 5 users, one-time payment, self-hosted). 

AWS 
CodeDeploy - for automated code deployment. There is no additional charge for code deployments to Amazon EC2 instances through AWS CodeDeploy.
CodePipeline - for continuous integration. One active pipeline for free each month. 


Others
Jenkins - for both automated code deployment and continuous integration, free self-hosted.  
TeamCity - free for up to 20 build configurations, self-hosted, for continuous integration. 
 otherwise expensive.

AWS storage

AWS offers 3 main ways for data storage:

S3 
Simple Storage Service (S3) - data is held in the cloud, in a "bucket". Inside a bucket, files and sub-directories can be created. The point of this type of storage is to write once, read may times perhaps from different services (EC2 instance, the Internet, etc). They can also be deleted easily. Data are automatically backed up and have a 99.9% uptime.

EBS 
Elastic Block Storage (EBS) - these are volumes that can be added onto EC2 servers, think of them like hard drives. They can be scaled up/down, added, removed, backed-up as needed per instance. 

Glacier 
The Glacier is for remote "off-site" backups. Write once, read (almost) never. This should be for long-term archival of data, e.g. that was present in S3 for a long time, and will never normally be used again, save for restoration of backup data. Glacier prices are cheaper than S3 for storage, but have retrieval costs.

API deployment

There are build automation tools for programming languages, which can be integrated into IDEs, e.g. Maven for Java, and any other JVM-based language (Clojure, Groovy, Scala, Ivy). Maven also has excellent dependency management from the Maven Central repository (and any private repositories). For Python, there's PyPI. Perl has CPAN. Node.js has NPM.