Saturday, October 24, 2015

Developing HTML in Android using Terminal IDE

Using Terminal IDE
In Android systems, Terminal IDE is installed through Google’s play store. After installation, when you launch the application, there are 6 button; Terminal IDE, Keyboard, Install System, options, shutdown and Help. First get acquitted with the help system. Most of the information you need you will find it here. I recommend reading the vim section since you will be spending much time in the vim editor and being acquitted with vim commands is essential.
STEP 1: Click on Terminal IDE
When you click on the Terminal IDE button, you will see a console or the terminal, which will look likes, the below:

Terminal++@105.54.187:~$

By default, terminal IDE comes with 4 terminals. These can be accessed by swiping through the windows. You will notice a black pop-up showing the terminal you are on, one through four.
Step 2: Creating and running HTML
(a)    Creating the directory
Swipe to terminal 1. After the dollar sign ($), type:

$cd ~/sdcard/

It will simply change from the current directory to the sdcard storage. cd is a command to change the working directory. Next, we create a folder where you will store you html code:

$mkdir /progs/
$cd ~/sdcard/progs/

mkdir is a make directory command. In this case, it creates a folder in your sdcard called progs. cd changes the working directory to progs. Make sure that at this point you are using Terminal IDE’s Keyboard. If not, click the back key, select the Keyboard, and set it to Terminal IDE. To go back simply hit the Terminal IDE button. If the keyboard does not appear in the terminal, tap the screen, it should appear. Your terminal should show as below:

:~/sdcard/progs$

This is your working directory. You can get the full path of the directory by typing:

$pwd

pwd is a simple Linux command to print the working directory.
(b)   Creating the files
The next part is to create 3 files: index.html, style.css, and script.js. To achieve this, we begin with the first file by typing the following command on terminal after the dollar sign ($):

$vim index.html

After you press enter, the screen should clear and you should see the vim editor. Press I key (as in India). The status bar at the bottom should now displays (-- INSERT --) in yellow, if not try going through the steps again.
 Now you are ready to type your html code. Type the code as below:

<!DOCTYPE html>
<html lang=en>
<head>
<link href=”style.css” rel=”stylesheet” >
</head>
<title>Test page</title>
<body>
<h1>This is a simple page</h1>
<script src=”script.js” type=”text/javascript”></script>
</body>
</html>

To save click on the escape button (ESC), then press the colon key (:) then w key, and q key and press enter.
To type the CSS code, on the terminal type:

$vim style.css

It will open a blank file in vim. press I key (the status bar should now show ---INSERT). Type the code below:

body {
                background-color:blue;
}

To save click on the escape button (ESC), then press the colon key (:) then w key, and q key and press enter.
Now we write the final file, on the terminal, type:

$vim script.js

On the vim editor, type:

Function myFunction () {
alert(“Javascript is working”);
}
myFunction();

(c)    Running on a browser
To run the html on a browser, open Google chrome. On the navigation bar, type:

file://sdcard/sdcard/index.html

You should see the output displayed on the browser window.

The above is just a simple version, you can create more complex code with Terminal IDE.

CICT past paper Operating System (practicals)

