January 2010
15 posts
Calling Atheism a religion is like calling bald a hair colour. - Don Hirschberg...
– Twitter / stevenringo: Calling Atheism a religion …
1 tag
Smells and Heuristics: Names
N1: Choose Descriptive Names - Dont be too quick to choose a name. Make sure the name is descriptive. Names are what makes 90% of the code readable.
N2: Choose Names At The Appropriate Level Of Abstraction - Don’t pick names that communicate implementation; choose names that reflect the level of abstraction of the class or function you were working in?
N3: Use Standard Nomenclature When...
1 tag
Smells and Heuristics: General (Part 4)
G28: Encapsulate Conditionals - Boolean logic is hard to understand without having to see it in the context of an IF..THEN. Extract the boolean logic into a function which clearly expresses the intention of the conditional from the clause which executes it.
G29: Avoid Negative Conditionals - Negatives are harder to understand than positives. Conditional operations should be expressed as positives...
1 tag
Smells and Heuristics: General (Part 3)
G19: Use Explanatory Variables - Break up calculations into intermediate values that are held in variables with meaningful names, rather than inlining them. More explanatory variables are generally better than fewer
G20: Function Names Should Say What They Do - Function names should clearly express what the operation will do. If you have to look at the documentation to find out what it does then...
1 tag
Smells and Heuristics: General (Part 2)
G10: Vertical Separation - Variables and private functions should be defined close to where they are used. Local variables should be declared just above where they are used and private functions should be defined just below where they are used. We would like to limit the vertical distance between invocations and definitions. G11: Inconsistency - If you do something a certain way, do all similar...
1 tag
Smells and Heuristics: General (Part 1)
G1: Multiple Languages In One Source File - Mixing more than one language in a single file is confusing and carelessly sloppy. JSP, HTML, XML, English they all contribute to making things less clear. Ideally, keep each file in one language (at most 2)
G2: Obvious Behaviour Is Unimplemented - Based on The Principle of Least Surprise, any function or class should implement the behaviours that...
1 tag
Smells and Heuristics: Functions
F1: Too Many Arguments - Functions should have small number of arguments. No argument is best, followed by one, two and three. More than 3 should be avoided with prejudice and is very questionable
F2: Output Arguments - Output args are counterintuitive. Readers expect arguments to be inputs not outputs.
F3: Flag Arguments - Boolean arguments loudly declare that the function does more than one...
1 tag
Smells and Heuristics: Environment
E1: Build Requires More Than One Step - Building a project should be a single, trivial operation. You should be able to check out the system with one simple command and then issue one other simple command to build it.
E2: Tests Require More Than One Step - Being able to run all tests is so fundamental and so important that it should be quick, easy and obvious to do.
Clean Code: Chapter 17
1 tag
Smells and Heuristics: Comments
C1: Inappropriate Information - It is inappropriate for a comment to hold information better held in different kinds of systems such as source-control, issue tracking or other forms of record keeping. Comments should be reserved for technical notes about the code design.
C2: Obsolete Comment - Comments get old quickly. It is best not to write a comment which will become obsolete as they float...
1 tag
Diffuser for a pop-up flash →
Vi: Search and Replace
→
State Debt Recovery Office - The Fines Division of... →
if you get caught going through a red-light camera, speed camera, or the new “Safety” cameras, this website allows you to view the offending photo for free online
Unit tests don’t test the overall program, only isolated units. This...
– Cocoa with Love: Quality control in application development without unit testing
StyleCop - Discussions
→
December 2009
6 posts
1 tag
Record Sound Directly From Computer →
This describes a hidden output device “Stereo Mix” which is an audio loopback so you can record sounds from your computer.
(1) Rt-click speaker in tool bar
(2) Select “Recording Devices”
(3) Rt-click anywhere in the Sound box that opens up or on any device in the box
(4) Check “Show Disabled Devices”
(5) Hopefully what you will see is ” Stereo Mix...