A new programming approach Mar27 '06
Feedback
# (2 of 2): Matthom
1 day, 18 hours after the fact. (Wed 29 Mar 2006, 10:52 AM CST)
Cool idea... I might try that.
RSS feed for comments on this post
Leave feedback
matthom
is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago.
Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.
I’ve recently begun a new programming approach, and I find it quite helpful.
You are at the feedback permalink page for: A new programming approach
# (1 of 2): Jennifer Grucza » jennifergrucza.com
1 day, 18 hours after the fact. (Wed 29 Mar 2006, 10:47 AM CST)
Sometimes what I like to do is put in the comments first, before any code. This helps me pinpoint exactly what I want my code to be doing, and it sort of stubs out the code so I know where I am and how much left I still have to do (so I don’t forget any steps).
For example, I might write:
/** Saves a new review, and updates the product with the new review average. */
public static void saveReview(Review review) {
// save the review to the database
// calculate the review average for the product, including the new review score
// get the product from the database using the product ID in the review object
// save the product object to the database
}