Notes on Teaching Programming quite possibly from a 'STEM' perspective. This is a course designed for upper school or high school students at Saint Paul's Academy in Bellingham, WA. An associated web page is http://teachingprogramming.rmfmedia.com/ .

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.

Until then, using your apple development account, please attempt to install the appropriate XCode version on your MAC home laptops or workstations. You will need administrative access (Administrator password). If you have installed Cygwin with development tools on your Windows laptops, you will have access to the gcc and g++ commands.. You should also install a syntax highlighting text editor of your choice. If you have installed Xcode; syntax highlighting will come with that package. TextMate 1.51 for the MAC or Notepad++ for Windows are both free syntax highlighters that are well recommended.

Understanding the installation of compilers and syntax highlighters will require some patience and *hacking* to make things work. It is a good habit to read the manuals and "readmes" that come with any compiler or syntax highlighter first before using it. The text for this class is Kerninghan and Ritchie "C Programming;Second Edition" which is freely available as a PDF on the internet. More resources are available here. I recommend simply working your way through K & R "C Programming", pausing to do each exercise in the text.

Remember that the 'info' and 'man' commands contain a wealth of information about all UNIX like operating system commands including gcc and g++.. IFor a quick look at any command options in the bash shell, suffixing that command with '--help' usually produces a brief set of options: