Made of Everything You're Not

Personal blog of PHP programmer Eric Lamb.
  • Blog
  • Portfolio

Archive for December, 2009

WP-Click-Track 0.7 Released (Umm Last Week)

Posted in Brain Dump on December 29th, 2009 by Eric Lamb – 0 Comments

I hadn't really had much time to announce this (what with the holidays and stuff) but last week WP-Click-Track 0.7 was released. This release includes a few bug fixes and a couple new features. I'd planned to release this a while ago but testing took a little longer than anticipated but it's finally done.

WP-Click-Track 0.7 Released (Umm Last Week)

There were a couple minor, edge, bugs that I don't want to go into detail about but there were 2 in particular that deserve a mention.

First, there was a bug fix for SSL enabled admins. This one I hadn't really anticipated; I'd never thought someone would use ssl for the admin panel. The problem was that if you went to the admin through ssl the graphs wouldn't render properly. My bad.

Then there was an issue in the graphs. If the charted number was over 1,000 the chart would basically throw up. Rookie move on my part but some escaping fixed that right up. If you ran into this bug I'm really sorry.

0.7 also includes an improved cookie model. I admit, I've been completely lazy about cookie management for years now. Yes, sessions are nice but when you're building for a multi-server environment sessions can get a little tricky. Problem is that there are some pretty specific rules for cookies and just setting a cookie willy nilly, without any thought to the implications, can screw things up. Now it's much, much, better.

Among the additions there's a new configuration value to disable tracking of internal links. This should help with all the clicks in peoples galleries I've been hearing so much about smile

Speaking of configuration the entire configuration section has been rewritten to be more user friendly. Instead of the HUGE and confusing single page everything is organized into tabs and should, hopefully, make for a better experience when you do have to configure something.

Anyway, you can install it within the WordPress plugin manager or if you want to take a  look at the code here you go.

Blackberry Secret Codes

Posted in IT on December 23rd, 2009 by Eric Lamb – 2 Comments

After my little foray into unlocking my old Blackberry Curve I started to think that there were probably other special codes to play around with. I've done a little bit of research and it turns out, yup, there are quite a few special codes to do some random things.

Decibel meter

Normally, the signal strength meter is a series of bars like the below image. Hold "Alt" and press "N", "M", "L", "L". To undo just redo smile

Normal Signal Strength Indicator

Decibal Meter

View Source Code

This one every web developer should know. In the Browser, hold "Alt" and press "R", "B", "V", "S"

View Source Code

Help Me! menu

If you ever call up for support chances are you've been told to enter this one. It shows a bunch of info in one place but most of it will be greek to most people.  Hold "Alt" and (left) "shift", then press "H".

Help Me! Menu

Display IMEI Code

As far as I know this is really only useful for unlocking a device. Type "*", "#", "0", "6", "#" on the Home screen.

Display IMEI Code

Event Log

The Event Log is probably only going to be useful if you're a developer or similar. It displays all the last Java goodies that have happened since starting the device. Hold "Alt" and press "L", "G", "L", "G".

Event Log

Show SIM Information

This code will display the details about a SIM card. You have to enter this code from the SIM Options page and press "M", "E", "P", "D"

Show SIM Information

View Refld and ServiceUserId

From inside a message hold "Alt" and press "V", "I", "E", "W"

View Refld and ServiceUserId

View Data Usage & Voice Usage

This one is really only good if you have a new, unused, Blackberry. It maxes out at the below but if you buy a "new" Blackberry enter this code and verify it. From Status Options page press "B", "U", "Y", "R"

View Data Usage & Voice Usage

Hard Reset

Doing a Hard Reset is like taking the battery out and inserting it again. Handy if you're not in the mood to fuddle with the case. Hold ALT + Right Shift + Del

Validate Contact List

I'm honestly not really sure what these last two do but I'm listing them anyway for completeness. Hold "Alt" and press "V", "A", "L", "D" in address book list

Rebuild Contact List

Hold "Alt" and press "V", "A", "L", "D" in address book list.

These are all the "secret codes" I could find but that doesn't mean there aren't any more. Also, these codes were only verified on the Blackberry Bold 9000 so they may not work with all devices. If anyone has any new ones please leave a comment and I'll update a list.

How To Unlock AT&T Blackberry

Posted in Brain Dump, IT on December 21st, 2009 by Eric Lamb – 1 Comments

My business partner recently had her phone literally break apart in her hands. Since communication between us is pretty crucial I decided to give her a backup Blackberry Curve I had as a replacement for my Blackberry Bold. Problem was that the Curve was bought through AT&T and she uses T-mobile. The phone would have to be unlocked.

How To Unlock AT&T Blackberry

Initially, I was a little nervous about the process of  unlocking the Blackberry. I'd never personally tried anything like this and my direct experience with the process was that a 3rd party company would have to be brought into the mix. I didn't relish the idea of paying someone to handle what seemed to be a simple exercise when I'm capable of pushing buttons on a freaking phone.

Turns out it's actually extremely easy to handle this yourself though it does require a phone call to AT&T support. Simply call them up and they'll ask you for your IMEI code; it's under the battery on the serial number label. They'll send you an email, like the below, that'll walk you through the process.

Your device unlock request was received and processed, see below for details:

IMEI: YOUR_IMEI_NUMBER

Unlock Code: YOUR_UNLOCK_CODE

Caution: If this process is unsuccessful ten times in a row, the phone will be permanently locked to the at&t network. Do not attempt to enter the code more than one (1) time total.  Instructions below will assist you in unlocking your device, if these steps are unsuccessful please contact us at 1-800-331-0500 or (916) 843-4685 from overseas.

Blackberry 8310

Follow these steps to unlock device:

1. Turn off the radio! VERY IMPORTANT

2. Go to "Options"

3. Scroll to and select "Advanced Options"

4. Click on "SIM Card"

5. Type “MEPD” (You will not see on display what is being typed. To obtain a "P" double tap "OP" key)

6. Type “MEP2” (To obtain a "P" double tap "OP" key. Press “ALT "key to obtain a "2")

7. Enter the unlock code

8. Press enter

9. Reboot device. Device is now unlocked.

Note: To verify the IMEI, dial *#06# on device’s keypad, 15 digit # IMEI will display on the screen.  If this sequence does not work, pull the back/battery off the phone and the IMEI will be listed on the back of the phone.

All told the total time invested was only about 5 minutes. Seriously, 5 minutes. So why would I want to pay someone for this again?

Tablekit: HTML Table Enhancements

Posted in Code, Programming on December 18th, 2009 by Eric Lamb – 0 Comments

I've been using Jquery a lot lately and have absolutely fallen in love with it; so much so that I've pretty much walked away from Prototype and Scriptaculous entirely. Not to take anything away from Prototype but Jquery is just a lot more... well, it's just more fun to work with. That being said, I wanted to give a shout out to one of the cooler toys Prototype has: TableKit.

TableKit

TableKit is a table enhancement JavaScript library written using Prototype provided by Millstream Software. In a nutshell TableKit allows you to easily create sortable, resizable and editable tables. Implementation is extremely simple and, according to Robert Speer, designers don't have an issue working with it (I haven't had the pleasure of having a designer work with it yet):

Many times using scripts I find on the Internet turns into kind of a hassle. They are usually unfinished side projects, or are kind of bloated and slow.

TableKit is not one of those scripts, it’s fast & easy to implement. Development time was low, and the designers didn’t complain too much about working with it.

Robert's right; TableKit is extremely easy to work with. TableKit works by using css class overloading to tell the system how to handle a table. For example:

<table class="sortable resizable editable">

indicates that the table should, obviously, be sortable, resizable and editable. There are all sorts of other options available, which you can read about in the documentation. If you have to use Prototype for a project and you need some jazz TableKit is a good fit.

Why Not Upgrade Perl I Thought

Posted in IT on December 16th, 2009 by Eric Lamb – 0 Comments

About a month ago I started receiving emails from my server about the installed version of PERL being too old and needing to be upgraded. Since my server uses WHM and cPanel, and thinking that upgrading PERL would have some pretty nasty consequences if something went wrong, I held off until I could familiarize myself with the ins and outs of what this was all about. Now that I've done the upgrade I'm not sure it was really so worth the wait and worry.

perl01

The first thing you want to do is backup all your installed CPAN modules. These are basically the library of functionality your system relies on to work. Pretty important stuff in there. It's a pretty simple command though:

perl -MCPAN -e 'autobundle'

The above will create a "bundle" of all the CPAN modules you have installed to be used after the upgrade. Make a note of the bundle location though; you'll need it later.

The instructions to do the actual installation were included in the email and is geared specifically towards cPanel servers:

cd /root
wget http://layer1.cpanel.net/perl588installer.tar.gz
tar -zxf perl588installer.tar.gz
cd perl588installer
./install -optimize-memory

This parts pretty simple, but time consuming. The whole process is automated and should take about an hour or three. When you come back you're going to want to install the autobundle you created earlier. To do that you'll need this command:

perl -MCPAN -e 'install Bundle::NAME_OF_BUNDLE_YOU_CREATED_EARLER'

This is where things started getting difficult. This process is going to require all sorts of input from you. It'll, thankfully, give you default options but the install will sit there until you enter something. All told, this process took me about 4 hours; just sitting there watching the process.

Definitely a pain but not upgrading PERL would have been worse. If you have to do it be sure to set aside an afternoon though.

Windows 7 Upgrade Experience

Posted in Brain Dump, IT on December 10th, 2009 by Eric Lamb – 0 Comments

When I purchased my newest laptop back in July, from Best Buy, it came with a free upgrade to Windows 7 when it came out a few months later. Fast forward to December and I've since received the new operating system and have installed it on the laptop. Since a lot of people are going to be going through the same thing I put together some notes about the experience.

Windows 7

Because the promotion was for a version of Windows 7 that was the same flavor as the installed Windows Vista, I was given a 64bit Windows 7 Home Premium copy. Personally, I would have preferred Business or Ultimate but ok, fine Home Premium it is. At least this meant that I wouldn't have to do a clean install so I could keep all files and programs where they were (still backing up the data of course).

The upgrade package came with 2 discs; the Windows 7 disc and a driver upgrade disc. The instructions said to insert the upgrade disc first and I'll be prompted to enter disc 2 when required. Doing so started an upgrade program that inspected my system and warned me about deauthorizing my iTunes account which immediately made me feel good about the experience.

All told the install took around 3.5 hours and was like watching water boiling. I did it super late at night but I was still up and every time I would check on it I swear the progress rarely looked like it was making any progress. Still, it is Windows, so I was used to this; just wait and be patient, it'll finish. And eventually it did.

Upon first booting up there were a couple issues. One was my fault. The others... not so much. Probably the worst offense was that I had no Internet connectivity. I checked both my wired NIC and the wifi and both were working  fine; I could connect to my router through both and I could find my Xbox and PS3 on the network. I just couldn't get online. I eventually found that this was caused by a conflict between Esets firewall (which I had disabled in Vista) and the native Windows firewall. Uninstalling Eset and reinstalling it solved the issue.

I also had an issue with my local Apache webserver working. After checking the logs it turned out to be a soft link I had created under Vista to link the conf directory (makes editing the files from my working directory that much easier). Creating a new link solved the issue nicely.

The last issue is with the touchpad; and I haven't really fixed it yet. At first, Windows thought the touchpad was a PS/2 mouse. This wouldn't be an issue except I like the scrolling functions on the touchpad and the PS/2 drivers don't support it. This seemed like a cut and dry driver issue except I installed all the latest drivers for my laptop that Gateway offered and it still doesn't work all that well. Yes, it's there but not in any real functional way. It's jerky and hesitant when it works (around 30% of the time). Not enough to get me to downgrade but still a pain.

I've never really had an issue with Vista but I was still excited about Windows 7. Even though there were a couple hiccups during the install, and that my touchpad isn't operating 100%, I'm still really happy with the experience.

IMAP on Blackberry: The Poor Mans BES

Posted in Brain Dump, IT on December 07th, 2009 by Eric Lamb – 0 Comments

It's crazy to me how important email is; it's almost 2010 and I'm still, still, relying on email for communication more than anything else. Considering just how broken email is this, along with how I know it's broken, this isn't a little surprising. Managing the shear amount of email I get used to be pretty easy but now... it's a little more painful but still manageable.

IMAP on Blackberry: The Poor Mans BES

When I had the day job I had access to a nice little network with Exchange 2003 and the latest Blackberry Enterprise Server (BES). It never really occurred to me how spoiled this would make me but, now that it's gone, it's pretty obvious how much I relied on it for my email management.

Why? Syncing. Loved the whole syncing aspect; open an email on your Blackberry and the email was marked as open in Exchange. Send an email from your Blackberry and it appeared in your sent folder in Outlook. Even better if you sent an email in Outlook, through Exchange, it was put in your sent folder on your Blackberry. Simple. This was great for things like filing and responding to emails. Put simply, using the Exchange/BES combo allowed you to keep all your communication in sync.

Then I get unplugged from the BES and have to setup a new solution. First, I went to POP3 (as I was most familiar with the protocol) but this was a cluster fuck of a bad idea. Yes, email was put on the Blackberry but it's a one way method and nothing was kept in sync. I'd do something on the device and when I would go to Gmail nothing would be there; this couldn't do.

I also tried the native Gmail Blackberry app but this too wasn't ideal; I hated how it wasn't truly a "native" app in that other apps would still open the default Blackberry message program to do anything email related. For example, if I clicked on an email on a web page while on the Blackberry it wouldn't open the Gmail app but the native messaging one instead. I was surprised how much this happened and how much it bothered me but it did.

Then I learned that Gmail has IMAP support and have been using it ever since. So far, IMAP is the closest approximation of the BES experience I've found. It's not without it's issues or anything, and technically it's not supported by Google, but it's the best solution I've found.

Probably the biggest issue I have with the IMAP integration is that mail manipulated on the Gmail site doesn't get synced to my Blackberry. This isn't too bad since I usually only use the Gmail site for sending but if I want to keep things in sync I have to treat the Blackberry as the master.

To keep the calendar and contacts in sync requires the use of another Blackberry app called Google Sync. Google Sync it's keeps your contacts and calendar synced up between Google Calendar and Gmail contacts and your Blackberry.

While it's not a perfect solution I've been mostly happy with IMAP and Gmail on the Blackberry. It's way, way, better than paying money for an outsourced BES / Exchange account.

this couldn't do.;

Code Like It's 1999 With Dolphin CMS

Posted in Brain Dump, Programming, Rant on December 02nd, 2009 by Eric Lamb – 3 Comments

It's interesting how life can throw you a little too much coincidence. For example, I was having a nice conversation (with a pretty smart dude) where it was mentioned how much more painful development on large projects used to be back in the confused days of early PHP. Then life decided to highlight this little message with a project using Dolphin 6.1 from Boonex.

Coding Like It's 1999 :: Dolphin CMS

The work came from a client that had a straight-forward install of Dolphin. She wanted to customize it a bit to make it a little more user friendly; nothing too difficult. Before the project came to me the client had gone the usual route of hiring someone on the cheap who ended up not being up to the task and was, subsequently, left high and dry. This left me with a project that had some of the work started, but not finished, which added to the pain a little but Dolphin sure has it's own ways of ruining a mood.

In case anyone else has the misfortune of having to work on a Dolphin CMS project I thought I'd highlight just what you're in for.

The Good

To be fair, for as bad of a nightmare Dolphin CMS is as a project (compared to coding standards in today's landscape), it does have one or two(ish) redeeming qualities.

For one thing Dolphin CMS has a pretty logical directory structure. Looking for the language file? Why it's in the "lang" directory of course. Looking for a class? Just check out the "inc/classes" directory. Admittedly, this is a small thing if you're using a modern IDE but I still appreciate it (so many programs I've ran into lately don't even include this level of logic).

Dolphin CMS also has what can only be called an advanced admin panel. This thing allows you to customize all sorts of areas including the content of pages as well as the layout of the pages. I had a lot of fun playing with that thing. This is double edged though because it serves no practical purpose if you want something unique and cool. For newbies though I think this is a nice feature to learn about the possibilities for a website.

The Bad

Right off, Dolphin CMS is PHP 4 compatible. This is just silly; it's fucking 2009 already and Dolphin CMS using PHP 4 as a baseline is probably more to blame for the rest of this list than anything else. If you're going to use old technology why not use old coding standards? In that situation I imagine complacency and laziness would come naturally.

Then there's the use of short tags in Dolphin CMS. I admit to having a problem myself with maintaining this standard (it's still natural for me in a template file) but it's irritating if you have short tags disabled in your ini file.

Another offense: inline HTML and PHP together ALL OVER THE PLACE. You can't hardly open any file, seriously, any file, without wanting to tear your eyes out of your skull from the cluster fuck in front of you. Add to that the confusion in that the system has a template system (see below) Dolphin CMS just doesn't use it for the parts you'd actually want to change. Gave me a headache when I would think about it.

As mentioned above there is a template system (of sorts) but it doesn't actually templatize anything. I guess it's more of a layout system but considering the majority of templates only had header, footer and content references it's a poorly utilized one. To make it even worse though Dolphin CMS uses a hard-coded, numerically indexed, naming convention. Want to know what template file you're file is using? Just open up that file and look for a variable called "$_page" and use the value as a reference. Seriously, why would you use a number instead of something meaningful like the name of the file (or similar)?

Back Pedaling

I just got done working with Dolphin CMS so, yes, I'm a little raw. Wah; I know. Still, the fact remains that Dolphin CMS is one of the biggest pains in the ass to work with that I've run into in quite some time. It's not too complicated to work on, it's structure should be familiar to anyone who's worked with PHP ten years ago, which is it's biggest issue. You have to dumb yourself down to work with. And for the love of god don't try and abstract anything.

The most heinous thing though is that Boonex actually charges for this filth. Real money too. Crap can be excused if it's free but there's nothing worse than paying for a box full of horse shit.

  • Subscribe: Entries | Comments
  • About Me

    Email Email
    Twitter Twitter
    310.739.3322
  • Categories

    • Brain Dump
    • Business
    • Code
    • IT
    • Programming
    • Rant
    • Servers
  • Archives

    • February 2012
    • October 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
  • Advertisement

Copyright © 2008 - 2013 Eric Lamb - All rights reserved