Some basic programming tips Oct25 '06

Feedback

# (1 of 4): Andy Atkinson » anatkinson.com

4 hours, 58 minutes after the fact. (Wed 25 Oct 2006, 2:01 PM CST)

When duplicate code exists, you want to "factor" this out into an interface or helper class so that you have a single point of failure and a single class to test. Another good tip before starting: consider your test cases. Commit to certain test cases before writing the code you will put under test so you don't wimp out on the test code.

# (2 of 4): Jennifer Grucza » jennifergrucza.com

1 day, 2 hours after the fact. (Thu 26 Oct 2006, 12:03 PM CST)

Hmm I always heard the term as "refactor".

Previous comment Return to entry

# (3 of 4): Andy Atkinson » anatkinson.com

1 day, 3 hours after the fact. (Thu 26 Oct 2006, 12:54 PM CST)

Yeah, I hear "factor out common code" and "refactor the code." Eclipse IDE has a "Refactor" menu, I believe other IDEs call it this too. I would say "factor out" is from the math world, and refactor is the child of "re-purpose" and "factor out" which I feel has a different meaning, but is closely related. Semantics!

Previous comment Return to entry

# (4 of 4): Matthom

1 day, 6 hours after the fact. (Thu 26 Oct 2006, 3:51 PM CST)

I've never used either term, so I'm gonna trust you both on this one... :)

Previous comment Return to entry

RSS feed for comments on this post

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Return to entry.

Before any coding begins, it's important to step back and view the larger picture.

You are at the feedback permalink page for: Some basic programming tips

Read more...