<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>

		<title><![CDATA[jtolds.com - Featured]]></title>
		<link><![CDATA[http://www.jtolds.com/newsletter/category/featured]]></link>
		<description><![CDATA[JT Olds' RSS Feed for Featured]]></description>

		<language>en-us</language>
		<copyright>Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License</copyright>

<item>
	<title><![CDATA[Back the F:\ up!]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/12/2/back-the-f-up]]></link>

	<guid>1228238784</guid>
	<pubDate>Tue, 2 Dec 2008 17:26:24 +0000</pubDate>
	<description><![CDATA[<p><b>Hard drive primer</b></p>

<p>First, a bit about how hard drives work.</p>

<p>A hard drive is simply a circular disk (or a collection of them), kind of like a CD, except the data is stored magnetically instead of optically. To read the magnetic data, a little arm with a magnet on the end sticks out over the disk while the disk spins. The little arm reads data off the disk as the disk spin past.</p>

<p>The disk is moving <i>very</i> fast (common disks spin at 7,200 rpm, or about 86 miles per hour at the edge of a 3.5" disk). The arm is also <i>very</i> close to the disk (the head of the arm is 3-7 millionths of an inch away from the disk in modern drives, floating on a pocket of air). Scaled up, hard drives move at speeds similar to an airplane traveling nearly 16 times the speed of sound (mach 16) a width of a human hair (18 micrometers) above the ground!</p>

<p>So, as you can imagine, the worst thing that could possibly happen to a hard drive is for this drive head to crash into the disk, <i>destroying</i> your ability to read the data and scratching up the disk platter. I suppose it's worse if you shoot the drive with a shotgun.</p>

<p><i>But only barely.</i></p>

<p>It's very hard for hard drive manufacturers to make disks that don't crash when they're dropped while spinning. They try, but it's just hard to do. Recent laptop drives have gone as far as putting motion detection in so the drive head can be locked away from the disk platter if the drive detects that it's falling. Laptop makers generally recommend that you keep your laptop off (thereby locking the disk head) during any traveling. I sort of think that's silly though. What's the point of a laptop?</p>

<p><b>Calamity!</b></p>

<p>So, this week, my sister's laptop suffered an untimely and completely accidental calamity. As the laptop hit the ground, I thought, "boy, it's a good thing it's off."</p>

<p>It wasn't.</p>

<p>Then I thought, "boy, it's a good thing her brother <a href="http://www.mozy.com/">works for a backup company</a> and backed up all her homework for her."</p>

<p>I didn't.</p>

<p>I mean, I work for <a href="http://www.mozy.com/">Mozy</a>, but I'm one of those crazy <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> guys, and Mozy currently doesn't have a Linux client. As a result, I don't use Mozy on my own laptop, and therefore often forget to recommend it to others. I'm a big fan of the adage "practice what you preach;" in this case, I argue software companies should eat their own dogfood and use their own products. Whoops! I guess I'm the odd man out here. I am totally practicing some of the things I'm preaching already: building incredibly distributed, fault tolerant, relational metadata management systems to increase performance for Mozy's backend is fun! But I haven't been practicing or preaching "<a href="http://backthefup.net/">Back the F:\ up!</a>".</p>

<p>Well, this week, that changed. Be safe, use <a href="http://www.mozy.com/">Mozy</a>.</p>]]></description>
</item>

<item>
	<title><![CDATA[Crazy Dream]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/11/21/crazy-dream]]></link>

	<guid>1227250421</guid>
	<pubDate>Fri, 21 Nov 2008 06:53:41 +0000</pubDate>
	<description><![CDATA[<p>I just wanted to quickly share a book cover from a dream I had a few nights ago that I attempted to reconstruct as best I could. All I can say is that, evidently, the war in Iraq had a pretty seriously good reason: dinosaurs aren't extinct and it's been a massive government cover-up. Or so I tell myself while sleeping.</p>

<p><img src="/newsletter/images/spontaneous_raptors.jpg" alt="Dr. Andrew Weil's Spontaneous Raptor Attacks"/><br/>Yes, I seriously dreamed this.</p>

<p>Dr. Weil's advice was to wear white, not to avoid the raptors, but to assist doctors in quickly locating the inevitable flesh wounds.</p>]]></description>
</item>

<item>
	<title><![CDATA[News aggregation and economics]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/9/24/news-aggregation-and-economics]]></link>

	<guid>1222289886</guid>
	<pubDate>Wed, 24 Sep 2008 20:58:06 +0000</pubDate>
	<description><![CDATA[Currently, news websites and newspapers have news for people at the granularity of a day. Headlines are day-specific, and there is no way to decrease your granularity. Say you've been out of touch for a week or a month. I want to just read the major headlines over that week or month. As it is, however, I can only read the last few headlines for the last few days if I want to catch up, and hope that enough information is there to explain what's going on.
<br/>

<br/>
Really, what would be nice is, given a timescale (a week, 2 weeks, 13 days, a month, or something), a news service would feed back the most important headlines or news stories sorted by topic that happened over that timescale such that it would be easy to get up to speed on what happened. Even better (but harder): summaries of each issue.
<br/>

<br/>
By the way, the above service is <i>totally</i> on my list of things I think would make for a successful startup. If someone gets involved making the above thing, <a href="/contact/">I want to be involved</a>. It shouldn't be that spectacularly hard. I can't imagine it would be much different than the technology that runs the Techmeme family of news websites (<a href="http://www.techmeme.com/">Techmeme</a>, <a href="http://www.memeorandum.com/">memeorandum</a>, <a href="http://www.ballbug.com/">Ballbug</a>, and <a href="http://www.wesmirch.com/">WeSmirch</a>). Seems like a perfect Google App Engine application once they roll out automated job support.
<br/>

<br/>
Occasionally news services do this manually for stories when really big stuff happens. I link to <s>two</s> <i>three</i> of those that seem relatively important right now.<ul><li><a href="http://money.cnn.com/2008/09/15/news/economy/subprime_timeline/index.htm">Subprime timeline</a></li><li><a href="http://money.cnn.hu/galleries/2008/news/0809/gallery.week_that_broke_wall_street/index.html">The crisis: A timeline</a></li><li><b>New:</b> <a href="http://culture11.com/node/32322">5 Easy Pieces</a></li></ul>]]></description>
</item>

<item>
	<title><![CDATA[Can you make (10, 10, 9, 9, 1, +, /, -, *) = 4?]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/8/24/can-you-make-10-10-9-9-1-4]]></link>

	<guid>1219617348</guid>
	<pubDate>Sun, 24 Aug 2008 22:35:48 +0000</pubDate>
	<description><![CDATA[Last night at around 10pm I got a text from my friend asking how you could combine the numbers 10, 10, 9, 9, and 1, to make 4, using only addition, subtraction, multiplication, and/or division, provided you use the numbers once each.<br/>
<br/>
I didn't start thinking about it until later (sorry Mike), but at 2 am I got frustrated and, as I seem wont to do, ignored reasonable priorities (such as sleeping, or the rest of my todo list) and sat down to write a program to enumerate all of the possible solutions, instead of just figuring it out myself.<br/>
<br/>
Below is a general solution to the problem. The basic idea is it is simple enough to consider all the valid possible combinations of the numbers in Reverse Polish Notation (<a href="http://en.wikipedia.org/wiki/Reverse_Polish_notation">postfix</a>), and evaluate them.<br/>
<br/>
<code>#!/usr/bin/python2.5<br/>
<br/>
def add(x, y): return x + y<br/>
def sub(x, y): return x - y<br/>
def mult(x, y): return x * y<br/>
def div(x, y): return float(x) / y<br/>
OPERATIONS = [add, sub, mult, div]<br/>
REPRESENTATIONS = {add: '+', sub: '-', mult: '*', div: '/'}<br/>
<br/>
def new_counter(counter, item):<br/>
&nbsp; if counter is None: counter = 0<br/>
&nbsp; if type(item) == type(add): return counter - 1<br/>
&nbsp; else: return counter + 1<br/>
<br/>
def valid_perms(lst, counter=None):<br/>
&nbsp; if counter is not None and counter <= 0: return<br/>
&nbsp; if len(lst) == 1:<br/>
&nbsp; &nbsp; if new_counter(counter, lst[0]) != 1: return<br/>
&nbsp; &nbsp; yield lst<br/>
&nbsp; else:<br/>
&nbsp; &nbsp; for i in xrange(len(lst)):<br/>
&nbsp; &nbsp; &nbsp; for perm in valid_perms(lst[:i]+lst[i+1:], new_counter(counter, lst[i])):<br/>
&nbsp; &nbsp; &nbsp; &nbsp; yield [lst[i]] + perm<br/>
<br/>
def all_combos(lst, n):<br/>
&nbsp; if n == 0: yield []<br/>
&nbsp; else:<br/>
&nbsp; &nbsp; for i in xrange(len(lst)):<br/>
&nbsp; &nbsp; &nbsp; for combo in all_combos(lst, n - 1):<br/>
&nbsp; &nbsp; &nbsp; &nbsp; yield [lst[i]] + combo<br/>
<br/>
def uniq(generator):<br/>
&nbsp; seen_things=set([])<br/>
&nbsp; for thing in generator:<br/>
&nbsp; &nbsp; if tuple(thing) not in seen_things:<br/>
&nbsp; &nbsp; &nbsp; seen_things.add(tuple(thing))<br/>
&nbsp; &nbsp; &nbsp; yield thing<br/>
<br/>
def valid_postfix_stacks(nums):<br/>
&nbsp; for op_combo in uniq(all_combos(OPERATIONS, len(nums) - 1)):<br/>
&nbsp; &nbsp; for perm in uniq(valid_perms(nums + op_combo)):<br/>
&nbsp; &nbsp; &nbsp; yield perm<br/>
<br/>
def compute(stack):<br/>
&nbsp; s = []<br/>
&nbsp; for item in stack:<br/>
&nbsp; &nbsp; if type(item) != type(add):<br/>
&nbsp; &nbsp; &nbsp; s.append(item)<br/>
&nbsp; &nbsp; else:<br/>
&nbsp; &nbsp; &nbsp; s.append(item(*reversed([s.pop(), s.pop()])))<br/>
&nbsp; assert len(s) == 1<br/>
&nbsp; return s[0]<br/>
<br/>
def infix(stack):<br/>
&nbsp; s = []<br/>
&nbsp; for item in stack:<br/>
&nbsp; &nbsp; if type(item) != type(add):<br/>
&nbsp; &nbsp; &nbsp; s.append(str(item))<br/>
&nbsp; &nbsp; else:<br/>
&nbsp; &nbsp; &nbsp; s.append('(' + ' '.join(reversed([s.pop(), REPRESENTATIONS[item], s.pop()])) + ')')<br/>
&nbsp; assert len(s) == 1<br/>
&nbsp; return s[0]<br/>
<br/>
def main(nums, answer, tol=.0001, find_all=False):<br/>
&nbsp; print "searching..."<br/>
&nbsp; found = False<br/>
&nbsp; for postfix_stack in uniq(valid_postfix_stacks(nums)):<br/>
&nbsp; &nbsp; try: val = compute(postfix_stack)<br/>
&nbsp; &nbsp; except ZeroDivisionError, e: continue<br/>
&nbsp; &nbsp; if (float(val) + float(tol)/2 >= float(answer) and float(val) - float(tol)/2 <= float(answer)):<br/>
&nbsp; &nbsp; &nbsp; print infix(postfix_stack), '=', val<br/>
&nbsp; &nbsp; &nbsp; found = True<br/>
&nbsp; &nbsp; &nbsp; if not find_all: break<br/>
&nbsp; if not found: print "no solutions found"<br/>
 <br/>
if __name__ == "__main__":<br/>
&nbsp; main([10,10,9,9,1], 4)</code>]]></description>
</item>

<item>
	<title><![CDATA[Retrospect]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/8/24/retrospect]]></link>

	<guid>1219549590</guid>
	<pubDate>Sun, 24 Aug 2008 03:46:30 +0000</pubDate>
	<description><![CDATA[In retrospect, I think <a href="http://politics.slashdot.org/comments.pl?sid=221768&cid=17970082">this</a> joke is even more funny.<br/>
<br/>
I wish Slashdot allowed replies to old comments.]]></description>
</item>

<item>
	<title><![CDATA[How to get V4L2 devices to work with Flash]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/7/27/how-to-get-v4l2-devices-to-work-with-flash]]></link>

	<guid>1217200446</guid>
	<pubDate>Sun, 27 Jul 2008 23:14:06 +0000</pubDate>
	<description><![CDATA[<h3>Background</h3>Recently, I wanted to get a webcam I have working with <a href="http://www.tokbox.com/">TokBox</a>. The allure of TokBox is great, since it's videochatting with no downloadable software, as long as you have Flash set up correctly. Unfortunately, however, Flash currently supports Video4Linux version 1 devices, and most new webcam drivers for Linux are Video4Linux version 2. 
<br/>

<br/>
As of this writing, <a href="http://labs.adobe.com/technologies/flashplayer10/">Flash 10</a> Beta 2 is the most recent release of Adobe Flash, and it now <a href="http://blogs.adobe.com/penguin.swf/2008/07/turkish_localization_also_wmod.html">has support for V4L2 devices</a>! However, not many devices (<a href="http://blogs.adobe.com/penguin.swf/2008/07/paparazzi_v2_1.html">help out here</a>), and if you're not the sort of person that wants to uninstall your comforting Flash Player deb package for some beta tarball, Flash 10 Beta 2 isn't actually the solution yet.
<br/>

<br/>
So, I started looking for another way. Well, <a href="http://www.gstreamer.net/">Gstreamer</a> supports my webcam, and most other V4L2 devices, so if there was a way of converting a Gstreamer pipeline to a V4L (v1) device, then I'd be set. Turns out, there is! <a href="http://code.google.com/p/gstfakevideo/">gstfakevideo</a> was written so that Skype users could get better webcam support in Linux.
<br/>

<br/>
So now, if you want to get your Gstreamer-supported V4L2 video device to work with Flash (even pre-V4L2 supporting builds of Flash), follow these instructions. I admit they're a bit high-level.
<br/>

<br/>
<h3>Implementation</h3>First, grab <a href="http://code.google.com/p/gstfakevideo/">gstfakevideo</a>. I did everything with the repository's revision 3 (the latest at the time of this writing), so if the gstfakevideo people change something, these instructions will work with codetree version 3.
<br/>

<br/>
Stupidly, gstfakevideo is hardcoded to intercept any attempts to grab /dev/video0. You'll probably want to change that so applications can see all of your video devices, including the fake one we're about to make. I plan on submitting a patch to the gstfakevideo people soon so this is configurable, but haven't yet.
<br/>

<br/>
To fix this for now, you'll need to edit both the gstfakevideo shell script and gstfakevideo.c source before compilation. Just pick an unused video device name and change all instances in both files of /dev/video0 to your new video device. I just used /dev/video1. Then compile.
<br/>

<br/>
Next, find in the gstfakevideo script where it says "exec skype". Change that to exec firefox, or whatever webbrowser you use. Make sure you close your running webbrowser instances. Then, on your command line, try "./gstfakevideo v4l2src ! ffmpegcolorspace ! videoscale". All we're doing here is setting up a Gstreamer pipeline that the gstfakevideo library will convert to a V4L device. This should launch your webbrowser. Navigate to a website that has Flash and right click the Flash applet. Go to settings, and select the webcam tab. Change the input device to the gstfakevideo device and click the webcam icon box to see if it works. If it does, you're set.
<br/>

<br/>
If it doesn't work, there's a chance that figuring out a different Gstreamer pipeline would work better (the pipeline is the "v4l2src ! ffmpegcolorspace ! videoscale" part). If you can get the pipeline "videotestsrc is-live=true ! ffmpegcolorspace ! videoscale" to work, then Gstreamer is probably not the problem. Play around with pipelines (help elsewhere). You can test pipelines by using gst-launch (gst-launch-0.10 on Ubuntu Hardy). You'll need to add ! xvimagesink at the end of any pipeline given to gst-launch.
<br/>

<br/>
Once you have a working system, you can make the whole process a little easier to start up the next time around by replacing the line that says 'GST_PIPE="$*"' in the gstfakevideo script with 'GST_PIPE="v4l2src ! ffmpegcolorspace ! videoscale"' (or whatever pipeline you figured out), moving the libgstfakevideo.so file to /usr/local/lib, and renaming gstfakevideo to a name that makes more sense, like firefox-video. Then, move the script to somewhere more useful like ~/bin.  
<br/>
Every time you run that script, you'll start your browser with Flash support for your V4L2 Gstreamer default input device (configurable with gstreamer-properties). Since all you need is your compiled libgstfakevideo.so library and the script you just moved, you can delete the source directory.
<br/>

<br/>
Hooray!
<br/><br/>]]></description>
</item>

<item>
	<title><![CDATA[My OLPC software is actually useful!]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/5/9/my-olpc-software-is-actually-useful]]></link>

	<guid>1210367795</guid>
	<pubDate>Fri, 9 May 2008 21:16:35 +0000</pubDate>
	<description><![CDATA[In February, I received an <a href="http://www.laptop.org/">OLPC laptop</a> as part of their Give1Get1 program. One of the things it was missing was a way of launching native Linux applications and commands without opening a terminal, so I wrote a simple OLPC Activity that provided this ability to some extent. The project page is <a href="http://web.jtolds.com/projects/8/">here</a>.<br/>
<br/>
Early this week I found out that my little project is of some use to the <a href="http://www.teachingmatters.org/">Teaching Matters</a> non-profit, and they are now rolling out my app on XO laptops in NYC.<br/>
<br/>
<a href="http://olpcnyc.wordpress.com/2008/05/09/connecting-to-hidden-wifi-networks/">Here's the blog post where I'm mentioned.</a>]]></description>
</item>

