Archive for July, 2012

PHP and stuff

Lately I have been working so hard that I haven’t even had any desire to do any fun computering at home. Today that changed a bit.

I decided this morning that it was high time I upgraded my all time favorite rss feed reader, tiny tiny rss. Well, wouldn’t you know it, after I did the install I found it required a version of php higher than I had available on my server. Time to upgrade.

I run Centos 5 on my main server and, by default, that carries a php 5.1.x. I needed 5.2 or greater. As it happens, php 5.3 is available in the repos, so I did the upgrade. For the uninitiated, that entails doing a “yum list installed | grep php”, which gives you a list of what you *have* installed. Next you remove php by doing “yum remove <and name all the packages in the prior list here>”. This, followed by “yum install <list of files for php 5.3>”. For example, I had php-common.i386 and php.i386 installed, so I did a “yum remove php-common php” and then “yum install php53-common php53″ to get all my php 5.3 packages on there. This was followed by a quick “service httpd restart” to make sure my webserver was using the new version.

Murphy’s law states that “something will go wrong if it can”. Well, *MY* law states that “something will go wrong”, and it did. As it turns out, I had built a whole bunch of php applications maybe 7 years ago that my wife uses almost daily. In the olden days of php, you could declare a php script at the top by doing a “<?”. NOW, you need to declare it by doing “<?php”. Consequently, nothing I had written worked. It only took me a minute or two to identify why the problem was occurring, but fixing it was another story.

So, how do you find all the files you have to fix? Well, I used the “grep” command. More specifically, egrep. I went to my html root directory and searched by doing “egrep -r “<\?” * | egrep -vi “<\?php” | egrep -vi “<\?xml” | grep -v inary”. What does all that do? The first stanza looks recursively through the directory structure at every file and outputs the ones that have any “<?”‘s in them. The second takes that output but does NOT pass through any that are “<?php”. Why, because they would already be ok! The third takes the results and doesn’t pass through any that contain “<?xml”. The last one doesn’t pass through results from binary files. The end result is I had a list of directory / file / line information of all the files I had to change / update. A few minutes later, after using vim, the best text editor around, I was back up and running!

Saturday, July 14th, 2012

Asus Transformer TF300T

Asus Transformer TF300T

Asus Transformer TF300T


You have heard me before explain why I love my iPad. At first I bought a Xoom tablet, which I thought was crap. When I picked up my iPad that was awesome. It did everything I needed and then some. As it happens, though, I have been thinking more and more about getting into Android again, until a few days ago when I finally pulled the trigger.

Until quite recently, Android was simply not ready or suitable for tablet use. You can argue with me about that all day long if you like, but you would still be wrong. :) Recently, however, Ice Cream Sandwich was released (Android 4.0) and that, combined with the current state of technology, makes all the difference.

Anyhow, I decided that giving Android another try, especially in light of Apple’s recent bout of litigiousness, was in order. I decided on the ASUS tablet (32 GB), because it has really nice hardware, looks and feels good, and just seemed to have the most bang for the buck. I also bought the keyboard dock because having a keyboard for your tablet is wildly useful, not to mention it adds USB, SDCard and lots of extra battery life!

The only application I added that I had to pay for was Better Terminal Emulator Pro. This is, simply, the best ssh client available for Android, period. It also has the unique ability to actually be able to use *all* the keyboard keys available on the Transformer’s keyboard dock. Absolutely indispensable, and it was only $4.

Things I don’t like:
The iPad has a better mail application. Apparently, I am in the minority when I want to read my oldest email first and then progress to the newest. I find it really perverse to do it the other way around, and it annoys me to no end that I can only get 30 or so emails at a time without weird jumpy scrolling effects. The iPad didn’t have this problem. I will say, though, that I haven’t had a lot of time to try alternative email clients. I also liked the iPad’s version of the Tivo client better. The version for android is made only for mobile phones and doesn’t take advantage of a Tablet’s screen size, etc. I bet they will have this fixed at some point though, and it does the job for now. Lastly is the form factor. The iPad has a 4×3 form factor, which I find quite aesthetically pleasing, while the Android has a 16×9, which takes some more getting used to. I realize that multimedia is really geared more toward the 16×9 sizes these days, but documents are not and I grew up reading magazines and books and writing on papers, all in the 4×3 format, and it still feels a bit odd with the elongated tablet size. The absolute worst thing with this tablet is the proprietary charger connector. This pisses me off and is absolutely unnecessary and makes it difficult to obtain 3rd party charger / cable replacements. That is not to say they are unavailable, but I could not find a spare in a big box store and had to order through Amazon.

Things I do like:
This little gizmo is quite fast! Video playback is responsive and brilliant. ICS has a good feel to it as an OS and is much more useful than previous releases, not to mention, this machine is rock solid stable, which is something my Xoom really lacked. I have never had an app crash on me using this tablet yet, something I used to think I would have to own an iPad to enjoy. Even with the keyboard dock connected, it is pleasant to hold and use, aside from the strange feel of a 16×9 form factor. It is not too light or heavy. It feels ridged / solid. It has a very nice feeling textured case, which does not appear particularly scratch prone (in opposition to the iPad) and has a pleasing (very)dark blue color (I understand this particular tablet to soon be available in white as well). The screen, itself, is clear and crisp and easy to read, even in direct sunlight. As a touch screen, it is remarkably sensitive.There are times I swear I just have to think about touching it and it responds. Although the touch screen does attract fingerprints, they are easy to wipe clean and the tablet actually came with a soft cloth just for that purpose. Lastly, this comes equipped with a GPS, which makes it a great big nifty navigation unit too!

With the addition of the keyboard dock (did I mention 14 hours battery life?), this tablet actually makes a suitable laptop / netbook replacement. I can honestly say that I can carry *only* this device with me and be assured that I can still accomplish any work I need to do, especially with the addition of the previously mentioned Terminal Emulator Pro software purchase. All in all, this is a great device which makes portable computing truly doable and lots of fun. Great purchase!

Sunday, July 8th, 2012