Tuesday, April 22, 2014

High Tech Summer Camps

This is a page on High Tech Summer Camps for Bellingham.  I will add to this as I find more information. These are not online courses. WWU summer camp is the best local bet. UW links are below. There are other opportunities in Seattle. Camps are filling up fast. Here are some links:

Wednesday, March 5, 2014

Learning JavaScript: CDNs, Mathjax, SVG

For the past six weeks or so, we have been focusing on learning JavaScript programming through our web consoles at www.codeacademy.com. Please continue completing your JavaScript sequence at Code Academy. The value of interactive practice will make you a  better programmer. However, to apply our skills learned from Code Academy, we are going to need more resources. If you have not done so already, install an appropriate code editor. I recommend Notepad++ for Windows or TextMate for MAC. There are a number of JavaScript based editors available. For example,  Js.do is a javascript based editor that allows the user to edit code online. 

Some javascript code we worked on today is below. The point of the lecture was to 
  •  Demonstrate linkage of code to Content Distribution Networks (Mathjax in this case.)
  •  Show embedded SVG drawing code
  •  Demonstrate event based buttons that use Javascript's Math class functionality.
Some URLS with more information are:
It is worth working through the Javascript tutorials at W3Schools. They provide excellent reference with online practice. You can paste their code in js.do as well.  Mathjax provides an excellent example of a callable external library of functionality from a CDN (external Content Distribution Network).  In addition, I have a google drive JavaScript folder  with selected online JS manuals and  the example html files below . These examples can also be viewed here.

Wednesday, January 8, 2014

Numerical Sorting with the Bash Shell

This post will  explain the use of the sort utility while in the Bash shell.  The Sort utility can be used with output or on a text file. Open up an X11 terminal and make sure you are at a Bash shell prompt (type 'bash'). Use the man command to look at the following commands:

sort : Cygwin, Linux, BSD and MAC
seq : Cygwin or Linux only
shuf : Cygwin or Linux oly
jot : BSD or MAC only
awk : Cygwin, Linux, BSD and MAC

Tuesday, January 7, 2014

Sorting Algorithms and All That Jazz (Part I)

Above: visual sorting algorithms with sound. Beneath: Brian Morgans from WWU brought us sorting in Java Script for this weeks Computer Club!
Thanks to Brian Morgans for bringing us not only a Bubble Sorting lesson but a brief JavaScript lesson!  To pursue his exercises please download a capable text editor like TextMate or Notepad++. Alternatively, you can simply use Xed or Visual Studio.  An excellent first step in understanding sorting might be to run 'info sort' or 'man sort' from your X11 prompt.

Friday, November 22, 2013

K&R C SE Lesson 1: Introducing K & R C Programming SE

(Post Under Construction)
 Kernighan and Ritchie "The C Programming Language" Second Edition is an classic interpretation of the C language in the same way as Strunk and White "Elements of Style" is a classic interpretation of the English language or Wolfgang Pauli's lecture on "Wave Mechanics" is a classic representation of the math of physics. This does not mean that all of the programming in K&R C is useful today or even the best representation of the use of C (1, 2).  A paraphrased statement of Pauli's famous belief about untestable physics applies to engineering software as well: If your code can't be proven wrong by someone, you have probably not produced anything of much value. 

Software engineering languages have variability, flexibility and polymorphism  by design  There are always multiple solutions to any given problem. Without honoring this fundamental nature of exploratory science; the power and endurance of any one language is limited. There are a number of  K&R solution sets provided on the web. Below is a selection of solutions to  the Fahrenheit-Celsius converter code discussed in Chapter 1 of  "The C Programming Language" as provided by Richard Heathfield.   A C language reference is available from the GNU Project. It is particularly important to read the while and do statement sections. A number of third party GNU C tutorials are also available. Use the google search term: 'filetype:PDF gnu c programming tutorial'. Learning GNU C is one such.

This post is primarily about understanding the logic and control structures of C. The implementation of C library functions (e.g. printf) are left for another discussion. -RMF

Thursday, November 21, 2013

K&R C SE Lesson 2: Introducing printf, the 'for loop', and gdb

(Post Under Construction)
This post uses an example from the first chapter of  K&R C Programming Second Edition. After discussing the use of the printf function, K&R C SE demonstrates alternate code for printing a Fahrenheit-Celsius conversion table. The specific and compact use of printf arguments allows for the appropriate formatting of the results returned by a compact conversion routine inside of a for loop. This code is more compact and more accurate than the first example in Lesson 1 using the while loop:

#include <stdio.h>
/* print Fahrenheit-Celsius table */
int fahr;
for (fahr = 0; fahr <= 300; fahr = fahr + 20)
        printf("%3d %6.1f\n", fahr, (5.0/9.0) * (fahr-32));

Tuesday, November 12, 2013

XCode, Text Editors, Peanut Butter

I want to wish a big thank you for the guest lecture from software engineer and WWU statistics instructor Brian Morgans who taught a fascinating class on program instruction debugging; all with a loaf of bread, some peanut butter and a knife! I think the students had a great time!  In conclusion, Brian talked about sorting algorithms which are an excellent introduction to developing algorithms in programming.  I recommend the Wikipedia article and links on sorting algorithms. For a fun (but noisy) visualization of sorting algorithms, see here.

We will meet again in the first two weeks of December. I have installed Xcode 3.0 on many of the MACs in the lab and will soon install the entire lab. This allows you to use the gcc and g++ commands from your bash prompt. There will be a graphical interface to XCode 3.0. More on that later. In using the Xcode installation, there may be path issues for libraries you need to address. Read The Fine Manual and e-mail me any questions. The GNU gcc and g++ manuals are here.