Chủ Nhật, 20 tháng 12, 2015

Inverse of a Matrix using Minors, Cofactors and Adjugate 3x3

We can calculate the Inverse of a Matrix by:
  • Step 1: calculating the Matrix of Minors,
  • Step 2: then turn that into the Matrix of Cofactors,
  • Step 3: then the Adjugate, and
  • Step 4: multiply that by 1/Determinant.
But it is best explained by working through an example!
Example: find the Inverse of A:
It needs 4 steps. It is all simple arithmetic but there is a lot of it, so try not to make a mistake!
Step 1: Matrix of Minors
The first step is to create a "Matrix of Minors". This step has the most calculations:
Determinant
For a 2×2 matrix (2 rows and 2 columns) the determinant is easy: ad-bc
Think of a cross:
  • Blue means positive (+ad),
  • Red means negative (-bc)
A Matrix
(It gets harder for a 3×3 matrix, etc)

The Calculations

Here are the first two, and last two, calculations of the "Matrix of Minors" (notice how I ignore the values in the current row and columns, and calculate the determinant using the remaining values):
And here is the calculation for the whole matrix:

Step 2: Matrix of Cofactors

This is easy! Just apply a "checkerboard" of minuses to the "Matrix of Minors". In other words, we need to change the sign of alternate cells, like this:

Step 3: Adjugate (also called Adjoint)

Now "Transpose" all elements of the previous matrix... in other words swap their positions over the diagonal (the diagonal stays the same):

Step 4: Multiply by 1/Determinant

Now find the determinant of the original matrix. This isn't too hard, because we already calculated the determinants of the smaller parts when we did "Matrix of Minors".
A Matrix
So: multiply the top row elements by their matching "minor" determinants:
Determinant = 3×2 - 0×2 + 2×2 = 10
And now multiply the Adjugate by 1/Determinant:
And we are done!

Thứ Ba, 15 tháng 12, 2015

Finding Eigenvector & Eigenvalue by using Jacobi algorithm

// NUMERICAL RECIPES in C
//http://www.library.cornell.edu/nr/bookcpdf/c11-1.pdf
//http://apps.nrbook.com/empanel/index.html#

#include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

//Computes all eigenvalues and eigenvectors of a real symmetric matrix a[1..n][1..n].On
//output, elements of a above the diagonal are destroyed.d[1..n] returns the eigenvalues of a.
//v[1..n][1..n] is a matrix whose columns contain, on output, the normalized eigenvectors of
//a.nrot returns the number of Jacobi rotations that were required.

void Rotate(double a[4][4], double s, double tau, int i, int j, int k, int l)
{
double h, g;
g = a[i][j];
h = a[k][l];
a[i][j] = g - s * (h + g *tau);
a[k][l] = h + s * (g - h *tau);
}

bool Jacobi(double(&a)[4][4], double(&v)[4][4], double(&d)[4])
{
int n = 4;
int i, j, iq, ip;
double tresh, theta, tau, t, sm, s, h, g, c, b[4], z[4];

for (ip = 0; ip < n; ip++){
for (iq = 0; iq < n; iq++) v[ip][iq] = 0.0f;
v[ip][ip] = 1.0f;
}
for (ip = 0; ip < n; ip++){
b[ip] = d[ip] = a[ip][ip];
z[ip] = 0.0f;
}
for (i = 0; i < 50; i++){
sm = 0.0f;
for (ip = 0; ip < n - 1; ip++){
for (iq = ip + 1; iq < n; iq++)
sm += (double)fabs(a[ip][iq]);
}

if (sm == 0.0f)
return true;
if (i < 4)
tresh = 0.2f * sm / (n * n);
else
tresh = 0.0f;

for (ip = 0; ip < n - 1; ip++){
for (iq = ip + 1; iq < n; iq++){
g = 100.0f * (double)fabs(a[ip][iq]);
if (i > 4 && (fabs(d[ip]) + g) = = fabs (d[ip]) && (fabs(d[iq]) + g) = = fabs(d[iq])) a[ip][iq] = 0.0f;
else if (fabs(a[ip][iq]) > tresh){
h = d[iq] - d[ip];
if ((fabs(h) + g) == fabs(h)) t = a[ip][iq] / h;
else{
theta = 0.5f * h / a[ip][iq];
t = 1.0f / ((double)fabs(theta) + (double)sqrt(1.0f + theta * theta));
if (theta < 0.0f)    t = -t;
}
c = 1.0f / (double)sqrt(1 + t * t);
s = t * c;
tau = s / (1.0f + c);
h = t * a[ip][iq];
z[ip] -= h;
z[iq] += h;
d[ip] -= h;
d[iq] += h;
a[ip][iq] = 0.0f;

for (j = 0; j < ip; j++) Rotate(a, s, tau, j, ip, j, iq);
for (j = ip + 1; j < iq; j++) Rotate(a, s, tau, ip, j, j, iq);
for (j = iq + 1; j < n; j++) Rotate(a, s, tau, ip, j, iq, j);
for (j = 0; j < n; j++) Rotate(v, s, tau, j, ip, j, iq);
}
}
}
for (ip = 0; ip < n; ip++){
b[ip] += z[ip];
d[ip] = b[ip];
z[ip] = 0.0f;
}
}
return false;
}


//main function

double Q[4][4];
double Eigenvalue[4];
double Eigenvector[4][4];

Jacobi(Q, Eigenvector, Eigenvalue);

.....



Thứ Hai, 14 tháng 12, 2015

IELTS Writing- How To Write a Complex Sentence

Introduction
One of the biggest mistakes students make in IELTS writing is to try and show off and be overly ambitious with their grammar. This is because many students think that all of their sentences need to be ‘complex’ (they don’t!) and them not understanding what a ‘complex’ sentence is. Trying to write overly complicated sentences leads to grammar mistakes and this will lead to lost marks in many different areas.

This post will look at:
• how many ‘complex’ sentences you actually need in each paragraph
• what a ‘complex’ sentence actually is
• how to make complex sentences
• examples to help us understand and transfer this knowledge to our own writing

What does the examiner expect?
If we look at the examiners’ marking scheme it states that in order to get a band 6 for grammar we need to:
use a mix of simple and complex sentences.

For band 7 it states:
• Use a variety of complex structures.
This obviously means that we should use complex sentences in our writing, but it does not mean that we should try to make all of our sentences complex. All band 9 answers that I have seen use a mixture of both simple and complex sentences. The key is to know when to use them and we will look at this below. But first, we need to understand what a complex sentence actually is.

What is a complex sentence?
The main problem here seems to be the word ‘complex’. Complex, in this situation, does not mean complicated, long or impressive. This is a common misconception and leads to students writing very long and grammatically incorrect sentences that are very difficult to understand.

For example:
In the modern world, global warming is one of the most popular topics causing many environmental difficulties and tough challenges arising from its serious consequences.’

This is a very typical sentence from an essay that is trying to be overly complex. This student has tried to put four simple ideas in to one paragraph and the result is an awkward and incoherent sentence. They have lost control of the grammar and this affects the meaning. When meaning is affected it stops the reading understanding what is being said and that is really bad for you IELTS writing band scores.
Complex’ sentences are not actually very complex; they are just simple two or more simple sentences put together. Putting them together makes the essay more coherent and cohesive.

Let’s look at the first example again. In the sentence above there are four simple ideas that we can put in to simple sentences:
1. Global warming is a common topic these days.
2. Global warming causes environmental problems.
3. There are tough challenges associated with global warming.
4. Global warming has very serious consequences.

If we write all of our sentences in the IELTS exam like this we lose marks because they are too simple. What we need to do is put them together to make complex sentences.

Complex Sentence Examples
For example:
One of the most common environmental issues is global warming which causes many serious environmental problems. There are tough challenges associated with this issue and its effects have very serious consequences.

I don’t think there is anything ‘complex’ about these sentences, just simple ideas, simply put together.
‘Complex’ is just a label, not a description.
What I have done is take each of the four simple sentences and put them together in two complex sentences. This result is a grammatically correct, easy to understand paragraph.

When should I use complex sentences?
In general, we should use simple sentences when making main points; normally at the beginning of a paragraph. We should then use complex sentences when expanding on the main point, for instance when giving a supporting example or explaining your main point.

Example:
This is a question about whether ‘fast food’ or ‘junk food’ should be taxed at a higher rate than normal food.
Increasing taxes would raise prices and lower consumption. Fast food companies would pass on these taxes to consumers in the form of higher prices and this would lead to people not being able to afford junk food. For instance, the cost of organic food has proven prohibitively expensive for most people. Despite this, people in many developed countries, where the problem is most acute, can afford price hikes and will continue to eat high fat meals.

The first sentence is the ‘topic sentence’ and makes the main point. It is therefore acceptable for this to be a simple sentence.
The second sentence explains the main point and uses the word ‘and’ to link two simple sentences together, to make one complex sentence.
The third sentence gives an example and uses the linking phrase ‘for instance’. The final sentence makes a concession (shows the limitation of the argument) and is also a complex sentence, linking more than one idea together.
This paragraph has a mix of simple and complex sentences and therefore satisfies the marking criteria.

How do I make a complex sentence?
Remember that a complex sentence is just more than one simple sentence put together to make one sentence. We therefore need to learn and become confident using the various grammatical structures that allow us to do that. Below are a few ways we can link ideas together in a sentence.

To make a complex sentence we normally should have two things- a dependent clause and an independent clause. A clause is a group of words with both a subject and a verb.
An example of a dependent clauses is ‘….because the weather was cold.’ This is a dependent clause because it has a subject and a verb but it doesn’t make any sense on its own. To make sense we need to add an independent clause.
As the name suggests, an independent clause can make sense on its own. For example, ‘I wore a warm coat.’ If we combine these two clauses we get a complex sentence- ‘I wore a warm coat because the weather was cold.’

As you can see, ‘complex’ sentences don’t have to be complicated. Let’s now look at other ways we can make complex sentences.

1. Relative Clauses
You can use relative clauses to give essential or extra information about a person, place, or thing. This makes our writing more fluent and more coherent. We do this by using relative pronouns like who, which and that. For example, ‘He’s the kind of person who is always friendly.’

For example:
Air pollution can cause health problems. Air pollution is largely caused by motor vehicles.
We can convert these two simple sentences in to one complex sentences by using the word ‘which’.
Air pollution, which is mostly caused by motor vehicles, can cause health problems.

For example:
There is evidence that some people are more likely to smoke. These people have parents and friends who smoke.
We can link both of these sentences together by using the word ‘that’.
There is evidence that people who have parents and friends that smoke are more likely to smoke.

2. Subordinate Clauses
A subordinate clause can describe nouns and pronouns; describe verbs, adverbs, and adjectives; or act as the subject or object of another clause. They are made by connecting an independent clause with a dependent clause with words like as, because, while, until, even though, although, when and if.

3. Conditional Clauses
Also known as ‘If clauses’, they are used to express that the action in the main clause can only take place if a certain condition is met.

For example:
If I had a million dollars, I would quit my job.
I will be really happy, if I pass the IELTS test.
These clauses are good for giving examples in IELTS writing part 2.

For example:
‘Increasing taxes would raise prices and lower consumption. Fast food companies would pass on these taxes to consumers in the form of higher prices and this would lead to people not being able to afford junk food. If the cost of organic food proves prohibitively expensive for most people, they will simply not buy it. Despite this, people in many developed countries, where the problem is most acute, can afford price hikes and will continue to eat high fat meals.’

They are also useful for talking about unreal situations or to speculate about results in the past or present.
There are four different kinds of conditionals which I will outline below:

Zero Conditionals are used to talk about information that is true or facts. We can use if or when to introduce the conditional.
Example: Nowadays when we travel long distances, we usually use air travel.

First conditionals are used to talk about things in the present or future.
Example: If the city’s population continues to grow, we will need to build more infrastructure.

Second Conditionals are used to talk about things that are impossible.
Example: If the sun didn’t come up tomorrow, we wouldn’t have any life on earth.

Third Conditionals are used to speculate about past events. It is often used when we regret something or to imagine a past unreal situation.
Example: The Second World War would have never happened, if Germany had been given a fairer peace settlement in Word War One.

4. Compound Sentences
Compound sentences consist of two independent clauses linked together with a conjunction such as ‘and’, ‘for’ or ‘but’.
Examples:
I really want to study, but I’m too tired.
She got to the test centre early, and she did really well on her IELTS test.
Some students think these sentences are too simple to count as complex but they are wrong.

Warning
The crucial thing is to understand and be able to use these grammar structures before your IELTS test. Some students memorise lots of structures and try to insert them in to their essays without giving much thought to how they work or if they are accurate. This will only lead to unnatural and incoherent sentences. Remember that your sentences need to be also error free so only use structures you are confident using.
They key is to only use them appropriately. Concentrate on answering the question and if you know how to use these structures they will flow naturally.

Next Steps
I hope this post has demonstrated that you can write your ideas down in a clear and simple way and still satisfy the marking criteria for complex sentences.
When you are practicing IELTS writing questions try to think of what you want to say in simple sentences and then think of how these might be linked in to complex sentences. After enough practice it will become a natural thing to do and your writing will really improve.

http://ieltsadvantage.com/

Thứ Năm, 10 tháng 12, 2015

Read - write file.txt in C++

We have the located file with name:   c:/input_data/matrix.txt, data1.txt, data2.txt….
Ex:
matrix.txt:        m00 m01 m02
                        m10 m11 m12
                        m20 m21 m22
C++:
Read 1 file matrix.txt:
CMatrix intrinsic_matrix(4);                                           //create matrix 4x4

string datain_file = “c:/input_data/ matrix.txt”;                  //direction of file
string sline;
istringstream ssline;
ifstream matrix_file;

matrix_file.open(datain_file);
if (!matrix_file.data()){
            cout << " matrix_file was not found!" << endl;
            exit(0);
}
for (auto i(0); i < 3; i++){
            getline(matrix_file, sline);
            ssline.str(sline);                                                      //Convert to stream
            ssline >> intrinsic_matrix(i, 0) >> intrinsic_matrix(i, 1) >> intrinsic_matrix(i, 2);
            ssline.clear();
}
matrix_file.close();

//-----------------------------------------------------------------------------------------------
data1.txt:          r00 r01 r02 t0,  data2.txt …        //include Rotation matrix and translation vector
                        r10 r11 r12 t1
                        r20 r21 r22 t2

Read all file data1.txt … datak.txt:             // k file data.txt

CMatrix extrinsic_matrix(4);                            //create matrix 4x4
CMatrix Rotation(3);                                        //Rotation matrix
CMatrix Rotation_Transpose(3);                      //Transposed matrix of the rotation matrix
CVector Translation(3);                                    //Translation vector

ostringstream RT_file;    
string sline;
istringstream ssline;
ifstream datafile;

for (auto i(0); i < k; i++){
      RT_file << “c:/input_data/ data”<< k << txt”;     //direction of file

datafile.open(RT_file.str());

if (!RT_file.str().data()){
       cout << " RT_file was not found!" << endl;
       exit(0);
}

for (auto i(0); i < 3; i++){
       getline(datafile, sline);
       ssline.str(sline);                                                      //Convert to stream
       ssline >> extrinsic_matrix(i,0) >> extrinsic_matrix(i,1) >> extrinsic_matrix(i,2);
       ssline.clear();
}
datafile.close();

 //It is necessary in order to homogeneous coordinates
intrinsic_matrix(3, 3) = 1.0; //fourth column,fourth row :1
extrinsic_matrix(3, 3) = 1.0; //fourth column,fourth row :1

for (int x(0); x<3; x++){
       Translation[x] = extrinsic_matrix(x, 3);                        //only 3rd column
       for (int y(0); y<3; y++){
                   Rotation(x, y) = extrinsic_matrix(x, y);
       }
}

//To return the initial state
RT_file.str(empty_string);
RT_file.clear();

}

Write to file .txt

CVector3d* Up_Camera;   //output

string camerafile = "D://output_file/Up_Camera_Position.txt";
ofstream outfile(camerafile);

for (auto i(0); i < k; i++){
                                                     //calculate the Up_Camera.x,y,z and then save:
….
outfile << Up_Camera[k].x << " " << Up_Camera[k].y << " " << Up_Camera[k].z << endl;


}

Thứ Ba, 8 tháng 12, 2015

How to Become a Computer Scientist

Being a Computer Scientist is not about programming; it is about the study of algorithms (a series of steps, understood by someone or something, in order to complete a task in a given number of steps). Many Computer Scientists don't program at all. Indeed, Edsger Dijkstra once said “Computer science is no more about computers than astronomy is about telescopes.”

Part 1 of 4: Starting out


  1. 1
    Become a lifelong learner. Being a computer scientist is all about learning to be a student, not just during training, but for all time throughout your career. Technology changes, new languages develop, new algorithms are devised: you need to be able to learn new things to stay current.

  2. 2
    Understand your future role. As a computer scientist, it is your job to solve problems. It is also about solving problems in a way which can leave everyone happy in the end. This means learning good communication skills as well as coding skills because you are more likely to match the needs of your client with the apt solution if you listen well and relay back your understandings clearly, as well as keep the client informed during the project.

Part 2 of 4: Writing pseudocode


  1. 1
    Start with pseudocode. Pseudocode isn't really a programming language, but it is a way to represent a program in a very English-like way. The most familiar algorithm to you is probably on your shampoo bottle: Lather, rinse, repeat. This is an algorithm. It is understandable by you (the "Computing Agent") and has a finite number of steps. Or does it ...

  2. 2
    Tweak the pseudocode. The shampoo example isn't a very good algorithm for two reasons: it doesn't have a condition to end on, and it doesn't really tell you what to repeat. Repeat lathering? Or just the rinsing. A better example would be "Step 1 - Lather. Step 2 - Rinse. Step 3 - Repeat steps 1 and 2(2 or 3 times for better results) and then finish(exit)." This is understandable by you, has an end condition (a finite number of steps), and is very explicit.

Part 3 of 4: Writing algorithms


  1. 1
    Try writing algorithms for all sorts of things. For example, how to get from one building to another on campus, or how to make a casserole. Soon, you'll be seeing algorithms all over the place!

  2. 2
    After you've learned how to write algorithms, programming should come naturally to you. Buy a book, and read it entirely to learn the language. Avoid online tutorials as they're often written by hobbyists, not professionals.
    • However, feel free to look for help on the internet. Object-oriented languages like Java and C++ are "in" right now, but Procedural languages like C are easier to start with because they deal solely in algorithms.

  3. 3
    Programming is only the translation of pseudocode into a programming language. The more time before programming you spend planning in pseudocode, the less time you'll spend typing and scratching your head.

Part 4 of 4: Algorithm analysis


  1. 1
    Read up on RAM (the random access machine). One of the best places to start is by reading Steven Skiena's book The algorithm design manual.

  2. 2
    Learn about the limiting behavior of functions. Read up on Big O notation.

  3. 3
    Read about how worst case inputs can break your algorithm or cost you heavily in CPU processing time. It is important to learn what ways can efficiently counteract them.
  4. http://www.wikihow.com/

