What is going on under my hat

Category Archives: Programming

Putting an hour here and there today, finally the servers are live in Amazon, and doing part of the trick. I realised that there are problems with the data, but I am sure we will be able to sort them out tomorrow.

The site is not open to the public yet, but hopefully it will be out soon. I am a very happy monkey today! And now it is time to go back to side projects for real!

Tonight, instead of being in a side project I am finishing the last few items to get Ngramatic‘s product ready to start demoing. It wasn’t a project as the last previous few, because there were too many moving parts to be able to go straight to production from day one, but after two months of hard work it should be deployed in AWS by Monday.

The process involves a number of Java servers, an Angular front end and NodeJS in the middle of two, all using ZeroMQ as the channel. Deployment is done with Python Fabric, and it runs in Ubuntu in AWS. For development we were using the local machines, but soon we will move to Vagrant. I wonder if I should try to use Docker, but I am not that comfortable with it yet.

Now, I have to finish the last monitoring calls, and sort out CORS in Restify. Piece of cake (from Conor’s birthday past week).

Past night I went to a NodeJS meetup about micro servers and Docker instead of working at home. It was very interesting to see their approach to data distribution. I find it similar to NServiceBus, which I was trying to use at emuse, but with a more lightweight approach.

What I like is the lack of network structure definition upfront (which is heavy enough in the things I am doing). In my case, I need to define each endpoint, and then annotate them on each client server. Instead, the demo was about sending all data to a bus and detecting the pattern of each message, and acting based on its details. Then, every server receive every message, and if the message has details saying that a given server has to process it, the server will work on the data and post the results back on the bus for the next service.

Work pipeline definition should then be simple and easy to change. My only concern is about network traffic (how many messages are you going to have around?), but I can think of a couple of ways to address that (probably the SenecaJS code has some solutions too, I will have to check).

The talk about Docker was more in line with its documentation, and I didn’t get too much out of it because I was going through in the previous days, but still it was good to align it with the bus architecture.

Vagrant is up and running, and I completed the script to deploy Ghost on it. But still it isn’t running. I mapped the port 3168 from Vagrant to 8080 in my laptop, but there is no ghost jumping around in my browser. I can do a curl in the terminal during an ssh into Vagrant, but if I try to cal from outside I get a ‘connection reset by peer’ error message.

The problem seems to be with VirtualBox. After a good amount of googling, I found a message pointing to a problem with VirtualBox Guest Addditions, but I couldn’t fix it yet, and it is late enough to go to bed. There are a few updates on the project, but they are still not good.

Although I am using WordPress to host this blog, I never felt too comfortable with it. For me it looks too complicated, I cannot make sense of the source code, writing plugins has too many turns for my likeness, the whole thing is great if you know it, but too much trouble if you don’t. WordPress feels like my own big applications, while I retained them in RAM I was productive, but as soon as I left them alone for a few months I always wanted to rewrite each of them because I couldn’t made head from tail.

But the alternatives were not better and my hosting providers know it well, then it did the trick and I forgot about blog hosting and did some programming, until now.

Being messing with NodeJS for more than a year now, I wouldn’t mind to convert many things to it, and a blogging application is one of the prime candidates. I played with the idea of making one, but in the end I got engaged with other things and left the open source effort for others.

There are a few blogging platforms in NodeJS already, but the best candidate in my eyes is Ghost. The author run a Kickstarter campaign, exceeded his target and got the product on time, which speaks volumes for me..

The code is available, and although I don’t really know how it works, I feel a lot more confident reading it and trying to make sense about what is going on. I believe that if I spend the time I should be able to make things with Ghost.

Then, the first step is to deploy it. I am using my traditional approach, fired a Vagrant machine and started following the instructions (my scripts are hosted in Github). I am halfway through it, it is too late now to do any testing.

During daylight I am working trying to give life to a startup with a couple of colleagues, which is an adventure big enough to keep me entertained. But then, at home, after my son goes to sleep and while my wife works around her professional associations, I sit down and doze for a couple of hours, watching trivial TV programs, or reading something easy under low lights (or on the phone, as I keep moving my library to electronic format).

The thing is, usually when I go as an employee and not a founder, generally I have a couple of side projects to maintain the illusion of having my own adventure. But for some months it sounded as too much to have a second startup after the first one, because, if I have time and energy, shouldn’t I have been putting all the effort in the main one?

Many years ago the answer would have been that yes, I had to put every joule of energy behind the main plan. These days, I realised that at least for me, having a startup is a journey and not a destination, and if I arrive wrecked I will not be able to do it again for a long time. Then, instead of obsessing with one thing, I am trying to keep my mind open to other adventures along the road. Not too big, not too difficult, but still interesting enough to wake up ready to solve new challenges in the morning.

The problem then is to pick something to do, something I find interesting enough to be engaging, and simple enough to be solved in a short time. Being happy with the Pomodoro approach to programming, why not to put a time limit in my side project, and see where am I at the end? I really enjoyed following the progress of 3 weeks to live, even their equally fast death, and wondered if I would be able to do it myself. In fairness we tried, very loosely with a couple of friends to do it, but not having full time dedication proved to be a killer for a team trying to work fast.

Would be different if I work on my own, instead of as part of a group? Have technologies evolved as much as I think, to enable to get professional products with off side dedication? That is what I would like to know, and here is the plan to find out:

Every evening, for a month, spend an hour or two implementing some code, or learning a piece of technology, or deploying a service, and see how I feel after it.

Before going to sleep, or in the early morning before going to work, spend ten minutes wrapping up here the findings of the evening.

At the end of the month, see what happened.

The aim is not to have a commercial product, or to make an open source project, or to master any particular technology. What I want to know is what can I achieve if I systematically spend some time for a short period, without external dependencies and not being limited to the technologies I know by trade.

We will see what happens, and hopefully will have some answers by the 24th of April.

I have been using Vagrant for a couple of months now, and it is a fairly good solution to my usual problem of having too many projects in the same machine.
However, I was doing some front end Javascript development today, and none of my changes was served by Nginx. I disabled caching both in browser and server, but no updates were received.
The problem is that Nginx is using the filesystem if you are making calls from your local machine, and that didn’t work very well with Virtual Box.
For my own reference, the fix was simply to add the setting:

I was following the guys in 3 weeks to live, and when they stopped posting details a few days ago I thought ‘well, sometimes it works, sometimes doesn’t’.

But early this morning (or late past night) , while doing my own code, the news reader jumped. They did it, OnCompare is live now, and it looks pretty good. And the results provided by the site are good as well. I really like it.

On the other side, I feel very envious. I did my own share of crazy projects, and in fairness since I saw them I started harassing my friends to do the same, but right now, I feel very very envious! :D