Interfacing With Another Species 7.2 Ksecs Too Early

Ξ September 29th, 2008 | → 0 Comments | ∇ special, Work, code, japan, coding, programming, conference, meeting |

I’ve been scheduled for a conference call without my input on the time for more than 7Ksecs before I usually resume consciousness.  In the past this has usually resulted in disaster for the other involved parties, as I typically can’t resume from standby that early, let alone speak in coherent sentences or form what humans would consider lucid thoughts.  My ideal employer would either be able to work with this better, or be located in Japan.

This article on Code Climber identifies a lot of the most important reasons I and so many others work best at night. There are numerous benefits to working at night:

  • There are far less interruptions by email, instant message, and news via RSS
  • There is minimal interaction with human species, as they seem to prefer sleeping while Sol illuminates the oppopsite side of their planet
  • My best and most productive work requires long periods of concentration and Focus

Original post by Maker

 

A little regex in php for fun

Ξ August 14th, 2008 | → 0 Comments | ∇ code, coding, php, programming, regex |

So after working thirteen hours in a row I came home and thought of a handy function to bandaid some legacy code that returns a url with double slashes after the TLD. I realize this is a worse solution than fixing the code in question, but my regex-fu could use work so I though I’d do a little exploring. Here’s what I came up with:

?php
$url = remove_url_slashes('http://www.killallhumans.com//?robots_eating=hobos&passion=361', 'killallhumans');

function remove_url_slashes($url=’’,$domain=’’) {
if(empty($url))
return false;
if(empty($domain))
$domain = 'killallhumans';
$pattern = "/($domain)(.*?)(\/+)/ie";
return preg_replace($pattern, "'\\1\\2/'", $url);
}
?

Original post by Maker

 

  • Rumours and Lies