Fax Alert, Baseball Weather

  • Fax machines.
  • Margret
  • Baseball in Texas
  • Baseball in KY, Flemming County.
  • Lightning
  • Funnel over the hill
  • Sink holes in mud, girl, thinking of Scene in The Rescuers
  • Glass, box spring gate
  • Building maze
  • Gloves
  • Tornado

 

Found myself in an cubicle farm somewhere in Texas, with computers and Fax machines everywhere broken down and several people all shouting with angry voices at me to fix them. I set to work, frantically taking machines apart, and putting them together, mostly successful until I came upon one particular model that wouldn’t respond to my attempts. For whatever reason the entirety of that office depended on getting that one machine to work, and nothing I tried would get it working.

Finally some unidentified person said “why don’t you just get another one.” Made sense, so I stepped outside. Turns out the office was right on a Vegas like strip with blaring lights and signs. Several of these signs were about Baseball. A woman next to me remarked that no one loves their baseball like people in Texas. When I turned to look, this person as Marget Moore (Tom Moore’s mother, who is still alive and kicking at 90+ in the real world). I responded with, I don’t know, we love it an awful lot in Kentucky too…

…instantly I was at the far end of an old farm in Flemming County that belonged to Cody’s grandmother. The farm is very real and sits on a small flat halfway up the north hillside of a long east/west valley. For the most part its geography was consistent in the dream. A storm was approaching but there was a baseball game in progress. Most of the players were children, with a few adults. All were strangers to me except the catcher. In the dream I knew the catcher as a friendly acquaintance, but he doesn’t match up to anyone from real life.

As if to answer Marget’s statement about Texans loving baseball, this person said we play no matter what. Right on cue, he was nearly struck by lighting from the storm, singing his cap. He laughed it off and said nothing short of a tornado would stop their game. Sure enough, I got an eerie feeling – there wasn’t a visual cue of danger, but the air smelled wrong. After a couple of minutes checking the sky, I finally saw a funnel was beginning to form on the opposite side of the valley. It hadn’t yet materialized, but I knew we were in big trouble.

I called for my friend’s attention, and he immediately agreed we had to get everyone to a safe spot. We shouted warnings and everyone started heading for the pig sty. Along the way we had to pass through a kind of quicksand. large holes would open up randomly, and we had to carefully skip from rock to rock in order to avoid them. In the dream this seemed perfectly normal. A particularly large on opened in front of me that required skirting the fence line around its edge to get by. One of the girls told me “That one always happens to you”. I joked “yeah”, and remember thinking the hole reminded me of the tide pool hole in The Rescuers. No one had any real problems though, and we got them inside.

Once in the building, my friend and I remarked it wasn’t really going to help much, but we both knew it had a cellar that would do the trick, if we could just find the entrance. He suggested the very far end where a big pile of stuff lay. He set to getting a big pane of glass out of the way, while I laid down to get leverage to shove a set of box springs that was jammed in the space. It only took a moment for both of us. He got the glass cleared, and I was able to force the box springs forward, but doing so knocked out parts of the far wall and exposed us. It didn’t matter though, because we’d uncovered a small hole – this was the entrance and at that point everyone was going to be safe.

My friend went to go everyone gathered, and I looked down to realize I was wearing my full compliment of exploration and emergency gear, with only my gloves missing. I don’t know why, but I thought it simply wouldn’t do to not have them, and also knew my truck was parked nearby. I didn’t bother to say anything to anyone since they were safe now, and leaped outside through the collapsed wall.

The wind was horrible and there was a fog that made visibility nearly zero. Also, several other buildings were laid out in such a way that I had to maneuver around them and couldn’t see the driveway until I came round a corner. When I did, there, not 10′ in front of me was the tornado. It was no wider than a car and this seemed normal, but still stretched ground to sky like a real tornado would. As soon as I saw it I realized my life was over; there was no escape. I simply knew this.

