Coding For Dummies II

This is a quick guide to pick up some basics of programming languages. First we go through some concepts, please don’t spend more than 20 minutes on each topic, as you can only learn them once you start coding. And keep in mind this post is a pointer; I skipped all the details as I believe you could certainly Google your ways out.

Components in a Programming Language.

Programming languages all have different syntax and different instructions, but most of them share the following components:

Variables : they are place holders, a facility for storing data. The current value of the variable is the data actually stored in the variable. The data stored in the variable can be changed (through assignment) during the program run.

Data Structure : a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. Choosing the right data structure is an important first step to a successful project.

Control FlowStatement & Function Calls. It’s the backbone of your program; it dictates the transfer of control in your code.

Boolean Logic: the basis of all modern digital(binary) world.

Name Spaces: a abstract package or container that groups certain classes and functions together. They are needed for any project beyond sample codes.

Self-Guided Homeworks.

Do the following mini-projects in each programming languages (VBA, Perl, Java or C# or C++) . The estimate time for each project is 2 hours, please spend as much time a you need on all projects and make sure you feel completely comfortable with them:

  • Hello Worlds
  • Create a function to print out Fibonacci series
  • Max, Min, Medium, Average & Print out sorted
  • Store (write and read back) bank accounts in a csv file, using a structure {firstname, lastname, gender,ssn,balance}
  • Input Screen (using command prompt & GUI) to dynamically store bank account information.
  • Parse & display a RSS on the internet
  • Create Course/Student/Teacher tables in a DB. A GUI to Insert Update Delete View records.

For Java (or C++, C#):

Design asset classes (Corporate subclass Bond, which subclass Instrument, Stock subclass Instrument).  Each has functions like currency, issuer, getIntrinsic, getMarketPrice, getYield, stock has getDividend, bond has getCoupon, etc…

For Perl:

Reformat/convert the following CSV files, from

Account, User Name, Creation Date, Balance
BI1234, John Doe, 3/21/98, “2,300,000”
GX4836, Mary Doe, 4/5/01, “360,500”
To
Account, Balance ,User Name, Creation Date
BI1234, 2300000, John Doe, 21/3/1998
GX4836, 360500 ,Mary Doe, 5/4/2001

For VBA:

Try at least 5 examples from this tutorial. Learn important collections/objects/methods/properties on Microsoft Excel Visual Basic Reference, like Window & Worksheet objects.

As a non-programmer, after completing all the homeworks, you should have a very good understanding about what programming languages are about, and when/how to use them.

For a programmer, you can pretty much follow the same guideline when learning a new language, you just need to add few more homeworks, like TCP/IP socket call, more OO topics, more sorting & data structure, web coding (dynamic html generation). Also throw in few more technologies:  javascript (and few frameworks), Python, XML, making a dll, web services,  db tuning.

Leave a comment