tag:blogger.com,1999:blog-81951812024-03-07T20:55:10.823-07:00Vincennzo Capellihelium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.comBlogger191125tag:blogger.com,1999:blog-8195181.post-42878041123633095082013-02-25T20:00:00.000-07:002013-02-25T20:00:14.413-07:00Apparently I Still Have A BlogAnd I haven't posted anything to it since April of 2009.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com1tag:blogger.com,1999:blog-8195181.post-64049689674048931902009-04-03T08:15:00.002-07:002009-04-03T08:30:42.214-07:00Recent Plant Acquisitions<p>I exercised my employee discount at work yesterday and purchased four northern high bush blueberry plants and six strawberry plants. The blueberry varietal breakdown is as follows:</p><ul><li>Vaccinium corymbosum 'Elliott'</li><li>Vaccinium corymbosum 'Toro'</li><li>Vaccinium corymbosum 'Darrow'</li><li>Vaccinium corymbosum 'Duke'</li></ul><p>All of these are of the northern high-bush type. Ideally, I wanted to get varieties that produced small to medium sized fruit as that's what's best for baking. Sadly, we didn't sell any that had that particular trait. Apparently, for the average consumer, bigger is better when it comes to blueberries.</p><p>For the strawberries, the varietal breakdown goes like this:</p><ul><li>3 Fragaria virginiana x chiloensis 'Rainier'</li><li>3 Fragaria virginiana x chiloensis 'Tri-Star'</li></ul><p>An interesting side-note about strawberries is that the common strawberry bush is actually a hybrid of the north american and chilean strawberry. The american parent provides the taste and the chilean parent provides the fruit size.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com1tag:blogger.com,1999:blog-8195181.post-79499337454849018202009-03-27T07:45:00.003-07:002009-03-27T08:00:02.700-07:00Glad TidingsI've managed to secure a position as a software tester with a local 3rd party insurance benefits provider. Oddly enough, on the same day as I was offered this job I was also offered a position as an A- contractor at a certain "software giant in Redmond." I engaged in a fair bit of fretting about which position to take, but in the end it came down to the software testing position being more likely to provide me with the basic skills I need to make good progress in the career I'm trying to create.<br /><br />So yeah, I'm sad that I won't be working at the garden nursery anymore but I'm excited to be getting started in my new "profession."helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-67640656693856071372009-03-23T09:03:00.005-07:002009-03-23T09:15:11.977-07:00Red Robin Menu Widget<img style="float: right; border-style: solid; border-width: 5px; border-color: #C0C0C0; margin-left: 10px; margin-bottom: 0px; width: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguHESr49mgmrvfANyZ8Rc5LSBXKl9kxoMI4vLCGKVxkFQ7PwAa4sttJa2ShCjSvYf8ePfkPOf1IVZL5QNnysUahRzeBrnjnedo6UyM4bT86GjoA4YfLRcknKczd_0kc94PmVKl/s400/2230154616_6b33f5cfe6_o.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5316416457848413426" /><p>Red Robin has this <a href="http://www.redrobin.com/home/customizer">cool web widget</a> that lets me calculate the nutritional content of items on their menu. I had myself a chicken caeser wrap with an extra side of fries last night. The information about my meal that the widget gave me was as follows:</p><ul><li>Calories: 1634</li><li>Grams Fat: 78</li><li>Grams Fiber: 14</li><li><b>WW Points: 38</b></li></ul><p>Saturday night I ate the second half of the pint of Ben & Jerry's I bought on Friday night. I've been eating two of those big chocolate chip cookies everyday on my breaks at work. I've been eating like this for the last pretty much since I started my new job. I'm not eating tons of junk food every day, but I'm definitely "splurging" a whole heck of a lot more than I have in the last year.</p><p>Here's the rub, though. I've been getting so much exercise from my new job that I've lost weight the last two weeks and there's a good chance that I'll manage to lose weight again next Saturday.</p><p>It's kind of crazy. I guess the added bonus of this job is that I can eat a lot more food now than I used to.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-75189247160800788992009-03-22T08:28:00.002-07:002009-03-22T08:36:37.059-07:00What I'm Planting This Year<p>As far as the previously published yard plan is concerned, I'm only executing a small fraction of it this year. This will likely be the only section I'll ever execute, in fact. I'm a renter and there's just not a lot of incentive to pour time and money into the yard unless I know I'm going to be here long enough to really benefit from the investment.</p><p>All I will do is install the vegetable garden and the strip of sunflowers along the southern border of the property. Yesterday, I used my employee discount for the first time to get myself a number of seeds. I purchased:</p><ul><li>Italian Roma Tomatoes</li><li>SMR-58 Pickling Cucumbers</li><li>Tyee Hybrid Spinach</li><li>Waltham 29 Broccoli</li><li>Autum Beauty Sunflowers</li><li>Soybeans</li><li>Russet Norkotah Seed Potatoes</li></ul><p>I may plant some strawberries as well. I'll have to decide on those pretty soon if I'm gonna pull the trigger on that one.</p><p>Right now, the next step is to lay out the borders of my beds and dig up the sod in those areas. Gosh, sometimes it seems like the only landscaping task I execute with any regularity is digging up sod.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-89457005447965374142009-03-19T22:20:00.005-07:002009-03-19T22:31:11.388-07:00What I would do . . .<p>. . . if I lived in this house for the next ten years and had the spare cash and time.</p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1gKq-NknLshF_AG_FyXFgLqHtfyC4PrL0Sq9JMhcilzXwxmxdf_R6H4yYC0uTCR7DuU7CQ4lTU-X85Sca9sbEpQPHVyICRQ7FEODyPYKLRRIJlmdtUFQ6HASGbi0Iv_dHHWLA/s1600-h/Pie+In+The+Sky+Plan.png"><img style="float:left;border-style:solid;border-color:#C0C0C0;border-width:5px;margin-right:5px;margin-top:5px:margin-bottom: 0px; cursor: pointer; cursor: hand;"src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1gKq-NknLshF_AG_FyXFgLqHtfyC4PrL0Sq9JMhcilzXwxmxdf_R6H4yYC0uTCR7DuU7CQ4lTU-X85Sca9sbEpQPHVyICRQ7FEODyPYKLRRIJlmdtUFQ6HASGbi0Iv_dHHWLA/s400/Pie+In+The+Sky+Plan.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5315137279022451650" /></a>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-90137719470547884962009-03-13T20:53:00.006-07:002009-03-13T21:23:43.222-07:00"LA Port Import Traffic Collapses in February"!!!!!!!!<p>Normally, I'm a big fan of Calculated Risk. I've been reading that blog for quite a few months new. Probably since at least mid-September. That being said, I have a minor quibble with the <a href="http://www.calculatedriskblog.com/2009/03/la-port-import-traffic-collapses-in.html">entry</a> of the above title.</p><p>I saw the post's title, looked at the graph and thought, "Oh crap!! Things are getting worse!!" When I got to the list of reasons posted for the decline I immediately latched onto bullet point five for comfort:</p><p style="font-family: courier; margin-left: 15%; margin-right: 15%">Due to the lack of volume and Chinese New Year, Maersk 6700 TEU/week vessel did not make any calls in LA during the month of February (which is traditionally a low volume month).</p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhDK44eloi0JS7HHNThFWwsU4VX1PfYW-a8u2IZ5-kOuw07Kxc0Dk4QzQLWrEzEX14nhvsMW3fzmroxAnUXnKQU-3Wb6idNofmrUpeoGNTohLS4dPtU2CxOImrPJucEZLQa_j1/s1600-h/LAPortTrafficModified.jpg"><img style="float:left; border-style: solid; border-color: #C0C0C0; border-width: 5px; margin-right: 10px; cursor:pointer; cursor:hand;width: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhDK44eloi0JS7HHNThFWwsU4VX1PfYW-a8u2IZ5-kOuw07Kxc0Dk4QzQLWrEzEX14nhvsMW3fzmroxAnUXnKQU-3Wb6idNofmrUpeoGNTohLS4dPtU2CxOImrPJucEZLQa_j1/s400/LAPortTrafficModified.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5312892650872272402" /></a><p>If you look at the other years displayed on the graph, they "all" have a saw-tooth pattern to them. It's not crazy to assume that sometime in the very near future the derivative of the volume flux through the Port of Los Angeles will switch from negative to positive.</p><p>Heh. I just used "derivative" in a sentence.</p><p>So yeah, things are worse. That's a big delta from max to min. But, it shouldn't continue going down for at least a little while.</p><p>I'd also like to point out that the Loaded Out curve has an uptick in it for the first time since the middle of last year. Is this uptick the result of seasonal adjustment making the graph less accurate (it happens sometimes) or is it an actual uptick? If so, does that mean something? I, for one, would like to know.</p><p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-23376099146781080182009-03-08T08:05:00.008-07:002009-03-08T08:24:12.359-07:00Good News<h2 style="margin-top: 10px;">Unemployed No More</h2><p>Yesterday was my first day of work at a local plant nursery. The job is more physically demanding than I'm used to but more relaxing and satisfying as well. It's nice to have my life back, though I'll need to be as frugal as I was when living in Davis.</p><img style="width: 300px; float: left; margin: 0px 10px 10px 0px; border-style: solid; border-width: 5px; border-color: #C0C0C0;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW0ObR2nQLVOJi99ahsk0TfAzbzPbkpvJXounrM14TUYEXPUBACbBJwNXBoRo1yBpfpJ_tk2MdQ8nKjNpoE9DEj049ThvG42cz01ICXYGu5_hRJwFHsRGRwz2fVJk2rZpPCvog/s400/haleakala_sunrise_010.jpg" border="0" alt="Sunrise over Haleakala" id="BLOGGER_PHOTO_ID_5310835833109428642" /><h2>XAMPP</h2><p>In other news, I installed XAMPP on the XP half of "Mikey" (my recently ressurected Dell Inspiron 1000. I still plan to setup a LAMP environment on the Linux partition I created in Mikey's other half.</p><p>I had zero trouble installing XAMPP with the exception of the MySQL service. I even downloaded an MD5 checking utility and used it from the command prompt to determine that the downloaded install package was free of errors. A couple of quick google searches and I was able to fix the MySQL service.</p><p>Now if only I could figure out how to actually do something with Apache . . .</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com2tag:blogger.com,1999:blog-8195181.post-3381824268656113712009-03-05T18:43:00.004-07:002009-03-05T18:52:39.496-07:00A Marathon of Milestones<p>Well, not really. However, since the last time I updated I've completed <strong>Milestones 4</strong> through <strong>Milestone 6</strong>.</p><p>After an analysis of a number of click-match games I modified <strong>Milestone 7</strong> to be:</p><p>(7) Refill empty hex grid cells with randomly colored tiles.</p><p>Changing <strong>Milestone 7</strong> in this manner has meant I needed to go back through an reqork how some of my code works, but generally I haven't had to code up anything extra.</p><p>I'm right in the middle of making some adjustments to the code to get everything to work correctly, but I expect to begin work on <strong>Milestone 8</strong> this evening.</p><p>This project is progressing very quickly compared to earlier ones. It's only been about three weeks since I started working on it in earnest. Barring employment, I should be done with it by the end of next week.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-27885671336137655132009-02-28T23:52:00.003-07:002009-02-28T23:58:52.094-07:00HTML 5 Draft Released<p>Apparently, the working draft for HTML 5 was released on Feb. 12th. I've very excited about the introduction of a 2D drawing API which can be used with the new canvas element.</p><p>I don't know for sure, but it sounds like you'll be able to use scripts to assemble drawings on pages. I don't know how to do this (or if it's even possible) using HTML 4. It'll be durned cool to be able to do it.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-54577836211174862972009-02-28T11:24:00.009-07:002009-03-08T08:20:44.794-07:00Bejeweled<img style="float: right; margin:0px 0px 10px 15px; border-style: solid; border-width: 5px; border-color: #C0C0C0;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglY7BA_2hkcj2JRnGBbQ8d27cdROZpRruoZaLqV8eAbCkhl52nayXyBb6aJDflaolvX44Upw6MhzjFRFP4QxsrHoVJUigyVrisXdhoL9R-o9FfvTGPKz1y8KIBYJyO7g9qXRgh/s400/jewel.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5307918594084417970" /><p>This <i>somewhat</i> popular flash based casual game is described under the schema laid out in an earlier post as follows:</p><ul><li><strong>Game Condition:</strong> Game Condition (ends) is met when a player cannot make any legal moves.</li><li><strong>Level Condition:</strong> Level Condition (end current & load next) is met when the player's score reaches the maximum for that level.</li><li><strong>Score Condition:</strong> The player's score increments up when a player succesfully assembles a group of three or more similarly colored tiles or when the player triggers the level condition.</li><li><strong>Movement Mode: </strong>The player moves tiles around the board by swapping two that are adjacent.</li><li><strong>Movement Conditions: </strong>The player can only swap tiles if a minimum of one tile involved in the swap creates a group of three or more similarly colored tiles.</li><li><strong>Power Ups: </strong>The player is granted power ups when four or more groupings of similarly colored tiles are created.</li><li><strong>Flavor: </strong>Shiny gems on a cartesian grid play surface.</li></ul>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-90242761901252443192009-02-26T10:39:00.005-07:002009-02-28T11:19:53.948-07:00Click . . . Match . . . Power Up!!!<p>On Tuesday morning I went through and played a number of different click match games with the hope that doing so would help me to sharpen up my concept for "Beer Pong.</p><p>On the one hand, I don't think I've seen a "Click-Match" game that used a hex-grid before. I want to take full advantage of what could be a novel play experience. On the other hand, Beer Pong isn't supposed to be a full fledged product. Its intent is to provide me with enough practic with Javascript to get me to the point where I can comfortably say "I know Javascript" in an interview and keep a straight face.</p><p>Looking at "Click-Match" games, it seems like they can be described using a couple of pretty basic descriptors. Mind you, I've only played a couple of different games so far, so this break-down is most likely utterlly incomplete.</p><h3>What CM Games Have In Common</h3><ul><li>In every case, there are multiple discrete objects (the tiles) that are contained within the playspace of a CM game.</li><li>The most important thing in a CM game is the relationship of these tiles to one another.</li><li>A player's manipulation of these tiles within the context of these relationships is the heart of a CM game.</li></ul><h3>How CM Games Tend To Differ</h3><ul><li><strong>Game Condition -</strong> This what determines when a game ends.</li><li><strong>Level Condition -</strong> This is what determines when a level in the game ends.</li><li><strong>Score Condition -</strong> This is what determines when points in a game are scored.</li><li><strong>Movement Mode -</strong> How the player manipulates the position of tiles within the game space.</li><li><strong>Movement Conditions -</strong> Restrictions placed on the movement of tiles within the play space.</li><li><strong>Power Ups -</strong> Instances where the player is able to flout the normal conditions imposed on the game.</li><li><strong>Flavor -</strong>The visual and audio interface bolted onto the game mechanics.</li></ul><p>I'll talk about some of the different games specifically in my next post. For now, I need to get back to work on "<strong>Beer Pong</strong>."helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-47907429059620150022009-02-25T01:03:00.003-07:002009-02-25T01:18:38.610-07:00Oops, I Milestone 7'dWell, only a little bit.<br /><br />Late last night I coded up the bit that fills in empty hex's closest to the center with randomly colored tiles. The time interval between block placement doesn't scale with score, but that's only because I haven't coded in any sort of way to keep score.<br /><br />I got to thinking about Milestone 5. Working up the code to generate and place the hex cells was tough and so was the code to allow for click-swapping. But the code for pattern matching? That's gonna take the cake. Before I dive into what will likely be the gnarliest part of this project, I need to make durned sure that I know how I want this game to work.<br /><br />With that in mind, I spent a couple of hours this morning reaquainting myself with a bunch of different click-match games. It's getting late so I'll go into the analysis tomorrow. Besides, I need to think about it a bit more.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-32422093847930001222009-02-23T18:30:00.010-07:002009-02-23T19:58:22.642-07:00You Can't Go To Oregon And Then Leave California<p style="margin: 0px"><b>Milestone 4</b> has been achieved. Click <a href="http://www.strombolicusrex.com/beer_pong/clickable_bp.html">here</a> to see what project Beer Pong currently looks like. Click on a hex to select it. Click on a hex adjacent to the selected hex to swap them.</p><br /><p style="margin: 0px">I thought I was going to be able to use the hex-coordinate system I developed in <b>Milestone 1</b> to calculate the id's of adjacent hex's. Shockingly, I ended up running into an unexpected problem.</p><br /><p style="margin: 0px">It turns out that while creating the hex-grid and placing tiles is easier with the ijk coordinate system, finding adjacent tiles becomes devilishly tricky. Ironically, the problem with using the Cartesian coordinate system was that placing the tiles was really difficult but finding adjacent tiles was easy.</p><br /><p style="margin: 0px">Luckily for me, in <b>Milestone 2</b> I had developed a method to convert between hex-coordinates and Cartesian coordinates. I was able to use that conversion method to easily find adjacent hex's.</p><br /><p style="margin: 0px">While working on this Milestone I ran across yet another bit of quirky Javascript behavior. Javascript can generate events that call functions stored in the portion of the the html document. They look like the following:</p><br /><p style="background: #C0C0C0; padding: 5px; margin-top: 0px; margin-bottom: 0px; margin-left 10px; FONT-FAMILY: courier">img src="foo.png" onmouseout="out_foo()" onmousein="in_foo()<br />onclick="click_foo()" /</p><br /><p style="margin: 0px">When the cursor passes over a hex, <i>in_foo()</i> gets called and makes the border appear. When the cursor passes out of the hex, <i>out_foo()</i> gets called and makes the border disappear. When a hex gets clicked, other stuff happens (contained within <i>click_foo()</i>) that causes the border to stick around when the cursor leaves the hex, maybe disappear on other hexes and maybe swap places with adjacent selected tiles.<br /><p style="margin: 0px">Here's where the behavior gets quirky (though in thinking about it while writing this post, it's really not THAT quirky):</p><br /><div style="margin-left: 10px; margin-top: 0px; margin-bottom: 0px; background: #C0C0C0;"><br /><ul style="margin: 0px;"><br /><li>Tile gre_0_1_2 is a green hex tile at ijk coordinate (0,1,2).</li><br /><li>Tile pur_1_1_2 is a purple hex tile at ijk coordinate (1,1,2).</li><br /><li>These two tiles are adjacent.</li><br /><li>Tile pur_1_1_2 was the last tile clicked and remains highlighted even though I've moused out of it.</li><br /><li>I mouse into gre_0_1_2 and the tile becomes highlighted.</li><br /><li>I click gre_o_1_2 and the two highlighted tiles are swapped.</li><br /><li>Both gre_012 and pur_112 become hidden, as do the borders around both tiles.</li><br /><li>Tiles pur_012 and gre_112 become visible and the border around pur_012 becomes visible.</li><br /><li>When I mouse out of pur_012 the border should remain on because it was the last one clicked.</li><br /><li>However, when I mouse out of the hex, the border becomes hidden.</li><br /></ul><br /></div><br /><p style="margin: 0px";>I had to fiddle fart around to figure out what was going on, but I eventually managed to do it and code up a simple workaround.</p><br /><p style="margin: 0px";>In layman's terms, once you enter the State of Oregon you cannot leave any other state until you've first left the State of Oregon, unless you enter a state that happens to be entirely contained within the borders of the State of Oregon. So really, not THAT quirky. Basically, once you mouse into an element, you can't mouse out of any other element until you've moused out of the first one or moused into something else.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-46565485381190684642009-02-22T20:57:00.004-07:002009-02-22T21:08:54.654-07:00I Think I Need To Have My OS ReinstalledA guy I met on the tubes (a rather cute one from Florida with a boyfriend in Spokane) was telling me the other day that he had confused me with my ex (Scottland) after he saw a picture of the two of us "standing in front of a rock." I think he meant the pictures of us from when we visited Natural Bridge in Virginia while back east at Bob's wedding.<br /><br />This conversation spurred me to go back and read some of my entry's from years past. In particular, I dwelt on those written during the six months of self-abuse known as "two quarters at the UC Davis department of Chemical Engineering." It was interesting, reading those posts. I could really tell how much I hated graduate school and what a number it was doing on me.<br /><br />That being said, it felt like my posts back then were funnier, even when I was bitching about how over my head it felt like the still rising waters were. It was like I had more of a sense of humor. Maybe the last year has been tougher on me than I really give myself credit for. I mean, it's been hard dealing with the Avalanche of Dooms, but I'd always assumed that it hadn't really changed me. Maybe it has.<br /><br />Oh, and "Hi" Suzanne. You're like, the only person that reads this blog anymore. Do you have an RSS feed set-up or did you just happen to blunder into that post on switch statements right after I put it up?helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com1tag:blogger.com,1999:blog-8195181.post-24504039856495828992009-02-19T22:06:00.005-07:002009-02-23T19:59:43.066-07:00Beer Pong MilestonesSo I've been thinking about (and organizing) my new coding project in terms of 'milestones.' Essentially, these are major bits of functionality that need to be developed in order for the project to have a chance of being succesfully completed. So far, the milestone list is as follows:<br /><br /><span style="color:#33cc00;">(1) Generate and store data that describes a regular hex grid of tiles in terms of variables that will be important to the game.</span><br /><span style="color:#33cc00;">(2) Use the data from milestone 1 to display a static hex grid of correctly colored and positioned tiles.</span><br /><span style="color:#33cc00;">(3) Code in the ability to change the change the color of the tiles without reloading the page.</span><br /><span style="color:#33cc00;">(4) Allow adjacent tiles to be swapped by clicking them.</span><br />(5) Be able to see groupings of three or more colored tiles.<br />(6) Have empty cells in inner rings back fill with tiles from outer rings that are in cells along a line passing through the center of the board and the empty cell being filled.<br />(7) Place a randomly colored tile in the innermost empty cell at an interval that decreases as the player's score increases.<br />(8) Fashion a more aesthetically pleasing and functional interface for the game.<br /><br />Milestone 8 is probably a good deal more complicated than a single milestone should be. Oh well.<br /><br />So far, I've completed milestones 1-3. You can see the results of Milestone 3 <a href="http://www.strombolicusrex.com/beer_pong/beer_pong.html">here</a>.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-31096005095440074752009-02-19T13:02:00.002-07:002009-02-19T13:08:32.815-07:00Critical Note To SelfWhen translating from pseudo-code to actual code, don't forget to add in the "break;" statements at the end of switch/case code blocks that you left out of the pseudo-code because their presence was "obvious." Doing this can cause unexpected behavior in your code.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com1tag:blogger.com,1999:blog-8195181.post-68814241503895875062009-02-18T10:49:00.002-07:002009-02-18T11:02:44.236-07:00Project Beer PongThis is the name I've assigned to my next exciting foray into game development. Here are the details so far:<br /><ul><li>Beer Pong will be a click management style casual game.</li><li>The game will be played on a polar coordinate grid.</li><li>The player will move tiles around the board by swapping the contents of two adjacent cells.</li><li>When three or more tiles of the same color are adjacent, they will be removed from the board.</li><li>Once tiles are removed, infilling (if appropriate) will occur.</li><li>At game start, every cell on the board will be empty.<br />A new tile of random color will be inserted into an empty cell nearest to the center of the board after an interval.</li><li>As the game progresses, the interval length between new tile insertion will decrease.</li><li>The game will end when every cell on the board is full.</li><li>Logged in users will be able to start a game at levels higher than 1.</li><li>The game will have a leaderboard where high scores and highest level completed will be posted.</li><li>The theming of the game will in some way be related to beer.</li></ul>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-42978338233699414872009-02-13T11:12:00.003-07:002009-02-13T11:21:01.103-07:00Thinking In HexI completed my <span class="blsp-spelling-error" id="SPELLING_ERROR_0">substr</span>("LAMP",2,2) project earlier this week and sent out an email to everyone I thought might be interested in seeing it. The comments so far have been positive and in particular the two <span class="blsp-spelling-error" id="SPELLING_ERROR_1">techie's</span> that have looked at it so far have had complimentary things to say.<br /><br />My next project is going to be to create a "click management" game entirely in javascript. The end goal here is to get to where I can use AJAX and javascript is a big part of that. Also, I wanted to make a real game. The earlier project (S.Rex War) wasn't really a game.<br /><br />So, the concept for this new project is going to be a "click-3" game with one twist. Most click-3 games I've seen have been done with a basic x-y coordinate system. I'm going to attempt to make a minor variation on the concept and have it play off of a hex grid.<br /><br />So far, I've been focusing on fleshing out what the overall code will look like. My experience with the "Cryptic Rotating Block Test" reinforced the idea that you should plan before getting into the actual coding.<br /><br />The most difficult problem so far has been trying to figure out how to easily represent a hex grid using a <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">Cartesian</span> coordinate system. It's been a real pain but I think I finally have a pretty nifty solution. Oddly enough, I've seen this solution before and it very much reminds me of a three-component phase equilibrium diagram.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-21877023073312423142009-02-10T09:34:00.002-07:002009-02-10T09:48:51.589-07:00Geithner's SpeechMuch of what the treasury secretary said sounded good, but without concrete details and an unfortunate preponderance of the phrase "in the coming weeks" it's hard to say how good the proposals really are.<br /><br />I did note one rather depressing statement on <span class="blsp-spelling-error" id="SPELLING_ERROR_0">Geithner's</span> part. Towards the end he goes on for a bit, talking about how there will stops and starts in the progress of repairing the financial system. That there will be experimentation and times when ideas fail and need to be jettisoned.<br /><br />What he didn't say, but what's pretty clear from reading between the lines, is that the Obama Administration expects this crisis to stick with us for quite some time.<br /><br />So yeah, we should probably start thinking of a name for what we're going to call this thing we're going to be living in. Great Depression 2 isn't very evocative. Whatever we do end up calling it, it's likely to be the central aspect of all of our lives for the next few years.<br /><br />Personally, I'm most interested in how the financial system is going to be reformed. Regardless of how well we manage to arrest the crisis, we cannot have true long term recovery without making sure that the systemic flaws inherent in the old system are repaired.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-65725424013067443032008-12-09T18:47:00.003-07:002008-12-09T18:52:31.087-07:00A Monster Of An SQL QuerySo i'm in the middle of working on a web project. At some point I'll be switching over to using home brewed blogging software on my main website and I'll eventually figure out how to cross-post to here or something. Whatever.<br /><br />My point is that I've been sharpening up my SQL skills. Today, over the course of about five hours I taught myself how to make the following SQL query. What does this sucker do? It let's me take three different tables from my database, grab values from all of them and then sum up some of them but not others.<br /><br />What's the context? It's the main query I needed to figure out how to write in order to get the Leaderboard for S.Rex War to work the way I envisioned. Yes that's a rather mysterious comment. If I had coded up the blog-lite software I could be blogging this as I go along. Maybe I'll do that tomorrow. It shouldn't take me very long at all to do.<br /><br /><blockquote>SELECT FullName, Wins, Losses, Games, (Wins/Games) AS Ratio, UserJoinDate FROM (SELECT CONCAT(User.FirstName, " ", User.LastName) AS FullName, SUM(IF(STRCMP(Game.GameStatus,'1'), 0, 1)) AS Wins, SUM(IF(STRCMP(Game.GameStatus,'2'), 0, 1)) AS Losses, SUM(1) AS Games, UserAction.ActionDate As UserJoinDate FROM User INNER JOIN Game ON User.UserKey=Game.UserKey INNER JOIN UserAction ON User.UserKey=UserAction.UserKey WHERE UserAction.ActionType='Create' GROUP BY User.UserKey) AS LeaderBoard</blockquote>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-57990895247125651622008-09-29T13:34:00.003-07:002008-09-29T13:51:35.332-07:00Sunny Weather Makes An EncoreI spent the glorious weather yesterday doing some much needed long term work on the back of the house. I ripped up a BUNCH of sod to expand the size of the beds along the northern fence line. With the added square footage I'll be able to move a bunch of plants to the new space and re-arrange things to make the whole yard easier to maintain. I'll also be increasing the space I'm devoting to gardening by at least a third and I can now pretty reliably grow tomatoes, onions, garlic and spinach. I'll be experimenting with Swiss Chard this month (and anything else that doesn't mind being planted in October.)<br /><br />I also harvested my onions and tomatoes. The onions this year were a bust as I expected, though I did pull ten pounds. The upside is that what I pulled will become the starters for next year's crop. So, they'll be going BACK into the ground in a couple of days, along with some some seeds I'll be planting just to see how growing onions from seed works.<br /><br />I had expected the tomatoes to be something of a disappointment on account of the wonky weather we've had all year. Surprisingly, I had a fairly reasonable harvest of 15 pounds of red tomatoes and 10 pounds of green tomatoes. The red tomatoes are already mellowing their way into red sauce on my stove top. I'm going to try and turn the greens into tomato relish or something.<br /><br />So, in the end I got about the same poundage (25 lbs. vs. 30 lbs.) of tomatoes from eight plants as I got from six healthy and three "blossom rot" afflicted plants last year. Of course, 2/5 of this year's poundage is in the form of green tomatoes so technically my yield was a lot lower. It all depends on whether or not I can transform the greens into something useful.<br /><br />Next year I'll be going back to real tomato cages and giving the plants more room. Something on the order of two square feet per plant. I suspect I'll get much higher yields doing it this way. I still need to figure out how to handle Roma's growth tendencies. It seems like a combination of pruning and vertical support is key.<br /><br />As for the "blossom rot" there's no sign of it this year. I don't really know what made the difference. I have started amending the soil with Gypsum to provide additional calcium and that could have helped. It's also entirely possible that some random factor that caused the blossom rot last year didn't happen this year.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-29527490736912625662008-05-02T09:03:00.005-07:002008-05-02T12:43:15.127-07:00Aspartame Kills With Sweet Seduction!!<span style="font-weight: bold;">The Backstory</span><br /><br />The author of a blog I read recently published a post where he wrote about his Diet Dr. Pepper addiction (a monkey that I too carry on my back) and his concerns about Aspartame poisoning. Apparently, a well meaning friend told him about the internet controversy related to whether or not the methanol generated when Aspartame breaks down is toxic.<br /><br /><span style="font-weight: bold;">The Preface</span><br /><br />My initial response when I come across references to one of the many internet hysterias scuttling about the Tubes is to scoff and click on. There's so much innuendo, rumor and distorted argument out there in the Tubes that finding dependable information is well nigh impossible unless you already have a good sense of what the correct answer looks like.<br /><br />Every now and then, one of these rumors pops up in a locale that's "close enough" to me that I feel comfortable (and maybe even a little obligated) to put together a well thought out counter argument. Of course, when you do that, you always run the risk of offending someone. That's why I always try very hard to not affect the "everyone else is retarded" attitude that seems to infest a lot of the Tubes. Honestly, there are an enormous number of wildly varying opinions and it can be very difficult at times to figure out who's telling the truth.<br /><br /><span style="font-weight: bold;">The Reference Materials</span><br /><br />Much of this information is gathered into a single source on <a href="http://www.snopes.com/medical/toxins/aspartame.asp">Snopes</a>. The first bit of the Snopes page contains that chain email that was the "seed" material for the urban legend.<br /><br />Then there's links to rebuttals. My preference is the link to a <a href="http://www.aspartame.net/rumors/Aspartame_and_the_Internet.asp">letter published in The Lancet</a>, as its a VERY prestigious medical journal, contains a good bit of technical information and address the actual Tubes related controversy to an extent.<br /><br />I also relied fairly heavily on some pages on Wikipedia. While "tube-a-pedia" can often be a powerful source for disinformation, it can also be accurate and in the instances I used it for, I think it is.<br /><br /><span style="font-weight: bold;">The Analysis</span><br /><br /><a href="http://en.wikipedia.org/wiki/Aspartame">Aspartame</a> is made of two amino acids (<a href="http://en.wikipedia.org/wiki/Phenylalanine">Phenylalanine</a> and <a href="http://en.wikipedia.org/wiki/Aspartate">Aspartic Acid</a>) that are held together by a "methyl ester" bond. When ingested, Aspartame is split into its constituent amino acids and a methanol molecule is released. The reaction looks like this:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGjlwdZc7p0DFcT_KED1-c62sZ69oEnWCxE9iThmulVmtO7ImO3OhpJaOa5L9aAIVOglXb69XxKIrgHxKIHFkqW3JgvR24LGJaKGtS-fUddwl25XXpmJLfHKM5faNuzxJJuP0M/s1600-h/chemical_reaction.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGjlwdZc7p0DFcT_KED1-c62sZ69oEnWCxE9iThmulVmtO7ImO3OhpJaOa5L9aAIVOglXb69XxKIrgHxKIHFkqW3JgvR24LGJaKGtS-fUddwl25XXpmJLfHKM5faNuzxJJuP0M/s400/chemical_reaction.jpg" alt="" id="BLOGGER_PHOTO_ID_5195855299772121666" border="0" /></a><br /><br />Near as I can tell from a quick perusal of tube-info is that, when in solution, Aspartame is an inherently unstable molecule and the "hydrolysis" reaction is going to happen no matter what.<br /><br />However, how <span style="font-weight: bold;">quickly</span> this reaction occurs is a function of both the acidity and the temperature of the environment.<br /><br />In a very acidic environment (like a can of diet soda) the molecule is fairly stable and thus useable as a consumer product.<br /><br />In a neutral environment (like your intestines once your stomach acid's been neutralized or your blood) the molecule is a lot less stable. So, once ingested, it's pretty good bet that some, if not all, of the Aspartame is gonna break down.<br /><br />So then, we're left with methanol, phenylalanine and aspartic acid. All of these are going to get absorbed into the blood stream and either excreted via the kidneys, metabolized by the body and excreted or (gasp!!) incorporated into your bodies genetic structure!!!<br /><br />"How is this possible and will I develop mutant powers?", you ask? Well no, because you see, Phenylalanine and Aspartic Acid are both amino acids. Amino acids are the molecules your body uses to make proteins, your DNA and neurotransmitters. So, ingestion of these materials is not inherently bad.<br /><br />In some cases, the ingestion of a specific amino acid can be harmful if your body lacks the ability to metabolize excess molecules of that type. In the specific case of Phenylalanine, some people cannot metabolize it because their body lacks the necessary enzyme thanks to an inherited genetic defect.<br /><br />This is a specific metabolic disease and does not mean that any concentration of phenylalanine in the blood is bad. Rather, it is a persistently elevated concentration of phenylalanine in the blood that can cause brain damage.<br /><br />Then there's the issue of the quantity of these molecules generated by ingesting a can of diet soda. I'm just going to directly quote the letter here:<br /><blockquote>Although a 330 ml can of aspartame-sweetened soft drink will yield about 20 mg methanol, an equivalent volume of fruit juice produces 40 mg methanol, and an alcoholic beverage about 60-100 mg.<br /><br />The yield of phenylalanine is about 100 mg for a can of diet soft drink, compared with 300 mg for an egg, 500 mg for a glass of milk, and 900 mg for a large hamburger (1).<br /><br />Thus, the amount of phenylalanine or methanol ingested from consumption of aspartame is trivial, compared with other dietary sources.<br /><br />Clinical studies have shown no evidence of toxic effects and no increase in plasma concentrations of methanol, formic acid, or phenylalanine with daily consumption of 50 mg/kg aspartame (equivalent to 17 cans of diet soft drink daily for a 70 kg adult)</blockquote>Personally, I find the last sentence the most illuminating. The clinical studies they're talking about aren't rocket science. If consuming 50 mg/kg of aspartame caused elevated levels of methanol, formic acid or phenylalanine in the blood stream it would be DEAD SIMPLE to find out.<br /><br />A group of motivated <span style="font-weight: bold;">graduate students</span> could perform this study on themselves with nothing more than some syringes, basic biological laboratory glassware, a centrifuge, a high pressure liquid chromatograph and some college level knowledge.<br /><br /><span style="font-weight: bold;">The Conclusion</span><br /><br />So really, that's pretty much it. The idea that you're somehow poisoning yourself by ingesting diet soda sweetened with Aspartame is pretty far fetched.<br /><br />The potential liability its manufacturers and industrial users would be on the hook for if it did have toxic properties is vastly countered by the extreme ease with which a group of motivated individuals could <span style="font-weight: bold;">scientifically</span> prove the existence of these properties if they were, in fact, there. And believe me, there are a lot of motivated individuals out there with access to the actual resources needed.<br /><br />If you believe that a plausible case for conspiratorial cover-up can be made, then I have a friend in Nigeria with a business proposition I want you to meet.<br /><br />All this being said, there are a lot of arguments to be made against the consumption of highly processed foods like diet soda. These stem, however, from arguments related to simplicity and the consumption of limited resources. If a caffeine fix is what you need, then there are better ways to go about getting that fix than a can of Diet Dr. Pepper.helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com2tag:blogger.com,1999:blog-8195181.post-89786420251577862512008-03-07T18:27:00.006-07:002008-03-07T18:40:16.508-07:00Time Is NOT Money<p>Interesting editorial in the NY Times today (that I don't have to pay to see!!) about the obsession with time and not spending it wisely enough. Oddly enough this happened to dovetail perfectly with a chart I was throwing together using my Excel-Fu to visually demonstrate to my poor beleaguered honey that Daylight Savings Time does In Fact, save energy. He's promised to stop complaining about it if I can prove that it does what it claims to do.<br /></p><p>Here's the chart:<br /></p><p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i162.photobucket.com/albums/t276/helium3/Daylight_Savings_Time.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://i162.photobucket.com/albums/t276/helium3/Daylight_Savings_Time.jpg" alt="" border="0" /></a></p><br /><p><br /></p><p><br /></p><p><br /></p><p>Yes there are all sorts of caveats you can use to explain why you as an individual might not save more energy under this scheme, but when you're dealing with the averaged effects of hundreds of millions (if not over a billion) people the savings can add up.</p><br /><p>And here's a <a href="http://www.nytimes.com/2008/03/07/opinion/07klein.html?_r=1&oref=slogin">link</a> to the article.</p>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0tag:blogger.com,1999:blog-8195181.post-14518594609949783592007-12-13T21:47:00.000-07:002008-01-01T14:37:23.402-07:00"What Is That Noise?!?!"The day after Dollywood, we drove back to Warrenton and spent another night at sister Lynn's place. That evening, we went to Lynn's daughter's middle school band concert.<br /><br />As usual, the 6th grade band performance was a feast for the ears!!!<br /><br />Elizabeth (Lynn's daughter) was in the 8th grade band and they did considerably better.<br /><br /><a href="http://www.youtube.com/watch?v=HTJYUaBXFCo">It Burns!!</a>helium3http://www.blogger.com/profile/00144170825892336166noreply@blogger.com0