THE LACK THEREOF

TLT

META INFORMATION: This is the technical blog and wiki of Brock Wilcox (awwaiid). Entries focus on my current projects, interests, and sometimes life events. If you'd like you can check out the list of All Entries or the RSS Feed. I also have a LiveJournal syndication feed for LJ friends.


2008.06.30 More Photo Goodness

I got another new camera! The last two didn't work out for very long, but this one has promise. I won it at our recent Corporate Bowling event... it was clearly my best score ever at 167. I got second place and thus the camera. Woot!

This first image is one of Sophia's flowers. Sophia is the rose bush that Beth got from my family in condolence of her appendectomy. After almost killing her (Sophia, that is), I've nursed her back to health and we've been rewarded with new blooms.

Other than random events and trips, one thing I'd like more photos of is my balcony garden. Time lapse or something fun. I sit there and stare at the thing enough... I may as well share the green joy with the world!

Lets see... what what other sorts of boring photos do people put on their blogs... CATS! I must have some of those somewhere around here...

0 Add Comment


2008.05.12 Tree Style Tabs

I've been using the Tree Style Tabs Firefox extension for a few months now, and love it! Having vertical tabs has always been fabulous, ever since I first encountered them in Galeon. The chrome-css hack that I have been using for the last few years in Firefox stopped working in Firefox 3 (beta), so I went exploring and am very glad I did.

Not only does the Tree Style Tabs extension give my my vertical tabs, it also gives me (surprise surprise) a tree of them! Each has it's own browsing history, and subtrees can be collapsed and reordered and all that wonderful goo.

Just now I was playing around with the settings and thought I'd try the auto-hide feature. I'm not sure I'll keep it because there is a slight flicker that bothers me... but it is neat none-the-less! The tab bar is hidden, and then when I mouse or keyboard activate it the bar appears translucently on top of the page. It might need some kinks worked out (or perhaps there is some other cause for the flickering), but I think I like it!

Highly recommended.

0 Add Comment


2008.03.30 Making Music

I love to create and build -- lately I've made a few songs! My friends like to play guitar and sing, and I play the harmonica and am learning guitar. So here are my recent creations (all with the help or in conjunction with friends):

Only the middle one has a recording posted so far, but I'll get recordings of the others sooner or later. More to come I hope :)

Comments on TLT - 2008.03.30 - Making Music

2 Comments.

He rised. , <a href="http://gay-porno.weebly.com/">porno gay slike</a>, [url="http://gay-porno.weebly.com/"]porno gay slike[/url], http://gay-porno.weebly.com/ porno gay slike, <a href="http://www.bumpzee.com/gay-bareback/">gay raw bareback</a>, [url="http://www.bumpzee.com/gay-bareback/"]gay raw bareback[/url], http://www.bumpzee.com/gay-bareback/ gay raw bareback, <a href="http://www.cleveland.com/forums/profile.ssf?nickname=ag8m4">gay tattooed bears</a>, [url="http://www.cleveland.com/forums/profile.ssf?nickname=ag8m4"]gay tattooed bears[/url], http://www.cleveland.com/forums/profile.ssf?nickname=ag8m4 gay tattooed bears, <a href="http://forums.vogue.com.au/member.php?u=82828">black gay blowjobs</a>, [url="http://forums.vogue.com.au/member.php?u=82828"]black gay blowjobs[/url], http://forums.vogue.com.au/member.php?u=82828 black gay blowjobs, <a href="http://www.silive.com/forums/profile.ssf?nickname=n8hn5">gay bondage videos</a>, [url="http://www.silive.com/forums/profile.ssf?nickname=n8hn5"]gay bondage videos[/url], http://www.silive.com/forums/profile.ssf?nickname=n8hn5 gay bondage videos,

-- Gartman6 2008-06-28 01:55 UTC


Extraordinarity: , <a href="http://www.cleveland.com/forums/profile.ssf?nickname=t8w8t">average penis size pictures</a>, [url="http://www.cleveland.com/forums/profile.ssf?nickname=t8w8t"]average penis size pictures[/url], http://www.cleveland.com/forums/profile.ssf?nickname=t8w8t average penis size pictures, <a href="http://freeiq.com/rimablue?fullbio=1">ebony teen boobs</a>, [url="http://freeiq.com/rimablue?fullbio=1"]ebony teen boobs[/url], http://freeiq.com/rimablue?fullbio=1 ebony teen boobs, <a href="http://www.epinions.com/user-or8c8o/show_~View_Profile">huge sexy boobs</a>, [url="http://www.epinions.com/user-or8c8o/show_~View_Profile"]huge sexy boobs[/url], http://www.epinions.com/user-or8c8o/show_~View_Profile huge sexy boobs,

-- Gartman6 2008-06-29 19:59 UTC

2 Add Comment