KASNEB
CICT PART 1 SECTION 2
OPERATING SYSTEMS (PRACTICALS)
Wednesday: 30th May 2012
QUESTION ONE
Create a word document named “Question one”. Use the word processor document to save the screenshots created in question (a), (b) and (c) below:
(a)    Ensure there are two user accounts in the computer you are using and that each user account has two running programs. (4 marks).
(b)   Display the processes from all the users (including the two user created in (a) above) showing the following attributes:
(i)                 Image name. (2marks)
(ii)               Process identifier (PID) (2marks)
(iii)             User name (2marks)
(iv)             Session ID (2marks)
Capture and save a screenshot containing the above details.
(c)    (i) Create a schedule task named “open web page” (2marks)
(ii) Configure the task in (c) (i) above to run the Internet Explorer program file after every 3 days at 8:00 a.m. (2marks)
(iii) Configure the scheduled task in (C) (i) above to run only if the user is logged on (2mks)
(v)               Configure the scheduled task in (c) (i) above to stop if it runs unattended for 60 minutes. (2marks).
Capture and save a framed screenshot of the above settings.
Print “Question One” document
(Total: 20marks)
QUESTION TWO
You have been employed as a system administrator of a company running 100 computers on a local area network. On your initial analysis of the computer systems, you realize that the company does not have a standard policy on power saving, security and registry setting among others.
Required:
Create a word processor document named “Question Two”. Use the word processor document to save screenshots that you would capture as you standardize the settings of the computer system in the above company according to the specification in questions (a), (b), and (c) below:
(a)    Save power by configuring the computer system to:
(i)                 Turn off the monitor after 10 idle minutes (2marks)
(ii)               Turn off the hard disk after 30 minutes (2marks)
(iii)             Standby after 20 idle minutes (2marks)
(iv)             Enable hibernation (2marks)
(b)   (i) To display a list of registry permission that could be granted to users of registry information (2marks)
(ii) To configure the following permissions for the system’s root classes information:
·         Power users: allow access but no modification of the registry information
·         Guest users: deny both access and modification (2marks)
(c)    (i) Change locale to “Uganda”  (2marks)
(ii) Configure the input language for the keyboard to be “English-United Kingdom” (2marks)
(iii) Set the digital grouping of threes, running from the right and separated by a comma (,) (2marks)
(v)               Configure the currency symbol to be “sh”

Resize the screenshots in the word processor document “Question Two”, in order to fir not more than two pages of an A4 size printing paper. Print document 

Friday, October 23, 2015

Programming ANDROID, JAVA, HTML, CSS, JAVASCRIPT, C and C++ in Android with terminal IDE



The introduction of smartphone has revolutionized everything, with every passing day people are relying more and more on apps to organize their lives. The advantage to this is that there is diverse applications that will cater for your every need and if not the case, your needs can be catered with little customization. The other benefit of smartphones is their ability to back-up all you documents, setting, contacts, and application via cloud. Unlike earlier days when losing a phone meant starting from scratch searching for contacts, and downloading application, nowadays, it is much simpler. If you accidentally lose your phone, in case of an Android phone, all your data will be restored as per your original phone thanks to dynamic cloud storage.
I favor android over all the other phone operating systems. The main reason being that Android is open source unlike its counterpart windows and Apple iPhone and iPad operating systems. You can download the source code, tweak it to your preference, and have your personal customized Android OS. There is also the ability get the latest Android release by building Android from source (“The Android Source Code”, 2015).
Since Android is a fully featured OS, it would be incomplete without the inclusion of developer tools. Google app store has hundreds of integrated developing environment (IDE) applications. Most of these apps are for purchase, but also come with free versions that have limited capabilities. For example, most of the free developer apps do not provide the save feature, or do not provide code highlighting features. If one needs these features enabled, they must pay a certain fee.  

TERMINAL IDE
Terminal IDE is an IDE that runs on terminal. Spartacus Rex develops it and according to their website; Terminal IDE is a fully featured java and android development environment. According to Chris Duckett 2012, Terminal IDE is a developer version of the Swiss army knife. As a developing environment, you will notice that Terminal IDE surpasses you normal IDE. It comes integrated with fully collection set of different language support. You can create website in HTML, CSS, and JAVASCRIPT and test it directly with your phone browser. Also you can develop java, Android and C application with minimal difficulties. Terminal IDE also partly supports C++, but your code is unlikely to break apart from large projects.
The downside to Terminal IDE is that it lacks advanced features that one would expect in a normal IDE. Functionality like code highlighting, auto completion, and intelisense features are not included. The IDE runs on terminal, code writing is done by VIM editor, a Linux based editor. Terminal IDE is not designed for people new to programming. Beginners can find the app a little challenging; though Terminal IDE Help section will get you going.


BENEFITS
Terminal IDE comes with command line tools like nano, vim, gcc, javac among others for development. Nano and vim are for editing source code while gcc and javac are for compiling written source code.
Terminal IDE can both be used offline and online thanks to Git, a version control system. The integration of Git in your projects will enable you to download, share, create, branch, and destroy repositories, locally or online over GitHub. 
Terminal IDE comes with its own full keyboard, optimized for programming. The keyboard is accessed by going to android phone setting, language and input under keyboard and input methods. The option of adding external keyboard using Bluetooth is also possible. 

