Alpha's Manifesto

A black and white figure's thought-hive

Death to Singletons!

Singleton.Instance.SelfDestruct();

Evil Singleton

No, I’m not talking about those that can’t find someone to be with. You’re ok in my book.

One of my favorite question to ask at technical interviews is “Can you tell me advantages and disadvantages of the singleton pattern?” I get varied responses, but while almost everybody can think of the advantages, nobody mentions the problems that come along with it. I’m going to quickly explain what singletons are and then roast them good.

(Read more →)

Testability vs. simple design

Testing requires decoupling

Shooting down dependencies

You may know I’m a proponent for simplicity. I believe that if a particular feature can be achieved with a single if statement, then that’s all that needs to be done. I’m also a proponent of testability, that all code should be easily testable so that we can make sure that it works. As it turns out, these two don’t usually go hand in hand. (Spoiler alert: that’s not true.)

(Read more →)

How to find the problem

Applied skepticism

User minusSeven from the StackExchange community asked a seemingly uninteresting question that happens to be really deep and meaningful: How do you learn programming when you’re stuck and without access to the internet? All the answers there are really good and useful, but I think there’s an underlying theme worth discussing: how a methodical approach should be.

(Read more →)

Software Security

MOOC by the University of Maryland

Fighting lock

Yes, I continue to go on courses. Now I just finished the Software Security course, from the University of Maryland.

As usual, let me give you a quick review of what it was about, what you need to get into it and what you can get out of it as well.

(Read more →)

ATPS: Angular, Protractor, Travis, SauceLabs

Quick guide to get these bad boys cooperating

Juggling with continuous integration

A few days ago I got the combination of Angular + Protractor + TravisCI + SauceLabs working together. There are a few quirks into making this work, but nowhere I found a comprehensive description to jump all the obstacles. Here I’ll describe what I did to get there.

(Read more →)

MOOC: Android Dev Part 1

That little green trash can

Android

Yes, I continue to go on courses. Now I just finished the Android Development Part 1 (or “Programming Mobile Applications for Android Handheld Systems: Part 1”), dictated by the University of Maryland.

As usual, let me give you a quick review of what it was about, what you need to get into it and what you can get out of it.

(Read more →)

How TDD pays off

A success story from the side of the doubtful

Software engineers, amirite? They keep blabbing about this fancy-pantsy weird wibbly-wobbly stuff nobody understands and they just want to keep things complicated. They want to test things even before they are done and then develop the app. Are they insane? And it even takes more time, so it’s a waste of money.

Well, my little friend-that-does-not-adhere-to-software-methodologies, they are right on what they do. And it does pay off. Let me tell you why.

(In here also: an update on the mongo-faceted project.)

(Read more →)

Faceted searches with MongoDB and mongoose

Generating facet search results

mongo-faceted logo

Some people in Latin-America may remember an old Yupi ad where a woman was complaining on how difficult using the internet was. “It’s so difficult. So complicated! There must be something better.” (In Spanish, of course.) Cheesy as it sounds, Händel Messiah’s “Hallelujah” sonorously invaded the screen. Don’t believe me? See for yourself.

That’s how I felt when I was investigating what’s the best approach to achieve faceted searches in MongoDB. But I found something better. Let me show it to you.

(Read more →)