I remember being annoyed that I was now fully isolated and alone after being around people not seconds ago. I also remember thinking I would at least take this on my own terms and tried to move forward. I couldn’t though. I’d been afflicted with that weird ream paralysis. Not only could I not get away, I couldn’t budge myself at all. I struggled to take just one step but my legs simply wouldn’t obey.

The tornado for its part was moving closer, but in circles, taking it toward then away from me. I was upset more at the total loss of dignity than anything else. I could barely even speak but after some struggle I did manage to mutter a challenge (quote): “Come on you bastard, come and get me.” It was the only defiance I could produce – no other part of my body would respond.

The funnel kept getting closer, and I kept trying to move for what seemed like several minutes. Finally it was within just a couple of feet and at that point stopped circling and started moving directly toward me. I still couldn’t move my legs, but with a last effort I was able to just lean forward and swat at it. I recall some smug satisfaction that no matter how futile my efforts (swatting at a tornado, lol), at least I wasn’t 100% helpless after all. It enveloped me immediately after and the dream ceased.

Analysis

ADHD much? This dream is clearly the result of random thoughts and interests. It is well beyond analysis, at least for an amateur such as myself.

 

Food Memior Events List

  1. First visit to Druther’s.
  2. Learn to love.
  3. Immunization/broken trust.
  4. Comfort, attachment.
  5. Separation.
  6. Reintroduction to Druther’s.
  7. Evaluation.

 

3, 1, 4, 2, 5, 7, 6

1, 2, 3, 7, 5, 4, 6 – Possible, but not “true”.

7, 6, 5, 4, 3, 2, 1 – Write thoughts first,t hen step back through order of story in reverse narrative. Could work with effort.

 

Food Memior Intoduction Workshop

Review of Food Memoir Introduction.

Look over your peer’s comments. Write a short reflection on what you plan to do in your next draft.

Both of my group members commented on my use of language and diction, or rather overuse of it. It appears I will need to tone down the level of wording used. This may prove difficult as my use of strong diction is a natural inclination, not a conscious decision.

An undercurrent was that the reading should be tailored more for a general audience.

Are your peers comments helpful? Why or why or not.

The comments themselves were well thought. Whether or not they will prove helpful hinges on my ability to follow properly.

Food Memoir

Download

2014-09-29

Caskey, Damon V
Ms. Casero, Courtney
WRD 110-038
2013-09-29

Still Rather Go to Druther’s

To you dear reader, I will start this memoir with a fair warning. If you are expecting a lengthy pontification on the joys of a specific bit of culinary delight, you are going to be disappointed. Oh there will be some gushing about the greasy breaded fowl and equally triglyceride spiking side dishes, but for the most part this is a story of trust and disappointment. Nostalgia vs. reality. Desire and progress. Or perhaps just a bit of overly dramatic exposition on of tasty fast food from a regional franchise no one outside of Kentucky likely ever heard of? I shall leave quandary that to you.

The memory of my first Druther’s exposure is nebulous at best, but I do remember it wasn’t even a Druthers’ yet. I was perhaps three years of age at my young mother’s side visiting Aunt Sanchia at the “Burger Queen”. At the time I recall finding the concept amusing. Thanks to the ubiquity of advertising, I knew of Burger King – so it only made since there would be a wife, yes? Soon after Druther’s would become Druther’s, and I would be introduced to a brand of low brow cuisine that my unrefined but discerning taste still craves to this day. I’d like to tell you more of when and how this happened, but alas the memory has been lost to a timeless ether. When I say I’ve loved Druther’s longer than I can remember, I mean it!

Alas, the innocence of youth must give away to education and progress does it not? You aren’t likely to get far in this world without a lengthy tryst in school, and you won’t certainly won’t get in the door without the dreaded immunizations. I’ve never heard of a child who didn’t shudder at the thought of needles, and I sad to say took this to new heights. My mother was a clever sort though. She knew the typical child bribes would not suffice. Candy? Ice Cream? Sure, I enjoyed those things – but if you wanted to bribe me good and proper, you had to appeal to my budding carnivore nature. The simple promise of a Druther’s Chicken dinner afterward was all it took to get me sitting stoically subdued while Dr. Caudill performed her roughshod but well-practiced exam. All was going well, and my fears were quieted by the assurance they would informed me of every step before it transpired. Unfortunately, the PA on duty (Suzie, I name I shall never forget) must have had a different idea of “informed” than I did. I will never forget the sudden searing pain in my right arm that came without sight, sound, or warning of any kind. To my everlasting shame I screamed aloud like the panicked child I was, though I did manage presence of mind not to jerk away and risk more injury. What remained of my mental faculties after processing those sensations was to be spent on one thought: I had been right all along. No one in the medical profession was to be trusted. Ever. The years since, rather than calm my suspicious, have instead provided me with a far more robust frame and acerbic jocularity to enforce them. To wit, I am a polite but less than fun patient to get stuck attending to. Fair? Maybe not, but I didn’t care then and have no plans to start any time soon. Anyone with the misfortunate of tending my wounds and calamites may thank Ms. Suzie for your troubles.

Now then, weren’t we talking about a reward of the culinary sort? With bedside manor burned and lesson learned the promise of regional pseudo fast food goodness was filled less than an hour later. Truly, I lack the appellations needed to describe the sublime experience of each bite, nor am I sufficiently adroit describing psychology subtleties to fully explain the obvious correlation of comfort vs. true taste. What I can say is the meal was and remains one of the best I ever had the privilege to sit in front of. I may have solidified a distrust for doctors, but I also learned that if you save the reward for later, any unwanted task can be turned around. Even now as I write this, I look forward to rewarding myself with this evening’s meal. Holding off until the work is complete will make it all the sweeter, just as facing the ultimately well founded fears of an immunization visit first transformed a simple meal into a grand reward.

Alas again, youth gives way once more, and so it goes like onion layers until I found myself an adult. Well, at least chronologically, even if lacking the maturity to back it up. Sadly, I had to count Druther’s as one of the many things lost along the way to that nebulous mecca of adulthood. Only a few short years after the traumatic needle stick incident, Druther’s began selling their franchises to Dairy Queen. Those that did not convert simply shuttered outright. It was a travesty of the highest order I tell you! Or so I believed. As it happens, there is still as I write this one Druther’s remaining. Cursory google searches revealed that several franchise owners in Central Kentucky knew a good thing when they had it. They purchased rights to operate with the former Druther’s name and formula, and continued their taste bud teasing operations as usual. But even these holdouts gradually dwindled, until as of today, 2014-09-29 only one remains. Situated in Campbellsville KY, it is the last Mecca for Druther’s lovers everywhere.

No sooner did I discover these facts had I made the decision to seek out and satisfy my subdued but still intense craving for Burger Queen’s spawn. It was only a two hour trip from my Lexington area domicile. Certainly nothing all that far out of the way. Yet time once again proved herself a cruel mistress. Activities and responsibilities continuous coalesced to delay my intended pilgrimage for over two years. But one cold and rainy late fall afternoon I found time and purpose enough to set forth. What better way to travel and enjoy comfort food? I love the rain and cold weather, especially when seeking out a nice meal. Somehow the verisimilitude of warm luxury inside and what most consider unwelcome weather makes any food taste better. The trip was pleasant enough; while the truck’s electronic brain futility struggled to bring economy into a two ton metal box and its three hundred horse power plant, my less binary calculations swirled around Druther’s centric childhood memories. Silly one shot moments like a cheesy “Chilly? Chilli!” sign in the window, or the literal fryolator scrapings they had the nerve to market as “Crispens” mixed and mingled with childhood nostalgia to whet the anticipation even more.

