Thursday, November 26, 2009

Lighttp

After upgrading my apache2 installation to allow me test a php5 app, I have not been able to get SSL to work! Arggh!!!

Rather than continue to lose time while tinkering with Apache, I got the brilliant idea of trying out Lighttpd and I got up and running in less than 5 mins hurray.

Instructions to install lighttpd with ssl is here: http://www.cyberciti.biz/tips/how-to-install-ssl-lighttpd-https-configuration.html
along with how to generate a self-signed certificate here: http://www.cyberciti.biz/tips/howto-lighttpd-create-self-signed-ssl-certificates.html

Open source rocks!

Wednesday, November 18, 2009

Google Nigeria Office?

Google appears to be making a go at localizing its content (Google Maps, Apps, etc) for some hard-to-ignore markets in sub-saharan Africa like Nigeria. Nokia Ovi Maps prepare for some serious competition. Free is good!

They have a page here looking for a Business Development Manager and here too but both pages apparently link to the same information only that the latter has a url that is more SEO friendly.

Via: http://www.informationnigeria.org/

Friday, November 13, 2009

Java ME Development Tips

I've been fooling around lately with developing an app or two for my Nokia E71 using Java. I've since found out that with enough dedication one could develop the common most kind of apps using not only Java ME but also Flash Lite and Nokia Web Runtime (WRT) in addition to the seemly daunting Symbian C++ option.

To get started with the tools needed to do Java ME development, there is a nice list of tools that you need to download here: Java ME S60 Wiki. The tools are most geared towards developers that plan on doing their development primarily on Windows using Eclipse as their IDE of choice. I currently run Windows XP on my Mac using VirtualBox.

Step 1
I installed two JDKs: JDK 1.6 and JDK 1.5 because the third tool mentioned in step 3: Nokia SymbianOS/S60 SDK for Java which I had downloaded a long time ago was the S60 3rd Edition Feature Pack 2 edition and it somehow has a dependency on the version 1.5 JDK. I suppose the current version S60 5th Edition SDK should not require having to install two separate JDKs.

Step 2
I downloaded the Java ME SDK. Perhaps I'll try doing Java ME development on my Mac directly since Sun now offers the Java ME SDK (formerly the Sun Java Wireless Toolkit for CLDC) for the Mac OS and post the results here.

Step 3
I installed Nokia SymbianOS/S60 SDK for Java specifically the S60 3rd Edition Feature Pack 2 edition. You can go ahead and download more recent S60 5th Edition SDK here.

Step 4
Although, you should do just fine if you follow the steps outlined at the Wiki, I decided to do mine slightly differently since the Eclipse 3.2.2 version that was used is slightly dated -- the Eclipse Foundation has already released three additional versions since Eclipse 3.2.x (Callisto): Eclipse 3.3 (Europa), Eclipse 3.4 (Ganymede) and Eclipse 3.5 (Galileo).

So I downloaded instead Eclipse Pulsar which is based off Galileo and was designed specifically for mobile app development. The good thing about doing this is that you get to avoid downloading the EclipseME plugin for Eclipse since this is already bundled with Pulsar.

Step 5
No-op.


Step 6
You could choose to skip this step altogether as it merely provides you with a local copy of the Java ME documentation.

Now you are all set for a 'hello world'!


Some additional gems I came across while searching:
http://wiki.forum.nokia.com/index.php/Code_snippets_table_for_common_use_cases
A nice page of code snippets hosted on Forum Nokia's wiki for many of the common use cases that noobs to mobile development would like to learn about.


http://efforts.embedded.ufcg.edu.br/
A site chuck full of neat tutorials on getting started with WRT, Flash Lite, Java ME and a few other mobile development platforms.
I particularly loved this example on Accessing RESTful WebServices with JavaScript which IMHO was well written with a nicely done Javascript client, diagrams and a nice server-side implementation in PHP and Grails. I especially liked the easy to follow code of the Grails script which is a nice primer into how easy Ruby on Rails development must be.


http://wiki.kunerilite.net/index.php?title=KuneriLite_Introduction
I also came across kunerilite for turbo-charging Flash Lite apps. Pretty neat eh?

Tuesday, November 3, 2009

Removing ^M in text files under Linux

As per this ASCII table the carriage return or the character ^M is listed as:
CR ^M 13 0D carriage return
^M can either be expressed in decimal or base 10 (n10) as: 13;
in hexadecimal or base 16 (n16) as: 0D;
or in octal or base 8 (n8) as: 015.

The conversion: 0158 = 08 18 58 = 0x82 + 1x81 + 5x80 = 0 + 8 + 5 = 1310

Here's a neat little tip for mass removal of the annoying presence of ^M in text files that were edited on a Windows computer in Linux using Perl:

perl -pi -e "s/\015//g" index.html
or even better:

perl -pi -e "s/\015//g" folder/*.*
removes it completely from all text files in the folder.