Wednesday, 5 November 2014

My Experience at Garage48 kampala

Garage48 was a hackathon that I attended pretty much one of my first involved hackathons. The hackathon involved pitching ideas, then attendees had to chose which teams to be part of. I pitched an idea and I was lucky to have gotten people to join me to make a team. Thanks to the geniuses Sarah, Benjamin and Kevin because we shared the passsion of the weekend together. The idea we implemented was a software market that uses mobile money as a payment method. We gave it a code name “Macerdo”  which is a spanish word to mean “market”.
After the pitches, the idea owners stood near their chats waiting for people to join them for the next 48 hours. This was the chart for the Macerdo team with stickies bearing the names for the team members.

Mercado-The Uganda software store
Well this session ended and there we were; the count down for the 48 hours began. Where the actual hacking began.
















These 48 hours were the most fun for me. The idea of working with people you just met at the hackathon was so interesting. We brainstormed our scope for the weekend as a team and began hacking. We all and by all I mean all of us on the team worked so hard to have the macerdo product in the 48 hours. These hours were full of passion,hardwork and fun  because we looked at it as a time for us to make history. I think of all the code I have ever written , I value the code I wrote during this time because you had to look for the fasted solution for the problems you were to solve in order to have a viable product in the 48 hours.

What stood out most for me was not the product we came up with at the end. It was the fact that people that just met for those few hours could cooperate and actually have such milestones.This was epic.During these few hours we did not have time to focus  attention on our diffrences as a team but our focus was on the product we wanted to have. It was more than passion because different team members even switched to roles they were not familiar with just to deliver this was even good because they learnt something new as they switched to those unconfortable roles. Not only did we learn how to work in different roles , we also interfaced new technologies ; some team members got to learn how to work with sinatra since it was their first time to use it. As if that was not enough we even spent the whole saturday night hacking to get our product done. Now personally if my mum heard I slept in a code lab hacking; she will confiscate my laptop  for atleast a week to teach me a lesson.If you are reading this dont tell her am not in the moods of not having my computer for a week.

There was generally a lot to learn from the hackathon from technical skills all the way to the entrepreneual skills. I learnt how  to pitch an idea ; this has never been fun for me but now I feel the next time am called upon to pitch I will be glad to. We learnt that software is built for the people and if you want them to enjoy using your software ; then you have to talk to them as you develop to get feedback that helps in improving the product; even in those few hours we had to talk to the people who are potential users for the products we built. This has really shaped my operations after the event. I have made a schedule to meet some relevant people to the projects am working on.

We also learnt how to market and used this skill perfectly to create publicity for our product infact , we beat all the teams at the hackathon in marketing because we had the most likes. In otherwards we were the most liked team during garage48 kampala by the public. If you doubt this we have proof.















Special thanks to the garage48 team and all its sponsors for such a resourceful event we cant thank you more.

Monday, 20 October 2014

An Inspiration from Lady Ada Lovelace

On 15th October  every year is Ada Lovelace day and on this day different people in computing especially women celebrate and talk about the women in STEM whose work they admire like  Lady Ada Lovelace as a role model in computer programming. For those of you who do not know her ; Ada Lovelace is widely held to have been the first computer programmer. Close friends with inventor Charles Babbage, Lovelace was intrigued by his Analytical Engine and in 1842, she translated a description of it by italian mathematician Luigi Menabrea. Babbage asked her to expand the article, “as she understood it so well”, and this was when she wrote several early ‘computer programs’. Ada Lovelace died of cancer at 36, her potential tragically unfulfilled.There is a programming language named after her called Ada.

As I celebrate this figure every year , first I celebrate her like other famous ladies in STEM like Grace Hopper among others because she is a lady that is one of my role models not only to me but many ladies in this world. Secondly I celebrate her because she was a genius of her time. Thirdly and most important of all because she used most of her opportunity to make such great history that many people still recognize her contribution to computing.

