Ruby on Rails for the PHP Web Developer – The Journey

For my frequent readers, you may assume that I have run crazy … now Ruby on Rails with all the PHP experience that you have got! Well I am shocked as well, but its a necessary step in my growth as all of us have to move out of our comfort zones at some time. Well I am going to be moving to an organization that uses Ruby on Rails as their language tool of choice as a project manager. So yes I have to learn a new tool, leveraging my experience to manage agile projects, so the geek in me has to understand the tool chain to enable me have better dialogue with the business analysts and developers.

So I am starting out on a new path, but as I was taught (brainwashed actually) the best way to learn a new tool is to use it. So I am trying to build a not so super secret software solution to solve a business problem I keep running into as a way of getting into the guts of this tool.

Ruby on Rails (ROR) is tough to get running on Windows as it was more a *nix development tool chain but I am taking up the challenge to get it to work with lots of Google searches and the ever present StackOverflow (now its my chance to ask questions). The environment is as follows:

  1. IDE – started with RubyMine for Jetbrains (http://www.jetbrains.com/ruby/) with a 30 day evaluation, then I will see what happens next
  2. Rails Installer by Engine Yard (http://railsinstaller.org/) – the smoothest way to get Rails up and running. The strange thing is that I am using Ruby 1.8.7 as that’s the version being used by an opensource project I would like to contribute to … so well why not stay behind and do some good while I am at it
  3. Ruby on Rails Tutorial (http://ruby.railstutorial.org) by Micheal Hartl free online resouce
  4. Stack Overflow (http://stackoverflow.com) – Q&A site most of the issues that I face have already been solved
  5. Git – needed a private repo so ended up at BitBucket (http://bitbucket.org) by Altassian. Having little knowledge of Git too, and having a lot of problems setting it up I downloaded SourceTree (http://www.sourcetreeapp.com)
  6. Ruby Gems – pre-built functionality

Now in the process of moving the dev environment to a Mac … However after trying to install the different pieces alone, I was advised to use Home Brew (http://mxcl.github.io/homebrew/) following the instructions at http://bit.ly/114X2x1

Part II coming up soon ….

Mac Conversion for Windows Guy – Baby Steps

Ha ha ha, most would balk at the thought, have I gone over to the dark side? Have I lost my mind or has the evil empire taken control over me? Many would ask other would run scared to the hills, but well I have decided to make the switch mainly because of the battery life … My last laptop was a 17″ HP Envy 3D – a beast of a machine not very field friendly I think I developed a hunchback lugging it around, and abysmal battery life (what do you expect from a desktop replacement), quad core, 8GB RAM, 17″ screen, and hot as hell.

Many of my friends and collegues have made the switch bragging to me that once you go Mac u never go back… So he not being one who balks away at a challenge I made the jump to a Macbook air… So here is my story actually my 2-3 week journey all summarized …

Unpacking, the box was slim and lightweight … The packaging was I should say magnificent (black) and the air stood out. Only the laptop, and power cables … that’s all! I was stumped so simple ….

Starting up was smooth I was asked for a language, my contact details, whether I wanted icloud and how to use the trackpad. The trackpad was a little bit of trouble since was I was used to click and drag, yet the trackball requires using one or two fingers in a specific direction. I am still getting the hang of it but its impressive that I can get more without having to revert to the mouse.

Having used Windows from the venerable 3.1 (oh yes that old) through 3.1.1 (Windows for Workgroups) then 95, 95 Second Edition via 98 missed the Millenium train landed on Windows 2000 the best release yet. It was a big push to XP but an easier migration to Windows 7 when for the first time a newer version required less resources than an older version. I missed Vista thankfully and not sure if I will go 8, but the jury is still out on that one. I am finding that Mac OS is more like my Android smartphone so it may not be as difficult as I think it will be.

So next step was installing apps, my list is old fashioned but here goes:

  1. Google Chrome – oh yes the beauty is that I can sync directly with my personal Windows laptop
  2. Skype – who does not use it
  3. MS Office for Mac 2011 – I am an MS Outlook super-user without it I feel lost.
  4. Macintosh Explorer (http://www.ragesw.com/products/explorer.html) as a compliment to Finder which is very hard to use, no way to navigate outside system defined folders

The next step was to sync the Google Calendars (both personal and work) with my MS Outlook without needing to use ICal, as I would love to track everything in MS Outlook on the Mac, Windows and my Android smartphone, so that I can create events anywhere and have them auto synced.

I have to say that the battery life is really not overrated, it is goooddd!!! 1.5 hours on using a full charge and I have used 23% of my battery which means I can safely push 6 – 8 hours of power usage, which to me does not make me hostage to a power outlet …

The Air also has a 256GB SSD which provides an almost immediate bootup, and many times I am shocked when I restart whether I did so and usually do it a second time just to be sure.

The trackpad is the most amazing productivity aspect, by using a combination of 2 or 3 fingers, I can access anything and I mean any dashboard, scroll, zoom, slide between windows and apps (I still have to learn many of them though). I now find myself trying to use the gestures on my Windows laptop … so the brain is still in a state of limbo …

The user interface while not so alien needs some getting used to as I am currently getting confused when moving between Windows and Mac …

Please do share your experiences too …

Uganda Simcard Registration – Alternate Approach

By now all of you know that the mandatory simcard registration by Uganda Communications Commission (UCC) has gone naught, died a natural death like most Ugandan projects, a white elephant dead on conception. Sam Agona (http://www.samagona.org/?p=14) hit on the nail why UCC could not enforce its threat.

The approach I am proposing has the following strategic objectives:

  • Simplifying the process for the customer not the telecom providers
  • Centralized registration for telcos while segregating the data for each telco (Do I smell Number Portability ahead)
  • The minimum registration information for each telco is the same while allowing for each  telco to collect more data as may be required

The high-level architecture is as follows:

  • The telcos form a joint venture to manage the centralized registration system to keep it away from government to cater for privacy concerns, which can be mandated by the regulator or paid for from telco contributions to the regulator development fund 
  • Each telco pays based on the number of simcards registered – they are already paying agents a commission to register users anyway
  • The data for the subscribers for each telco are segreagated from each other but a user can access their registration information across the different telcos (technically this is no-longer a deal breaker)
  • A single set of mobile applications is used to register the customers – with each telco having an option to customize and brand the application for its own use
  • A unique sim-card registration number that’s only useable within this system, similar to the Financial Card Number for the credit reference bureau
  • Ability for a customer to add more simcards to their portfolio, does not have to be online or automated, but without the need for submitting all the documentation all over again
  • Support for business customers to register and maintain simcards (this also needs to be looked into as it can be used to circumvent why the registration was done in the first place
  • REQUIRED: An interface (not necessarily automated) to validate “official” documents like:
    • Passport – for Ugandans at least via Ministry of Internal Affairs
    • Drivers Licenses – Face Technologies – they already have tablets for Police to verify validity
    • NSSF Cards – okay I know these are not available but they took my photos and biometric
    • Corporation IDs (I am not sure how this would work since there are many briefcase companies abound)
    • Voter Registration cards – Electoral Commission?
    • Corporate Registration – Uganda Registration Services Bureau and Uganda Revenue Authority (TIN/VAT numbers)

The next question is who pays for the operations of this center which may be an annual service fee for the telcos based on the numbers of simcards maintained with fees for addition and removal of simcards,  ”accurate and timely statistics” on Uganda mobile telco industry.

What are your thoughts? What else could be added?

Guide to Verifying Simcard Registration in Uganda

On March 5, 2012, Uganda Communications Commission (UCC) launched a simcard registration exercise see my coverage at http://wp.me/pXn3W-4H. On February 28, 2013, all un-registered simcards will be switched off by the telecom providers so there is a concerted push to register the simcards. Estimates put registration at about 50%, but that number is to be put to the test at the end of the month.

This simple guide is to enable you to check for your registration (operators in alphabetical order)

  1. Airtel – *205#
    • Response – SMS Message from KYC with text “Dear NAMES 075XXXXXXX,your Airtel Simcard has been sucessfully registered. You can now also send and receive Airtel Money”
  2. MTN  - *140*3*2*1# and *197#
    • Thank you NAMES your simcard is registered…
  3. Orange Uganda - *197#
    • Response -You have successfully registered 079xxxxxxx in the names of NAMES
  4. Smile Telecom – not offering mobile cellular services, all Internet customers are registered on signup
  5. Uganda Telecom – *123#
    • Response – Dear NAMES, your number 071XXXXXXX is now fully registered with Uganda Telecom. It’s all about you. Proudly Ugandan. Your profile is: PROFILENAME
  6. Warid Telecom -  *100*7#
    • Registered Response – SMS message from WeCare with text  ”Your SIM Card is Registered with Warid Telecom

UPDATE: I have just been informed that dialing *197# can be used to check the registration status for any simcard (Thanks to alwangac via I-Network)
UPDATE 2: MTN simcard registration check is now functional

Did I miss anything or did this post help you, let me know

Mara Foundation Business Hackathon Pre-Launch – Startup Reality Check

This was the theme of my presentation at the January 25 pre-launch event for the Business Hackathon event organized by the Mara Foundation (http://www.mara-foundation.org/) and Mara Launch Pad (http://www.mara-foundation.org/entrepreneurship/mara-launchpad.html).

This would be my second hackathon-style event after the Startup Weekend that I had participated in April 2012 (http://wp.me/pXn3W-5v) where I pitched an idea that had been cooking, baking and squirming in my head for a coupla years. When Nigel Ball (@nigel_ball) asked me which side I wanted to be on, I took the opportunity to sit at the end of the table to mentor.

So back to the prelaunch event, assembled were the following (in the order that they presented):

  1. Reinier Battenberg, @batje, Director Mountbatten and Open Source Evangelist, Drupal, mapping et al
  2. James Makumbi, @jmakumbi, Software Developer and Founder of Billable Hours Uganda, a cloud based law firm management solution, and one of the first Ugandan developers on Stack Exchange (my inspiration to join and become active)
  3. Simon Kaheru, @skaheru, Director Business Convergence SMS Media is one of Uganda’s first enterprenurs in the tech scene through SMS Media and a though leader in the mobile technology space
  4. Solomon King, @solomonking, Web Solutions Provider and Founder of Fundibots, a non profit to encourage passionate African children (and adults) grow and experiment with machines, gadgets and technology – do I hear soldering, garage workshops and Sky net development in basements.
  5. Christine Ampaire, @axtine831, Founding Team member MafutaGo, GirlGeek, Geekprenur
  6. Davis Musinguzi, @davisthedoc, Health IT Developer and Enterprenur, Mentor for the WinSenga team that won the Microsoft Imagine Cup in 2012

The first presentation (below) was a reality check on what the enterprenurs are to expect before the event, and after to provide context with regard to what opportunities are out there and what to take advantage of.

 

 

Additional lessons that were given by the other panelists are summarized below:

  1. You do not have to start a business with a product, you can provide services to customers by packaging and supporting existing software solutions 
  2. Tech startups do not have to be about software and hardware, they can provide laptop sleeves, covers, and other accessories using local materials
  3. Look at alternate revenue streams by leveraging the brand and buzz created by your core product or services
  4. Do not be afraid to pivot your business, from Eric Ries of the Lean Startup: Pivot or Reboot (http://to.pbs.org/WaCA9w) or Pivot Do not Jump to a new vision (http://bit.ly/TAFZ36)
  5. Not all the people you pitch to will have the same vision as you do, listen to them, do not give up, learn from them
  6. Leverage and use the simplest technology you can
  7. Use other people’s money, 100% of $1,000 is way less and more risky than 10% of $25,000 investment – watch the numbers, allow investors to let you  grow to sustainable levels
  8. Develop credibility – register a legal entity, track the total cost of ownership to client (licenses, hardware, warranty and support costs), have a person who watches the money (revenue and costs)
  9. You need teams of people to support your vision, you cannot do it alone
  10. Complete your education and take opportunities that arise when they do, those papers “may” help you get to the next level
  11. Get out of the office to the street and into the lives of the people who use your product – listen to them and learn from them

What are your opinions, what did we miss? Leave a comment

Fixing Orange Uganda Modem Issues on Windows

I have been having alot of trouble with my Orange Uganda (http: Modem (Model E173), since my laptop running Windows 7 would not see the modem despite installing Orange Internet Everywhere. I tried installing, un-installing, even had a terse exchange with their support staff via twitter (https://twitter.com/orangeugandaltd/status/290720191099310080) where the only option was for me to take it to their offices for troubleshooting.

After a long search (I am not one to leave problems hanging), I ran into a solution which works for Windows and may provide a starting point for other OSes by replacing the Orange Internet Everywhere software with the latest version of the Huwaei mobile partner and configuring the connection. Steps follow:

  1. Download Huwaei Mobile Partner for Windows (https://www.dropbox.com/s/ma578lpg9816y7b/Mobile_Partner_23_for_windows.zip) – 25MB 
  2. Insert the modem into a USB slot – if you have other service provider applications they may start, but close each one that comes up
  3. Install the Mobile Partner software
  4. Create a new profile for Orange Uganda – use orange.ug as the APN (http://www.orange.ug/mobile-plans/iew-linux.php)
  5. Dial and you are off

Hope this helps somebody else

My first Symfony 2 Web Application – The Journey – Installation

Happy New Year, 2013, its finally here … Well in 2012, I should say I had Symfony 2 envy, almost akin to a high school crush, so after suffering in silence for so long I have finally decided to jump in with both feet.

I am developing a simple website which is esentially a set of utilities for my home country Uganda, and the idea is that I can learn a bit more advanced PHP but also opensource it later to use as a teaching tool for other local developers (oh yes, I want to share my knowledge too). This will also give me the chance to see if I still got it in me because I do not touch code in my day job, akin to Neo in the matrix hacker by night.

So what I have I used, well an evaluation copy of Zend Studio 9 (used to use an older version at my work place), Symfony 2 (latest distribution), Twitter Bootstrap, JQuery, Git (I am using a private Bitbucket repo) and well an open Google tab. My first words are wow!! Alot has changed in the world of PHP since I last used it, Composer, Less, Sass which requires Ruby … But hey here goes

BTW I am running all this through a WAMP (http://www.wampserver.com/en/) install again the fastest I could get things to work, you could use XAMPP too but I have never done so. I am using PHP 5.3.13 with MySQL 5.5 on Windows 7 64bit. One question I may receive: As a newbie why are you going for the whole enchilada (Symfony2, Composer, Bootstrap Integration etc) – since this is a clean break I am trying to also get an understanding of the different tools that have been developed, how to use them and what they mean for the “average” web developer to answer the question – are they worth it?

  1. So first step was installing composer, which I did following the instructions here http://getcomposer.org/doc/01-basic-usage.md after which I installed it globally so that I could call it anywhere following the instructions in the answer http://stackoverflow.com/questions/12059397/is-there-any-way-to-install-composer-globally-on-windows  
  2. Next was to install Git using Git for Windows (http://msysgit.github.com/) needed even for local staging
  3. Being a git newbie, I could not get things to work properly to create the project I followed the workflow below: (I stand to be educated on a better workflow)
    • Created a new Git project on Bitbucket
    • Created a new PHP project from Git within Zend Studio – which gets everything configured well
    • Downloaded the Symfony 2 standard edition and copied the files into the new project
    • Followed the instructions here to commit it …
  4. Integrated Twitter Bootstrap using the Mopa Bootrap Bundle ( https://github.com/phiamo/MopaBootstrapBundle) however this required me to install Ruby for the LESS integration using Ruby gems while I initially run into a couple of problems with the installation of mopa/composer-bridge it was probably a connection issue. Also note the following:
    • Running the composer update command requires a console with administrator privileges to be able to create the symbolic links
    • The lessc.bat file in the Ruby install folder needs to be updated to use absolute paths to ruby.exe other than the relative paths in the file
    • Well after a lot of troubleshooting I found out that the ruby gem for Less was depreacted so I ended up using LessPHP (PHP compiler for less in pure PHP) following the instructions at http://isometriks.com/using-less-with-symfony2

Now the initial installation is done, I have my Symfony2 project running with Twitter Bootstrap integrated, it has been about 10 hours of work, but totally worth it as a learning experience

Follow

Get every new post delivered to your Inbox.

Join 2,423 other followers

%d bloggers like this: