background preloader


Facebook Twitter

Clean Code Principles - Marcus Biel. In this article I will be discussing some of my philosophy about clean coding.

Clean Code Principles - Marcus Biel

What is Clean Code? Clean Code is a philosophy that I follow when I code. Actually, to me, it feels more like a religion than a philosophy! It’s the idea that your code should be precise, and as close to perfect as possible. If you have more code than you need, it shouldn’t be there. It all started in 2001, when I was reading The Pragmatic Programmer by Andy Hunt and Dave Thomas, and I read statements like, “never accept a broken window” that resonated with me.

Se lancer dans Sass. Qui a encore peur aujourd'hui de Sass et des préprocesseurs en général ?

Se lancer dans Sass

David Demaree nous montre dans cette introduction claire et complète la simplicité et l'utilité de Sass. Indispensable, vraiment. Par David Demaree La simplicité de CSS est depuis toujours l’une de ses caractéristiques les plus agréables. Les feuilles de style CSS ne sont au fond que de longues listes de règles, chacune consistant en un sélecteur et quelques styles à appliquer. Il y a eu des propositions pour améliorer CSS – l’ajout de constantes ou de variables par exemple – mais aucune n’a été mise en oeuvre par les principaux navigateurs. Heureusement, il y a quelques années les développeurs Hampton Catlin et Nathan Weizenbaum ont proposé une meilleure façon de gérer des feuilles de style complexes. La nouvelle syntaxe de feuilles de style s’appelle Sass, pour “syntactically awesome style sheets” (feuilles de styles syntactiquement super). On commence ! Gulp-sass. Sass plugin for Gulp.


Before filing an issue, please make sure you have Updated to the latest Gulp Sass and have gone through our Common Issues and Their Fixes section. npm install gulp-sass --save-dev Something like this will compile your Sass files: 'use strict'; var gulp = ; var sass = ; gulp You can also compile synchronously, doing something like this: Options.


Java. Poo6. Design Patterns du Gang of Four appliqués à Java. Cet article a pour objectif de présenter les Design Patterns du "Gang of Four" avec des exemples concis appliqués à Java.

Design Patterns du Gang of Four appliqués à Java

Chaque Design Pattern est présenté avec son diagramme de classes, ses objectifs, les motivations pour l'utiliser, les responsabilités des classes le constituant, puis une implémentation simple. GoF Design Patterns Using Java (Part 2) My concluding write-up on design patterns, with some examples.

GoF Design Patterns Using Java (Part 2)

Please first check out Part-1 of this article under 'GoF Design Patterns Using Java (Part 1).' To understand the philosophical and historical perspective on the Gang of Four's design patterns, I made a short, 10-minute video. Clojure for Java Programmers Part 1 - Rich Hickey. Composition over inheritance. This diagram shows how the fly and sound behaviour of an animal can be designed in a flexible way by using the composition over inheritance design principle.[1] Basics[edit] Example[edit] Inheritance[edit] An example in C++ follows: Then, we have concrete classes: class Player - which is Solid, Movable and Visibleclass Cloud - which is Movable and Visible, but not Solidclass Building - which is Solid and Visible, but not Movableclass Trap - which is Solid and neither Visible nor Movable Using inheritance we either have to do multiple inheritance, which leads to the diamond problem, or make classes like VisibleAndSolid, VisibleAndMovable, VisibleAndSolidAndMovable, etc. for every needed combination, which leads to a large amount of repetitive code.

Composition over inheritance

Composition and Interfaces[edit] The following C++ and C# examples demonstrate the principle of using composition and interfaces to achieve code reuse and polymorphism. Then, concrete classes would look like: In C#: Benefits[edit] The web's scaffolding tool for modern webapps. Starting a Kubernetes 1.5.x cluster. Kubernetes 1.5.0 was released just about a month ago!

Starting a Kubernetes 1.5.x cluster

Key theme for the release are: StatefulSets (ex-PetSets)StatefulSets are beta now (fixes and stabilization)Improved Federation SupportNew command: kubefedDaemonSetsDeploymentsConfigMapsSimplified Cluster DeploymentImprovements to kubeadmHA Setup for MasterNode Robustness and Extensibility. Tomcat vs. Jetty vs. Undertow: Comparison of Spring Boot Embedded Servlet Containers. With the rise in popularity of micro services we have seen a similar rise in popularity of applications with embedded servlet containers.

Tomcat vs. Jetty vs. Undertow: Comparison of Spring Boot Embedded Servlet Containers

Spring boot is a Java based framework that supports application services. It runs as a standalone jar with an embedded servlet container or as a WAR file inside a container. In this example, we will focus on the standalone jar with embedded servlet containers. The framework supports three different types of embedded servlet containers: Tomcat (default), Jetty and Undertow. We will compare the three and look at differences in properties, settings, performance and memory.

We used Eclipse Neon, Java 8, Maven 3.3.9, Spring 1.4.3, Tomcat 8.5.6, Jetty 9.3.14 and Undertow 1.3.24. Pipeline as Code with Jenkins. Set up your own Continuous Delivery stack. Last week I wanted to try new things with ‘pipeline as code’ with Jenkins.

Set up your own Continuous Delivery stack

The best way to try new things is running it as Docker containers. This way I can keep my MacBook clean and don’t mess up existing stuff I am working on (also see this article about what Docker can offer for a developer). Another big advantage by using Docker is that there is already a complete stack of Dockers available to set up the necessary tools. However, for some unclear reason this stack didn’t work on my MacBook (see this issue) so I took this opportunity to build my own stack with some Dockers of my own choice :-).