Jul 03
Natron tagged me in his 8 facts post. Thank you very much Natron for tagging me! On a side note, I really enjoyed the Dragdown tracks. I hope Dragdown’s July 7th show rocks! Get in contact with Natron for more info about his band…
So lets dive into my little world and find out some more about me…
This is how it works:
- Each player must post these rules first.
- Each player starts with eight random facts/habits about themselves.
- People who are tagged need to write their own blog about their eight things and post these rules.
- At the end of your blog, you need to choose eight people to get tagged and list their names.
- Don’t forget to leave them a comment telling them they’re tagged, and to read your blog.
8 items in time that made me who I am…
- My Whole Life = My Wife & My Kids [I love them so much]
- My father has 2 sons named Robert. My older Half-Brother is the first and I am the second.
- I was 17 when my first child was born, however, I was 19 when I found out.
- I have broken my left ankle 3 times, the first time was during a game of H.O.R.S.E.
- Colorado is the only state I ever want to live in, in the US. Only other option in my mind would be to become Canadian…eah?
- I once bowled 15 strikes in a row (in real life, not wii), however, it was between 2 separate games so I am yet to bowl a perfect 300 [13 strikes in a game].
- I am an “only child”, however I do have many half siblings, before and after.
- The greatest hero of my life was my grandfather “Papa”. His passing was one of the hardest experiences of my life. I always think of trying to be somebody he would be proud of.
Others Sites I am tagging:
Now you may have already been tagged, however I do not recall reading one of these on your site before so please excuse this if it is a retag…
Share This
Jul 02
Ms Danielle was the winner of the John Chow Zune contest. She is now “White Elephant”‘n the thing and offering her own Zune contest.
Ms Danielle’s blog is one of the feeds that I keep in my Blog Reader because she writes great posts all the time. It is definitely a very interesting blog site.
As I have previously stated, the content on her site is just absolutely great. Contest or no contest, if you have not been there before, go check it out. Another blogging site that has this great blogging community wrapped around it.
Share This
Jul 01
David Culpepper from PureBlogging has been very good to me. He welcomed me in as a co-author and I was able to make his first guest author post. I’m definitely due for another entry so hopefully I can post another one soon. I was the winner of one of his previous contests so I received my new Apple 8GB Ipod Nano that I have always really wanted. Through some talks with David here and there through the contest win and just comments back and forth, you can tell that he really is a good guy.
So I wanted to help spread the word on a couple contests he has going. It truly is 1 contest split up into 2 parts.
Part 1 (1000th Comment):
Whoever posts the 1000th comment (excluding me, our guest bloggers, and trackbacks) will win $100 CASH via PayPal. During this time, comments will be strictly moderated and short irrelevant comments will be deleted. That means no comments like “Hey, nice site.” or “Yeah, me too.”, or “You’re so cool!”, etc. Only comments that contribute to the discussion will be counted.
Part 2 (Spread the Word):
Anyone who writes a blog post about this contest will be entered into a random drawing for $100 CASH via PayPal.
So go check out his site for for more info about the contest and remember his site is always packed full of great blogging tips.
Personally, since I won on the last contest, I’m going to sit this one out even though I am making this post. It would not be fair to win 2 in a row and I wouldn’t want David to take any flack from it if I did. However, David is an honorable blogger so I still wanted to help spread the word…
Share This
Jun 28
So we all know that Wordpress had a recent update that was also required to fix some security issues. One of the issues that caught my eye was the fact that the default theme had a security vulnerability. After reading that I decided that although I did update Wordpress and the problem default theme files, I wanted to get off a theme that potentially could have other security issues if they are just now catching this one. My theme was not strictly the “default” theme, I had done a few appearance changes here and there that made it my own, however, all that back-end code was still the default theme.
So, me still never having any time to design my own theme, I decided to work with a theme of a designer that I have a lot of respect for. I decided to work with the GlossyBlue theme designed by Nick La, located on his N.Design Studio website. It gave me a great “template” to start off of to make it my own. He has such a great set of icons (small gifs) within his themes that just make your page look great.
Making it My Own:
So as you can see by that example picture above, the left side is what this theme looks like by default and after all the image and css changes, what I have made it look like. All and all it was about 45 minutes worth of work to “Reformat” it to my liking. For such a drastic color change there were quite a lot of image adjustments and edits that I had to perform as well as quite a bit of standard css edits. Really not a big deal though. Even though it was already a great design to start from, I do like it much better now! One of the things I just had to do right away was clean up that HUGE HEADER!
So after all the image and css edits, I plugged in all the plugin coding where needed for all the plugins I use. Bob’s Simplistic Navigation suited this theme quite well since there were no single navigation page links coded into it. So always remember, if there is a theme that you come across that you really like but aspects of it do not fit you, well if you know some basic coding you can really dig in and “make it yours” like I have done here.
If you have not already been to Nick’s N.Design Studio website, you are really missing out. This guy is an amazing graphic artist and to top it all off, takes the time to show you some things you can do. Check out his tutorials that he offers and browse other parts of his site. With his more recent iTheme Wordpress Theme becoming so popular (you can see it on Saman’s site), he had troubles keeping his site up after all the Diggs.
So you tell me, what do you think about the new ReformatThis look…thumbs up?…thumbs down?…comments?…compliments?…original better?…free money? I will take either or all…
Share This
Jun 22
It’s PHP Friday!
The PHP Friday Series
It makes for much cleaner code if you use the switch statement rather than if() followed by multiple elseif() statements. I have read many performance tests articles and switch() does process faster over if() + elseif()’s. But how does it look? How do you code it? Well below are some examples.
First, lets set a variable just to have it as an example:
Now in most apps, you have most likely seen something similar to the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| if ($example_var == 1) {
// action 1 code here
}
else if ($example_var == 2) {
// action 2 code here
}
else if ($example_var >= 3 && $example_var < = 6) {
// action for 3 thru 6 code here
}
else if ($example_var == 7) {
// action 7 code here
}
else {
// for any other value do this
} |
Those very same options can be coded into a more efficient switch() statement as follows:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| switch($example_var) {
case 1:
// action 1 code here
break;
case 2:
// action 2 code here
break;
case 3:
case 4:
case 5:
case 6:
// action for 3 thru 6 code here
break;
case 7:
// action 7 code here
break;
default:
// for any other value do this
break;
} |
or as another switch() statement alternative that gives you an interesting perspective or way of looking at it:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| switch(true) {
case ($example_var == 1):
// action 1 code here
break;
case ($example_var == 2):
// action 2 code here
break;
case ($example_var >= 3 && $example_var < = 6):
// action for 3 thru 6 code here
break;
case ($example_var == 7):
// action 7 code here
break;
default:
// for any other value do this
break;
} |
As you can see by that last example, making the value in the switch() function to true or false and then loading switch cases that involve statements that are either true or not work just the same.
Summary:
So the variable enclosed in the switch() statement is what you are comparing its value to all the possible cases in the switch() statement that you have assigned. You assign each case a value or operation to see if its result matches the value of that variable. Everything located under that very case will be performed until it reaches the break statement letting it know to stop. Multiple cases can be brought together to all include the coding below it. It will keep performing all code below a matched case so long as a break statement is not met. default is the equivalent basically of just else. Its basically the “catch-all” and will always perform in the event that no other case above matched and had a break placed below it.
Definitely check it out over there on the wonderful packed full of information -> php manual:
PHP Manual: switch()
In the end, switch() may seem to be a little more difficult to code if you are not used to it, but if you look, it is a much easier code to read and know exactly what is going on. If the speed/benchmark tests that I have read about are true, than of course you want to use switch() as your primary function for this sort of coding anyway.
Share This