The world as we know it now heavily depends on computers, with this comes a great need for professional programmers. However, there are a great community of computer programmers that sole lonely code for fun, extra cash, community or to automate their daily work.
This group of programmers are known as "Hobbyist Programmers". For the large industries and closed source community who believe every piece of code should be sold, do not understand the idea of someone coding for fun or to give back to the community. But this community of programmers are the real hackers as we know it, those whose room window illuminate deep in the middle of the night, those who have sleepless nights and long hours of coding just to make the world a little better and a comfortable place to live in. The Open Source community which is the largest community of programmers consists of hobbyist programmers.
This community makes it possible to have a bunch of documentations, tools, source codes and so much tutorials on the world wide web, it is practically a matter of take and plug nowadays in a matter of developing a computer program or mobile applications.
However, what does it mean for the future of computer programming? is it possible for all of us to learn how to code? what if we are all computer literates and every single one of us can code? who is gonna use your application when everyone can simply make his? how will this change the world that we know and the lifestyle we live?
I will tackle this issues on my next issue, before then, everyone can live a comment below regarding this matter and in the next blog i will discuss my opinion and the opinions left in the comments.
You have successfully found the backdoor into my mind, a hacker (Software Scientist).
Search This Blog
Thursday, January 16, 2014
Friday, January 3, 2014
Conscious or Unconscious dream?
So for the past week i have been having this weird problem with sleep, when i go to bed 3:00 AM, of course with my earphones on and connected to the soundbox, i tend to live within the musics themselves, having something i feel like a dream that goes with the rhythm of the music but at the same time still feeling conscious enough that i actually know what song is playing. It is so weird to me because, before a week ago, when i plug my earphones to sleep, i fall deep asleep after atmost 5 songs.
I wake by 6:00 AM and do whatever it is that i do, feeling as if i haven't slept at night which i am not sure i actually did. By 11:00 - 12:00 AM i feel this strong urge to sleep which i definitely succum to wether i like it or not, sleep till between 5:00 - 7:00 PM where i wake again, work till 3:00 AM and continue the Circle.
The problem is, it seems impossible to break the cycle, for the fact that during the day i can't seem to force myself to stay awake till night time, and during nighttime, i can't force myself to sleep properly, rather finding myself in this realm between being asleep and awake.
Whatever it is, i have a very serious week ahead of me, where i have two major examinations, a couple of coding to do for my work colleague and games to play, yes you heard me right, games. I play games, and not talking about games like Dota or LoL (i play does too sometimes), but games such as CheckIO, some might not see the logic behind solving problems as games, well i do. Also Farmville 2, Candy Crush, Criminal Case and Pet Rescue Saga are so addictive to me, well now i don't like the fact of saying that i am addicted, but rather they are mandatory to my daily living.
I wake by 6:00 AM and do whatever it is that i do, feeling as if i haven't slept at night which i am not sure i actually did. By 11:00 - 12:00 AM i feel this strong urge to sleep which i definitely succum to wether i like it or not, sleep till between 5:00 - 7:00 PM where i wake again, work till 3:00 AM and continue the Circle.
The problem is, it seems impossible to break the cycle, for the fact that during the day i can't seem to force myself to stay awake till night time, and during nighttime, i can't force myself to sleep properly, rather finding myself in this realm between being asleep and awake.
Whatever it is, i have a very serious week ahead of me, where i have two major examinations, a couple of coding to do for my work colleague and games to play, yes you heard me right, games. I play games, and not talking about games like Dota or LoL (i play does too sometimes), but games such as CheckIO, some might not see the logic behind solving problems as games, well i do. Also Farmville 2, Candy Crush, Criminal Case and Pet Rescue Saga are so addictive to me, well now i don't like the fact of saying that i am addicted, but rather they are mandatory to my daily living.
Monday, December 9, 2013
Programming then and Programming now.
I get why people always say programming back in the day was way more difficult than our days now, not all of that is correct. Yes it was difficult to get your hands on documentations and even if you do, you probably have to go through a library of books, even if you managed to do that, it is difficult to get your hands on a terminal, you either had to pay for a time on a time-sharing machine or be part of some computing laboratory to be able to actually program something. Now if all this are managed, writing programs are not so complicated, in the sense that, the programs that are considered cutting edge back then are what we now our days call high school projects, and not much programming languages that you have to stress yourself on learning, only a few existed. No much development standards to adhere to, most of the programs are terminal based, so you don't have to worry about dealing with user interfaces or making your program fancy enough for your users (i.e users back then are mostly computer scientists and mathematicians who are well intelligible and care more about functions than design), and also there are less programs to be your competition, so anyway at all you write your programs, people will still use it.
Now talking about the modern day programming, it is a lot easier for a nine year old to start programming computers, there are lots of materials, documentations, video and even interactive tutorial at anyones disposal on the internet, programming languages are in variety, different types with different paradigms, languages that have been simplified and are much more readable by even someone who has little knowledge on programming. Besides that, there are lots of tools and lots of reuseable codes that someone can easily get his hands on, thanks to the Open Source Community. But having all this at ones disposal will not make that person a good programmer and will definitely not ensure the development of a cutting edge software, now it is fair enough to say that every software have been developed, of course that is not true but to come up with an idea that has never been implemented is nearly impossible. Even if one managed to come up with such an idea, one needs to learn the best and recent technologies used in his/her area of development, implementing to this days standards is way more difficult than it used to be, and trying to develop it in such a way that is sheds a light and shine above all the softwares out there will take months, if not years of sleepless nights of tweaking, debugging and re-coding (depending on the software size). Another point is, back in the day, computing technologies might last for 10-15 years, but this days, technologies change so fast and the field evolve more quickly, to the point that in the lifetime of a software (depending how big) it is possible to tune it to meet 3-4 different generations of technologies.
This analysis is a personal opinion and not meant to start a war between old school and modern developers, but simply to point out that simplicity of software development greatly depends on the perspective and what is put into consideration. Bitching about how hard it is, or stating all the if's will not change anything, so raise your head up, grab a pc and start hacking because before your are able to say "Jack Robinson" someone has put out that idea roaming in your head for quite sometime now and technology has evolved.
Now talking about the modern day programming, it is a lot easier for a nine year old to start programming computers, there are lots of materials, documentations, video and even interactive tutorial at anyones disposal on the internet, programming languages are in variety, different types with different paradigms, languages that have been simplified and are much more readable by even someone who has little knowledge on programming. Besides that, there are lots of tools and lots of reuseable codes that someone can easily get his hands on, thanks to the Open Source Community. But having all this at ones disposal will not make that person a good programmer and will definitely not ensure the development of a cutting edge software, now it is fair enough to say that every software have been developed, of course that is not true but to come up with an idea that has never been implemented is nearly impossible. Even if one managed to come up with such an idea, one needs to learn the best and recent technologies used in his/her area of development, implementing to this days standards is way more difficult than it used to be, and trying to develop it in such a way that is sheds a light and shine above all the softwares out there will take months, if not years of sleepless nights of tweaking, debugging and re-coding (depending on the software size). Another point is, back in the day, computing technologies might last for 10-15 years, but this days, technologies change so fast and the field evolve more quickly, to the point that in the lifetime of a software (depending how big) it is possible to tune it to meet 3-4 different generations of technologies.
This analysis is a personal opinion and not meant to start a war between old school and modern developers, but simply to point out that simplicity of software development greatly depends on the perspective and what is put into consideration. Bitching about how hard it is, or stating all the if's will not change anything, so raise your head up, grab a pc and start hacking because before your are able to say "Jack Robinson" someone has put out that idea roaming in your head for quite sometime now and technology has evolved.
Friday, November 22, 2013
Source Control
Source control also known as version control and revision control have been a great technology for managing the changes in computer programs also allowing multiple developers to work on a project without interrupting each others work. It has been here for a while now and there are numerous distributed model tools are developed for this purpose, tools such as Git, Mercurial, SVK, Codeville, Bitkeeper e.t.c. Though some of this tools are proprietary softwares, Open Source community has provided open version of this tools, the most widely used being Git.
Some of this tools are integrated in a more user friendly environments such as IDE's and Web based application, such as the Git, which makes it easy to create and manage git repositories straight from Eclipse, github.com, bitbucket.org. Personally i make use of the both github and bitbucket to manage my projects.
The idea of version control systems is to keep a sequential record of a file from the first revision to the latest. Programmers usually use the concept of branching to keep parallel stable versions of code. Each developer assigned to work in a feature works on a separate branch of his own, after which sends a pull request and it is then merged into the master after being reviewed allowing multiple developers to work concurrently.
Git works in almost different way than other know VCS's, it specifically treats is data as a set of files and anytime one stores some data or makes changes, git takes a snapshot of the files and saves the reference to it. Also whenever a file is not changed git doesn't store the files again making it a bit more efficient. Git has various workflows; Centralised workflow, Gitflow workflow, Branch workflow and Forking workflow. This workflows are a design way to handle or manage your data, create a branch from master, work on it, merge back to master.
The basic branch workflow involves creating a repository, initialize git with git init, clone the repository with the command git clone [url], do your work in the branch created on your system, add all the files git add * or add the individually git add [file], commit your changes with a comment with git commit -m "comment", and push it to master with git push origin master. Master is the original project history and it is not advised to work on master but on the dedicated feature branch, this avoid the problem of the master containing broken codes.
This is just a summary of Source control with specifics on Git, a more detailed tutorial will be in place in future. A lot of companies use version control for projects and it is advised to learn how they work and work on some yourself as it will serve a great deal when working in teams.
Some of this tools are integrated in a more user friendly environments such as IDE's and Web based application, such as the Git, which makes it easy to create and manage git repositories straight from Eclipse, github.com, bitbucket.org. Personally i make use of the both github and bitbucket to manage my projects.
The idea of version control systems is to keep a sequential record of a file from the first revision to the latest. Programmers usually use the concept of branching to keep parallel stable versions of code. Each developer assigned to work in a feature works on a separate branch of his own, after which sends a pull request and it is then merged into the master after being reviewed allowing multiple developers to work concurrently.
Git works in almost different way than other know VCS's, it specifically treats is data as a set of files and anytime one stores some data or makes changes, git takes a snapshot of the files and saves the reference to it. Also whenever a file is not changed git doesn't store the files again making it a bit more efficient. Git has various workflows; Centralised workflow, Gitflow workflow, Branch workflow and Forking workflow. This workflows are a design way to handle or manage your data, create a branch from master, work on it, merge back to master.
The basic branch workflow involves creating a repository, initialize git with git init, clone the repository with the command git clone [url], do your work in the branch created on your system, add all the files git add * or add the individually git add [file], commit your changes with a comment with git commit -m "comment", and push it to master with git push origin master. Master is the original project history and it is not advised to work on master but on the dedicated feature branch, this avoid the problem of the master containing broken codes.
This is just a summary of Source control with specifics on Git, a more detailed tutorial will be in place in future. A lot of companies use version control for projects and it is advised to learn how they work and work on some yourself as it will serve a great deal when working in teams.
Thursday, October 10, 2013
Building Kivy app to Android apk
Days back i began setting up kivy-python-for-android environment in order to build my kivy app into an android apk, i was faced with alot of difficulties as it is my first time building this. However i accomplished my goal and will share my experience with also difficulties i face and how i was able to solve them.
After developing kivy application, kivy developers have provided a somewhat detailed steps to building an apk. According to the page http://kivy.org/docs/guide/packaging-android.html one needs:
After setting up all the prerequisites, cloning python-for-android repo using git is a pretty smooth process, however the problem arises when trying to build your distribution. The "distribute.sh" script is found in the /path/python-for-android/ directory and runing it as specified in the kivy page might result to an empty /python-for-android/dist/default and no matter what you do, it will continue to be empty
And in this way, if you run the build.py script it will keep throwing some errors like "Error: missing object name for verb "update"" blah blah blah. When you see such an error the way to solve it is:
NOTE: You can simply download the kivy virtual machine, which comes with all the dependencies pre installed, all you need to do is to configure your paths, build your distribution and build your app.
Have fun Hacking....
After developing kivy application, kivy developers have provided a somewhat detailed steps to building an apk. According to the page http://kivy.org/docs/guide/packaging-android.html one needs:
- A Linux system (Virtual machine)
- Java
- Python 2.7
- Jinja2
- Apache Ant and,
- Android SDK
- You need to install android API level 8 or 14 and pretty much any NDK version as i tested.
- Exporting each of the appropriate paths such as the ANDROIDSDK, ANDROIDNDK, ANDROIDNDKVER, ANDROIDAPI, PATH.
After setting up all the prerequisites, cloning python-for-android repo using git is a pretty smooth process, however the problem arises when trying to build your distribution. The "distribute.sh" script is found in the /path/python-for-android/ directory and runing it as specified in the kivy page might result to an empty /python-for-android/dist/default and no matter what you do, it will continue to be empty
And in this way, if you run the build.py script it will keep throwing some errors like "Error: missing object name for verb "update"" blah blah blah. When you see such an error the way to solve it is:
- To simply delete the /dist/ directory
- Run "./distribute.sh -m "kivy""
- Check the /dist/default/ directory if its empty
- If not, you are ready to go.
NOTE: You can simply download the kivy virtual machine, which comes with all the dependencies pre installed, all you need to do is to configure your paths, build your distribution and build your app.
Have fun Hacking....
Wednesday, August 28, 2013
Develop 5 attributes that will help your software projects succeed
Have you ever wondered why there are so many failed projects out there, or why whenever you start a project you lose interest in it and just want to move to the next. Well i am here to give you some reasons "WHY" and "HOW" you can avoid this or at least reduce the rate failures.
Firstly, lets establish the grounds of what a failed project really meant? Most people will agree that, a Software Project is tagged as "FAILED" if:
With this pointers we are ready to draw out the required attributes in order for Software Projects to succeed.
Firstly, lets establish the grounds of what a failed project really meant? Most people will agree that, a Software Project is tagged as "FAILED" if:
- It does not conform to the required specification,
- It is not cost effective (i.e more resources have been allocated to it than its worth )
- It is incomplete due to lost of focus or the inability to control its development due to complexity.
- It took longer time to be delivered and its no more needed or newer technologies have come into play and the used is considered outdated.
With this pointers we are ready to draw out the required attributes in order for Software Projects to succeed.
- Accepting projects within your scope and competence: As i said earlier, a lot of developers take on works that are beyond their competence. This can really be a career ender because one will start working on a project and later realize that he does not have the required skills and in order to acquire the skills, a lot of time will be wasted and in turn failure to deliver product when expected. So i really advice, before you start any project analyze all skills required to work on it, and if you do not have at least 80% of those skills, do not accept it.
- Comprehension of a Project: Most developers do not pay attention to clients when they lay down their specifications of what functionalities they need the software to provide. This is a vital requirement because without fully recognising who the client is and understanding what the client wants, the whole project will be in jeopardy because development will head in a total different direction leading to its failure.
- Knowing the right methodologies and development models to apply: This is a must for every developer, without knowing the right tool for the job, development can really be time consuming, ineffective and waste of resources which will then lead to the project failing. For instance, know when to reinvent the wheel and know when to reuse. Prototyping and incremental development are a very effective methods to apply to development compared to methods such as the waterfall model because, at any instance of time, one has a working product and this can really be a good in terms product delivery and progress measurement.
- Laziness is a Virtue: This was said to me by one of my colleagues, a brilliant mind. Come to think about it, lazy developers tend to be more effective and productive because they are always trying to find ways to minimize workload and this can lead to reuse of already existing tools, finding the most effective yet short approaches to problem solving and reducing the complexity of a system by a large degree.
- Finishing a project before starting the next: A lot of us think we are supermen and can handle multiple projects simultaneously. Even though some succeed in this, it is a really bad idea in terms of lack of concentration leading to increase in development time and the inability to complete either project. It is a really good practice to put time constraints on each project, this will help you to concentrate on everything needed for the development of one project without having to worry about the progress of others. This will help you deliver as much products in short period and also reduce task conflict.
Thursday, August 1, 2013
Recursion: Divide and Conquer method
Recursion by a simple definition is the event when a function contains a call to itself. This method of solving problems as i stated above is the divide and conquer method, we basically take a problem, divide it into smaller segments of it self and solve it mostly using the same algorithm and then combine those solutions back together.
First of all, some will say it is easier to use iteration instead of recursion and sometimes it is more effective since recursion can take a lot of memory and time when it gets too deep. But there are some scenarios and problems such as:
Recursion is your best solution for this type of problems, since it moves from one level to a deeper level till it gets to the root then comes back with or without a result, using a single algorithm that is called over and over again. Writing algorithm for this in an iterative manner can really get complicated.
Of course recursion is not normally easy to comprehend and can be confusing because of the inability to visualize the levels and what happen at each level, but once one understands the concept behind recursion, it is really fun and time saver.
There are two major segments of recursion one needs to know;
this two have to be considered, when to terminate recursion is very important because if it is not dealt with, it can grow and fill the memory until there are no more space causing the system to terminate and also lose of data.
e.g (5! = 5x4x3x2x1). solution in C:
Also another example can be writing a Fibonacci function recursively.
Solution in Python:
Another example can be searching for an element in an array.
Solution in Java:
Leave your comments below if you found this materail to be helpful and ideas on what you will love to see in one of my series. Have fun hacking.
Why is recursion important?
I have asked and been asked this question a lot of times, and i will try to answer to the best of my knowledge.First of all, some will say it is easier to use iteration instead of recursion and sometimes it is more effective since recursion can take a lot of memory and time when it gets too deep. But there are some scenarios and problems such as:
- Iterating through linked list, binary trees, and some other level based data structures.
- Searching games and exploring possible scenarios such as in chess, checkers etc.
- Searching files in different locations in a system (i.e recursion can get to the root)
Recursion is your best solution for this type of problems, since it moves from one level to a deeper level till it gets to the root then comes back with or without a result, using a single algorithm that is called over and over again. Writing algorithm for this in an iterative manner can really get complicated.
Of course recursion is not normally easy to comprehend and can be confusing because of the inability to visualize the levels and what happen at each level, but once one understands the concept behind recursion, it is really fun and time saver.
There are two major segments of recursion one needs to know;
- Termination segment, and
- Call to itself
this two have to be considered, when to terminate recursion is very important because if it is not dealt with, it can grow and fill the memory until there are no more space causing the system to terminate and also lose of data.
Examples:
The most popular problem solved recursively is finding the factorial of a numbere.g (5! = 5x4x3x2x1). solution in C:
int factorial(int number){ //termination segment if(number == 0 || number ==1){ return 1; } //recursion: calling itself in a deeper level if(number > 1){ return number * factorial(number - 1) } }
Also another example can be writing a Fibonacci function recursively.
Solution in Python:
def fibonacci(number): #terminates when number is 1 or 0 returning the number if number < 2: return number #compute the fibonacci sequence else: return (fibonacci(number - 1)+fibonacci(number - 2))
Another example can be searching for an element in an array.
Solution in Java:
// we pass the array, the value to be searched and the// position is returned, initialized to zero public in search(int array[], int value, int position){ if(array[position] == value){ return position; //as long as we have not reach the end //of array, we keep searching } else if(position < array.length){ search(value, position + 1); } // returning -1 when not found, Note: i used -1 because// index of an array starts from 0. return -1; }
Leave your comments below if you found this materail to be helpful and ideas on what you will love to see in one of my series. Have fun hacking.
Subscribe to:
Posts (Atom)