JavaScript

JavaScript is the language used on web sites to control your browser.  It’s not to be confused with the similarly named language “Java”.  They’re two completely different animals.

JavaScript is an interpreted language, meaning there’s a JavaScript engine that reads the JavaScript source code at run time and interprets it, line by line, and takes action then.  This is unlike compiled languages like C or C++, which are converted from source code to machine code, for quick execution.  Since JavaScript is an interpreted language, it is fairly slow in comparison to compiled languages.

But, the fact that it isn’t compiled into machine code before it’s sent to your browser, means that it can run on just about any hardware and any operating system from Windows, to Mac, to Linux, to cell phones.  It sacrifices speed for portability.

JavaScript’s main purpose is to control the user interface of web pages.  JavaScript code can animate items across your browser, can switch focus to a specific control, can validate data you enter onto a web form before you submit it, can change colors of page elements, and a whole plethora of other things.

LINQ – Language Integrated Query

LINQ (pronounced “link”) is a new technology added to .NET in the v3.5 release and first made available via the C# language and later added to VB.NET.  The purpose of LINQ is to provide SQL like query syntax directly in the standard .NET programming languages to allow you to query against any data structure in .NET that supports the IQueryable interface.  In other words, arrays, collections, and generic lists.

LINQ is not a “database” feature.  It’s a language feature that lets you query in-memory objects.  These objects don’t need to be related to a database in any way, shape, or form.  Having said that, it works wonderfully with querying databases directly from C# code too, but that’s with the Linq To SQL technology.  There are other implementations for Linq such as Linq to XML and some 3rd party software providers have provided custom Linq capability to their own products.

The best way to learn it, from my experience, is to see examples of it and try it yourself.

Here are 101 Linq examples.

Here’s a nice GUI utility to practice your Linq queries in.

image

Linq Pad

Hexadecimal (Base 16 Numbers)

The base 10 numbering system is the numbering system we all know and love.  It’s called base “10” because there are 10 unique digits to represent all values.  Those digits are 1-9, plus the zero digit, for a total of 10.

There are other numbering systems with different amounts of digits.  For example, binary only has two digits (1 and 0), Octal has 8 digits (0-7), then there’s base 10 (0-9), and finally Hexadecimal (or just “Hex” for short), which is base 16, with 16 unique digits (0-9, A-F).

To count in hex, you start just like you do in decimal (“decimal” is another name for our familiar base 10 numbering system):

  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

But, in hex, you don’t carry a 1 once you pass 9, like you do in decimal.  Instead, you just keep counting with single digits.  Hex uses the letters A, B, C, D, E, & F as numerical digits.  So, to continue counting past 9…

  • A
  • B
  • C
  • D
  • E
  • F

Just like in decimal, when we reach our last digit, we carry a one and start over:

  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 1A
  • 1B
  • 1C
  • 1D
  • 1E
  • 1F
  • 20
  • 21

etc…

Note that 10 in decimal is “ten”, but 10 in hexadecimal is “sixteen”.  How do you determine whether someone means ten or sixteen when they write 10?  Well, if they don’t put any special symbols before or after the 10, then it’s assumed to be base 10 (or “decimal”).  If they intend for it to be hexadecimal, then they write it like this: $10  or like this: 10h  or like this: x10  or like this: #10.

What is hexadecimal used for?

It’s used primarily in computer programming.  It turns out that hex converts well from binary and back again.  We all know how computers like binary.  Though, binary is difficult to read, even for programmers, and binary numbers take up a lot of space.  For example, 100000000 in binary is the same as 256 in decimal.  To display that same value in hex, it’d be $100.  Just a side note:  If you subtract one from that number, here’s what it’d look like in binary, hex, and decimal:

  • 11111111% (binary)
  • 255 (decimal)
  • $FF (hex)

Every character in a hex number, equates directly to 4 binary digits.  This is what makes hexadecimal and binary such good bases to convert between.  Another thing that makes hex good for programming is that 2 hex digits represent 8 bits, which is a byte.  So, any byte value is simply 2 hex digits.

Have you ever looked at the HTML code that makes up a web page?  Just open your View menu in your browser right now and choose “Source” or “Page Source”.  Somewhere in that HTML code you’ll see something about color, then a 6 character hex number.  One common hex number in HTML code is #FFFFFF.  This is because most computer displays can display 16.7 million colors.  16.7 million happens to be the largest number than can be represented in 24 bits.  24 bits is 3 bytes.  3 bytes can be represented with 6 hex digits.  Color information is represented with 3 bytes.  Each byte being a value between 0 and 255 inclusive.  The 1st byte represents the shade of red.  The 2nd, green, the 3rd, blue.  Combinations of those 3 primary colors make up all the 16.7 million colors (256*256*256 = 16.7 million).  So, the color value represented by the hex number #FFFFFF says the red shade should be at it’s brightest (the first “FF”), as well as the green and the blue shades.  When all 3 primary colors are equal, you get a shade of gray.  When they’re all maxed out, you get white.  So, #FFFFFF represents the color white.  #FF0000 is red.  #00FF00 is green.  #0000FF is blue.  #FF00FF is purple (all red, all blue, no green), etc…

Open Source Software

Open Source Software is software that comes with the source code.  Sometimes, only the source code is provided.  The benefit to the person receiving the software is that they can make any changes they want at any time.  If they find a bug, they can fix it.  Also, if the source code is provided, it’s extremely unlikely that there’s any malicious code in the software because it would be blatantly obvious.  You can’t really hide malicious code if you provide the source code too.  This is only possible if the source code is provided.

There’s a common misconception though about open source software.  Not all of it is free.  There are many commercial products that charge for their software, but happily give the source code to their paying customers.

Then again, there is totally free open source software too.  There seems to be much more of this type of open source software.  There are open source software groups and organizations and web sites that do nothing but host or produce free and open source software.

The Linux Operating System is probably the largest example of Open Source software.  Linux is a completely free operating system and the source code to it is freely available.  Anyone can download and install Linux without having to pay anyone and anyone can get the source code to Linux and make whatever changes their hearts desire.

Here are some good online sources for Open Source software:

SQL – Structured Query Language

SQL (pronounced sequal) is a language used for retrieving data from a database.  There’s no hard and fast, universal standard of this language, but over the years, most database vendors have supported very similar variants.  If you learn SQL from one major database vendor, you won’t have much trouble applying your knowledge to another database.

How do you use SQL?

Consider the following database table and let’s assume the name of the table is “People”:

FirstName LastName Age
John Smith 30
Mary Jackson 24
James Martin 36
John Adams 72

If you wanted to retrieve all of the records (all 4 of them) from that table, you’d write a SQL query like this:


  1: SELECT
  2:     FirstName,
  3:     LastName,
  4:     Age
  5: FROM
  6:     People
  7: 

This tells the database which columns to retrieve data from and which table to retrieve it from.  The result would be:

FirstName LastName Age
John Smith 30
Mary Jackson 24
James Martin 36
John Adams 72

Now, suppose you just want to retrieve all people who’s first name is “John”:


  1: SELECT
  2:     FirstName,
  3:     LastName,
  4:     Age
  5: FROM
  6:     People
  7: WHERE
  8:     FirstName = 'John'

The “Where” clause stipulates that you only want records from the table whose value in the FirstName is ‘John’.  This results in the following:

FirstName LastName Age
John Smith 30
John Adams 72

There’s no limit to how complex a query you can write.  It’s not uncommon to have a query that’s hundreds of lines long, retrieving data from multiple tables in the database.

Any program that writes or reads data to or from a database, almost certainly does so with SQL queries.

Classic ASP – Active Server Pages

image Once called “ASP”, but now called “Classic ASP”, because it’s been replaced by ASP.NET, is Microsoft’s first implementation of a technology to let developers create web applications with code that runs on the server to provide actual functionality, as opposed to just static HTML that has no functionality.

Microsoft provided 2 languages that could be used on the server side:

  1. VBScript
  2. JScript

