Archive for May, 2008

Object Tag

For as long as I have been creating websites, it is amazing what I don’t know. I decided to upgrade my Google search button on my main website at InDepthInfo. The only problem was that it was causing problems with the W3C compliance. I hate having new pages that don’t comply mainly because validating is an easy way to check to make sure the coding is correct.

 Anyway, I kept getting an error. I finally solved the problem by surrounding the form with an object tag. Normally when I run into these kind of problems it is a several hour job to find a solution. This one was so easy, I can only conclude that I should have known about this before. I guess I will have to study up a bit more on this tag when I get the chance.

No Comments

Alliterative Insulter

I have been brushing up on my php . I have been putting an hour or two per day into it. Only yesterday I splurged 4 hours on it. I decided that I needed a real project to work on to keep my interest up. While “Stumbling” around the web I ran across this webpage on Shakespearean insults. It seemed like a fun thing. But I did not want to make an exact copy of it, so I decided on an Alliterative Insulter.
The parameters of the program would be to get the name of the person to be insulted, determine the first letter of his or her name, and then string together an insult that had the same beginning sounds as the person’s name. Naturally, I was more concerned with function over form, so the insults I came up with were, as my good friend Andrew pointed out, rather lame. Yet, I produced it:

The Aliterative Insulter

It is important to remember that forms are the primary raison d’etra for Php programming. It is an easy way of handling data. I wanted the code to look at both the capital and the lower case letter at the beginning of each word. After I had extracted the first letter of the variable using the “$firstletter = substr($name, 0, 1)” function, I tried out an if statement to see if the first letter might be “A”: if ($firstletter == “A”), which worked great. But to have it check for the lower case I just added a couple of “pipes” which was supposed to mean “or”. It looked like this: if ($firstletter == “A” ||  “a”). It turns out that this does not work. I had to reiterate the perameter of the function like this: if ($firstletter == “A” || $firstletter == “a”);.
If you get a chance try out the alliterative insulter and if you can think of any good – relatively clean – insults I can add, be sure to let me know.

No Comments

Getting the Most Out of a Lottery Ticket

I bought a lottery ticket as one of my wife’s Mother’s Day presents last week. It was a powerball thing that was set to be drawn on Tuesday. The ticket cost one dollar.

I was determined to get my money’s worth out of this lottery ticket. I figure the value of a lottery ticket is not in the possibility of winning a fortune, but rather in the dreams you come up with in thinking about what you would do if you did win the lottery.

It doesn’t really matter how remote the possibility, millions to one I am certain, you still spend time talking and thinking about what you would do if you were to win. This is especially true for those of us who only buy a lottery ticket two or three times per year. This last time I had trouble buying the ticket because there are several, and I couldn’t seem to get the wording right to get the one I wanted. I ended up with the Power Ball, and I really wanted the Michigan Lottery, but it really did not matter which I purchased because the end result would be the same.

Now, possessing this ticket, I actually showed it to my wife a day early. I figured that way I was getting an extra day and a night of daydreams out of it for her, potentially increasing the true value of the lottery ticket by 33% over what I considered its base value. I then put it in my desk drawer. The next day we talked about it, and kidded about who would get the money. I bought the ticket, and it was locked in my desk drawer, but I had said that it was her present. (I had to disillusion her, by reminding her that possession is 9/10ths of the law.)

As the drawing time on Tuesday approached, we continued to joke with each other about the ticket. I had already decided how I would lay out several of the 163 millions. Gifts to family members, civic projects, investments in stocks and bonds, a castle in Ireland. The time for the drawing swiftly came upon us. Did I look forward to the drawing with eagerness and hope? No, certainly not. I decided at this point that the lottery ticket was likely to lose all its value as soon as I looked at the results on Tuesday. I was not looking forward to losing all my castles in the air (including the one in Ireland).

So, I figured by not looking at the results of the drawing, I could extend the value of the ticket by several days. I had already gotten an extra 33% by showing it to my wife a day early.  But how much longer could I wait? Obviously there is a diminishing return on a lottery ticket that you never get the results on. You must have a belief that someday you will see the results and collect your money in order for the dream to have any real effect. So, I had to set a date on which I would look. I abitrarilly picked Thursday. This I figured would give me an additional 66% of value out of the lottery ticket. All told then, I would have effectively doubled the value of the ticket over the time of its life.

This is how to maximize the value of a lottery ticket. Where else can you get double your money’s worth in six days? Wish me luck, I could still be a winner!

1 Comment

Impulse Buy

I occasionally look about for deals on websites. I seldom find anything I think will add quality to my small stable. Yet once in a while I find a gem. But then there are times I make an impulse buy.

Now impulse buying is not all bad. I sometimes end up getting some fun stuff. This time I bought the domain – you can’t really call it a website, it only had one page – a photo of a man biting his nails. When I saw it, I just had to have it. It was one of those domains that grips your imagination as you sit there thinking about all the things you could do with it. The truth is, you could do the same thing with any website. It’s just the name that has sent your mind on a wonderous tangent that leads to…fame and fortune? At least a lot of work, time, and effort.

I will keep you in suspense no longer, I bought ImNervous.com. Yes, silly is it not? What should I do with it? Actually, I’ve had it for a week and still haven’t done much. What I have decided is to make it my new wave of the future. Last time it was videos – now it’s interaction.

This will be my experimental platform. I know, I know, I waited long enough. I have been writing on the web for years, and I mainly concentrate on content.

My last impulse buy was this domain – which I cannot call a failure. But one buy I did regret was campingtripguide.com. Not that it is a bad site. It is just about a subject for which I care very little, camping. I rewrote it once, and my lack of interest shows. At least it taught me a lesson, stick to subjects I give a hoot about.

,

No Comments