Code Is Cheap, It's Knowledge Discovery That Costs

If we knew exactly what code needs to be written, what needs to be done and how it can be done, we would need very little time to write it. It is the discovery of the knowledge what to build and how to build it that takes all the time. Yet non-developers usually see it as an unacceptable waste to write and then throw away - and perhaps rewrite - code.


Continue reading →

Most interesting links of November '13

Recommended Readings

Some interesting topics this time despite me spending lot of time on the
Continue reading →

How I Learned to Avoid Magical Dependency Injection And Love Plain Java

A short story about the complexity of magical frameworks and dependency injection with a happy ending, featuring Resteasy, CDI, and JBoss.

Continue reading →

Most interesting links of October '13

Recommended Readings


Continue reading →

The Failure of Governmental IT (Learnings From HealthCare.gov)

The failure of Healthcare.Gov has been discussed a lot but the main causes of the failure are unrelated to the project or to technology and apply similarly to other governments / large projects.

Continue reading →

My Highlights From EuroClojure 2013

EuroClojure 2013 was a nice, small conference. The talks were mostly interesting and often useful and it was wonderful to meet in reality people I only knew from the virtual life or from stories. You can get an impression what it was like from the #euroclojure tweets.

Below are some noteworthy things from the talks and chats.


Continue reading →

Fixed: Embedded Jetty Fails To Unpack With FileNotFoundException: Not a directory

I have built an executable .war with an embedded Jetty and all the dependencies packed in using the Maven Shade and War plugins. When I tried to run it (java -jar <my war>.war) then I got a strange FileNotFoundException during the unpack phase. It was strange because the unpack code actually checks whether a file's parent directory exists and creates it if it doesn't.

The problem was that I use OS X which has a case-insensitive filesystem. A directory contained both the file LICENSE and the directory license/. When Jetty tried to unpack license/LICENSE.base64.txt, the check for the parent directory (license/) incorrectly succeeded (because it checked new File("[..]/license/LICENSE.base64.txt").getParentFile().exists() and that returned true because the file LICENSE already was there, and it wasn't distinguished from the actual directory license; .isDirectory() would have at least failed.) The workaround was to exclude the offensive file from the archive:


Continue reading →

Most interesting links of September '13

Recommended Readings


Continue reading →

Webapp Blue-Green Deployment Without Breaking Sessions/With Fallback With HAProxy

Use case: Deploy a new version of a webapp so that all new users are sent to the new version while users with open sessions continue using the previous version (so that they don't loose their precious session state). Users of the new version can explicitely ask for the previous version in the case that it doesn't work as expected and vice versa.

Benefits: Get new features to users that need them as soon as possible without affecting anybody negatively and without risking that a defect will prevent users from achieving their goal (thanks to being able to fall back to the previous version).


Continue reading →

Test Puppet config of an existing node using Puppet Master via Vagrant

Are you using Puppet in the client-server setup and want to test the configuration for a particular node without actually changing it? You can do that by fooling Puppet Master into believing that a Vagrant virtual machine (VM) is that node and applying it there. The process is simple: you essentially only need to get the nodes' cert/private key and supply them to Puppet (and likely make sure that the hostname puppet can be resolved from within the VM). Let's see it in detail.


Continue reading →

Most interesting links of August '13

Sorry folks, this month it will be very brief. I have many more great stuff in the queue but haven't managed to write it down yet. Next month will be heavy :-)

Recommended Readings


Continue reading →

Clojure REPL stores the latest results in *1, *2, *3, exception in *e

All Clojure REPL variants (nREPL, REPLy, ..) share some common characteristics, inherited from clojure.main
Continue reading →

Most interesting links of July '13

This month focuses on languages and approaches (reactive programming, F#, Erlang, FP talks etc.), agile (need for speed, recommended books), Clojure/Linux/cloud tools and libs.

Recommended Readings


Continue reading →

Running A Leiningen/Ring Webapp As A Daemon Via Upstart (Ubuntu)

Running a Java/Clojure app as a daemon on Linux used to be hard but is pretty simple with Ubuntu Upstart (docs). The short story:
  1. Create an all-in one uberjar via "lein with-profile production ring uberjar" (using the lein-ring plugin; a simple lein uberjar would suffice for an app with a main- method)
  2. Create an upstart <service name>.conf file in /etc/init/
  3. Run sudo start/stop/status <service name>
And of course it works with Puppet too.


Continue reading →

Installing & Troubleshooting Google Analytics 2013 (ga / analytics.js)

Setting up the new Google Universal Analytics (still in beta) is not completely obvious. You normally won't be able to send events from localhost and it will claim that "Tracking Not Installed." Here are some tips how to use Analytics from localhost and test it.


Continue reading →

Copyright © 2024 Jakub Holý
Powered by Cryogen
Theme by KingMob