Dienstag, 10. Dezember 2013

"Leading Change" in einer Agile Company

Wie kann ich erfolgreich mein Umfeld verändern? Welche Hebel muss ich in Bewegung setzen, um Ideen umzusetzen? Wie kann ich meinen Chef überzeugen? Diesen oder ähnliche lautenden Fragen werden in dem Artikel von John P. Kotter in Leading Change - Why Transformation Efforts Fail eine Methodik zur Lösung angeboten.

Wenn mich jemand fragt, wie eine Firma sein muss, in der ich gerne arbeite, dann würde ich sicher antworten " ... offen für Veränderungen.". Damit allein ist es jedoch nicht getan. Es braucht Menschen die diese auch leiten, begleiten und mittragen.

Ich zitiere hier die Phasen des Change Management kurz auf deutsch:
  1. Gefühl der Dringlichkeit vermitteln
  2. Führungskoalition aufbauen
  3. Vision und Strategien entwickeln
  4. Vision kommunizieren
  5. Hindernisse aus dem Weg räumen
  6. Kurzfristige Erfolge sichtbar machen
  7. Veränderung weiter antreiben, nicht nachlassen
  8. Veränderungen in der (Unternehmens-)Kultur verankern
Ausführliche Erläuterungen sind in dem oben verlinkten Artikel zu finden.

Fazit:

Ein Leitfaden mit dem man methodisch Veränderungen bewirken kann. (Unbedingt Fallstricke beachten!)

Weiterführende Links:

http://www.kotterinternational.com/our-principles/changesteps
http://www.das-pinguin-prinzip.com/

Donnerstag, 5. Dezember 2013

CLD - als ich noch nicht wußte, was das heißt

Im letzten Artikel über meinen Alltag DevOps Wie ich das Monitoring kaputt machte habe ich CLD angesprochen. Dabei ist mir eine Geschichte aus meiner Anfangszeit bei meinem jetzigen Arbeitgeber eingefallen. Im Nachhinein lustig, damals etwas verunsichernd.

Ich bin also neu in meiner Firma und committe Code. Kurz darauf geht die Live-Plattform aus. Was mir in dem Moment noch nicht bewußt war, dass wir gerade CLD leben und ich gerade eine Kehrseite von CLD intensiv erfahre.

Ich habe also committed  und dabei einen Teil der Plattform erwischt, die nicht ausreichend abgetestet war. Der noch nicht sichtbare Fehler führte dann mit 10minütiger Zeitverzögerung dazu, dass ich eine unbeabsichtigte Downtime von 20Minuten verursacht habe.

Da ist mir schon kurz etwas heiß geworden ;).

Das war auch, glaube ich der Zeitpunkt, an dem wir von automatischem CLD auf manuelles CLD gewechselt sind.

Fazit für mich:

Automatismen der Buildchain sollten den Teilnehmern bewußt sein.

Dienstag, 3. Dezember 2013

Alltag eines DevOps - wie ich das produktive Monitoring kaputt machte

Ich arbeite in einer (wirklich tollen) Firma, die sich vielen modernen Themen annimmt und diese versucht zu leben.

zu leben

Das bedeutet, dass wir einem aufgeplusterten Buzzword versuchen Leben einzuhauchen. So z.B. achten wir nicht auf Qualität ... wir leben Qualität. Wir schämen uns für Fehler. Wir lernen aktiv aus Fehlern. Wir analysieren grobe Fehler und leiten Strategien ab, die proaktiv in Verhaltensänderungen überführt werden (sollen). Wir laden es (das Buzzword) so mit Emotionen aus, dass es kaum noch infrage gestellt wird. Dann leben wir es so intensiv, dass wir alle Übertreibungen einmal erfahren haben und uns bildlich gesprochen mindestens einmal die Augen ausgeheult haben. Danach finden wir meist ein ganz gesundes Mittelmaß und begegnen neue Hypes, die wir durchleben.

So ist das auch bei Continuous Live Deployment (kurz CLD). Kurz beschrieben ist CLD die Weiterentwicklung von Continuous Integration zu kleinen kurzen Releasezyklen. Bei Martin Fowler sind dazu verschiedene verwandte Themen beschrieben.

Nun das klingt sehr interessant. Schnell und oft neue Versionen dem Nutzer bereitstellen. Allerdings wird vergessen, dass einige Vorraussetzungen erfüllt werden müssen (Automatisierte Tests, CI, CM, DevOps).

