Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   from this to this
Monday, October 18 2004
At its best, excessive alcohol consumption is a little like borrowing happiness against future reserves. The hangover, then, is what happens when that happiness must be paid back. Today was just such a day. Sure, I could do some things fairly well. Walking in the woods with the dogs wasn't especially difficult, and while I was there I could collect flat stones for my slab resurfacing project. But I was always just a little bit miserable, no matter what I was doing.
At around sundown I took a nap, and when I woke up many hours later I felt completely restored. This surprised me somewhat; in the past it's always seemed that when I take a nap during a hangover, it's like I pushed "pause" on the misery, only to hit play again when I reawaken.
It was essential that I recover at least some fraction of my cognitive abilities; I'd promised a client that I'd have a website to show him tomorrow, and I'd done essentially none of it. Not only did I have to create the complete website, but I also had to create the environment for presenting it. The client in this case has neither an internet connection nor (for that matter) a computer, and I'd have to be demonstrating the site using my laptop. But since the site would depend on all my usual backend PHP tricks1, I'd have to get a PHP-capable web server working on my laptop. And that is not as straightforward as I'd been lead to believe. The laptop is a Windows XP machine, but its IIS is mysteriously broken, so I had to install the open source Apache web server. Then, to get PHP working, I had to install PHP separately. But the installer I downloaded from PHP.net didn't actually include all the DLLs I needed, and I had to go and get them separately. (An action that was never once suggested in the instructions.) It was big ordeal, and I almost gave up several times, but finally I got it to work. This is the first time I'd ever had success getting a PHP-capable web server running on a Windows machine. I have a feeling this effort will pay back many times in the future.


1By "tricks," I mean various automation functions that allow me to centralize and automate the generation of certain blocks of page HTML - particularly navigation, headers, footers, and (to a limited extent) the presentation of data. I originally developed many of these functions back in 1999 and 2000 using the VBScript language. Most of these functions began their life as specific solutions to a particular problem. Over several code-generations, I made the functions increasingly generic to accommodate their many possible uses. I would take a function that started out as single-purpose one-way data translator and make it so it could work both ways. Then I'd add a provision for it to accept its data as a parameter in the form of a delimited text string. It would go from looking like this (Summer, 1999):


function MakeKosher(strIn)
	strIn=replace(strIn, "^", "")
	strIn=replace(strIn, "|", "")
	strIn=replace(strIn, " ", "")
	strIn=replace(strIn, chr(13), "")
	strIn=replace(strIn, chr(10), "")
	select case lcase(strIn)
		case "red"
		MakeKosher="ff0000"
		case "green"
		MakeKosher="00cc00"
		case "blue"
		MakeKosher="0000ff"
		case "yellow"
		MakeKosher="ffff00"
		case "grey"
		MakeKosher="999999"
		case "orange"
		MakeKosher="ff9900"
		case "white"
		MakeKosher="ffffff"
		case "black"
		MakeKosher="000000"
		case "brown"
		MakeKosher="996600"
		case "navy"
		MakeKosher="000099"
		case "ruby"
		MakeKosher="990000"
		case "forest"
		MakeKosher="009900"
		case "maroon"
		MakeKosher="660000"
		case "spinach"
		MakeKosher="006600"
		case "pool"
		MakeKosher="000066"
		case else
		MakeKosher=lcase(strIn)
		if len(MakeKosher)>6 then MakeKosher=left(MakeKosher, 6)
	end select
end function

function FromKosher(strIn)
	select case lcase(strIn)
		case "ff0000"
		FromKosher="red"
		case "00cc00"
		FromKosher="green"
		case "0000ff"
		FromKosher="blue"
		case "ffff00"
		FromKosher="yellow"
		case "999999"
		FromKosher="grey"
		case "ff9900"
		FromKosher="orange"
		case "ffffff"
		FromKosher="white"
		case "996600"
		FromKosher="brown"
		case "000000"
		FromKosher="black"
		case "009900"
		FromKosher="forest"
		case "990000"
		FromKosher="ruby"
		case "660000"
		FromKosher="maroon"
		case "006600"
		FromKosher="spinach"
		case "000066"
		FromKosher="pool"
		case "000099"
		FromKosher="navy"
		case else
		FromKosher=strIn
	end select
end function

To this (April, 2000):


function ColorTrans(strIn, intTypeIn, intTypeOut)
	'the wisdom of color translation
	'where intTypes 0=colorname 1=colorvalue
	'this basically does a tablescan of the data in strTranslates looking for one side of the value pair and
	'returning the other
	'Gus Mueller, April 2000
	dim strTranslate, arrTranslate, i, strOut, bwlDone, arrThis
	strIn=cstr(strIn)
	strTranslate="red|ff0000-green|00cc00-blue|0000ff-yellow|ffff00-grey|999999-orange|ff9900-white|ffffff-black|000000-brown|996600-navy|000099-ruby|990000-forest|009900-maroon|660000-spinach|006600-pool|000066-pink|ff9999"
arrTranslate=split(strTranslate, "-")
	bwlDone=false
	i=0
	do until i > ubound(arrTranslate) or bwlDone=true
		arrThis=split(arrTranslate(i), "|")
		if lcase(arrThis(intTypeIn))=lcase(strIn) then
			strOut=arrThis(intTypeOut)
			bwlDone=true
		end if
		i=i+1
	loop
	if strOut="" then
		strOut="999999"
		if len(strIn)=6 then
			strOut=colorsafe(strIn)
		end if
	end if
	ColorTrans=strOut
end function

To this (June, 2000):


function Data(strIn, intTypeIn, intTypeOut, strTranslate)
	'ALLOWS us to read data in double-delimited strings of the form a|b|.|.|.-c|d|.|.|.-.-.-.
	'Gus Mueller, April 2000
	dim arrTranslate, i, strOut, bwlDone, arrThis
	strIn=cstr(strIn)
	if strTranslate<>"" then
		if instr(strTranslate, "-")>0 then
			arrTranslate=split(strTranslate, "-")
		else
			arrTranslate=split(strTranslate, "|")
		end if
	end if
	bwlDone=false
	i=0
	do until i > ubound(arrTranslate) or bwlDone=true
		arrThis=split(arrTranslate(i), "|")
		if intTypeOut=-1 then
			strOut=strIn
		else
			if intTypeIn<=ubound(arrThis) and intTypeOut<=ubound(arrThis) then
				if intTypeIn=-1 then
					if cstr(strIn)=cstr(i) then
						if ubound(arrThis)<1 then
							strOut=arrTranslate(i)
						else
							strOut=arrThis(intTypeOut)
						end if
						bwlDone=true
					end if
				elseif lcase(arrThis(intTypeIn))=lcase(strIn) then
					strOut=arrThis(intTypeOut)
					bwlDone=true
				end if
			end if
		end if
		i=i+1
	loop
	if strOut="" then
		strOut=""
	end if
	Data=strOut
end function


For linking purposes this article's URL is:
http://asecular.com/blog.php?041018

feedback
previous | next