Archive for the 'Science & Technology' Category

Sources to follow for the Apple event on 10th September 2013

We don’t know yet if Apple will do a live-streaming. However, in case they do, here is the page to follow:

Bloggers will keep us updated on following sources:

In the event Apple is streaming live, IB Times will re-stream on following page:

Getting excited to see what Apple unveils today!

BlackBerry Dev Day Review

As a web developer I’ve been always interested in making my web apps accessible from any mobile devices, given that the trend is to have them “hooked” to the net. And BlackBerry makes no exception, or to be correct, BlackBerry are among the first to let their devices be permanently on.

So no wander, why I immediately register for the BlackBerry Dev Day. Bellow are some of my notes taken at this event.

First “hands-on” session was – Getting Started Developing on BlackBerry, which presented the BlackBerry ecosystem with some interesting statistics like:

  • 565 BlackBerry carriers in 175 countries
  • 55 million subscribers
  • AppWorld – the BB app-store (similar in concept with the Apple’s app-store), with a distribution in 70 countries, but … here lays the surprise, … none in the Middle East. But, there is a promise that BlackBerry is working hard on that. However, there are other channels of distributing the applications, like collaborating with the carries, or direct download.

A new developer should get hands on version 5.0 as the market share is 46% of all BlackBerries, plus anything developed on 5.0 is compatible with 5.x and the newer 6.x versions.

One other aspect, which appeared interesting from my point of view, was the overview of BlackBerry network transports (gateways). Each is in direct correlation with the speed of data traveling across the network, and ultimately can affect the user experience of the end user, in particular if the app is web based, where all data, including the UI elements are loaded from a remote server.

  • TCP Cellular
  • WAP
  • TCP Wi-Fi
  • BB Internet Service
  • BB Mobile Data Service (MDS)

Another point I learned was that all apps should be signed, so a developer must apply for a key to RIM, which costs around USD20, a key which can also sign PlayBook applications.

The usual developer tools are:

  • Eclipse
  • BB JDE Plugin for Eclipse
  • other IDEs

The Pillars of Web Development are:

  1. BlackBerry’s Browser – the application runs in the device’s web browser.
  2. Hybrid / BrowserField – the BrowserField is a browser which can be embedded into the application. From the user point of view the most relevant thing is that you can jump between focusable elements of a page without the need of a pointer (arrow).
  3. BlackBerry WebWorks – is the web application running as described above, but with full access to the device capabilities, be it BB messenger, PIM, calendar, geolocation, etc. Other particular features to WebWorks are the contextual menus which ensure a smoother navigation between different elements of the app, access to other widgets, exit/quit procedure.

The WebWorks Bootcamp emphasized on taking in consideration the network latency, and the advantage of using WebWorks (trying to compress the code as much as possible) as opposite to running in the browser app. In regrad to images, best is to use pngs or jpegs (the former being smallest in size), and allow MDS to resize them, instead of the browser to avoid latencies introduced by loading such high resolution images.

To my surprise, JavaScript is disabled by default in 5.0, in contrast to Apple’s devices which are pro-JavaScript, in fact for iOS there is an web-API to give the user the feel of a native app. Hmmm. The stated reason for disabling the JavaScript is that the power processing is much slower than that of a PC, so such scripts will run much slower. More, BlackBerry is designed to stop unresponsive scripts after 10 seconds. On the other side, the Adobe stuffs are at their “home”.

The recommendation in such case is to use 6.0, in order to give full user experience, where HTML5 and CSS3 are well supported, jQuery and over JavaScript frameworks work to their maximum.

As for the PlayBook (the tablet), the web browser is WebKit based, supports HTML5, CSS3, as well as Adobe’s Flash or AIR, and all discussed stuff re WebWorks apply here, too.

I haven’t insisted on the talks regarding the way of building native applications (although it worth to mention some examples, where the icon or the app title changes to the context – like the weather status, this way an app becoming a “Super App” and core part of the device and OS itself, being useful even without never opening that particular application).

In conclusion, we had part of an interesting day, with some examples in the real world. Hopefully, AppWorld will be available soon world-wide, so developers can address local markets, too. Myself, I’ll remain stick with Ruby on Rails, my current web development framework of choice.

Of course, native apps have their own advantage in terms of user experience for any type of “smart device”, but with continued improvements in network speeds and browsers capabilities, the web apps have a bright future. What do you think?

New month, new beginning. Welcome Cubicle Apps DMS!

I am glad to announce that my newest project developed “in the clouds” is now available for public beta testing. Welcome Cubicle Apps DMS!.

CubicleApps DMS

You are all invited to create an account, use the system to the maximum and send me your feedback.

What is all about?

Cubicle Apps DMS is designed as a document management system for tracking and storing electronic documents, images of paper documents which have set an expiry date, so you can organize them and get useful reports and alerts in regard to the expiry dates and renewal procedures.

What type of documents? Well any expiring documents. Read more in this introduction, which will be part of the end user manual.


During my career, I have been frequently asked by my employers and later on by my partners and clients to find and or craft a system which is dealing with expiring documents. So, I know my competition, I know the document workflow in typical small and medium sized companies and yes, I have the strong believe that this territory is still not well exploited and CubicleApps DMS found its niche.

In conclusion, please vist, register with an account, play around and let me what you think. In the same time, I’ll keep you updated with the progress and write more about the concepts and philosophy behind CubicleApps DMS. Enjoy!

Ctags and Vim for Ruby on Rails Development

Tagging is a feature that gives vim IDE-like code browsing powers.

:help tags

A tag is an identifier that appears in a “tags” file. It is a sort of label that can be jumped to. For example: In C programs each function name can be used as a tag. The “tags” file has to be generated by a program like ctags, before the tag commands can be used.

ctags -R *

