journal
all ![]() | Rob is 20,117 days old today. |
Oct 2007 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Dec 2007 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2006 jan feb mar apr may jun jul aug sep oct nov dec
2008 jan feb mar apr may jun jul aug sep oct nov dec |< << more >> >| |
Entries this day: Comment_Question_Chat_with_Marcel New_coding_paradigm Sweet_sweet_navigation Work_done movie_and_eichi zzz_Castle_of_Dreams_map_array Comment Question Chat with Marcel 8:02am JST Friday 9 November 2007 (day 13743) Waking up this morning, I found a message from Marcel: Rob, Thanks for keeping me up-to-date on happenings of Rob's epp. A comment and a question. First the comment: you should be able to renew your driver's license online. Check out http://www.texasonline.state.tx.us/NASApp/rap/apps/dpsdl/jsp/eng/welcome.jsp, so long as a) your license hasn't been expired for more than 2 years and b) "You currently have a Texas residential or mailing address and will retain a Texas residence or mailing address." See the FAQ (http://www.texasonline.state.tx.us/NASApp/rap/BaseRap) for details. Now, the question. Regarding R.O.B.O.T. ... I know you are a sincere person. I hope you know of my immense respect for you, as well as my brotherly love and concern for your well being. So I am asking this question as seriously as I can (through email), so please consider it thoughtfully and perhaps even during your meditations. Also, I'm not asking that you necessarily share the answer with me--I leave that as an option to you--although I hope you will feel safe enough to do that. Here's the question: if you follow ROBOT and its tenets faithfully and with a pure conscious, dedicating your life to it and holding it in earnest above all other relationships, having done these things what will you do if you still feel something missing? Much love and thanks again, Marcel I always like messages from Marcel; he's always thoughtful, thorough, and usually funny. And in his epp, there are several kids running around, so for him to take time to write to me is like wow! me: Hey Marcel! Marcel: Waaassuuuuuup?!?! me: I am (supposed to be) busy at work! Marcel: Bwahahahahaha! me: I got your email, comment and question thank you! Marcel: Engage MR Labs obfuscation chat device. me: asdf9234 ,mas,dfl;iu the first person to have actually read the text in R.O.B.O.T., so thank you for that. Marcel: emoclew era uoY me: I definitely don't have time to chatfully answer your question now, but just the above thanks for now. Marcel: You bet. I do have an interesting comment about the epp, but didn't want to bog down the email I sent. me: I liked your use of my new word epp. I'm ready! Marcel: (Well, I think it's interesting) Oh, ok. me: Well, I think I'm ready Sent at 10:27 AM on Friday Marcel: So, it's interesting to me that the God of the Old Testament (in Exodus) identifies Himself as "I AM." Sent at 10:28 AM on Friday me: sounds like epp, except for "referring" to anything, but yes Marcel: Well, I'm still new to the whole ROBOT thing... ;) me: hahaha Marcel: Hehehe me: please continue or is that it? Marcel: Oh, that was basically it. me: nice Marcel: Simple and sweet. me: so, yeah, that's a big part of my belief system: stuff is Marcel: How's Ami? (Sound of Marcel typing over Rob) me: Ami: "I am Ami" Ami's fine and equally busy at work and shtuffs Marcel: That's almost a palindrome... (thought it was at first sight) me: yah; I just noticed the same three letters could be used three times each... She's good, thanks. :-) 11:04am JST I've just put together the stuff above from the email and chat with Marcel. At some point I'd like to answer his question here. I think I'll do it today. 12:22pm JST Sunday 9 December 2007 (day 13773) Or a month from then: But even still, not yet written. permalinkNew coding paradigm 1:12pm JST Friday 9 November 2007 (day 13743) Hmmm.. (( there's a funny story from Marcel... I'll let him tell it: Rob: Can you, for publishment in my journal, tell the story of one of your first programs? Marcel: HAHAHAHAHAHA! I remember that! I'm amazed you remember it. Oh, man. The assignment was (duh-nuh-nuh-nuh-nuh, duh-nuh-nuh-nuh-nuh <waveylines/> duh-nuh-nuh-nuh-nuh)... ...to write a program like Candy Land, where each player drew a card with a random color on it. The player would then proceed to the next tile of the same color. The first player to reach the end of the "maze" won. The program was written for a programming contest for a group called ACLS (or some such acronym) so I called my program ACLS-Land. The program was written in Pascal (probably on a Commodore 64) 80x24 text screen (in my day, we had 16 colors and we liked it that way). My game featured an S-shaped board complete with borders (using the extended ASCII character set; you remember the single and double lines?). Anyway, it was decked out pretty nice. I might have been overachieving. So to top off my work, I added opening credits to the game. The credits started with dark gray text, then light gray text, then white text for several seconds... you know, so it had that nice fade-in/fade-out touch. So proud of my success, I invited my teacher, Mr. Halbert, to play my game. He was rather impressed. He wanted to see the code. He laughed hard. Despite the fact that we weren't going to be getting to procedures for a bit, he introduced me to the concept of reusable code. (dun-nuh-nuh-nuh-nuh, dun-nuh-nuh-nuh-nuh <waveylinesthingagain/> dun-nuh-nuh-nuh-nuh) Honestly, I don't recall how I did it, and I wish I had the code. And, come to think of it, I might not have had the entire program finished when he taught me procedures, but that's how I remember it. )) So, that story comes to mind as I'm just realizing I've got to move a block of code, and little blocks of supporting code.. eeeek. The code is *working*, but I've got it in the wrong file, so it's slowly making modifications more and more difficult. There may be a name for this paradigm, but I never learned it in school. * Action.php is a file that grabs the data sent, does some benihana chef on it, and throws it to some objects that write the data to a DB. * View.php is a file that grabs the results of the data mashing and decides with which template to display it, then includes that template. * Template.php simply displays the data, and has *very minimal* logic built in. So, the assignment here is to change the number of columns and add this and that and other stuff... so I put the new number of columns into Template.php. The number depends on the length of an array that will be display, so the top of the column has a colspan tag that = the length, so the top will span all the elements of the array. Now I realize all that should not be in the template. I think it should be in the view. That's where I'm likely to put it. I think. Dang. It's really tempting to just blow through the assignment in the template, because then I'd finish it probably today or Monday. Yesterday I told them it would take a week, and then this morning I was like, "oh wait, this is easy!" and started to make changes, but then I see to make it work nicely I've got to move the code. I'm going to take a bit of a break (and by break I mean work on my website; I've semi-sorta got a workable way to put navigation in pages of the castle wiki) and then come back to the work on job related code. Ironically, I'm probably writing the PHP code in an almost identically problematic way, but I have even less of a grasp on the way the MediaWiki files are set up, so I'm just going to plow through and learn as I go. permalinkSweet sweet navigation 3:05pm JST Friday 9 November 2007 (day 13743) Lovely. I created a MediaWiki extension that will convert a <navigation/> tag into a string according to a "map" I've created. The map is an array of room names that point to an array of room names and how to get there from the current room: $castle_navigation = array( 'Sandbox' => array('Main Page' => 'climb out to the', 'monkey biznass' => 'jump into', 'your shirt' => 'wear')); This means that from the room named "Sandbox," they can climb out to the Main Page, jump into monkey biznass, or wear your shirt. Now, this in *no* *way* *whatsoever* controls their ability to go anywhere the wiki normally lets them go. It just prints this line wherever there's a <navigation/> tag: You can climb out to the Main Page, jump into monkey biznass, or wear your shirt. And the names of the pages to which they can go are linked, of course. Here's the extension: <?php $wgExtensionFunctions[] = 'efNavigationForPagesAsRooms'; function efNavigationForPagesAsRooms() { global $wgParser; $wgParser->setHook( 'navigation', 'efRenderNavigationLine' ); } $castle_navigation = array( 'Sandbox' => array('Main Page' => 'climb out to the', 'monkey biznass' => 'jump into', 'your shirt' => 'wear')); $_navigation_array_array = $castle_navigation; function efRenderNavigationLine( $input, $args, $parser ) { global $_navigation_array_array; $roomTitle = $parser->mTitle->mTextform; $prefix = "You can "; $postfix = ". (while laying out the pages, remember to add <navigation/>)"; $exit_directions = array(); if(!array_key_exists($roomTitle, $_navigation_array_array)) return "nowhere to go from \"{$roomTitle}.\""; foreach($_navigation_array_array[$roomTitle] as $page_title => $technique ) $exit_directions[] = $technique . " " . $parser->recursiveTagParse("[[" . $page_title . "]]"); if(count ($exit_directions) > 1) { $the_last_room = array_pop($exit_directions); $output_or_and_after = ", or " . $the_last_room . $postfix; } else { $output_or_and_after = $postfix; } $output_before_or = $prefix . implode( ', ', $exit_directions ); return $output_before_or . $output_or_and_after; } ?> I'm not going to explain it all here; if I do that, I'll do it in my wiki. permalinkWork done 6:04pm JST Friday 9 November 2007 (day 13743) Not *done*, but I'm leaving. I just offloaded my brain onto paper so I can pick it back up again on Monday. Peace! permalinkmovie and eichi 12:07am JST Saturday 10 November 2007 (day 13744) After dinner, I encouraged us to watch Bourne Supremacy, because I've been wanting to for a while. We got to the point where Jason arrives at the only other remaining spy from Treadstone, and Ami was like, "I'm falling asleep; let's do it." So we did it and fell asleep. Just now woke up and she went home. permalinkzzz Castle of Dreams map array 4:09am JST Saturday 10 November 2007 (day 13744) After 4 hours work, I think I've finished the array that will direct the navigation for the Castle of Dreams. Wow. All that for just 38 "rooms" and 83 connections (some are one-way). I'm going to go ahead and install the array and start creating the rooms. Because I couldn't figure out how to automagically write <navigation/> at the bottom of the appropriate rooms, it will take a bit longer, but shouldn't be too bad. especially if I didn't make any mistakes in the array. 4:50am JST Saturday 10 November 2007 (day 13744) Cool! All 38 rooms are there, and no logic errors in the array. I did change a bit of the text, but not much. 5:41am JST Saturday 10 November 2007 (day 13744) Okay, I added a READ ME to the table of ancient scrolls. During that process, I realized I had misspelled corridor as cooridor (and created three rooms and links to those rooms with the misspelling!) Shocked at my silliness, I corrected the map, moved the rooms, then logged in as the sysop and deleted the old rooms. Note to self: next time you spend 4 hours writing something, you might wanna add 20 seconds to do a spell check. Okay, bedtime! permalinkprev day next day |