Skip to content

CCCSBuffet/pk_day_one

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Demos for Day One

Today is day one of CSC 1810. These are two programs that will probably appear to you to be gibberish. That's OK. You're in this class to learn to make sense of the gibberish.

Why are we looking at these?

For one thing, we need to fill time as you download your development tools. For another, there is a lot to be gained by simply reading code. We spend so much effort learning to write code, sometimes reading code is overlooked.

na.cpp

The first program outputs the text of the chorus to the theme song from the 1960's Batman. You can experience it in all its glory here.

Unfortunately, this program has a bug. Let's see if we can't find it.

letter.cpp

This program is more complicated. It uses functions to break down complicated tasks into simpler parts. It doesn't contain any bugs (of which I am aware).

This program also contains an example of the preprocessor allowing me to write the program once but have it account for the differences between computer platforms. The preprocessor implements its own language which is apart from C++. Virtually all programs make use of the preprocessing to include certain utility files called headers.

Follow along

It is likely that I will be demonstrating these programs while you download your development environment. As this is the first day of classes, you probably won't understand much of letter.cpp. Sit back, relax, and follow along as best you can.

Aside: What is this file?

This is a markdown file. Markdown is a simple text formatting system that allows me to make reasonably expressive text files very easily. All of your project specifications will be delivered to you in this form.

You should be thinking about creating a portfolio of work you can use to score internships and then, in about 3.5 years, a full time job. Markdown can help you in this regard as it is a simple way to build good looking documentation.

Here is a markdown cheat sheet.

Two ways to view a markdown file

The first way to view a markdown file is via the web on coder oriented sites like github.

A second way to view markdown files is within Visual Studio Code. Open a markdown file (a file ending in the letters .md). With you cursor in the text of the markdown file, a markdown preview can be displayed by pressing APPLE-k then v on the Mac. On Windows, it would be CNTRL-k then v.

Special keys on Mac and Windows

CNTRL is an abbreviation for holding down the control key while pressing another key. CNTRL is also abbreviated with ^ as in ^k+v meaning control-k then v.

The APPLE key might be written as ⌘.

The ALT key is also used. On Windows, this is called the ALT key. On the Mac, where people "think different", the key is called "option" and is abbreviated ⌥.

Other miscellany

Computer people have different names for a lot of things. The less well we are understood by non-computer folk, the more money we make. Just kidding. Not kidding.

Symbol(s) Are called...
{ } Braces
[ ] Brackets
( ) Parentheses
< > Might be less than and greater than or Angle Brackets
/ Slash
\ Bash (back slash)
! Bang
. Dot or period
| Pipe

About

In class demos for day 1 of CSC 1810

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages