Potential presentation idea: What a cookbook can teach us about programming

  • Ray K

    SSC-Dedicated

    Points: 31016

    I was looking up information about ColdFusion (my still-relatively-new job uses CF, which I've never used), and in doing some research, I came across the following sentence:

    "An algorithm is just a fancy name for a series of steps, like tying your shoelaces."

    Before I got to the end of the sentence, my brain filled in: "or like a cookbook."

    That's when it hit me: what if we used instructions from a cookbook to teach simple programming techniques?

    In my SQL Saturday talk about conveying concepts to non-technical people, I mention how using analogies is an effective means of explaining concepts.  I figured, if equating algorithms to simple instructions (like a cookbook) can teach concepts, then why not?

    What do people think?  Sound like that would work for a presentation?

    +--------------------------------------------------------------------------------------+
    ‌Check out my blog at https://pianorayk.wordpress.com/[/url]

  • Ray K

    SSC-Dedicated

    Points: 31016

    I also had a similar idea: "what music notation can teach about programming" (I'm a part-time musician), but I don't know how many people would understand music notation.

    +--------------------------------------------------------------------------------------+
    ‌Check out my blog at https://pianorayk.wordpress.com/[/url]

  • Bill Talada

    SSChampion

    Points: 11955

    Effective teaching methods is an extremely complex subject and hotly debated. A cookbook is a simple algorithm with a subset of programming constructs so it is a start. Metaphors and models should start out easy but get swapped out for more complex metaphors and models as the student grasps concepts. Eventually, giving two conflicting models and explaining how a new concept fits neither but is somewhere in-between may be helpful. In the end, no model is correct but was just scaffolding to help a person expand their consciousness. As they say, the map is not the territory.  The wiseman holds a model loosely but holds reality as truth.

    Unfortunately I think the whole world skips step 1 (understanding) and jumps to step 2 (implementation) which confuses all learners. The information I learned from school is mostly useless because school never allowed me to figure out things on my own so there was never any understanding or mastery of concepts. Time spent learning precise definitions of terms and investigating why there are distinctions is far more advantageous than doing stupid math factoring exercises for a year. When we simply accept a definition from a teacher, we are forever cursed with ignorance.

  • Ray K

    SSC-Dedicated

    Points: 31016

    Bill Talada - Wednesday, August 23, 2017 8:51 AM

    Effective teaching methods is an extremely complex subject and hotly debated. A cookbook is a simple algorithm with a subset of programming constructs so it is a start. Metaphors and models should start out easy but get swapped out for more complex metaphors and models as the student grasps concepts. Eventually, giving two conflicting models and explaining how a new concept fits neither but is somewhere in-between may be helpful. In the end, no model is correct but was just scaffolding to help a person expand their consciousness. As they say, the map is not the territory.  The wiseman holds a model loosely but holds reality as truth.

    Yep, no argument here.  However, I'm also thinking about my potential target audience.  I'd be gearing towards people who are thinking, "I know nothing about programming, I'm interested, but I don't know how to get started, and would like to get into it."  I'm just looking to get their feet wet.  Once they grasp simple concepts, they can move on to more complex concepts later.

    At least that's the idea, anyway...

    +--------------------------------------------------------------------------------------+
    ‌Check out my blog at https://pianorayk.wordpress.com/[/url]

  • bmg002

    SSC-Insane

    Points: 22154

    I do like the idea, but like cooking, coding can have a million different ways to get the same result.
    You want to cook the "perfect" steak.  First, anyone who says "well done is a good steak" is wrong.  But, like with coding, anybody who says "ALL functions should be 10 lines or less" is wrong.  There are some cases where it is true (some people do like well done steaks and some applications can be written with functions being 10 lines or less).
    I think that if you try to go with the cookbook example, a lot of people are going to come out of it thinking that there is only 1 way to write the statement they want.
    There are thousands of ways to write a computer program that does the exact same thing even using the same language.  Even writing a "hello world" application.  If you set a group of people in front of computers with Visual Studio 2015 installed and, without writing any requirements out, just tell them "write a hello world program on this computer", there are so many ways to do it.  One guy may have ASP.NET experience and write up an overly complicated web application for hello world.  The next guy may do it in visual basic and just show a messagebox.  While the next one does a console app in C# to print hello world and then pause.  And then there is me who would write a single line bat file that prints out "hello world" (@echo hello world).
    My opinion, the first step to learning to program is learning to think about what is actually being asked and then figuring out, based on the tools I am provided, what is the best one to use.
    The next thing a "new" programmer needs to learn is to ask "what is it you are trying to accomplish?".  I don't know how many times I've been asked "can you make a program that does this?  Ok, now add this.  and this. and this.  and ..." and in the end I have rewritten the stupid thing 2 or 3 times simply because the end user didn't tell me what they needed; they told me what they thought they wanted.
    Heck, not that long ago I wrote up an SSRS report for an end user.  They'd enter a serial number, and it'd spit out some information about it.  Then they asked for a second report that they would use information from the first to get more information.  I put it all into 1 report and the end user was super happy and even said "I didn't think we could do that.  That was why I wanted it in 2 reports.  This saves me so much time".  Sometimes end users like to come to the programmers with "solutions" instead of "problems" and it is very rare that their solutions actually solve their problems the way they expect.

    TL;DR - I think the cookbook idea is a neat one, but it may get people thinking there is only 1 way to skin a cat.  Might be better to teach "new programmers" to think critically about a problem before they start cooking.  When the customer says "I want a steak" and you bring them a perfectly cooked steak and they say "this looks nothing like fish", the programmer is going to lose it.

  • Kevin3NF

    SSCarpal Tunnel

    Points: 4550

    I can burn water....

    If you are familiar with cookbooks and can effectively use that to teach a concept...go for it!   If your student has never seen a cook book and won't admit to it, you may lose them at step one.  Something to look out for.

    I start my security session asking if anyone in the room is homeless....:D (Security/House Analogy)

    ------------------------------------------------------------------------------------------------
    Standing in the gap between Consultant and Contractor
    Kevin3NF
    DallasDBAs.com/Blog
    Why is my SQL Log File HUGE?!?![/url]
    The future of the DBA role...[/url]
    SQL Security Model in Plain English[/url]

  • Jeff Moden

    SSC Guru

    Points: 993645

    Kevin3NF - Wednesday, August 23, 2017 11:33 AM

    I can burn water....

    Heh... funny that you should mention that.  The monopropellant fuel that my late Dad invented is about 1/3rd water.  One of the tests the Navy does is a thing called a "Bonfire Test".  This is where they took 4 plastic 50 gallon drums full of the fuel and built a huge bonfire around it.  We have pictures of when the drums eventually failed due to the fire... the fuel almost put the fire out.

    But I digress... going back to teaching newbies....

    They say that one picture is worth a thousand words and I agree.  Using pictures and having the students draw their own pictures is one of the best teaching tools, especially when it comes to programming.  What kind of picture should you work with in programming?  There can only be one kind... good ol' fashion flow charts.  And I always start with counting from 1 to 1,000,000... even with T-SQL.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

    Helpful Links:
    How to post code problems

  • David Burrows

    SSC Guru

    Points: 64396

    Jeff Moden - Wednesday, August 23, 2017 4:46 PM

    There can only be one kind... good ol' fashion flow charts.  And I always start with counting from 1 to 1,000,000... even with T-SQL.

    Every time I think of this it reminds me of the first flow chart exercise I was given at school, lighting a match.
    What seems a simple task turns into a large decision making flow chart.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Bill Talada

    SSChampion

    Points: 11955

    Schools use Logo to teach programming since it is interpreted and very visual.  Logo has grown up into a systems simulator but is still very useful as a high school programming language. Now it is called Net Logo and is free from Northwestern U.  Recipes don't do looping nor conditionals, two constructs central to programming.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply