diff --git a/1 - Introduction/1.1 - Who Is This Book For.tex b/1 - Introduction/1.1 - Who Is This Book For.tex new file mode 100644 index 0000000..987fdd5 --- /dev/null +++ b/1 - Introduction/1.1 - Who Is This Book For.tex @@ -0,0 +1,12 @@ +This book is intended for everyone. +\newline +\\ +This book is meant to be useful to programmers of all levels, those who have never programmed before, those who are just +getting started and even those who have been programming for years. +Since this resource will always be growing and changing as the industry changes the information should always be in some +way applicable for all developers. +\newline +\\ +Those who are familiar with programming are most likely going to be able to skip the chapter "Getting Started" and in +some cases might not read the book in sequential order, but rather skip around picking and choosing which sections are +applicable to them. diff --git a/1 - Introduction/1.2 - Code Examples.tex b/1 - Introduction/1.2 - Code Examples.tex new file mode 100644 index 0000000..2708960 --- /dev/null +++ b/1 - Introduction/1.2 - Code Examples.tex @@ -0,0 +1,7 @@ +All code examples in this book use a sudo language that is not meant to be run or compiled directly. +I have chosen to use this approach so that the concepts can be extracted and implemented in any language +on any platform. +\newline +\\ +I will cover how to use the sudo language and how to translate it to a useable programming language +in the chapter "Getting Started" and section "Sudo Language". diff --git a/1 - Introduction/Introduction.tex b/1 - Introduction/Introduction.tex index 8b13789..622dd4c 100644 --- a/1 - Introduction/Introduction.tex +++ b/1 - Introduction/Introduction.tex @@ -1 +1,16 @@ - +Programming In General is meant to be used as a resource to learn the concepts of computer programming that can be applied to any +language or platform. +\newline +\\ +This resource is and always will be provided for free. +\newline +\\ +This resource is currently a work in progress so please bear with me if any particular sections or chapters are in complete or +if sections contain less than correct information. +If you have any comments, questions, suggestions or corrections please feel free to contact me by e-mail at: +\newline +brett@blangdon.com +\newline +\\ +Thank you and enjoy. +\pagebreak diff --git a/2 - Getting Started/1.1 - Choosing A Programming Language.tex b/2 - Getting Started/1.1 - Choosing A Programming Language.tex new file mode 100644 index 0000000..0344503 --- /dev/null +++ b/2 - Getting Started/1.1 - Choosing A Programming Language.tex @@ -0,0 +1,34 @@ +It is wonderful that you have decided to undertake the hobby of computer programming, but which language should you choose: Python, PHP, Java, C\#, +C/C++, VB, Ruby, Scala, Groovy, Javascript, or one of the thousands of others languages available to programmers. There are many factors to consider +when choosing a programming language especially when getting into programming for the first time: paradigm, syntax, platform and even just the +coolness factor. +\newline + +\subsection{Paradigm} +A languages paradigm refers to how the language is constructed. For example the three mainly disucessed paradigms are Functional, Object Oriented +and Multi Paradigm. Functional refers to languages that are based around completing tasks using Mathematical functionals; C is an example of +a functional language because it does not support the use of classes or objects. Object Oriented languages on the other hand are constrcuted +by designing classes and objects to complete your programming tasks; Java is an example of an Object Oriented programming language because +regardless of the type of program you develop you are forced into using classes and objects. Multi Paradigm languages are usually a mix +of more than one paradigm. For example Python is a Multi Paradigm language because you can choose whether or not to use classes and objects +when programming. + +\subsection{Syntax} +A languages syntax is very important when choosing a language. This is mainly going to be a personal preference. Personally I like C style +sytanx languages like C,C++,Java,PHP,Javascript,etc. Other people might prefer other languages because their use of other syntax styles. Your +personal preference will come with time as you move from one language to another and develop your own personal style and preferences. + +\subsection{Platform} +This is a very important factor when choosing which programming language to use. What platforms do you have available to use? Do you only have +a Windows computer at your disposal? That might remove some of the options out there as some languages might not support developing on a +Windows machine. + +\subsection{Coolness} +What seems cool to you? Right now as I write this a lot of people are trying out Node.JS (even myself) as it is somewhat new and exciting. +What do you want to learn? Does the idea of developing real time event based web applications seem cool? Then maybe you should check out +Node.JS. Prefer to develop Windows based desktop applications, why not try out C\# or Vb? Go with what you feel. + +\subsection{Conclusion} +Advice, if after doing some research you are still unsure which lanauge you want to use, especially for going through this resource try out +Python. Python is available for every platform, or at least all of the ones I can think of, it is interpreted and lastly it's syntax is +going to be one of the closest to the sudo langauge that this book uses. diff --git a/2 - Getting Started/1.2 - Sudo Language.tex b/2 - Getting Started/1.2 - Sudo Language.tex new file mode 100644 index 0000000..6a7368e --- /dev/null +++ b/2 - Getting Started/1.2 - Sudo Language.tex @@ -0,0 +1,132 @@ +For the code examples presented in this resource I am going to be using a sudo language. The concept behind a sudo language +is to be able to present programming concepts in a language agnostic form so that the concepts can be translated to your +language of choice. +\newline +\\ +So it is great that you have chosen lanauge X to use throughout this book, but how is the sudo lanauge going to help you out? +Well, lets walk through a few examples and I will show you how the examples get translated to a few various languages. + +\subsection{Example 1} +\begin{lstlisting} +name = "Brett" +if name == "Brett" + print "Name Is Brett" +else + print "Name Is Not Brett" +\end{lstlisting} + +In this example we have a variable called "name" that we are assigning the value of "Brett". Then we are checking if the +variable name is equal to the value "Brett", if so then we want to print "Name Is Brett" otherwise if it does not then we want to +print "Name Is Not Brett". As far as programming goes this is a fairly simple process but lets try and translate this example +to a few different languages to see how it is done. + +PHP: +\begin{lstlisting} +name; + } + + public function setname( $newName ){ + $this->name = $newName; + } +} +\end{lstlisting} diff --git a/2 - Getting Started/Getting Started.tex b/2 - Getting Started/Getting Started.tex new file mode 100644 index 0000000..3ed1136 --- /dev/null +++ b/2 - Getting Started/Getting Started.tex @@ -0,0 +1,3 @@ +This chapter will cover how to get started with programming, how to choose which language or platform to start with and how to go about +using this resource. +\pagebreak diff --git a/2 - Functional Programming/Functional Programming.tex b/3 - Functional Programming/Functional Programming.tex similarity index 100% rename from 2 - Functional Programming/Functional Programming.tex rename to 3 - Functional Programming/Functional Programming.tex diff --git a/3 - Object Oriented Programming/Object Oriented Programming.tex b/4 - Object Oriented Programming/Object Oriented Programming.tex similarity index 100% rename from 3 - Object Oriented Programming/Object Oriented Programming.tex rename to 4 - Object Oriented Programming/Object Oriented Programming.tex diff --git a/4 - Data Structures/Data Structures.tex b/5 - Data Structures/Data Structures.tex similarity index 100% rename from 4 - Data Structures/Data Structures.tex rename to 5 - Data Structures/Data Structures.tex diff --git a/5 - Algorithms/Algorithms.tex b/6 - Algorithms/Algorithms.tex similarity index 100% rename from 5 - Algorithms/Algorithms.tex rename to 6 - Algorithms/Algorithms.tex diff --git a/Programming In General.tex b/Programming In General.tex index f101bb9..6712b68 100644 --- a/Programming In General.tex +++ b/Programming In General.tex @@ -15,15 +15,30 @@ \chapter{Introduction} \input{"./1 - Introduction/Introduction"} +\section{Who Is This Book For} +\input{"./1 - Introduction/1.1 - Who Is This Book For"} + +\section{Code Examples} +\input{"./1 - Introduction/1.2 - Code Examples"} + +\chapter{Getting Started} +\input{"./2 - Getting Started/Getting Started"} + +\section{Choosing A Programming Language} +\input{"./2 - Getting Started/1.1 - Choosing A Programming Language"} + +\section{Sudo Language} +\input{"./2 - Getting Started/1.2 - Sudo Language"} + \chapter{Functional Programming} -\input{"./2 - Functional Programming/Functional Programming"} +\input{"./3 - Functional Programming/Functional Programming"} \chapter{Object Oriented Programming} -\input{"./3 - Object Oriented Programming/Object Oriented Programming"} +\input{"./4 - Object Oriented Programming/Object Oriented Programming"} \chapter{Data Structures} -\input{"./4 - Data Structures/Data Structures"} +\input{"./5 - Data Structures/Data Structures"} \chapter{Algorithms} -\input{"./5 - Algorithms/Algorithms"} +\input{"./6 - Algorithms/Algorithms"} \end{document}