Wir sind mittlerweile so doll CLDisiert, dass wir einige Vorbedingungen vergessen. Das ist der Moment des intensiven Durchlebens. Ich glaube wir haben Phasen jugendlicher Leichtigkeit bei der Umsetzung neuer Trends.
Bei uns ist CLD mittlerweile in der Administration unserer produktiven System angekommen. Wir sind soweit, dass wir nicht nur Software, die unsere Geschäftslogik enthält, à la CLD herausgeben, sondern auch Software die für den Betrieb eben dieser erforderlich ist, so handhaben. So auch das Monitoring.

So kam es nun, dass ein Entwickler (ich) gegen 19 Uhr nach langem Kampf als DevOps mit Icinga Änderungen in der Konfiguration committed hat. Mit CLD vergeht ein Fingerschnippen und alle Tests sind durchlaufen, es wird gestaged und wieder laufen alle Tests und im Nu ist es live.

Oder auch nicht - weil .... wir leider kontinuierlichen stagen und sofort live schieben, aber an eben dieser kleinen spröden Monitoringkonfiguration das Testen vergessen haben.
Ich habe dann committed und ... hier ist Fehler 1 ... mich darauf verlassen, dass Fehler durch Tests bemerkt werden und nicht zu Beeinträchtigungen führen. Leider ist durch  ... Fehler 2 ... fehlenden Tests keine Fehler aufgefallen und direkt bis in die produktiven Systeme propagiert worden ... mit allen Konsequenzen.

Der Fehler wurde von der Rufbereitschaft dann jedoch wieder in 5 Minuten gefixt.

Da wir allerdings Qualität leben, haben wir am nächsten Tag gemeinsam das Problem analysiert und einige Tests aka Quality Gate eingearbeitet.

Fazit:

CLD ist beeindruckend, allerdings ohne eine gute Qualitätsinfrastruktur auch zerstörerisch.

Donnerstag, 14. November 2013

Fast visual frontend prototyping - divshot.com

Ich habe es am Samstag ausprobiert und bin etwas begeistert ;)

Aussagen der Website, die ich so übernehme:

Fast, visual front-end development.

As simple as a mockup tool. As powerful as a text editor.

Prototyping with Bootstrap and beyond

Quelle: http://www.divshot.com/

Sonntag, 10. November 2013

Technologieradar Mai/2013

Auf der vergangenen Goto in Berlin wurde von ThoughtWorks das Technology Radar erwähnt.

Ich kann nur jedem - der den Anspruch an sich hat, auf der Höhe der Zeit zu sein - empfehlen es zu lesen.

Legende:
Adopt: We feel strongly that the industry should be adopting these items. We use them when appropriate on our projects.
Trial: Worth pursuing. It is important to understand how to build up this capability. Enterprises should try this technology on a project that can handle the risk.
Assess: Worth exploring with the goal of understanding how it will affect your enterprise.
Hold: Proceed with caution.

Techniques

    ADOPT
  • Aggregates as documents
  • Automated deployment pipeline
  • Guerrilla testing
  • In-process acceptance testing
  • Mobile testing on mobile networks
  • Performance testing as a first-class citizen
  • Promises for asynchronous programming
  • Windows infrastructure automation
    TRIAL
  • Analyzing test runs
  • Blue-green deployment
  • Co-location by telepresence
  • Continuous delivery for mobile devices
  • Database migrations for NoSQL
  • Edge Side Includes for page composition
  • HTML5 storage instead of cookies
  • Logs as data
  • Micro-services
  • Mobile first
  • Perimeterless enterprise
  • Responsive web design
  • Semantic monitoring
    ASSESS
  • Capturing client-side JavaScript errors
  • Collaborative analytics and data science
  • Development environments in the cloud
  • Focus on mean time to recovery
  • Machine image as a build artifact
  • Minimizing application configuration
    HOLD
  • Exhaustive browser based testing

Platform

    ADOPT
  • Elastic Search
  • MongoDB
  • Neo4J
  • Redis
  • SMS and USSD as a UI
    TRIAL
  • BigQuery
  • Continuous integration in the cloud
  • Couchbase
  • Hadoop 2.0
  • Node.js
  • OpenStack
  • Rackspace Cloud
  • Riak
    ASSESS
  • Azure
  • Calatrava
  • Datomic
  • PhoneGap/Apache Cordova
  • PostgreSQL for NoSQL
  • Vumi
  • Zepto.js
    HOLD
  • Big enterprise solutions
  • Singleton infrastructure
  • WS-*

Tools

    ADOPT
  • D3
  • Embedded servlet containers
  • Frank
  • Gradle
  • Graphite
  • Immutable servers
  • NuGet
  • PSake
    TRIAL
  • Apache Pig
  • Gatling
  • Jekyll
  • Locust
  • Logstash & Graylog2
  • PhantomJS
  • Puppet-librarian and Chef-librarian
  • TestFlight & HockeyApp
    ASSESS
  • Browser-based templating
  • Faraday
  • Hystrix
  • Icon fonts
  • Light Table
  • Octopus
  • Reactive Extensions for .Net
  • Riemann
  • Snowplow Analytics
  • UIAutomator
    HOLD
  • Heavyweight test tools
  • Maven
  • TFS

Languages & Frameworks

    ADOPT
  • Clojure
  • CSS frameworks
  • Jasmine paired with Node.js
  • Scala
  • Sinatra
    TRIAL
  • CoffeeScript
  • Dropwizard
  • HTML5 for offline applications
  • JavaScript as a platform
  • JavaScript MV* frameworks
  • Play Framework 2
  • Require.js & NPM
  • Scratch, Alice, and Kodu
    ASSESS
  • ClojureScript
  • Gremlin
  • Lua
  • Nancy
  • OWIN
  • RubyMotion
  • Twitter Bootstrap
    HOLD
  • Backbone.js
  • Component-based frameworks
  • Handwritten CSS
  • Logic in stored procedures
Quelle: http://www.thoughtworks.com/de/radar

Mittwoch, 6. November 2013

secure alternative to ssh-agent

I'm really impressed by this blog post. It sums up why the use of ssh-agent is a security threat.

Not only warning it shows a very comfortable way with the inbuilt ProxyCommand to circumvent the threat.

Montag, 9. September 2013

lint-maven-plugin - check your pom.xml

We know for each and everything there are some Do's and many Don'ts. This is about recommendations on your pom.xml of your maven project.

Just try this:

$ mvn com.lewisd:lint-maven-plugin:check
In contrast to maven enforcer this not about enforcing rules, it is more about showing common violations.


example

$ mvn com.lewisd:lint-maven-plugin:check
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven POM lint plugin 0.0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- lint-maven-plugin:0.0.8:check (default-cli) @ lint-maven-plugin ---
[INFO] Writing summary report
[INFO] [LINT] Completed with 3 violations
[INFO] [LINT] OSSIssueManagementSectionRule: missing  section : 0:0 : /home/lars/development/workspaces/sonar/lint-maven-plugin/pom.xml
[INFO] [LINT] ExecutionId: Executions must specify an id : 346:40 : /home/lars/development/workspaces/sonar/lint-maven-plugin/pom.xml
[INFO] [LINT] OSSContinuousIntegrationManagementSectionRule: missing  section : 0:0 : /home/lars/development/workspaces/sonar/lint-maven-plugin/pom.xml
[INFO] Writing xml report
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.678s
[INFO] Finished at: Mon Sep 09 02:00:32 CEST 2013
[INFO] Final Memory: 11M/267M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lewisd:lint-maven-plugin:0.0.8:check (default-cli) on project lint-maven-plugin: [LINT] Violations found. For more details, see error messages above, or results in /home/lars/development/workspaces/sonar/lint-maven-plugin/target/maven-lint-result.xml -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

list of rules

You can see the list of supported rules with
$ mvn com.lewisd:lint-maven-plugin:list
  • DotVersionProperty
  • The convention is to specify properties used to hold versions as "some.library.version",or some-library.version, but never some-library-version or some.library-version.
  • DuplicateDep
  • Multiple dependencies, in or , with the same co-ordinatesare reduntant, and can be confusing. If they have different versions, they can leadto unexpected behaviour.
  • ExecutionId
  • Executions should always specify an id, so they can be overridden in child modules,and uniquely identified in build logs.
  • GAVOrder
  • Maven convention is that the groupId, artifactId, and version elements be listed inthat order. Other elements with short, simple content, such as type, scope, classifier,etc, should be before elements with longer content, such as configuration, executions,and exclusions, otherwise they can be easily missed, leading to confusion
  • OSSContinuousIntegrationManagementSectionRule
  • For better understanding the project a link to the used integration system helps usersto trust.
  • OSSDevelopersSectionRule
  • The users/developers need to know where to get active bugs and to report new onesto.
  • OSSInceptionYearRule
  • For better understanding the project the inception year of your project is required.
  • OSSIssueManagementSectionRule
  • The users/developers need to know where to get active bugs and to report new onesto.
  • OSSLicenseSectionRule
  • Each project should be licensed under a specific license so the terms of usage areclear.
  • OSSUrlSectionRule
  • For better understanding the project a link to your project is required.
  • ProfileOnlyAddModules
  • Profiles who's ids match the pattern with-.* must only add modules to the reactor.
  • RedundantDepVersion
  • Dependency versions should be set in one place, and not overridden without changingthe version. If, for example, sets a version, and somewhere overrides it, but with the same version, this can make version upgradesmore difficult, due to the repetition.
  • RedundantPluginVersion
  • Plugin versions should be set in one place, and not overridden without changing theversion. If, for example, sets a version, and somewhereoverrides it, but with the same version, this can make version upgrades more difficult,due to the repetition.
  • VersionProp
  • The ${version} property is deprecated. Use ${project.version} instead.

