Jan 22, 2010

Why div-based designs are good

The first thing I did this morning at work was work on a wordpress blog’s theme. We’re in the process of rebranding an existing blog and giving it a new look. We’re working off of a theme that was build by WP Zoom. The end product of my modifications is what is shown above.

I peeked inside as apparently, I’m the only person that knows how to customize wordpress without using a plugin for everything. I was thankful that the design is div based. While table layouts are out of date, I still run into them from time to time. But let me be honest, I hate using tables for layout purposes. I don’t like the way they clutter things up with tr and td.

Div based designs are easier but even that can get messy. It’s important to know when you need a div or when you’re needlessly just putting divs around everything.

I was somewhat fed up when someone else had modified the stylesheet to another theme of mine and ended up screwing up the formatting. I don’t know how… or where she thought the first paragraph of every entry should be italicized…

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon

Jan 21, 2010

WordPress: the_date() vs. the_time()

Today while at work, someone asked me about WordPress and once I heard the inquiry, I had the “oops” moment.

Person: There’s a problem with the date. Some of the entries don’t display the date on the archive pages.
Stephanie: Oh huh, that’s weird. Is it on the other blogs?
Stephanie’s brain: Dammit, I forgot about how the_date() and the_time() works different.

But I fixed the issue. Basically, when using WordPress, if you want to display the date on ALL the entries, you should be using the_time() function. However, if you only want it on the first entry of that day (as oppose to having it on ALL the entries), you want to use the_date function.

Simple tip, easy to forget. :]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon

Jan 19, 2010

The Resurrected Man by Sean Williams

The Resurrected Man

I started reading The Resurrected Man by Sean Williams. I was skeptical but I also got it at a used book store. I sat down over the weekend and started reading. I was surprised when I found myself engrossed in the story and when I went from page 1 to 100 in half hour because a) not really my type of book and b) I was really skeptical about liking it.

However, it earns an A+ in my book so far. :)

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon

Jan 14, 2010

Outlander By Diana Gabaldon

Outlander

A few weeks ago, I finished reading The Outlanders. It started out slow but picked up pace once the story got going and she actually went back in time. However, after 500 pages of overdone romance and sex and all that, I was getting a bit tired of it. I guess it may be the fact that I’m not one for time-traveling romance. Let alone the justification of the main character for her infidelity. Marriage is marriage. It doesn’t matter if you’re in a different time zone or anything, the vows are “till death do us part” not “till time travel do us part.” Other than that, the book kept me interested enough till the end but I probably won’t be continuing with the series. It probably wouldn’t be as bad if the story didn’t justify her infidelity and if she felt a bit remorseful for cheating rather than saying “Well I may never get back there. I love Frank but Jamie is too hot for me to resist.”

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon

Jan 09, 2010

Druids Rule Recoded

PHP/MySQL tool to compute game stats for World of Warcraft

I used to be an avid World of Warcraft gamer. The keyword is used to be. Back in 2008, I built a PHP tool to calculate some gaming stats. Basically it involved a lot of math. In sheer determination to fix up a lot of my personal projects, I went ahead and gave it a minimal simple new layout and cleaner xhtml.

There’s a bit of php math going on in this project (which was how I learned most of the php math I know today):

// formulas
$base_regen = 0.005575;
$mp5 = 5 * (0.001 + sqrt($int) * $spirit * $base_regen);
$mp5_from_gear = $head + $neck + $shoulder + $back + $chest + $bracers + $gloves + $waist + $pants + $boots + $ring1 + $ring2 + $trink1 + $trink2+ $weapon + $offhand + $idol;
$spirit_without_ls = $spirit - (floor($spirit * 0.15));
$mp5_without_ls = (0.001 + sqrt($int) * $spirit_without_ls * $base_regen);

One of these days, I’m going to find a better way to do all those calculations. Haha.

Check out the current version here.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon