pander dander

cakephp makes you pass the null. It’s infuriating to have to spend so much time in the api docs to figure out if its 6 or seven nulls that need to go as arguments in method calls. cocksuckers. I guess I’m just frustrated that I have to spend 20 minutes figuring out how to do something I could grind out in 5 minutes with ruby/rails. And since I am so frustrated I’m not really learning it while I’m making it just work ™.

There is a little spark of shallow enjoyment to be found in spending far more time writing code than reading about writing code. But fuck me if the problems don’t get more complicated as I gain more understanding. Despair clusters blot out my will as I slouch in my seat at the certainty of my spending the next week 16 hours a day writing code I’m going to be dissatisfied with. Because if i was smarter or better at paying attention or could formulate and retain the complex abstractions in my head and see how all the different platforms/languages/workflows/processes/types would most elegantly tie together if I could just muster up a little more understanding of the complex meta programming design patterns or transparent type conversions using format bridgeing with json/soap/xml-rpc/REST/clr interconnections over web services using a distributed grid network. But since I can’t my code is shit. I am that which those who know mock. This is why I rarely leave the house.


Just because I get it doesn’t mean I got it. After all, you can drive a car quite well without knowing how to rebuild the carburetor.

Posted by jeremy 16/06/2007 at 08h05


social engineering and the angry hermit

*UPDATE* Ok, the guys were legit, being a street team for a local service package reseller. Which feels kind of icky in its own right. I've never liked the middle man make-a-buck and run scam which a reseller can be.

Posted by jeremy 14/05/2007 at 18h46


airport extreme + actiontec dsl gateway modem + sbc/att dsl = continuous connection loss & and me F*&KING pissed off

Every 5 minutes for weeks during peak usage times (and sometimes late in the evening) our DSL would just drop its connection and fail to reconnect unless I did a reboot thru telnet or from the system log screen in the admin web interface. Pain in the ass. Finally read somewhere that sbc dsl is run by cock snots and the DNS servers use 2 addresses for all DNS across all geographic areas where they provide service. So sometimes this system can find itself overloaded and become non-responsive when a few million business and residential users want their porn and youtube at the same time. So I changed all of our DNS Server addresses to use the ones from opendns.

airport extreme log: dns lookup failure ntp.apple.com
actiontec gateway modem log: *dns lookup timeout 68.94.156.1  
*(anywhere from 5 to 20 lines of this crap and then):
actiontec modem gateway log: serial cable appears to be disconnected
actiontec modem gateway log: dns lookup failure 68.94.156.1 - connection reset

Problem fixed. Until I updated the firmware of the airport extreme. Back to the goddamn dropped connections all the mother****** time. Not only is it making my life harder, but I get yelled at by a certain lady when she can't read the paper and do her crossword puzzles online. So much worse than disappointed clients. Disappointed client stress is nothing compared to super pissed girlfriend.

Even though every machine and device in this house has been set to use DNS through opendns the airport extreme still looks for something with one of the addresses sent back to the client from our sbc dsl connection, and I have yet to find the elusive panel/setting that is ignoring the DNS I've set manually along with all of the other network settings.

I unchecked set time with apple time servers in the airport extreme base station and I'm hoping that will fix the problem. But the IP assigned to the airport extreme just had a failed dns look on one of the sbc DNS addresses. Sonofabitch. I have deep hate in my soul for all those gray beard bastards that made this shit so difficult.

Posted by jeremy 29/04/2007 at 04h12


a is for awesome


Posted by jeremy 18/04/2007 at 02h18


giggle jiggle

Holy, holy. Resplendent dementia whets the madness whistle. Very few things in my lifetime of experiences have provoked as lucid a recognition of my own instability as this bit’o’cinema.

Posted by jeremy 14/03/2007 at 14h45


imagemap rollovers with area shape="poly" | The Prototype Remix

Time. Most of mine lately has been spent (failing) at learning how prototype.js works.

A long time ago I had to make an imagemap with pixel precision outlines of the continents with a hover state on the links, so I cobbled together a kludgey script that worked. That was then, this is now.

Prototype makes it very easy:
(prototype.js; mapHover.js)

Event.observe(window, 'load', function() {
  var mapLinks = $('Map').childNodes;
  $A(mapLinks).map(function(element) {
    Event.observe(element, 'mouseover', function(){ $('mapBlock').addClassName(element.id)});
    Event.observe(element, 'mouseout', function(){ $('mapBlock').removeClassName(element.id)});
  });
});

get the code for this

If you prefer, behaviour.js is also a way to solve the problem:
(prototype.js; behaviour.js; styles.js)

var maphoverrules = {

  'area': function(element) {
    element.onmouseover = function(){
      $('mapBlock').className = element.id;
    }
    element.onmouseout = function(){
      $('mapBlock').className = 'mapbase';
    }
  }

}
Behaviour.register(maphoverrules);

So fresh and so clean-clean.

Markup
The css/html is relatively unchanged (just some DRYing up, really) from the original example.
Scripting
The basic premise is the same as my original implementation I'm just leveraging the power and utility of the prototype.js / behaviour.js libraries to simplify with the added benefit of built-in cross browser/platform support.

Besides, prototype.js is solid krunk, yo.

Posted by jeremy 23/02/2007 at 20h14


filler up

succa

Posted by jeremy 10/02/2007 at 02h52


been busy

Released the major xhtml/css overhaul of Jambo‘s website, released version 3 of the rails app I spend most of my time trying to fix, and produced no less than 3 xhtml/css builds for another client. I never pictured myself as a code for 24 hours straight type of guy, but I’ve proven a half-dozen times in the last 2 months that I can and will subject myself to the torture of little sleep, little food, and LCD burned eyeballs. I feel like after a few more years of this I could maybe, tentatively, call myself a developer. I think you have to miss showering for a month and sleep under your desk to be called a programmer. You get to be a bona fide uber geek when you can claim with pride that you haven’t seen the sun (anywhere but in a virtual world) for over 2 months.


I kinda dig the way my mind will become consumed by the inner workings of an application I’m working on. How thoughts of food and and other life sustaining concerns are forgotten, and in their place is installed an intimate knowledge of all the moving parts inside the code I’m desperately trying to understand more clearly and bend to my will. How I’ll dream about how to re-write a method, or other ways of attacking a problem that took way too much time to solve.


It’s also kinda cool to look at an error in the logs and actually know where to start looking to solve it, or why it happened.

Posted by jeremy 09/02/2007 at 05h26


Prototype 1.5.0 and json.js

I updated to Prototype 1.5.0 for a web app I'm developing, and all of a sudden Firefox starts choking on my code.... Exception ``[object Object]'' thrown from function anonymous(value=string:"get") in line 407. Exception ``[object Object]'' thrown from function anonymous(value=string:"get") in line 328. Exception ``[object Object]'' thrown from function anonymous() in line 330. Exception ``[object Object]'' thrown from function anonymous(iterator=function:anonymous) in line 541. Exception ``[object Object]'' thrown from function anonymous(iterator=function:anonymous) in line 326. Exception ``[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://ascend.local/javascript/prototype.1.5.0.js :: anonymous :: line 916" data: no]'' thrown from function anonymous() in line 916. Exception ``[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://ascend.local/javascript/prototype.1.5.0.js :: anonymous :: line 916" data: no]'' thrown from function anonymous(url=string:"http://ascend.local/remote_fakeout/process.php") in line 862. Well, I'm using the json.js library from Douglas Crockford to parse the json results from the servlet and it sets a toJSONString method on each object. This ticket from Ruby On Rails trac provided the information that had eluded me for going on 28 hours. This: 915: for (var name in headers) 916: if (typeof headers[name] != 'function') 917: }, Needs to become this: 915: for (var name in headers) 916: if (typeof headers[name] != 'function') 917: this.transport.setRequestHeader(name, headers[name]); 918: }, in prototype.js if you want to use the json.js library and not have Firefox throw exceptions like beads during Mardi Gras. I hope to one day understand OOP enough to know how to solve these issues in under a day. Until then I'll seek constant reprieve from the hourly compulsion to end my pain with a sweet gunpowder symphony due to my small brain, lack of raw talent, and inability to comprehend the obvious. Yay. Now I can get back to writing the web application I was supposed to be 30 hours into at this point. I suck.

Posted by jeremy 21/01/2007 at 15h33


IE7 tried to kill my soul - but the internets saved me

I owe a life debt to these two: [456bereastreet.com] [tanfa.co.uk] Margins on floated divs were rattling my shaky css-fu, of which I possessed a confidence surplus due to the 160+hour December xhtml rewrite marathon giving my skillz some verisimilitude. Wouldn't you know, the solution was inline-block instead of inline-table and a height:1px; in my ie6-styles hidden behind a conditional comment. It's like magic.
Another notable
In my source code I'm replacing all of these:


With these:

Because IE6 likes to choke on (itsowncock) comments in the code, and this will hide comments from the IE family. Anything I can do to deny IE full disclosure of my intent is a win. VIA [positioniseverything.net]

Posted by jeremy 11/01/2007 at 11h17