The source can be found on github https://github.com/lewisd32/lint-maven-plugin currently version 0.0.8 is online.

Contributions are welcome and will be integrated very fast, thanks to Lewis!

Dienstag, 20. August 2013

Howto: Duplikate mit rdfind finden und mit einem Hardlink ersetzen

Am Wochenende habe ich mir wieder mein lokales Backup angeschaut, um es dann wie jeden Monat auf die externe Platte zu spiegeln. Dabei ist aufgefallen, dass backintime sehr intelligent nur die geänderten oder neuen Dateien übernimmt. Allerdings sind fallen Umbenennungen bzw. verschobene Dateien jedes Mal mit der vollen Größe ins Gewicht.

Nun kommt rdfind ins Spiel.

Mit dem Paketmanager installieren:
$ sudo apt-get install rdfind

Step-by-Step Demo

# emuliere eine Backupverzeichnisstruktur in /tmp
$ cd /tmp/
$ mkdir backup
$ cd backup/
$ mkdir -p 2013/{01..08}/home/lars

# in jedem Verzeichnis 'lars' eine 100M Datei erstellen
$ find -type d -name lars -exec dd if=/dev/zero bs=1M count=100 of={}/x \;
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,326316 s, 321 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,274126 s, 383 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,24677 s, 425 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,243897 s, 430 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,301347 s, 348 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,268799 s, 390 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,325733 s, 322 MB/s
100+0 Datensätze ein
100+0 Datensätze aus
104857600 Bytes (105 MB) kopiert, 0,248939 s, 421 MB/s

# aktuelle Platzverbrauch
$ du -sh 
801M    .

$ rdfind -makehardlinks true *
Now scanning "2013", found 8 files.
Now have 8 files in total.
Removed 0 files due to nonunique device and inode.
Now removing files with zero size from list...removed 0 files
Total size is 838860800 bytes or 800 Mib
Now sorting on size:removed 0 files due to unique sizes from list.8 files left.
Now eliminating candidates based on first bytes:removed 0 files from list.8 files left.
Now eliminating candidates based on last bytes:removed 0 files from list.8 files left.
Now eliminating candidates based on md5 checksum:removed 0 files from list.8 files left.
It seems like you have 8 files that are not unique
Totally, 700 Mib can be reduced.
Now making results file results.txt
Now making hard links.
Making 7 links.

# aktuelle Platzverbrauch (nach der Deduplizierung)
$ du -sh 
101M .
Das wurde hier an einer Datei demonstriert die in all ihren Kopien identisch ist, weil sie aus '0' besteht.
# nun das ganze mit wild verstreuten Dateien

# alte wegräumen
$ find -type f -name x -exec rm {} \;

# in jedem Verzeichnis eine 'x' 1MB groß
$ find -type d -exec dd if=/dev/zero bs=1M count=1 of={}/x \;

$ find
.
./2013
./2013/01
./2013/01/x
./2013/01/home
./2013/01/home/lars
./2013/01/home/lars/x
./2013/01/home/x
./2013/03
./2013/03/x
./2013/03/home
./2013/03/home/lars
./2013/03/home/lars/x
./2013/03/home/x
./2013/07
./2013/07/x
./2013/07/home
./2013/07/home/lars
./2013/07/home/lars/x
./2013/07/home/x
./2013/08
./2013/08/x
./2013/08/home
./2013/08/home/lars
./2013/08/home/lars/x
./2013/08/home/x
./2013/06
./2013/06/x
./2013/06/home
./2013/06/home/lars
./2013/06/home/lars/x
./2013/06/home/x
./2013/04
./2013/04/x
./2013/04/home
./2013/04/home/lars
./2013/04/home/lars/x
./2013/04/home/x
./2013/02
./2013/02/x
./2013/02/home
./2013/02/home/lars
./2013/02/home/lars/x
./2013/02/home/x
./2013/05
./2013/05/x
./2013/05/home
./2013/05/home/lars
./2013/05/home/lars/x
./2013/05/home/x
./2013/x
./x

