Holy on Dev
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.
Most interesting links of October ''13
Recommended Readings Google engineers insist 20% time is not dead—it’s just turned into 120% time - it is interesting to see how has this evolved; "I have done many engineering/coding 20% projects and other non-engineering projects, with probably 20-40% producing “real” results (which over 7 years I think has been more than worth it for the company
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.
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.
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
FileNotFoundExceptionduring 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 n
ew 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:
Most interesting links of September ''13
Recommended Readings Stuff The Internet Says On Scalability For September 13, 2013 - a collection of interesting performance related articles with summaries (via @_dagi) Can you copy a culture? The NUMMI story (audio/<
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).
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.
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 Interested in native vs. webapp? Check out Why mobile web apps are slow (mobile browser much slower, not much real improvements, weak CPUs,...; seems to be really high-quality, plenty of data) and Sencha's
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 and clojure.repl. One of them, that isn't easy to find out (unless you read e.g. Clojure Programming) is the fact that the last three results of evaluating your code are stored in the vars
*3. The last exception that has occured is stored in
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 Development, agile The Need For Speed - the top 10 reasons for fast development flow (with time to market being one of the less important) - more learning, focus on the MVP, focus on the puprose/goal, happier customers/leader
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:
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.
Creating A Chart With A Logarithmic Axis In Incanter 1.5.1
Incanter 1.5.1 doesn't support logarithmic axes, fortunately it is easy to add one manually.
Update: Pushed improved version to Incanter.
This is how our final code will look like:
;; core and charts are the incanter namespaces (defn plot-power  (let [fun #(Math/pow 10 %) y-axis (log-axis :label "log(x)") chart (charts/function-plot fun 0 5)] (set-axis chart :y y-axis) (core/view chart :window-title "LogAxis Test: Incanter fun plot")))
The Invisible Benefits Of Pair-Programming: Avoiding Wasteful Coding Excursions
There has been recently an article about how bad, expensive, and wasteful pair-programming is, since you need double as many developers. It used lines of code (LoC) produced per hour as the main metric. As many have commented, LoC is not the best measure, actually just the opposite, as I want to demonstrate on my experience. (The article is questionable also for other reasons, such as providing no data to back its claims of a pari costing 2.5 times more without any quality benefits, which contradicts f.ex. the studies summarized in ch. 17 of Making Software that show one1 1.6* cost + better quality, other 1.15* cost + 15% less failed tests.)
My main point is that by working with another person that you have to justify your plans to, you can be saved from pursuing suboptimal or unnecessary solution, thus considerably reducing both time spent and lines of code produced (more talk, less [wasteful] code).
- Previous (7)Next (18)