Overcoming shy programmer syndrome

I write a lot of programs, but I never publish them for others to use. Now with git and github, there aren’t any more real excuses.

Because I have been documenting like mad and cleaning up code, I am also taking the opportunity to push up working packages to github. So far I’ve pushed up two node.js utilities I am using. One is called makedir, and the other is called cas_validate
Continue reading

Advertisements

More progress figuring out asynchronous programming in node.js

I had an old recursive directory creation program I wrote a while back for a node.js server I’m running, but it never seemed to work right.

Last week I went looking for something on github, and found a gist that seemed to be what I wanted, but it wasn’t. It didn’t understand absolute paths, and split on the ‘/’ which caused it to try to create the directory ”, which failed.

So I retooled my program, and did the work of figuring out why it worked when invoked with one directory, but failed when invoked on a list of directories.

It all gets back to the fact that JavaScript is passing references around, so you have to be careful to protect variables that are used to call functions.

First, here is my final version
Continue reading