Archive for April 2009

Project Euler - Problem 2

Here’s my solution for the second problem in the Project Euler series.  I’ve decided not to put the actual numeric answer in my posts since that makes it too easy for others to enter it on the Project Euler site without at least attempting to solve the problem.

# problem002.py
# Find the sum of all the [...]

2009 Coding Standards: Guaranteed to Get You Fired!

Effective immediately, I am implementing the following coding standards and thought I would share them in case they prove useful to others.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Control Statements
Add helpful advice and friendly reminders in the form of comments after branching statements.

public void myFunction(int a, int b) {
for (int i = 0; i < 100; i++) {
[...]