Tuesday, 19 November 2019

Introduction to Flowchart

A flowchart is a formalized graphic representation of a logic sequence, work or manufacturing process, organization chart, or similar formalized structure. The purpose of a flow chart is to provide people with a common language or reference point when dealing with a project or process. It also works with psedocode to understand the algorithm in a graphical way.

Here is the list of shapes and their representation in the flowcharts.

Top Benefits of Flowchart

1. Visual Clarity

2. Efficiency Increase

3. Effective Analysis

6. Problem Solving

7. Proper Documentation

Wednesday, 13 November 2019

Introduction to pseudocode

Pseudocode is a simple language written in plain English and can not be executed or compiled. But explains the algorithm and resolution for a problem.
Actually I pseudocode is not a programming language. But it helps us to define the algorithm through a programming language.
The pseudocode should be rewritten by a programmer using a programming language to execute the code. Pseudocode really gives the idea of the algorithm, we can rewrite it in any language.

If the programmer should rewrite it, why do we need a new language?
Because…
Although it is in simple English, it is easy to understand. It's that much simpler. None programmers also can understand the code. 
I like to list some of the advantages of pseudocode.within programmers also other is language problem, pseudocode helps to have a good understanding of the algorithm. 
Because pseudocode is not itself an actual programming language, it can be used with any language. So it is a language-independent.
And it adds efficiency of the code most of the mistakes were made during planning. So fewer problems will be found during coding.
There are some alternatives to Pseudocode. Some of them are Flowcharts, drakon-charts and Unified Modified Language (UML) charts.

Keywords of pseudocode.
Keywords are the words that can be worked as commands or parameters. Every programming languages have their own keywords. 


START: This is the start of your pseudocode.
INPUT: This is data retrieved from the user through typing or through an input device.
READ / GET: This is input used when reading data from a data file.
PRINT, DISPLAY, SHOW: This will show your output to a screen or the relevant output device.
COMPUTE, CALCULATE, DETERMINE: This is used to calculate the result of an expression.
SET, INIT: To initialize values
INCREMENT, BUMP: To increase the value of a variable
DECREMENT: To reduce the value of a variable
(Source - blog from usejournal.com)

There also some arithmetical and logical keys
  1. + to add
  2. - to minus
  3. x to multiply
  4. / to division
  5. Mod to reminder
  6. And to and gate
  7. Or to or gate
  8. Not to not gate
Comparison keywords 
  1. =  is equal to
  2. ≠  is not equal to
  3. >  Is greater than
  4. < Is smaller than
  5. ≤ is smaller than or equal
  6. ≥ is greater than or equal

Thank you for your attendance, found anything good.. leave it in a comment.
Anything to improve… leave it in a comment…





Tuesday, 12 November 2019

Introduction to Node.js

As we have seen in the JavaScript's post, we have discussed that it can be executed in any browsers.
Node.js is a JavaScript runtime environment that executes the JavaScript code outside of browsers. Node.js let's developers use JavaScript to code backend, serverside to produce dynamic websites.
There are many top companies use node.js. GoDaddy, LinkedIn, IBM, eBay, PayPal and many more prefer node.js.
Node.js is well known for real time applications. Like chat applicatins, streaming servers, games and much more. 

Over the years, most of the applications were based on a stateless request-response framework. In these sort of applications, it is up to the developer to ensure the right code was put in place to ensure the state of web session was maintained while the user was working with the system.
But with Node.js web applications, you can now work in real-time and have a 2-way communication. The state is maintained, and either the client or server can start the communication.
( Thank you guru99.com)

Ya. In my words I could say node.js works like full duplex communication system.

Frequently asked questions about node.js.(from w3 schools)
What is Node.js?
Node.js is an open source server environment
Node.js is free
Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
Node.js uses JavaScript on the server
Why Node.js?
Node.js uses asynchronous programming!

A common task for a web server can be to open a file on the server and return the content to the client.

Here is how PHP or ASP handles a file request:

Sends the task to the computer's file system.
Waits while the file system opens and reads the file.
Returns the content to the client.
Ready to handle the next request.
Here is how Node.js handles a file request:

Sends the task to the computer's file system.
Ready to handle the next request.
When the file system has opened and read the file, the server returns the content to the client.
Node.js eliminates the waiting, and simply continues with the next request.

Node.js runs single-threaded, non-blocking, asynchronously programming, which is very memory efficient.

What Can Node.js Do?
Node.js can generate dynamic page content
Node.js can create, open, read, write, delete, and close files on the server
Node.js can collect form data
Node.js can add, delete, modify data in your database
What is a Node.js File?
Node.js files contain tasks that will be executed on certain events
A typical event is someone trying to access a port on the server
Node.js files must be initiated on the server before having any effect
Node.js files have extension ".js"

Gavel club

Gaval Club is a club that helps us to improve our English skills.
Gavel clubs are a way of providing Toastmasters’ self-improvement methods and materials to people who may be ineligible for regular membership due to age, inability to pay dues or other circumstances. Gavel clubs provide Toastmasters members and clubs with an excellent opportunity for community service. They can be found in high schools, colleges, rehabilitation institutions, hospitals and elsewhere. (Thank you university of kelaniya gavel club)

Responsibilities in gavel club

SERGEANT AT ARMS ( SAA)
The Sergeant At Arms is responsible for keeping and maintaining club property. 

AH COUNTER
He is the person who is counting the speakers ah, mm, long pause and short pauses. So that every speaker would be able to make themselves upgrading always. And also they can evaluate themselves 

TIMEKEEPER
 This gavelier is the person who manages the time. He remained the speaker about the time limits by displaying cards.

GRAMMARIAN
Grammarian is the one who looks after all the speaker's grammar mistakes and gives a report about every speaker at last.

TABLE TOPIC MASTER

It is a responsibility to conduct the table topic session. Give them the topic and organize the event is his responsibility.

GENERAL EVALUATOR

The General Evaluator carefully watches and listen to the whole meeting. He should give his all over report at last.


Below are the five advantages we, as students, get from gavel club.

Combat Fear
The fear to speak in front is a great obstacle for many to show up their talents. As IT students we need to speak in front to e put forward our project and in many situations. So gavel club helps us to beat up all the fears around public speaking.

Build Confidence
Confidence is the main key to success. To stand forward and say 'yes! I can make it'. The level of confidence will be definitely increased by gavel club.

Sharpen Leadership Abilities

Uki trains the students not only to become a developer, but it also feeds the students to be the next leaders. Gavel club also helps every student to be a good leader.

Improve Improvisation

To face any of the challenges in front of everyone without expecting…. Oh, that's a hesitating movement. But gavel club gives us the skill to perform anything spontaneously.

Introduction to Javascript


JavaScript is a high level interpreted scripting language. Here high level is defined by a programming language that have English words in it with all computerised words.

The main question many beginners asks, whether Java and JavaScript are same? Because of their names sounds similar most of them thinks both have a great connection. But we should understand that there is no connections between Java and JavaScript. It is architecturally, functionally different. As like car and carpet sounds similar there are no connections and similarities. 

The main role of JavaScript is to make a website alive. HTML is the language that helping us to build the structure and the elements of the web page. And CSS helps us to beautify the elements and design the element.

But Javascript gives some functions like pop up messages, small games, simple animated elements etc.

For most of the languages we should install it compilers and interpreters to run the source code for it. But in Javascript this doesn't needed, because all of our browsers run Javascript.

The extension of JavaScript is JS. The Javascript file will be like “filename.js”.
There were so many frameworks have been created based on Javascript. For example Angular, Vue.js, React.js, Note.js and much more..

The Usage of Javascript.

Web development - Javascript is plays a leading role in both front and back ends. JavaScript based frameworks also in a great way in the web development industry.
Web application – Javascript is a great tool to build web applications too. To run a server based programmes most programmers prefer Javascript.
Server application – Javascript helps us to build and to run a server based application.
And smart watch application, games, presentations, and many more…

Here I like to share 2 sample keywords used in Javascript.

First one is the var keyword, which means variable.
To declare a variable we should type like follows
var (identifier) = (value);
identifier is a name for the variable to call it anywhere,
value is the content of that variable we are going to assign.

The second is comment
All the words in the code will be read by the computer, but here we say the computer ‘Hey this is for me not for you… :)’. Simply a content that only programmers can read, which a machine couldn't read.
To comment something we have to use ‘/’ twice and then we can write our comments.
Var x = 6; //here I have assigned 6 to the x variable

Monday, 11 November 2019

Understanding Programming Languages


In this post we are going to discuss about Programming language.

What is a programming language?

As we discussed in the last post we communicate with computer with the help of Interpreters and compilers. Here the programming language is refers to a language that helps us to interact with computer using compilers or interpreters. According to Wikipedia A programming language is a formal language, which comprises a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms.
Few  programing languages

Why are there so many programming languages.

As we know there are many programming languages in all over the world. And still there are languages invented and launched for the world. So here question arise ‘why do we need all these languages instead of one?’. I could say for example there are so many types of vehicle all over the world. Cycle, Motor cycle, Car, Three wheeler etc. But still there are inventions and researches all over the world to make something new in model, usage and many more.
Here from the example we can understand not a single vehicle couldn't fulfil all our needs. The work a bulldozer does couldn't be done by a car. So there are many. 
Same wise programming languages too have their tasks and purpose they made for. And special features are coming on the way so we need more languages to fulfil the tasks.
Lets see the main three divisions of full stack development and the languages used for that purpose.

Front-End Development

Front end means a side of a website which a user can see.It deals with the design and interface. For example all the images, text alignement, backgrounds and many more. HTML, CSS and Java script are the three main languages used in Front end development.

Database

Database management is the other main part of web development. The storing, reading and changing data are considered in this side. Languages like Mongodb, Mysql and many more.

Back-End Development

Back End deals the interaction between front end and the database. For example if you click drafts in your email account, you get all the draft emails that already saved in a server database. Designing and developing that type of functions and the things known as Back end Development.

Programming fundamentals


In this post lets discus some of the programming fundamentals.

What is a computer?

When our instructor asked the same question in our class there were dozens of answers were arising.
It is a machine, where we can save data.
It is an electronic machine that simplify our work.
Were some of the common answers.
But we could say Computer is a programmable machine. This means it can execute a programmed list of instructions and respond to new instructions that it is given.
And the main function that a computer does is to process a set of data and make it to a valuable information. 

Computer is a machine and it doesn’t know any humans language. As we discussed earlier we have to give the instructions to the computer to make the things happen.
Compilers and Interpreters are the components that help us to fulfil the task. We know languages, But if any time comes to speak with a person who doesn’t know any of our language we could use a person who could speak both of our language to translate the conversation. The same job is done by compilers and interpreters. It stands between us and the machine, which is a computer, and translate our commands and instructions.

What are interpreters and compilers?

Although both are doing the same thing there are several differences between them.

Translation

Interpreter translates the code statement by statement. But compilers translates the whole code at once.

Time

To analyze the code Interpreter take a short time, While compiler take a long time. But to execute the code compiler is faster than interpreter.

Memory

When we talk about memory interpreters does a good job, because compilers read the whole source code into an object code. So compilers consume memory. But interpreters doesn’t create any object code, so interpreters are memory efficient.

Debugging

Debugging is correcting the errors in a code. Interpreters stop the execution when the first error found. So it will easy to debug, But Compilers read the whole document and states all errors so difficult to debug, comparing to interpreters.

Languages

Python, Ruby and some other languages use interpreters. C, C++ use compilers.
**Some languages use compilers and interpreters both.

I hope you may get some knowledge about interpreters and compilers. 
In the next post we shall discuss about programing language