Day 75: “When You Assume…”

If I were a freelance developer, I recon I’d have an upset client on my hands.

The task WeirdBeardDev posed in a comment earlier today was:

Take a number, 1742 and reverse it, 2471. Sum them together, 4213. See if the sum is a palindrome (read the same forward and backward, i.e., 1221). If yes then great. If not, repeat until 1000 iterations or until it is.

So after work this evening I merrily hobbled together a progam using just syntax I remembered. (I’m too ashamed to post the code without completely refactoring it – I know I can clean it up) Below is the output after running it four different times:

(User enters 4 digits. The program concatinates the digits, displays the reverse and sum, and checks whether the 4 or 5 digit sum is a palindrome)

But then I stared at the last part of the task to work on next: “If not, repeat until 1000 iterations or until it is” and realized I hadn’t understood the request properly and based it off several assumptions.

Oops.

Current Progress Status

  • Tower Defense Tutorial: 69/73
  • C# The Yellow Book (pg 127/216)

Onward!

Author: Mike@PAUSED

Aspiring indie game developer. Devlog: www.paused.ca

One thought on “Day 75: “When You Assume…””

  1. Important lesson #1 – you tried and you are awesome.
    Important lesson #2 – we always assume things, sometimes good and sometimes not.
    Important lesson #3 – while banging away on a keyboard is a solitary act, coding is not.

    🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: