Mr. Belvedere

Posted by Matt on October 29, 2007

Mr.Belvedere’s JamThis is the greatest thing ever.

Apple digs Microsoft in Leopard Booklet

Posted by Matt on October 27, 2007

Anyone notice that Leopard’s instruction booklet image of BootCamp shows Windows XP, not Vista? Nice subtle dig Apple!

Woohoo!

Posted by Matt on October 26, 2007

Leopard

Hello from Leopard!

Posted by Matt on October 26, 2007

I love FedEx. I’m three hours ahead of the game! Leopard is already installed and all is very smooth. First impressions?

1. I dig the new dock; of course I hide mine anyway

2. Coverflow on the documents is kind of neat, but not as cool as they make it out to be. If you’re browsing a billion images it is pretty great

3. I like Finder’s new sidebar layout, and really like that all of my servers are just a click away (no more Command + K!)

4. I really want to use Time Machine, but it really sucks that you cannot backup to a SMB share on the network. A let down in my opinion

5. The translucent menubar is a really weird ‘feature’, and one that I’m already attempting to turn off. The transparancy just doesn’t fit.

6. The new iCal layout is slightly nicer; the sidebar update is slick

7. Mail finally grouped my multiple IMAP account folders into separate menus!

8. I’m not sure how much usage I’ll get out of the notes feature in Mail.

9. The Stacks feature on the Dock is kind of odd. The idea only works well for folders that have a ton of files.

10. Is it just me, or am I weird for prefering a web-based RSS reader (Google Reader)? I’ll import my OPML feed into Mail for testing though.

The packaging is simple, elegant, and gorgeous of course! On a side note, when I answered the door for the delivery, the FedEx guy looked at me and smiled at the package, winked, and said ‘Have fun this weekend!’. We are everywhere.

My Wife

Posted by Matt on October 19, 2007

My wife just informed me that she wants a pig for her birthday. Nothing like a weeks notice.

Sorting a Multidimensional Array The Easy Way.

Posted by Matt on October 16, 2007

Here is a quick and easy function written in PHP that will allow you to sort a multidimensional array.

 
function orderBy(&$data, $field, $direction){
//Provide the anonymous recursive functionality
  $code = “return strnatcmp(\$a[’$field’], \$b[’$field’]);”;
	<p>//Figure out which way to sort the comparision function parameters<br />
$whichWay = (strtoupper($direction) == &#8220;ASC&#8221;) ? &#8217;$a,$b&#8217; : &#8217;$b,$a&#8217;;</p>
	<p>//Recursively call the anonymous function
  usort($data, create_function($whichWay, $code));<br />
}<br />
 

This function assumes that your array looks something like the following:

 
$arr = array();
	<p>$arr<sup><a href="#fn714297106486d59c9e1a3e">0</a></sup> = array(<br />
&#8220;First Element&#8221;  => 1,<br />
&#8220;Second Element&#8221; => 2,<br />
&#8220;Third Element&#8221;  => 3<br />
);</p>
	<p>$arr<sup><a href="#fn814303482486d59c9e6862">1</a></sup> = array(<br />
&#8220;First Element&#8221;  => 4,<br />
&#8220;Second Element&#8221; => 5,<br />
&#8220;Third Element&#8221;  => 6<br />
);</p>
	<p>$arr<sup><a href="#fn578066135486d59c9e8f6d">2</a></sup> = array(<br />
&#8220;First Element&#8221;  => 7,<br />
&#8220;Second Element&#8221; => 8,<br />
&#8220;Third Element&#8221;  => 9<br />
);<br />
 

With this we can easily sort by the array key name:

 
orderBy($arr, &#8216;Second Element&#8217;, &#8216;DESC&#8217;);
 

Output:

<br />
Array<br />
(
    [0] => Array
        (
            [First Element] => 7
            [Second Element] => 8
            [Third Element] => 9
        )</p>
    [1] => Array
        (
            [First Element] => 4
            [Second Element] => 5
            [Third Element] => 6
        )
    [2] => Array
        (
            [First Element] => 1
            [Second Element] => 2
            [Third Element] => 3
        )
	<p>)<br />
 

As you can see, the $arr array has been sorted by the ‘Second Element’ key in descending order. Quick and easy.

Boredom.

Posted by Matt on October 15, 2007

Man, I can barely make it through classes anymore; I don’t know how it did it before I had a laptop. Shit is sincerely boring. I guess that’s what I get for teaching myself this shit years ago. Jumping through hoops for The Paper. Five weeks left and slowly counting.

Fuck Typo.

Posted by Matt on October 15, 2007

I flirted with Ruby on Rails for a bit. I’ve learned my lesson. Back to good ‘ole PHP :)

Finally.

Posted by Matt on October 14, 2007

I broke down and bought an XBox 360 yesterday. Since I've turned into a Mac guy, the gaming thing is really no longer viable on my computer, so I grabbed a console. This is the first console I've owned since the original Playstation. Before that? Super Nintendo. I guess I'm not much of a gamer, though I do need a distraction from work sometimes. 

I went to Target and bought Guitar Hero II. The second after the cashier rings the transaction, he mentioned to me that Guitar Hero III was coming out in two weeks. So a quck run to Customer Service later and I'm now waiting for GHIII :)
My wife was cautious of the console at first. She's definitely an 8 bit girl, but a few tries at Tiger Woods Golf '07 and now I can't get the controller out of her hand. She's yelling at the TV right now. "I should get extra points for beating him so soundly". Ah, her next shot is in the drink. Perhaps I should buy her her own controller ;)

Same as it always was

Posted by Matt on October 03, 2007

Once again, I setup a new blog and post at least once a day until I get bored with the new blog. Then I dont post for an increasing number of days, then weeks…

I'm now nearly half way through my final term of my Master's program. It's really boring. One thing I've really learned during my tenure at Franklin University is that I'm just not an academic person. Jumping through artificial hoops to create a project that ignores 90% of real world issues is not satisfying to me. I tend to work way ahead of my classmates so I'm just sitting around most of the time. One other thing I've learned about myself is that no matter what I'm doing, I'm always thinking about something else. I could be coding indoors, and wish that I was outside running around. I get outside, realize that this too, sucks, then I head back indoors. Even when I'm at concerts, I feel like the CS dork, but when I'm in a classroom, I feel like the metalhead.

Anyway, my academic career will most likely be over in seven weeks. At this point I doubt I'll go for my Doctorate. Of course, I'm pretty disillusioned with the whole academic world at the moment, so who knows ;)