<item>
	<title><![CDATA[Change Congress!]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2008/3/26/change-congress]]></link>

	<guid>1206516228</guid>
	<pubDate>Wed, 26 Mar 2008 07:23:48 +0000</pubDate>
	<description><![CDATA[It's hard to sell someone on a process instead of a person, but I assure you this is a much bigger deal than who the next president is, <span class="highlight">even though I hope this information sways your opinion there, too (see the bottom).</span>
<br/>

<br/>
If you have time, please watch this video:
<br/>

<br/>
<center><object type="application/x-shockwave-flash" data="http://blip.tv/scripts/flash/showplayer.swf?tabType3=guide&tabUrl3=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash%2F%3Fsort%3D%7Edate&tabTitle3=Episodes&tabType2=guide&tabUrl2=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&tabTitle2=Episodes&tabType1=details&tabUrl1=undefined&tabTitle1=About&enablejs=true&feedurl=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F770720&brandlink=http%3A%2F%2Fchange%2Dcongress%2Eorg&brandname=change%2Dcongress%2Eorg&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" width="400" height="255" allowfullscreen="true" id="showplayer"><param name="movie" value="http://blip.tv/scripts/flash/showplayer.swf?tabType3=guide&tabUrl3=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash%2F%3Fsort%3D%7Edate&tabTitle3=Episodes&tabType2=guide&tabUrl2=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&tabTitle2=Episodes&tabType1=details&tabUrl1=undefined&tabTitle1=About&enablejs=true&feedurl=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F770720&brandlink=http%3A%2F%2Fchange%2Dcongress%2Eorg&brandname=change%2Dcongress%2Eorg&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" /><param name="quality" value="best" /><embed src="http://blip.tv/scripts/flash/showplayer.swf?tabType3=guide&tabUrl3=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash%2F%3Fsort%3D%7Edate&tabTitle3=Episodes&tabType2=guide&tabUrl2=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&tabTitle2=Episodes&tabType1=details&tabUrl1=undefined&tabTitle1=About&enablejs=true&feedurl=http%3A%2F%2Fchange%2Dcongress%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F770720&brandlink=http%3A%2F%2Fchange%2Dcongress%2Eorg&brandname=change%2Dcongress%2Eorg&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" quality="best" width="400" height="255" name="showplayer" type="application/x-shockwave-flash"></embed></object></center>
<br/>
If you don't, please look at this website: <a href="http://change-congress.org/about/">http://change-congress.org/about/</a>.
<br/>

<br/>
<span class="highlight"><b>Update</b>: I hope I have convinced you that lobbying is bad. Now <a href="http://www.youtube.com/watch?v=24pDGQF6UW8">watch this</a>, then <a href="http://www.youtube.com/watch?v=lQK84pmCfBY">watch this</a>. Ahhhhhh!</span>
<br/><br/>]]></description>
</item>

<item>
	<title><![CDATA[Clarification]]></title>
	<author>JT Olds</author>

	<link><![CDATA[http://www.jtolds.com/newsletter/2007/6/13/clarification]]></link>

	<guid>1181697392</guid>
	<pubDate>Wed, 13 Jun 2007 01:16:32 +0000</pubDate>
	<description><![CDATA[So, I was linked to <a href="http://www.darkreading.com/document.asp?doc_id=126178&WT.svl=news1_1">this page</a> by <a href="http://www.virtualsoul.org/">someone</a> who was also featured, and I just wanted to clarify some slight factual errors. :)
<br/>
First, I would like to say I don't recall any standoff, but, you know, my memory is flakey. I'd also like to point out that if I did indeed revoke any root passwords, it was system wide, and I probably disabled that feature in its <i>entirety</i>. I may have, however, forgotten to distribute sudo access.
<br/>
Lastly, I suspect that I was hardly anyone's first lesson in security, and that certain people who seem to be well-enough established in the field to have articles written about them probably have had prior security experience.
<br/>

<br/>
Anyway, so, that's that.
<br/><br/>]]></description>
</item>

	</channel>
</rss>
