Category Archives: Programming

Procedual & Modular Programming

Procedure-orientated programming is a type of programming where a structured method of creating programs is used. With procedure-orientated programming, a problem is broken up into parts and each part is then broken up into further parts. All these parts are known as procedures. They are separate but work together when needed. A main program centrally controls them all.

Some procedure-orientated languages are COBOL, FORTRAN and C.

 

Object-orientated programming is a type of programming where data types representing data structures are defined by the programmer as well as their properties and the things that can be done with them. With object-orientated programming, programmers can also create relationships between data structures and create new data types based on existing ones by having one data type inherit characteristics from another one.

In object-orientated programming (OOP), data types defined by the programmer are called classes (templates for real world objects to be used in a program). For example, a programmer can create a data type that represents a car – a car class. This class can contain the properties of a car (colour, model, year, etc.) and functions that specify what the car does (drive, reverse, stop, etc.)

Some object-orientated languages include C++, Java and PHP.

Advertisements

The Different Generations of Languages

There are currently five generations of computer programming languages. In each generation, the languages syntax has become easier to understand and easier for humans to read.

  • First generation languages (1GL) – Represents the very early, primitive computer languages that consisted entirely of 1’s and 0’s – the actual language that the computer understands (machine language).
  • Second generation languages (2GL) – The second generation is a step up from the first generation languages. It allows for the use of symbolic names instead of just numbers. Second generation languages are known as assembly languages. Code written in an assembly language is converted into machine language (1GL).
  • Third generation languages (3GL) – With the languages introduced by the third generation of computer programming, words and commands (instead of just symbols and numbers) were being used. These languages therefore had syntax that was much easier to understand. Third generation languages are known as “high level languages” and include C, C++, Java and Jacascript, among others.
  • Fourth generation languages (4GL) – The syntax used in 4GL is very close to human language, an improvement from the previous generation of languages. Fourth generation languages are typically used to access databases and include SQL and ColdFusion, among others.
  • Fifth generation languages (5GL) – Fifth generation languages are currently being used for neural networks. A neural network is a form of artifical intelligence that attempts to imitate how the human mind works.

Computer Programming Languages

There are many different types of languages. Not any computer programming language can do anything you want – there are limitations! Actually, different languages are used for different tasks and catered specifically for their own individual use.

 

Web Languages:

These are used for creating and editing pages on the web and can do anything from putting plain text on a webpage, to accessing and retieving data from a database. The different languages vary greatly in terms of power and complexity. Some of these languages shall be taught and learned throughout the degree I am studying here at BU and there is already one that I am highly familiar with – HTML.

  • HTML – Or the less abbreviated version Hyper Text Markup Language. It was invented by a British man named Tim Berners-Lee and the initial release was in 1993. It’s the core language of the world wide web (WWW) that is used to define the structure and layouts of web pages. HTML is written in the form of various HTML elements consisting of tags and attributes enclosed in angle brackets. HTML content is static – in other words the content does not move / does not change. This language does not specify how the page functions, only what it contains.
  • Javascript – This is a language developed by Netscape used to provide dynamic and interactive content on webpages. By using Javascript it is possible to communicate with HTML, create animations, create calculations, validate forms, etc.
  • XML – This is a language developed by the W3C and stands for Extensible Markup Language. It works like HTML, but unlike HTML, it allows for custom tags that are defined by programmers. XML allows for the transmission of data between applications and organisations through the use of these custom tags.
  • PHP – Hypertext Preprocesser is a powerful language used for many tasks such as data encryption, data access and form validation. It was created in 1994 by Rasmus Lerdorf to make this very thing possible.
  • Java – This is a language that usually gets confused with Javascript. These are two very different languages. Java is a highly powerful and flexible language created by Sun MircroSystems. It’s used to create applets (a program that’s executed from within another program) that run inside webpages as well as software applications. The things you can do with Java include interacting with the user, creating graphical programs, reading from files and a whole bunch of other stuff!

 

Software Languages:

Software laguages are used for creating executable programs and can create anything from simple console programs that print some text to the screen to entire operating systems. The different types of software languages also vary greatly in terms of power and complexity.

  • C – This is a an advanced programming language used for software application development. Originally developed by Dennis Ritchie in 1970 and was initially designed to be a systems programming languagte, but since then it has proven itself to be able to be used for various software applications such as business programs, engineering programs and even games. The UNIX OS is written in C.
  • C++ – A descendant of the C language. The difference between the two languages is that C++ is object-orientated. C++ is very popular for graphical applications.
  • Visual Basic – Developed by Microsoft and based on the BASIC language. Visual Basic is used for creating Windows applications.
  • Java – This is a language that usually gets confused with Javascript. These are two very different languages. Java is a highly powerful and flexible language created by Sun MircroSystems. It’s used to create applets (a program that’s executed from within another program) that run inside webpages as well as software applications. The things you can do with Java include interacting with the user, creating graphical programs, reading from files and a whole bunch of other stuff!

 

Introduction to Programming

This week I was introduced to what programming is as a whole, the misconceptions of programming, the programming vocabulary and last but not least an IDE (Integrated Development Environment) called Processer that is a software application used for Software development.

Programming is a set of instructions. These insctructions are written in particular types of languages to then be interpreted by a machine (usually with the goal of creating software). There are many programming misconceptions that gets thrown about:

  1. You have to be good at maths – False!
  2. Java and Javascript are not the same thing. They are both C based languages, but two very different languages.
  3. Programming isn’t creative. Of course it is, we create our own world and rules within it!
  4. Programming is too difficult.

Programming Vocabulary:

  • IDE – Integrated Development Environment.
  • Variable – Bulding blocks for all programming. Could be a number, a string of text or elements.
  • Parentheses – Open and closed brackets like this ( )
  • Functions & Methods – A whole set of instructions for one particular demand such as drive to my house. You would then save that as a function, but a method is saved to a Class.
  • Class – A class allows us to create a blueprint for everything.
  • Instance – When we create a person or an object it will be an instant of the class.
  • Data Type
  • Loops – When an instruction plays over and over again until the conditions are not met.
  • Compiler – When we’re typing a code and then we hit GO/Play.
  • Conditional Statement – Will tell you if a statement is true or false.
  • OOP (object orientated programming) – An example is if in a game something happens at the top of the screen, it will trigger something to happen at the bottom of the screen.