# vorher
$ du -sh 
27M .

$ rdfind -makehardlinks true *
Now scanning "2013", found 25 files.
Now scanning "x", found 1 files.
Now have 26 files in total.
Removed 0 files due to nonunique device and inode.
Now removing files with zero size from list...removed 0 files
Total size is 27262976 bytes or 26 Mib
Now sorting on size:removed 0 files due to unique sizes from list.26 files left.
Now eliminating candidates based on first bytes:removed 0 files from list.26 files left.
Now eliminating candidates based on last bytes:removed 0 files from list.26 files left.
Now eliminating candidates based on md5 checksum:removed 0 files from list.26 files left.
It seems like you have 26 files that are not unique
Totally, 25 Mib can be reduced.
Now making results file results.txt
Now making hard links.
Making 25 links.

# nachher
$ du -sh 
1,2M .

Auf der Homepage rdfind ist der Algorithmus einfach dargestellt.

Algorithm

Rdfind uses the following algorithm. If N is the number of files to search through, the effort required is in worst case O(Nlog(N)). Because it sorts files on inodes prior to disk reading, it is quite fast. It also only reads from disk when it is needed.

  1. Loop over each argument on the command line. Assign each argument a priority number, in increasing order.

  2. For each argument, list the directory contents recursively and assign it to the file list. Assign a directory depth number, starting at 0 for every argument.

  3. If the input argument is a file, add it to the file list.

  4. Loop over the list, and find out the sizes of all files.

  5. If flag -removeidentinode true: Remove items from the list which already are added, based on the combination of inode and device number. A group of files that are hardlinked to the same file are collapsed to one entry. Also see the comment on hardlinks under ”caveats below”!

  6. Sort files on size. Remove files from the list, which have unique sizes.

  7. Sort on device and inode(speeds up file reading). Read a few bytes from the beginning of each file (first bytes).

  8. Remove files from list that have the same size but different first bytes.

  9. Sort on device and inode(speeds up file reading). Read a few bytes from the end of each file (last bytes).

  10. Remove files from list that have the same size but different last bytes.

  11. Sort on device and inode(speeds up file reading). Perform a checksum calculation for each file.

  12. Only keep files on the list with the same size and checksum. These are duplicates.

  13. Sort list on size, priority number, and depth. The first file for every set of duplicates is considered to be the original.

  14. If flag ”-makeresultsfile true”, then print results file (default). Exit.(?)

  15. If flag ”-deleteduplicates true”, then delete (unlink) duplicate files. Exit.

  16. If flag ”-makesymlinks true”, then replace duplicates with a symbolic link to the original. Exit.

  17. If flag ”-makehardlinks true”, then replace duplicates with a hard link to the original. Exit.

Fazit

Einfach zu lernen. Ich hatte eine sehr gute user experience ;).

Sonntag, 23. Juni 2013

Learning from mistakes and talk about

I just found a video when etsy talks on softdevtube.com about What went right, what went wrong.

Alternatively you can watch the slides of that presentation.

What makes me thinking it is worth mentioning these slides is, that I believe in the same principles (transparency, cross functional teams, talking about mistakes, reevaluate former decisions, ... ) written in there

Enjoy!

Donnerstag, 23. Mai 2013

opensource community collaboration at it's best

Today I had a great experience with contributing to an opensource project redline (Redline is a pure Java library for manipulating RPM Package Manager packages). Actually it was last week and today I had this pleasure.

Last week I fixed some lines in code and pulled a merge request. The same day, just 2 hours later, it was merged.

Today I asked for a release to benefit from these changes without publishing an separate inhouse version. I offered some additional refactorings to justify a release, however Craig W. Blake did not discussed or requested some more changes. An new release is already online.

I really appreciate that kind of cooperation. That's why I love opensource and my company Immobilienscout24 is sharing and contributing to the opensource world.

See our projects at github.com/ImmobilienScout24. Feel free to use it, to contribute or just report bugs!

update

German version is available at http://developer.immobilienscout24.de/2013/05/opensource-zusammenarbeit-von-seiner-besten-seite/.