Archive for the ‘tech’ Category

Application Testing with Capybara
December 1, 2013

I just finished reading Application Testing with Capybara for a review requested by the publisher, Packt Publishing.

I know actually know very little about Ruby on Rails, since most of my time on web frameworks is spent in the Java world – and even then, I don’t do much interactive web apps. Mostly web APIs. APIs are so much easier to test.

Interactive web apps for humans are harder to test. This is where Capybara comes in, along with its collaborators Cucumber for the test description, and the integrations with Rack and Selenium WebDriver for the web testing backend.

While I know Selenium since it can be used for different target web platforms, I know less about Rack and Rails infrastructure. Fortunately, the book explains enough about these pieces for a relative newbie, and walks through worked examples that are more complete than the tools’ web documentation.

While Application Testing with Capybara is short, it goes straight to the point into what someone would need to know about the topic. Those with more time could rely on the free documentation.

Learning to Review
November 26, 2012

In the past couple of years, I have been reading a number of books. Almost all have been ebooks. the print medium may become obsolete, but the mental model of the book will not.

It’s about time I review them, reflect on them, and relate to my experiences.

Running the Mosaic Browser on a Modern Linux
March 30, 2012

Yesterday I got inspired by the 18th Anniversary of Philippine Internet and Netscape running on an old computer. I decided to try Mosaic on my Linux box. Mosaic, the predecessor of Netscape and so many other browsers.

Here is how I built it on Ubuntu Precise Pangolin (12.10) beta 64-bit:

  • Downloaded the modernized Mosaic source code. The PNG patch is no longer available.
  • Installed dependencies: sudo apt-get install libmotif-dev libxmu-dev libjpeg-dev libgd2-xpm-dev
  • Manually downloaded and compiled lpng1058.tar.bz2from http://libpng.sourceforge.net . Good thing the old PNG libraries compatible with old source are still being maintained.
  • Renamed the definitions ofgetline in ./libnut/url-utils.h ./libnut/url-utils.c ./libwww2/HTInit.c . It is already present in the standard C library.
  • Compiled with make linux.
  • The compile will have warnings about assigning pointers (64-bit) to int. While this is dangerous, it doesn’t stop this Mosaic from running – but it does segfault for some pages. It might be better on a 32-bit machine.
  • The link will fail because the current libpng does not have the deprecated function png_read_init. Instead, copy paste the gcc -o Mosaic line and replace the -lpng with the compiled libpng.a. Also include the system’s libm.a (in my case, /usr/lib/x86_64-linux-gnu/libm.a) since libpng.a is statically compiled. Otherwise, the link will fail with undefined reference to `pow’.

Then, run ./Mosaic. It will have errors like Warning: Cannot convert string “-adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1” to type FontStruct which don’t seem to prevent it from running.

On some sites, I get a core dump. I think it’s because the code was linked against the current libpng.h, but I don’t have time to investigate it. Take a look!

libpng warning: Application was compiled with png.h from libpng-1.0.6 or earlier
libpng warning: Application  is  running with png.c from libpng-1.0.58
libpng error: The png struct allocated by the application for reading is too small.

Wanted: The Real Philippine Internet History
July 20, 2008

We need the real Philippine Internet history. Most Pinoy Internet users don’t know it at all. Some, might know the short version. Few know about things that really happened.

These are the juicy bits that would be polished over in an official “textbook” Philippine Internet story.  These are the “off the record” stuff that either get circulated as hearsay and urban legend, or kept secret. This is because the Philippine Internet History is not all rosy.

This comes into mind because the ph-cyberview mailing list anniversary is coming up.

A few years ago, I contributed to the Philippine Internet Review publication and wrote about Philippine Internet History. However, this was just based on my notes and personal research off the Web.

We need it written by a real journalist, with interviews and first-hand information.

Open Source Angst
May 18, 2008

Open source is supposed to make users happy (except when it doesn’t work). It’s supposed to make their developers happy (as long as it scratches their itch.) But it has been causing me angst.

I don’t get to write any.

Of all the years I’ve been working with free software/open source, I have only been hacking bits and pieces. I did write one thing that seems to have found its way into many project. A little ego trip. And, almost everything I did was work related. I never got to scratch a personal itch. I think back and realize, perhaps I didn’t have that itch at all.

In the past few months, I thought that I should get back to writing open source. For pure fun.

But the fun didn’t come. It never had a chance. I did not get motivated. Now I realize, I wasn’t really interested. I was just feeling guilty, feeling obliged.

I felt obliged because the Philippines doesn’t contribute much to open source. There are some significant people and companies who do, but in absolute terms it’s just a drop in the bucket of global open source contribution. This has been discussed before, in PLUG (Philippine Linux Users Group). The conclusion was, in the Philippines, the people who have the skill to contribute to open source need to make a living. If they had extra time, they would work on a sideline. Students could do it, as there are programs like Google Summer of Code that help. But someone told me, students are lazy.

I still want to help. I still actively use open source products – and thus help, as a tester. I’m not much of an advocate anymore. I have grown tired of it. Perhaps in other non-coding, technical ways.

In the PLUG thread that discusses this, the post that kicked off the topic was all about using open source to add to the portfolio or resume. At this point in my career, writing open source won’t help much. But I hope younger folks would find it useful.

bittersweetness
May 10, 2008

I will forever associate the word “Bittersweet” with Marc Almond. That 1988 song is stuck in my head thanks to the NU 107/99.5 RT of that era, mixed with the a killer melody and lyrics that tempt you – “Let’s Go To Paradise Jack.” Ultimately nonsensical but filling for the moment.

Just like that, memories of my 1995-2002 ISP career haunt me.

Jim Ayson reminded me of this because of his post on the Philippine Cyberspace Review, with some significant but mostly forgotten Internet history information.

I once blogged that I will share more of my personal experiences. But I still feel the time isn’t right. I just have too much regret over missed opportunities and what-could-have-been. The bitter. On the other hand this was a career and life-changing six years. The sweet. Need one to have the other.

But I’ll leave the stories for the planned EB, if the stars on that night shine right.

Unswitchable
May 6, 2008

I read MacRumors on occasion. It’s not just because I want tech gossip. I’m thinking, when shall I get myself a Mac? The old Mac Envy.

It’s still nowhere in sight. Even if technical articles showed to me demonstrating Mac superiority over Windows and even Linux, I have already invested in building a home Linux/Windows PC, which costs cheaper than a MacBook, is more powerful and expandabe, and is well-suited for me learning sysadmin stuff under virtualization.

Most of my laptop work is done on my office PC which needs to be Windows.

There’s just no ROI for me getting a Mac. It would be useful if I were a pure Java developer – no dependencies on proprietary stuff. But that’s not happening soon.

In the ideal world I would have lots of free time to hack on Java, Rails and other Unixy stuff that would run on OS X, but I’m not there.

What Page Represents You?
May 4, 2008

What Page Represents You? What is your homepage?

In the 90’s, it was a Geocities or Tripod.com page, or an ISP-hosted ~page. With links, pictures, about me, and blinkie-blinkie things.

In the 2000s, this became a blog. With blogrolls, pages, and then widgets.

But for those who are not defined by their blog, what should their page be now?

That is what I ask myself. What do I do with my domain? This blog barely represents me, so I shouldn’t point it there anymore.

How about my lifestream? There’s friendfeed. I could redirect it to my friendfeed. But it doesn’t paint a complete picture of what I do online. How about posts on other sites (famous only in the Philippines?) like Multiply? How about posts to online forums and mailing lists/Yahoo! groups. They represent me, and they are public. But they remain scattered in a million pieces around the web.

What page represents you?

VPS Migration Step 1
May 4, 2008

I have been hosting my sites or blogs on Virtual Private Servers (VPS) since 2003 or so. I thought that a Unix guy like me should eat his own dogfood and do sysadmin on his own server. And, I’ve been planning to run my own apps – Rails, Java, etc.

But that didn’t happen. I am still doing my own personal R&D, but in its current iteration it does not need a public-facing website. It all lives inside my PC.

So, to cut costs and save time (yet another server to update and check), I canceled my VPS. I still want paraz.com content to be visible and searchable, so I migrated it here to wordpress.com. But, I was using a custom permalink structure – my preference, which is /POST-ID/post-slug. wordpress.com uses the default date-based scheme.

Therefore, I had to make my own redirect. The post slugs are the same, but WordPress has no “search by post slug” query. I had to make a 1:1 mapping for each post. I did this by performing an XML export on both blogs, then writing a small Python script to parse the XML and do the matching. The output is a flat file with the old URI on the left and the wordpress.com URL on the right. This is used by a RewriteRule which looks for a match and issues a HTTP 301 redirect.

The effect now: people who click on my old URLs from a search engin, or from a link, will land here in wordpress.com.

The effect later: The new URLs should replace the old URLs in the search engine results.

Tech Update
April 17, 2008

Unfortunately, I can’t post the best and most interesting tech I’m up to, since it’s work related and I can’t share a single clue as to what I’m up to. Really secret stuff.

Instead, let me tell you about the tech stuff I do in my own time:

  • Beta testing Ubuntu 8.04 Hardy Heron
  • Using kvm Kernel Virtualization, and comparing it with VMware. Soon going to try Virtualbox
  • Trying OSX86 on different PC’s. Already got it working on my Acer 4710Z laptop, but in my desire to achieve the proper 1280×800 resolution instead of 1024×768, I trashed it and the graphics system no longer starts. Will try to fix it still.
  • Trying to get back into open source development, especially in Java. Still frustrated that I – and Pinoys – use a lot of open source but don’t give back.
  • Planning further PC upgrades. Will probably add another hard drive to my desktop for a RAID0 setup. Might get a “branded” case like a Lian Li.
  • Reading a lot on my Safari Books account. Read some tech classics. Read a .NET programming book – but haven’t gotten started. Reading EJB3, just in case I need it. Reading about the Linux kernel details, so that I know what I’m working with under the hood.
  • Thinking about how to earn from Adsense and online ads again – without spending too much time on it. It’s not really passive income if you spend too much time working on it and thinking about it.