CS1021 – Week 1 – Hello World!
Here is how I get online and ready to code:
FREDs-MacBook-Air:~ fred$ ssh ucfilespace.uc.edu -l annexsfs
ucfsh:~ annexsfs$ cat > helloworld.cpp
std::cout << “Hello World!\n”;
ucfsh:~ annexsfs$ g++ helloworld.cpp
ucfsh:~ annexsfs$ ./a.out
The Unix philosophy
Every Computer Scientist should be comfortable with and practiced in the Unix philosophy of computing. Boils down to combining “small, sharp tools” to accomplish large computing tasks.
Need to know list:
- Connect to remote machines
- Navigate and manipulate the filesystem on remote machine
- Comfortably edit tetxfiles with emacs and vim
- Create, modify and execute a Makefile for a software project (CS2)
- Write and execute simple shell scripts
SSH, or secure shell, is the maxinstay of remote access and administration in the unix/linux world, lack of any straightforward equivalent in Windows: awkward
Putty is an ssh client for windows users, see http://www.putty.org/
Programming languages rise and fall with the solar cycle. A programmer’s career should not. While it is important to teach languages relevant to employers, it is equally important that students learn how to teach themselves new languages.
The best way to learn how to learn programming languages is to learn basics of multiple programming languages and focus on abstractions and programming paradigms.
Languages are either compiled or interpreted. Ideally, every computer science major would take a compiler class and implement a compiled language. Every computer science major should implement an interpreter for an interpreted language.
Some important languages to know
C is a terse and unforgiving abstraction of computer architectures, remains without rival in programming embedded systems. Learning C imparts a deep understanding of the modern computer architectures.
C++ is an object-oriented programming (OOP) language, extends C, and is viewed by many as the best language for creating large-scale applications.
Java is one of the most established languages, based on a platform independent JVM and will remain popular for long time.
Python is a (OOP)programming language that lets programmers be very productive and and integrate systems more effectively. A leading language in Machine Learning and Data Science.
Understanding Computers – Essential computer parts and concepts
Fetch execute cycle: Computers fetch instructions and data from main memory into registers. Controllers guide the movement of data/instructions from RAM memory and execute instructions using registers and ALUs arithmetic/logic units. Controllers and logic units work at the level of words, bytes and bits.
- Bits are indivisible – 0/1, Bytes are collections of 8 bits
- Words are 4 bytes in 32-bit machines and 8 bytes in 64-bit machines
- Each word has unique address
Algorithms are way scientists specify sequences of instructions. They understand how high-level ideas are transformed to computer code that gets compiled to computer instructions.
An Example Algorithm: Six steps to compute Gross Employee Pay
A C++ Program- Parts of a Program
- Syntax Rules
- Variables (Objects)
- Types (Classes)
- Control statements and blocks
Lab for Week 1 -See Lab Document in Week 1 folder.
You will login to UCFILESPACE and create a directory for this lab.
You will choose a text editor and type in the user pay C++ program.
You will compile and run that program.
You will add your name as a comment, additional user prompts, and a G-rated joke of your choosing.
You will save your program as lab1.cpp and submit on Blackboard.
Choosing an editor
You will need to become familiar and adept at using a text editor. Print out a reference card for one of these three editors. Also, do an introductory tutorial for Emacs, Vim, or Pico
No comments yet.