Chủ Nhật, 15 tháng 11, 2015

How to Become a Programmer

Becoming a programmer is a cumulative process that builds up your skills day after day and year after year, and programming can be fun and rewarding (mentally, spiritually and financially). This guide does not promise to give a magically easy way to becoming a programmer, and the ordering of the steps is not sacred, but you'll get a general outline of how to become a programmer in one of the modern programming fields.

Steps

  1. 1 353
    1
    Take an introductory course in one (or all of them) of the following disciplines:
    • Logic
    • Discrete mathematics
    • Programming language (preferable C++/ Java/ Python for beginners)
  2. 2 243
    2
    Learn database concepts such as tables, views/queries and procedures. You can use any simple database package to do this, such as:
    • MS Access
    • DB V
    • Fox Pro
    • Paradox
    • MySQL is a good database to learn because it’s free, commonly used, and databases are commonly accessed with SQL queries
  3. 3 194
    3
    Decide what type of programmer you want to be. Programmers generally fall under one of the following categories:
    • Web programmer
    • Desktop application programmer
      • Operating system (OS) oriented programmer(tied to a single operating system or set of operating systems)
      • Platform-independent programmer
    • Distributed applications programmer
    • Library/platform/framework/core programmer
    • System programmer
      • Kernel programmer
      • Driver programmer
      • Compiler programmer
    • Programming scientist
  4. 38720 4
    4
    Learn the technologies and programming languages related to your programming field of choice. The following sections break down the tasks for different types of programming.

Method 1 of 6: Web Programming

  1. 5 113
    1
    Know what Web programming entails. Web applications are software components designed to work on top of the internet architecture. This means that the applications are accessed through a web browser software such as Firefox or Internet Explorer. Being built on top of the Internet architecture does not necessarily require an active connection to the internet. It means that Web applications are built on top of standard web technologies such as:
  2. 6 103
    2
    Browse many diverse websites to learn about how they usually look. (Right click, then click View Source or press F12.) Look for diversity in the type/content of the website, not the quantity of websites visited. Generally, you will need to visit at least one of each of the following types of websites:
    • Corporate presence sites (commercial corporations, not-for-profit corporate/organizations, governmental organizations)
    • Web indexing engines (search engines, meta search sites, specialized search engines, directories)
    • Data mining sites
    • Personal sites
    • Informational/encyclopedic pages (wikis, data sheets, technical specifications, and manuals listing directories, blogs and journals, news and news agencies sites, yellow pages, etc.)
    • Social sites (social portals, bookmarking sites, note-taking sites)
    • Collaborative sites (this includes other categories mentioned above, such as wikis and blogs)
  3. 7 74
    3
    Learn at least one brainstorming technique/method and a software that is used to implement that method. For example: brainstorming diagrams and MS Visio.
  4. 38720 8
    4
    Get familiar with website structuring. This is creating conceptual web diagrams, site-maps, and navigation structures.
  5. 38720 9
    5
    Take a crash course on graphics design. Try to learn at least one graphics editing/manipulation software package (optional, but strongly recommended)
  6. 10 38
    6
    Learn the basics of the internet infrastructure. This includes getting a basic idea about:
    • Base Web services protocols (HTTP, FTP, SMTP, and POP3 or IMAP4)
    • Web server software (preferably, one for the platform you will be working on mostly)
    • Web browsing software.
    • Email server and client software
  7. 11 39
    7
    Learn the HTML and CSS languages. You might also want to get the "What You See Is What You Get (WYSIWYG)" software package for editing HTML.
  8. 38720 12
    8
    Learn XML and XML related technologies, such as XSL and XPath (optional but recommended).
  9. 38720 13
    9
    Create simple static websites until you are familiar with and comfortable around HTML.
  10. 14 21
    10
    Learn a client-side scripting language. Most users learn JavaScript. Some learn VBScript, but this isn't compatible with most browsers.
  11. 15 18
    11
    Familiarize yourself with the client-side scripting language you learned.Try to reach your potential using only that language. Only go to the next step after you've at least become familiar with your client-side scripting language.
  12. 16 16
    12
    Learn at least one server-side programming language. If you choose to restrict yourself to one server software, learn one of the programming languages supported by that software. If not, learn at least one programming language on each server software.
  13. 17 18
    13
    Create a pilot project for yourself after you finish learning the server-side programming language.
  14. 18 13
    14
    Obtain your own website and start experimenting online within your own page.

Method 2 of 6: Desktop Application Programming

  1. 38720 19
    1
    Know what you're getting into with desktop application programming. Most desktop programmers write code for business solutions, so getting an idea about businesses, their organizational and financial structure will be a big time-saver.
  2. 38720 20
    2
    Learn about the different computer hardware architectures. An introductory level course in digital circuits design and another in computer architecture is useful; however, some see it as being advanced for a starting point, so reading two or three tutorial articles (such as this one and this one) might suffice. Then you can go back to this step later, after you learn your first programming language.
  3. 21 11
    3
    Learn an entry-level (kids') programming language. Don't be shy to learn such a language just because you're older than being called a "kid". An example of these programming languages can be Scratch. These programming languages can ease up the pain in learning your first programming language tremendously. However, this step is optional. It can also be done before the preceding step.
  4. 22 13
    4
    Get an introduction to the proceduralobject oriented, and functionalprogramming paradigms.
  5. 23 7
    5
    Take an introductory course in one of the procedural programming languages. No matter what language you choose later to be your language of choice, it will require procedural programming at some level. Also, procedural programming is reported by most programmers to be the easiest to use as a starting point to get the idea of programming in general.
  6. 24 8
    6
    Learn at least one advanced modeling technique such as UML or ORM.
  7. 38720 25
    7
    Start writing some small console or console-like applications. You can make use of common small exercises in programming languages books. For this, choose a tool for writing programs in the programming language you are writing in.
  8. 38720 26
    8
    Take a more advanced course in your chosen programming language. Make sure you understand the following concepts well and that you can apply them with relative ease before going forward:
    • Inputting and outputting information to users of a program.
    • The logical flow and the execution flow of programs in procedural languages.
    • Declaring, assigning and comparing variables.
    • Branching programming constructs such as if..then..else and select/switch..case.
    • Looping constructs such as while..do, do..while/until, for..next.
    • Your programming language syntax for creating and calling procedures and functions.
    • Data types and manipulating them.
    • User defined data types (records/structs/units) and their use.
    • If your language supports overloading functions, understand it.
    • The memory accessing methods of your language of choice (pointers, peeking, etc.)
    • If your language supports operators overloading, understand it.
    • If your language supports delegates/function pointers, understand it
  9. 27 5
    9
    Apply the advanced techniques you've learned.
    • Object-oriented paradigm.
  10. 38720 28
    10
    Take an introductory course in at least one more programming languagein another programming paradigm. It is recommended to learn one programming language of each paradigm, and most advanced programmers do, however, you usually start with one, work for a while applying your knowledge and practicing it, then learn the other later on, after you already had a real-life experience in programming. Try one of the following language areas:
    • Logic programming paradigm.
    • Functional programming paradigm.
  11. 38720 29
    11
    Try to compare the two programming languages you learned so far.Evaluate the strengths and weaknesses of each one. Usually this is done by:
    • Taking simple samples of your early work in the first programming language and re-write it using the second programming language.
    • Creating a new project and try implementing it using both languages. Sometimes, depending on your choice of project and languages, you might not be able to implement the project in one of the languages!
    • Writing a cheat-sheet or summary-table comparisons between similar constructs in the two languages and features unique to each of the languages.
    • Try finding ways to mimic features that is unique to one of the two languages using the other language.
  12. 30 6
    12
    Learn visual programming concepts using one of the languages you learned. Almost all programming languages have versions/libraries that support visual programming and others supporting console or console-like programming. This can be accomplished by:
    • Get an introduction to event-driven programming. Most visual programming relies in some level on events and events handling (using the programming language you choose).
    • Try as much desktop software as you can and understand what the software does. Most software development companies offer beta-testing versions of their products which you can use to test the software. Keep up-to-date on user interface advancements.
    • Read some articles or tutorials on graphical user interfaces.
  13. 38720 31
    13
    Start applying your knowledge on small software projects you design. Try applying your programming expertise on problems you face in your day-to-day life. For example, write programs that rename files in mass, compares text files visually, copies the names of files in a directory to memory/text file, and things like that. Keep it simple at first.
  14. 38720 32
    14
    Create a virtual graduation project. Complete this to the end, applying the techniques of visual programming you learned so far.
  15. 33 6
    15
    Widen your understanding of the visual framework/library/package you learned before by taking advanced courses, paying extra attention to detail and learning more tips and tricks for your framework from online resources.
  16. 38720 34
    16
    Search for other packages/libraries of visual elements for your programming languages and learn them.
  17. 35 1
    17
    Take a course in graphics (not graphics design). It will be very helpful for programmers wanting to write appealing user-interface elements.
  18. 36 4
    18
    Become a games programmer (optional). Game programming is considered, in most of its parts, desktop programming. If you intend to become a games programmer, you will need to learn more about game programming after you finish these steps. A graphics course is a must for game programmers and the second language of choice in the preceding steps should be a logic/functional programming language (preferably Prolog or Lisp).

Method 3 of 6: Distributed Applications Programming

  1. 38720 37
    1
    Tackle distributed applications programming.Distributed applicationprogramming is considered by many to be one of the hardest to learn and requires diverse knowledge in computer and communication technologies.
  2. 38 1
    2
    Take a speed introduction to telephony systems and their hardware. This step is optional. However, it is very useful in understanding network topologies.
  3. 38720 39
    3
    Familiarize yourself with networking hardware architectures and devices such as hubs, switches and routers.
  4. 40 3
    4
    Take a course in networking protocols and essentials. You need a good understanding of the Open Systems Interconnection (OSI) model, Ethernet, IP, TCP, UDP and HTTP before you start programming distributed applications.
  5. 38720 41
    5
    Learn the XML language and familiarize yourself with it.
  6. 42 4
    6
    Start by learning a shell scripting language. For Windows-based programming, that would be any script that works with Windows Scripting Host. For Linux-based programming, Bash scripts and Perl will be sufficient. JavaScript is strongly recommended for this in both platforms for the following reasons:
    • It is supported by almost any scripting host in any operating system (Windows Scripting Host supports JavaScript by default, most Linux distributions has a package for JavaScript scripting console support).
    • It is considered to be easier to learn by many developers.
    • It has an ALGOL derived syntax which familiarizes you with much more other programming languages when you need to choose a second programming language (CC++C#Java and J# all have ALGOL derived syntax).
    • By learning JavaScript, you familiarize yourself with client-side scripting of web pages which is a bonus side-effect!
  7. 38720 43
    7
    Apply only procedural programming using your scripting language of choice at first. Later, you can use more advanced programming techniques and paradigms according to your scripting language and what it supports. All scripting languages have some procedural programming aspects at some level.
  8. 38720 44
    8
    Use the scripting language you learned to write scripts that perform communications between machines. Learn what is necessary for doing that. Simple communications will suffice.
  9. 38720 45
    9
    Make a transfer to a desktop scripting/programming language. Preferably, one that is a multi-paradigm language such as Python. Take a simple introduction to that second language. Java is considered by most programmers to be the language of choice for many reasons. However, C# is gaining momentum fast in this field. Java and C# are preferred for the following reasons:
    • They are object oriented programming languages which shields programmers in large teams from implementation details as they both supports components (units of code, pre-compiled, that perform a certain task and can be used in other programs).
    • They support event-driven programming, as well as OO and procedural programming at some level.
    • The framework that the language is built upon is distributed by nature (in the case of Java).
    • The availability of many ready-made packages that deal with networking, both as open-source code and framework built-in packages; this makes it easier for programmers to build upon the work of others.
  10. 38720 46
    10
    Concentrate more on the core features of the language, especially those supporting networking. Pay less attention to user-interface elements such as outputting, window design and techniques, and user-interface elements.
  11. 47 4
    11
    Take a course on distributed applications design and architectures. This can be done using books, online tutorials or academic courses. However, understanding the architecture of distributed applications and its concepts is necessary.
  12. 48 1
    12
    Learn about building serviced components and services using your programming language of choice.
  13. 38720 49
    13
    Learn one or more of the following technologies. It is recommended that you get at least an introduction to all of them. Most distributed application programmers do not stop at one or two programming languages, but learn at least one programming language on each operating system. That is because if you want your application to be "distributed", you should provide a version of it at least for each major operating system.

Method 4 of 6: Library/Platform/Framework/Core Programming

  1. 50 1
    1
    Know what core programming is. Core programmers are merely advanced programmers who made the transfer from programming applications to programming code units to be used by other programmers.
  2. 38720 51
    2
    Learn a programming language that supports building reusable components/packages, if you have not done so already.
  3. 38720 52
    3
    Take an advanced course in UML and ORM. Most library developers use one or both of them.
  4. 53 2
    4
    Take a course in software engineering.
  5. 54 2
    5
    Learn at least modular, component-based, object-oriented, and event-driven programming techniques and concepts. The more programming paradigms and languages you cover, the more successful you become as a library/package programmer.
  6. 38720 55
    6
    Learn more about the different operating systems and programming frameworks supported by these operating systems.
  7. 56 1
    7
    Focus your learning efforts on platform-independent frameworks, programming languages and technologies.
  8. 38720 57
    8
    If the programming languages you learned so far have ANSI/ISO/IEEE/W3Cstandard versions, master the standards. Try to use standard code whenever possible.
  9. 58 2
    9
    Try to mimic simple, already established libraries, especially open-source ones. This is useful during the early phase of becoming a library/package programmer. Start with simple packages like units conversion and intermediate scientific calculations packages. If you are a college student, make use of your non-programming courses by trying to implement their equations and scientific core as libraries.
  10. 59 1
    10
    Search for and try open-source packages in your field of programming.First download binaries/executables of the package. Try to use it and find its strong and weak points. After you've done that, download the source and try to figure out how it was done. Try to recreate those libraries or parts of them. At first, do that after you've seen the code and later before you see the code. At later phases, try improving those libraries.
  11. 38720 60
    11
    Learn the different approaches used to distribute and deploy components to programmers.
    • Usually, library/package programmers tend to think recursively and/or iteratively of all problems they are presented with. Try to think of each problem as a collection of smaller problems (a sequence of simpler tasks) or as a repeated process of reducing the problem's scope to smaller scopes and then piling those scopes upon each other.
    • Library/package programmers tend to generalize. That is, when presented with a simple specific problem, they usually think of a more general problem and try to solve that general problem which will automatically solve the smaller one.

Method 5 of 6: System Programming

  1. 61 1
    1
    Understand what system programming entails. System Programmers deal withthe science of programming not the specific implementations of it. Do not tie yourself to a specific platform.
  2. 2
    Follow the first three steps for Desktop Applications Programmers.
  3. 38720 63
    3
    Take an introductory course in Linear Algebra.
  4. 38720 64
    4
    Take a course in Calculus.
  5. 38720 65
    5
    Take a course in Logic and/or Discrete Mathematics.
  6. 38720 66
    6
    Introduce yourself to different bare operating systems. This can be done by:
    • Getting an idea on how operating systems are installed.
    • Learning how to install different operating systems on one PC (optional, but recommended).
    • Installing more than one operating system. Do not install any helping packages on the systems; instead, use the bare functionalities provided by the operating systems.
  7. 67 1
    7
    Take a course (or alternatively, read books) on computer hardware architecture.
  8. 68 2
    8
    Develop an understanding of the different computer hardware platforms.
  9. 69 1
    9
    Get an introductory familiarization with the assembly language of the hardware platform/operating system of choice. You will later learn the assembly of other platforms/systems.
  10. 70 1
    10
    Learn the ANSI C and C++ languages, along with the concepts of procedural programming.
  11. 38720 71
    11
    Understand and practice C/C++ standard libraries on the platform of choice. Pay particular attention to Standard Template Library (STL) and maybe Active Template Library (ATL).
  12. 72 2
    12
    Search online resources, books and courses to get an understanding of the C-flavor of your specific platform.
  13. 73 1
    13
    Practice creating advanced code with C and C++.
  14. 38720 74
    14
    Learn more advanced Assembly.
  15. 75 1
    15
    Take a course in operating systems design.
  16. 38720 76
    16
    Find and read documentations of your specific platform of choice. This will be easier if you choose a Unix-based operating system. Understand the system you will be working with later very well.
  17. 77 2
    17
    Practice your acquired knowledge. First create small system utilities. It is usually useful to:
    • Trying to recreate small tools that are already there on your system.
    • Trying to port utilities available in other operating systems to yours.
  18. 38720 78
    18
    Learn languages in the most helpful order. This is the only place where the first programming language matters. Learn ANSI C first, not C++, not C#, not Java and not D. Then learn C++.
    • Restricting the first language to C and C alone is because systems programming requires that the programmer be familiar with the following concepts:
      • Real and full compilation of source code.
      • Low-level object output files.
      • Linking binaries.
      • Low-level machine-language/assembly programming. The C language is said to be a disguised/easier to learn assembly by some. It also supports inserting assembly language code in code whenever you please and it is only procedural (like assembly).

Method 6 of 6: Programming Science

  1. 79 1
    1
    Know what a programming scientist does. Programming scientists are very advanced programmers who, instead of working on developing applications, work on developing computing technologies such as encryption, programming languages and data mining algorithms. This level is seldom achieved without academic study and dedication.
  2. 80 1
    2
    Accumulate the scientific knowledge equivalent to a four-year degree in computer science. This can be done either by:
    • Taking an actual academic degree (which is what usually happens).
    • Getting the courses' outlines for such a degree from one of the modern universities and taking the courses either by self-study or as separate courses. This could be achieved theoretically, but the recommended path is the first.
  3. 38720 81
    3
    Decide a field of specialty. The more specific, the better. This depends on your preferences. However, here is a list of some of the major topics in computer programming science:
    • Algorithm design (searching, sorting, encryption, decryption and error detection in communications are some examples)
    • Programming languages/compiler design/optimization
    • Artificial intelligence fields (pattern recognition, speech recognition, natural language processing, neural networks)
    • Robotics
    • Scientific programming
    • Supercomputing
    • Computer aided design/modeling (CAD/CAM)
    • Virtual reality
    • Computer graphics (Computer graphics is usually wrongly confused with graphical design or graphical user interface design. Computer graphics is the field of studying how to represent and manipulate graphics in computer systems.)
  4. 38720 82
    4
    Consider getting a higher academic degree. You might wish to pursue a master's degree or a doctorate.
  5. 83 1
    5
    Learn the technologies and programming languages related to your programming field of choice.
                                                                                http://www.wikihow.com/