Search This Blog

Saturday 31 March 2012

Getting the tools specific to Android Programming

If you have been following my blog, then by now you have downloaded Eclipse and you have either learnt or already knew Java programming.

Despite me not telling you to (Sorry about that!), you will also have downloaded the JDK (Java Development Kit).  The JDK is different to the JRE (Java Runtime Environment), the JRE is sufficient if you only want to run Java programs - however if you want to develop  Java programs then you need the JDK.

In order to program for Android you need to download a couple more tools in addition to Eclipse.  You must download the Android SDK (Software Development Kit) and the ADT Plugin for eclipse.

The following website contains advice on installing and configuring the Android SDK and the ADT Plugin.

http://developer.android.com/sdk/installing.html

The Android Developer website the above link takes you to is well worth exploring.  For now go and get the necessary tools and explore the Android Developers website.  We will meet here again  to start doing some Android programming.

Wednesday 28 March 2012

Mastering the basics

I know that some of you more experienced programmers will be keen to get started with Android programming.  I will do one or two more posts for the complete beginners before sending them off to acquire the required java skills.  The rest of us can then continue on our Android journey and the beginners can catch up.

So you have now downloaded eclipse - what next.  In Eclipse you should find a hello world tutorial.  Try following this (It is traditional for the first program to be the hello world program).  Also spend a bit of time just playing with Eclipse and looking at some of the introductory sections of the help.

Then try searching the internet for 'java tutorials for beginners'.  Work through some or these tutorials.  So far you have not spent a penny.  At this stage you may want to invest in a java book for beginners, alternatively you could borrow one from the library.  I usually go for books like 'java for dummies' or 'learn java in 24 hours'.  I find that these books are an easy read and the chapters are in manageable chunks.  Take your time working through a beginners book, you will need a sound grasp of the basics before you start Android programming.

When working through a book it is a good idea to know what concepts you are trying to learn.  You need to develop an understanding of the following concepts:

If Statements
Loops (for, do, while)
Data types (Integers, doubles, strings)
Structures and Arrays
Writing functions

More advanced concepts that you will need to master include:

Classes
Objects
Inheritance, Encapsulation, Polymorphism.

This is not an exhaustive list of concepts.

Programming skills require practice.  In order to practice your newly acquired programming skills try and come up with a few projects for your self.  Use your book and the internet to complete your project.

The projects don't need to be complex.  For example to practice loops you could write a program which asks the user to enter a number.  The program could then loop that number of times, writing 'I love you' to the screen that many times (Just be careful about who you ask to test this program).  Another project to practice if statements may involve randomly generating a 3 digit number and then asking the user to guess it.  An if statement would be used to test if the user entered number is greater than or less than the generated number.  The program would loop providing appropriate feedback to the user until the number was guessed.

The basic concepts that you learn are common to all programming languages, only the syntax changes.

You will also need to learn how to debug programs.  This will involve understanding breakpoints, stepping through code and watching variables.  Play about with Eclipse to see if you can work out how to do this.

Now go and learn java.  Good luck, remember Google is your friend - however if you can't find the answer to your question via Google, then feel free to post it on this blog (You can use comments to post questions).  I will do my best to answer the question, if I can't answer it then I am sure somebody out there will be able to.  Also any general feedback that you want to give me will be greatly appreciated.

Enjoy learning java, until next time - Good bye

Saturday 24 March 2012

Knowledge and Tools of the trade

I want this blog to be all inclusive, which means catering for the complete beginner (I'm talking about complete beginners to programming and not just Android).

So what does a complete beginner need.  It goes without saying that you need access to a computer or laptop.

The next question to consider is which programming language to learn.  Take it from somebody that has worked with numerous programming languages over the years, once you know the basics of programming in one language then picking up a new language becomes relatively simple.

If you are a complete beginner then I would begin your programming career by learning java, because this is the language we will be using to write Android apps.

Different people learn in different ways.  The way I learn is by doing, so my advice to you is get the tools needed together and get programming.  You will not master programming by reading a java book from start to finish.  There is a place for books but that comes later.

So what tools do you need.  Download Eclipse once you have finished reading this post.  Eclipse is an Integrated Development Environment that you need in order to write code, it is free to download.  Eclipse is the main tool you need to write Java programs and Android applications.

Where do you download Eclipse from?  Remember Google is your friend.  I could tell you where to find Eclipse but you need to start using the internet to find solutions - you will never know all the answers your self.

Go get Eclipse now and then come back for the next installment for advice on how to progress.

Google is your friend

Google is your friend - This is a lesson that I have learned over the years.  When I don't know how to do something or can't remember how to do something whilst coding, a quick search of the internet usually gives me the answer.

The Google is your friend advice is also applicable to Android development in more ways than one.  For a long time I had an aspiration of developing educational software, being a Software Engineer though, I did not want to develop hardware on which to run my software.  What Google has done with Android is given me an interface to numerous different devices running Android.  These devices can host my applications.  Google has also provided me with a world wide market through the Android market.

My aspiration of developing educational software included the desire to make it available for free.  However I did want some compensation for my efforts, again Google comes to the rescue with Admobs and Adsense - These two methods allow me to add adverts to my apps and blogs respectively, which in time will hopefully generate me some revenue.

It's the weekend so I have more time, so the next installment will be soon.  It will cover how I got hold of the tools needed for Android development and how I got started with my first app.  In the mean time, if you want to check out my first app then search the Android market for Sundev Pabla.  I know the app is simple and limited on functionality - however I believe in getting a product to market quickly and then progressively increasing its functionality with upgrades.  Take care, I will be back soon.

Thursday 22 March 2012

Welcome

I believe that its important for you to know a little bit about me so that you can make an informed decision about whether or not you wish to follow me.  So here goes....

I graduated from Loughborough University in 2000 as an Engineer.  I then spent another year at Loughborough doing a P.G.C.E (Teacher training - by the end of the course the kids had persuaded me that teaching was not for me).

I  am now a Chartered Engineer with 10 years plus experience of working as a Systems / Software engineer.   I have worked right through the development life cycle from requirements analysis on major international bids, to design, development, integration and delivery of big software and systems projects for large multinational companies.

I have experience of programming in FORTRAN, matlab, c++,ADA, VB.net, C#, JAVA and probably other languages that I can't recall. 

I recently started developing Android apps and have published my first app on the Android market.  I am by no means an Android expert, but I want to share my experiences to date.  I also want you to join me on the next part of my Android journey.  I will try to blog as regularly as I can, sharing tips, giving advice, warning of pit falls.  I will also be wanting to learn from you, so please don't just read my blog, provide comments, ask questions, give me advice and if you think I have got it wrong then please shout.

That's all for now.  The aim of today was to introduce my self. In the next installment, I will discuss my Android experiences to date.  Take care until next time.