Monthly Archives: July 2008

You are browsing the site archives by month.

Freaking hells yeah

I am more than a little happy right now. I found out early this morning that my bonus was paid out with this pay period. It is in my bank account. I am overjoyed because now we can pay our rent AND buy groceries.

This wasn’t the best month ever. But it got a lot better today. Thank God. I so needed this to come in today.

Coding cleanly and correctly, or unlike me

Today a friend of mine asked me if I knew of a way to find the next 12 months (starting with next month) and returning an array of those months and their corresponding year. I told him that I was certain that I could do something like this and set out to do it. I came up with:

<?php
/**
 * Gets the next 12 months of the year, starting again at January.
 * 
 * This function will return an array of 'month year' for the next twelve months
 * 
 * @access public
 * @return array Array of month and year strings
 */
function getNextMonths() {
    /**
     * Get this month by number
     * 
     * Using the numeric value of the month allows for easy transposition into a 
     * new array.
     */
    $tm = date('n');
 
    /**
     * Get this year - because we will need this for the string output
     */
    $ty = date('Y');
 
    /**
     * Array of months keyed at 1
     * 
     * These are keyed at 1 because the date() function does this
     */
    $ms = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
 
    /**
     * Create a variable to hold out output array
     */
    $ma = array();
 
    /**
     * Now build the array, using only one loop
     */
    for ($j = 1, $i = $tm; $j <= 12; $i++, $j++, $ma[$j] = $i <= 12 ? "$ms[$i] $ty" : $ms[$i-12].' '.($ty+1));
 
    /**
     * Send back what we just made
     */
    return $ma;
}
 
/**
 * Output control - for the record, I do not count this as a line of code :-)
 */
header('Content-Type: text/plain');
 
/**
 * Test it
 */
var_dump(getNextMonths());
?>

Thinking that I had found the promise land with the awesome little bit of my brainy goodness I posed this problem to my coworker as a code challenge (we do that from time to time to keep our brains thinking). To my surprise and glee, my coworker came through and kick my sorry ass all over the place with his little piece of goodness (I added the comments):

<?php
/**
 * Gets the next 12 months from this month
 * 
 * @return array Array of "month year" strings
 */
function getNextMonths() {
    for ($i = 1; $i < 13; $i++) {
        $array[] = date('F Y', mktime(0, 0, 0, date('m') + $i, 1, date('y')));
    }
 
    return $array;
}
 
// Test it
var_dump(getNextMonths());
?>

Arrogance is of the devil and I think I have taken my fair share of it. Congrats Jason, you put me in my place. And Mark is now a little happier too because you totally gave him some kick ass code.

Now to open the discussion a tad… which one do you like and why? Comment away. I would be interested to see your comments.

A man that a man can look up to

Today I had the blessing of getting a call from my friend Greg. Greg is a friend of mine through marriage. His wife Yolanda has been very good friends with my wife since they were in grade school so naturally when Sandi and I got married I inherited some of her friends. Namely, Greg and Yolanda.

Greg is, to put it in terms a guy might understand, a man among men. He has always been the image of what a man should be like to me. I probably should have tried to mimic him at some point in my life because I always get the impressions that Greg is constantly looking forward and always succeeding. He just knows how to be a man and he lives it everyday.

A few weeks ago I was able to spend some time with Greg and we had a wonderful talk. We talked about our marriages, our money, our work.. all the things guys talk about when they get together and talk over food. I was amazed to find out that Greg has had some struggles with stuff that have had a severe impact on him, his marriage and his family. He was actually a real person, not just a real man, for the first time since I have known him.

Truth be told I developed a whole new respect for him that day. He already had made changes within himself that have started to improve his situation. He is stepping out and helping friends of his. He is making decisions and taking care of business. I love how he is handling this situation. But, back to the point I was making when I started this post…

I got a call from Greg today and was very happy at how our conversation went. Greg knows about my realization that I have am in search of my manhood. He is aware that I am going through some stuff right now just he is and that he can reach out to me. That means more to me than I can put into words here. And as we wrapped up our phone call Greg something to me that I think every man needs to hear at least once in his life, if not once a day:

Set the bar so damn high that you cannot even see it. If you set it too low you are going to trip over it. If you set it to where you know you can reach it you are going to end up hitting your head on it and knocking yourself out. Set the bar to a point where you have no choice but to go after it then get to getting after it. If you don’t set it outside of your reach how will you ever know how far you can reach?

Greg Dixon

Man to man Greg, I love you. I so needed to hear this today. Thanks for being my bud and thanks for being an example of a man that I can follow.

Feeling the effects of cowardice and the economy

I have been going through a major transformation in my life the past few weeks. Most of this transformation has stemmed from the fact that a few weeks ago I came to a life shattering conclusion that I have been a coward for a very long time. Somewhere in my life I decided that it was more important to make people feel good than to do the right thing. And because of this decision I made, Lord knows when, my life has been a series of bad decisions based on someone’s tears, fears, angst or discontent.

The effects of a cowardly man are far reaching. Everything that requires the strength of a man are shot to hell when a man refuses to be strong. And I believe things are designed to be that way. Men are made strong so we can use our strength. We are made aggressive so we can be aggressors. We are made to withstand because we need to withstand. It is in our makeup. Strength is not supposed to be something that looks good on a model or handles itself well under circumstance, strength is a meant to a be a lifestyle, a characteristic that is exuded daily by all men.

I have not lived that lifestyle. I have indeed allowed myself to be swayed by many different circumstances. And in so doing I have surrendered my position as a man, a leader and head of household to my wife. I have not only stripped myself of the authority and dominion inherent to me as a man but I have also placed my wife in a position where her identity as a woman is cloudy because of the things she has to do because I have chosen not to do them.

One area of long standing contention in my marriage has been finances. I am the sole provider of the house and have been for about five years or so. In the 13 years that Sandi and I have been married she has worked outside of the home for about five years with the remaining eight years being spread out over several periods in our marriage when we had new children or some other life event allowed/necessitated her be home with the kids.

Up until a few years ago I had managed the money in our home. I was diligent, relentless and incredibly passionate about making sure our bills were paid and our obligations met. I had the bank account balanced against my register every morning. I knew, to the penny, how much money I had available to my at any given point of any given day. I was on it.

Unfortunately at that time we did not make a whole lot of money so even though I had things firmly under control we did not really have a lifestyle. We had kids, a place to live, cars to drive and a little bit of food in the fridge. But that was about it. And Sandi felt like she was being locked out of the finances.

So in response to her feelings I decided to offer control of the finances to her. I am not one for two people handle the same task at the same time so I told her that she could have it if she was willing to take it all. She agreed and a few years back I gave her everything I had in relation to our finances. And you know what? For a couple of years she did a kick ass job of making sure everything was handled appropriately just as I had done. She also saw to it that there was money for other lifestyle type things so we were not always so stuffed on what we could do or when.

She even made sure our credit improved. From very early on in my adult life I seemed to do everything under the sun to make sure that my credit was craptastic. She actually improved our credit standing and in late 2005 we began taking on credit again. It was nice to be able to qualify for things that required good credit because had, for so long, been such a huge credit risk that we were either completely unable to do things based on credit or we paid a huge premium for doing things on credit. So I felt great about her handling the money and the success we were having.

In September of 2006 I changed jobs. I began to earn about 50% more than I was earning at my old job. We had lots more money and what appeared to be a growing lifestyle. And then things began to take a turn for the worse in our finances. We had amassed an enormous amount of debt. Things were not getting paid. We began to get calls from creditors. We began to not have money. This was about summer 2007.

Being faced with some troubling circumstances ahead I made a few decisions and didn’t make a few others that led to an increased lack in my household. The long and short of it is that I ended up costing my family my retirement to get us out of hock in June 2007. The biggest bills were paid, some smaller ones were paid off completely. We put some money (about $6,000) into savings and put a little more (about $2,500) into savings for our children ($500 each for five kids). It felt good, but in a bad way. While the bills were paid and we had some savings immediately I knew that withdrawing $60,000 worth of my retirement would have a negative effect on our lives.

Spring forth to December 2007. Even though we had paid off almost all of our debt just six months earlier we were maxed out again. I had about $200 cash to spend on Christmas for my entire family, my wife and my kids. My credit cards were shut off or at their limits. Times were tough. Bills were not getting paid again. Calls were coming in again. The kids began to understand that Privacy Manager, or 1-800 Services on the phone meant that neither mom nor dad wanted to take that call. In January of this year I was faced with another decision to make.

I chose to borrow against my paid off car so I could pay down our American Express bill. Again. We paid a few others too but the AmEx bill has always been the one that has gotten us into trouble. And mind you we had burned through the $6,000 grand in savings (I was saving that for the tax bill on the retirement withdrawal that I knew was coming) and the kids savings had been wiped out too. We had nothing at our disposal except my car. So I had to do something. I hocked my car.

Now in the midst of all this I had made a firm decision in my head to take back control of the finances of our home. And each time I was completely swayed by my wife’s tears and heartfelt sentiment that she could get things back under control if she just had a little more time. Plus she said that she didn’t want to be kept out of the finances again and that when I was doing the money before I would just push her down and not listen to her. So again, I caved. Each time we hit rock bottom I would try to get us back up to a point and still let the situation run. I was scared of my wife’s reaction and feelings.

Let’s come back to here and now shall we? We are just about to move into August. The last time we paid anything to American Express, I come to find out, was April. Our truck payment is behind. Most of my cards are behind a month or more. Some have even gone all the way to collection agencies. I am getting multiple calls daily from various collectors that want to be paid. And, even though I was just told a few weeks ago that our car payments were up to date and that we are good, I also find out this past Saturday that we are overdrawn in our back account by $800.

“What? How could we be negative?” she says. “I was watching that.”

This morning we are up to $1,000 negative in our account. If it gets any worse we will not be able to pay our rent. We are already not going to be able to buy groceries. Our utility bills are mounting because they are months behind and I have a truck payment that is about to get to 60 days late. How much longer should I wait to see if this thing gets better?

Granted things have gotten out of hand in terms of cost all over the place. The economy is crap right now thanks to fuel prices. The cost of gas is driving the cost of everything else up so things that we rely on daily are getting harder and harder to afford. But when it comes right down to it, how would that explain the condition of our expenses?

I blame myself. Sandi should never had been put into a position to handle this. It is my role as the leader of our household to take care of things like this. I have failed her, my family and myself. I have let this get out of control. That gets fixed now.

A man with no balls allows all sorts of mischief to take place right under his nose because he is too damned scared to make a change. Today, I take my balls back. This will be fixed.

Happy birthday to me

Editors note: This post is being posted from the future (August 8 to be exact) because I cannot manage to stay on top of things long enough to post my daily blogaries. I have all of the things that I intend to write about tucked away but for some reason I am not able to keep this thing pushed out every day. That said, forgive me. I will catch up.

Today was my birthday. I am 34 years old as of 5:XX this morning (I totally forgot what time I was born – it was a long time ago – sue me). Today was my day to celebrate me getting another year older, wiser, fatter, tireder and crankier. And I did that for the most part.

A few days my brother called me and asked if I wanted to hit up a baseball game with him. I thought that it would have been really nice to hit up a game with him since I have not done hardly anything with him for a long time. So I asked Sandi if there was anything planned for the day for me. She told me she thought the kids had something planned for the morning. I had already planned an afternoon out with Sandi and I so that pretty much eradicated any chance of me getting brother time with my broski.

It ended up being not all that much of a day of things though. I ended up taking care of my own birthday breakfast (actually lunch because of the time of it). It consisted of leftovers from the previous few days because the kitchen was hellishly nasty and there wasn’t really food in the house to cook anyway. After a very late start to the morning I ended up getting the kids somewhat ready to be babysat by their auntie while Sandi and I went out to lunch and the movies.

Since we had just eaten breakfastlunch a few minutes earlier we didn’t go to lunch opting instead to hit up an earlier timeslot for “The Dark knight”. This movie kicked all kinds of ass. The action was awesome, Heath Ledger kicked crazy butt, Christian Bale kicked all kinds of butt… it was just a cool movie. And while I thought it could have ended about six times before it actually did, I think it ended up well anyway.

