fansipans' recent posts
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 :)
| 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.”
| 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/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.
| 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.
| 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)
| 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
| 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 <strong>CSS framework</strong>, 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!
| 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
| 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:
<blockquote>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.</blockquote>
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
