C++ Programming vs. Computer Fundamentals & Programming (2)



210099a程式設計 210146 基礎程式設計(二)
Time & Place
Wednesday 08:10-11:00, (H-103 [94334493]) Friday 08:10-11:00, (TC-208 [94334492])
TAs: cs101-ta-2015 陳聖文、蔡韻茹、陳禹樵、游宗翰
陳怡安、王詠瑜
Students enrolled in this class
84
5
Ivor Horton's Beginning Visual C++ 2013
http://Course.ipv6.club.tw/CS102/

Programming Environment

Tips for PuTTY

  1. Why doesn't the keypad work as expected? It keeps sending an escape sequence.
    Ans: These confusing things happen when PuTTY is in "application keypad mode".  Please follow the following steps:
    1. Bring up PuTTY Configuration.
    2. In the left pane, select Terminal - Features.
    3. Put a check mark next to "Disable application keypad mode".
  2. In the "ee" editor, If you want to move a line to somewhere else:
    1. Press Ctrl-K to cut the line
    2. Use cursor key to move to where you want to insert the line
    3. Press Ctrl-L
  3. In the "nano" editor, if you want to move a line to somewhere else:
    1. Press Ctrl-K to cut the line
    2. Use cursor key to move to where you want to insert the line
    3. Press Ctrl-C to paste the line

Tips for Visual C++

  1. Tools - Options - Text Editor - C++
  2. Help source choices can be changed in the Options dialog box under /Help/Online.
  3. Comments a block of code: Ctrl+K Ctrl+C.
  4. Uncomments a block of code: Ctrl+K Ctrl+U.
  5. Reformat a block of code: Ctrl+K Ctrl+F
  6. Project Properties (Alt-F7) - C/C++ - Preprocessor - Preprocessor Definition
  7. error C4996: 'strtok': This function or variable may be unsafe. Consider using strtok_s instead.

FAQ

  1. My C++ program can be compiled, but clang++ shows lots of warning: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
    You may compile with the option
    "clang++ -Wno-deprecated-writable-strings a.cpp".
  2. On my personal computer, I got an error message "LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt".
    Solution: Install Microsoft Visual Studio 2010 Service Pack 1.
  3. DreamSpark FAQ
  4. How could I connect to the STU.ipv6.club.tw server if I am not inside the campus?
  5. Q: Why can't I type Chinese characters in my editor?
    A: If you are using the "ee" editor, its support for Chinese is incomplete at this moment (until somebody fixs it up). Please try to use "nano" or "vim".
  6. Q: Why can't I create a new project in Visual Studio 2013 in the computer classroom (H-103)?
    A: The administrator did not configure Visual Studio 2013 well, so you will fail to create a new project because of the directory access permission.
    Solution: When you create a new project, change the "Location" to "C:\Users\xxx\Documents\Visual Studio 2013\Projects\". This is the correct path for you to create projects.
    Create Project
  7. Stack Overflow is a question and answer site for professional and enthusiast programmers.
  8. C++ FAQ Lite

Code Writing

  1. Draw a flowchart or write a pseudo code to illustrate the basic idea
  2. Prepare a test case so that after your code is complete, you may verify its correctness.
  3. Keyin your code and check it is correct or not.
  4. If the outcome differs from what you expect, ask yourself why.
  5. For rules about indentation, see GNU Coding Standards.  You may try tools like SourceFormatX Code Formatter.

How will your programming assignments be evaluated

課程評量方式

Syllabus


Tuesday
Quiz
Hands-On Exercise
Extended Reading
More Exercises on Friday
Week 1 2/25
Chapter 2: Data, Variables, and Calculations
Quiz 1
  1. Create Mail Filters
  2. Writing C Programs on a FreeBSD server.
  3. In which year were you born?
  4. Volume and surface area of a sphere
  5. [HW01] Solving Linear Equations
  6. How to submit your homework?
MIT's Food Computer: The Future of Urban Agriculture?
New report details the prices within the cybercrime market
Top Time Management Apps for Students in 2015
Who are the hackers?
How Hacking, `Phishing' Works video
Google Science Fair
Try, Try Again


2/27 和平紀念日補假
  1. 雞兔同籠
  2. BMI (body mass index)
  3. What day is January 1st?
Week 2 3/4
Chapter 3: Decisions and Loops
Quiz 2

  1. [EX01] Fibonacci sequence
  2. [EX02] Sum of integers
  3. [EX03] Prime Number Test
  4. [HW02] Prime Numbers <= N
  5. Print the calendar of January
  6. Gliffy: Online Flowchart Software
  7. Easy flow chart creation with Dia
  8. How to Create a Flow Chart in Microsoft Word
  9. Free Online Drawing
What most schools don't teach video (Code.org video)
Let's teach kids to code video
3/6
  1. [EX04] Syracuse sequence
  2. [EX05] Truth Table
  3. [EX06] 9x9 Multiplication Table
  4. P → Q
  5. Print the calendar of this year

Week 3 3/11
Math Library (Reference, PPT)
Time Library (Reference)
Ncurse Library (Tutorial, PPT)

Quiz 3
  1. [Moodle] Prime Numbers with sqrt()
  2. Plot cos(x) with characters
  3. Multiply Exercise * 10
  4. [Moodle] Move Around
Steamed: Valve Software Battles Video-game Cheaters
Bitcoin Solves a Huge Problem for the Global Economy
Microsoft Skips Windows 9, Reveals Windows 10
3/13
Week 4 3/18
Chapter 4: Arrays and Strings
String Manipulation

  1. [EX08] Dice Rolling
  2. [EX09] Matrix Multiplication
  3. [EX10] Caesar Cipher
  4. [HW03] Delete Spaces in a String
  5. [HW04] Space Deletion (2)
  6. Running Q
  7. Sokoban (1) - Level Format
UK teenager jailed for not disclosing password
The Real Threat to Economic Growth Is the Digital Divide
How to develop seamlessly in the cloud
3/20
Week 5 3/25
Chapter 4: Pointers
春季大健行
Quiz 4
  1. [EX13] Exchange Sort
  2. (Ex4_09)
  3. [EX14] Prime Numbers with an Array


  1. 15 Windows Utilities You Can't Live Without
  2. Multitasking
  3. [BBC] Academic Listening Part 2 - Lectures: Introduction


Week 6 4/1 Midterm Exam (1)


Microsoft's 'Spartan' browser will replace IE The next 5,000 days of the webvideo
How to Build a Website
How to Download and Watch Free Movies Online Legally
4/3 兒童節補假
Week 7 4/8
Chapter 5: Introducing Structure into Your Programs
Quiz 5
Five reasons why Windows 8 has failed
Why Windows 8 Has Been Slow to Capture Consumer Mindshare
KickStarter
Why Gmail Services Aren't Free
Simon Sinek: How great leaders inspire actionvideo
  • People don't buy what do you; they buy why you do it.
  • Law of Diffusion

4/10



Week 8 4/15
Chapter 6: More about Program Strucutre
Function Pointers and Callback Functions
Quiz 6
Sherry Turkle: Connected, but alone?video
Google doesn't care where you went to college
RFC 1855 - Netiquette Guidelines
Neromarketing
4/17
Week 9 4/22
Chapter 7: Defining Your Own Data Type
Quiz 7
  1. EX7_01.cpp
  2. Addition of Rational Numbers (1)
  3. Addition of Rational Numbers (2)
  4. [EX28] HW: sort rational numbers (q/p)
  5. struct tm
John Underkoffler points to the future of UIvideo
TED blends animation with education at new website
First Look: Inside the Army’s App Store for War
4/24
  1. Astrological Sign (2)
  2. Addition of Rational Numbers (3)
Week 10 4/29
Chapter 4: Dynamic Memory Allocation, Demo
Quiz 8
  1. [EX29] storeListReversely
  2. [EX30] storeList
  3. Insert to Binary Tree
MIT Creates Amazing UI From Levitating Orbs
ZeroN - Levitated Interaction Element video
5/1
[EX31] insertToList
Week 11 5/6
Chapter 6: Exception Handling (P.229)
FreeBSD Socket Programming
Beej's Guide to Network Programming
Programming Windows TCP Sockets in C++ for the Beginner
Chapter 7: Classes and Constructors
Quiz 9
Matrix (1)
Matrix (2)
Matrix (3)
Determinant (2)
HW: Horse Racing (3)

The Sound of Rainingvideo
世界上最辛苦的工作 - World's Toughest Jobvideo
How to measure Windows 7 memory usage
10 Tips to Become a Better Presentervideo
The Mobile Phone in Developing Nations
BASIC Turns 50, and I Still Miss It

5/8

Reduction of Rational Numbers
Copy Constructor
Wireshark
Show Name (1)
Show Name (2)
Sort Name (1)
Sort Name(2)
Week 12 5/13
Chapter 8: Destructor, Operator Overloading

Quiz 10 EX: Matrix (4)
EX: Matrix (5)
Linked List
Horse Racing (4)
TETRIS (7)
TETRIS (8)


Analyst's View: PDF - Pretty Dangerous Format?
The Story behind LINE App Development
Asian Mobile App LINE Opens its API
57 Chat APIs: Skype, MSN Messenger and Google Talk
5/15

EX: Matrix (6)
EX: Matrix (7)
EX: Matrix (8)
EX: Matrix (9)
[EX32] Matrix (10)
Week 13 5/20
Chapter 1: Programming with Visual C++ 2010 Chapter 9: Class Inheritance and Virtual Functions
Chapter 8: Library Classes for Strings
File Processing using the fstream class
Native C++ Library Classes for Strings
String Manipulation using the CString class
Quiz 11
[HW05] Determinant (3)
[EX34] Input File Stream
[EX35] Rational (7)


Inverse
TETRIS (9)
TETRIS(10)
utx.log
Load a binary file (e.g. .WAV) into memory
The Sound of MusicPDF
WAVE_FORMAT_PCM

Debugging with gdb
SSD vs HDD: What's the Difference?
MIT's Oxygen Project
5/22
[EX36] File Processing (Word Count)
[EX37] Matrix Addition with Rational Entries
Subtitle of a Movie
Week 14 5/27
Chapter 10: The Standard Template Library

Quiz 12
  1. A Vector of Strings
  2. [EX38] Vector (1)
  3. [EX39] Vector (2)
  4. TETRIS (11)
  5. TETRIS (12)
Computer Program Spots Fake Product Reviews
Dream Job: Nights at the Opera
5/29
  1. [EX40] A Vector of Rational Numbers
  2. [EX41] Sorting a Vector of Rational Numbers
  3. Matrix
Week 15 6/3
Chapter 12: Windows Programming with the Microsoft Foundation Classes
Chapter 14: Drawing in a Window
Quiz 13

  1. [EX] Lines and Rectangles
  2. [EX] Circles
  3. [HW] Pentagon
  4. [HW] Brush
  5. [HW] National Flags
Tech world preps to honor 'Father of Computer Science' Alan Turing, as centenary nears
第六感驚人的潛 力 Pranav Mistryvideo
6/5
  1. [EX] Star
  2. [EX] Square Wave
  3. [EX] Sine Wave
  4. Circle intersection
Week 16 6/10
Chapter 16: Working with Dialogs and Controls
  • Edit Box
  • List Box
  • Enable a Button; Using Radio Buttons
Tutorial to MFC Controls 

 
Quiz 14

Students Should be Co-Laborers, Not Cusomers
Chapter 15: Working with Menus and Toolbars
Display BITMAP filesPowerPoint
6/12 
  1. EX: TextOut()
  2. CreateFont()
  3. EX: Polar Coordinate


Week 17 6/17 Final Exam
Computer Science for Fun
Tesla, a Software Defined Car
NTT DoCoMo Vision (1)
NTT DoCoMo Vision (2) [wmv]
NTT DOCOMO Mobile Futurevideo
6/19 端午節補假







 

Hands-On

  1. ACM UVa Online Judge
  2. 線上解題系統 (NKNUSH)
  3. Advanced Programming (NSYSU)
  4. Google Code University
  5. Codecademy
  6. Code for America
  7. Flowchart Drawing:
  8. Dia
  9. Dia for Windows
  10. An Introduction to Programming in Go
  11. Build Web Application with Golang

Exercise

  1. What day is January 1?
    Ref: UVA 12019
  2. Calendar
  3. 190 - Circle Through Three Points
  4. Christmas Tree
  5. Prime Number
  6. Greatest Common Divisor
  7. Sorting
  8. Card Shuffling
  9. Dec2Float: 40 decimal = 0x42200000 IEEE Single Precision
  10. 蓊鬱錦簇科技二館 - 有蓊鬱的樹木圍繞著科技二館,使建築物融入大自然的美景中,更具生命力。
  11. 光鮮亮麗的山中城堡 - 雲群波濤洶湧、山脈層巒疊嶂及蓊鬱樹木圍繞,暨南大學校園無疑是美麗的歐式莊園。

Reading

  1. Intel Labs Creating Robots of the Future
  2. 10 Ways Not to Be a Jerk Online
  3. 15 Windows Utilities You Can't Live Without
  4. IBM at 100: From typewriters to the cloud
  5. Future of the car (智慧汽車, 51 min) 447.18 F996