Posts Tagged Tools
Google Iphone Calendar Selector
Posted by Morten in Uncategorized on September 26, 2011
I got an IPad a while back, and something was always bothering me with it.
It had this really nice looking calendar application that was useless because it only showed one of my 5 google calendars.
Turns out Google tought of that. You need to navigate to their Google Iphone Calendar Selector and select which calendars you want to display in your IPad.
Suddenly my IPad’s calendar app got a lot better. Now if I could only find some way to get a better mail application as well
A repository for my vim plugins
Posted by Morten in Uncategorized on September 19, 2011
After listening to a changelog episode about Vim I heard of Janus, a set of plugins set togeather and maintained for MacVim. I checked it out Janus and it seems great!
So once I got my vim working after some slight issues in the segmentation fault department, I started looking at it more closely.
I got a bit scared when I realised that all this configuration would go into my .vim directory with out me keeping track of things.
So instead of installing Janus I made a git repository in my .vim directory, and added it to GitHub.
It will probably never be quite as extensive as Janus, but feel free to use it if you want.
You can find it here
Blogging with Vim
Posted by Morten in Uncategorized on September 12, 2011
Since I noticed there is a lack of blogging tools for the mac I decided to try out blogging using Vim. After Markus Anvhe responded I should try out vim I did some research on it.
It turns out that I can blog using markdown, and the post it to my blog converted to html. I liked that I’d and decided to give it a go.
You can find the details here. The post is a bit outdated since the commands have been simplified, but it describes the process.
While setting it up I ran into issues with MacVim. It kept giving me segmentation faults when ever I used vimrepress.
I tried different methods to get macvim to work. turns out if I used macports it would cause segmentation faults when ever I tried to run the blogging plugin. So I had to uninstall the macports version of python25 and all of a sudden things started working.
I now use the macvim snapshot build 61 which seems to work out really well.
So this is my first blogpost from vim.
Blogging tool for Mac OS X Lion
Posted by Morten in Uncategorized on September 5, 2011

