CS107-Assignment 1

本文分享了作者学习ProgramParadigm课程的经验,包括听Lecture的方法、完成Assignment的技巧等。并详细介绍了第一次Assignment的具体任务及建议,如解析命令行、读取文法文件等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第一次系统地学习英文课程,还是Program Paradigm,需要扎实的专业知识和较高的英文水平,蛮艰难的。Lecture反复听至少六遍:3遍理解内容,1遍解决神经中枢系统跑飞问题,2遍理解英文;Assignment反复读至少七遍:2遍熟悉单词,3遍理解句子,2遍提炼内容。希望这一套课程(27次课+30左右Handout+10左右Assignment+1 Final+1 Midterm)训练下来,能够有所进步。

What To Do

Assignment 1 has very little to de with C++ coding, just a smaller problem need to be solved over the next seven days. The not-so-sexy task is to parse the command line and read in specified grammar file to build a grammar object in the form of an STL map.

The High-level Outline Of How To Approach The Problem:

  1. Read the UNIX Basics handout (distributed today as Handout 05)

  2. Learn how to use Terman cluster (go there or use ssh into a machine)

  3. Attend next Tuesday’s discussion section (make it a point): Unix

  4. Use emacs to read production.h, definition.h and rsg.cc

Some Advice:

  1. Explore a new UNIX world
  2. Hang out and ask TAs for advice
  3. All that being said, you need to code as well……ʕ •ᴥ•ʔ

Submission Notice

  1. Code unification
  2. Clear, concise function names and compact(紧实的?) implementations (cover one algorithmic detail, or call a series of helper functions and methods)
  3. No global variables ever (A function that depends on global variables is like a laptop that requires a direct Ethernet connection to Internet. Functions without global variables are wireless.(O_o)TA的比喻真生动……)
  4. Do not make unecessary copies of large data structures
  5. Do not make lots of little copies of small data structures
  6. Do not make a dynamic memory allocation unless there is an excellent reason for doing so
  7. Do not orphan any memory either
  8. You have the responsibility to free up anything you allocate
  9. Documentation of particularly dense code

UNIX basics

简单介绍了以下指令

  • mkdir: make directory
  • cd: change directory
  • ls: list pwd: present working directory
  • ./filename: look into the current directory for the executable file filename
  • make: compile and build the code

Makefile

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值