What does a computer program look like?

Let’s face it: lines of code ain’t so easy on the eyes. No matter how good they are, you have to stare at them to figure out what they do.

But what if we could see a program in terms of how its parts related to one another? How would you draw a picture of a program?

Continue reading “Drawing a Computer Program”

Coding the Fibonacci Sequence

Recent post as DoD (Director of Development – not Department of Defense) for ACLTC Ruby Bootcamp:

The Fibonacci Sequence.

You start with two numbers – 0 and 1 – you add them together, and then you keep adding the last two numbers in your list to get the next number.

0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, 3 + 2 = 5, and so on.

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6785, 10946, 17711, 28657, 46368, 75025…

…ahem.  Sorry…got carried away there.

It’s easy to do when you don’t have to add the numbers yourself.

Just write a computer program to do it for you. Easy! Take 60 seconds.

Continue reading “Coding the Fibonacci Sequence”

Blog at WordPress.com.

Up ↑