Disadvantages
Terminal IDE runs on user instance, since each Android application gets its own group and user id. This may result in some restrictions and limitations (“GarageLab, 2013).

References
The Android Source Code. (2015, October 23). Retrieved from https://source.android.com/source/initializing.html
Duckett, C. (2012). Programming for Android on Android. Retrieved from http://www.techrepublic.com/blog/australian-technology/programming-for-android-on-android/
GarageLab. (2013). Development Environment for Android. Retrieved from http://thegaragelab.com/development-environment-for-android/

Tuesday, October 20, 2015

Handling IT projects part II


This is a sample version of a cict project proposal. It is aimed at providing the learner with basic knowledge of writing a proposal. This is the second part of the series of handling IT projects. It is important to note that according to kasneb regulations, a project proposal should not exceed 1000 words 

CICT Project proposal Example

MOVIES HELPER RETAIL APPLICATION

1.1  How the current systems works

The current system of movie retail works on use of pictures and list. Movie venders have booklets with pictures of the movies. The customer chooses from the list and requests the order. At times, the customers verbally inquires if a certain movie is in store makes payment.

Inputs and outputs

Inputs

1.      Movie Inquiry

2.      Movie order

Outputs

1.      Processing order

2.      Final product

What the users would want the new system to do

One of the major obstacle in movie retail business is queuing. Customers waste a lot of time waiting for their requested movie to be burned into a dvd disk. Customers want this process to be quickened.

            The other issue is that movies mostly come without description on what the movie is all

about. Customers have to rely on the description given to them by the vender, which at most is

not reliable. Customers want a system that will provide details about the movie, who are the actors

and a list of related movies.

Movie venders do not provide rating for movies. Also, there are no reviews on the movie so that

the customer can make informed decision on which movie to purchase. Creating a system that will

be able to provide rating for movies and reviews from other customers will be a benefit to the

customer.

Frequent customers also need discounts, credit facilities and other incentives.

 

1.2

(i) Parts possible for a computer solution

The new system will reduce this queuing time by allowing customers to process their own orders by sending information. When their order has been processed, customers will receive a notification to come receive their orders. Also, the system will notify users on new movies that are available in the store. It will also provide a brief description of the movie, ratings of the movies and reviews from other customers who have watched the movie. The customer will also be able to write reviews and rate movies. In addition, the new system will automatically give discounts and gift coupons on for customers and provide credit to loyal customers.

(ii) Requirement of computer solution

            For the application to work, it will need access to the internet. This is important, as customers will be able to receive updates and send orders regardless of their location. The application also needs a web server to process user’s orders and provide information.

(iii) Algorithms for the computer solution

            Web application

(i)                 Provide information on movies on the store

(ii)               Process user search query on a movie

(iii)             Return user’s searched query with:

(a)    Movie title, about the movie, genre, and actors

(b)   Reviews from other users

(c)    Other similar movies

(iv)             Process users product request:

(a)    The request is processed using the list of users in the database if the user is new; he/she is requested to provide his/her details.

(b)   Based on the number of orders, the user is liable for a discount

(c)    Based on order frequency the customer is liable for credit, free gift coupon or both.

(v)               The user is alerted when the order request is done.

 

Desktop application

This application will run on the client in the movie store

(i)                 Receive order from client

(ii)               Alert the vender on the customer order

(iii)             Return message to the customer that order is received

(iv)             Alert customer when order is done

 


 
 

Monday, July 6, 2015

Handling IT projects PART 1


CICT project series 1

When it comes to CICT projects, the list is endless on what solutions you can come up with. After all the main aim of the project is to, as K.A.S.N.E.B puts it “demonstrate skills of practical application and problem solving, as well as techniques of documentation and system testing.” Therefore, the whole point is for you to develop an application solution that can be applied to a business problem or to improve the current system. The best part is that there are numerous businesses, numerous businesses means numerous problems. If these problems can be looked at with an IT mind, there is a business solution to be developed.

The downside is that there is a catch:

1.       Skills

This goes without saying that you should know what you are good at. For example, if the project of your choice is to develop let’s say a web app that gives customers information on new products in the market, you must be certain that you possess skills to build the app. First, determine all that your application will need. You may be good with java programming, but soon you realize that the application needs to run on a php server, so you will need to know php code for the application to successful. In short, determine the problem, and then from there list all the skills you will need to develop it.