VBScript was a variant of Visual BASIC and was not object oriented at all.  JScript was a much better language, but almost no one used it.

To create a web page using classic ASP technology, a developer would write the HTML, then would embed snippets of VBScript code throughout the HTML.  Additionally, if the VBScript needed to read or write to a database, the programmer would also embed SQL (a database language) snippets throughout the file.  And, if the developer wanted any client side functionality (like changing focus on a text box or validating data before posting, for example), he would also embed JavaScript throughout the file.

This make one, gigantic, huge, ugly mess of 4 languages intermixed in ONE source file.  On top of that, variables were untyped, leading to programming errors, and the code was interpreted at run time, instead of compiled, reducing performance.

Fortunately, that technology was superseded in February of 2002 with the full release of v1.0 of the .NET Framework.

image Now, with ASP.NET, the server side code is in its own source file, is written in either C# or VB.NET (both fully object oriented languages), and the only thing in the HTML file is HTML and JavaScript.  The server side code is compiled (so it’s fast), and all variables are fully typed, leading to fewer errors and many errors being caught by the compiler before the application is even run.  A full debugger is also provided.

Ecma International

image Ecma International is an organization that deals with computer related standards.  ECMA used to be an acronym for “European Computer Manufacturers Association”, but since they are now an international organization, the name has been changed to Ecma (not an acronym) International.

Ecma is the standards body that is made up of industry experts to define standards for technologies such as JavaScript, C#, and the CLI (Common Language Infrastructure (a .NET technology).

MSIL (or IL) – Microsoft Intermediate Language

MSIL or just “IL” is a byte code file format that programs written for the Microsoft .NET technologies are stored in.  Unlike native programs that contain actual machine code that the CPU can process directly, these programs have instructions that can’t be executed by any real world processor.  The purpose for this is so that the one binary file can be executed on multiple hardware and Operating System platforms without modification.

For example, say you’re writing a program that’s a simple text editor and you’re using the C# programming language.  This language is a .NET language and when you compile your source code with Microsoft Visual Studio, you’ll end up with a file whose name ends in “.EXE”.  You can double-click the file and you’ll see your newly written text editor run as any other normal Windows program.  But, unlike a normal Windows program, you can take that file and copy it directly to a Linux machine or a Macintosh and run it without modification (assuming the Mac and the Linux box have the Mono framework installed).

This is possible because the program is not compiled to native machine code and it doesn’t have operating specific instructions in it that would lock it into just one OS.  The .NET runtime on a Windows machine (as well as the Mono runtime on a Linux or Mac) will intercept the attempt to execute the EXE file and will instead interpret the byte code in it and convert it, just in time, to native machine code with hooks into the local operating system to make things “work” on that machine with that operating system.

IL is a language that looks an awful lot like Assembly Language.  And, in a way, it is, except the CPU that it’s written for doesn’t really exist.  It’s virtual.

Assembler

Assembler:

  1. A program that converts an assembly language source file into machine code.  In a higher level language, we have programs called compilers that convert the high level language into machine code.  An assembler is different because it’s not interpreting high level concepts to form large machine code equivalents.  Instead, it just takes the instructions, one at a time, and converts each into one actual machine code instruction.  It’s a different and simpler process, so it is not called a compiler and is just an assembler.
  2. A language, not to be confused with Assembly!!!!  This language is NOT Assembly Language!  Though, the majority of programmers incorrectly use the terms “assembly” and “assembler” interchangeably.  Assembler is a language that’s specific to a particular vendor’s assembler.  For example, when you’re writing an Assembly Language program, you may need to leave an instruction in the source code that tells the Assembler (the program that converts your source code) how to convert some instructions.  You may want the assembler to generate 64 bit versions of your instructions rather than 32 bit versions.  This instruction left in the source code is NOT a machine instruction.  It’s an instruction for the Assembler that only has meaning during assembly time.  It does NOT get translated into a machine code.  Since this is a special instruction for the Assembler program, the language for those types of NON-MACHINE instructions are called Assembler Language.  As you can see, this is quite different from Assembly Language, which is an actual instruction for the hardware CPU.