Twitter updates. My Twitter user is bojicas. Follow me!

No public Twitter messages.
Silviu D. Bojica (bojicas)
Follow me!

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: http://www.apple.com/apple-events/

Bloggers will keep us updated on following sources:

In the event Apple is streaming live, IB Times will re-stream on following page: http://www.ibtimes.com/apple-iphone-5s-5c-event-3-ways-live-stream-tuesdays-announcement-your-computer-iphone-or-ipad

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.

Why?

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 http://www.cubicleapps.com, 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

Resources:

Weekend in Al Ain

Last weekend was one of those magical ones, spent with my family and a handful of friend in Al Ain.

This post wishes to be a picture story of the above mentioned trip and the two places we visited there: Al Jimi oasis and the Al Ain Zoo.

First step Al Jimi Oasis.

Bellow a picture of my daughter, my wife and myself on the shade. Sorry guys and girls from back home, I know it’s winter there with tempratures far below zero:

1001_WeekendAlAin_006.jpg

The wonders of the desert, yes we are in the middle of the desert, but mind your steps…

1001_WeekendAlAin_009.jpg

and a close-up (my friends were busy visiting & making pictures of the nearby fortress), but I got myself knees dirty, attracted by these tiny flowers…

1001_WeekendAlAin_011.jpg

Hey, here we are, waive my girls…

1001_WeekendAlAin_013.jpg

If you follow me on twitter, you may know about that crazy project of mine dailyshoot / 2010 in 365 daily shots. Today’s assignment… Quirky things often catch your eye and make for interesting art. Make a photo of something that makes you go “Hmmm” today. So here comes my first candidate…

1001_WeekendAlAin_015.jpg

Let me see if you guess. What is this? Aliens?

1001_WeekendAlAin_024.jpg

Hmmm… a door profile:

1001_WeekendAlAin_027.jpg

Well, we were into an oasis, so this is how it looks like:

1001_WeekendAlAin_030.jpg

Let me introduce you now, one of my friends, without which the story will not be complete. His name is Octavian, passionate of photography himself. Here, he is aiming that flower bush…

1001_WeekendAlAin_035.jpg

or well, not exactly, hmm… as I hear him saying: A little to the left, no… no too much, to the right, just a bit. Perfect! And now say, cheese!

1001_WeekendAlAin_037.jpg

One more shot of his…

1001_WeekendAlAin_044.jpg

Time to move on, to the next place, Al Ain Zoo, but just before reaching there we enjoyed photographing our shadows (probably candidate #2 for the hmm moment):

1001_WeekendAlAin_045.jpg

Finaly, at zoo

1001_WeekendAlAin_046.jpg

It’s time to introduce Daniel, snacking his popcorn:

1001_WeekendAlAin_060.jpg

So why go to cinema? Popcorns, berry juice, and hey … we can see Alvin, live, right here …

1001_WeekendAlAin_062.jpg

My turn to feel attracted of flowers

1001_WeekendAlAin_069.jpg

… and flowers (love ya!) …

1001_WeekendAlAin_079.jpg

Wildlife… thinking at its supper

1001_WeekendAlAin_087.jpg

couple of fences apart…

1001_WeekendAlAin_096.jpg

Panorama

1001_WeekendAlAin_103.jpg

Final shots, to remember…

1001_WeekendAlAin_106.jpg

and

1001_WeekendAlAin_109.jpg

The winner of the quirky, hmmm moment is (laughing, laughing & laughing):

1001_WeekendAlAin_112.jpg

The zoo attraction, white lions:

1001_WeekendAlAin_124.jpg

But it’s late and my daughter is… getting tired.

Many more moments to come, I warn her.

Oh, man! says she, like Swiper the fox from Dora, one of her favourite cartoons.

1001_WeekendAlAin_126.jpg

From here, the last retreat in Heritage Village, then back to Sharjah.

I hope that you like it and I could bring the smile on your face showing you this photo-story.

The last, but not the least, I would like to hear from you, be sincere if you like it or not, and also I am awaiting other crazy ideas for one-weekend adventures. Comments are open …

What Is That?

A touching short film about parents and parenting.

Bellow is the link to the blog from where I have been originally referred to this movie: http://personalgrowthmap.com/blog/

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 http://www.sqlite.org/sqlite-3.6.14.tar.gz | tar zx
cd sqlite-3.6.14
autoconf
./configure --prefix=/usr/local
make
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 Plone.org 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 http://plone.org/products/plone 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/buildout
./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 => ".w2task.com" 
}

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

./script/server

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/mod_passenger.so
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!