National Authentication Framework (NAF)

This article that I have just seen reminds me one of system securities core values - CIAA (confidentiality, Integrity, Availability and Authenticity). Singapore IDA formed an subsidiary called "Assurity Trusted Solutions Pte Ltd" to oversee & manage their vision called iN2015 master plan to provide secure & trusted party authorizing 2nd Factor Authentication (2FA).

Currently, Online Banking in Singapore is heavily using 2FA - if you are one of the online banking users, you might be holding a token or a cell phone that the authentication codes will be sent to you after you login. Singapore IDA is taking over this stuff to become in charge of this 2FA instead of individual banks. Its main purpose is to make a single authentication device instead of using multiples from various service providers. It also mentioned that business can enjoy cost saving since they do not need to implement it by themselves.

Please allow me to revisit what we learnt about authentication. It is about proving who you really are - that is authentication. There are 3 ways to verify someone - something you know (like your email password), or something you have (like your ID card) or something you are (like your fingerprint or voice). If we want to enforce the systems, it is easy - use more than one verification methods.

Overall, it seems it has benefits to many angles of life. But one thing that come across my mind is "responsibility". First, let's say you are logging into one of Singapore Local bank (says DBS). You got to login using your username and password that the database is maintained in the bank. After you have supplied the correct username and password before your maximum tries is over or before the session timeout has occurred, you will be asked to enter the 2nd authentication code.

If IDA is supplying the 2nd authentication code, that caused me a lot of wonder. First, who is now maintaining the username and password? IDA or individual banks? Moreover, some transactions are considered as sensitive transactions such as fund transfer or paying bills. Such transactions require the 2nd authentication code.

And in the case of online fraud or some undesired event happened, who is now answerable? Bank or 2nd Authentication Code Provider? This is very confusing indeed. When the 1st authentication and 2nd authentication verifiers are different, the arguments of holding the responsibility now fall in grey area.

To see full story about the NAF, read in Straits Times.

Web Crawler

A web crawler, also known as web spider or bot is a computer program that search the world wide web in a methodical manner or in an orderly fashion. It can be used for various purposes, be it good or bad. It can be used to check if your website has any broken links for good sake. It also can be used to collect the valid email addresses from victim website (for spamming later, probably). Worse, it can be used to overload the target server since the downloading activity is involved the machine speed with zero delay.

There are many considerations to create an effective web crawler. I am just going to give for a simple web crawler that a novice can understand the concept and start to implement. The program has to start with a valid URL, it is called "seed".

The program will used the seed to download the page. For example, the seed is  www.channelnewsasia.com and the program will download the Channel NewsAsia index page. After download is completed, then the program will open the downloaded file and search for other valid URLs in the file contents. If you are familiar with HTML coding,  you knew that the best known keyword in a website for valid URL begins with and end with . The program will search for all the valid URL in the file and save all these valid URL into its memory (probably some seed files).

After first file read is over, the program will again take the next valid URL that were extracted from the index page to download a new valid URL and repeat the search and save the valid URL into its memory.

Slowly, the program will collect all the valid URL that are corresponding to the original seed www.channelnewsasia.com and able to normalize the Channel NewsAsia website structure.


The web crawler could collect all sorts of URL data including emails, documents and pdf whichever available in the website. It could also reveal the pages that are supposed to isolate from normal users due to the poor coding technique.

The drawback of this web crawler is that it requires to download the web pages to analyze for valid URL or links in the web server. You may want to use the threading to create more downloaders to increase the speed of the program.

There are also rising concerns that the web search engines such as Google, Yahoo, MSN are spamming the web traffics. The web crawler might be also used to attack with the DOS concept.


Reference:
http://en.wikipedia.org/wiki/Web_crawler

A Programmer's Life???

I just received an email from a friend and I think the image is quite true and hilarious. Programmers always require small things to be happy and also small problems to become frustrated. They live in a different world, a tiny one. They are fragile and often tortured by the managers. Here is a programmer’s life.


Enjoy~~~

CSCI235 Assignment 3

This assignment is 5% of total marks in this course. The tasks for this assignment cover the implementation of queries, self join queries, outer join queries, nested queries, queries with existential quantifiers, queries with negated existential quantifiers, and queries with ANY and ALL clauses.

You can download a3create.sql and a3drop.sql from SIM student portal. Execute a3create.sql to create the sample relational database (a collection of relational tables to be precised) and loads sample data into the database. A script file a3drop.sql contains DROP TABLE statement to remove the relational tables created by a3create.sql. Ready? Let's start!

There are total of 10 tasks and basically it is about extracting required data from database using SELECT statement. I will pick up some example from the assignment and demonstrate it to you. Of course, you need to understand the SQL statement well enough to perform this assignment tasks.

Example 1:
--Implement a query as SELECT statement with self JOIN operation to find the names (NAME) of all employees older than Frederic Jones.
SQL>SELECT e1.name, e1.dob FROM employee e1 JOIN employee e2
ON e1.dob>e2.dob WHERE e2.name='Frederic Jones';


Example 2:
--Implement a query as SELECT statement with NATURAL JOIN operation to find the employee numbers(E#) of all drivers who visited Perth at least one time.
SQL>SELECT DISTINCT e# FROM driver NATURAL JOIN tripleg WHERE
departure='Perth' OR destination='Perth';


Example 3:
--Implement a query as SELECT state to find the names of all drivers who never visited Rockhampton.
SQL>SELECT name "Employee Name" FROM employee WHERE e# IN
(
SELECT e# FROM driver WHERE l# IN
(
SELECT l# FROM trip WHERE t# IN
(
SELECT t# FROM tripleg WHERE departure!='Rockhampton' OR
destination!='Rockhampton'
)
)
);


Well. Just master the SQL command and this assignment will be easy task for you.

CSCI235 Assignment 2

The tasks of this assignment cover the implementation of SQL, database reverse engineering, modifications of database structure, data entry, simple data manipulations, and implementation of simple queries.

To complete this task, you need to download oracle database server in order to execute SQL command.

You are given with 2 SQL files (a2create.sql) and (a2drop.sql). The first file contains CREATE TABLE statement of SQL and the second file contains DROP TABLE statement that delete all tables created by the first SQL file when they are no longer needed.


First Task

It is about database reverse engineering. Based on the SQL file given, you have to analyze the SQL and discover a conceptual schema (E-R) diagram of the sample database. You are required to determine the keys (identifiers) of entity sets, names of relationships, key constraints, types of relationships (1:1, 1:M, M:N), weak entity sets, identification relationships, and class (ISA) hierarchies (if any). The solution should be similar to the diagram below.



Second Task

This task is about structural modifications of relational tables. For example:

-- Implement SQL script addsalary.sql that adds a column SALARY NUMBER(7,2) to relational table EMPLOYEE.
SQL> ALTER TABLE employee ADD SALARY NUMBER(7,2);

This above SQL statement will alter the table EMPLOYEE with additional column for salary with numerical data type that can accept 2 decimal numbers.


Third Task

This task is about creating relational tables and data entry operations. For example,

--we would like to store information about administration employees. Each admin employee is described by employee number (E#), name (NAME), date of birth (DOB), address (ADDRESS), and hired date (hiredate).

SQL>CREATE TABLE admin_employee(
E# NUMBER(12,0) NOT NULL,
NAME VARCHAR(50) NOT NULL,
DOB DATE,
ADDRESS VARCHAR(200),
HIREDATE DATE NOT NULL);

The above statement will create a table called for employee information.


Fourth Task

This task is for data manipulation operations. Since after we have constructed the database structure, it is now time to manipulate the data. For example,

-- Implement a parameterised SQL addtruck.sql script that prompts about full information describing a truck and inserts a new row into table TRUCK. Execute script addtruck.sql

SQL>INSERT INTO truck VALUES('&reg',&capacity,&weight,'&status');
Enter value for reg: ABC123
Enter value for capacity: 45000
Enter value for weight: 3000
Enter value for status: USED
old1: INSERT INTO truck VALUES('&reg',&capacity,&weight,'&status')
new1: INSERT INTO truck VALUES('ABC123',45000,3000,'USED')


Fifth Task

The last task of the assignment is about data retrieval operations using SELECT statement of SQL. For example

-- Find the names of all employees (NAME) born between 1950 and 1960

SQL>SELECT NAME, DOB FROM employee WHERE EXTRACT (YEAR FROM DOB)>1950 AND EXTRACT (YEAR FROM DOB)<1960;

All the above tasks have to submit in hard copy for assessment.

CSCI235 Assignment 1

The task of this assignment covers the conceptual model design and implementation of the model into relational schema.

The assignment is given such scenario: you are going to implement a website to provide soccer fans with information about events in a soccer league. In this system, there is a database that contains information about teams, players, game played, results, fixtures, etc.

This soccer league consists of a number of teams - each team has at most 30 players registered. Team is described by a unique name, location (city, town, village) and address of home ground. Each team has one coach and two coach assistants and a number of support staff. Their full names, DOB and hired date are registered.

A player is described by a full name, DOB, weight, height, number and position he usually plays at, all teams he played in the past, transferred dates and transfer fees.

Game are played every weekend. A game is identified by a date, kickoff time and address of a ground when it is played. A game involves two teams, a referee, two linesmen, and technical referee. All events that happen during a game together with time when they happened must be recorded in the database. A set of events includes changes of players during the game, goals scored, yellow and red cards.
.
.
.
All games played have a number of spectators recorded.

Task1: Analyze a domain given above and identify classes, their attributes, associations with other classes, and other elements of conceptual schema, including generalization hierarchies (if any). Draw a class diagram for the above domain.

This is the sample of how it will look like:


Task2: Translate the conceptual schema obtained in the previous step into a relational schema.

This is the sample of translation of conceptual schema into a relational schema -

Task3: Prepare a class diagram from the instance diagram below and explain your multiplicity decisions. Each point has an x coordinate and an y coordinate. Which is the smallest number of points required to construct a polygon? Does it make a difference whether or not a given point may be shared between several polygons? How can you express the fact that points are in a sequence?


(Note: The instance diagram of the polygon shown above happens to be a square.)

The smallest number of points required to construct a polygon is "3". By sharing the points between polygons, the number of objects will be reduced. The points in any polygon are in a sequence.


CSCI235 Database Introduction

Welcome to database! This course will prepare you the major areas of modern database technologies, their concepts and methodology for relational database design.

The course will also introduce the Query processing, Optimization, Transaction Management, Security & Integrity. This course does not require any prerequisite knowledge of database system or information modeling. They will teach from the very basic level about database, so if you are new to database, you do not need to worry.

The course will explain about the principles of relational database model, design and implementation using Oracle database.

The course is assessed by 20% on 4 assignments (each worth of 5%), 20% on the class tests (10% each) and the final exam at 60%. So you have focus on final exam since the weight of final exam is very high.

CSCI222 Systems Development Introduction

The course, CSCI222 is about how the software development should be done with the understandings and good development principles. It is also aimed to prepare for final year project (CSCI321).

This course will introduce you about the project management and risk management. Yes, they are just some readings and that is all. You will also get introduced about RUP, PSP tools and requirements.

You will see the term like inception, elaboration, construction and transition that are used for RUP software development cycle. You will also learn the various inspections & testings for software quality. Finally, you will learn "Change Management" and "Version Control" as well as some information on software engineering real world issues.

The assessment of this course is 25% on class tests,  25% on assignment and 50% on final exam.

CSCI212 Assignment 3

This assignment requires to write a standalone Point of Sale (POS) program using the Bourne-again Shell (bash). The POS program is normally used at the checkout counter in a shop or restaurant to serve as an electronic cash register. It is a menu-based, allowed to use options: such as adding, removing, editing and reporting.

In this program, you are required to use the shell command such as echo, grep, awk, cut, piping, expr, read, sort, etc to store, locate, display, remove and sort the transactions.

It also involves the control structures, case structure, while and for-loop.

By combining the shell commands together, we could easily achieve some powerful assets.

This is a menu writing programming that we used to do it often. The only difference is the file structure. Firstly, this is how the program works.


The main program file is POS.sh, however, all other important functions are done only in POS_functions.sh.

During execution, especially for sorting by date and summary report, several documents are being created to store the values temporary.

Tips for bash programmer

  • To begin a bash program, it is important to insert #!/bin/bash in order to inform that we are using the bash shell.
  • For commenting, you can use the symbol # at the beginning of the line.
  • Function call can be done. To use arguments in the function, we can get them by $1, $2, etc.
  • Receiving input from keyboard can be done by using read command.
  • echo does the same function as print function, where echo, by default, point at next line, unless there is option -en is mentioned.
  • export is similar to global variable in other programming.
  • grep is a powerful and useful for graping the piece of information.
  • awk is another powerful tool for writing the program. The awk is in fact not well known and GNU version of awk, called gawk, sound unfamiliar. It can be used for text processing and report generation by using best part of languages like C, python and bash.
  • tr is used to translate characters into other characters or delete them.
  • As the name mentioned, cut command can pull data from given range and useful while working with string.
 

CSCI212 Assignment 2

This assignment consists of two tasks, in fact, it is a combination of task 1 and task 2. 

Task 1

Task 1 requires to develop his own shell (it is called MyUnix in this program) that can work exactly the same as Unix or Unix-liked terminal.

In task 1, it is to design and implement a simple, interactive shell program that prompts the user for a command, parses the command and executes it with a child process.

See example below:

myUnix>
myUnix>
myUnix>ps -ef | more
UID    PID PPID C STIME  TTY      TIME CMD
user1 6894    1 0 11:14      ?    00:00:02 gnome-terminal
user1 6904 6894 0 11:14      ?    00:00:00 gnome-pty-helper
user1 6907 6894 0 11:14   pts/0   00:00:00 bash
user1 7443 6907 0 11:24   pts/0   00:00:00 ./simpshell
--more—

Like conventional shells, your new shell interpreter's command lines has the form:  
>command argument_1 argument_2 ...
where the command to be executed is the first word in the command line and remaining words are arguments expected by that command. Note that arguments will have to be passed to the execl system call or equivalent with path as well. So you will have to do some basic parsing. The number of arguments depends on the command which is being executed.

The shell relies on an important convention to accomplish its task: the command is usually the name of a file that contains an executable program. For instance, the command ls() and ps() are the names of the files (stored in /bin on most UNIX style machines). In a few cases, the command is not a file name, but is actually a command that is implemented within the shell - e.g. cd() is usually implemented within the shell rather than in a file. Since the vast majority of the commands are implemented in files, just think that the commands are filenames in some directory on the machine. So the job of the shell is to find the file, prepare the list of parameters for the command and the cause the command to be executed using the parameters.

A shell could use many different strategies to execute the user's computation. However the basic approach used in modern shells is to create a new process to execute any new computation.

This idea of creating a new process to execute a computation may seem like overkill, but it has a very important characteristic. When the original process decides to execute a new computation, it protects itself from fatal errors that might arise during that execution. If it did not use a child process to execute the command, a chain of fatal errors could cause the initial process to fail, thus crashing the entire machine. (I hope you don't create too many child process and drain all the memory resources.. )

Here I will introduce you a few functions that you might require to use for this task. 

fork() function
 
fork is a standard UNIX system call used to create a new process. Whenever a process issue fork system call, a new process will be created. The process who call for fork is “parent” and a new process created by the system is “child” process.

These are entirely different (different PID) which means different memory space. It uses copy on write semantics (page sharing).
 
fork is important because it encourages the development of filters. Filter is a small program that reads its input from STDIN and write its output to STDOUT. A pipeline of these commands can be strung together to create new command.
 
e.g. $ find –name “*.cpp” –print | wc -1
find and wc are the child process.
 
exec() function
 
It is a common technique used in UNIX together with fork and exec command. Fork is the name of system call that the parent process uses to divide into two identical process. After fork() is called, “child” is created with exact copy of parent. But they are with different PID.
 
The fork function return child PID to the parent while it return 0 to child so that they can distinguish from each other. The parent process can either continue or wait for child process to complete.
 
The child, after discover that it is child, replaces itself with another program. While the child calls exec(), all data is lost and replaced with running copy of the new program. If the parent chose to wait for child, then the parent will receive exit code that child executes.

wait() function

It is a system called used in parent where the parent wait for the child’s process to complete. During the wait() time, the parent will do nothing except for waiting child’s signal.

Task 2

In task 2, it is to implement a pthreads program for calculating the matrix multiplication. The program should be flexible enough to change the size of the matrices and set the number of threads. The numbers are randomly generated. After completion, this program will now take the input numbers from a file instead of the random algorithm. To enhance the difficulty, the program is modified to take 2 square matrices for multiplication from a file (e.g. infile) and then its matrix computation output to another newly display (progB) program to just merely transform the presentation in another way.

For example:

myUnix>
myUnix>./MatrixMulti 1 > result.txt
 
The output file, result.txt should contain the product of Matrix Multiplication as shown
below:

180 84 168           118 102 135          60720 50448 67308
171 195 42    *       78 110 204      =   43620 44604 69333
 71 164 59           196 136 154          32734 33306 52127

The solution of task 2 is about the usage of threading. Threads are used to share the memory and execute simultaneously to make the process faster. It is a support to parallel programming. For UNIX, threads programming interfaces are defined as POSIX or Pthreads.

Threading requires thread initialization and thread definition/setting. It is then thread is created and destroyed at the end.

See the diagram how the threads are worked.


JOIN & DETACH threads

"Join" is one way to accomplish synchronization between threads. A joining thread can match one pthread_join() call. When a thread is created, one of its attributes defines whether it is joinable or detachable. Only threads that are created as joinable can be joined. If a thread is created as a detached thread, it can never be joined.

MUTEX

Mutex is an abbreviation for "mutual exclusion". It is a simplest mechanism we deploy to enforce concurrency between threads.

A mutex variable acts like a "lock" protecting access to a shared data resource. The basic concept of a mutex is that only one thread can lock (or own) a mutex variable at any given time. Threads must "take turns" to access protected data.


CSCI212 Assignment 1

This assignment is concerned with the writing of a program which provides a statistical report of the process table as reported by the ls() command. The command, ls() is a command to list files in Unix and Unix-liked operating systems. It is an abbreviation of list segments and specified by POSIX specification. You will be writing a filter to take input from the command and process it to yield a report.

In order to do this assignment, you will need the knowledge of ls(), pipelines in Unix and processes. Finally, you need C++ programming knowledge.

About ls() command

Before you start the coding, you need to understand the problem well. In this case, we need to study about ls() command. When a user execute this command, the system will reply in following format.

drwxr-xr-x 4 user1 root 4096 2007-09-30 17:17 .
drwxr-xr-x 4 user1 root 4096 2007-09-30 16:09 ..
-rwxr--r-- 1 user1 root    0 2007-09-30 08:26 fish
-rwxr--r-- 1 user1 root   26 2007-09-30 08:16 foobar

The output is broken down into columns, which maps to the column fields as indicated:


There are 8 parameters in total (permission, directories, owner, group, size, date, time, filename).  For details of each parameters, you may check in your terminal by "man ls" or website.

Pipeline

Using the output of the command ls(), the program should read the output as standard input. In another words, the program is to behave as if it were part of the pipeline. Typical execution would be

ls -al | a.out or ls -al | sort | ./a.out (if you prefer to sort them)

where a.out is your executable program which will take in the std::out of ls() command as std::in of your program.


CSCI212 Introduction

Leave the Windows and embrace Linux world!!!

This course, CSCI212 Interacting Systems, is based on Linux environment to prepare the student to understand the interaction between the program and its environment. You will start to understand the operating system that is network-based, multi-tasking and client/server applications.

You will learn shell scripts and commands (bash) to work in Linux world.

The course is structured with 30% on assignments (typically 2/3 tasks), 20% on Quiz and 50% on Exam. So if you can secure 40% for assignment and Quiz, you can go into the exam hall with less worries.

Prepare well!

Quiz and Exam Preparation

The Quiz will take about 15% of your total marks while the Exam will carry 60%.
You will need to prepare for the exam as well as the small quiz test.

Here are the tips for your examination and Quiz test.
1. Tips for Quiz - click here.
2. Tips for Exam - click here.

Okay.. The last one - just in case, you want to try some sample exam questions.
Download here.

Tutorials and Answers

I will upload the tutorial answers in here. You need to practice those tutorials before going into the exam hall.

To download tutorial 1, please click here (tutorial 1).
To download tutorial 2, please click here (tutorial 2).
To download tutorial 3, please click here (tutorial 3).
To download tutorial 4, please click here (tutorial 4).

Good Luck!

CSCI204 Assignment 2

This assignment required to have the experience in object-oriented composition, inheritance, operator overloading and standard template library. There are 3 tasks involved in this assignment.

Task 1

The first task is to write a C++ program that allows user to perform calculations on complex number by overloading its operators. You need to reference to your overloading operators lecture note. It should be easy if you understand the examples explained in the lecture.

Task 2

This task is to write a C++ program to generate the grade report of students using the classes - 'student' and 'course'. The records are kept into a text file, so the program require to read the file and then generate some reports into a output file. Pretty simple, except you have to use public and private functions of the classes.

Task 3

The last task is about using standard library in C++. The C++ program has to read a text file that contains commands to operate on a listed list and then output to a text file for logging. If the command is not recognizable, then the program has to ignore, but continue to execute.


CSCI204 Assignment 1

This assignment require the students to have the experience on C++ string, classes and constructors. There is 2 tasks involved in this assignment and it will carry 12 marks.

Task 1

This task to write a C++ program that allows the user to play the Hangman game. If you do not know the Hangman game, it is look like that.

Hey.. wait.. you don't need to have any graphic. It is just a small simple word-guessing C++ program that is similar in the concept. First, You need to create a text file that contain 20 words and corresponding prize amount. Then you will write a program that the user will select a number between 1 to 20. Based on number selection, your program extract the corresponding word and prize amount. Now let the user to get one alphabet at one time. If the alphabet is guessed correctly, it will display the alphabet in the word. Finally, if the user guess correctly for all the alphabet in the word, then he will get the prize. Similarly, if the user guess wrongly for more than 7 times, it is game over.

Task 2

This task is about writing a C++ program for small database for library. But instead of using all the databases, it is simply just a text file. The program will read, write and modify the contents in that text file. It will also allow for adding new records, updates, deletion, search and calculate some statistics and display. Very simple and yet it needs some of your time and efforts.

These programs are developed in window environment. Please make sure your program can run and execute accordingly. To develop C++ program, you may want to download the complier from Bloodshed Dev C++.

Introduction to CSCI204

This is a year-2 course that i have gone through. The lecturer was Mr.Tham and this course is purely a programming class. If you are weak in the programming background, this could be used as your revision. But if you are the type who don't like programming, then you will have a hard time for this course.

This course focuses on C++ programming, most importantly on Object-Oriented Programming. You will see the Classes, Objects, Overloading, Inheritance & Polymorphism. Lastly, you will learn the template library.

Please pay attention to all those chapter as it is going to be tested in your exam. I am the person who goes against testing programming in the examination by writing down on a paper. I felt it does not make sense to test student on the paper. Nevertheless, many institutes around the world still use this method of qualifying the student. I hope one day, all programming courses will not require to sit for exam.

The course has 2 assignments that carries 25%, a quiz 15% and the rest will goes to the exam (60%). My advice for the people is to study and practice more to get used to programming.

Modular Inverses

If you do not have the idea of GCD, please do not read this post first. Please read about GCD in order to understand Modular Inverse.

In GCD, I have concluded that [ gcd(n,m) = a*n + b*m ]. If we have the condition that gcd(n,m)=1, then we can solve the modular inverse.

Below is the algorithm.
1. Write down 2 numbers, n and m. Also the vectors (1,0) and (0,1).
2. Reduce the larger to smaller one.
3. Apply the same computation to vectors.
4. Repeat until we have the number 1 and 0.
5. Preceding result will be the modular inverse.

You might still be wondering why we are doing GCD and Modular Inverse. The reason is it allows us to have a function that we can use for encryption and decryption. One of the example is Merkle–Hellman knapsack cryptosystem.

GCD - The Euclidean Algorithm

If you have weak mathematics background, it comes into the disadvantage when you started learning GCD in the class. Many people could not understand it well. It involves some assumptions and theory proofings that makes students more confusing. You should not give up. This is going to be tested in your exam and therefore, you really need to understand GCD.

GCD in simply explanation

It is the largest number that can divide 2 numbers (n and m) and it is denoted by gcd(n,m).

- Imagine if you want to divide 2 numbers: one is 8 and another one is 12. What will be the largest number to divide? As you know, the number (2) or (4) both can divide and the number (4) will be the GCD since it is the largest number. Therefore, gcd(8,12)=4


Algorithm
1. Write 2 numbers.
2. Reduce the larger number (by subtracting smaller number)
3. Repeat step 2 until one of the number become zero.
4. Voila.. you get the gcd.
(can't imagine the picture.. see below)


I am now going to draw some analysis. If you look at the picture above carefully, in each step, both number M & N are newly formed by adding some multiple of original numbers. For example, in step 4, the new number for N becomes 12 by adding (negative 5 times of M value).

In this case, we can say that there are some numbers like a & b, such that gcd(n,m) = a*n + b*m.

How does the word "Hacking" appear?

Recently, I was asked by my close friend who had just started to learn computer and some basic programming. His question is "what is a hacker? What does hacking mean?" I think for long, but I do not have clear idea about it. I try to search all available information on internet. And i hope this could be an interesting for you. I am sorry that it is a bit wordy.

The word "HACKING", different people have different views on the hacking scene. There is no official definition of a hacker, rather a vague idea among the masses. The media loves to add false information to draw more attention for the sake of their revenue.

It began in 1960s at MIT, origin of the term "hacker", where extremely skilled individuals practiced hardcore programming in ColdFusion and other older languages. They are, by far, the most intelligent, individual and intellectually advanced people who happen to be the pioneers and forefathers of the talented individuals that are today the true hackers. In 1969, Bell Labs employee Ken Thompson invented UNIX and it permanently changed the future of computer industry. In 1970s, Dennis Ritchie invented programming language "C", which was invented specially for UNIX. Eventually, "C" creased the usage of assembler due to its portability.

The term HACKER was accepted as a positive label slapped onto computer guru who can push computer systems beyond their limits. A network known as ARPANET was found by Department of Defense in United State as a means to link government offices. In time, ARPANET evolved into something today known as the Internet.

In 1990s, Kevin Mitnick is arrested after being tracked down by Tsutomu Shimomura. Kevin is a computer security consultant and he committed computer and communicated-related crimes using social engineering. The trials of Kevin Mitnick were the most publicized hacker trials in hacker history.

Hackers have developed methods to exploit security holes in various computer systems. When hacking first originated, the motivation was based purely on "curiosity". They are curious what the system did, how the system could be used, how the system did, and why the system did that way.

Recently, the way and intention of hacking has been changed. They overload email servers by sending massive amount of email to one address causing to drain system memory resources. It also used as a tool as to hack into websites to send political message. In 1999, for example, NATO conflict in Yugoslavia, hackers attacked websites in NATO countries, including the United States, using virus-infected email and other techniques. It becomes weapons the times of war, where enemy country has highly depending on computer systems.

Hackers today are just like everyone, it might be black, white, asian, european, tall, short, socially active, cool, nerdy. Although there are people running around saying, "Look, I took down this website or this email address, I did it, and therefore I'm a hacker" doesn't mean they're a hacker. They are fakes and wannabes.

And finally, I would like to remind that if you naively believe that you have right to access information even harmless computer intrusions, it can trigger criminal sanctions. Simple advice is "do it for your innocent digital thrill seeking, but don't forget the law".