Finally, the moment arrived! I walked in the door, greeted by a comely red haired lass who identified me as a “tourist” on site. Turns out I was but one of many who wanted a little taste of Kentucky’s own take on 80’s fast food. Order was taken, and I even got a visit from the manager who liked hearing stories from visitors. Everything was perfect, just like the day I had my unsuspecting arms pierced and pumped full of chemicals I couldn’t hope to annunciate. Then I took a bite. It was good, and little else. I cannot recall being more disappointed in a meal. In my comforting nostalgia I had expected to indulge in what could only be described as salt, grease, virgin purity and the coo of white dives. Instead it was just… good.

The lesson I took from this is that even when you are aware of human frailties like nostalgia – they will take hold anyway. I knew well as anyone building up an experience too much might result in a letdown, but I did so anyway. Don’t get me wrong, it was good. Perhaps more so than I realized. That is the true failing of over anticipation. You may in fact be so disappointed or disgusted you don’t realize the thing was in fact a wonder you should be filing as a present memory rather than comparing it to the past.

Don’t even lose sight of your childhood, but nor should you allow it color your life’s perceptions as an adult. Whether old or new, see every experience for what it is rather than what you wish it to be, and you might be pleasantly surprised. I intend to go back to Druther’s soon, and next time I’ll be better prepared for the uncultured greatness that awaits me.

 


 

2014-09-20
Food Memoir First Draft

To you dear reader, I will start this memoir with a fair warning. If you are expecting a lengthy pontification on the joys of a specific bit of culinary delight, you are going to be disappointed. Oh there will be some gushing about the greasy breaded fowl and equally triglyceride spiking side dishes, but for the most part this is a story of trust and disappointment. Nostalgia vs. reality. Desire and progress.

I don’t really recall the first time I was exposed to Druther’s, but I do remember it wasn’t even a Druthers’ yet. I was maybe three years of age, on my young mother’s side visiting Aunt Sanchia at the “Burger Queen”. At the time I recall finding the concept amusing. Thanks to the ubiquity of advertising, I knew of Burger King – so it only made since there would be a wife right? Soon after Druther’s would become Druther’s, and I would be introduced to a brand of low brow cuisine that my unrefined but discerning taste still craves to this day.

Alas, the innocence of youth must give away to education and progress does it not? You aren’t likely to get far in this world without a lengthy tryst in school, and you won’t get in the door without the dreaded immunizations. I’ve never heard of a child who didn’t shudder at the thought of needles, and I sad to say took this to new heights. My mother was a clever sort though. She knew the typical child bribes would not suffice. Candy? Ice Cream? Sure, I enjoyed those things – but if you wanted to bribe me, you had to appeal to my budding carnivore nature. The simple promise of a Druther’s Chicken dinner afterward was all it took to get me sitting stoically subdued while Dr. Caudill performed her roughshod but well-practiced exam. All was going well, and my fears were quieted by the assurance they would be me informed of everything before it happened. Unfortunately, the PA on duty must have a different idea of informed than I do. I will never forget the sudden searing pain in my right arm that came without sight, sound, or warning of any kind. To my everlasting shame I screamed aloud like the panicked child I was, though I did manage presence of mind not to jerk away and risk more injury. What remained of my mental faculties after processing those sensations was to be spent on one thought: I had been right all along. No one in the medical profession was to be trusted. Ever. Fair? Maybe not, but I didn’t care then and have no plans to start any time soon.

With this bridge burned and lesson learned the promise of regional pseudo fast food goodness was filled less than an hour later. Truly, I lack the appellations needed to describe the sublime experience of each bite, nor am I sufficiently adroit describing psychology subtleties to fully explain the obvious correlation of comfort vs. true taste. What I can say is the meal was and remains one of the best I ever had the privilege to sit in front of. I may have solidified a distrust for doctors, but I also learned that if you save the reward for later, any unwanted task can be turned around. Even now as I write this, I look forward to rewarding myself with this evening’s meal. Holding off until the work is complete will make it all the sweeter, just as facing the ultimately well founded fears of an immunization visit first transformed a simple meal into a grand reward.

