Now running off a Raspberry Pi!

During my recent trip to the UK I indulged myself in buying a Raspberry Pi. There’s just so many things you can do with one that my initial plan of having it as an XMBC media center in our living room was quickly subdued by the rush to run my blog off it.

Lo and behold! Here it is!

This blog now proudly runs off the Raspberry Pi in the photo below. Neat, hey?!

The mint plant in the background goes hand in hand with the RPi's green nature at only 3.5W input!

The mint plant in the background goes hand in hand with the RPi’s green nature at only 3.5W input!

My next plan, with the money I’ll save from not paying for hosting, is to buy at least one more (I actually want to buy two more but shh! Don’t tell my wife!) to serve as my own personal mail server. With the free version of Google Apps going the way of dinosaurs and even though current users can still use the service, it’s pretty clear we’re second class customers and rather than waiting until we’re pushed to pay, I’d rather be more proactive and switch on my own timing. In all honesty, after the recent news on Lavabit I’m starting to grow more and more afraid of having my private data based off US servers, so Raspberry Pis it is!

Silicon Valley and Mozilla (or The Story of How I started Using Firefox Again)

My blog writing continues being as sporadic as sporadic can be, and it kind of saddens me because writing still is very much a passion for me.

This time I come to you, my readers, with an exciting trip I recently took to Silicon Valley with a group of entrepreneurs from Delft’s University of Technology. In this trip I had the opportunity of meeting many different interesting people from all walks of life. People with different life experiences that ranged from an ex-con to people who had successfully started their own tech company. Amongst all these people, there was one that really stood out for me, and that was Pascal Finette who you might or not know. Pascal is something at Mozilla. To be frank, I didn’t actually get what’s his official position but in the grand scheme of things, it didn’t really matter. As a matter of fact, I think that’s part of the take home message from the presentation Pascal gave us. What you do matters much more than what you say.

In many ways, Pascal’s talk was inspiring. Somehow I had this prejudice that Mozilla (and Firefox, more specifically) was a dying brand/company, but this view changed as soon as I stepped into their offices in Silicon Valley and started hearing about their core values. Many a times we hear the cliche “there’s no free lunch”, but if there is such a thing as free lunch, then that’s what Mozilla is doing for us and they’re doing it for the sake of it. Truly for free. Looking at what Mozilla does from a truly objective perspective, it kinda feels like Mozilla is the Mother Theresa of the software world. And don’t take me wrong, there are many such companies out there, but Mozilla in particular inspires me for how they defined their core values and for how they juggle so well their position as a company that needs to be kept financially afloat and as an ultimately open-source organization which relies (as far as I understand) solely on no one but themselves and a bunch of people who contribute with labor and money.

I’m an open-source advocate, but that doesn’t mean I’m an open-source monkey. I’m that kind of guy who knows the value of open-source but not the kind of guy who uses open-source exclusively just because it’s open and free. Open-source is great and many open-source projects stand shoulder to shoulder with their paid counterparts but for many things still, the paid alternatives are just better. Being a contributor to open-source myself I’m able to see the value in it while at the same time realizing that sometimes, you just have to pay to have software that makes your life easier (e.g. give me Photoshop over Gimp, anytime).

There’s also a long standing “joke” in the open-source world, in that most non-tech people actually don’t know what’s open-source. They don’t know the difference between free and “libre” (“libre”, being a Spanish word for the other kind of free which seemingly the English language cannot describe, became famous for its inclusion in the name LibreOffice – a branch of OpenOffice that’s, well, truly open, free and libre).  Naturally, many people would describe Chrome as free, or Facebook even. What they don’t know is that whenever they use either of these products, they are paying with one of their most precious possessions: their privacy.

I don’t want to get into legal trouble here, and for the most part I like to think of Google as mostly benevolent (but a corporation nonetheless). However, if you truly want to stick it to the man and use something that is pure free and no strings attached to any corporation that makes money off you, go Mozilla; go Firefox. The browser is not worse than Chrome, and this is the story of how they conquered me back. Through one talk by Pascal Finette.

libgdx and Vector2 mutability

Here’s a quick post to rant about something that’s been affecting me for the last couple of days.

Recently I find myself toying around with libgdx to work on a game that I’ve been meaning to develop for a while. The problem with this library is that apparently, all Vector2 functions affect the actual vector on which they are invoked. This goes against the Java standard of immutability for non-primitive types and is incredibly annoying, especially because these functions will also return the vector for chaining.

Why is this annoying? Well, when you’re used to the Java standard, you don’t expect any functions to affect the actual object. Think for example about Java’s String.split. This will never affect the String itself, especially because the String is immutable. Affecting the String would mean creating a new instance of that string with the change applied to it.

Frankly, I’m not sure what happens in the backstage but this stinks.

Turmeric SOA – Lessons learned

As soon as I picked up on Turmeric SOA as the engine that powers my research, one of my supervisors warned me: be careful, or you’ll be caught in technology hell. As much as I hate to admit it, this has inevitably happened. The point is… I’m using Turmeric SOA which is open-source and open-source is great for research. Everything is so open that I can afford to publish literally everything I do. This means that all the claims I make with my research can be easily verified independently by other researchers.

I love this transparency.

The problem comes when the transparency is the result of emptiness. More specifically, Turmeric SOA is open but its documentation lacks vastly. In the inception of its open-sourcing by Intalio, Inc. their software engineers were working night and day to adapt the wiki pages (which apparently are the only public form of documentation) from mentioning “EBAY” to mentioning “TURMERIC”. However, as the dust began to settle and eBay decided to go in-house with the open-sourcing, the work done on Turmeric SOA has greatly diminished and what once was a promising open project is now a graveyard. eBay’s software engineers keep a low key and aren’t exactly supportive of other people using Turmeric SOA which is very disappointing. It seems common sense that if a project is open-sourced, the main goal should be for it to get a large user-base. The more people contributing and using a piece of software, the more ideas and bugs will be found and thus, the more refined the project will become.

This has not happened. As an outsider, eBay’s stance on open-source seems that of a beach-goer who’s too afraid to go for a dive and instead just keeps probing the water with their toes. This is bad. It’s bad for eBay because it will inevitably taint their reputation with open-source, it’s bad for the community who now get a half-baked services platform and it’s bad more specifically for me. Now I have to deal with a promising but ultimately difficult to use platform. Most everything I do with Turmeric SOA requires copious amounts of manual debugging in order to figure out what’s happening and ultimately, these debugging sessions reveal that what was advertised as a feature, really isn’t one.

In sum, the lesson learned is: be wary of large open-source projects. Unless there is a strong community around it, you’re gonna have a real tough time.

The cross-discipline conundrum (or how we can’t always learn from other disciplines)

I was cycling home one day and this thought popped into my mind: I’m trying to address the issues of multi-tenancy in software systems. In other words, that is to say that I’m trying to make it easier for several software systems to co-exist, as tenants, in the same piece of hardware. When we think about it from a software perspective, it is definitely novel – big names out there like Microsoft, VMWare, Salesforce, etc are working hard on this (each in their own way of course) and it’s a rather hot topic. Companies provide their employees with Microsoft Azure training and there’s this growing need to fit more (tenants) in less (hardware). Come to think of it, it’s a bit like what’s happening in big cities all over the world.

Wait a minute.

That’s exactly what’s happening in big cities all over the world!

And why does this matter, you ask. Well, we’ve been doing this with people and cities for the best part of a century, so maybe some of the problems we face in software have already been dealt with in the “physical world”. “Sure, Tiago, that’s obvious! Why are you still writing this blog post and not out there reading books on urbanization?”. Yeah, yeah, yeah… have you read the title of the post? How we can’t always learn from other disciplines.

Multi-tenancy in software engineering presents its own challenges. How can you compare the concept of software versioning to any concept of the physical world? Same goes for concepts like deploying several instances of the same piece of software in different servers. Surely we can’t deploy the same person across several buildings (well, quantum physics says we can, but let’s stick to classical mechanics for the purpose of this post) and we definitely don’t want to have a tenant with a bathroom on one street, the bedroom two blocks away and finally the living room in a different town. That doesn’t work for people, it’s not convenient, but it works for software. Software doesn’t care if it has to invoke method foo() in its own memory stack or if it has to wrap its request in SOAP and have it traverse all over the world to have it executed.

So what’s the point of this post, really? While it’s always good to have a broad cross-disciplinary view and keep an open mind and an eye out for other fields which might be (metaphorically) solving the same problems as yourself, it’s also very important to identify genuine problems in your field. Sure, resorting to metaphors is perfect to learn from other fields but these don’t always apply perfectly and when they don’t apply perfectly, my theory is that they are no good.

In other news, I just submitted my paper to WCRE 2012 :-) let’s see how convincing am I with my maintenance techniques for distributed systems…

Changing the way I use my Mac

I never thought I would come to write such a post one day, but the truth of the matter is: the way I used to use my computer wasn’t sustainable. Whoa! It seems you really can use the word sustainable wherever you want…

I’m a browser person. Pretty much everything I do sits inside the browser: e-mails, RSS feeds, reading the news, facebook, etc… everything happens inside the browser. When I need to find a scientific paper, what do I do? That’s right! I use my browser to go to Google Scholar where I then search for what I’m looking for. Nowadays I’m even having some Google Docs action ever since I started sharing documents with my fiancée which require the capability of simultaneous collaborative editing. Sadly, all of this can only happen in the browser. Microsoft, with all its might, still hasn’t figured out a way to make Microsoft Office collaborative. But I digress.

The point is, those of you who are lazy and like to keep things at hand (like me), probably end up with at least 10 tabs open at all time. And your work flow is something like “open tab”, “search for something”, “close tab” and that would be peachy if it wasn’t for all the bugs features present in nowadays’ browsers. For example, if you close a tab in Chrome, Chrome will still keep that tab stored just in case you made a mistake and want to bring it back to life. Similarly, all your path within a tab is stored, in case you want to push the back button to go to where you where before. Now, when you put these two together (a whole path plus saving all the closed tabs), this brings up quite a massive memory requirement. In the beginning it might not be noticeable, but Chrome (and Firefox, Safari, etc) can grow above 1Gb of memory quite fast.

