Tuesday, September 20, 2016

Code smells - Book chapter reading

Sept. 20, 2016

Read clean code book - Chapter 17 - Smells and Heuristics

Julia's notes:
Comments
Environments
General
Java
Names
Tests

Comments:
C1: Inappropriate Information
C2: Obsolete Comment
C3: Rudundant Comment
C4: Poorly Written Comment
C5: Commented-Out Code

Environment:
E1: Build Requires More Than One Step
E2: Tests Require More Than One Step

Functions:
F1: Too Many Arguments
F2: Output Arguments
F3: Flag Arguments
F4: Dead Function

General - (hightlights to help memorize - red color, Julia produced the code with smells...)
G1: Multiple Languages in One Source File
G2: Obvious Behavior Is Unimplemented
G3: Incorrect Behavior at the Boundaries
G4: Overridden Safeties
G5: Duplication
G6: Code at Wrong Level of Abstraction
G7: Base Classes Depending on Their Derivatives
G8: Too Much Information
G9: Dead Code
G10: Vertical Separation
G11: Inconsistency  - the principle of least surprise
G12: Clutter
G13: Artificial Coupling - lazy and careless of placement of a variable, constant or function
G14: Feature Envy -
G15: Selector Arguments

Great blog about clean code: CMU - top 4 computer science - a professor
http://jxyzabc.blogspot.ca/2012/12/treat-yo-self-clean-up-your-code.html
"During the course of grad school, my relationship with my code has become increasingly important.  Clean, modular, and well-documented code (with tests!) is not only less likely to have bugs but will be useful for longer.  Clean code provides a solid foundation for you and potentially other researchers.  Modular code makes it easier to reuse parts of your code. Also, knowing exactly what your code does just feels good."

Editorial notes:
1. Clean, modular, and well-documented code (with tests!)
Julia, let us hold high standards as a software programmer -
Review common code smells before you write code for a project. 

2. Work on blog writing, and see if you can write good blogs as
http://jxyzabc.blogspot.ca

3. work on the blog:
http://jxyzabc.blogspot.ca/search/label/academic%20advice

study writing - write down things to learn from the above article

4. Borrow some ideas from website usability & user experience - Julia, you need to read 60 pages - page by page first.

Study Website Usability & User Experience (UX) Definition
(60 pages - plan to read 1- 2 hours, understand the concepts first)

http://blog.usabilla.com/the-abc-of-usability/
http://blog.usabilla.com/6-ted-talks-every-ux-professional-should-watch/

5. How Code smells research leads to the website Usability research? User experience research?




No comments:

Post a Comment