After the movie Sandi and I hit up Elephant Bar for dessert. And we talked. A lot. About a lot of different things. But mostly we talked about our identities and how we saw ourselves. I talked a little bit about my recent discovery of what a coward I have been and my quest for manhood that I should have started 20 years ago but am just getting around to now. We talked a little bit about her frustrations in life, in finance and in marriage and parenting. Overall it was kind of a downer conversation to have on a birthday celebration. But it was needed so it was all good.

Then something happened I did not expect. We talked more this evening. A lot more. It went back to our marriage and how much Sandi feels like she has no identity as a woman, as a wife or even as a person. She feels stymied. She feels like she doesn’t know anything and that nothing she has experienced means anything to anyone. She is listless and alone and stuck. I have felt that way before too, and I shared that with her.

What started out to be an evening of fun and fellowship with my family, in the end, turned out to be a pretty regular day. It had a late morning, me handling breakfast/lunch, me setting up the sitter, me deciding the movie, me deciding where to do dessert and me being spoken to on the couch. I can’t really complain about that. There are a lot of men that would have spent their birthdays without their kids, or single, or worse yet, working or in prison or something. So it wasn’t as bad as it might sound. It was just… regular.

At the end of the evening it was just another day. I got to go out on a date. That was nice. I got some dessert. That was nice. I got to spend time with my wife and kids. That was nice. And even though I am perfectly satisfied with how my day turned out I had wished it would have involved a little more of what it did have than it did. But who am I to ask for something on my birthday?

Picking up where we left off last night

I should have known it would start this way, with the noise and the “I’m hungry” and the “Did not!” and the “Did too!”. Seems as though almost all day-afters are the same. The thing that made this morning a little different I think was the sheer volume of what had to be done today to make today work.

First, and probably the most difficult, thing of the day was actually waking up. After last night just the thought of getting out of bed this morning was daunting. Then the thought of a living room that was beat to hell seemed to add to the stack. Throw in the fact that we needed to leave early this morning for the festivities of the day AND that I had to feed this army of a sleepover and it is easy to see that I was not looking forward to being awake at any point today (except for the fun stuff that is).

After coming to grips with what the day had in store for us I decided it was time to handle the feeding of the flock. And what better way to do that than with some eggs. But how many should I cook for eight girls, my son, my wife and I? This is what I calculated:

2 dozen eggs

2 dozen eggs ought to do it

Yep, you counted right. 24 eggs. Two dozen of them. That is a lot of eggs (don’t be fooled though, we go through 14 just in my family alone). Alas, I even needed to haul out the big bowl to harness all of them things.

2 dozen eggs in a bowl... the big bowl

2 dozen eggs in a bowl... the big bowl

So I scrambled up those eggs after beating them something fierce and was able to serve up the eggs and toast in just enough time to get us out of the house almost an hour late. Fortunately for us the hour late was made better by the fact that the people that were going to be there when we eventually end up there were also late making the beginning to our festivities better.

Where is there? There is here, the Malibu Grand Prix and Castle. Bekah wanted to drive go carts for her birthday so we hit up the go carts, bumper boats and mini golf for the day. The reason we wanted to be there early was because a group of 25 was scheduled for a party immediately after ours. Like I said though, they were late too so we actually had the track almost entirely to ourselves for the duration of the driving. I was blessed to be able to take my daughter Adriannah on two laps and a friend of my daughter Rebekah’s on two laps (which means I got four laps baby, yeah!).

After the driving was the bumper boating which was a blast. Sandi took Alaynah on the bumper boats and had great big water battles with all of the other kids. She was soaked, they were soaked, it was a big old soakfest. Which was good because the sun was starting to peak and it was getting hot. Not to mention that fact that were about to embark on hitting the greens with eleven of us, count it, eleven of us playing.

Golf did not go as well as the rest of the day did. It was nice that we made it through about five holes, after which kids started dropping off like flies. By the sixteenth we had five playing and Alaynah wasn’t even hitting her ball anymore, she was walking it up to the hole and dropping it in. It was hot, there was no shade and we had killed all of our water by the fourth hole. Crap.

The nice thing though was that we hit the arcade soon after that. The arcade is air conditioned and for the most part devoid of life as we know it. We were the only people on the place for a while until a few other people decided to crash the joint. By then though we were out of tokens and just basically playing on the various sit down games. Not playing the games, playing on them.

We managed to leave the place after only about four hours which was truly just about all I could stand of it. It was hot, I was tired and the kids were cranky from not sleeping enough last night. At the end of the day (the play day that is) we all needed a little R&R. Which is what we are having. Right now.

Bring the noise – bring it big, bring it well

Tonight marks the night my daughter Rebekah will be celebrating her 11th birthday. It is a little late, but scheduling circumstances outside of my control necessitated this weekend be the weekend we do this.

What that means to be is that tonight I will be flooded with young girls eating, playing, screaming, eating, screaming and screaming. I already know that it is going to be loud. And that I am going to get eaten out of house and home. And that I am going to get very little sleep. I am prepared for that. I think what I am not prepared for, and what I truly do not know how to prepare for, is the physical impact this will have on me and my wife.

Of course, knowing me, I am going to throw myself headlong into the festivities. I always do. And I will probably end up setting up games or something fun for the kids and see to it that they stay up too late. That just seems to me to be something that I am drawn to. So I am rather looking forward to having some fun tonight.

I guess I am just not looking forward to the noise, the food bill, the noise and the noise. But with a house full of girls, should I really expect anything less?

Fun with PHP

Every now and again someone writes a line or two of code that really makes me smile. Such is the case with this outcome determinating and decision making class below. This code is being reproduced, with or without consent, from the PHP Developers Network‘s own scottayy.

<?php
/**
 * Coin flipper class helps determine outcome of situations in which an outcome
 * cannot be decided by sheer manpower alone.
 * 
 * @author Scott Martin <scottayy@devnetwork.net>
 * @license None, don't even try to use this or your hair will turn yellow
 */
class coin {
	/**
	 * The outcome determinators
	 * 
	 * Each invocation of this object will require a determinator upon which the
	 * object relies to build a determined outcome. These are those determinators.
	 * 
	 * @access private
	 * @var array
	 */
	private static $_sides = array('heads', 'tails');
 
	/**
	 * The determinating method
	 * 
	 * This method, when called, invokes a determination sequence and returns a
	 * determined value for use in decision making.
	 * 
	 * @access public
	 * @return string Randomly selected determinator
	 */
	public static function flip() {
		// Quick, randomize me some determinators
		shuffle(self::$_sides);
 
		// Quick, offer it back before it gets angry
		return self::$_sides[mt_rand(0, 1)];
	}
}
 
/**
 * We should always test our determinating decision establisher
 *
 * 2,4,6,8 You know you want to determinate
 */
echo coin::flip();
?>

For those that just have to have an object to instantiate (and you know who you are), there is this lightly modified version for your obsessive/compulsive selves:

<?php
/**
 * Coin flipper class helps determine outcome of situations in which an outcome
 * cannot be decided by shear manpower alone.
 * 
 * @author Scott Martin <scottayy@devnetwork.net>
 * @license None, don't even try to use this or your hair will turn yellow
 */
class coin {
	/**
	 * The outcome determinators
	 * 
	 * Each invocation of this object will require a determinator upon which the
	 * object relies to build a determined outcome. These are those determinators.
	 * 
	 * @access private
	 * @var array
	 */
	private $_sides = array('heads', 'tails');
 
	/**
	 * The determinating method
	 * 
	 * This method, when called, invokes a determination sequence and returns a
	 * determined value for use in decision making.
	 * 
	 * @access public
	 * @return string Randomly selected determinator
	 */
	public function flip() {
		// Quick, randomize me some determinators
		shuffle($this->_sides);
 
		// Quick, offer it back before it gets angry
		return $this->_sides[mt_rand(0, 1)];
	}
}
 
/**
 * We should always test our determinating decision establisher
 */
$coin = new coin;
 
/**
 * 2,4,6,8 You know you want to determinate
 */
echo $coin->flip();
?>

See, just looking at that code makes you want to smile doesn’t it? Geeks are great.

Big beefy BBQ ribs – Nom nom

Just about every my company sponsors a huge Beef VS. Pork rib cook off between two of the longer standing employees of my company. It is a beautiful rivalry that sparks the most creative of imaginations into delving into areas that most folks should not go. It gets bold, it get bloody. It gets personal. And it gets delicious.

This year the fella in my department that cooks the beef ribs ordered up 120 pounds of beef ribs. I am not sure how much the lady from the other side ordered. All I know is that when it came time to eat we ate. All of us from our corporate office plus some from the branch office next door. I even heard that there would be enough to feed those employees that are night shift. Wow. That must be a lot of food.

To put it into perspective, this image shows beef ribs that were eaten at our lunch time celebration. This was one of three full grill sets of beef ribs cooked for us.

Big beef ribs a la Royce.

There were three other backyard type grills that were in effect for the pork team as well. And both sides of the house were cooking when I got to work at 8:30. It was insane. And delicious. And very fun.

So thos that spent the best part of their day on their feet preparing, cooking, cleaning, serving and generally taking care of the rest of the spoiled lot of us, thank you. Your efforts did not go unnoticed.

When criticism moves from critique to critical

Every relationship is going to have its share of moments that do not make you smile. I know that most folks, when they are in a loving, intimate, close relationship, tend to look at the relationship as a grounds for all things good, happy and joyous. But I tend to think that too many people forget that people are people and they, or their personality perhaps, will invariably clash in some way with your personality. After all, we are only human, and that ultimately will lead to all sorts of issues when interacting on any level with others of our kind.

What brings this up is something I have taken note of recently. I have, over the course of my marriage, surrendered most of my masculinity and leadership to my wife. A lot of men do this, usually unknowingly and usually to the detriment of their manhood, marriage and self esteem. I saw recently, however, that I have allowed myself to be so driven by the feelings of others (including my wife, but not singularly by her) that I have shelved any issues I may take with criticism. I am not talking criticism of the type that can build you up and make you a better person. I am talking about the kind of criticism that can severely damage your own opinion of yourself and allow others to begin to believe the critical words being spoken over you.

I have allowed myself to be criticized without consequence for a long time now. It stood out in my head recently that almost everything I do at home gets met with some form of criticism. Whether it is my kids telling me I didn’t use proper sentence structure or my wife checking to make sure what I just taught the kids is right, there is very little encouragement or positive reinforcement offered in my home. I believe this has something to do with me not ever being a leader in my home and I am certain it needs to stop.

The reason I say it needs to stop is that no person should ever live under the moniker that they are inadequate in everything they do of a certain action. Constantly being criticized without cause (I know this is debatable, but give me some latitude here) makes people cower from their rightful, authoritative position and become little wimps. Yes men, you can easily become a wuss if you continue to allow yourself to be degraded. Women too. There is no place for constant baseless criticism.

If you are in a place where you are being constantly criticized, belittled, verbally attacked or anything that continues to daily wear at your self esteem I would ask that you take a step back and take stock of the value you have. Find one person that you know you mean the world to and talk to the person. Or begin writing (that helps me out a ton) or exercising or cooking or something that you know you have total control over and the very serious possibility of success in. Nobody’s words, no matter how critical or inspirational, have to be taken under your ownership. You are more than that. You have a value that far exceeds the negative value anyone can place on you.

To this end I want to say that it is pretty difficult to stand up for yourself when you are not used to doing it. And it might be awkward for those that would condemn you seeing as you have allowed it take place for a while. It may even appear to be confrontational. The truth is so what if it does. It if requires a fight, fight hard and fight to win. It is your right to not be burdened with someone’s overzealous attempts at degrading you. I am learning this right now.

No more will I allow myself to be devalued. No more will I stand idly by while be derided. No more will I let someone else tell me my value. I am more than that. And so are you.