Monthly Archives: March 2014

Finding a Suitable Collaborative Chat Tool

After trying Campfire, Bitrix24 and HipChat, I finally settled on Slack as my preference for a collaboration tool for our team.

Campfire was very bare bones, and the various window client options just didn't do it for me.

Hipchat had huge potential, though when i get into it, most of the features I wanted where not in the software, but on their suggestions page. Some with hundreds of votes but no reply.

Bitrix was close, but is a whole intranet in the cloud so was a bit of overkill. I only needed the chat. and it does that ok, though didn't have the IRC like room set up I was after.


Slack was everything I was after. I was a bit critical when the instructions for the windows client consisted of how to turn the webpage into a chrome application shortcut. I originally wanted something that would give the taskbar a notify glow (not a blink as some clients did) so the dev's new that there was a conversation going on, but not annoying enough ot break them out of the zone if there were not participating.

A quick search confirmed that neither a script, or extension that would glow the task bar, though the use of notifications would likely do the job, if not a bit more distracting than I would like.

The chat, room and search features were everything I wanted, but the real power cam via the integration tools.

In a few clicks a Jira channel was showing new & closed tickets from my on premises install. Though I was sure to vote for confluence integration in their integration feedback survey, as that was not out of the box,. though likely not difficult to craft my own.

SVN Integration

Next was SVN, this was a bit trickier as the instructions for integration was a perl script on github.

The next challenge was that I was not suing SVN on a linux box,. but SVN server in windows. This meant that Visual SVN called a batch file, passed in the repository name and revision as arguments, which needed that to fire the Perlscript.

First of all, I needed Perl. and grabbed a download of Active State Perl

Next, triggering the script via Visual SVN.

Right clicking on the repository in Visual SVN, then Properties then the Hooks tab brought up a window, where i could Edit the Post-commit hook.

Here I entered the DOS command to fire my batch file.

cd\Program Files (x86)\VisualSVN Server\bin\
hook %1 %2

Next I created hook.bat and placed it in the folder above. This woulds take the 2 args and pass it to the PERL script.

"C:\Perl\bin\perl.exe" "C:\Program Files (x86)\VisualSVN Server\bin\" %1 %2

With the plumbing ot the Perl script out of the way, I modified the PERL script to run on windows, which involved changing the linux friendly...

my $log = `/usr/bin/svnlook log -r $ARGV[1] $ARGV[0]`;
my $who = `/usr/bin/svnlook author -r $ARGV[1] $ARGV[0]`;

To the more windows command line friendly...

my $log = `svnlook log -r $ARGV[1] $ARGV[0]`;
my $who = `svnlook author -r $ARGV[1] $ARGV[0]`;


After testing by firing my bat file manually, and a few SVN commits, I had all my SVN updates posted to their own channel in Slack.

Confluence is next, so that updates and new pages can go into their own channel too. 


Though I would give an assembly Hello World a go, and get into some low level programming.

After reading up in MASM, NASM & FASM, I decided on MASM, and soon came across a great blog detailing how to set up VS2013 to run with MASM32.

After setting up the environment, and running the hello world app below, I noticed that this use of the MASM32 libraries seemed to vary greatly from the Assembly code I have previously seen that typically utilsie a series of 3 and 4 letter instructions mixed with memory addresses,

.model flat, stdcall
.stack 4096
option casemap : none

include macros.asm

includelib masm32.lib
includelib user32.lib
includelib kernel32.lib

message   db "Hello world!", "$"

main PROC
	print "Hello World!"
	invoke ExitProcess, eax
main ENDP
END main

In my travels, the assembly I have glanced upon seemed to be much more like the below example, which I bumped into while I was setting up Visual Studio

.model small
message   db "Hello world", "$"
main    proc
mov   ax, seg message
mov   ds, ax
mov   ah, 09
lea   dx, message
int   21h

mov   ax, 4c00h
int   21h
main    endp
end main

I naively assumed that this was what MASM was like when you didn't utilise the MASM32 Libraries references in the first example. That was, until trying to compile the above code hit me with this...

1>  Assembling source.asm...
1>source.asm(7): error A2004: symbol type conflict
1>source.asm(16): warning A4023: with /coff switch, leading underscore required for start address : main

As it seem this is a common mistake, replies at the masm32 forums, and stackoverflow pointed out the difference between 16bit MASM, and MASM32.

I still wanted to push forward with 16bit MASM, but with Win7 x64 not supporing 16bit, I figured I may have to use DOSbox.

I now knew I needed a 16bit Linker, and a bit of digging showed me that there was one in my MASM32 install. I tried looking in the project configuration, such as the Microsoft macro assembler to see if I could find a place to poitn to the linker16.exe, with no luck.

I then came across this very detailed article on both 16 and 32 bit set up in VS2012 by Kip Irvine.

With his directions. I then went down the path of a batch file triggered by Visual Studio  External Tools. Hoeever I wanted to dig a bit deeper and make my own batch file.

After finding a githib reference to the make16.bat in his tutorial, it seemed that he utilised ml.exe that was part of Visual Studio, not the MASM32 downloads. Running a modified version gave me the following error.

MASM : warning A4018: invalid command-line option : -omf

MSDN ML Command Line Reference advised me that this was due to my 64bit install.

Generates object module file format (OMF) type of object module. /omf implies /c; ML.exe does not support linking OMF objects.
Not available in ml64.exe.

I decided to go with the ML.EXE installed with the MASM32 libraries, along with the commands I came across on stack overflow. I Modified the bat to utilise the args passed from VS External Tools.


ML.EXE /DMASM /DDOS /Zm /c /nologo /I"c:\masm32\Include" "%1.asm"
link16.exe /NOLOGO "%1.obj" ;

The semicolon I added at the end of the link16.exe args use default settings, so do not require input. Perfect if you want the build result in the VS output window instead of a DOS window.


Now I got my MASM16 hello world assembled, I just needed a 16bit platform to run it.

I went with DOSbox as it has the command line arguments i was hoping for, so I could integrate it with VS External Tools.

I created the following batch file, accepting the filename from External Tools as %1.

"C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" C:\Dev\MASM\Masm32\%1.exe

Though, it seems that External Tools wraps this in quotes, resulting in the location of the newly assembled exe for DOSbox to run, not being valid.

C:\Dev\MASM\Masm32>"C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" C:\Dev\MASM\M

The build scripts seemed to be ok with this, as it also ucrred there. However the following command trimmed the double quotes and allowed the exe to be passed into Dos Box

"C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" C:\Dev\MASM\Masm32\%FILE%.exe

And success.


Getting into the angular phonecat demo, in windows, and early on hit a snag.

This one was from trying to update karma, a TDD framework for angular powered by node.js

Seemed pretty straight forward from what I have learnt from node so far.

npm install karma

Nothing like error messages from an unfamiliar environment to make you sit up in your chair.

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Dev\angularTutorial\angular-phonecat\scripts
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Dev\angularTutorial\angular-phonecat\scripts\npm-debug.log
npm ERR! not ok code 0

After I quick google search, with nothing initially, I realised I have some something really weird, that caused a error the likes of which no one has ever seen, or the solution was starting me in the face.

npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0 that.

npm install karma-requirejs

Karma then installed.

However, then the test.bat as part of the angular tutorial, which runs the karma command in DOS, returned this old favourite.

'karma' is not recognized as an internal or external command,
operable program or batch file.

Before clogging up my PATH variable, the -g (--global) variable in npm install came to mind.

However this did not work, even after first uninstalling the package.

Though, this time a  Stackoverflow answer at the top of google let me know that at least this time I was not so alone.

npm install -g karma-cli

After finding that the node.js PM2 plugin was only supported in linux, I had a reason to dust off my LMDE VM.

When building CynanogenMod ROMs for my HardKernel ODroidU2, I quickly outgrew Ubuntu, which I choose due to the huge amount of community support, and the references to it specifically in various Android ROM building getting started documentation.

Linux Mint was next, though I soon after settled on Linux Mint Debian Edition to make advance of the rolling releases, perfect for a tertiary VM. I could jump in after it being offline for months at a time, and be on the latest version after tackling the backlog of updates, as opposed to having to rebuild, being the recommended upgrade path of various other distros.