So I’ve been searching for a blogging to
ol for mac OS X lion. I’ve found Blogo which seems to support most of what I want but it didn’t work for the new version of Mac OS X.
So now I’m testing out an application called myWPEdit which is available through the Mac OS X appstore. There is a photo of it here.it was hard to figure out how to attach that photo, but it seemed all i had to do was to drop it in the text to add it.
so far I’ve found the following issues with it:
- it can’t reformat added photos once added which is annoying.
- It doesn’t support offline blogging i.e. save the drafts locally and publish later.
We’ll see how this works out.
Working with the Application Cache Manifest for offline JavaScript applications
Posted by Morten in Uncategorized on August 15, 2011
So I just spent a few hours debugging a cache manifest. It’s the second time around at there always seems to be issues when first setting up the manifest to work properly.
I thought I’d mention some tools to help debugging issues with the cache manifest.
There are two tools that help you verify that the application cache manifest is set up correctly. First theres the Manifesto Application Cache verification bookmarklet. Also the Cache Manifest Validator verifies your cache manifest via file upload, URI or direct input. For some reason however it no longer validates my cache manifest that is working.
Setting up the logging on all the cache events also helps debugging on for example IPad where all you have to rely on is the console log. This blog post shows how to set things up.
Also, something I ran in to on the IPad you might have to shut down all web applications on the IPad before refreshing your application with a Cache manifest. The symptom is that all files are downloaded (shown with progress events) but when its done the IPad just gets an error message. If this is the case, just shut down all web-applications and Safari and reset the Cache from the settings. That got it working again.
Job dependencies in Hudson for our Continuous Delivery effort
Posted by Morten in Uncategorized on May 30, 2011
I’m continuing our work with our Continuous Delivery effort. Were migrating from our previous build system to Hudson since it makes builds much more accessible.
The work started with the continuous delivery with hudson project I have on github and were slowly adapting a fork of that to work with out scenarios.
We realized that the amount of builds that we will be hosting in Hudson might make it hard to get an overview of what depends on what. After some research I found out that you could add the following to the URL of your hudson to get a dependency graph of all the builds:
/dependencyGraph/graph
So if you host Hudson locally it would look like:
http://localhost:8080/dependencyGraph/graph
This is how our current dependency graphs looks like:
The package output build takes the result from our old package build and migrates it over to the delivery pipeline. The Template Schedule Deploy job (which I now realize is a bad name) takes a set of “job files” and run the deploy installation job with the given settings.
The Create job files based on search creates the job files that the template deploy job works with, and the upgrade early, test, and bulk installations does a search in our installation of RemoteX Applications to find out which installations to upgrade based on the units in RemoteX Applications.
Each job then run the deploy installation build (not visible in the graph) to deploy the upgrade for each customer. In essence running the same build for upgrading that we use every time we deploy anything.
Running tests as files change
Posted by Morten in Uncategorized on May 9, 2011
I mentioned earlier a solution where Eclipse would run all my Python tests when I save a file. This is very convenient when using TDD in languages that can run tests fast. However that solution is tied to Eclipse and as I like Vim more and more I stand without an option to automatically run the tests as I code.
This feature is quite similar to AutoSpec in Ruby. So I figured there would be some solutions available for Python already. Looking around I found this to be the best possible solution right now. However that solution doesn’t handle nose tests, and the project I’m working on is using nose-gae to do the testing. So I needed a solution that worked on Windows and could run nose tests with nose-gae.
This started to annoy me, especially since it would be quite easy to implement it in .Net and have it work with the command-line to add support for any type of action that needs to be run on a file change.
So I wrote a little tool, which I call: OnChange
It’s a command-line application that watches the current directory and any directory under it for file changes. When a change occurs it will file a specified program, in my case, run my tests.
It also has support for parsing the output of the command to run, so with regex patterns you can add “reactions” to how the executed program is run. This allows me to signal Growl for Windows to bubble up “tests fail” or “tests pass”.
I also added a filter option so it will only react to changes in certain files.
This is how I set up my onchange program to run tests and signal pass or test automatically.
onchange -f *.py -r "^FAILED.*$:fail.bat" -r ^OK.*:pass.bat runtests.bat
This command line will cause OnChange to watch for changes to *.py files (-f flag). It has two reactions set up on that matches on FAILED test output and in that case runs the fail.bat command, and on that matches the OK test output and in that case runs the pass.bat command. The last argument to the call is my runtests.bat file. The runtests.bat file will execute the nose tests, and in an extension also execute my Jasmine tests in the same project.
The source for OnChange is available on GitHub. Feel free to help add to it if you’d like.
A new version of Windows Live Writer
Posted by Morten in Uncategorized on April 25, 2011
I’m probably the last in the world to notice that there is a new version of Windows Live Writer available. It doesn’t upgrade it self when you ask the old version to check for updates. I found it purely by accident.
Once I downloaded it from here: http://explore.live.com/windows-live-writer?os=other
It upgraded the installed version of Live Writer, all my settings seem intact.
The new interface has a ribbon at the top instead of a toolbar. This might take some getting used to since I don’t particularly like it. Then again, I can hide it so I guess that’s an improvement.
Introducing Tool tax
Posted by Morten in Uncategorized on April 4, 2011
I’ve been trying out a few different “tools” just too see what tooling looks like in different environments. There are several different tools solving the same problem in their own more or less unique way. They also take different amounts of time to solve the problem.
The time it takes to use a tool is a tax on the developers time. For example, there is a difference between doing a check-in in a source-control system when it takes 2 seconds compared to 0,2 seconds.
In money these figures are too small to measure: with an estimate of 10 check-ins per day you get 100 seconds per week compared to 10 seconds. It is a minor amount of time to optimize around when looking at the whole development process, but it matters much for the work environment. Switching to faster development tools can increase productivity not only due to the time saved when using them, but also due to reduced amount of content-switching.
I joined a session at DynCon 2011 where we did wolf pack programming. It was very interesting because it introduced an environment where there was no tool tax while developing. The IDE automatically updates and shares the code as soon as it can compile what you just typed in the IDE. Since Smalltalk can hot swap code the immediately updated the running production code. In essence there were no cost for committing, compiling, running builds, deploying and what not.
It turns out that behavior change. Collaboration becomes much more important as the system has zero cost for developing in a shared environment. After a few hours of wolf pack programming, the team was discussing lively and producing code collaboratively in a way that I’ve rarely experienced in real environments.
Working with Jasmine
Posted by Morten in Uncategorized on March 28, 2011
I’ve been working extensively with JavaScript these past weeks. As I mentioned earlier I wanted to try out Jasmine and I definitively got the chance. I’ve been using it for all my testing needs these last weeks, and I love it.
What do I like about Jasmine?
- The ability to nest describe statements
- the splitting of specifications into several files
- the output structure
What I do not like
- At times failing tests can give cryptic error messages in Chrome, since Jasmine will trap the errors inside it’s own execution. This can cause the stack trace and the error messages to mess up.
Let’s see some examples then:
describe("A view holder", function() { describe("when adding a view", function() { it("it should add the view's element to the holding div", function() { loadFixtures("/specifications/spec/holder.html"); var holderDiv = document.getElementById("holder"); var docHolder = new ViewHolder(holderDiv); var template = "<div>test</div>"; var doc = new View({template:template}); docHolder.showView(doc); expect(holderDiv.innerHTML).toContain(template); }); describe("when removing a view", function() { it("the previous view is displayed", function() { var docHolder = new ViewHolder(); loadFixtures("/specifications/spec/holder.html"); var holderDiv = document.getElementById("holder"); var docHolder = new ViewHolder(holderDiv); var template = "<div>test</div>"; var doc = new View({template:template}); var doc2 = new View({template:template}); docHolder.showView(doc2); docHolder.showView(doc); docHolder.popView(); expect(doc2.element.style.display).toNotEqual('none'); }); }); });
This is an example of a specification I wrote for a view system I’ve developed, the output looks like this:
I added the following snippets to SnipMate so now I have a really nice flow when writing my specifications:
# Describe snippet desc describe("${1:description}", function() { ${2} }); # it snippet it it("${1:does}", function() { ${2} });
Jasmine is now my testing framework of choice for JavaScript testing.