When that happens, your computer will start swapping memory to the hard-drive and eventually you’ll start to feel sluggishness in everything you do.

How can I fix that? This was my first thought. And if I can’t drive web-browser developers to do something about it and truly make their code more memory friendly, that means I have to change the way I use my Mac. It started with GMail. I’m an avid GMail user but GMail’s web interface is loaded with resource-hogging javascript. This meant that GMail had to go and give way to a more resource friendly Thunderbird. A purpose-built application which, despite only serving one task, it’s always there whenever I need it. It also notifies me whenever I receive a new e-mail and I can even replace Outlook which I was using for my university e-mail! Something about two birds and a stone comes to mind…

Not requiring to have my e-mail open in the browser anymore, this meant I could just close the browser whenever I don’t need it. This has been the biggest change in my behavior. Nowadays, I open the browser, check whatever I want to check, and afterwards, the way of the dinosaurs it goes again. This means that the memory usage of the browser never goes up like mad anymore, my computer is always snappy and all the frustration of dealing with a slow as molasses computer is gone.

Nota bene, I have 8Gb of RAM in my Mac, I’ve had it this way for a while now, and if history has taught me anything, that is that no amount of RAM is enough when you use the browser continuously, without ever closing it or restarting your computer. Period.

Lesson learned? How happy you feel about your computer’s speed has a strong correlation (and causation) with how often you close your browser.

[Quickies] Why can’t I move (certain) applications to the SD card?

Following up on the previous “quickies” format, I decided to answer a question that goes unanswered through a quick Google search. This quickie has to do with the Android OS platform.

Question: Why can’t I move certain applications to the SD card?

Answer: The “move to SD card” feature of Android MUST be explicitly enabled by the developers of each application. This is the reason why for some apps, the “move to SD card” button is greyed out.

Hope that helps anyone who’s ever asked Google this question!

[Quickies] Galaxy S2 MIUI 1.12.30 Camera Force Closes

I’ve tagged this post as a “quickie” as I just want to share the solution to a problem I’ve been having with my recently bought Galaxy S2. This solution was found indirectly and from my extensive search through the Internet, I haven’t found anyone describing either this problem or the solution to it.

Problem: When using the MIUI 1.12.30 ROM on the Samsung Galaxy S2, the camera will freeze and eventually force close while attempting to record video.

Solution: The solution to this problem is so simple that “it hurts”. If you’re running MIUI, your kernel will most certainly have the ClockworkMod (CWM) flashed onto it. You will have to go into CWM (i.e. Shutdown phone then power it up with the combo Volume Up + Power + Home), then into the “advanced” menu and choose the “fix permissions” option.

After you’ve done this, reboot the phone et voilà! It’s really that easy!

I’ve found this solution through having a similar problem in CyanogenMod. In their forums they explain how to fix it for CM7.1 so I decided to give it a try on MIUI. Turns out the problem is the same.

Hope this saved you some time!

WSO2 PHP’s WSF Library (or whatever the damn it is called…) and Turmeric SOA

The title of this post is verbose enough about the feelings I have regarding the naming of this library. It’s as if WSO2 took a page from Microsoft’s book regarding names. What’s next? A Home Edition? Maybe throw in Professional, Business and Ultimate versions too for good measure.

Don’t take me wrong, I have no special feelings towards names themselves, it’s just how difficult it makes to search for people working on the same things and facing the same problems. What do I Google for? WSO2? WSF? PHP? Any combination of these? It’s only made worse by these guys developing frameworks in several platforms, which means I end up finding completely unrelated results from a different implementation, in a different technology.

But, naming rants aside, I thought it would be a good idea to share my experience with getting this library up and running on PHP. I came across this library when converting Apache Stonehenge’s web application to use Turmeric’s instances of Stonehenge’s web services, and it gave me quite some headaches. For this reason, and so that other people in the future don’t have to go through the same painful experiences, I decided to write this blog post. Keep reading if I got your attention… Continue Reading

Black and white icons for Caffeine

This is gonna be a quick and short post about a tool I use on my Mac called “Caffeine“. This tool essentially allows me, at the click of a button, to disable the display’s dim and eventual turn off function. It’s useful when you’re reading something and you won’t be touching the keyboard or the mouse, but you’d still like the screen to be on. It’s useful also when I’m playing along a guitar tab and I can’t afford to stop playing just to get the screen back on.

Anyway, this tool places an icon on the status bar. The only problem is that this icon is in color and it just stands out in my status bar like a sore thumb. SO! I created a new icon set. You can get it by clicking here. Scroll down to have a look at the icons before you download it.

All you have to do is copy them to /Applications/ et voilà! I’ve included two more icons (not shown here) for the right click behavior.


This is what it looks like in action: