GoDaddy sucks for setting up anything out of the ordinary

My current company uses GoDaddy for hosting, SSL certs, and some other services I haven’t discovered yet. A few weeks back, I was sitting at my desk while 3 of my co-workers sat on the phone talking to GoDaddy support about why our web site grinded to a halt unexpectedly. We were informed that our web site stopped working because we were on a “legacy hosting plan”. I cringed when I heard this, and luckily my co-workers put the thumbscrews on when they heard this. I laughed when I heard “Excuse me, but you’re talking to 3 technical people, and that excuse simply won’t fly with our management.” Ouch. GoDaddy customer support politely informed us that this is what their senior support people had determined with their “tools”. In my 8 years of IT experience I had never heard something so ridiculous; that a “tool” could determine that a web server died because a customer was on a “legacy hosting plan”. The only tools here were GoDaddy and their lack of technical professionalism.

So then there’s this morning. I’m struggling with setting up an SSL client certificate in Apache, and in a brief conversation with GoDaddy, was told by their customer support that the person I was talking with had “never heard of such a thing”. Wow. These guys deal with SSL certificates on a daily basis, and they’ve never heard of an SSL client certificate?!?

In conclusion, GoDaddy might be a good option for those not requiring anything too complex, but when it comes to setting up or troubleshooting something out of the ordinary, I would definitely avoid them.

Patrick Swayze is dying…

So … I’m not a big fan of Patrick Swayze or anything, and not in the cliché “I’m not a fan of” euphemism for “I strongly dislike”, but hearing about him saying goodbye to his family and friends was really sad to hear.

From Australian News.com:

ACTOR Patrick Swayze has reportedly started saying goodbye to family and friends after learning his cancer has spread to his liver.

The Dirty Dancing and Ghost star, who in January was told he had pancreatic cancer, has started preparing himself for death, reports say

“Patrick recently got word that the cancer had spread to his liver and that is what his doctors said would begin the countdown to the end,” a source told National Enquirer magazine.

“Patrick knew it was coming because he was suffering increased weakness.

“At times, he was so weak that he could barely walk without feeling faint. Sometimes he feels out of breath and has to sit down.”

I can’t imagine what that must be like … all these years he was iconic, a face and demeanor easily recognizable from the rest. And now to hear that he’s deathly ill … well, it’s pretty messed up, and reminds you of the frailty of life.

Searching for a good web radio API – Jango, Pandora, etc

So…I just loaded up Jango.com after the recent hoopla about it. At first I wasn’t too impressed, there was no Black Sun Empire. But, I’m pretty impressed that the next song that played after an Aphrodite song was Adam F – Circles. This is one of my favorite songs by him …

That leads me to thinking about a project I’ve wanted to work on for a long time: areacodemusic.com. The first one of these sites (Pandora.com, last.fm, Jango.com, whatever) that releases a good web developer API has my heart. Not that I get a ton of visitors, but I’ll throw this out there: are there any of these new-wave social web radio sites that have a good API?

awesome, fixed the site …

ok so I was having problems with the blog being all dorked up because of a MySQL bug in the current version my web host has installed. if you’ve been to the site in the past couple weeks, you may have noticed posts were chronologically backwards.

upgrading to the newest version fixed that, as well as brought some other cool features. the SlightBox plugin looks neat for images. :D it’s Mootools based. fun stuff

UDDI links

I’m doing a project on UDDI with PHP, but the resources available are terrible. Maybe once I get something working I’ll publish the code somewhere … for now, here are some links I shouldn’t lose.

UDDI Tutorial for jUDDI

First solution: nothing was working with jUDDI. So after a bit of scouring, I found that Java 1.6 will hose it up. Sucks, but switching to a version 1.5 I had installed fixed it. I’m running Tomcat on Winblows (have to have it installed on my laptop and no time to install Fedora Core on it yet), so it was pretty easy to change which version Tomcat starts up with. Start->Run->Programs->Apache Tomcat…->Configure Tomcat, then under the Java tab, changed the location of the Java VM binary (C:Program FilesJavajre1.5.0_11binclientjvm.dll for me). Then I finally got a valid response back at http://localhost:8080/juddi/console for a get_authToken call. :D Maybe now I can actually get started on my freaking project. >:|

Technical feedback to CNN regarding Live Video

I’m not sure I understand why your CNN Live video shown on your front page works under Macintosh/Firefox and not under Linux/Firefox. I’m a web developer by trade and know that Flash is operating system agnostic, so it seems a simple browser check is preventing me from viewing video.

If this is the case, I respectfully ask that you remove the browser check and replace it with a warning and a “continue” button.

In other news, I think I have stomach flu. If the paczki my co-worker brought in doesn’t make me feel better, I’m going home.

My new best friend JSON, using with Code Igniter and Mootools

So for the project I’m currently working on at work, I decided to use JavaScript Object Notation (JSON) to pass some of the changes made via AJAX to avoid page refreshes. Sounds complicated, huh? Well, it took me about 6 hours to figure it out, but JSON is pretty powerful.

Here’s some code, for those of you that like code (like me).

First I generate the current values, as pulled from the database through AJAX into a MOOdalBox that overlays the page (notice the class names of edit_host, which we’ll select later with the Mootools Selectors):

echo form_open('contoller_name/setAction/confirm_host/'.$vars['host_id']);
echo '< table style="color: #111;">';
$dropDown=array('0'=>'N/A');
//$this->CI->printReadable('in item_edit, vars["editMe"]',$vars['editMe']);
foreach($vars['editMe'] as $hostArray=>$hostToEdit) {
strlen($hostToEdit['site_id'])?$default=$hostToEdit['site_id']:$default='0';
foreach($hostToEdit as $hostItem=>$hostValue) {
!@strlen($hostValue)?$hostValue='Not set':NULL;
switch($hostItem) {
case 'site_name':
foreach($vars['sites'] as $siteArray=>$siteToShow) {
$dropDown[$siteToShow['site_id']]=$siteToShow['site_name'];
}
$echoMe="< tr>< td class='edit_host' id='$hostItem'>$hostItem< /td>< td>".form_dropdown('site_name',$dropDown,$default,'class="edit_host"').'< /td>< /tr>';
echo $echoMe;
break;
case 'host_id': case 'net_id': case 'spec_id': case 'brand_id':
echo "< input type='hidden' value='$hostValue' name='$hostItem'>";
break;
case 'host_name': case 'net_ip': case 'host_assetnum': case 'host_hostid': case 'host_serial': case 'host_domain': case 'net_mac': case 'spec_cpunum': case 'spec_memtototal':
?>< tr>< td> $echoMe="< td>< input type='text' value='$hostValue' name='$hostItem' class='edit_host'>< /td>< /tr>";
echo $echoMe;
break;
default:
// these are extra bits of info we're not using yet
break;
}
}
}
echo '< a href="#" onClick="doJSON(this.id,'edit_host'); return true;")>Feces!';
echo '< /table>';
echo form_close();

Next, here is the JavaScript code that does the JSON encoding and AJAX calls:
function doJSON(caller,target) {
var url='http://136.180.24.150/uams/index.php/uams/test/';
this.test={};
var i=0;
// mootools selectors
$$('.'+target).each(function(el) {
var tagType=el.getTag();
var param=el.getAttribute('name');
if(tagType==='input'){
this.test[el.getAttribute('name').toString()]=el.value.toString();
} /*else if(tagType==='whatever'){ //test other tag types here }
});
var JSONString=Json.toString(this.test);
var doesntmatter = new Ajax(url, {
method: 'post',
postBody: JSONString,
update: $(target),
onComplete: function(response) {
// console.log(response.search(/^.*deleted!$/));
//if(response.search(/^.*deleted!$/)>0) {var hide=1;}
//else {var hide=0;}
// the hide variable hides the row being worked on ... not used in this view, but looks good for the delete function
var hide=0;
closeMOOdalBox('750',hide);
}
}).request();
}

One last bit of code in the CI controller, called test (which we called above via AJAX):

public function test() {
//$newObject=;
$input=file_get_contents('php://input');
$newObject=json_decode($input);
if(is_object($newObject)) {
echo "it's an object!n";
print_r($newObject);
} else {
echo 'fecal!';
print_r($input);
}
}

And…………..drum roll please………….the result is:


it's an object!
stdClass Object
(
[host_name] => asdss06h
[host_domain] => Not set
[host_serial] => Not set
[host_assetnum] => Not set
[host_hostid] => Not set
[net_mac] => Not set
[net_ip] => 136.180.69.101
[spec_cpunum] => Not set
)

Sweet! Now on to the next step … actually doing something with the data I passed to the back-end PHP code. Fun! :D

some neat SQL i learned recently. and mootools ajax hurdles

There’s a lot of techie-acronyms in this post, so if you’re not technically inclined … you know the deal. :)

I just recently discovered the “INSERT INTO … ON DUPLICATE KEY UPDATE” syntax while doing database inserts. While probably not the most efficient, this totally changed my thought process while I was coding some PHP to parse a CSV file handed to me at work.

What I was originally doing was iterating through each line and checking the database to see if the item existed. If it did, I would continue processing; if it didn’t I’d insert it. So on and so forth, but it got pretty complex when I had to start correlating the data together throughout multiple tables. Then I stumbled on the above SQL, and it became clear that I should let the RDBMS (MySQL) do the processing instead of waste lines of code and patience to do it myself. So now I just iterate through each line, and pass a variable to a setInfo($vars) function that goes through and pieces together the SQL. If there is a dupe, no big deal … the data is simply updated to match the particulars for that line. This should be good in case the data changes for a particular host in that CSV file, also …

My next hurdle is automagically generating MooTools effects in an AJAX call … right now the size of the data set I’m pulling out of the MySQL database is causing the MooTools effects to be really slow in the browser. This is because when the DOM is ready, I set up my JavaScript/MooTools code to apply effects to each of those rows. Kinda sloppy, I know. I have to read up on AJAX design patterns.

But an interesting thought I had was to automatically generate some JavaScript based on parameters sent via a POST operation. I found a decent article that suggests using “document.createElement(‘script’)” and injecting the JavaScript tags directly into the DOM. I think what I’ll do is tinker with the idea of only triggering an effect event when the user clicks on an element and then I’ll attach the effect(s) to it. What first drew me to MooTools was it’s Flash-like responsiveness, and unfortunately I managed to hose that with a huge set of data and poor JS/MooTools coding on my part.

Hopefully this other approach is a more elegant and better performing solution … ? We’ll see …