Web Design that taps into the haromny and vision of your dreams.

Introduction to Programming

Learn the basics of computer programming

Written By on in Software Engineering

667 words, estimated reading time 4 minutes.

Computer Programming is a profession where somebody writes a set of instructions for a computer to process and return a result. You may be very surprised to learn that the first computer program was written in 1842 by Ada Lovelace, daughter of the famous poet Lord Byron.

C# Programming Series
  1. Introduction to Programming
  2. What is C#?
  3. Your First Console Application in C#
  4. Introducing Methods and the Main() Function in C#
  5. Introducing C# Classes and Structs
  6. C# Data Types, Variables and Casting
  7. C# Program Flow Control and Entry Points
  8. Passing Parameters to Methods and Return Values in C#
  9. C# Access Modifiers and Scope
  10. C# Interfaces and Classes
  11. Using Namespaces in C#
  12. C# Conditional Statements
  13. Looping and Iteration in C#
  14. Using Arrays and Lists in C#
  15. C# Constants and Read-Only Variables
  16. Error and Exception Handling in C#
  17. Using Recursion in C#
  18. C# Operator List
  19. Class Inheritance in C#
  20. C# Class and Method Attributes Explained
  21. C# Class Constructors and Destructors
  22. C# Generics Variables
  23. XML Serialization and Deserialization
  24. C# String Formatting Examples

Programming is often thought of as a geeky and nerdy profession, but it is also obvious that creating software requires a certain amount of creativity. At the highest level, it must be clever but not complex, intuitive and easy to use. At the lower levels, creativity also plays an important role. Every line of code is like poetry, every instruction requires consideration of what came before it, and what comes after it. In this respect, programming is like writing a book or painting a masterpiece. Ultimately you have a finished product, but it's the sentences and the brush strokes combined, which is where the book, masterpiece or program truly comes to life.

What is a Program?

A program consists of a number of layers, the first being the User Interface. This is the part that you see on your screen, the buttons you click and the boxes you type into. Beneath that you have the Logical Layer, this is where the processing occurs. It takes uses the information you enter in the User Interface, does some number crunching and returns the results back to the user interface. More often than not, the logical layer will interact with the third layer - the Data Layer. This is where data is stored. The where and how does not concern us at this time, just be aware that it exists and is used to store and retrieve information.

What is a Program Made Of?

A program is made up of statements, often likened to sentences and called "a line of code". On its own it has structure and purpose, but without the context of the other statements around it, it isn't meaningful. Like a book, a program runs from the first statement, to the last, at which point it finishes and is closed. Unlike a book, the program can repeat itself, jump backwards and forwards through the chapters, return to the start or jump to the end.

Groups of statements are known as blocks of code and are often separated into distinct functions. A function is a block of code with a specific job to do that can be re-used anywhere else. When a function is used, we often say that it is "called". An example would be a program to calculate income tax for five people. Rather than writing the tax calculation code five times - one for each calculation - we can write the code once, turn it into a function, and call that function 5 times. This not only saves a lot of typing, but it also ensures that each of the five calculations are performed in exactly the same way. We can also call the function 10 times, 100 times or even 1,000,000 times without having to write it over and over again. This is called structured programming.

Programming Languages

A programming language is the language used to code the program, much like the language used to write a book. Although the fundamental concepts and general practices remain the same, the overall grammar (programmers call grammar syntax) changes between languages. Some programming languages are very "human" orientated, and are written as it you were saying an instruction, while others are a bit more convoluted and require a bit of thought as to what they are doing. The BASIC programming language is one of the easiest to start learning as it is one of the most human orientated, although it is limited. C and C++ are some of the more powerful languages and they allow you to do a lot more than BASIC, however they are much more difficult to understand and to write.

Microsoft C# is a relatively new language and combines aspects of various languages to form an easy to use language, but also powerful. It combines the ease of use of BASIC and Pascal with the flexibility and power of C and C++.

I have written a series of tutorials for learning C# which should help you get started in programming using a modern, easy to use language.

Last updated on: Tuesday 20th June 2017

 

Comments
DoktorThomas™

DoktorThomas™

You write, "I have written a series of tutorials for learning C# which should help you get started in programming using a modern, easy to use language."
Where is the link?

Reply to DoktorThomas™
Tim Trott

Tim Trott

Below the article. For some reason they were not showing, but they are there now.

Thanks for pointing that out to me :)

Reply to Tim Trott

 

Leave a Reply

Your email address will not be published.





If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Copyright © 2001-2018 Tim Trott, all rights reserved. Web Design by Azulia Designs

This web page is licensed for your personal, private, non-commercial use only.

Disclaimer, Privacy & LegalSitemapContact Me