Also, avoid projects concrete high geared skills. Projects that require you to move outside IT scope are at time dangerous. For example if you intend to develop an application that analyzes the stock market apart from IT skills you will have to be a serious financial analyst guru.

Choose projects with that everyone can jump on the ocean to help incase you drown in your code. Code in common languages like JavaScript, visual basic or php, where in case you encounter a problem, you can easily find help by posting your problem in programming forums like stackoverflow.

2.       Time

This is the most challenging factor. K.A.S.N.E.B requires a candidate to choose a project that should be completed in four months. This means that to be on the safe side, you should complete you project within a period of 3 months. The remaining one month should be used to perfect your program, fixing bugs, developing user documentation, testing among others.

Therefore, it is important to choose a straight forward project. Avoid picking projects with too many inputs and outputs.

3.       Relevance

This is not a major issue since the candidate is required to write a proposal to KASNEB before the project can be approved. Since most of the time you will be working on the project on your own, it is my advice that you think small. Start locally. Identify business problems within your region. The problems identified should be small, don’t try to develop an application that tackles an industrial problem as you will waste time trying to understand the problem instead of writing code. An agile software development method is the best to use. Create first the backbone, then, continually add features.

Example:

Assume you want to buy a movie and you have gone to your local movie vendor, you realize that there are a lot of customers who want to check if the movie seller has a certain movie and if possible watch a trailer of the movie.

You can develop an application that automatically shows the user if the kind of movie he/she is looking for is available by typing and the user have the option of checking the preview, purchasing the moving or renting it.

If you chose an agile approach, first develop the tables, relationships, and queries need by the application. You can the go on incrementing features as internet access, sms support among others

 

Monday, May 11, 2015

Courses to consider after CICT



Data is an important factor to every entity. Whether an individual, an industry or a country. For example, a country needs data for equity distribution of resources, companies need data for corporate to make sensible decisions, consumers need data to make daily decisions on what to consume. In short, regardless of where you are, you need data to be effective.
Since the emergence of computers, storage of data has taken center stage. This is the very reason that the world has seen increased growth of databases. As long as you access the internet, you leave a footprint of yourself there. Starting from your client browsers to internet servers. Servers’ store cookies in your web browsers cache. Also, your operating system stores every single entry made in your system through the System log files.
INTRODUCTION TO DATA SCIENCE
Data Science though a course is simply the process of extracting knowledge from data. It is important to note that data are raw facts. For data to make sense, it has to be converted to information. It is therefore to say data science is the process of giving forth information from raw data.
What it takes to be a DATA SCIENTIST
Since as a data scientist you will be using data to draw conclusions, you need knowledge in the following areas:
(i)                 Statistics: - which deals with the manipulation of data to draw sensible information.
(ii)               Probability:- This can be seen as the prophetic view in mathematics. Probability deals with focusing. If X decreases what happens to Y. As a Data Scientist, you should be able to speculate that.
(iii)             Information theory:- As a Data Scientist, you should be able to draw hypothesis from a given information.
(iv)             I.T. :- Nowadays, data is normally in the form of softcopy. Knowledge in I.T. is essential, as it will save you massive time in making sense of data if you use the right tools in terms of software and hardware.
(v)               Visualization and modelling: - if you are employed in a company as a data scientist, you should be able to visualize your conclusion people without statistical knowledge to understand. It is vital to be able to visualize data as pie charts, graphs among others.
Career opportunities in DATA SCIENCE
1.      Cloud computing
Most organizations today are storing most of their information in the cloud. These organizations may need services of a data scientist, for example to review which data is mostly accessed.
A real example is an online retail store may need services of a data scientist to review the data and provide info on how to increase sales.
2.      Health institutions
Health institutions as hospitals and pharmacies may need a data scientist to access the effectiveness of a drug. For example if there are 10 drugs for malaria treatment, a data scientist may provide info on which is most effective.

Conclusion
Data science is still a course in the making. The course has a promising future. The reason is that there is no single organization that does not deal with data. Therefore, multiple opportunities. Currently, the course is not being offered in the country but that should not deter you. With the investion of online learning, you can enroll in any school abroad. Happy learning