Sunday, 21 June 2009

Mc Luxury


So I can't help being awake at 7am... why not get some exercise? Hey, I could blade down to McD's and get some bfast too! Feeding two birds with one egg biscuit, as it were.

There are three Mc'Ds equidistant from me. One is to the right, about a mile down, on is a few blocks past Oren's (right turn, right turn), and still another is also a mile away, but straight to the left. All three are unlike any McD's I've ever seen. The Camby location was pretty nice, and even had free WiFi, but these... are like restaurants. Warm dark hues have replaced the kiddy yellow, soft, abstract paintings cover the walls, slow curves replaced the straight lines, little barriers with glass windows that rise near to the ceiling help to really add a sense of separate rooms with awesome fung-shuai, and soft, plush seats have replaced the hard plastic. Here's some more images:



It's not your childhood McDonald's... it's grown up... like me. Or not, since I'm the only one I've ever seen in McD's rolling around on inline skates, posing as the spitting image of the girl in blades who used to adorn their cups. Maybe there is something to that advertising thing...

Anyway, figuring that the left McD's keeps me on the sidewalks the whole way there, I go with that option.

Lots of people have wondered what death looks like. I was holding hands with him the entire time on the way there. Death looks like pretty, shiny metal boxes cruising along an 8-lane road (sometimes a 4-lane each way boulavard) at 50+ miles an hour. Vegas was never about being for the faint-hearted. One small trip on the sidewalk could send me toppling into oncomming traffic.

These thoughts are in my mind as I'm working my way to McD's, but fear not gentle reader, for I'm quite comfortable on wheels. I can even do like, tricks and stuff. So don't worry. I'll drive everywhere once the car is back from the shop.

Did I mention Vegas is flat? The roads are laid out mostly in a grid system, meaning that if you stand in the middle of one, you can see all the way to mountains on each side. In all directions if you stand in the middle of an intersection (which I don't advise, but instead, swing your head round 360 while in the passenger seat)!

But... I'm working harder than I expected; about a quarter mile in, I'm wondering why it's so hard? I feel like I'm going uphill; I can't get any momentum going. I look behind me: flat. I look in front of me: flat. Hmm... maybe my wheels are gunked up? I keep going. I figure it's for the best, as this is new terrain and although Vegas is reknown (to me) for having rollerblade-able sidewalks with no bumps, one can never be too careful!

Half-way in... I'm breathing harder and in danger of breaking a sweat. I look behind me again: flat. I study in front again: flat. I press on.

Finally I arrive at McD's breathing as if I had just jaunted up 4 flights of stairs. Not panting, but unable to keep a conversation going with occasional gasps for air. Just in time too; I could feel moisture on my skin evaporating (cause it's cold - the body's natural cooling system works in spades here). I didn't expect to sweat for moving so slowly. I look behind one more time: flat as a pancake.

Inside I get my food and notice a newspaper lying on a table. Awesome! When I pick it up, it feels like there's something heavy inside. It's a magazine titled, "Luxury Las Vegas" and has a photo of a personal jet by Icon, about the size of a Geo Metro on the front, laid out in grays and blacks. A boy-toy mag, I figure, but what the hey, let's see what's inside.

Inside was ... luxury. (online version) Multi-million dollar homes, expensive jewelery, and sexy cars adorn every page. And then... there's an interview with Annie Duke. A role-model for the poker world if there ever was one. She's a pretty amazing woman and I can't help but feel a connection with her, as if she was a sister living out my dream, challenging me to rise up and inspire even more.

She's raised millions for aid to Africa. I just donated $0.19 to the Ronald McDonald house. Hmm...

Her biggest regret is leaving school just before getting her PhD, mine was coming back (from a year of playing poker) and finishing. Hmm...

She's one of the most well-known, respected, and professional players in the world. I'm one of the most unknown. Hmm...

Her two weaknesses are having an overdeveloped sense of fairness and suffering fools poorly. She's working on both these things late in life. Well, at least we have that in common!

Oh, and she teaches too! We both thought we'd be college professors by now. LOL!

Her commitment to charity is quite inspiring, and I have only dreamed of being able to do the kind of work she does, both in life and in poker.

She also thinks poker is a great tool for learning to deal with life. Suddenly I feel vindicated for teaching my discrete math students how to play poker! Even though they got higher grades than any class before I taught it, people still looked at me with that, "what are you doing, teaching kids poker and bookie odds?" look. Now I can say, I was teaching them about the lottery so they could make proper life decisions... just like Annie does!

I keep reading... more stunningly beautiful homes greet my eyes. More pretty cars. I flip back to the front and notice the editor is a woman. Hmm... then I notice on the front cover, at the top, "CAUTION > > > > > THIS ISSUE IS TESTOSTERONE-INJECTED." I nearly snort out my diet coke. One could say that of nearly half the women here, fresh off a Saturday night.

I wonder if I should feel bad for thinking about sex while sitting in the McD's playground area. I notice it has a built in Dance, Dance, Revolution machine. That's awesome! I'd be on it were I not on blades. It also had a pop-a-shot and a few other toys along with a colossally huge (even to an adult) climbing thing with all sorts of tubes, nets, baskets, windows, and perches. My mind temporally overloads. How did I get in the kids section again? Oh yeah, all the old people were looking at me funny in the grown up section, and there weren't any empty booths.

It's time to go, and here's the funny part. From the moment I stepped out of McDs I did not make one stride. My wheels instantly started rolling towards home, sometimes with such velocity I was forced to use the foot brake (something I don't often use). I make it all the way home, right to the steps upstairs, a mile away, without making ONE stride! Hmm...

Saturday, 20 June 2009

Making Drupal Your Bitch

I suspect no-one will read this post entirely unless they get here from some random Google search looking for help with Drupal. A shame, to be sure, but not unlike the thousands of lines of beautiful code poetry I've written no one will look at. Probably not unlike the rest of these post either. Still, I'mma gonna write it and call it the first page of my Drupal tutorials.

Now it's no secret that I'm building a CMS from scratch. Heck, some of you are even using the first production version of it! Well, clients have demanded feature sets faster than I can build them in the normal course of development, so in an effort to work smarter, not harder, for those few clients who wanted the moon for cheese, I turned to an off-the-shelf CMS, Drupal. IMHO, it's the best thing out there, but it's still incredibly bloated and needlessly complicated. It pains me to use Drupal for those reasons, but that said, it's still the best thing out there - for now.

So once you get Drupal installed you'll need to enable the modules you want. Don't bother configuring your site yet; we're not done installing. Most of the core modules are useful, but only enable the ones you are actually using - the more you have, the slower your site is. With today's technology even. Warned you the code was bloated and inefficient!

Now you'll need to install a whole host of 3rd party add-on modules (and a template if you're not going to build one). Right, there's a lot that Drupal needs it don't come with. Everyone has their own list of must-have modules. My essential list (based on extensive meddling) looks like:
  • Administration menu 6.x-1.4
    You want this dropdown menu; should be core.
  • Image 6.x-1.0-alpha4
    Can't upload or otherwise use images without this.
  • ImageAPI 6.x-1.6 ImageAPI supporting multiple toolkits.
    Ditto
  • FCKeditor 6.x-1.3
    A WYSIWYG editor instead of plain text fields.
  • Image Browser 6.x-1.0-beta1
    An image browser/manager for use with FCK
  • Meta tags 6.x-1.0
    Why aren't keywords core?
  • Views 6.x-2.6
    Haven't used this powerful module yet, but modules above require it.
Getting all these modules installed is not that difficult, but FCK and the image browser are a bit tricky. Go to their homepages and read carefully. FCK requires two downloads/installs! Right, the one you get from Drupal.org is only 1/2 of it.

Oh yeah, if you're going to have clients (and not just you using the system) you'll definitely want to configure Drupal to serve multiple sites from one install directory. Read the manual carefully; it's not hard. In fact, creating a new site is one of the nicest features about Drupal, even though it still requires a command-line interface and a few Unix commands. I felt a wave of smugness pass over me since my system is all web-based. I let it go, Smug is one of the leading sources of air pollution.

Time to setup your CSS. To do this, you need to create what Drupal calls a theme. You'll find no end of schizophrenic (manual) pages about how best to do this. Take my advice. Use the blank slate template I wrote. It's simplified beyond Stark. However, if you're HTML-based instead of PHP-based you can use the Stark theme; it's just got a bit more divs than it ought to have, but it's no big deal; just copy it, and then edit as you wish.

Okay, so now you got a CMS enabled with (most of) the features you want/need. Now what?

Well one would hope that the entire CMS is customisable via an online interface to control not only what modules are active, but what data each module outputs along with the accompanying CSS to handle the layout. Unfortunately, this process only works for the simplest of modules, and it's never a customizable as you'll want. Breadcrumbs are a great example. You can't just click a checkbox and tell Drupal not to print the darn things. Instead, you have to edit code. Don't even get me started on the User Login box.

But since we don't want to edit the actual Drupal source (cause we'll lose it on system updates/upgrades) we instead have to copy the php file (called a template) that Drupal uses to figure out what to display. Hmm... we might have to redo changes anyway when the new templates change from the old. You'll find in my template a file called "page.tpl.php" which gets called on every page draw. If you were to make it blank, all your pages would be blank. Seems easy peasy, but finding the module's source code can be a pain until you get intimate with Drupal.

Now the templating scheme is fairly clever - you can be as specific or as general as you want, and Drupal follows rules for which template files it uses based on the content. It would be nice if each module had a template, but alas, that would make too much sense (and too much facism).

To override some types of Drupal output, you need to figure out which PHP funciton in the Drupal source code is outputting the content, and then override that function and figure out where to put it. Not an easy task at first, especially since all you want to do at this point is to build your website. This was supposed to be easy, right?

But you're a superstar, you've gotten this far, the rest is a cakewalk right? We just edit the template to layout our <divs> and then edit our custom CSS to take care of the display. In theory. You're going to need to be quite the expert if you expect to do any serious CSS. Why? Cause Drupal litters the CSS heirarchy with all kinds of unnecessary definitions that are hidden, until you're wondering why for example, your <li> elements, which you've explicitly and clearly marked up in the CSS to not have bullets, shows bullets anyway (but only on non-IE browsers). Oh yeah, don't forget to override the background with "background:transparent" or you're going to get weird images appearing in your lists too. See what I mean? Oh yeah, be sure to have a "border: 0px;" command for any tables you want unless you like having borders. Who does that? Ya gotta be familiar with just about all of CSS2 and even then, CSS that works in isolation will often fail when inside Drupal and you'll have to figure out exactly what (and where) Drupal is mucking up the CSS with non-standard or extra inherited definitions (which IE doesn't seem to respect).

Are we having fun yet?

Well don't forget, Drupal 5 did all of this differently from Drupal 6, as no doubt Drupal 7 does too, so just because you become an expert, don't worry about the joy of learning... you'll have to do all this over again when/if you upgrade/downgrade! Whoopee!!!

PS - about the cover image: if that kind of thing excites you, try starting here.

Friday, 19 June 2009

Measure your HQ

Here's one of Clio's hip-quotient tests:

What do these images mean?







You can find the answer by googling: "Green Dam Girl"

Thursday, 18 June 2009

Look Up

A cosmic smile for a cosmic family. That's Venus (where women are from) on the left and Mars (where men are from) on the right, with the moon (where people like me are from) inbetween them.

You want to be up around 3am-5am, just before sunrise (which is not long after moonrise) this Friday... you'll see all three celestial bodies right next to each other. Totally kewl. It's at times like this when I can really grok what it feels like to be on a molten ball of fire, circling a bigger ball of fire along with spheres of rocks and gasses, all the while spinnin' round, right round like a record baby.

There are stranger places than Vegas we call home!

Wednesday, 17 June 2009

Slime, Stunts, and Source (code)

Felt a little down today. Been doing an awful lot of work for little or no reward and though I try not to feel the stress of rent and phone payments, still, it is there. I did get $100 for a day's work, so Burger king wages for PhD work. Sigh...

I met with a guy who wanted a photo in response to my ad seeking a roommate. He wasn't too slimy, but my presence obviously made him and his friend uncomfortable. I didn't mind. :) We had a business meeting regarding poker. When I had spoken to him earlier, I mentioned the reason I was in Vegas (and why I wanted to stay close to the Strip - he wants a house in BFE). He mentioned that we would consider staking me for a world series event. Turns out, all he really wanted was an excuse to see me again. He wasn't serious about the offer, but figured I could be bought. I declined.

Oh, in good news, I did meet some teenagers yesterday. They were doing bike tricks out in the parking lot as slimy brought me home (car still in shop) and I was a receptive audience, so they did tricks for me! Later, I saw the same one (who has both ears pierced and has pretty big black spacers in his ears) sitting in a car with a girl and they were jamming out to some heavy metal sounding music. I zipped around the corner on rollerblades and when he saw me, his eyes lit up and he smiled wide at me, much to the chagrin of the girl with him in the car. Teehee. Once I got to the top of the stairs, where they could see me through the trees, they gave a glance upwards seemingly as if they expected me to express disapproval at the loud music. I held my middle and ring fingers pressed down with my thumb and gave them an encouraging few head bangs. They loved it! Tee hee. If they are out again, I might go out and do rollerblade tricks with them (yes, I'll get some protective gear! ... eventually)

Other than that, there has been little contact with humans, but that's fine, I'm preoccupied with (quickly) becoming an expert in Drupal. Yeehaw!

Tuesday, 16 June 2009

She Does the Maths

When I first studied poker, I read lots of books on poker written by the smartest people in the game I could find. I don't mean celebraty books, which the market is currently flooded with and are basically just glorified opinion pieces, I mean the people with Ph.Ds in mathematics who studied the game, the probabilities, and the strategies.

There are three such books I consider gold. Most people can't get through them for they do require a strong background in mathematics, like, major in college strong. Nevertheless, I keep them to myself because since most people haven't read them, that gives me an advantage.

However, one book that is well-known (but again, tricky material written by a PhD in maths) is Mason Malmouth's, "Gambling Theory and Other Topics." In it, he spells out the maths for poker, what one can expect in terms of fluctuations, bankroll requirements, and bluffing strategy. It's brilliant. I recently started re-reading my poker books and decided to do the maths for myself.

The result is a bit depressing.

Now I haven't yet recorded enough results from my playing sessions, so I approximated them based on my winnings last year. I came up with a win rate of $28.5/hr and a standard deviation of $305. Now you might think that with a positive win rate, you'll always make money, but that's where the standard deviation comes in. All my results should lie between three standard deviations. That means in any one session I could go home as much as a $1,000 winner or loser, despite having a positive win rate! (Of course statistics doesn't know I'll quit if I'm down more than $400.) The good news though, is that the deviation should go down the more data I collect, assuming my play is consistent.

Believe it or not, it you know your win rate and deviation, there's a forumula you can use to find out how long you need to play in order to guarantee a win! At a $28.5/hour win rate with a $305 standard deviation, I'll need to play for 1,032 hours to assure a win. Ouch! That's like, 1/2 a year of 40 hours/week!

And that's not the depressing part. Taking the derivitive of the above formula and solving for zero finds for you when you can be at your lowest. The lowest point in my bankroll (statistically speaking) can occur at the 258th hour, at which point I'll be $7,357 down.

In other words, to assure I'll never go broke, I'll need just over $7K.

But that's with incomplete data. Hopefully, these numbers will go down (except the win rate, which hopefully will go up!) as I record more sessions. Also, those numbers assume no risk. They go down considerably if say, I am willing to say, "How much money do I need for a 95% chance of never going broke?" then the number of hours required to win drops to five weeks and the bankroll needed to just under $2,000, which amazingly enough, is the amount I wanted to start with.

Math is kewl.

Monday, 15 June 2009

Muscle Memory

Unix aficionados, especially back in the day, fell into one of two camps, depending on which text editor they preferred: vi or emacs. Emacs was fancier in that it was programmable and customizable, while vi was simply a very powerful, but tersely obfuscated (or so I thought at the time), editor. I was a vi fan; never used emacs.

As I'm installing drupal, I find myself back in the Unix command line and I'm amazed at how quickly the fingers remember what's what.

I start the editor and view a large document file. Instantly, my fingers go to CTRL-d for page down (CTRL-U is page up). The fingers also remember h, j, k, and l, the commands to move the cursor left, up, down, and right respectively.

O inserts a line under the current line, $ moves me to the end of the current line, a appends at the current spot, and A appends at the end of the current line.

It's both bizarre and a testament to how efficiently vi's interface was that one can just re-remember these long forgotten commands. I was surprised to find it was just like riding a bike. VI was one of the hardest programs I learned how to use because it required you to become an expert user - or keep with you a list of VI commands like the one below.

By the way, if you're wondering the significance of the dog cartoon... that cartoon (from the New Yorker) was hanging on the door of the Unix system administrator's office during my tenure as an undergraduate at Ball State. I didn't search for it, it just came up, so there must be some cosmic relationship between it and VI.