Return to the homepage

Let’s make a programming loop

Yesterday we were enjoying interdepartmental communication with Jeff from programming and we learned a lot of new things and even some magic tricks from our friends in SPG.

I thought it was so nice of programming department to show us a thing or two in image processing, that I decided to share some of my knowledge in basic programming.

You see programming is all about giving directions to computer. You pretty much tell computer what to do and if you use right techniques, miracle happens and computer follows your commands. It may seem like magic to an untrained eye but it is not.

Let’s take a look for example at loops.

Programming loop is a set of instructions that are repeated a number of times.

Here is simple example written in Python:

 

for item in some_iterable_object:

    doSomething

    doSomethingElse

  

Simple isn’t it?

How about something more complex? Like pseudorandom number generation?

Sounds pretty complex but it is not. It’s just a way for computer to generate random numbers.  You can read all about it here.

The interesting thing happens when you join those things together.

Here is an example what random generation of coordinates repeated in a programming loop can do:

Posted by Andrew on Sep 19, 2008


andrew.smagin

Share/Save/Bookmark

Posted in Design

You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

One Response to “Let’s make a programming loop”

  1. marc.manfre - September 19th, 2008 at 11:48 am

    HAHAHA! Amazing!

    I literally “laughed out loud” when I saw this. Too bad you guys were all on lunch, thus potentially making me “the creepy design kid who laughs to himself.”

    Anyway, wonderful job Andrew!

Leave a Reply

Security Code: