RSS RSS Comments

Soapbox - Written by Mat on Friday, March 16, 2007 13:32 - 0 Comments

Why Can’t Programmers … Program?

The rant continues.  I found this article while reading through Digg and it pretty much objectifies what I’ve continued to rant about - you may “learn” while you’re in school but sometimes what you’re “learning” can be pretty superficial.  Instructors are there to guide you and they will often give you tons of information but it’s your job to take it and run.  With the tools you are provided, experiment, try variations, do more than just get the basics.

In the case of this article, the simple test is:

Write a program that prints the numbers from 1 to 100.  For any number that is a multiple of 3, print “fizz” instead of the number and for multiples of 5, print “buzz”.  If the number is both a multiple of 3 and 5, print “fizzbuzz” instead of the number.

If you’re looking at this and you can’t write it in either Javascript or PHP - it’s time to get cracking!  As a challenge to all my scripting students (that’s IMD223, IMD 322 and IMD402 for those of you who are wondering), try it!

Now I’m not saying that I expect every IMD student to become a programmer - I realize that this is primarily a design school - but the objective is still the same.  For those of you with design inclination, can you turn a photograph into a “Lichtenstein”-style pop art image?  Or how about how to create a tilable background image from a downloaded graphic?  Just like scripting languages, graphic applications have an incredible wealth of tools available, most of which you probably have never touched or may not be aware of it’s capabilities.  An interesting article - “Design Schools: Please Start Teaching Design Again“.

Keep working at it - develop your professional skills if you want those high-end jobs!

And just in case you were wondering:

Javascript

<script language=”javascript”>
var x,y;
for ( x = 1; x <= 100; x++ ) {
 y = x;
 if ( x%3 == 0 ) { y = ‘fizz’; }
 if ( x%5 == 0 ) { y = ‘buzz’; }
 if ( x%3 == 0 && x%5 == 0 ) { y = ‘fizzbuzz’; }
 document.write(y+’<br />’);
}
</script> 

PHP

<?php
for ( $x = 1; $x <= 100; $x++ ) {
 $y = $x;
 if ( $x%3 == 0 ) { $y = ‘fizz’; }
 if ( $x%5 == 0 ) { $y = ‘buzz’; }
 if ( $x%3 == 0 && $x%5 == 0 ) { $y = ‘fizzbuzz’; }
 echo $y.’<br />’;
}
?>
Share this post on digg, del.icio.us, facebook, blah blah blah


Leave a Reply

Comment



Quick Lists

A Little Reading Music

Meanwhile on Flickr ... [Design//Diseño Pool]

sociolimpiadas
lorena tutis
menbrete
galm
portafolio edw
DIgtal
2008
Psycho
Feed Me
Vochito
Ani
Disco FID

Reading Recommendations



IMD213 Int. Scripting

Jun 11, 2008 7:45 - 0 Comments

CSS selectors slow load times

More In IMD213 Int. Scripting


IMD345 UCD III

Jun 27, 2008 23:23 - 0 Comments

A second chance for that first impression?

More In IMD345 UCD III


Soapbox

Jul 5, 2008 1:10 - 0 Comments

getStringFromObj()

More In Soapbox