NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...
Web Hosting

best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< June, 2009 >>
SMTWTFS
123456
78910111213
14151617181920
21222324252627
282930
Search Blog

Recent Comments
Re: Railo 3.1 on Windows Server 2008 and IIS7 - Part 3 of 3 (by Jon at 8/27 2:04 PM)
Re: Hosts File Changes Not Acknowledged on Vista 64 (by Spacy at 8/24 3:46 PM)
Re: THE DAY CFUNITED DIED (by ComboFusion at 8/23 10:50 AM)
Re: My Grandpa (by Tasha at 8/10 4:29 PM)
Re: Just What IS a 'Service Layer', Anyway? (by dougboude at 8/02 10:10 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Isaac at 8/02 2:25 AM)
Re: PayPal IPN Coldfusion CFC (by Soyestudiambre at 7/25 6:12 PM)
Re: PHP vs COLDFUSION (by Tony Garcia at 7/17 11:24 AM)
Re: PHP vs COLDFUSION (by dougboude at 7/14 8:45 AM)
Re: PHP vs COLDFUSION (by Lola LB at 7/14 5:51 AM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

07 March 2008
What IS a Function, Anyway?
Function.
The word has given not just new coders wrinkled brows and vacant stares, but also most everyone who encounters the term initially. Though we programmers might tend to think  "function" only applies to us, in reality it crosses every boundary and therefore I believe that NOBODY should live one moment longer without being armed with a precise understanding of it. Here's what got me thinking about it...

Today as we were driving my step daughter home from school, I asked her what she was doing in math these days and she told me they were working with functions. It immediately brought to mind my first foray into Calculus taught by Mr. Musgrave, when "Eff of X" was a phrase I heard constantly yet was NEVER given the understanding of. Every single day I struggled to wrap my mind around what a function really was, what "Eff of X" was really saying, and never managed to until just a few years ago (hence I hobbled by with a mere C in that class). Now that I'm older and wiser, the term is no longer foreign to me and in fact is second nature, as I finally connected the dots between Calculus functions, Javascript functions, Coldfusion functions, and even the functions that occur in nature. What follows is my personal definition of what a function is, accompanied (as usual) by a colorful and simplistic analogy to help illustrate.

The Definition: A function receives something into itself, performs some kind of work on whatever the input was, and spits the results of that work back out. Period.

It can be a math function that accepts a value 'x', plugs it into some equation, and then returns the mathematical result; it can be a programmatic function that receives something into it...be it a numeric value, a string of text, an object, etc....and returns the results of the code it was told to execute. Ah, and here's the clincher, the missing link that will help ANYBODY, I mean even your TODDLER, to completely understand what a FUNCTION is:

Even your own BODY is a function! You give it some kind of input...let's say, a peanut butter sandwich. Your body performs some kind of WORK on that input (in our case, digestion), and VOILA! You get some output. In this case, a turd.

There is absolutely NO difference whatsoever between a calculus function, a programmatic function, the Human function, or even the myriad of individual functions that work in harmony within our own ecosystem. A function receives something in, performs some work on it, and gives something back.

Pass this tidbit on to everyone you know, even and especially your kids, so that perhaps when they too first encounter Mr. Musgrave's endless repitition of "Eff of X, boys and girls, EFF OF X!", they can avoid the mental anguish of trying to grasp something so simple and common sense, yet perpetuated (for some odd reason) as being so deep and abstract.

And now, if you choose to accept, your Assignment:
Find the nearest individual who you think would be least likely to understand what a function is (young or old), take two minutes to teach them the concept using their own body, their Play Doh Fuzzy Pumper Number 9, the oven, or anything else you can think of that they can relate to, and see if their retention of the definition isn't 100% every time you ask them thereafter.

Doug out  :0)



Posted by dougboude at 1:27 AM | PRINT THIS POST! |Link | 1 comment
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: What IS a Function, Anyway?
That's nice... Not sure mathematicians would agree with it, but I find your definition simple, elegant and, well, functional. By the way, Mr. Musgrave was obviously a lousy teacher.
Posted by Mattthew on July 23, 2008 at 5:52 PM

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Time to take the Turing Test!!!

2 plus 16 equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!