Jon Hermiz Blog

The guide to programming and analyzing SQL, .NET, and SAP

Forgetting the little things in life…

Remember the good old hello world program?  Ahh the first program any teacher in any type of programming course would assign was good old Hello World.  But as students / new developers we were excited!  Wow my first program and I got it to say Hello World and it displayed it right on my screen.  "Just take a look" you'd say to the student next to you, I even included the header iostream.h. 

How did our young minds go from writing programs like Hello World to robust database applications in the .net framework?  Do you ever wonder how your mind has actually created the beasts that people are using today?  Admit it, you are smart, better yet we are smart.  Computer Science guys are engineers, we're doctors, we are artists, and we're even lawyer's.  We have to take large business processes and convert it into a useable tool (engineers).  We have to debug, optimize, and fix bugs (doctors).  We have to design nice interfaces, whether web based or win form, and make them useable to end users (artists).  We have to fight for what we believe, pointing blame on our clueless end users (lawyers).

How did we ever go from writing hello world, and a mini calculator to these fairly large applications?  We've worked hard...that's how.  So programmers / dba's / and even you system admins take a moment smile and pat yourself on the back because you've busted your butt doing this stuff and you're damn good at it.

Since we've gone to writing complex applications I sometimes look back at some basic programs and say wow this is so simple that its difficult.  I've forgotten how to think in a simple manner.  We sit day to day writing use cases, designing forms, and working on large databases that we forget how to do the simple things in life.

So its time for some old school CS 101 programming assignments.  Here's 4 homework assignments you can do in any language:

1) In a pretty slick way output the maximum value of a unsigned integer.  Try to not use a library which allows you to display the maximum of this value (in addition such as max.h in C++).

2) Write a cash register program which displays the amount of change given back to the customer in dollars, quarters, dimes, nickels and pennies.  For instance:

Your total is 18.20

You give: 20 dollars

Output should be:

1 dollar

3 quarters

1 nickel

The program should try to use exact change using 1 nickel instead of 5 pennies for instance.

3) Write a program finding the first 500 prime numbers.  You should try to use the least amount of code and remember the limits of how to check for prime numbers..hint square roots.

4) Write an assignment to the next person who responds to this blog.  Please be nice and make it simple on the next guy or we wont get the next response!

Skip the ones you cant do, but #4 is a must!

Have fun

Legacy Comments

re: Forgetting the little things in life...
I object! :))
I have no idea how much a nickle or a peny or a dime is.
De-Yank yourself :)))

re: Forgetting the little things in life...
Err forget about the international folks...
Just do 1,3 and 4 :-)

Matt R.
re: Forgetting the little things in life...
Given today's wonderful and exciting new smart thinkers, would #2 include or substitue images of each instead of using words? Oh, and would this include a touch-screen interface so they don't have to use a separate UID which could cause them to lose focus of the screen and/or display which could in turn cause them to have to re-analyze the output of the program?


re: Forgetting the little things in life...
Yeah! hehehe