My name is Sérgio Bernardino (a.k.a. smpb), and I am a software engineer, hobbyist photographer, and all-around geek. I hail from Lisbon, Portugal. Feel free to save this information and contact me at any time.
I enjoy seeing the world through the unique sight of a camera.
Please, check out my photos here.
This is my official home on the web, but quite often you'll find me in a lot of other places as well.
Post with 4 notes

If I wanted to surmise the Codebits experience into one simple word, it would be this: more.
One goes to Codebits looking for knowledge, and leaves it craving more. One enters Codebits with a set amount of friends, and surely leaves it with even more. One reaches Codebits expecting to have fun, and ends up having more. In short, every time a Codebits edition ends, it leaves everyone waiting for more.
Codebits is already in its fifth year, and although I missed the first two editions, since my visit in 2009, I’ve made an effort not to miss another one. To be sure, it’s not as trivial as just saving time for it. One has to earn the privilege of attending, and I have been fortunate enough to have done so. With three consecutive editions under my belt, I can say with considerable certainty that it really is a memorable experience that has only gotten better throughout the years.
Being an event deeply rooted in technology and (mainly) the Internet, it undeniably has a very specific target audience. I have found, however, that there is a bit of everything for everyone with an inquisitive disposition, and that the only two real prerequisites are the willingness to learn, and to have fun doing so. From there, the Codebits aura of sheer raw energy will make sure you’ll feel more than welcome.
Any geek worthy of the name has a weak spot for tech-related swag1. We all have more t-shirts, pens, notepads, and USB keys than we need or care for, but those short moments after getting the welcome kit are like a small piece of Christmas right then and there on the show-floor.
The Codebits organization has turned this into a relevant part of the experience by systematically upping the ante every year, to the point where the kit is riddled with actually useful stuff. Even the more negligible bits have the purpose of serving as teasers for what’s to come.
Is the LEGO League present on the venue? Add an amusing “Top Secret” envelope with a random piece to make you wonder about it. Will there be workshops about Arduino? Add a tiny kit with a LED and a sensor to spur you on. Which T-shirt did you get this year? The artwork in each is random, and I do think I like that guy’s pick of the draw more than I do mine…
At a glance, it all sounds like minor stuff, but it’s smart, and works for a killer first impression.

This year, the most surprising piece of swag in the package (for me) turned out not to be swag at all, but a very valuable offer. What seemed at first as “yet another useless USB key”, proved to be something entirely different: An individual Yubikey for each an every attendee.
Used as a way to actively promote SAPO’s new two-step authentication feature in its unified login process, a Yubikey is much more valuable than that when you consider Yubico’s developer-friendly demeanor. By exposing a web API with which to use the Yubikey, the possibilities are immense2.
Might as well use that O’Reilly coupon, also found inside the classy Codebits laptop backpack that wrapped the complete package, to get a free ebook that helps out with these ideas.
They shower us with gifts. And we love it.
Despite being backed by very important companies from the local Portuguese technology spectrum (and beyond), I believe that Codebits is much more than just a venue where people go to publicly demonstrate their highly tuned technical, and business, skills, or to be charmed into any random corporate recruitment process.
Codebits is a celebration of everything that surrounds the geek culture when related to technology. Be it the hacker’s spirit of constant tinkering and reverse engineering, the unquenchable thirst for the most recent shiny piece of hardware, or the love for retro-computing. Sprawling from any recognizable Internet phenomenon, to the most inscrutable memes, and even common pop culture (like movies, TV shows, music, or books). Codebits has all this, and it’s proud to showcase it in every corner, and at every opportunity. It wouldn’t stand for it to happen in any other way.
From serious corporate keynotes, to insane gauntlets in which participants are charged with presenting esoteric (even borderline nonsensical) keynotes they’ve never even seen before, to a full-fledged Quiz Show: the venue’s Main Stage has it all.
Game consoles are conspicuously placed in areas with a lot of foot traffic, you see people gliding effortlessly about on home-made skate boards, and anywhere you go you’re likely to cross paths with a tiny fledgeling robot built exclusively for the purpose of exploring these unique surroundings, as if it just happened to have landed on Mars.
At a pre-determined time in the schedule, people drop everything they are doing, and line up to have a taste of an outlandish dish: It features the hottest chili pepper in the world, and to eat it is an experience that’s described as nothing short of incredibly excruciating. But some venture forth, and return grinning (albeit in pain) with the priceless “badge of honor” proving that they were one of the few that did it.
All of this, and much more, under the backdrop of green-tinted walls, enormous screens flashing an assortment of items (from schedule news, to Twitter updates), and the constant buzzing of voices from those merely chatting, those embroiled in their projects, or even the speakers dishing out their knowledge in any of the secondary stages.
There’s a lot of laughter permeating through Codebits. People are happy to be there. And comfortable. For the geek, it’s a home away from home.
But let’s not get too carried away. Work does happen within the walls of Codebits. Serious work. Ideas flow and plans are sketched and executed. Some are bad, some are good. Some make it to the end, some don’t3. A few win, and the rest go back to the drawing board and hope to make it big next year.
As expected from a hackaton of this caliber, computers are everywhere4, and you’ll constantly see scores of faces focused on streams of text in a screen. Flip-charts exist, riddled with sketches, designs, flowcharts. Those ideas considered bad are promptly torn and discarded, in a race to meet the deadline. Everyone wants to reach the finish line, and in the best shape possible.
You’ll be hard pressed to navigate the wide sea of large desks, occupied chairs, cables, and exhausted people sleeping on bean bags, when the talk you want to attend is precisely on the other side of the working area. It’s a tight space, for so many eager.
It all climaxes in a massive final presentation where each of the competing teams is given an incredibly short window of time to prove their worth, as the audience watches and votes, and the jury listens and ponders.
It’s not an easy thing to watch. The system isn’t perfect, and you witness glitches and such technical problems you can’t help but to wonder why they still happen after 5 years of supposed fine-tuning. 90 seconds is indeed a very short timespan, but when you multiply it by dozens of projects, it wears you down. The teams frailties and exhaustion are laid bare in those precious seconds, and you (if indeed you care) have to endure through all the poorly prepared speakers, failed live demos, and incredibly flat attempts at humor.
Neither is it easy to present. In fact, it’s not easy at all. Everyone knows that the margin for success is incredibly thin. That no matter how good your project is, if you fail in that key moment, it’s all over. Compressing 48 hours of intense work into 90 seconds of supposed genius, in front of a highly skeptical (and tired) audience, is the worst (and takes a special kind of talent).
Quite a few crash and burn spectacularly. Like a slow motion car wreck you’re horrified to witness, but can’t seem to avert your eyes from. You feel sorry for the guy, and you’re glad you’re not him.
On the flip side, a talented few shine as bright as the rising sun on a hot summer day. People spontaneously burst into cheers and impromptu rounds of applause. You’re glad for that guy, even a bit envious, and you do wish you were the one to whom that happens. Everyone does.
There are prizes, of course. To the victors go the spoils, and what a rich bounty it is: From premium priced computers and tablets, to smart phones and even huge television sets that simply can’t be easily hauled off the stage. You barely notice the expensive books also being haphazardly given away. It’s so crazy, it reaches TV game show proportions.
It all combines into a powerful machine that drives you more and more towards wanting to be a part of it. You want to be on that stage and shine.
There is a whole lot left unsaid, with many things yet to mention5. The clichéd expression “you had to have been there” repeatedly comes to mind, and though it pains me to use it, it is quite appropriate.
Codebits is unique in the way it winds you up into a twisting ball of excitement, as much as it drains you of your much needed energy. You wake up the following day, thanking for it to be a Sunday, feeling like you just took an enormous beating.
But you regret nothing, and always come back to ask for more.
“Stuff We All Get” : The assorted promotional merchandise offered in venues such as this. ↩
From using their PAM module to reinforce remote server access, to port-knocking, it was enough to set my brain into overdrive. ↩
Mine didn’t, to my dismay. A tale for another time. ↩
On that note, the amount of Apple computers at the event was absolutely staggering. ↩
There’s a world of material concerning all things #softwood, and a certain group of crazy lobsters, but unfortunately… we lack the time ;-) ↩
Post with 4 notes
I had the opportunity to play around with a Samsung Galaxy 10.1 for a few hours and frankly, as an iPad 2 user, I was underwhelmed.
Allow me to elaborate on this.
The tablet itself is fine. It’s not as sturdy as an iPad (it’s plastic versus aluminium after all) but it feels solid enough in your hands. It’s also lighter than the iPad. Not a big difference, but after a few minutes you can tell, specially when holding it with only one hand.
Its actual form factor is the first thing I can say I don’t really care for. I recognize that the 16:9 ratio is ideal for video, but that’s just one of the many things I expect to be able to do with these devices. And it’s hardly the main one. I personally favor portrait mode when holding a tablet, and when doing so with the Galaxy it “feels wrong”, as if the screen is longer than it should have ever been. Admittedly, this is a deeply personal preference, but the product designers probably felt the same way since they clearly went out of their way to force you to use landscape mode.
The Samsung logo displays only correctly with the Galaxy held in landscape, the cable connector1 is at the bottom of the device when held in landscape, the stereo speakers are positioned on the left and right of the device (again, when held in landcape), and even the volume keys only make sense in landscape. You see, both buttons are at the top left of the device with the Volume Up key in the right position, and the Volume Down in the left position. So when you hold the device in portrait, pressing down increases the volume, and pressing up decreases the volume. If you flip the tablet to “make it right”, the buttons are found in the bottom left of the device: too low to be pressed comfortably. It all feels completely backwards.
Furthermore, the aggressive stance towards landscape mode is reinforced at the software level by having a large number of apps not work in portrait mode. The Android Market is a particularly high profile offender when it comes to this behavior.
Now, I know that even the iPad falls prey to this. One can argue that having the iPad in portrait with its physical button at the bottom of the device is the correct way to hold it. But the fact is that the physical layout is irrelevant when using it since the illusion of symmetry is a lot stronger. There is no “right” way of holding it largely because apps are designed to work in any which way.
But regardless of the preferred mode of holding the device, the Galaxy’s screen is bright and beautiful, the sound is crisp and clear, and both cameras on the device are great2.
To be honest, my main issue is with the OS itself.
Now, I like Google, and I care for Android. I really do. But Honeycomb on the Galaxy Tab kind of sucks.
The “Tron look” rocks, the home screen transitions can be slick, and having full-blown widgets in them is a much more attractive use of space than just having rows upon rows of app icons. But all together these elements are clunky and unpolished.
I’m used to Google’s system being a tad slow since my Android phone is old and outdated3. But when jumping from an iPad 2 to a brand new Galaxy Tab, seeing the animations skip frames, the jerky scrolling on the browser, and the erratic slowdowns, came as a jarring (and disappointing) revelation.
I found myself resorting to the system’s memory manager to kill background apps just to see if it made a difference. And to my dismay it did: the animations were noticeably smoother for a while afterwards.
I thought we were beyond this nonsense already!
The system not only feels slower, it is slower, despite running on hardware that is, theoretically, superior. This video I shot, shows the iPad 2 and the Galaxy Tab running the same YouTube video on the browser. And on the Galaxy, the playback is anything but smooth.
Indeed this is just one example, and one fairly unscientific at that. But it serves as a summary of how the Tab measures up to the iPad. Sure it can do the same, but when it does it’s just not up to par.
Speaking of the browser, by default its User-Agent is too similar to the one on Android phones. The result of this is that, more often than not, websites serve it their mobile version instead of a tablet-optimized version, or even the plain desktop version. It’s annoying and unnecessary4.
On the app’s front, the issue is widely known. Apps optimized from the ground-up only for tablets in the Android ecosystem are few and mostly inferior to their iPad counterparts. But, to be fair, I only explored the Market for free apps. The paid apps might be different for the better (as is usually also the case on iOS).
The one’s designed for smart phones, that also work on the tablet, do so in a perfectly acceptable fashion. The upscaling of those apps is not pretty, as the plain colors and lack of attractive gradients throughout the system make it all look fairly drab and boring, but it’s a lot better than either the black-boxing, or the pixel-ridden blown-up effect, in iOS.
Not having any physical buttons on the tablet to go back, or home, means that the Honeycomb status bar must always be present to allow proper navigation of an app. This works fine, but it’s not a very elegant solution. Specially because most of the apps are not designed with this in mind, so the bar’s look clashes with that of almost any app. It just doesn’t look very good.
With regards to the Samsung apps forcefully bundled with the device: there’s no point in speaking about them. The less you see of them, the better.
To sum it up: it works, but it left me largely indifferent to the whole experience. Mostly because I found it did close to nothing, beyond what you can accomplish with Google’s native stock apps (which are still better on Android than anywhere else), that you can’t already do better with an iPad.
I was underwhelmed, and very - very - disappointed.
Some people might argue that a “couple of hours” is not nearly enough to judge something. I tend to agree. This is less of a review, and more of a “first impressions” sort of affair. Despite that, I’m both an Android and iOS user, and I think I can say that I know both systems fairly well, and know what I should expect (and what I want) when moving from one to the other.
Given that the Galaxy Tab is either as expensive, or even more so, than the base model iPad 2, I see no point in recommending the former in lieu of the latter, unless you’re either a developer for the platform, or have a strong bias against Apple.
Personally, I find its price - more than anything else - the most offensive thing. It’s not on par with Apple’s product in quality to match it in such a way.
There might be a good Android tablet out there, with a good price/quality ratio, but I really don’t think this is it.
By the way, the cable really is exactly like the ones from Apple. It’s a blatant rip-off. Shameless and pointless. ↩
It would be hard to do worse in this than the iPad 2’s ridiculous cameras. ↩
An HTC Magic, running Cyanogen Mod 6.1. ↩
And yes, I know that you can change it, and that this is mainly an issue of developers not parsing the browser’s User-Agent string adequately. But a common user does not know this, and that’s the real issue. ↩
Post with 2 notes
Between the past few days of July 20th, to the 25th, I was fortunate enough to be one of the roughly 130 attendees of the first Lisbon Machine Learning School. With the topic of Learning for the Web, this Summer school took place at Instituto Superior Técnico, and covered a wide range of machine learning topics, with a strong bias towards Natural Language Processing.
Despite it being geared more towards researchers and students already with some contact with the field, its description made the strong point of assuming no deep prior knowledge of the subject at hand. And as my current work involves a considerable component related to parsing, and processing, data from human-oriented interfaces (in which no ready-to-be-parsed structure can be assumed), this was something that triggered my interest almost instantly1. Furthermore, the field itself has always attracted me somewhat, and I wanted to know more.
As I mentioned, I was fortunate enough to be one of the applicants to receive a positive reply, and it was with great anticipation that I found myself on the morning session of the, by then dubbed, Day 0 of the proceedings. What was waiting for me was - I fully admit it - quite a bit more than I could deal with in such a short amount of time.
The basis of the field of machine learning is one with heavy roots set on vast amounts of probability theory, and as such, all of the mathematical language required to quantify the uncertainties in question was introduced in breakneck-speed. This came to me as a bit of a shock, and for a moment I feared that I might have made a mistake. That I was not at all cut-out for what this school had to offer. But the brain is quite akin to a muscle, and when - after a long hiatus - you return to do regular exercise at a gym, pain is the natural reward for the sedentary lifestyle you carelessly indulged upon. It became obvious to me that I had to reset my personal expectations to a more aggreable level.
It turns out that this wasn’t that hard, since the school’s schedule was extremely well thought out. By building upon simple2 introductory problems such as Bayesian Inference, moving towards (and over) things like Markov Models, Dynamic Programming, and peaking on Unsupervised Learning, a steady (albeit steep) climb was presented to us in such a way that it was clear how solutions to simple problems are tightly integrated to the solutions of more general, complex, challenges.
A big part of proceedings, and also why the schedule worked so well, was the high quality of the invited speakers, and how well they coordinated their lectures with each other. Contrary to what I am used to in these events, the lecturers did not focus merely on their own theme(s), with no concern with what came before (or was coming afterwards). By design, the organization pushed for a high degree of communication between them, and the collective set of talks gained alot from that continuity, and consistency.
I do have to mention that I found Noah Smith and Jason Eisner to be exceptional in the way they made themselves be understood when passing on complex ideas. Outstanding speakers, in my opinion. No offense intended to the rest, of course.
While the morning lectures leaned more toward the theoretical side of things, in the evenings the speakers focused on the practical applications of machine learning. It was truly interesting, for example, to have it described to me in exquisite detail all the steps a machine translation tool, such as Google Translate, takes to return the most accurate translation it can of a bit of text.
This pattern of lectures was constant throughout the days, and what separated the morning lectures from the evening talks were the afternoon labs.
Now, as a famous movie once put it:
“No one can be told what the Matrix is. You have to see it for yourself.”
This is particularly relevant when the matrices in question are algebraic in nature. To practice is absolutely essential.
Each day there would be an afternoon lab session in which the subjects of the preceding morning were fleshed-out and put to practice. This would largely amount to dabbling with Python and a set of its more useful math-oriented modules3. This, I have to say, was the weakest point of the school for me. While support in those lab sessions was readily available, and very willing to help, a few of the instructors were clearly not at ease with a lot of the exercises. And from a personal standpoint, the aforementioned exercises ranged from either being extremely easy or quite difficult in their requirements, with a good amount of uncertainty tainting their formal definition. To be fair, my lack of practice with the considerable mathematics involved did very little to help (I’m the only one to blame there), and three hours per day (from 2pm to 5pm) is a fairly limiting window to work with, given the complexity of most of the subjects.
To counterweight this, we had what quickly became my favourite part of the school: the exceptional lab guide.
I expected the school’s lab guide to offer very little on the way of a theoretical introduction of the several subjects (since those matters were covered in each of the mornings), and instead to focus heavily on a wide set of practical exercises. What we were given, however, was an extremely detailed guide summarizing all the required theoretical knowledge for each session in a clear and compact way, along with a few of the expected exercises. Perfect for future reference and study.
The sheer value of this is unquestionable, and I give the highest praise I can to the organizers of the school for their commitment in creating such a document. It’s not without its kinks and quirks, but most of those were merely orthographic in nature, and did not affect the comprehension of the text all that much. Further corrections and improvements are forthcoming, and with it being a publicly available document4 its lasting value can only grow more and more.
Overall, and regardless of how tired I was by the end, my attendance to this Summer school was very positive.
Despite my undisputed need for further study in this field, it was not to be expected that anyone would leave the school as an expert. In that sense, I did learn a lot and was left with the most important bit of knowledge of all: where, and how, to look for more.
The final words must also refer the other, until now unmentioned, participants of the school. I met a lot of interesting people from several parts of the world, and different ranges of this field’s spectrum. It was great to share some knowledge and ideas with them, as well.
All in all, it was a great learning experience.
Besides, the chance of breaking the routine and return for a while to my Alma Mater was appealing. ↩
Assume here a relative definition of “simple” since, while the concepts behind most of these subjects are easy to grasp, the underlying math is never trivial. ↩
For reference: numpy, scipy, and matplotlib. ↩
If you’re interested in this subject, I cannot encourage you enough to check out the lab guide. All of its chapters are readily available on the school’s schedule page. ↩
After so many months of hiatus, I finally freed myself of the delusions of ever setting aside proper time to build, from scratch, my very own CMS to be placed here, running under my own domain1.
Despite my lack of writing throughout all these months, I kept assuring myself that I was still fairly active with my photography, my steady sharing stream of all sorts of web snippets through things like Google Reader, and - of course - my time wasted on Twitter.
But the truth of the matter is that I’ve been kidding myself, and today my current web presence (specially in a creative - productive - sense), is incredibly barren. And I find this very disappointing.
To fight the constant nagging feeling that I shouldn’t just leave this place to be forgotten, I quested for an adequate place to host my lazy musings and I quickly realized that I should give my old, mostly unused, Tumblr account another go.
Despite its occasional (ie, regular) instability, which - I won’t lie - does grate my nerves somewhat, the simplicity and outright pleasant beauty with which it supports a fair amount of different types of content fits my current mood perfectly. It allows me to aggregate all my things in a sober - minimalistic - fashion that I am very fond of. Plus, in its own way, it also allows me to easily indulge on the simple pleasure of exploring for new, and interesting, content.
My first (and biggest) difficulty was when I realized that Tumblr is pretty much useless on its own when it comes to importing my old, personal, content over to it. Faced with that annoyance, I looked towards its API and took it upon myself to build the right set of tools to get that particular job done.
After hacking away for a while, I finished said tool2, and all that was left was importing roughly two and a half years worth of either shared or created items to this one - centralized - place.
As you might expect, that is an excruciatingly boring task. One that I wanted to finish before actively starting to create some new content, one that I kept postponing over and over again, to this date. And while I might eventually complete it, what is vividly apparent to me now is that I take great pleasure in building and decorating my house, but find it incredibly boring actually living in it.
In clearer terms: I did prepare this place as best I could3 (it gave me great pleasure to do so), but when it came to the part where all that was left was actually creating content, I found myself (yet again) stuck in the never-ending rut of procrastination.
Truly, I’ve only myself to blame. And there’s little else to do about it now except actually publishing stuff.
Page 1 of 2
Original theme by nostrich