is probably the most simple usage of ctags command from the command line, issued from the root of the Rails project. The result is a file named tags which indexed all objects, so it makes easy to jump, for example, to a Ruby method definition just by using CTRL-[ shortcut anywhere in the code where that method is used.

However, ctags can be told to exclude some of the files and directories and it makes sense to ignore the .git and log directories as they do not contain useful information:

ctags -R --exclude=.git --exclude=log *

But it would be more useful if we could have access to the Rails core method definitions and documentation, as well as for the included gems. Bellow, I have included the gem directory of my default ruby (ruby-head under rvm):

ctags -R --exclude=.git --exclude=log * ~/.rvm/gems/ruby-head/*

Navigation tips:

  • :ta belongs_to jumps to belongs_to method definition
  • CTRL-] if you see a call to a method and wonder what it does, position the cursor inside the method name and hit CTRL-]
  • CTRL-T to go back from the method definition

Two other useful shortcuts: CTRL-I and CTRL-O – think of them in and out the method definition.

Navigating through a list of methods with similar names

:ta /^validates_*

will look for all method definitions that starts with the given string. By default it will jump to the first definition found, but we can do more.

Following vim commands can be used to navigate through the method definitions:

  • :ts shows the list
  • :tn goes to the next tag in that list
  • :tp goes to the previous tag in that list
  • :tf goes to the first tag of the list
  • :tl goes to the last tag of the list


Getting back sqlite3 to Mac OS X

For some reason, I lost my SQLite version from my Mac OS X 10.5 Leopard. I hardly suspect MonoFramework for the “damage” caused, as /usr/bin/sqlite3 has been replaced with a link to a non-existent file from MonoFramework Library.

A quick and dirty fix is to bring back the sqlite3 source and install it in the *nix fashion (configure, make, make install). For future reference, I am listing the full sequence of commands I’ve typed in Terminal:

curl | tar zx
cd sqlite-3.6.14
./configure --prefix=/usr/local
sudo make install
# check if SQLite is installed properly
sqlite3 --version
# 3.6.14
which sqlite3
# /usr/local/bin/sqlite3

Note the new path: prefix=/usr/local, so the CLI (command line interface) sqlite3 will be accessible via /usr/local/bin/sqlite3. As sqlite is part of the core Mac, I believe it is wise not to interfere with any of the original libraries (not only CLI).

Do you know a “cleaner”, Mac OS X like (.dmg) way to restore SQLite? Please comment.

Setting up Plone to show Dubai time

As a short introduction, Plone is an excellent content and document management system. I would not insist on its features and installation as it installs as a normal Mac OS X application. For this, you may find more visiting website.

In exchange, I will present the issue I had with the timezone for Dubai and the workaround…

For some reason, the default Plone installation doesn’t pick the right time for Asia/Dubai.

So I googled back and forward but couldn’t find the correct answer.

In fact, those tips will work for something like Europe/Berlin (eg setting up TZ variable to Europe/Berlin), but setting up TZ environment variable to Asia/Dubai will give me something like GMT+10? Obviously wrong.

So, the workaround is to set up the TZ environment variable to something more general, like Etc/GMT+4. We don’t care about daylight saving issues, so it should work all year round.

Enough words, let me know show you some code. Let’s suppose that you downloaded version 3.2.2 from for Mac OS X and used the Stand Alone installation, then, edit /Applications/Plone/zinstance/buildout.cfg file and locate the following lines under [instance] section:

# You may also control the environment variables for the instance.
environment-vars =
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs

Now add the TZ environment variable to point to Etc/GMT+4:

# You may also control the environment variables for the instance.
environment-vars =
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
    TZ Etc/GMT+4

Save the file, then run from your Terminal:

cd /Applications/Plone/zinstance/
./bin/plonectl stop
./bin/plonectl start

Now, back in your favourite browser and launch http://localhost:8080/Plone.

You would see now, that Plone will report the correct time.

Keeping session data across subdomains in Rails 2.3.2

Upgrading to Rails 2.3.2 I came across with the error of not keeping the session data between subdomains. That meant I had to authenticate each time I would change the subdomain.

The fix is simple.

Prior to version 2.3.2, I have had something like this in environments/development.rb file:

ActionController::Base.session_options[:session_domain] = '.w2task.local'

In Rails 2.3.2, I had to change this line into:

config.action_controller.session = { 
  :domain => ".w2task.local" 

Of course, same principle applies to development.rb, where:

config.action_controller.session = { 
  :domain => "" 

I’ve lost some hours in researching this solution, so I hope this will help others in need. too. As usual, I will be more than happy to hear comments from you.

Happy coding!

Ruby on Rails application could not be started

This is the error message, on my local machine after I upgraded to rails 2.3.2. Well, it was not an instant error, but it appeared after a while, to be more exact after I rebooted my computer.

The error:

no such file to load -- application.rb (MissingSourceFile)

As the new rails renamed application.rb to application_controller.rb, I have immediately sensed the root of the problem, so I’ve tried to


and it worked. That means it has something to do with the Phusion Passenger.

But what? I’ve updated all the gems, and passenger was updated too.

Well, yes, but not the apache module, and not the configuration…

This is to remember: Every time, after getting a new version of Phusion Passenger via sudo gem update, I have to:

sudo passenger-install-apache2-module

and go through the setup, than edit the httpd.conf file (in my case: /private/etc/apache2/httpd.conf) and replace the old passenger configuration lines with these new ones:

LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.1.3/ext/apache2/
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.1.3
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Last step is, of course, to restart the apache server:

sudo apachectl restart

Now we are set to go.

I have post this article as a reminder to myself in case something similar would happen in future, and as well I hope to be useful to the readers of my blog whom might struggle with the same type of issues.

For any other tips and comments, it would be a pleasure to see you replying to this post.

Coding is fun!

The Gimp-Reflection Plugin Screencast

The gimp-reflection plugin extends the lower section of an image as a reflection of the original image with a single click, similar effects to what you see on Apple’s website, iWeb, etc.

This screencast shows you how to download, install and use the gimp-reflection plugin. Enjoy!


The original image:

The result, after the one-click reflection filter is applied:

Easy, isn’t it?

Ruby on Rails – Tools I Use

Going with the hype, I am coding in Ruby on Rails and exclusively on a Mac.

As a text editor I am using TextMate. It was love at first sight (although shared) – I know, we are talking about community here. But as many of us, I would like to see more often updates and at once that pending version 2. It is something there which says that a version increment will make us much more happy. I have a feeling it is loosing slowly its vibe. For instance: Peepcode is releasing a screencast episode about Emacs, and I am also seeing more and more blogs talking about switching to either Emacs (Carbon or Aqua) or to MacVim.

CSSEdit 2 is filling my coding gear and it helps a lot in cleaning my templates. I am a dirty hand coder in the way I am using quite often something like <div style=” …. “> directly into my code, pushing only at the end for what I need to a style sheet.

I discovered git once with Rails and since it became my right hand in versioning. I never believed it can be so easy, doesn’t matter if you are online or offline, you are alone or working along with a team. More, I agree it is more productive to have that infinite hexa number instead of 1, 2, etc as your file/project version number, because you just code, don’t tend to compare. And because I love luxury, I am using a micro account with github. Yes, I have my own secrets there, too 😉

Ticketing and organizing my staff – I am into a personal level with the lighthouse. And the Lighthouse Keeper is giving me enough support whilst offline.

What about you?