GithubHelp home page GithubHelp logo

pk_day_one's Introduction

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

pk_day_one's People

Contributors

pkivolowitz avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.