During her time she was not the only smart person or even the smartest but when an opportunity came to pioneer computer programming she made good use of it and I am sure if she had waited for more worthy people to take up the challenge; we would probably never have had a chance to remember her for any thing. This would mean that she would never have people like me and other women in STEM looking at her as a role model. I  was not there but one thing is certain she put a lot of effort and determination to pioneer such a contribution that people embraced and still remember her for.

As we celebrate these people let us also follow in their foot steps so that if they came back to life by mistake they would say wow there are some smart people that used their opportunities after us. I would not love Ada Lovelace or Grace Hopper to come back by mistake to life and say .. “I cant believe no genius lived after me”... at least they will find me.

Therefore as we remember the women whose contribution to STEM is worth admiring let us remember to borrow a leaf from them so that we can come up with work worth admiring.

Are you willing to be the next Ada Lovelace of our time !!!!!! me I am.

Wednesday, 8 October 2014

There is a Window for innovations

Have you been part of a team or network ;then you share an idea with them but everyone goes like “that is too big for us to achieve". Many people decide to believe their team but I think this is more reason to say ..get behind me Satan. There are many innovations that would not have been implemented if it were not for people who refused to fall for such advice; many of them decided to go solo so as to achieve their goals and they made history. The world of innovators is full of them.The others that decide to give up soon  find out  that their ideas have been implemented by some one else. Someone once said that (paraphrasing) ...implement then get approval later...this is the way to go. When you get an idea remember ....

For any idea you think of implementing there is a window of innovation that opens for you but if you don’t implement the idea because of excuses like it is too radical  the window will close for you and the same window will open for some one else who is ready to make history.

Every idea for innovation we get is an opportunity to make history but the question remains are you ready to make it.....

Thursday, 21 August 2014

Something stackoverflow geeks dont know.

 I have used stack overflow for afew months.This site was started to act as a platform for programming Q and A. The site is doing great save for some pot holes and if you bump into one it really sucks...

To those that down vote peoples questions and answers some times with funny reasons first know that there is always a beginning for every thing especially to noobs. I would rather you first offer a solution before you jot all that criticism you comment on people's questions and answers. No wonder some claim the person asking does not have  clear knowledge of the subject.Remember no one can ask a question unless they dont have the answer.Questions are challenges and if instead of offering a solution you want to show how mean you can be shame on you...That is uncultured hubris and for me thats a luxury I will never afford.

" Real geeks just solve problems they do not just wave their hands and whine about the problem they are trying to solve" 





Tuesday, 19 August 2014

Design Patterns in Ruby.

The life of a software developer involves dealing with complex problems during their operations. The first time  a developer confronts a problem he/she improvises a solution but when the same problem occurs often then there is need to come up with a stardard operating procedure to cover it. Thats what design patterns are for.

From wikipedia's definition ; 

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into source or machine code.

In this post I will give a brief background on a pattern and show its implementation in ruby.I hope you will be able to judge when to use the patterns during your operations.

I will keep updating this post each day with a new pattern(GoF patterns) because posting all of them at once needs alot of time so I will do it in bits.

Singleton Pattern

This pattern is useful when you want to make sure that a class has only one instance and you need to have a global access to it.The singleton module in ruby library can be used to implement this pattern. 

require 'singleton'

class SingletonClass
  include Singleton

  def initialize
    @file = File.open("log.txt", "a")
  end

  def show(content)
    @file.puts(content)
  end
end



Template Method Pattern

The template pattern is useful when you have a method whose algorithm varies as you will see in the example.The idea behind a template pattern is that you have a base class which contains abstract methods(also called template methods) that  the concrete subclasses  will  implement.You can then pick the variation you want by selecting one of the concrete subclasses.


class Good

    def basic_tax(cost)
        raise 'Called abstract method: basic_tax'
    end   
end

class TaxedGood < Good
    TaxRate = (10.00/100)
   
   
    def basic_tax(cost)

        tax = TaxRate * cost
        return tax.round(2)

    end

end

class ExemptedGood < Good
    def basic_tax(cost)
        tax = 0.0
        return tax
    end

end


You can then pick a variation by picking one of the concrete subclasses like this

tax = TaxedGood.new
tax.basic_tax(400)


or

tax = ExemptedGood.new
tax.basic_tax(400)



Strategy Pattern

The Strategy pattern is similar to the template pattern only that it works on the principle of delegation and provides for run time flexibility since we make our decision by selecting a strategy at runtime. The idea behind the strategy pattern is to define objects (also refered to as strategies by the GoF) with similar methods in our example basic_tax; and have them support exactly the same interface(called a strategy by the GoF).Then we define a class(refered to as the context by the GoF) that uses the strategy to treat the strategies like interchangeable parts(since from the outside they look the same as they support the same interface).we make our decision by selecting one of the objects(strategies) at runtime.

class Good

    def basic_tax(cost)
        raise 'Called abstract method: basic_tax'
    end

   
end

class TaxedGood < Good
    TaxRate = (10.00/100)
    def basic_tax(cost)

        tax = TaxRate * cost
        return tax.round(2)
    end

end

class ExemptedGood < Good
    def basic_tax(cost)
        tax = 0.0
        return tax
    end

end

class Context
    attr_accessor :good
    def initialize (good)
        @good = good
    end

    def basic_tax(cost)
        puts "#{good.basic_tax(cost)}"
    end
end


You can then pick a strategy at runtime like this

tax = Context.new(TaxedGood.new)
tax.basic_tax(500)


or

tax = Context.new(ExemptedGood.new)
tax.basic_tax(500)


Interator Pattern

This is a technique that allows an aggregate object to provide the outside world with a way to access its
collection of sub-objects sequentially without exposing its underlying represenation.

In ruby the iterator pattern is implemented in two flavours;
- External iterators.
- Internal iterators.

Internal Iterator

def for_each_element(array)
    i = 0
    while i < array.length
    yield(array[i])
    i += 1
    end
end

a = [10, 20, 30]
for_each_element(a) {|element| puts("The element is #{element}")}


External Iterator

array = ["joan","sheena","gigi"]

i = ArrayIterator.new(array)

while i.has_next?

    puts "item : #{i.next_item}"
   
end

Tuesday, 29 July 2014

Jesus saves , We should backup.

I came across the quote " Jesus saves , the rest should backup" during my early days at university.At first It just was some funny quote I had ever come across but recently I got some wisdom out of it.

From the computing perspective saving something is keeping a copy of some piece of data or anything that is and will be of value to you even in the future and to backup is to make sure you safe guard what you saved so you never loose it.

In the same way as a Christian,Jesus reconciled us to God and gave us salvation. We got this salvation at a big price of his blood at the cross.By the way it was not any of our idea the bible says before we loved him he loved us. He thought of this salvation for us before we even chose to accept him as Lord of our lives.

Now since we have come and accepted the salvation that Christ gave us we aught to guard it (backup it up) so we may not loose it until Christ comes for us . As Paul writes and says

Therefore, my dear friends, as you have always obeyed--not only in my presence, but now much more in my absence--continue to work out your salvation with fear and trembling, Philippians 2:12



 In my view ,whosoever works out their salvation with fear and trembling values the salvation that he or she attained through Christ. Do you value your salvation?

Christ has done his once and for all sacrifice for our salvation its now our turn to respond with respect and value to what he did for us at Calvary by guarding the salvation that he gave us.

11 And do this, understanding the present time: The hour has already come for you to wake up from your slumber, because our salvation is nearer now than when we first believed. 12 The night is nearly over; the day is almost here. So let us put aside the deeds of darkness and put on the armor of light. 13 Let us behave decently, as in the daytime, not in carousing and drunkenness, not in sexual immorality and debauchery, not in dissension and jealousy. 14 Rather, clothe yourselves with the Lord Jesus Christ, and do not think about how to gratify the desires of the flesh.[aRomans 13:11-14


Wednesday, 9 July 2014

A piece worth a thought.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus

Ugandan Telecoms: Were you ready for this Simcard Re-registration Ocassion!!!!

There was a recent directive from Uganda communications commission calling upon Ugandans to re-register their simcards this time using thei...