April 2012
1 post
6 tags
It Starts with Florida
Just read the Nov/Dev 2011 Audobon magazine article, Life Support, about the improving state of Everglades since the author’s previous visit 10 years ago. I won’t go into the details of the article. Nor will I pretend to have a solution for that region. However, the article conjured up some environmentally-related memories from growing up in Florida, so here goes:
As a child I was...
March 2012
2 posts
2 tags
Tag stripping not sufficient to prevent JavaScript...
In the PHP world, solely relying upon PHP’s strip_tags() function to protect your web application from JavaScript injections is a bad idea. If you do, you may be vulnerable in even the most recent browsers (I tested in Chrome 17.0.963.83, Firefox 9.0.1 and Internet Explorer 9). There may be parallels in other languages too, so beware.
You’ll be vulnerable if the following are true:
...
3 tags
How to GitHub: Fork, Branch, Track, Squash and... →
Oh thank god! Branching I understood, but was clueless when it came to pushing up a specific branch.
Rebasing too … reminds me of how we badly need a separate dev environment at work. Ugh.
In all, a wonderful tutorial that helps you play along with others while programming.
February 2012
1 post
1 tag
Why French Parents Are Superior by Pamela... →
No, I’m far from having kids, but this was insightful nonetheless. Some noteworthy paragraphs:
One of the keys to this education is the simple act of learning how to wait. It is why the French babies I meet mostly sleep through the night from two or three months old. Their parents don’t pick them up the second they start crying, allowing the babies to learn how to fall back asleep....
January 2012
1 post
Not certain
Watched a 2005 Oregon PBS special about forest management last night. Link here. Saw some old guys with lots of land and trees managing it with intelligence. They don’t clear-cut. They have a clue about genetics so they save the best trees and sell the others. Made me think: Damn that looks like fun, rewarding work!
Especially the bits involving data collection. One guy kept detailed logs...
December 2011
1 post
2 tags
A dispatch from the Moose Ear Diner
Completed Puzzle Agent recently. It was such a fun game and luckily the sequel went on sale a few days after I finished it. The puzzles were a balanced mix of 10-second teasers, those where your only hope is to jump in and work through possible solutions, and those where you really need to pay attention.
Aside from the puzzles, the other aspects of the game are no slouch either. The story draws...
November 2011
2 posts
1 tag
The Thin Man
The Thin Man is a great movie. It’s filled with lovable characters, great pacing and a great plot. And of course I must mention the hilarious, witty protagonists. Luckily it’s only the first in a six-part film series. Looking forward to the rest!
4 tags
Character encodings in practice
Building upon Joel’s post on Unicode, here are some real-world tips relating to character encodings.
Use them by name
Always explicitly specify which encoding you want (perhaps UTF-8). Don’t assume the language or library/tool you’re using will make the right decision for you. If you value your time, don’t ignore this recommendation, otherwise you’ll likely spend...
September 2011
1 post
4 tags
node.js FTP server
Got to use node.js for a work project recently. We needed an FTP server with special user authentication that would run custom code after a file was uploaded. There was one node.js FTP server implementation on github, so I forked it and started rounding out the basic functionality. My fork is here.
The first significant change I made was to encapsulate the data connection logic. File lists and...
August 2011
5 posts
2 tags
Nature: Is that Skunk? →
Caught an episode of Nature last night. Great as always. Spotted skunks …. my, what a coat! You can watch the full episode, just click the title of this post.
2 tags
Lume Cabinet Lock Hint
If you play the game Lume you may get stuck at the cabinet lock. If so, don’t go to any other sites or you’ll accidentally see the answers like I did! Here’s a hint, instead.
You found the “9#” clue, right? Go back to where you can see that clue on the screen. Everything you need for the lock is right there. That’s all I’ll say.
3 tags
3 tags
Didn't build a heater
I didn’t expect learning of variations in Core 2 Duo processors and sockets while fixing my mom’s laptop to lead to interest in building a new PC, but that’s what happened. Shopping for parts takes too much time but I powered through, eventually narrowed it down, and made some purchases. Wanted something quiet and efficient (80 Plus Gold power supply, fanless graphics card, Core...
July 2011
1 post
4 tags
Notables
I finally finished fixing up my mom’s laptop. Several mis-diagnoses later, and it’s back with the original fan, new processor, new thermal compound, fast maxed-out RAM, new battery, and new install of Windows 7. Whew. One CAN buy laptop processors on Ebay if one pays attention.
The past few months have also taught me that some Amazon sellers will sneak a knock-off product to your...
June 2011
8 posts
3 tags
Teaching
Recently I became aware that while teaching I sometimes go on and on for far too long. It usually happens when I realize a student isn’t “getting it” after a period of time, after the rest of the group has moved on. I address them personally, repeat the nugget on information, and then I may go into the “why” portion of what I’m talking about, after which I may...
4 tags
Bossypants
Couldn’t pass up Tina Fey’s new book, Bossypants. I’ll start by saying that 30 Rock is the best comedy show on network television. And I’d be right. The Office faded fast. Family Guy got old after the 1st season. The Simpsons was probably good 10 years ago (though I was never a huge fan). But I don’t want to write about TV.
So yes, Tina Fey… Heard her...
2 tags
BeagleBoard-xM Update
I didn’t know the Angstrom card that shipped with my board would boot into X using DVI-D as the output. Decided to try it yesterday given my serial cable woes (more on that below), and it worked. Ethernet, USB keyboard and mouse, but didn’t test audio. So the board appears to be functioning properly.
Prior to testing the Angstrom card I tried an Android 2.3 image from TI made for...
2 tags
Wooah there, horsey
Lately, the thing I’ve wanted to yell most at people is “pay attention!” It should probably be prefixed by “slow down!” People don’t read. They don’t listen to what others say. They don’t pay attention to the details. They apparently think they’re effective at multi-tasking at light-speed.
2 tags
Velocity of Disappointment
I continue to like Merlin Mann’s podcasts. A few weeks ago I stumbled upon Back to Work. Being familiar with You Look Nice Today I figured it had to be good, so I jumped in without a clue what it was about. Turns out to be centered on:
fear
happiness
no-fluff life hacks
creative work
In episode 14, some things that really struck a chord with me were related to job unhappiness....
3 tags
concurrency learnings
There’s a job I’ve applied for that wants “strong concurrency coursework”, of which I’m lacking. Let’s start learning.
Visited stack overflow first for some example problems.
Learned that “embarassingly parallel” problems are those where little or no effort is required to separate the problem into parallel tasks, like serving static files from a...
3 tags
BeagleBoard-xM →
Going the common route for now. This will at least give me some hand-on cross-compilation experience for an architecture other than x86, and hopefully enough challenges to spark some deeper learning.
Oh how I love computers that don’t whirrrrr. Will be ordering shortly.
2 tags
Been powering through Embedded Linux Primer. A few high-level things I’ve learned:
initrd is old, initramfs is new
initramfs uses a CPIO image (a type of archive that was new to me) to hold the initial filesystem contents
Using TFTP to boot from a remote kernel and ramdisk sounds like fun, not to mention provides great flexibility for debugging.
It’s not so hard to add extra items...
May 2011
11 posts
2 tags
Some redis benching: intsets versus hash tables
My first motivation for investigating redis was due to an optimization challenge at work. Our network of websites covers track and field and cross-country. We have a database of 13 million performance records, and naturally our site provides visitors with the ability to view up-to-date rankings. Currently we use Sphinx for this, but Sphinx is geared for full-text search, and was quite slow...
1 tag
The supression of uncomfortable ideas may be common in religion or in politics,...
– Carl Sagan (Cosmos Episode 4)
3 tags
2 tags
PHP Sadness →
This title links to a wonderful list of things that are stupid about PHP. I’ve used PHP almost every week since 2001.
Reminds me that I publicly gave up on PHP about 3 years ago. But what is wrong with me … why haven’t I moved on yet? It’s because I keep taking PHP jobs, which are too easy to find. The current one will be my last. My foot is down.
4 tags
That's Babies. Indeed. →
“… that continuous spiritual deadening that the chirp of a child who you’re legally obliged to look after, in your right ear, constantly, and not letting up, and not letting you sleep …”
3 tags
Reading a book on Embedded Linux
What follows are thoughts while reading Embedded Linux - Hardware, Software and Interfacing. Really enjoyed it.
It walks through planning for an automation system for a winter resort. Currently at chapter 6 and there’ve been a few things I’ve not done before.
Right away I discovered you could use gdb remotely with gdbremote. Great for remote debugging of cross-compiled...
4 tags
Stop giving it away for free and start creating... →
The article hits home (click the title). And when you’re a creative type giving things away for free it can make you feel run-down and used.
I’ve had a few thoughts for infusing my Flam Swiss “brand” with more value. Producing more content that teaches is one idea. Wish I could say I had others.
2 tags
And the outcome is: I need to work less and learn more.
My lack of knowledge about Information Theory, and the fact that I don’t have the proper framework for thinking about information theory has cost me … my data structure breaks down for anything more than 16-bit numbers. But that’s fine. I was in over my head from the start. Though, it was fun.
4 tags
I might have come up with an original data structure. Awaiting feedback from a C programmer more experienced than myself, then we’ll see what Hacker News has to say. Excited!
3 tags
Coding to the Mastodon station on Pandora
Had the energy and focus to make more progress on my ideas for redis last night. See my previous post here if you don’t remember what those ideas were.
The only things left to do:
Fix freeSetObject() such that it frees intset and/or hash table memory that may have been allocated
Fix code in rdb.c that’s responsible for loading the data from disk and writing to it when redis is...
1 tag
3 tags
Redis sets - Always using the most efficient...
Had an idea for reducing the memory footprint of redis sets. A redis set may be encoded as an intset (if the set contains nothing but integers) or a hash table. But if a set contains integers and other values, you lose out on the benefit of intsets (speed and memory efficiency) and in some cases you have to wait while redis converts your intset to a hash table. This may not be a big penalty, but...
April 2011
10 posts
2 tags
Hate touchscreen typing
The qwerty keyboard on my old phone was nice. Considering one of these to fill the void:
One
Two
2 tags
Additional thoughts on working at coffee shops
Building upon Working Best at Coffee Shops, a great article with several possible explanations about why so many find it more enjoyable and often, more effective, to work in noisy public places.
Another possible explanation:
That working in an unpredictable, yet pleasant, environment keeps your energy levels up. Each person that walks through the door heightens your senses, provides a shot of...
2 tags
Temporarily low on generosity
It was a week ago that I first felt the inevitability of my change of heart, and Sunday the camel’s back broke. I’ve since stopped offering my drumline music for free.
The initial decision to offer my music at no cost wasn’t hastily made. At first, I priced my music between $3 and $10, which is what I thought it was worth, and had a few takers. Then I began split-testing to...
3 tags
Redis Ooops
Pieter responded to my thread. He’s worked on compressed sorted sets recently, and while doing that he fixed the issue I was having with intsets. His code should be merged into 2.2 in a few weeks after enough people have tested. Apparently I’m the only one to report the problem with intsets.
His branch’s code is similar to my approach, in that he also extended zsetopsrc with...
3 tags
At Thursday night’s PDX Hackathon I worked more on the redis changes I wanted to make. I mostly completed them, and announced my progress on the mailing list that night. Seems no one was aware that zinterstore was broken for a set encoded as an “intset” (a more efficient way to store sets of integers). So yay, I found a bug! But now another programmer has alerted me he’s...
3 tags
Spent another hour reading the redis source today, and I’m beginning to feel more enlightened. I’m thankful for the comment at the top of t_zset.c that describes how sorted sets are implemented with a hash and a skiplist. Weighing that knowledge against the t_set.c code for un-sorted sets, it’s now much clearer how the two types are alike and how they differ.
This is all in an...
3 tags
Knocked out Gary Vaynerchuk’s Crush It book a few Saturdays ago. Of course, this got me thinking once-again about other ways I could make some money.
Flam Swiss is fulfilling, but since by choice I’m targetting the high school level, there’s not a whole lot of opportunity for making money. Or at least not that I’m seeing right now. Most schools don’t have the funds...
2 tags
litl disappointed
I’m disappointed that litl’s webbook is so dependent upon flash. It appears they support it exclusively. Of course, I’d rather they supported open standards and open tools like JavaScript, with CSS and the canvas element, but maybe they’ll go in that direction soon.
However, I do find it endearing that they “… hate computers. At least the mainstream ones that...
4 tags
Hope to contribute to Redis
Yesterday, during lunch, I read through these blog posts that walk through the redis source code:
http://pauladamsmith.com/articles/redis-under-the-hood.html
http://pauladamsmith.com/blog/2011/03/redis_get_set.html
I won’t go into the details now, but while investigating redis for work I saw a use case where being able to intersect sorted and unsorted sets would be nice. Un-sorted...
March 2011
2 posts
I need to push records from MySQL into Redis faster than 100,000 every 35 seconds. I’ve already optimized the code, but it appears PHP isn’t meant for that sort of thing.
Update: Made sphinx searching faster, so utilizing Redis has been postponed. Kinda sad, kinda glad.
Migration Marker
Posts beyond this point were migrated to tumblr from my two previous blogs. Was tired of using wordpress and, more importantly, having my writings spread far and wide.
Thank you very much.
February 2011
2 posts
Readings
Too many URLs fly by me in a given week. Sometimes I take the time to digest them, usually after the tab’s been open for a week or more. Lately I’ve been making more of an effort to really think about what I read, to take notes, and share what I’ve learned.
Here are things I’ve read lately, along with the bits I found the most interesting.
10 Business Models that Rocked...
Writing More
I haven’t been writing enough lately. Facebook’s 2-cent interactions haven’t satisfied, and I’ve noticed myself having a harder time organizing and explaining complex thoughts. That needs to change.
On a related note, initially I thought it was a good idea to separate my blogs into technical and non-technical. My intent was to be considerate of whatever audience I may...
January 2011
2 posts
Thinkery is worth paying for
You might remember reading about my node.js + redis project … the tool that I wanted to use for daily journals, note-taking, blog post staging. Well, it has been made obsolete by thinkery.
If you fancy being able to jot things down quickly while using hashtags inline without having to assign categories or arrange items in a hierarchy, thinkery might be for you.
For power users, thinkery...
1 tag
Spam Comments ... Best Of
Every now and then a spam comment gets through Akismet and awaits moderation. Here are a few of the funnier ones. Of course, I’m not posting the links or websites they originally attempted to link to.
B says:
It can provide additional storage space.
Occasional table is the term used for any small table but, more generally for a cocktail, end table and sofa.
It never occurred to me...