The customised Mint-X theme with Buuf 3.6 Icons reminded me how much time i had setting up this VM. This included creating a custom Gnome Desktop Manager page based off RastaGrrl's GDM Theme by hand with Pluma for the XML and Gimp for the Icons.

Buuf ThemeLogin

GParted was still attached to the Virtual CD Rom, for when I had to expand the partition, for the second time, as I couldn't bring myself to start from scratch after I underestimated the local storage needed to build one, and them multiple ROM branches from scratch.

LMDE just seems to be built by Devs for Devs, with none of the irritants that drove me away from Ubuntu, which when incurring frustration seemed to be the perfect example of the camel the committee inadvertently designed. From the Granted permissions without asking for password dialog to the lack of OS branded services trying to be pushed onto me. (Looking at you Ubuntu One,), it just felt like home, even if some of the flashier desktops were not available in debian packages.

While the update from LMDE 1.0.6 to 1.0.9 was a few hundred K, the 1081 recommended updates coming in at 788 Meg showed that maybe it was a bit too long between visits.

Looks like my experimentation with node.js under linux may have to wait till tomorrow.

With some basic tutorials under my belt, I decided to see what cloud offered in term of node.js IDE's.

The Cloud 9 node.js IDE was my first stop, and I have to say, unlike Sublime Text with a suite of plugins, it did not leave me wearing, though I admit it's not exactly fair to compare an extensible text editor to a IDE.

While I still have much I want to try, my next investigation was into running node.js locally.

Forever was the first on my radar, which persists a running node script over server and and restarts. blog on their preference of PM2 then caught my attention. PM2 also offers cluster load balancing, JSON configs and few production level features has taken over in popularity.

I then came across a blog post I that, as a node newbie, I found quite useful, 7 tips for a Node.js padawan by Faisal Abid. Its recommendation to use nodemon for dev, and PM2 for production made a lot of sense, especially since PM2 is not design for windows use, time to dust off the LMDE server I usually reserve for Android ROM work.

My next search, being the visual guy I am, I was looking for an all in one local web dashboard, process monitoring, server management & performance monitoring app. This stackoverflow answer, resulted in the context switch I needed from my IIS heavy background to the lightweight node.js space. What I need is not a monitoring app, but a node.js script, or a plugin or two to run on a second port, which monitors the first, as well as Finally, PM2 or whatever else i'd like to keep an eye on.

There also seems to be quite a market for node monitoring apps, such as nodetime and strongops, let alone what the cloud hosting apps themselves offer. Seems as though I am putting the cart before the horse, as I would suspect it best to rule out if an app would use cloud hosting before trying to reinvent the wheel in term of monitoring.

With that small exploratory tangent into the node.js space complete, it's back to Cloud 9 until I get a chance to compare it to Codeenvy, CompilrKoding, and whatever else enters this rapidly growing space between now and then.


Have been working through the node.js via Learn you node tutorials and thought it a good opportunity to see if I could get a node.js auto complete/hint plugin.

Unfortunately the nodejs plugin is no longer active,. and it did not seem to be namespace aware, that is, it would not narrow the filter based on the namespace. Entering 'a..' gave the same filtered list as 'fn.a...', as one of the motivations of my search was to have an easy way to explore namespaces, it wasn't going to cut it.

Enter SublimeCodeIntel. I was hoping to kill two birds with one stone and find something that turned a XSD into a hint file for  XML. This would help me edit web.config files using the DotNetConfig.xsd, though no luck. Will have to resume that search another time.

SublimeCodeIntel worked fine out of the box, until I started editing the settings. Saving the user preferences without the encompassing curly braces around the all my setting crashes SublimeText, hard. Only Ctrl-Alt-Del could kill her, though the Unexpected trailing characters message did point me to the first line that helped me get that sorted quickly.

The next issue was enabling the node.js autocomplete. The sublime forums almost got me there, though it was a post right at the bottom on an old bug on the plugin's github page that illuminated what I was missing. There are two parts, firstly, codeintel_syntax_map.

"codeintel_syntax_map": {
  "JavaScript": "Node.js"

And my missing piece of the puzzle, javascriptExtraPaths

"codeintel_config": {
  "JavaScript": {
    "codeintel_scan_files_in_project": false,
    "codeintel_max_recursive_dir_depth": 2