Alas again, youth gives way once more, and so it goes like onion layers until I found myself an adult. Well, at least chronologically, even if lacking the maturity to back it up. Sadly, I had to count Druther’s as one of the many things lost along the way to that nebulous mecca of adulthood. Or so I believed. As it happens, there is still as I write this one Druther’s remaining. No sooner did I discover this fact I had made the decision to seek them out and satisfy my subdued but still intense craving for Burger Queen’s spawn. It was only a two hour trip. Certainly nothing all that far out of the way. Yet time once again proved herself a cruel mistress. Activities and responsibilities continuous coalesced to delay my intended pilgrimage for over two years. But one cold and rainy late fall afternoon I left the comfot of my home and set forth. What better way to travel and enjoy comfort food? I love the rain and cold weather, especially when seeking out a nice meal. Somehow the verisimilitude of warm comfort inside and what most consider “unpleasant” makes any food taste better. The trip was pleasant enough; while the truck’s electronic brain futility struggled to bring economy into a two ton metal box and its three hundred horse power plant, my less binary calculations swirled around Druther’s centric childhood memories. Silly one shot moments like a cheesy “Chilly? Chilli!” sign in the window, or the literal fryolator scrapings they had the nerve to market as “Crispens” mixed and mingled with childhood nostalgia to whet the anticipation even more.

Finally, the moment arrived! I walked in the door, greeted by a comely red haired lass who identified me as a “tourist” on site. Turns out I was but one of many who wanted a little taste of Kentucky’s own take on 80’s fast food. Order was taken, and I even got a visit from the manager who liked hearing stories from visitors. Everything was perfect. Just like the day I had my unsuspecting arms pierced and pumped full of chemicals I couldn’t hope to annunciate. Then I took a bite. It was good. I cannot recall being more disappointed in a meal. In my comforting nostalgia I had expected to bite into what could only be described as salt, grease, virgin’s blood and the coo of a white dive. Instead it was just… good.

The lesson I took from this is that even when you are aware of human frailties like nostalgia – they will take hold anyway. I knew well as anyone building up an experience too much might result in a letdown, but I did so anyway. Don’t get me wrong, it was good. Perhaps more so that I realize. That is the true failing of over anticipation. You may in fact be so disappointed or disgusted you don’t realize the thing was in fact a wonder you should be filing as a present memory rather than comparing it to the past.

Don’t even lose sight of your childhood, but don’t like it color your life as an adult. Whether old or new, see every experience for what it is rather than what you wish it to be, and you might be pleasantly surprised. I intended to go back to Druther’s soon, and next time I’ll be better prepared for waiting greatness.

 

PHP Object Oriented Request Data

PHP

This article assumes LAMP or other PHP based web layout, and basic proficiency with Object Oriented PHP scripting.

Have you ever found yourself wanting to use OOP methods in PHP but found it frustrating due to the rather bolted on nature of object support? In particular, dealing with outside data arrays like $_POST and $_GET?

Since the advent of OOP support in PHP, it doesn’t take long to get spoiled by the type hinting and name space advantages OOP offers (I’ll leave the other benefits to be debated by the ever on going Procedural vs OOP soldiers still at war out there).

The problems come when you have to start processing uncontrolled outside data, and as mentioned above, one of the biggest offenders is request data from the client. The moment this occurs – pretty much the moment you build any website, your nice clean OOP concept goes right out the window. Type hinting and automated error checking quickly follow suit. How do we fix this? Let’s start with our goals:

  • Type hinting. Without type hinting, powerful IDEs like Dreamweaver are little more than very expensive text editors.
  • Deal with missing variables. Even with validation, there are times, perhaps by design when some incoming variables might not have a value assigned.
  • Avoiding repetition. Re typing array keys over and over isn’t just inconvenient. You’re practically begging to insert hard to locate typo bugs in the code.

 

Now with those objectives in mind, it’s easy to see the first two could be solved by grouping our variables into an object. The real question is how to get them there and avoid repetitious code.

For a working example let’s assume we have an incoming form post with the following fields:

  • First Name
  • Last Name
  • E-mail
  • Phone

 

We’ll use the HTML5 required attribute and JavaScript validation to make sure most of the fields are filled out, but we want “Phone” to be optional. This is all well and good, but as any experienced developer is aware, you can never, EVER trust client side validation. So even without an optionally blank field, we’re going to have to ensure missing variables are initialized on post.

Let’s try a couple of solutions and evaluate them vs. our criteria. For this article, we’re going to use $_REQUEST. If you aren’t familiar, $_REQUEST is a handy single command that acquires all values you’d normally get from $_GET, $_POST and $_COOKIE.

 Standard Object

// Initialize standard object with request array.
$request = object($_REQUEST);

// Do stuff...

 

On the surface this is a beautifully elegant solution. The PHP Standard Object initializes with $_REQUEST in a single line, and any $_REQUEST vars are now available as data members.

Unfortunately, this method has two serious drawbacks.

  1. Firstly, Standard Object has no methods for our members. All we’ve really accomplished is shifting a bunch of data from one global space to another with no validation or protection. Might be quick and easy, but it’s nothing close to an object oriented solution and will inevitably bite us in the butt at some point.
  2. Any missing $_REQUEST vars stay missing. The Standard Object can’t include what isn’t there to begin with. To solve that issue you might try this:
// If any post vars are missing, populate them with NULL.
if(!isset($_REQUEST['name_f']))     $_REQUEST['name_f']     = NULL;
if(!isset($_REQUEST['name_l']))     $_REQUEST['name_l']     = NULL;
if(!isset($_REQUEST['mail']))       $_REQUEST['mail']       = NULL;
if(!isset($_REQUEST['phone']))      $_REQUEST['phone']      = NULL;

// Initialize standard object with post array.
$post = object(<a title="$_REQUEST" href="http://php.net/manual/en/reserved.variables.request.php" target="_blank"><em>$_REQUEST</em></a>);

// Do stuff...

 

With this technique we insert blank values into $_REQUEST before initializing Standard Object, and solve the missing variable issue. Unfortunately we’ve exchanged one problem for another: Now we have to repeat every key twice. Lastly, we’ve also done nothing about type hinting. Conclusion? Not with the hassle.

Custom Class, Populate Members Individually In Constructor

class request
{
    private
        $name_f    = NULL, // First name.
        $name_l = NULL, // Last name.
        $mail    = NULL, // Email.
        $phone  = NULL; // Phone number.
    
    // Class constructor
    public function __construct()
    {
        $this->populate_members();
    }
    
    private function populate_members()
    {
        if(isset($_REQUEST['name_f']))    $this->name_f    = $_REQUEST['name_f'];
        if(isset($_REQUEST['name_l']))    $this->name_l    = $_REQUEST['name_l'];
        if(isset($_REQUEST['mail']))      $this->mail      = $_REQUEST['mail'];
        if(isset($_REQUEST['phone']))     $this->phone     = $_REQUEST['phone'];
    }
    
    // Accessors
    public function get_name_f()
    {
        $return $this->name_f;
    }
    ...
    
    // Mutators 
    public function set_name_f($value)
    {
        $this->name_f = $value;
    }
    ...
}

// Initialize class object.
$post = new post();

// Do stuff...

 

This is a little better. By writing our own class and running a function that populates piecemeal in the constructor, we get type hinting from our IDE and all of our variable instantiate work is packaged up. One problem remains – we still have to type every identifier three times at minimum. That’s a bug just waiting to happen. It’s a good start though, so let’s build on it a bit with the method below:

Custom Class, Dynamic Population

class request
{
    private
        $name_f    = NULL, // First name.
        $name_l = NULL, // Last name.
        $mail    = NULL, // Email.
        $phone  = NULL; // Phone number.
    
    // Class constructor
    public function __construct()
    {
        $this->populate_members();
    }
    
    private function populate_members()
    {
        // Iterate through each class variable.
        foreach($this as $key => $value)
        {            
            // If we can find a matching a post var with key matching
            // key of current object var, set object var to the post value.
            if(isset($_POST[$key]))
            {                    
                $this->$key = $_POST[$key];                                   
            }
        } 
    }
    
    // Accessors
    public function get_name_f()
    {
        $return $this->name_f;
    }
    ...
    
    // Mutators 
    public function set_name_f($value)
    {
        $this->name_f = $value;
    }
    ...
}

// Initialize object.
$post = new post();

// Do stuff...

 

Now we’re in business! This might look a bit complex at first glance, but it’s really the simplest of all attempts thus far. More importantly it provides everything we asked for and then some.

Let’s look closer at the populate_members() method and see what’s going on:

foreach($this as $key => $value)

 

PHP allows us to loop through all the data members of an object just as if it were an array (this has other uses elsewhere, more on that in another article). We can even key the data member’s name as a string just as if it were an array key, and that’s what we’re leveraging for a dynamic data member population. FYI, we really don’t care about $value here, it’s just a necessary filler syntax.

if(isset($_REQUEST[$key]))
{                    
    $this->$key = $_POST[$key];                                   
}

 

Now in each loop we use the value of $key as an string array key for $_POST and evaluate it with isset(). If isset() returns TRUE, we know the value exists. All that’s needed is to populate the corresponding data member with that $_POST value. Again, PHP helps us out; it is perfectly legal to pass string variables as a data member id at run time.

Once the loop is completed, all $_REQUEST keys that have a matching data member will have been located and the data members populated. Any missing $_REQUEST values are simply ignored; we already established a default value for their corresponding data members.

At this point all conditions have been met. Your IDE will provide type hinting and error checking. Variables are only entered once as data member names. Missing $_REQUEST values are dealt with elegantly. No helper code outside of the class is needed. Best of all, this concept isn’t limited to $_REQUEST at all. Any array array is also fair game.

We could stop right here, but unfortunately there’s just one little flaw remaining. Elegant as it is, this solution fully bypasses the object’s mutator methods, and in the process throws best practice data validation right out the window. There’s nothing stopping you from putting some data validation into the loop (or ignoring best practice), but with just a little more front end work, you can leverage your mutators and keep all of the data validation encapsulated.

Custom Class, Dynamic Mutation

 

class request
{
    private
        $name_f    = NULL, // First name.
        $name_l = NULL, // Last name.
        $mail    = NULL, // Email.
        $phone  = NULL; // Phone number.
    
    // Class constructor
    public function __construct()
    {
        $this->populate_members();
    }
    
    private function populate_members()
    {
        // Interate through each class variable.
	foreach($this as $key => $value) 
	{			
		// If we can find a matching a post var with key matching
		// key of current object var, set object var to the post value. 
		if(isset($_REQUEST[$key]))
		{
			// Add 'set_' prefix so member name is now a mutator method name.
			$method = 'set_'.$key;
				
			// If a mutator method by the current name exists, run it and
			// pass current request value. 
			if(method_exists($this, $method)=== TRUE)
			{										
				$this->$method($_REQUEST[$key]);
			}
		}
	} 
    }
    
    // Accessors
    public function get_name_f()
    {
        $return $this->name_f;
    }
    ...
    
    // Mutators 
    public function set_name_f($value)
    {
        $this->name_f = $value;
    }
    ...
}

 

This looks and works very similar to the above method, but instead of populating members directly, values are routed through the object’s mutator methods. This does double duty of encapsulating validation and providing a secondary gateway to control just which members you want populated at all.

The secret is that PHP allows you to reference methods by string at run time just it it does members. First, we use a bit of string manipulation to get a member name from our $_REQUEST name. I use a prefix of “set_” for my mutators, so it’s a simple matter of tacking that on to a placeholder variable.

// Add 'set_' prefix so member name is now a mutator method name.
$method = 'set_'.$key;

Next, we will need to make sure the method exists. PHP will immediately halt the script and throw a fatal error if an attempt is made to call non-existent methods, so this check is vital. If the check passes, we use the string to call out mutate method and pass it our $_REQUEST value. Notice how the member’s signature is NOT part of the string – treat it exactly as you would any hard coded member’s signature.

// If a mutator method by the current name exists, run it and
// pass current request value. 
if(method_exists($this, $method)=== TRUE)
{										
	$this->$method($_REQUEST[$key]);
}

Now we truly are ready. All of our $_REQUEST data is packaged into a fully encapsulated object with elegant evaluation and gateways. Our IDE will now provide us with type hinting and error checking, plus all of the code is reusable and double keying has been kept to the bare minimum. No more hidden typos, mystery variables, and annoying PHP notice errors!

Give it a try, season to taste and enjoy.

Until next time!
DC

Define Food Memoir

Q: Based off of your reading of Foer’s Storytelling, what is a food memoir? 

It’s hardly a clever conclusion to draw, but in reading Jonathan Foer’s work, I found the so-called “food memoir” functions less as a strict genre and more as a storytelling framework used to explore broader ideas. Food, in this case, feels more like a vessel than a theme. It becomes a subject through which the author delivers philosophical, emotional, and ethical commentary.

In my view, you could replace food with children, cars, religion, or nearly any other personally meaningful topic, and the structure of the narrative – even much of its tone – would remain intact. That suggests the story isn’t truly about food alone. It’s about belief, identity, and internal conflict. Food just happens to be the chosen lens.

Definition

A food memoir is a general memoir in which food serves as the narrative entry point – not necessarily the defining focus. It is one of many interchangeable subjects used to explore deeper personal or cultural themes.

Reading Response – Critiquing Eating Animals

WRD 110 – Reading Response

Almost immediately upon starting the assigned reading from Eating Animals, I found myself waiting for the inevitable payoff – the explosive thought bomb. It’s a common narrative device: begin with what seems like a non-sequitur, let the reader’s curiosity simmer, then deliver a sudden pivot meant to jolt the audience into a new frame of mind. The tactic worked. The opening tale circles around to a hard-hitting line – “If nothing matters, there’s nothing to save” – intended to anchor the reader emotionally. While I agree with the sentiment, I couldn’t help but feel it was also a pointed nudge – a soft coercion toward accepting the author’s moral authority.

That moral authority, while never overtly declared, is unmistakable: eating animals is wrong. Foer insists the work is not meant to convert or judge. Yet throughout the essay, the problems with eating meat are detailed with care, while the arguments in favor of it are barely addressed or brushed aside. What is presented as introspection often reads as confession. Foer’s tone is that of a man striving for an ideal he already accepts as correct – vegetarianism. His struggle is not about whether the ideal is valid, but about whether he can live up to it. What I find troubling is that the premise itself – that abstaining from animal consumption is morally superior – is never actually questioned. It is simply treated as a moral default, a virtue one must aspire to. This leaves little space for open dialogue.

Rather than challenge that ideal with personal narrative, I’ll instead lean into what matters most in effective communication: knowing your audience. Our class is diverse, and opinions about food – particularly ethical food choices – vary widely. Some students strongly support Foer’s conclusions. Others, myself included, are less convinced. This isn’t a simple discussion, and to unpack the full debate would go well beyond the scope of a single response. Instead, I would encourage a close and critical reading of the piece and invite you to consider the following:

  • Did you find the work pragmatically informative, emotionally persuasive, or both?
  • What types of evidence were offered to support the author’s point of view?
  • If you were to communicate the same message, what changes – if any – would you make to improve its reception across a broader audience?

Thank you for taking the time to consider this response.