Skip to content

Instantly share code, notes, and snippets.

View weitsang's full-sized avatar

Wei Tsang Ooi weitsang

View GitHub Profile
@weitsang
weitsang / newlfm.cls.texlive2017.patch
Created June 30, 2017 02:37
Patch for newlfm.cls to support fancyhdr.sty v3.9
--- newlfm.cls.orig 2017-06-30 10:30:48.000000000 +0800
+++ newlfm.cls 2017-06-30 10:31:52.000000000 +0800
@@ -1687,13 +1687,13 @@
\txa{@zpqutil:\@zpqutil}
\fi
}
-\newcommand{\@zfancyhead}[5]{#1\hbox to\headwidth{\fancy@reset
+\newcommand{\@zfancyhead}[5]{#1\hbox to\headwidth{\f@nch@reset
\@zfancyvbox\headheight{\hbox
{\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill
@weitsang
weitsang / nus-cs3281-2014-l9.md
Last active August 29, 2015 14:08
Software Tools

Software Tools, Libraries, and Frameworks

Tools Presented in Class

  • PyLint/JSHint: a static code analyzer for Python and JavaScript, by Wei Tsang
  • MessagePack: efficient JSON replacement, by Wei Tsang
  • Jenkins: for Continuous Integration, by Team Azure
  • AngularJS: Extending HTML with dynamic documents, by Team Polaris
  • HubTurbo: Turbo-charged GitHub issues, by Team undefined
  • MobiZen: for demo-ing Android apps on Desktop, by Team undefined
  • Meteor: open source JS platform for building mobile & Web apps, by Team NoOp
@weitsang
weitsang / nus-cs3281-2014-l8.md
Last active August 29, 2015 14:07
On Software Performance

On Software Performance

Importance

  • "“People will visit a Web site less often if it is slower than a close competitor by more than 250 ms.”" from NY TImes
  • "the Apple iPhone 5 still has a dual core processor and 1 GB DDR2 RAM. But the magic is iPhone 5 is performing as good as any latest muscle Android phone" Silicon Station

Rules of Optimization

  • Don Knuth says, "Premature optimization is the root of all evil."
  • Ken Beck says, "Make it run, make it right, then, make it fast."
@weitsang
weitsang / mm14-tutorials.md
Last active August 29, 2015 14:06
ACM Multimedia 2014 Tutorials
@weitsang
weitsang / nus-cs3281-2014-l6.md
Last active August 29, 2015 14:06
Lecture Notes, CS3281 AY 1415, Lecture 6

On Software Usability

Rule 1: Don't Make Me Think

  • Give clear, simple, useful, readable message/information/update/feedback to users
  • Guide users on what to do
  • Be consistent with what users expect
  • Don't hide things that user may need
  • Provide help, inline
  • Place items logically (in context, grouped, hierarchically)
@weitsang
weitsang / nus-cs3281-2014-l5.md
Last active August 29, 2015 14:06
Lecture Notes, CS3281 AY 1415, Lecture 5

On Software Implementation

CS3281/CS3282 Lecture Notes

Semester 1, AY 2014/15

10 September 2014

Programming is not just about implementing a software. It is about communicating with other developers using code, comments, commit messages, API documentations, developers' guide etc. Getting the code to compile and run correctly is just a small part of the process. Take time to communicate properly.

Writing Professional Quality Code

  • Your reputation as a software engineer depends on your code (extreme case: github is your resume).
@weitsang
weitsang / nus-cs3281-2014-l4.md
Last active August 29, 2015 14:06
Lecture Notes, CS3281 AY 1415, Lecture 4

On Software Project Estimation and Planning

CS3281/CS3282 Lecture Notes

Semester 1, AY 2014/15

2 September 2014

  • By end of this week, you should roughly know what to implement and how to implement. It is time to start implementing.
  • Principles:
    • Divide into 7-8[^1] iterations (Week 5 to Week 11)
  • Goal: One usable prototype every week.
@weitsang
weitsang / nus-cs3281-2014-l2.md
Last active August 29, 2015 14:05
Lecture Notes, CS3281 AY 1415, Lecture 2-3

On Software Architecture and Design

CS3281/CS3282 Lecture Notes

Semester 1, AY 2014/15

20 August 2014

  • You roughly know what to implement, now, how are you going to implement it?
  • Two steps: (i) high-level software architecture (e.g., what are the components in the systems?), (ii) detailed design of implementation/solution (e.g., what language/algorithm/software library/database/database schema/etc to use?)

Different Views of Architecture

@weitsang
weitsang / nus-cs3281-2014-l1.md
Last active August 29, 2015 14:05
Lecture Notes, CS3281 AY 1415, Lecture 1

On Software Requirements

CS3281/CS3282 Lecture Notes

Semester 1, AY 2014/15

13 August 2014

Introduction

  • Specify what your end-product can do / what the customer wants
  • Functional / non-functional requirements
  • Many tools for requirement analysis
@weitsang
weitsang / common-writing-issues.md
Last active November 26, 2021 07:28
Notes to students on common writing issues

English and Presentation

  • E1 Put two white spaces after a sentence. (in LaTeX source for easy reading)
  • E2 You shouldn't use contraction when writing papers.
  • E3 And never start a sentence with “And”
  • E4 Captalize “Section” “Chapter” “Table” “Figure” etc. when refer to a specific item. “Section 1”, not “section 1”. Leave a space between “Section” and the section number.
  • E5 “Cannot” should be one word, cannot use “can not”.
  • E6 Capitalize section/chapter/paper titles, but leave common noun in small case (“a”, “on”, “of” etc)
  • E7 Do not use dangling “This”. Wrong: “This creates a new environment...” Right: “This method creates a new environment..”
  • E8 Italize the any special terms that you are introducing. Do not use bold.
  • E9 Use (i), (ii), not i) ii).