Design Patterns

I love this stuff


I can't wait for his book, PHP Design Patterns to come out. I will be getting that one for sure! Checkout the download with the presentation on design patterns. Good stuff!


There's SPACE in my CASE

My old way of formatting swtich/case:

switch ($somevar) {
case "abc" : someFunc(); break;
case "t" : otherFunc(); break;
case "z" : yetAnotherFunc();

After some thoughts like:
  • Hey, now every time I change the length of some "var" I have to reindent all the stuff. bah.
  • I have to move my cursor alot to add anymore code to the thing
  • My space bar is going to wear out before the rest of the keyboard if I keep this up.
  • Hmm, wonder what the PEAR group does
My new way of indenting switch blocks

switch ($_POST["task"]) {
case "lookup" :
$data = lookup($_POST["lookupValue1"]), $_POST["lookupValue2"]);
case "addCake" :

Like pear group, but the contents are indented.


Streaming Media

I'm doing it at work and we have some weird problems. I think that is probably how we export and compress the presentation from PointPoint. It has audio wave files attached to each slide. PowerPoint on the Mac (I don't use it, my boss does) will export to a mov file, and he used Quicktime to compress it.

The slides skip and jump, sometimes the movie stops and does nothing. The audio is off kilter with each slide and sometimes skips the first slide. Sometimes it seems to work flawlessly! Its 100 meg, so using HTTP streaming won't be a good idea in this case.

I used a php script to make a movie reference file.