fansipans' recent posts
08/30/2009 - [ recipe bread cooking banana ] - posted by fansipans
INGREDIENTS (Nutrition)
* 2 cups all-purpose flour
* 1/2 teaspoon baking soda
* 1 cup white sugar
* 1 egg
* 5 tablespoons milk
* 1 teaspoon baking powder
* 1/2 teaspoon salt
* 1/2 cup margarine
* 1 cup mashed bananas
* 1/2 cup chopped walnuts (optional)
* 1 teaspoon cinnamon
* 1 teaspoon vanilla
DIRECTIONS
1. Sift together flour, baking soda, baking powder, cinnamon and salt.
2. In a large bowl, cream sugar and butter or margarine. Beat the egg slightly, and mix into the creamed mixture with the bananas and vanilla. Mix in sifted ingredients until just combined. Stir in milk and nuts. Spread batter into one greased and floured 9x5 inch loaf pan.
3. Bake at 350 degrees F (175 degrees C) until top is brown and cracks along the top (usually under an hour)
| view comments (5) | comment on this post |
06/08/2009 - [ names name online research database analysis ] - posted by fansipans
Two cool, and unexpected, online applications for researching and comparing given names and surnames:
- WhitePages.com: names.whitepages.com - Shows popularity, given/surname combinations, and geographical distribution.
- WolframAlpha: woflramalpha.com - Shows a wide variety of information about (most) names, and allows for name comparisons, for example: Michael vs. Bruno
| view comments (2) | comment on this post |
05/27/2009 - [ oatmeal cookie cookies recipe baking ] - posted by fansipans
* 1 cup butter, softened
* 1 cup white sugar
* 1 cup packed brown sugar
* 2 eggs
* 1 teaspoon vanilla extract
* 2 cups all-purpose flour
* 1 teaspoon baking soda
* 1 teaspoon salt
* 1 1/2 teaspoons ground cinnamon
* 3 cups quick cooking oats
1. In a medium bowl, cream together butter, white sugar, and brown sugar. Beat in eggs one at a time, then stir in vanilla. Combine flour, baking soda, salt, and cinnamon; stir into the creamed mixture. Mix in oats. Cover, and chill dough for at least one hour.
2. Preheat the oven to 375 degrees F (190 degrees C). Grease cookie sheets. Roll the dough into walnut sized balls, and place 2 inches apart on cookie sheets. OPTIONAL: Flatten each cookie with a large fork dipped in sugar.
3. Bake for 8 to 10 minutes in preheated oven. Allow cookies to cool on baking sheet for 5 minutes before transferring to a wire rack to cool completely.
| view comments (1) | comment on this post |
01/29/2009 - [ recipe muffin blueberry hazelnutt ] - posted by fansipans
1 egg
2/3 cup sugar
1/4 cup melted shortening
2/3 cup milk
1 1/2 cups all-purpose flour
1/2 cup hazelnut flour (meal)
1/2 teaspoon salt
2 1/2 teaspoons baking powder
1 teaspoon vanilla
1 teaspoon fresh lemon zest
1 cup blueberries
1/4 cup chopped hazelnuts
Mix flours, salt, baking powder and sugar until combined. Add shortening, egg, milk, vanilla, and lemon zest. Mix until ingredients are just well-mixed, then fold in blueberries.
Fill muffin tins about 3/4 full with the mixture. Sprinkle each muffin with chopped hazelnuts. Bake at 350 degrees for 20-25 minutes. Allow to cool before removing from muffin tin. Makes 12 muffins.
| comment on this post |
Database Design: UUID vs. Integer Auto-Increment
01/16/2009 - [ database design uuid guid ] - posted by fansipans
We're doing some major database design at work and I raised the possibility of using UUIDs for all our surrogate keys as opposed to the traditional per-table auto-incremented integer or sequence. I personally prefer them, and we also have some special setup and needs that might benefit from them. We have distinct databases per client, where some "partners" span multiple clients (databases), I see this aiding in reporting across databases. We also have a need for replication, possibly multi-master replication as we're thinking about segregating bulk data-processing (read+write) and daily usage (also read+write).
In the last few years, for my personal projects and some work projects, I've switched to using official and ghetto mini-UUIDs wherever auto-generated keys are used. For me, there wasn't a single revelation, or one amazing article or book that changed my mind; it was more of a gradual annoyance with simplistic database-generated keys.
My reasons have primarily been:
- Less Database Dependency - When generated identifiers don't (have to) come from the database, business logic has less work to do when creating new data sets, especially when the new data is heavily interrelated, application code can simply declare a new key and reference it in other new, yet-to-be-saved objects. Also, having one authoritative source for generating keys - be it a lock on a table, or a global sequence provider - has a much lower threshold for scalability, and can invoke a sizeable performance penalty, especially in write-intensive applications. Modern UUID algorithms seem to be strong enough that a central "UUID Generation Service" per-host wouldn't be necessary.
- Uniqueness - An object's or row's id will be unique across the table, database, server, and thankfully, most-likely, the entire universe. This truly means that for a given set of values, (hopefully guaranteed to be unique by database constraints), the id will never be used by another set of data. This makes error tracing, log analysis, and searching for old data trivial. Also, how many times have you typed up a query "DELETE FROM foo WHERE id=178", stared at it to make sure 178 is the right number, hit enter, and then realized that "foo" should have been "bar"? Say goodbye to whatever had #178 in "foo"!
- Mocking/Testing - When id generation can happen in the application layer, creating large, complex data sets for testing/integration purposes is trivial and requires no back and forth to the database to associate objects. If you're using a full-featured ORM (e.g. Hibernate), this seems of no benefit, as you can create large sets of interrelated objects and tell the ORM to just save them all. But when these interrelated objects span databases, or application environments (all in a transactional environment, of course), it seems beneficial to let the application layer - the actual point where the new data set is created - specify the ID.
- Data Privacy - Contemporary web applications often expose internal state through simplistic sequential integer IDs. How many times have you been at /foo.php?id=17443 and found interesting things when you go to /foo.php?id=17444 ? Though this should be mitigated by proper design and security, if UUIDs are used, the attack vector is nonexistent.
http://napkindrawing.com/photo_view/rfenrcfouhnweeoo
These are generated in application code by a function that weights letter choices according to their frequency in the English language, so you end up with almost pronounceable keys. In the database all surrogate key columns have a default which produces hexadecimal digits if the surrogate key is not specified. This has been helpful for debugging and development, though given the weighting of the letters in English and the Birthday Paradox, I wouldn't feel comfortable using this scheme on any large (billions of records) databases. Plus it's completely non-standard and rather silly - you could have a "random" key like "ohhhbuttbutthaha".
My last project at work used actual UUIDs as generated by Hibernate's UUIDHexGenerator, and the development overhead of - GOSH! - 32 character IDs was nonexistant. Even dealing with handwritten queries whilst testing, debugging and data analysis were much simpler when you don't have to remember which "17" you're looking for in a fresh database.
The main complaints googling for "uuid database" seem to be around adversely affected indexes where uuids are added in random numerical order to clustered indexes - which would seem to be addressable by using a timestamp-prefixed value, a simple "reverse(uuid())" in MySQL, for example.
I'm of the opinion that the added hardware+software burden of supporting 32 byte keys is moderate to trivial given modern hardware, and the benefits described above are enough of a reason to switch all instances of generated keys to be UUIDs
| comment on this post |
01/04/2009 - [ post html5 web standard programming ] - posted by fansipans
From Eric Meyer's Blog: A recent post "An Event Apart and HTMl 5" describes how the new An Event Apart web site being written entirely in HTML 5. Pretty exciting!
| comment on this post |
First (automatically syndicated) Post!
12/29/2008 - [ blogger napkindrawing api ] - posted by fansipans
Woohoo, so I post on napkindrawing, and it's automatically syndicated to Blogger via their XML API and some help from XML::Atom::Syndication :)
The other cool part is that edits on napkindrawing, like this paragraph, get propagated too :)
| view comments (1) | comment on this post |
12/22/2008 - [ humor economics joke projectmanagement philosophy ] - posted by fansipans
Two economists are having lunch on a cafe’s patio when a Porsche drives past.
The first economist says, “Wow, I really want a car like that.”
The second economist responds, “Obviously not.”
| view comments (1) | comment on this post |
11/14/2008 - [ learntoday accessibility web design ] - posted by fansipans
There's a lot of cool stuff going on in the Web Accessibility world.
WCAG: Web Content Accessibility Guidelines. (See See WCAG 2.0 quick reference here.)
The Web Content Accessibility Guidelines are a standard set of ways to better organize content for accessibility. Mainly just big fat checklists of dos & don'ts, easy to scan/peruse. Great for well-designed sites overall, not just for accessibility issues.
WAI-ARIA: Web Accessibility Initiative - Accessible Rich Internet Applications (Also see a simple ARIA primer here)
The WAI-ARIA project is trying to manage accessibility issues for the rapidly expanding landscape of Rich Internet Applications. Modern web applications often take advantage of or bastardize every possible feature of modern browsers to implement functionality for which screen readers and users with accessibility issues have no way to use. Preliminary support for the WAI-ARIA specification already exists in major screen readers and recent browsers (Firefox 3, IE8).
Web Accessibility is growing by leaps and bounds, and stands to be a major motive force in making current internet applications suck less. Designing for accessibility reinforces good user interface, user experience, and usability. Any pressure to focus on user experience and usability can often lead to better applications overall, as it can expose and express or better address confusing business logic and requirements.
| comment on this post |
11/07/2008 - [ achewood comic cat ] - posted by fansipans
| view comments (1) | comment on this post |
11/05/2008 - [ web design html css html5 css3 interface ] - posted by fansipans
For warm fuzzies, read through the following documents:
The Working Specification of HTML5: New and better tags, client-side databases, native video and multimedia (goodbye flash!), canvas for drawing and rendering, input type "date", native tags for tree, list, and tabular data, a "command" tag (goodbye href="#" and href="javascript:void(0)" !)
CSS3, Current CSS Initiatives: A bonanza of syntax, attributes, and features to style HTML content in radically more ways than before. The wealth here is in the hundreds of little new features and attributes like: curved border corners with border-radius, an "opacity" property (opacity examples), color specification by hue, saturation, value, and optionally, alpha, and many, many, more.
| comment on this post |
10/10/2008 - [ javascript programming learning functional ] - posted by fansipans
Seeing a complaint about function chaining / nesting with setTimeout made me think that there had to be a better way to take advantage of JavaScript's functional abilities.
The issue at hand was how to take a number of functions, and execute them serially, with a delay between functions. The least flexible and most trivial implementation would be something like:
function() {
do_something();
setTimeout(function() {
do_something_else();
setTimeout(function() {
do_something_other()
...
}, 1000);
}, 1000);
}
It's an unusual problem for people not versed in event-driven programming, and those of us working in moderately crippled event-driven environments like the glorious modern Web Browser. The issue is that the functions passed to setTimeouts float off into space until their time runs out, and setTimeout immediately returns. So it's not as simple as iterating through the functions, the calls need to be nested - or ideally - chained.
So after banging out some code, a good amount of refactoring, and getting a better feel for closures and scope in JavaScript, I came up with executeFunctions().
executeFunctions(funcs, transitionFunc) takes two arguments:
funcs is an Array that contains Arrays with two indices, 0 and 1. This two value Array contains the Function to execute, and an Array of arguments to pass to the Function, respectively.
transitionFunc is optional. It's simply a Function that must accept one argument (a Function). If specified, transitionFunc is called each time before the functions in funcs are executed. If transitionFunc executes the function it was given, then funcs will continue to be executed. If not, execution stops. If not specified, all the functions in funcs will be executed in the order they appear.
What does this mean? It means the setTimeout example specified above can be executed from a simple Array of functions with the following extension to executeFunctions:
function executeFunctionsWithTimeout(funcs, timeout) {
var transitionByTimeout = function(f) {
window.setTimeout(f,timeout);
};
executeFunctions(funcs, transitionByTimeout);
}
This is still a recursive solution to a recursive problem, but it lets the user define the code in a much more manageable way. If I let myself use jQuery I'd probably setup a queue of functions and use events to fire them off and detect completion (to fire off the next event), so that each function wasn't actually invoking the next, but this code is trivial, and handles blocking and detached transitions with ease.
I also had the Function Efficiency Considerations section of Mozilla's Core JavaScript Reference gently reminding me to be careful with closures as they can get tricky with garbage collection. I want to say that executeFunctions is ok in this regard, since it's not returning anything into global or any other persistent scope, but I'm still a little new to JavaScript to say for sure.
The demos of executeFunctions() include the use of setTimeout, mouseOver, confirm, and no transitions.
Tested in FF3, IE6, IE7, and Safari.
| comment on this post |
10/08/2008 - [ qmail spam rblsmtpd smtp email mail networking server configuration blacklist spamcop ] - posted by fansipans
Three cheers for Dan Bernstein's rblsmtpd!
After initially setting up qmail and procmail years ago, one of the long-lingering items on my todo list was make napkindrawing's spam handling much better. I've basically been operating in whitelist mode, with aggressive procmail rules, which required somewhat regular scans through my Junk and Unfiltered folders to check for valid mail marked as spam. I'd always assumed that a more reliable option would take a few hours of configuration and tweaking.
Well I finally took a few minutes to see if could tweak my existing anti-spam setup (procmail), and see what my other options are, what would be the easiest path given my current setup. I quickly realized that rblsmtpd is already installed, and simply needs to be uncommented in my qmail init script!
rblsmtpd is a simple program that serves a tiny purpose, in the spirit of all of Dan Bernstein's other software. It sits between tcpserver, which actually listens for connections, and qmail, which handles mail delivery. rblsmtpd is passed domain names on the command line like "bl.foo.com", which are run by organizations maintaining ip address blacklists. When a remote server, say with ip address from a.b.c.d, connects to deliver mail, rblsmtpd does a DNS lookup on the domain "d.c.b.a.bl.foo.com". If the DNS server for bl.foo.com returns a TXT record, the connection is denied, and the contents of the TXT record are displayed to the client, and logged locally. So you get the speed, configurability, and hierarchical nature of DNS giving a practically instant, fresh, YES/NO answer as to whether the sending party is in the blacklist or not. Sweet!
After enabling rblsmtpd, and adding bl.spamcop.net, and removing relays.ordb.org, I'm seeing it block an average of 5 emails per hour, which is almost all of my spam. The remaining couple that slip through I've been forwarding to spamcop, and adding to my procmail rules.
Forwarding the remaining spam to spamcop helps all users of spamcop. They also provide relatively long-term subscriptions for reasonable prices, which I'll certainly consider after I've run this setup enough to trust it.
Edit: The most effective DNS BlackList seems to be zen.spamhaus.org. It's a combination of a number of other blacklists, and no spam has managed to get through in the last few hours since I added it. We'll see ...
Edit Edit: After a week or so of using Spamhaus' Zen DNSBL, only a few junk emails get through every day, out of 300+ attempts. My use of spamcop catches about 10 spams a day (that Zen misses), and the few that get through I've noticed on spamcop's reporting site are usually registered in cbl.abuseat.org's DNSBL, so I've added cbl.abuseat.org as the third DNSBL to check. That should drop it to no more than one junk message every other day :)
| comment on this post |
Using Data on the Web - Models, Persistence, Management
10/04/2008 - [ couchdb programming javascript json joose jsonpickle ] - posted by fansipans
I've been drowning myself in jQuery and HTML+CSS at work, which has been awesome for coming up to speed with all the recent technical developments on the web.
One thing that has piqued my interest quite severely is the integration of JavaScript with server-side environments. With a tighter binding between client and server code, we can write less code, have better test coverage, and truly refactor web applications across everywhere their business objects/rules live.
After rediscovering Joose (one of the guys on use.perl wrote it or helps write it I believe), and seeing one of their demos where Joose uses GoogleGears or HTML5's Database feature, I really wanted a simple-to-use ORM for JavaScript. Without GoogleGears or HTML5 support this could also easily be done server-side by having a url that took standard orm requests (find/search/save/delete) and returned standard JSON.
Now this sounds familiar.... oh right, that's a perfect description of CouchDB!
CouchDB is another thing I've had a lingering fascination with. It is a document-based database written in Erlang, with a JSON interface. Data manipulation inside the database is performed by snippets of code that create "views" of the data. CouchDB ships with JavaScript support, and support for Perl exists in CPAN via CouchDB::View. It's one of those things you can see has HUUUUUGE potential, but really needs those little libraries that link it to other popular frameworks/platforms to really take off, or get that foot in the door with the web programmer zeitgeist.
So according to this mailing list thread about work on Joose.Storage which mentions CouchDB and this announcement that Joose supports the cross-platform serialization library "jsonpickle", I wonder what it would take to get that perfect easy API so in a Joose class all you'd have to add to your Joose class definition is:
does: CouchDB
That and maybe adding something like (totally making this up)
Joose.Storage.CouchDB.url="http://db.server.org/testing"
to the top of your javascript, and badabingbadaboom you've got versioned object persistence backed by one of the most awesome open-source high-performance databases out there!
Edit: Looks like there's already a jQuery CouchDB plugin, written by Jerry Jalava (see announcement on his blog.) It looks like a straightforward implementation of the CouchDB API:
create(database_name)
connection(database_name | view_name)
get(document_name)
save(database_name, document)
all(database_name)
I'd like to see a database-backed object persistence layer that can use that API, or a number of other APIs, such as:
1. A server resource/URL that receives the name of a database operation, and a JSON representation of the data. This is nice because it's easy to implement with whatever server database / language / runtime you have. If this were a centralized project, it would be trivial for members of the community to support new server environment/database combinations.
2. JSON-enabled Database Servers. Who wants to write the MySQL Server JSON connector? Or a generic JSON-to-Database bridge, which could support a standard JSON interface, and many different backend databases? The bridge could be configured with even more javascript to function as server-side validations or business logic.
3. SQL Dispatcher. Pretty much the same as #1, but with the SQL generated client-side. This would still provide a JSON interface, and require parameterized queries.
It seems to me that all of these ideas have been best expressed by CouchDB, but to acheive widespread adoption, I still have concerns with legacy systems, existing infrastructure, critical mass, etc.
| view comments (1) | comment on this post |
10/02/2008 - [ status ] - posted by fansipans
Mike thinks if Bernanke was "Helicopter Ben", then Paulson should be "Independence Day City-Sized Death Ship Hank."
| comment on this post |
10/01/2008 - [ screen napkindrawing ] - posted by fansipans
I'm wondering if the lag I'm experiencing w/my virtual host at the command line is due to screen being up for 140 days with almost 20 windows :P
fansipans@napkindrawing:~$ date
Wed Oct 1 13:13:53 EDT 2008
fansipans@napkindrawing:~$ ps awwux | grep -i screen
1000 2131 0.0 1.6 24636 8656 ? Ss May14 0:32 SCREEN
Edit: D'OH. You learn something new everyday. I always reattach with "screen -x", which doesn't nuke other attached terminals, so any other sessions I have open, even if they're at home, it's gotta send the output to them too. Forcibly closing other open terminals upon reattach with "screen -dr" really seemed to pep things up :)
| comment on this post |
The Little Prince and the Programmer
09/24/2008 - [ programming quote cute philosophy ] - posted by fansipans
The Little Prince and the Programmer
"What a strange person. Every time I ask him what he wants, he tells me what he is doing," the little prince said to himself.
| view comments (1) | comment on this post |
09/15/2008 - [ programming politics ] - posted by fansipans
Does evil code exist, and if so, do we ignore it, do we negotiate with it, do we contain it, or do we defeat it?
| comment on this post |
Starbucks - The Way I See It #287
08/31/2008 - [ starbucks humor madlibs ] - posted by fansipans
There is a special place in hell for women who don't ____ other women.
- Medeleine K. Albright
Former Secretary of State and Ambassador to the U.N.
| comment on this post |
08/13/2008 - [ reggae credits idea music ] - posted by fansipans
Listening to some classic reggae on youtube (The Upsetters - Return of Django, Harry J All Stars - Liquidator), I realized what great background music it is, and what great music for credits it is.
Which got me to thinking ... more things in life need credits. It'd be neat if you bought a cup of coffee to have a list of everyone who had a hand scroll by (optionally of course)
| view comments (2) | comment on this post |
Pics and Photos and Images, Oh My!
08/12/2008 - [ napkindrawing ] - posted by fansipans
Now begins the lengthy process of uploading what will probably be a gig or two of pictures, and adding the features that will let me manage them. Woowoo! :)
| comment on this post |
08/01/2008 - [ internet music pandora radio indie iphone ] - posted by fansipans
So, I'd always heard of Pandora internet radio, but hadn't checked it out. Finally did and it's pretty nice actually.
First suggested song was "Speedbumps" by Luna, whom I'd heard of before but hadn't given a good listen too - quite nice.
Second suggested song - a live version of a great Modest Mouse song, "Broke" - awesome :)
| comment on this post |
07/06/2008 - [ food recipe cooking dinner ] - posted by fansipans
2 Medium Red Bell Peppers
1 Large Green Bell Pepper
2 Yellow Zucchini
~10 leftover meatballs
3 slices Gouda cheese.
3 slices Munster cheese.
~15 cherry tomatoes.
1-2 cups of mustard greens.
Mash meatballs.
Julienne zucchini into super thin strips.
Simmer meatballs with zucchini.
Slice off the tops of the peppers, remove seeds, and put the tops aside.
Bring a big pot of water to a boil, adding a half teaspoon of salt, and the peppers. Boil for 3 minutes, remove and place into cooking dish.
Place a slice of cheese at the bottom of each pepper. Fill with zucchini-beef mixture. Place a slice of cheese on top of zucchini mixture. Cut tomatoes in half and place on top of cheese. Fill remaining space in pepper with mustard greens. Put caps back onto peppers.
Place in oven preheated to 375F, and cook for 18 minutes.
| comment on this post |
06/25/2008 - [ air beck lyrics ] - posted by fansipans
I'm running after time and I miss the sunshine
Summer days will come happiness will be mine
I'm lost in my words I don't know where I'm going
I do the best I can not to worry about things
| view comments (1) | comment on this post |
06/18/2008 - [ dinosaurcomics comic internet sawesome trex ] - posted by fansipans
| comment on this post |
06/04/2008 - [ tomwaits music tour atlanta ] - posted by fansipans
Tom Waits is on tour and will be in Hotlanta, GA on July 5 ...... hmmm .....
Edit: aww, didn't go to the show but it's available in its entirety: Tom Waits in Concert, hosted by NPR
| comment on this post |
05/16/2008 - [ perl library orm database mapping sqlite cpan module ] - posted by fansipans
Adam Kennedy just released a cute lil' bugger of a Perl library called "ORLite", which is modeled after all those adorable ::Tiny libraries, and lets you just get stuff done.
His original post to use.perl
ORLite on CPAN
A complete start-to-finish use case
| comment on this post |
04/23/2008 - [ bjork lyrics ] - posted by fansipans
You think you're denying me of something
Well I've got plenty
You're the one who's missing out
But you won't notice
'Til after five years
If you'll live that long
You'll wake up
All loveless
I dare you
To take me on
I dare you
To show me your palms
I'm so bored - with cowards
That say they want
Then they can't handle
You can't handle love
You can't handle love
You just can't handle
I dare you
To take me on
I dare you
To show me your palms
What's so scary?
Not a threat in sight
You just can't handle
You can't handle love
| comment on this post |
What do you get when you squeeze an orange?
04/18/2008 - posted by fansipans
You get what's inside the orange!
| comment on this post |
Starbucks - The Way I See It #259
03/26/2008 - [ starbucks humor madlibs ] - posted by fansipans
People say, oh I could never _______! But when you meet _______________ you understand the _______ and ______ those people show each and every day. Their struggles ________ and _______ you to test the limits of your _________ and to _____ that ___________. You'll be surprised by what you can __.
- John Kellenyi
Eight-time marathoner and leading fundraiser with The Leukemia & Lymphoma Society's Team In Training
| comment on this post |
03/24/2008 - [ bjork lyrics ] - posted by fansipans
All these accidents,
That happen,
Follow the dots,
Coincidence,
Makes sense,
Only with you,
You don't have to speak,
I feel.
Emotional landscapes,
They puzzle me,
Then the riddle gets solved,
And you push me up to this
State of emergency,
How beautiful to be,
State of emergency,
Is where I want to be.
All that no one sees,
You see,
What's inside of me,
Every nerve that hurts,
You heal,
Deep inside of me,
You don't have to speak,
I feel.
| comment on this post |
Starbucks - The Way I See It #282
03/19/2008 - [ starbucks humor madlibs ] - posted by fansipans
_________ is a strange country. It's a place you _________ or _____ - at least in your mind. For me it has an endless, spellbound something in it that feels ______. It's like a little sealed-vault country of ___________ and ____________ where what you do instead of ____ is ____ until you're dizzy.
- Lyall Bush
Executive director of Richard Hugo House, a center for writers and readers.
| comment on this post |
Starbucks - The Way I See It #280
03/19/2008 - [ starbucks humor madlibs ] - posted by fansipans
You can learn a lot more from _________ than you can from _______. Find someone with whom you don't agree in the slightest and ask them to __________________ at length. Then take a seat, shut your mouth, and don't __________. It's physically impossible to ______ with your _____ open.
-- John Moe
Radio host and author of Conservatize Me.
| comment on this post |
Arthur C. Clarke Has Passed Away
03/19/2008 - [ sciencefiction book author obituary ] - posted by fansipans
Mr. Clarke, thank you so much for all the wonderful stories!
For those of you who haven't read the 2001 series of books, I can't recommend them enough. If all you've seen is Kubrick's movie, reading the books is like going from struggling to learn 2+2 to understanding theoretical particle physics.
Also, his shorter novels make great quick reading and can be covered in a couple of days, or a week's worth of lunch breaks.
| comment on this post |
03/14/2008 - [ movie comedy assistedliving indie ] - posted by fansipans
A reminder for those out there who haven't seen it: the mockumentary "Assisted Living" is a great movie :)
| comment on this post |
03/10/2008 - posted by fansipans
Comments have been enabled! Just click on a blog title to go to the post's page where you'll see a friendly "comment on this" link at the bottom of the post.
| comment on this post |
03/10/2008 - [ math software modeling diagram graph algorithm design interface data analysis ] - posted by fansipans
I ran across an interesting article today, about a simple solution to a seemingly complex problem.
The question is: how do you subdivide a plane containing multiple points into cells containing each point, enclosing all the points in the plane closest to that point?
One of the ways of constructing these 'Voronoi Diagrams', as they're called, is Fortune's algorithm, which is based around intersecting parabolas.
See the article here: Voronoi Diagrams and a Day at the Beach
And a java simulator of Fortune's algorithm here: Fortune's Algorithm Simulator
What I find fascinating about these types of diagrams are the ways in which they can be used to aid data analysis through visualization and geometric representation (see also this blog post.)
There are so many secondary characteristics of these diagrams: cell area, adjacent cells, border length, distance to border, border segment count... it makes me want to throw all sorts of different data sets in there and see what unobvious connections and patterns become plain as day.
| comment on this post |
03/10/2008 - [ builttospill music indie show local charlotte ] - posted by fansipans
Tonight! Built To Spill! Neighbourhood Theatre in NoDa!!
Edit: The show was fantastic :) The setlist was almost entirely oldschool - Car, Distopian Dream Girl, You Were Right, Reasons, Made-Up Dreams, Randy Described Eternity, 3 Years Ago Today, Stop The Show ...
The opening band was good, as well as the Meat Puppets, who certainly rocked hard.
| comment on this post |
Weapons of Mass Death and Destruction
02/28/2008 - [ government law gun northcarolina us ] - posted by fansipans
I don't know why, but it just sounds funny. Maybe it's the phrase "weapon of mass death and destruction". It's basically like "you can't build atomic bombs unless you do it legally.
General Statute 14‑288.8
(a) ... it is unlawful for any person to manufacture, assemble, possess, store, transport, sell, offer to sell, purchase, offer to purchase, deliver or give to another, or acquire any weapon of mass death and destruction.
(b) This section does not apply to:
...
(4) Inventors, designers, ... researchers, ... and other persons lawfully engaged in pursuits designed to enlarge knowledge ... of weapons of mass death and destruction intended for use in a manner consistent with the laws of the United States ... .
| comment on this post |
Modest Mouse - Styrofoam Boots / It's All Nice On Ice
02/23/2008 - [ modestmouse lyrics indie music out ] - posted by fansipans
well some guy comes in looking a bit like everyone i ever seen
he moves just like crisco disco
breath 100 percent listerine
he says looking at something else
but directing everything to me
every time anyone gets on their knees to pray
well it makes my telephone ring
and i'll be damned
he said you were right
no one's running this whole thing
he had a theory too
he said that god takes care of himself
god takes care of himself
and you of you
| comment on this post |
02/20/2008 - [ builttospill indie music local show awesome ] - posted by fansipans
Dude.
Built To Spill is playing at the Neighborhood Theatre in NoDa on March 10th.
Do you hear that? It's a chorus of angels all playing guitar.
| comment on this post |
02/04/2008 - [ blueprint css webdesign web html interface design ] - posted by fansipans
I stumbled across a site I'd previously bookmarked many months ago, the Blueprint CSS Framework. It's a very simple and straighforward css library for layout, and I'm very impressed at how simple and how easy to use it seems to be.
From the site:
Blueprint is a CSS framework, which aims to cut down on your CSS development time. It gives you a solid CSS foundation to build your project on top of, with an easy-to-use grid, sensible typography, and even a stylesheet for printing.
See a sample website built with BP, or a demonstration of the grid or a demonstration of the typography. The quick tutorial is also a good place to start. Blueprint is a CSS framework, which aims to cut down on your CSS development time. It gives you a solid CSS foundation to build your project on top of, with an easy-to-use grid, sensible typography, and even a stylesheet for printing.
See a sample website built with BP, or a demonstration of the grid or a demonstration of the typography. The quick tutorial is also a good place to start.
| comment on this post |
01/30/2008 - [ pancake sandwich ] - posted by fansipans
What, a guy can't post nice lyrics he likes? Sheesh!
| comment on this post |
01/30/2008 - [ music modestmouse indie lyrics ] - posted by fansipans
If you sit still or if you're roam, well, here it comes.
So now we're drownin' in birthday cakes, well, here it comes.
The place and the time where we knew everything could go wrong.
Keep it clean, I didn't mean to be mean.
Why does it always seem, like I've never won.
Keep it clean and no one's ever won.
The empty promise will make you sick, here it comes.
Make a point to make no sense, well, here it comes.
| comment on this post |
01/25/2008 - [ music modestmouse indie lyrics ] - posted by fansipans
It's hard to remember, it's hard to remember
We're alive for the first time
It's hard to remember were alive for the last time
It's hard to remember, it's hard to remember
To live before you die
It's hard to remember, it's hard to remember
That our lives are such a short time
It's hard to remember, it's hard to remember
When it takes such a long time
| comment on this post |
Modest Mouse - Gravity Rides Everything
01/19/2008 - [ lyrics out music indie modestmouse ] - posted by fansipans
Early early in the morning it pulls all on down my sore feet
I wanna go back to sleep.
In the motions, and the things that you say.
It all will fall, fall right into place
As fruit drops, flesh it sags
Everything will fall, right into place
| comment on this post |
01/17/2008 - [ ubuntu iphone photo linux picture ] - posted by fansipans
Plugging in my iPhone to my Ubuntu desktop at work to charge it, a dialog pops up "A Camera Was Connected, Import Photos?" - and it works!
I shouldn't be this impressed*, but the iPhone tends to be special beast when it comes to software / linux stuff.
* Was it Chris Rock who said "Linux always braggin' about shit it just supposed to do." ?
| comment on this post |
01/15/2008 - [ problem iphone bug hardware broken speaker microphone ] - posted by fansipans
The microphone on my iPhone quit working completely, along with the ear speaker. After much internal reflection and meditation, I realized the problem might be related to earlier in the week when, upon pulling the headphones out, the current song kept playing.
One of the nice features of the iPhone is that when the headphones are removed, the current track is paused, and when a phone call comes in, if the headphones are plugged in, all audio (mic+speaker) is redirected to the headphones.
So, it was the case, my iPhone's headphone jack was gummed up with enough lint that it thought it still had headphones plugged in. Though to be fair, I'm talking about only 5 or so cubic millimeters of uncompressed fluffy lint. After much dexterity with a flashlight, paper clip, and a vacuum, the majority of the gunk was removed, and normal operation was restored.
Beware!
| view comments (1) | comment on this post |
01/11/2008 - [ music tomwaits ] - posted by fansipans
Well, I feel retarded for missing out so long, but I finally got around to listening to some Tom Waits, and durn it all if it ain't my kind of music.
| comment on this post |
01/10/2008 - [ dell computer desktop hardware deals ] - posted by fansipans
Back before I got my Eee laptop I mentioned how impressive some online computer hardware deals are, here's a fantastic example of that:
SlickDeals.net: Inspiron 530 Desktop
$581 buys you a quad-core 2.4GHz desktop with a 22" widescreen monitor (In-home service, parts+labor too!). WTF!
Full Specs:
* Intel Core 2 Q6600 Quad-Core (8MB L2 cache,2.4GHz,1066FSB)
* Genuine Windows Vista Home Basic - English
* 1GB Dual Channel DDR2 SDRAM at 667MHz- 2DIMMs
* Dell USB Keyboard and Dell Optical USB Mouse
* 22 inch Samsung 2220WM Widescreen Analog/Digital Black LCD Monitor
* Integrated Intel Graphics Media Accelerator 3100
* 250GB Serial ATA Hard Drive (7200RPM) w/DataBurst Cache
* Integrated 10/100 Ethernet
* 56K PCI Data Fax Modem
* 48X CDRW/DVD Combo Drive
* Integrated 7.1 Channel Audio
* 1Yr In-Home Service, Parts + Labor, 24x7 Phone Support
| comment on this post |
Statistics, Number Ranges, and Data Analysis
01/08/2008 - [ analysis statistics postgresql database data sql math ] - posted by fansipans
A gripe I've always had with numerical and statistical analysis using spreadsheets and traditional RDBMSes is the lack of native support for ranges.
So say I have a table 'num' with the numbers:
(10,11,14,15,11,10,6,9,10,8)
Getting the average is easy,
SELECT avg(n) FROM num; => 10.4
But how could I easily get the numbers in 'num' that are within 20% of the average, without coding a bunch of explicit math?
Using PostgreSQL's Geometric types and operators, we can represent each number as a circle on the x-axis, with its radius representing the allowed tolerance, so a circle at (12,0) with radius 6 would represent the number 12, with accuracy of +/- 50%. Once you have all your numbers with their tolerances, simple use the overlap operator '&&' to tell you which circles overlap another circle. For the average, I'll use a circle at (10.4,0) with radius 0.
So for my simple table of integers, this tells me which ones are within 20% of 10.4.
SELECT n FROM num WHERE
circle(point(n,0),n*0.2) && circle(point(10.4,0),0);
=> (10,11,11,10,9,10)
It would be just as easy for each row in the table, to have a 'tolerance' or 'accuracy' column, or to derive that tolerance value based on previous query.
If I wanted to further measure the difference , I could use the '<->' distance operator to see how far apart two circles are.
This lets you get away with relatively simple SQL for complex statements like "For the ordered set X, show me the largest contiguous subset Y such that each number is within 3% of its neighbor, and within 10% of the series min and max values."
The native support for geometric operations in PostgreSQL seems broad and deep. Types include point, line, box, path (open and closed), polygon, and circle. Here are a few of the many operators:
## - Closest point to first object on second object
<-> - Distance between objects
&& - Overlap?
<< - Stricly left of?
>> - Stricly right of?
?# - Intersects?
@> - Contains?
What's really cool about this is that there are many ways where a geometric context can help associate, analyze, and relate data, where the underlying mathematical formulas would be hideously complex and non-intuitive. Imagine datapoints across one or two dimensions, circles of differing radii, paths, bounding boxes, etc.
| comment on this post |
01/07/2008 - [ gay movie comedy ] - posted by fansipans
We watched But I'm a Cheerleader last night. Great movie! It's cheesy but cute and honest, and I can't believe I hadn't seen it earlier, since it came out (ha) in 2000. Seeing RuPaul out of drag, wearing a "STRAIGHT PERSON" t-shirt was definitely good for a laugh :)
| comment on this post |
Happy 0th Birthday, Perl 5.10!
12/19/2007 - [ perl 5.10 release ] - posted by fansipans
Hooray! Perl 5.10 is out with a whole slew of new helpful features. It's been 5 years since the last major release of 5.8.
Official Perl Foundation Press Release
For presentations, documentation, and tips on the new features in 5.10, see my Perl 5.10 bookmarks
| comment on this post |
12/18/2007 - [ perl birthday ] - posted by fansipans
Today, December 18th, is Perl's 20th birthday! The upcoming 5.10 release brings many great features, and of course, Perl6 looks to set the stage for another fantastic 20 years of power and productivity.
| comment on this post |
12/17/2007 - [ movie weekend coen film ] - posted by fansipans
I saw No Country For Old Men this weekend, the Coen Brothers' latest film. It was classic Coen - dark and honest. The characters and dialogue were fantastic, and it was, for better or for worse, super violent.
| comment on this post |
12/13/2007 - [ laptop unix asus linux eee ] - posted by fansipans
Well, I've had my 4G Surf Eee for a week now, and have it running perfectly with Xubuntu thanks to the awesome people on the eeeuser.com forums. Everything works: Wireless, Suspend, Hibernate. It's an amazing little laptop, and I'm jazzed to have a complete Debian-derivative development environment, with wifi, that weighs less than a kilo!
| comment on this post |
Modest Mouse - Neverending Math Equation
12/11/2007 - [ modestmouse indie lyrics music ] - posted by fansipans
The universe works on a math equation
That never even ever really even ends in the end
Infinity spirals out creation
We're on the tip of its tongue, and it is saying, well
We ain't sure, where you stand
You ain't machines, and you ain't land
| comment on this post |
12/10/2007 - [ ssh unix linux tip trick password authentication configuration ] - posted by fansipans
D'oh! Remember when setting up password-less ssh (public key authentication), that ~/.ssh/authorized_keys must not be group or world readable.
| comment on this post |
12/07/2007 - [ xm music radio song indie artist ] - posted by fansipans
CSS - Knife
| view comments (1) | comment on this post |
12/07/2007 - [ perl programming history culture software technology unix ] - posted by fansipans
Larry Wall has a great article up on perl.com about scripting languages and Perl 6. Topics include a survey of the most popular scripting languages, a history of "scripting", and design considerations for Perl 6.
http://www.perl.com/lpt/a/997 (Printer-Friendly Version Linked)
| comment on this post |
12/06/2007 - [ opinionjournal philosophy objectivism rand ] - posted by fansipans
In today's Best of the Web Today, James Taranto quotes "intelligence expert Charles Murray" as saying:
In the humanities, the most abstract field is philosophy--and no woman has been a significant original thinker in any of the world's great philosophical traditions.
Now, I'm not denying the fact that Ayn Rand was more of a man than most men, but I don't think that was literally true.
Now, to give Mr. Taranto, and his readers, their due, I'm sure he's receiving dozens of emails expressing this view, and he'll probably make some snarky comment about the fuzziness of standard gender roles regarding Eastern-European women in tomorrow's column :)
| comment on this post |
12/05/2007 - [ perl cgi::session benchmark serialization library module comparison json yaml syck data::dumper ] - posted by fansipans
Not like this is ever a bottleneck, but since it took just a couple minutes to compare, here's a benchmark of all available serialization classes for CGI::Session
( Benchmark Source Code )
Obviously the big lesson here is Data::Dumper is half as fast as everything else. At least it's not an order of magnitude difference or anything :)
fansipans@napkindrawing:~/tmp$ perl serialization_test.pl
Rate Data::Dumper FreezeThaw YAML Storable YAML::Syck JSON::Syck
Data::Dumper 28249/s -- -53% -54% -55% -56% -57%
FreezeThaw 60241/s 113% -- -2% -3% -6% -9%
YAML 61350/s 117% 2% -- -1% -4% -7%
Storable 62112/s 120% 3% 1% -- -3% -6%
YAML::Syck 64103/s 127% 6% 4% 3% -- -3%
JSON::Syck 66225/s 134% 10% 8% 7% 3% --
| comment on this post |
12/02/2007 - [ indiepoprocks internet radio ] - posted by fansipans
cute song: pants pants pants - dino love
| comment on this post |
12/02/2007 - [ coding out summit ] - posted by fansipans
Ahh, user settings make things easier, saved del.icio.us username+password in a few lines of code, as it should be.
The FIXMEs are starting to pile up, as is their wont (etymology of that phrase, anyone? Oh, sorry, comments coming soon :P)
Music: ahhhh Pixies + Elliott Smith
| comment on this post |
12/01/2007 - [ liquor furniture home decoration crateandbarrel livingroom ] - posted by fansipans
Holy crap, Cracker Barrel has dining room furniture for under a billion dollars!
New dining room booze storage: Madison Large Buffet and Galerie Spirits Cabinet - for all our CRUNK JUICE, SON.
| comment on this post |
12/01/2007 - [ coding out summit ] - posted by fansipans
Data::FormValidator is staying in place for the moment, blog posts have ghetto preview... comments?
D'OH! Need to finish user preferences :)
| comment on this post |
11/30/2007 - [ laptop asus eee ] - posted by fansipans
I just ordered a 4G Surf from Newegg :D
Given the RAM isn't soldered, and the juicy research/hacks/mods being done at the eee forums, I can't wait to chuck Debian on it and start working on my projects wherever I go.
| comment on this post |
11/29/2007 - [ laptop wishlist computer hardware ] - posted by fansipans
I've been obsessed with super cheap dell laptops recently. Sometimes on sale in the small business section they dip down below $450 for very respectable machines.
Since the Asus Eee came out, that's seemed even more attractive, then with the OLPC's G1G1 program, it seemed like you could actually get an XO-1 for the same price up front, with a tax deduction down the road... but will they ever ship? And seriously, 256MB RAM? That's enough for SSH and Firefox with one tab open, but not any real code running wild locally.
So now I'm looking at the Eee, for $350 with a fixed 512MB RAM, or $400 for the "privilege" of upgrading to 1GB or 2GB, after you pay for a DIMM (1GB: ~$30, 2GB: ~$65). Also, figure in $60 for an 8GB SDHC card.. the "Upgradeable" Eee is $400+$65+$60=$520 versus $350+$60=$410, and that's not including 5% or 10% newegg coupons.
Hell, 512MB is enough for Blackbox, PostgreSQL+LigHTTPD+FastCGI, Firefox, and some xterms. For $100+ I could get a USB GPS receiver, five cheap webcams, a 400GB external hard drive, a digital photo frame, a graphics (drawing) tablet, or a million other things, OR just save $100!
Edit: WOOHOO! The $350 model's ram isn't soldered!
| comment on this post |
hurf durf. performance issues.
11/29/2007 - [ napkindrawing programming perl performance ] - posted by fansipans
Just fixed a huge memory leak in CGI::Application::Plugin::AnyTemplate, which was causing each request to add 50k or so to the app's memory usage. Yet when it's nicely settled in now NapkinDrawing sucks up a gluttonous 40+ MB of RESIDENT memory. I'm suspicious of DBIx::Class, of course, but I'd like objective numbers to look at ...
| comment on this post |
11/26/2007 - [ indie music internet radio ] - posted by fansipans
Bears - Walk Away
| comment on this post |
Mo' Spring, and some loud old people
11/24/2007 - [ book coffee java out notes summit ] - posted by fansipans
More Spring in Action @ Summit. Badass highlights
include:
abstract beans annotated with
@Configurable("beanName") are configured by spring
even when instantiated outside of spring, using AspectJ
(!)
property editor string to class classes, simplifies bean
wiring by allowing string representation of custom class
instances (eg PhoneNumber, LatLongCoords, etc). p88
bean postprocessing, pre/post init p93, factory
postprocessors p96
configuration, JSP-EL style syntax for properties
p97
application events p101 ! ApplicationEvent,
ContextRefreshedEvent, RequestHandledEvent,
ApplicationListener, etc., OMFG ew- events are handled
synchronously - WTF!!
BeanNameAware interface, p104, example with
CronTriggerBean (cool, spring has Quartz built in). Also,
ApplicationContextAware,
bean scripting! p106.
| view comments (1) | comment on this post |
Waiter, there's a Spring in my coffee
11/23/2007 - [ book coffee java spring out summit ] - posted by fansipans
Reading Spring In Action at Summit. It's a pretty
impressive framework, and a good book, so much so that
the author eschews even one line of code as a
dependency on the spring API, it's really all POJOs :)
chapters 1,2,3: beans, application contexts, wiring, basic
pojo mojo, abstract beans, method injection (!), getter
injection (with prototype scope get a new object for every
getFoo() call)
| comment on this post |
11/22/2007 - [ napkindrawing ] - posted by fansipans
Yay! I have a web sites. :D Live and in production :) :) :)
| comment on this post |