2008.01.02 Events vs Actions in UI Code

Happy New Year!

I've been grappling with a concept for a long time now (years), and thought I'd put it down here to cast about for insight.

Here is one way to handle UI events:

$page->add_action(add_new => 'Add New Entry');
$page->display; # displays template, waits for input
$action = $page->get_action;
if($action eq 'add_new') {
  add_new_entry();
}

Here is another:

$page->add_action('Add New Entry' => sub {
  add_new_entry();
});
$page->display; # displays template, waits for input, runs callbacks

The first is quite imperative. Show the page. Give me the result. Examine the result. Act. The second is much more declarative. I declare that were such an action to occur, this is what you should execute.

The second is the way that Seaside handles things. I'm not quite sure why I'm reluctant to adopt this method... perhaps simply my lack of experience with this construct is to blame. I think it's some sort of voice in the back of my head that doesn't like it because it is a bit too much like desktop GUI callbacks. But why should that be a bad thing? It seems to work just fine for those applications.

I think I'm thinking about this too much.

0 Add Comment


2007.11.30 MySQL Row Level Security

Tonight I am doing a bit of work on the EPFarms User Panel and Effin, our financial database. The Panel is a Continuity application running under FastCGI and suexec. The security model is different from most other web applications I've done, we use suexec to run the application as the individual Eggplant Farms user.

Philosophically, running the panel as the user is an extension of our overall security model, which is to build as directly upon the unix security model as we can. The interesting aspect of this is that, since the panel is running without any special privileges, the user could modify or replace the panel and still have all the same security access. They also have all the same access from the command line.

Sharing dynamic data with the user, such as their current account balance, is a bit tricky. We also need the ability for the user to modify some of their own metadata. Our current plan is to create command line tools that allow them user-specific access to our data, which is stored in MySQL.

Another way, the one that I'm going to switch to after tonight's research, is to utilize some new features of MySQL 5. We'll use views to emulate row-level security, and MySQL's own column-level security to allow them to directly read, and as appropriate write, to our database. Though it's always handy to have a command line interface, the extra intermediary was a bit cumbersome.

Here's how to do it.

Lets say we have a single userinfo table, which just holds their username, unix id, full name, and emergency contact info. And heck, let's insert a few rows.

create table userinfo (
  userinfo_id int primary key auto_increment,
  unixid int,
  username varchar(100),
  fullname varchar(100),
  contact varchar(100)
);

insert into userinfo set
  unixid = 1001,
  username = 'awwaiid',
  fullname = 'Brock',
  contact = 'a@b.org';

insert into userinfo set
  unixid = 1001,
  username = 'aardvarq',
  fullname = 'David',
  contact = 'x@y.org';

Now we create a view, limiting to the current logged in user with the USER() function.

create view userview_userinfo as
  select *
    from userinfo
   where username = SUBSTRING_INDEX(USER(),'@',1);

Finally we grant some access to user 'awwaiid' (though really we could grant access to '%' if we were so inclined).

grant select on userview_userinfo to 'awwaiid' 
grant update (fullname, contact) on userview_userinfo to 'awwaiid'

Now when I log in as awwaiid I have access to my own rows, and can update my full name and contact info. The panel application logs into the database as the user, accessing and editing their data in a much more direct fashion than the command-line-wrapper method.

Comments on TLT - 2007.11.30 - MySQL Row Level Security

1 Comment.

This is Grrrrreat!

- Tony the Tiger

-- Anonymous 2008-07-01 15:16 UTC

1 Add Comment


2007.10.16 Pittsburgh Perl Workshop Review

This last weekend was the 2007 Pittsburgh Perl Workshop, where I gave a talk on Continuity. Though it was my first Perl conference, going to other nerd events had prepared me for what it would be like. Even so I thought it was fantastic -- you just gotta love those Perl People!

I talked to several people about Continuity, so hopefully I'll be getting some regular users and feedback. I found a bug in the most recent release, and have decided to roll back the installer... so I need to get another release out there.

One fun thing is an improvement I made to the Continuity wiki - I got the wiki-to-darcs (both-way) gateway going. I knows specifically about POD rendering , so it looks good as a webpage. See the Continuity::Mapper page as an example. If you edit the page, the cnage actually gets checked into darcs and then I can choose to pull it into my main branch. I still need to create a cron job to keep it up-to-date, but otherwise it seems to work swimingly.

So now I don't have to have my documentation in two different places!

0 Add Comment


2007.10.05 Added Darcs RSS Feeds

I've cleaned up and expanded my RSS feeds a bit. So now I have three main feeds:

The first is a better URL for the feed of this blog. The second is a feed for the whole wiki (I'm probably the only one who cares about that one). The third... that's the fun one!

I took the darcs2rss script from the internets and made some slight modifications. Then I constructed a program that goes through my projects directory and looks for all of the Darcs repositories, generating a feed for each one. As a bonus, it also takes the most recent entries from all the individual projects and creates an ALL feed, which is the third feed above.

So subscribe to that feed and you'll be absurdly informed of what I'm up to, code-wise. For the feed of individual projects, look in http://thelackthereof.org/darcs-rss/feed/. On my TODO list is to make the feeds link to an online diff, as that seems like most human-friendly thing to do.

0 Add Comment


2007.08.24 Random Tips

Today while reading some random article I noticed someone doing

strace -p 12345

Which is to say, attach strace to the running process numbered 12345. So cool! I've always like strace, but apparently didn't take enough time to read the manger to learn this usage.


I'm slowly reading Meta Math! by Gregory Chaitin and am enjoying it very much. Today he proved that there cannot be a purely algorithmic way to prove a given program is as simplified as possible. From that a simple proof of the halting problem will follow, I believe. His writing is very enthusiastic and inspiring, drawing attention to some of the most fascinating parts of mathematics. Plus he loves to use exclamation marks! The tone reminds me of Feynman.

So here's the tip: don't try to find an algorithm to provably simplify any given program to it's most minimal form, because it won't work out very well. Stick with a heuristic approach.


A few days ago our apartment building's fire alarm went off before work. I decided that it might be a good exercise to take the kitties with us, even though the odds of it being a real fire rather than a false alarm were extremely low. After managing to shove Mia into the carrier we decided there was no way they'd both go in there. So I grabbed Miko and put her harness on and proceeded to carry her out into the hallway.

The blaring alarm in the hall wasn't the sort of thing that Miko wanted to be involved with, so when I stepped out with her in my arms I quickly learned how little control I actually had over her. It was like an invisible wall in my doorway that she refused to go beyond, and in this case it meant she had to go through me to get back inside. The scratches on my arm and neck are actually almost gone now, but the tip stands: if you are going to rescue a cat from a pretend fire, do your best to find a box to shove her in and try very hard to avoid carrying her out in a more direct fashion!


Your .vimrc file can have conditional sections based on environment variables, such as $HOSTNAME. With that in mind I've been able to create a unified .vimrc to use both at home and work. The only real difference is that at home I generally avoid all tabs, whereas at work tabs are the standard for indenting.

" Working at LSI ... they like tabs
if ($HOSTNAME == "wickedwitch")
  set sw=2                " Width to shift and indent things
  set ts=2                " Set tabsize to 2 (to view other people's crap) 
  set noet                " Use tabs. Even though tabs are the devil.
  match errorMsg /[^\t]\zs\t\+/
endif


When doing the T9word mode on cellphones the '1' key will do punctuation. Plus they often have smilies in their dictionary!


And finally a tip inspired by a recent Paul Graham essay.

When reading code you don't see all the pieces that were left out. Therefore, without knowledge of this non-present code, you will understand code you read less than code you write. This applies to creative mediums well beyond code.

0 Add Comment


2007.08.08 Hey... I Just Heard About That

The other day Liz showed me a new book that she got, Drawing on the Right Side of the Brain. Pretty interesting book discussing how to take what you see in the world and put it down on paper.

Then today O'Reilly sent me a link to their new website based off of their new book, Beautiful Code. I've looked at this book at Border's and want it... it seems really cool. Well on their website they have articles about code, and one called Design Sense by Michael Feathers mentions the drawing book that Liz has.

This follows a general observation I've seen: when you are first exposed to an idea or fact, the odds of you recognising it around you significantly (exponentially?) increase. I learn about this book and I pick it's title out of the article. You learn a new word and then see it a dozen times in two days. I figure it's either of two things. First, the thing is suddenly popular. Maybe Liz saw her book on TV and the author saw it too, which made him think of it. The second way is pattern matching. Once you've noticed the new word, picking it out becomes natural.

0 Add Comment


2007.07.15 Chomping and Editing

Just posted the sketch for two new Projects. The first is Chompie, which I've actually got a proof-of-concept going for. It chops up your program until it is as small as it'll go while still passing (or failing!) some test. The idea is to help debugging, for example -- it could spit out the exact code that fails some test in a specific way.

The second is the one I'm more excited about as far as an actual impact on my life -- Oddmuse Editfile is a simple oddmuse plugin which will let me, among other things, put some of my source code directly into wikiland. Changes from the wiki will be checked into darcs for review. It is documentation-centric, so that I can put things into POD and they'll show up nice and neat on my wikis.

This weekend is the ICFP Contest 2007! Jason Woys and I will be doing it, with some others maybe dropping in. They've got a pretty good teaser going on in the blog linked to from http://www.icfpcontest.org/... looks like it's going to be super fun :)

I even took the day off Friday.

0 Add Comment

More...