Saturday 20 February 2016

Android Development for Everyday People - Introduction

Hello,

Welcome to Android Development for Everyday People. This course is designed for anyone with an idea for an application who doesn't know how to program. I assume that you have a laptop and can use the computer reasonably well. Beyond that, know this anyone can learn how to program. A background in engineering or science is not required. Patience, practice, and an interest in the subject matter should suffice, along with the required software and hardware.

On the software end, you have everything you need. We will be using a cloud based application called App Inventor so there is nothing new to install. I only ask that you use a modern browser like Google Chrome or Opera.

I started this course as a way to teach absolute beginners how to program without having the obstacle of learning how to code. Mobile applications were chosen as the focus because there is nothing more satisfying that seeing an application that you have created being used by someone else. The future is mobile and by taking this step, you are getting into an exciting time in history.


In the last quarter of 2008, the Android operating system launched. Today in 2016, Android is the number 1 mobile operating system in the world. The continued growth of Android is assured so learning how to create mobile applications means that you will be relevant in the future of technology as a creator not as a consumer.

In the early days, developing a mobile application involved programming in Java. This made the development of Android applications exclusive to programmers. Google introduced App Inventor as a way to democratize app development for non-programmers.

In 2015, the Android One device would be launched in Nigeria. This represents an attempt at making smartphones available for a new generation of users. Coming in at under $100, it is the first attempt to replace feature phones by smartphones through the elimination of the price barrier.

When the Android One device was launched, the realization hit me that a new wave of users would be entering the mobile computing era. For most of them, their mobile device will be their primary means of accessing the internet. This presents an unprecedented opportunity.

However, I was struck by the fact that despite the fact that a new generation of users would be coming on-board, the next generation of programmers would not be able to catch up. This is because for the Android platform, Java is the main programming language.

Java has a reputation of being hard to learn and for me it is. That said, it was once the darling of the industry and the typical Java programmer trained in the last decade. The next generation developer doesn’t have the time to scale that learning curve in order to create mobile applications.


Today in technology, virtually every niche now has tools to simplify your work. If you want a website, you don’t need to write a line of code. All you need is to use a CMS like WordPress. For game development, we have game engines like Unity that make the entire process of creating a game easier and more efficient than it was in the last decade.

For application development today, depending on the route you want to take, there is a tool for you. If you are a web developer with a strong knowledge of HTML, CSS and JavaScript, you could use PhoneGap. For a Python programmer, Kivy is coming on strong. For non-programmers, there are a lot of cloud based services that make the process of application development easy. For our purposes, we shall be using App Inventor which runs in the cloud

For some time in the past only highly technical people could set up blogs and wikis. Then tools like WordPress, Blogger and Google Sites transformed things so that anyone could create a blog or wiki. I see App Inventor doing the same thing — it’s going to allow all types of people, not just the techies — to create apps for this incredible new mobile world.

With App Inventor, if you can imagine it, you can create it. Using this free, friendly tool, you can decide what you want your app to do and then click together colorful jigsaw-puzzle blocks to make it happen. App Inventor turns your project into an Android app that you can test on your computer, run on your phone, share with your friends, and even sell in the Google Play store.


Cloud means that you run on the platform through a browser with nothing to download. It is done this way because of the assumption that anyone who doesn’t know how to program might not have the technical skills to set up his machine for application development so why bother that individual. Knowing what I know about setting up your programming environments for certain platforms, I totally agree.


Today if you have an idea for a mobile application, all you need to do is to get a solid internet connection and you are on your way. App Inventor is a visual programming environment that allows you create mobile applications for the Android platform using Lego like blocks. The blocks are constructs for the functions you want to use.

It is cloud based hence the need for a solid internet connection. But this is a small price to pay for creating the idea you have in mind. At a minimum, learning App Inventor would enable you to prototype your idea and then hand it over to a developer for serious rework when your idea gains traction.

The cost of following this workflow is a lot easier than having to describe your idea to a programmer and have him create it from scratch. Trust me on this the average programmer has a little arrogance in him/her and nothing fuels that arrogance than a client that hasn’t done his/her homework.


In my time as a programmer, I have met all sorts of clients. The most annoying ones were the ones who wanted you to read their minds. Nothing gains a programmer’s respect like preparation and the best preparation is having an application that you have developed being discussed with a programmer for the improvements you want.


What You Can Do With App Inventor

Using App Inventor, you can create:

1.      Games
2.      Sensor Enabled Apps
3.      SMS Apps
4.      Educational Apps
5.      Social Apps

With App Inventor, the only limit is your imagination. If you can dream it, you can do it.

Abstraction

A critical concept in programming is abstraction. Abstraction is a reduction in the level of detail to allow a grasp of the relevant information. An example of this is a map. A map is a representation of an actual physical space but in order to really represent it, all we do is take the portions we are interested in and ignore the rest.

App Inventor allows us to use an abstraction of programming constructs to create and develop mobile applications. This shortcut makes it easier to create a mobile application.

Don’t miss the point to all of this. You are still programming. However, you are not coding. Programming is about getting the computer to do what you want it to do. This means you have to give the computer instructions.

With coding you would have to figure out your instructions as well as create the constructs for them. By using already available constructs in App Inventor, you make the process of creating mobile applications easier.

It is important to note that the computer is a machine. The acronym GIGO (Garbage In, Garbage Out) covers this. For the computer to accurately execute you instructions, you need to give in unambiguous instructions.

A set of unambiguous instructions to carry out a task is called an algorithm. Note the emphasis on unambiguous because the instructions must be specific and exact. As human beings we tend to make a lot of assumptions whenever we issue instructions.

Part of the difficulty in programming is that we have to explicitly describe what we want to do to the computer. The sequence of steps that accomplish this exactly are called an algorithm.

In truth creating an algorithm is the hardest part of programming. Once you have created your algorithm, writing the code to do execute it is much easier. Thankfully with App Inventor, there is no need to write code. Just assemble your constructs.

Algorithms

An algorithm is a set of specific steps that you can follow to solve a problem. I specifically mention steps because in truth algorithms apply to everyday life.

Below is an algorithm to find the average of 3 numbers.
  1.      Set a running total to 0.
  2.     Add the first number to the running total.
  3.     Add the second number to the running total.
  4.     Add the third number to the running total.
  5.     Divide the running total by 3.
  6.     The result is the average of the 3 numbers.
If you followed this algorithm without deviation, you would always get the average of 3 numbers. You don’t need a computer to execute the above algorithm; you can do it by hand.

Algorithms surround us. Cooking is one area where algorithms abound. Following a recipe to cook a particular meal is the same as executing an algorithm on a computer.

For example if you are a Nigerian, you should be familiar with this algorithm:
  1. Empty INDOMIE noodles into 550cc (approx. 21/3  glasses) of boiling water and simmer for 3 minutes then turn noodles to the other side.
  2. Add seasoning and chilli powder, to your taste and stir occasionally. Cook until the water is almost dried up.
  3. Your delicious noodles is ready to be served. For soup style, prepare with 650cc (approx. 21/2 glasses) of water.

These are the steps to cooking Indomie noodles. I found them at the back of the wrapper. To be clear, following the instructions in this case requires certain assumptions. The assumptions of a source of heat for cooking is one of them. Can you think of any other?

If we deviate from the above steps in any way, the result would be different. The same goes for Spagetti. All Spagetti packs come with instructions. Deviation in any way would lead to a different set of results.

When programming a computer however, we have no room to make such assumptions. We must give clear instructions to the computer. This is where programming becomes hard. If you are a first time programmer, your whole life before now, you have made assumptions in your thought process. Programming will force you to unlearn that habit.

Programming

When we decide to program, we are making a decision to express an algorithm in a form that the computer can understand. Normally, we would have to write code. But with App Inventor, all we have to do is assemble constructs that implement our algorithm.

If we decided to write a program for our 3 Number Average algorithm, our first decision would be how to get input from the user.

The IPO concept is useful in understanding this. The I stands for input, P stands for process while O stands for output.

In making a decision on how we are to receive input, the environment in which the application will run must be considered. This is because the context of the application determines what kind of user interface we would design.

Processing is generally hidden from the user so there isn’t much to say on this point. I will add that the average mobile phone today is more powerful than anything in the world 50 years ago so you are covered here.

For output, once again the environment you are running on will determine how your results will be presented to the user.

We will look at how to create this as a program in App Inventor as the course begins. It is going to be our first mobile application. I hope you make it back next week.

The Road Ahead

I sincerely congratulate you on deciding to learn how to program visually. If this is your first time programming I would say that you are in luck. This year marks my 11th year as a programmer.


I think back to how I started and then the choices were between Visual Basic and C++. Majority of us who chose Visual Basic as our first programming languages are still programming whereas those who chose C++ dropped out.

I don’t state this to brag but in reality, how you start determines if you will last. You are starting programming at one of its easiest entry points.

Drag and drop programming is the easiest way I know to learn programming. However, don’t let its simplicity make you think that you are not learning anything.

If you decide to stick with me, I will teach you how to think like a programmer. And if you stick around to the end, you will wonder how you lived your life before this time.

Programming opens up a world of possibilities to you and it is my joy to share this with you. I assume you are above the age of eighteen because learning online requires a degree of self motivation. It helps if you are mature.

We will start off easy as you learn the needed concepts and when we are done, you will be given guidance on where to go next.

It’s just like learning how to drive. Spend this time with me and learn from me. When you are done, you will be able to go anywhere you want to.

3 comments:

  1. I love your writing style. I was engaged from start to finish. I am a website developer and have to a similar conclusion, that my time is best spent using WordPress than coding a website from scratch. I am now ready to venture into the world of apps development so I am really interested in your course of using app inventor . I'm looking forward to you next post in this series with glee.

    ReplyDelete
  2. Hi

    I love your post very well and am much much interested. I know through your training process I could become an App developer in the nearest future

    ReplyDelete
    Replies
    1. Thank you for your kind words. If you need any help please feel free to ask.

      Delete