Hello World!

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 at any time.

Photography

I enjoy seeing the world through the unique sight of a camera.

Please, check out my photos here.

Digital footprint

This is my official home on the web, but quite often you'll find me in a lot of other places as well.

27th February 2012

Link

I, for one, welcome our new plain text overlords

Markdown is text, just plain text. Its the one format that has not changed over all the years. Oh sure, we’ve gone from a 7-bit ascii code to UTF-8, but all text editors happily handle the old text formats. And when they stop, a small C program will fix it.

Plain text, and therefore Markdown, are as future-proof as you can get in computing.

Since I can remember I’ve been acutely sensitive to file format lock-in, for all the reasons ranging from portability, to maintainability, and future-proofing. Plain text has always been my format of choice for anything involving writing.

In that context, Markdown (or any sort of light-weight markup language for plain text, in fact), is nothing new or revolutionary. It has, however, become increasingly popular this past few years, and it is a trend that I find most welcome.

The more people rave about it as the pinnacle of data portability, the more tools spring out of the woodwork to support it, and facilitate its creation, editing, and consumption. And that’s great!

Tools like iAWriter, TrunkNotes, and plain old - reliable - vi, are common-place (and increasingly valuable) in my daily workflow1. This post itself has been written with Markdown formatting, and on the day the format is replaced by “The Next Big Thing (TM)”, all the time I spend buried away in Perl code should keep me, and my data, safe enough2.


  1. All of it tightly weaved up around Dropbox, unsurprisingly. 

  2. Not accounting for other side effects from prolonged exposure to Perl code, of course ;-) 

Tagged: LinkMarkdown

26th February 2012

Post

Recursively delete specific files within a directory tree

Here’s something I find myself needing time and time again, but never seem to have the accurate syntax at the tip of my fingers.

Suppose you have a complex directory hierarchy, with several different types of files within it, in which you want to remove all files of a specific format. How does one accomplish this with a single command?

You simply pipe the output of ‘find’ into ‘rm’, like so:

    find . -name '*.log' -exec rm -i "{}" \;

The double quotes are needed if the names within the hierarchy have white-spaces, and the escaped semi-colon is required to close the ‘exec’ statement.

Tagged: CLIUnixMemory

12th January 2012

Quote with 1 note

As I learned more about how these early role-playing games worked, I realized that a D&D module was the primitive equivalent of a quest in the OASIS. And D&D characters were just like avatars. In a way, these old role-playing games had been the first virtual-reality simulations, created long before computers were powerful enough to do the job. In those days,if you wanted to escape to another world, you had to create it yourself, using your brain, some paper, pencils, dice, and a few rule books. This realization kind of blew my mind. It changed my whole perspective on the Hunt for Halliday’s Easter egg. From then on, I began to think of the Hunt as an elaborate D&D module. And Halliday was obviously the dungeon master, even if he was now controlling the game from beyond the grave.
— Ernest Cline, READY PLAYER ONE (2011)

Tagged: QuoteREADY PLAYER ONE

11th January 2012

Link with 1 note

Dungeons & Dragons - The Way Forward

I stopped playing D&D during the transition from the 3.5 Edition to the 4th1. I was somewhat burned out after playing the former for a long period of time without meaningful interruptions, and the new mechanics introduced by the latter did not grip me at all.

To see news of Wizards (or should I say, Hasbro) planning a new major edition a mere three years after the debut of the Fourth Edition (by comparison, the gap between the 3rd and 4th was eight years, with the 3.5 revision showing up roughly mid-cycle) really rings alarm bells to me. It looks clear now that the Fourth Edition wasn’t all that successful in stopping the increasing loss of players to the digital RPG front (such as MMO video games), and the like.

Having them boast that, this time around, what the community wants truly matters to them is just silly, and Penny Arcade nails the “why” perfectly. People who are really serious about pen & paper roleplaying games aren’t at all aligned with what Wizards really needs: people willing to spend unreasonable amounts of money on renewing their core book sets and on increasingly contrived accessories like cards and miniatures.


  1. You can catch up on that experience, through some writing I did during that time, on Draconus Dictum. It’s only available in Portuguese, though. 

Tagged: LinkPenny ArcadeDungeons and Dragons

18th December 2011

Photo

rocket

rocket

Tagged: InstagramPhotography

Original theme by nostrich