<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Life and Science</title>
	<atom:link href="http://justinratner.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://justinratner.com</link>
	<description>Tasteless ramblings of a jaded grad student, passionate entrepreneur, less than stellar bluegrass picker and injured runner.</description>
	<lastBuildDate>Wed, 25 Jan 2012 05:50:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Express Oil Change on Roswell Road Possible Scam</title>
		<link>http://justinratner.com/2012/01/express-oil-change-on-roswell-road-possible-scam/</link>
		<comments>http://justinratner.com/2012/01/express-oil-change-on-roswell-road-possible-scam/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 18:08:59 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=645</guid>
		<description><![CDATA[One of the joys of having an old car is those times when you leave work, turn the key and realize that it&#8217;s going to be a long evening as your car refuses to start. Such was the case on &#8230; <a href="http://justinratner.com/2012/01/express-oil-change-on-roswell-road-possible-scam/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-646 alignleft" style="border-style: initial; border-color: initial;" title="expressoil" src="http://justinratner.com/wp-content/uploads/2012/01/expressoil.jpg" alt="" width="300" height="225" /></p>
<p>One of the joys of having an old car is those times when you leave work, turn the key and realize that it&#8217;s going to be a long evening as your car refuses to start. Such was the case on the evening of the 9th of January when I was headed home from a long day at the lab. After two and half hours, AAA managed to get my &#8217;95 Integra up to an Express Oil that I&#8217;ve been a loyal customer of for over a year. The next day I walked to Express Oil to have them take a look. Unfortunately, the diagnostic results showed that the car had no compression in the 3rd and 4th cylinders. This is a very bad sign, and I knew what I had to do. I talked to the guys at the shop and asked them if anyone wanted to buy it. The car was still in decent shape (besides the motor), and the parts were probably worth somewhere close to $2k. One of the guys immediately said he&#8217;d take it for $400, and I said I would take the offer. Then, I made arrangements to have my brother give me a ride to a dealership because there were some pretty good deals on leases going on.</p>
<p>Just before I left, the guy that was going to buy it informed me that he didn&#8217;t have my money right then, but he would on Friday (4 days away.) I told him I&#8217;d be out of town till Monday and asked what I should do with the car till then. He said that they would keep it there and look after it&#8211;no problem. I was concerned about any cost of storage that might be incurred, but he assured me there would be no cost since he was buying the car. I didn&#8217;t think much of it and left with my brother to go look at leases.</p>
<p>Monday rolled around, and I called the shop to speak to the guy that wanted to buy my car. He told me over the phone that a big bill came up that he had to pay or he would have been thrown in jail. At this point, I was skeptical. He said that he would still be able to buy it in two weeks after getting paid again. Then, he asked me if he could go ahead and put a new motor in it to have it ready to go when he pays me. Red flags started going off at this point, and I told him I&#8217;d have to think about it and hung up. I determined that it was probably wise to call up a salvage company, so I did. I had them meet me at the shop.</p>
<p>At the shop, the guy who wanted to buy the car started giving me a hard time because he felt like I was selling the car out from under him&#8211;I guess. I told him our deal was that he was going to buy it Monday, and he went against that deal. He tried to make some argument about how letting him buy the car was more cost effective since I wouldn&#8217;t be charged for storage and other fees. I said I wasn&#8217;t paying any storage fee because I never would have left the car there if he wasn&#8217;t going to buy it on the stated date. I would have just called the salvage company from day 1. That was my big mistake. Note: just call the damn salvage company.</p>
<p>He told me that I needed to come to the register and settle the payment. I noticed that the storage fee of $45 was still on the $130 invoice, so I demanded that he take it off. He refused. Meanwhile, the salvage company tow truck driver was getting pissed because he wanted to beat traffic. I told the autoshop guys to open the garage and let the car go, and I would work the payment details out with them. They refused multiple times, so I realized that the only way to get my car back from them was to let them charge my credit card. Since then, I&#8217;ve disputed the storage fee part of the charge with my credit card company.</p>
<p>Now, I&#8217;m going to offer up a theory I have as to what was going on here. I&#8217;m not stating it as fact&#8211;just a possibility. I think what they were trying to do was run up the cost of service&#8211;for example, two additional weeks of storage and a new motor. Then, they were going to low-ball me on the offer for the car and say that if I didn&#8217;t accept it that I would be charged for 17 days of storage and a new motor which could have been well over $1000. I certainly hope that wasn&#8217;t the case, but I believe I may have headed them off at the pass. That could be why they were so stand-offish. Things may have been much worse if I hadn&#8217;t acted quickly.</p>
<p>I&#8217;ve written this story here in hopes that other people avoid scams like this. I hope it was helpful and entertaining to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2012/01/express-oil-change-on-roswell-road-possible-scam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physics&#8230;What are you gonna do with that?</title>
		<link>http://justinratner.com/2011/09/physics-what-are-you-gonna-do-with-that/</link>
		<comments>http://justinratner.com/2011/09/physics-what-are-you-gonna-do-with-that/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 01:50:46 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[grad school]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=620</guid>
		<description><![CDATA[First, I&#8217;ll admit that in the past I&#8217;ve gone from being puzzled by this question to annoyed to down-right pissed off. It&#8217;s uncanny how often it comes up when I meet someone new. However, lately, I&#8217;ve learned to take it &#8230; <a href="http://justinratner.com/2011/09/physics-what-are-you-gonna-do-with-that/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First, I&#8217;ll admit that in the past I&#8217;ve gone from being puzzled by this question to annoyed to down-right pissed off. It&#8217;s uncanny how often it comes up when I meet someone new. However, lately, I&#8217;ve learned to take it in stride. I&#8217;ve figured out that people are either genuinely curious what a physics student might do after they graduate, or they are pretty much clueless about life in general. It&#8217;s actually a great advantage for me to get this question from someone early on . If I figure out which of the two cases they fall into, I can quickly decide whether to continue the conversation or go do something better, like eat a burrito.</p>
<p>Let me explain what&#8217;s wrong with this question, but, first, let me point out that if it&#8217;s asked, by mistake, by someone who&#8217;s genuinely curious, I&#8217;m happy to let it slide. &#8220;What are you gonna do with that?&#8221; First of all, the phrasing of the question is messy, inconsiderate and displays a general ignorance about higher education. It assumes that everyone is in school to graduate and get a job&#8211;in that order only. What if I&#8217;m in school because I&#8217;m genuinely fascinated by physics? What if I don&#8217;t care to work for some middle-manager who looks at me and only sees a conveyor belt? Is there any room for those possibilities in the phrasing of that question? The question is a setup. It&#8217;s deliberately, though sometimes by mistake, cornering me and saying, &#8220;So, tell me what desk you&#8217;re gonna be jockeying when you graduate.&#8221; After all, we&#8217;ve all got to be good little string puppets because there&#8217;s no room for independent thought in our society, right?&#8230;&#8230;.wrong!</p>
<p>Some people ask the question in a way that&#8217;s just downright snobbish. These people suck. They are actually saying, &#8220;Physics? Hahaha why would you study that? Only bankers and doctors make real money.&#8221; After all, life is all about money. When our delicate society crumbles and I get thrown in a political prison or if I make a few risky investments that go awry, my life will be over because all my precious green slips of paper will be gone. I should just end it all, right?&#8230;&#8230;.wrong!</p>
<p>Finally, can&#8217;t we just talk about something else? Is it so hard to make conversation? Ask me about physics itself. I just might explain things in a nice way that doesn&#8217;t make your face do that thing. How about I ask you about how your Aunt Willie May makes her raccoon stew? I hear it&#8217;s mighty tasty. Let&#8217;s laugh, carry on and be friends, but if you ask me that damn question, I&#8217;ll hit you square in the face with a burrito&#8230;..haha, just kidding&#8230;..but seriously.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/09/physics-what-are-you-gonna-do-with-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effect of Reference Pulse Width on XFROG</title>
		<link>http://justinratner.com/2011/05/effect-of-reference-pulse-width-on-xfrog/</link>
		<comments>http://justinratner.com/2011/05/effect-of-reference-pulse-width-on-xfrog/#comments</comments>
		<pubDate>Fri, 20 May 2011 17:56:57 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[physics]]></category>
		<category><![CDATA[ultrafast optics]]></category>
		<category><![CDATA[FROG]]></category>
		<category><![CDATA[XFROG]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=593</guid>
		<description><![CDATA[In preparation for the upcoming Frontiers in Optics conference, I&#8217;ve been experimenting with the cross-correlation frequency-resolved optical gating (XFROG) algorithm. We&#8217;d like to prove that it can be used to measure extremely complex laser pulses with time-bandwidth products of ~1000. &#8230; <a href="http://justinratner.com/2011/05/effect-of-reference-pulse-width-on-xfrog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In preparation for the upcoming Frontiers in Optics conference, I&#8217;ve been experimenting with the cross-correlation frequency-resolved optical gating (XFROG) algorithm. We&#8217;d like to prove that it can be used to measure extremely complex laser pulses with time-bandwidth products of ~1000. Our goal is to use XFROG to measure supercontinua. Supercontinua are the result of a laser pulse that has undergone a dizzying array of both linear and nonlinear processes and, ultimately, forms a very broadband source of light. We believe that using XFROG to measure supercontinua is the first step towards measure it with double-blind XFROG for which two pulses are simultaneously measured. This would allow for the measurement of the reference pulse and supercontinua simultaneously with a fairly simple device.</p>
<p>Currently, I am running some tests on how the reference pulse width effects the performance of the retrieval algorithm. I&#8217;ve generated simulated pulses with time-bandwidth products of ~1000. Using these pulses along with transform-limited Gaussian references pulses of varying widths, I&#8217;ve generated FROG traces to be run through the algorithm. I&#8217;ve placed some examples of how the reference pulse width effects the polarization gating XFROG trace given by the equation below.</p>
<p><img src="http://justinratner.com/wp-content/ql-cache/quicklatex.com-e0c10f95d276f77d004a914739608efc_l3.png" class="ql-img-inline-formula" alt="&#73;&#40;&#92;&#111;&#109;&#101;&#103;&#97;&#44;&#92;&#116;&#97;&#117;&#41;&#32;&#61;&#32;&#124;&#92;&#105;&#110;&#116;&#95;&#123;&#45;&#92;&#105;&#110;&#102;&#116;&#121;&#125;&#94;&#123;&#43;&#92;&#105;&#110;&#102;&#116;&#121;&#125;&#32;&#69;&#95;&#123;&#117;&#110;&#107;&#125;&#40;&#116;&#41;&#32;&#124;&#69;&#95;&#123;&#114;&#101;&#102;&#125;&#40;&#116;&#45;&#92;&#116;&#97;&#117;&#41;&#124;&#94;&#50;&#32;&#101;&#94;&#123;&#45;&#105;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;&#125;&#32;&#100;&#116;&#124;&#94;&#50;" title="Rendered by QuickLaTeX.com" style="vertical-align: -6px;"/></p>
<p>1/10th standard deviation of  unknown I(t)<br />
<a href="http://justinratner.com/wp-content/uploads/2011/05/10thStdDev.png"><img class="alignnone size-medium wp-image-595" title="10thStdDev" src="http://justinratner.com/wp-content/uploads/2011/05/10thStdDev-300x236.png" alt="" width="300" height="236" /></a></p>
<p>1/5th Std. Dev. I(t)<br />
<a href="http://justinratner.com/wp-content/uploads/2011/05/5thStdDev.png"><img class="alignnone size-medium wp-image-596" title="5thStdDev" src="http://justinratner.com/wp-content/uploads/2011/05/5thStdDev-300x238.png" alt="" width="300" height="238" /></a></p>
<p>1/2 Std. Dev. I(t)<br />
<a href="http://justinratner.com/wp-content/uploads/2011/05/2xStdDev.png"><img class="alignnone size-medium wp-image-598" title="2xStdDev" src="http://justinratner.com/wp-content/uploads/2011/05/2xStdDev-300x236.png" alt="" width="300" height="236" /></a></p>
<p>These FROG traces show intensity vs. angular frequency (vertical axis) and delay. It is clear that increasing the reference pulse width in time with respected to the unknown pulse washes out the temporal features as expected. However, the reverse will be the case for transform-limited references pulses that are broad in frequency compared to the unknown pulse. It is important to optimize the reference pulse for the best resolution is both domains.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/05/effect-of-reference-pulse-width-on-xfrog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Fall of American Manufacturing</title>
		<link>http://justinratner.com/2011/04/the-fall-of-american-manufacturing/</link>
		<comments>http://justinratner.com/2011/04/the-fall-of-american-manufacturing/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 16:02:52 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[gdp]]></category>
		<category><![CDATA[manufacturing]]></category>
		<category><![CDATA[trade]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=581</guid>
		<description><![CDATA[What happens to a service-based economy when the countries it depends on for tangible goods decide to stop trading? It&#8217;s a troubling scenario, but it&#8217;s not far-fetched. Take a look at Sinopec: http://www.reuters.com/article/2011/03/08/china-npc-sinopec-idUSBJI00260720110308. Source: http://www.bea.gov/industry/gdpbyind_data.htm]]></description>
			<content:encoded><![CDATA[<p>What happens to a service-based economy when the countries it depends on for tangible goods decide to stop trading? It&#8217;s a troubling scenario, but it&#8217;s not far-fetched. Take a look at Sinopec: <a href="http://www.reuters.com/article/2011/03/08/china-npc-sinopec-idUSBJI00260720110308">http://www.reuters.com/article/2011/03/08/china-npc-sinopec-idUSBJI00260720110308</a>.</p>
<p><a href="http://justinratner.com/wp-content/uploads/2011/04/usManufacturingPercGDP1947-2009.png"><img class="alignnone size-full wp-image-582" title="usManufacturingPercGDP1947-2009" src="http://justinratner.com/wp-content/uploads/2011/04/usManufacturingPercGDP1947-2009.png" alt="" width="2227" height="1412" /></a></p>
<p>Source: <a href="http://www.bea.gov/industry/gdpbyind_data.htm">http://www.bea.gov/industry/gdpbyind_data.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/04/the-fall-of-american-manufacturing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use the FoRCE computing cluster</title>
		<link>http://justinratner.com/2011/04/how-to-use-the-force-computing-cluster/</link>
		<comments>http://justinratner.com/2011/04/how-to-use-the-force-computing-cluster/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 17:05:05 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[FoRCE]]></category>
		<category><![CDATA[gatech]]></category>
		<category><![CDATA[PACE]]></category>
		<category><![CDATA[super computer]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=545</guid>
		<description><![CDATA[I&#8217;m trying to recount some of this from memory, so bare with me. The FoRCE (http://pace.gatech.edu/force-cluster) computing cluster is part of the PACE program at Georgia Tech. It is a shared resource that is available to any researcher at GT &#8230; <a href="http://justinratner.com/2011/04/how-to-use-the-force-computing-cluster/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to recount some of this from memory, so bare with me. The FoRCE (<a rel="nofollow" href="http://pace.gatech.edu/force-cluster">http://pace.gatech.edu/force-cluster</a>) computing cluster is part of the PACE program at Georgia Tech. It is a shared resource that is available to any researcher at GT dependent on the submission and acceptance of a small proposal. Participants can add dedicated nodes to FoRCE for a fee.</p>
<ol>
<li>Submit the <a rel="nofollow" href="http://www.pace.gatech.edu/sites/default/files/FoRCE-proposal-template.doc">proposal form</a> to force-allocations@lists.gatech.edu.</li>
<li>Download <a rel="nofollow" href="http://cygwin.com/install.html">Cygwin</a> and <a rel="nofollow" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty</a>
<ol>
<li>When installing Cygwin, it will ask  you what packages you would like to to install. Make sure that the net package, which includes ssh, and the xorg-server package are selected. The xorg-server package allows you to use GUIs (i.e. I type matlab into the command line of the head node and a matlab GUI opens up on my desktop.) If you&#8217;re still confused, read more about it at <a rel="nofollow" href="http://x.cygwin.com/">Cygwin-X</a>.</li>
</ol>
</li>
<li>Go to Cygwin-X in your programs menu and start the XWin Server</li>
<li>Open Putty and apply settings as shown
<ol>
<li>use ssh and enter the address: &lt;username&gt;@force.pace.gatech.edu<br />
<a href="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip1.png"><img class="alignnone size-medium wp-image-551" title="ScreenClip1" src="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip1-300x292.png" alt="" width="300" height="292" /></a></li>
<li>Enable X11 forwarding<br />
<a href="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip2.png"><img class="alignnone size-medium wp-image-552" title="ScreenClip2" src="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip2-300x290.png" alt="" width="300" height="290" /></a></li>
<li>You can save this session to make things easy when you start Putty up in the future</li>
<li>Click open and putty will ask about an RSA fingerprint. Press enter.</li>
<li>Enter your gt password</li>
</ol>
</li>
<li>Now you are logged into the head node of the FoRCE cluster. Type &#8220;xeyes &amp;&#8221; and you should see:<br />
<a href="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip3.png"><img class="alignnone size-full wp-image-553" title="ScreenClip3" src="http://justinratner.com/wp-content/uploads/2011/04/ScreenClip3.png" alt="" width="153" height="128" /></a></li>
<li>If you saw the eyes, everything should be working properly. Try typing &#8220;matlab&#8221;. The matlab gui should open.</li>
</ol>
<p>Now get to work solving the world&#8217;s problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/04/how-to-use-the-force-computing-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run an ssh tunnel in the background</title>
		<link>http://justinratner.com/2011/04/run-an-ssh-tunnel-in-the-background/</link>
		<comments>http://justinratner.com/2011/04/run-an-ssh-tunnel-in-the-background/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 13:29:54 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[ssh tunnel]]></category>

		<guid isPermaLink="false">http://justinratner.com/?p=540</guid>
		<description><![CDATA[Usually, creating an ssh tunnel initiates a prompt on the remote ssh server, but it&#8217;s easy to run it as a background process: ssh -f -N -L localip:localport:destinationip:destinationport username@ssh_serverip -f forks the process -N no command to be run on &#8230; <a href="http://justinratner.com/2011/04/run-an-ssh-tunnel-in-the-background/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Usually, creating an ssh tunnel initiates a prompt on the remote ssh server, but it&#8217;s easy to run it as a background process:</p>
<p><strong>ssh -f -N -L localip:localport:destinationip:destinationport username@ssh_serverip</strong></p>
<p>-f forks the process<br />
-N no command to be run on server<br />
-L binds the port for forwarding</p>
<p>Now, whenever localip:localport is accessed on the machine this command was typed on, it forwards traffic to destinationip:destinationport. I had to do this to allow my mysql server on my university computer to communicate with our cluster.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/04/run-an-ssh-tunnel-in-the-background/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django dynamic forms on the fly</title>
		<link>http://justinratner.com/2011/02/django-dynamic-forms-on-the-fly-variable-field/</link>
		<comments>http://justinratner.com/2011/02/django-dynamic-forms-on-the-fly-variable-field/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 20:56:37 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Dynamic Forms]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://www.justinratner.com/?p=510</guid>
		<description><![CDATA[Django is a really nice web framework for Python, and it definitely speeds up the development of web apps. In particular, Django makes it ridiculously easy to create web forms. It&#8217;s as simple as creating a new class with a &#8230; <a href="http://justinratner.com/2011/02/django-dynamic-forms-on-the-fly-variable-field/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Django web framework for python" href="http://www.djangoproject.com" target="_blank">Django</a> is a really nice web framework for <a title="object-oriented, extensible programming " href="http://www.python.org" target="_blank">Python</a>, and it definitely speeds up the development of web apps. In particular, Django makes it ridiculously easy to create web forms. It&#8217;s as simple as creating a new class with a few attributes:</p>
<pre>
class ContactForm(forms.Form):
    subject = forms.CharField(max_length=100)
    message = forms.CharField()
    sender = forms.EmailField()
    cc_myself = forms.BooleanField(required=False)
</pre>
<p>Any instance of ContactForm will have the methods the template engine needs to create nice looking forms automagically. In addition, it will have convenient methods for validation and cleaning data.</p>
<p>Django&#8217;s forms library is certainly convenient. In fact, it&#8217;s almost too convenient. There may be times when the paradigm seems a bit restrictive, and the workarounds seem to defeat the purpose of using Django&#8217;s forms library as a matter of convenience. For example, I found myself wanting a form with a variable number of fields depending on some previous input. This, in essence, is a dynamic form. Fortunately, <a href="http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/">someone</a> had already tackled this problem as is often the case for problems I run across with Django. This elegant solution uses the type method in python to create a class that inherits forms.BaseForm and is assigned attributes via a dictionary argument. Here&#8217;s how I applied it to my madlib generator:</p>
<pre>
def make_edit_form(lib):
    fields = { 'phrase': forms.CharField(widget=forms.Textarea),}
    numBlanks = lib['numBlanks']
    for k in range(1,numBlanks+1):
        fields['blank'+str(k)] = forms.CharField(required=False)
    return type('EditLibForm',(forms.BaseForm,),{ 'base_fields': fields })
</pre>
<p>This dynamic form creates a field for each blank that exists in my madlib phrase. The output of this function is a class which thanks to the wonder of Python can be aliased and instanced:</p>
<pre>
EditLibForm = make_edit_form(current_madlib)
form = EditLibForm(request.POST)
</pre>
<p>It&#8217;s easy as pie, and I like pie. In particular, I like pecan and pumpkin pie which I will gladly accept as a donation towards this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/02/django-dynamic-forms-on-the-fly-variable-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 Lucid LAMP and beyond</title>
		<link>http://justinratner.com/2011/02/ubuntu-10-04-lucid-lamp-and-beyond/</link>
		<comments>http://justinratner.com/2011/02/ubuntu-10-04-lucid-lamp-and-beyond/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 03:23:31 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtual hosts]]></category>

		<guid isPermaLink="false">http://www.justinratner.com/?p=407</guid>
		<description><![CDATA[Linode has, probably, the most complete guide to setting up a LAMP stack in Ubuntu that I have seen. They even go a step further by showing the reader how to manage and configure virtual hosts on Apache2. I&#8217;m posting &#8230; <a href="http://justinratner.com/2011/02/ubuntu-10-04-lucid-lamp-and-beyond/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="linode library lamp guides" href="http://library.linode.com/lamp-guides/ubuntu-10.04-lucid/" target="_blank"><img class="size-medium wp-image-438 alignleft" title="linode-site-logo" src="http://www.justinratner.com/wp-content/uploads/2011/02/linode-site-logo-300x60.png" alt="" width="300" height="60" /></a>Linode has, probably, the most complete guide to setting up a LAMP stack in Ubuntu that I have seen. They even go a step further by showing the reader how to manage and configure virtual hosts on Apache2. I&#8217;m posting it here mainly so I don&#8217;t forget about it because I find myself repeatedly referring back to it.</p>
<p><a title="linode lamp ubuntu guide" href="http://library.linode.com/lamp-guides/ubuntu-10.04-lucid/" target="_blank">http://library.linode.com/lamp-guides/ubuntu-10.04-lucid/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/02/ubuntu-10-04-lucid-lamp-and-beyond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check your WAN IP from the command line in Ubuntu</title>
		<link>http://justinratner.com/2011/02/check-your-wan-ip-from-the-command-line-in-ubuntu/</link>
		<comments>http://justinratner.com/2011/02/check-your-wan-ip-from-the-command-line-in-ubuntu/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 00:34:12 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.justinratner.com/?p=393</guid>
		<description><![CDATA[Create a simple script: mkdir ~/bin cd ~/bin nano whatismyip.sh Now, copy and paste these commands into the script: #!/bin/bash wget www.whatismyip.com/automation/n09230945.asp -O - -q echo exit 0 Make the script executable: chmod u+x ~/bin/whatismyip.sh Type ~/bin/whatismyip.sh into the terminal.]]></description>
			<content:encoded><![CDATA[<p>Create a simple script:<br />
<code><br />
mkdir ~/bin<br />
cd ~/bin<br />
nano whatismyip.sh<br />
</code></p>
<p>Now, copy and paste these commands into the script:<br />
<code><br />
#!/bin/bash</p>
<p>wget www.whatismyip.com/automation/n09230945.asp -O - -q<br />
echo</p>
<p>exit 0<br />
</code></p>
<p>Make the script executable:<br />
<code><br />
chmod u+x ~/bin/whatismyip.sh<br />
</code></p>
<p>Type <code>~/bin/whatismyip.sh</code> into the terminal.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/02/check-your-wan-ip-from-the-command-line-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ridiculously Awesome and Amazing Guide to Household Light Bulbs: Incandescent, Compact Fluorescent  (CFL) and LED</title>
		<link>http://justinratner.com/2011/01/guide-to-household-light-bulbs-incandescent-compact-fluorescent-cfl-and-led/</link>
		<comments>http://justinratner.com/2011/01/guide-to-household-light-bulbs-incandescent-compact-fluorescent-cfl-and-led/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 18:27:04 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[cfl led incandescent]]></category>
		<category><![CDATA[energy saving]]></category>
		<category><![CDATA[guide]]></category>

		<guid isPermaLink="false">http://www.justinratner.com/?p=332</guid>
		<description><![CDATA[Choosing the right light bulbs for a home or office can lead to millions of dollars in savings! OK, maybe not millions, but choosing the right bulbs means some extra Benjamins in our pockets, improved family morale, fewer mercury-exposed children and &#8230; <a href="http://justinratner.com/2011/01/guide-to-household-light-bulbs-incandescent-compact-fluorescent-cfl-and-led/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Choosing the right light bulbs for a home or office can lead to millions of dollars in savings! OK, maybe not millions, but choosing the right bulbs means some extra Benjamins in our pockets, improved family morale, fewer mercury-exposed children and a nicer looking home. In this article, I will consider factors like cost, spectral emission, directivity, etc. to help the reader make an educated buying decision. I will assume that all bulbs have the same brightness (measured number of lumens.) This is not a bad assumption if quality bulbs are purchased.<span id="more-332"></span></p>
<h2><strong>Cost</strong></h2>
<p>This part is easy because I&#8217;ve created a nice, formula-driven <a title="Incandescent, cfl, led comparison spreadsheet" href="https://spreadsheets.google.com/ccc?pli=1&amp;key=tB6DfpZOlvDyy3WYsrr_Slw#gid=0" target="_blank">spreadsheet</a> for the reader. It calculates the cost of running a single light bulb for a given amount of time. Just download the spreadsheet off of Google Docs as an excel sheet and play around with the numbers. Here is some additional documentation because I have a feeling that what may seem obvious to me (since I created the thing) may not be obvious to everyone:</p>
<p><strong>Total Hours</strong> represents the total time running the bulbs. The default value is the equivalent of running the bulbs continuously for five years&#8211;leap years taken care of <img src='http://justinratner.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p><strong>Unit Cost</strong> this is the cost of a single light bulb. Obviously, this will change depending on brand, merchant, etc. Feel free to adjust the numbers.</p>
<p><strong>Life Span</strong> is the number of continuous hours that a manufacturer predicts a given type of bulb will last.</p>
<p><strong>Cost of Changing </strong>represents the maintenance cost or, maybe, the opportunity cost of changing the light bulb. Someone&#8217;s gotta do the dirty work, and, of course, there&#8217;s a cost associated with that work.</p>
<p><strong>Power Cost</strong> is what the power company is going to charge you per kilowatt-hour.</p>
<p><strong>Power Consumed </strong>represents how much power a given light bulb consumes during operation. This is specified in kilowatts, so please remember that if a bulb is a 60 watt bulb, it will consume 0.060 kilowatts.</p>
<p>These are the numbers that should be fiddled around with. Go to town!</p>
<h2><strong>Spectral Emission</strong></h2>
<p>Here is where we get into some heavy physics stuff, but it&#8217;s going to be awesome and easily understandable. I promise.</p>
<p>I&#8217;m sure many of us have been disappointed by the light produced by bulbs other than incandescents. What is it about incandescent light that just seems right? Trying to answer this question can lead us astray&#8211;straight into the metaphysical. This is completely counterproductive for the purpose of this article, so let&#8217;s ask a different question. How do we compare the light produced by different bulbs?</p>
<p style="text-align: center;"><img class="size-medium wp-image-340 aligncenter" title="spectra" src="http://www.justinratner.com/wp-content/uploads/2011/01/spectra-300x106.jpg" alt="" width="300" height="106" /></p>
<p style="text-align: left;">The above picture displays the intensity vs. wavelength of one incandescent bulb, three different CFL bulbs and a white LED bulb. This image is produced by allowing the light emitted from the bulbs to interact with a dispersive element like a <a href="http://en.wikipedia.org/wiki/Prism_(optics)" target="_blank">prism</a> or <a href="http://en.wikipedia.org/wiki/Diffraction_grating" target="_blank">optical grating</a>. A dispersive element can split light into its composite colors (wavelengths.) The reddish colors represent longer wavelengths. Suddenly, it&#8217;s obvious why the light from different kinds of bulbs varies so much. For example, there are significant gaps in the spectrum of CFL bulbs. In other words, the intensity of light at those wavelengths is near zero. Incandescents have a smooth &#8220;<a title="Incandescent as a blackbody" href="http://en.wikipedia.org/wiki/Black_body" target="_blank">black body</a>&#8221; emission profile while the CFLs are missing colors! We can see that the spectrum of the LED bulb is a much better match to the incandescent bulb. Although, if we look closely, there is an intense line of emission in the blue that sets it apart from the incandescent.</p>
<p style="text-align: left;">In the end, a preference for the light produced by one kind of bulb over another is completely a matter of personal preference. However, looking at the spectrum shows us that LEDs make a really great candidate for the replacement of incandescents. Also, the situation in which a particular light bulb will be employed is a determining factor. Personally, I have found that CFLs make great bathroom lights. They are very white and point out all of my flaws magnificently.</p>
<h2><strong>Directivity, Flicker and Dim-ability</strong></h2>
<p>Directivity determines how bright a light bulb is when you&#8217;re looking at it from next to the portrait of Aunt Ida on one side of the room vs. how bright it is when looking at it from next to your collection of miniature, stuffed ant-eaters on the other side of the room.</p>
<p style="text-align: center;">Incandescent</p>
<p style="text-align: center;"><a href="http://www.olino.org/us/articles/2009/04/03/40w-incandescent-lightbulb" target="_blank"><img class="alignnone size-medium wp-image-347" title="gamma_40w_incandescent_pp_avg" src="http://www.justinratner.com/wp-content/uploads/2011/01/gamma_40w_incandescent_pp_avg-294x300.png" alt="" width="294" height="300" /></a></p>
<p style="text-align: center;">CFL</p>
<p style="text-align: center;"><a href="http://www.olino.org/us/articles/2008/10/05/gogreen-dimbare-spaarlamp-6-20w-e27" target="_blank"><img class="alignnone size-medium wp-image-348" title="gogreen_spaarlamp_dimbaar_6-20w_e27_ww_pp_avg" src="http://www.justinratner.com/wp-content/uploads/2011/01/gogreen_spaarlamp_dimbaar_6-20w_e27_ww_pp_avg-294x300.png" alt="" width="294" height="300" /></a></p>
<p style="text-align: center;">LED</p>
<p style="text-align: center;"><a href="http://www.olino.org/us/articles/2011/01/20/tevea-xq-lite-6-5w-dimmable-ledlamp-e27" target="_blank"><img class="alignnone size-medium wp-image-349" title="XQ-litedimbareLedE27_PP_avg" src="http://www.justinratner.com/wp-content/uploads/2011/01/XQ-litedimbareLedE27_PP_avg-294x300.png" alt="" width="294" height="300" /></a></p>
<p style="text-align: left;">The above figures are radiation patterns of the three different kinds of light bulbs that we are talking about. Radiation patterns are simply polar plots of light intensity at any given angle. We can see that the incandescent bulb has a very broad profile. It is nearly omni-directional. The CFL has a very irregular radiation pattern probably due to the twisting shape of the tube. The LED bulb radiates much more power in the forward direction than the incandescent. This may be due to the non-light-emitting base of the standard LED bulb. Of course, placing any sort of cover or shade over these bulbs will change their radiation patterns.</p>
<p style="text-align: left;">In household light bulbs, most flickering occurs at frequencies too fast for the human eye to see. However, in my experience, irregular power fluctuations in a home&#8217;s electrical system can cause incredibly irritating flickering in CFLs. Unfortunately, I have not been able to test LED bulbs under the same circumstances, but when I replaced, those particular CFLs with incandescents, the problem went away.</p>
<p style="text-align: left;">Dim-ability is often an important concern when someone is seeking to create a certain atmosphere in their home. This might be particularly important when lighting artwork or other wall decorations. There is an extraordinary amount of excellent data on dim-ability and much more available from an awesome website called <a title="Excellent source of green energy data" href="http://olino.org/us/" target="_blank">Olino</a>. Of course, all incandescents should be beautifully dim-able, but most LED and CFL bulbs have to be specially made for dimming. Manufacturers will often specify whether a particular bulb is dim-able.</p>
<h2><strong>Environmental Concerns</strong></h2>
<p>CFLs are hands-down bad for the environment. They contain 1-5mg of mercury and need to be recycled. Otherwise, the mercury they contain may end up contaminating the water supply. An <a href="http://earth911.com/news/2007/06/01/balancing-environmental-impact-household-lighting/" target="_blank">article on Earth911</a> claims that the mercury from one CFL bulb can contaminate 6000 gallons of water to a point unsuitable for drinking. Some businesses will take your used CFL bulbs. For example, I have heard that most IKEA stores will take them for free.</p>
<p>However, one might try to argue that incandescent bulbs have a larger mercury footprint. While incandescents do not contain mercury in the bulb, they require more energy than other bulbs which means more burning of coal by power plants. When coal is burned, there are <a title="EPA fact sheet " href="http://web.archive.org/web/20051103092737/http://www.nema.org/lamprecycle/epafactsheet-cfl.pdf" target="_blank">significant emissions</a> of mercury into the atmosphere. In addition, older types of incandescent bulbs have been known to contain lead, so consumers should check for any notes from manufacturers before throwing bulbs in the trash.</p>
<h2><strong>Known Issues</strong></h2>
<p><span style="color: #000000;">CFLs are probably the biggest culprit when it comes to operational problems. Personally, I have witnessed buzzing and random changes in brightness from some sockets. <a title="CFL problem" href="http://www.thehomeknowitall.com/the_home_knowitall/2008/10/solving-cfl-pro.html" target="_blank">Others</a> have experienced complete operational failure in homes with old wiring. A look at some manufacturer specifications reveals that CFLs only operate between 10-120 degrees Fahrenheit. In addition, CFLs are sensitive to humidity, have been know to catch fire, smoke and emit odors, can have their lifetimes drastically reduced by on/off cycling, can take up to 5 minutes to reach full brightness and are not known for their durability by any means.</span></p>
<p><span style="color: #000000;">In the way of LED bulbs, the most common complaint at this point is that their brightness doesn&#8217;t stack up to incandescents and CFLs. This problem can be avoided by buying quality bulbs from reputable companies. A bulb&#8217;s brightness is easily measured, and any company worth their bulbs will take the time to verify that their bulbs are indeed equivalent to standard incandescents. This problem will most likely clear up as the technology moves forward&#8211;much in the same way it did for CFLs.</span></p>
<p><span style="color: #000000;"><strong>Summing it up&#8230;</strong></span></p>
<p>At this point, I&#8217;m quite tired of writing about light bulbs, so I think I&#8217;m going to leave it at that. If there is something crucial that I have left out, please let me know. Hopefully, the reader now has the information to make an educated choice in lighting for his or her home. As we have seen, there are many factors to take into account, but in my opinion, LED bulbs are going to be the way of the future. These bulbs will be so good that they may never have to be thrown away during the entire lifetime of the home, and they may even offer neat, new lighting features like presets for custom spectral emissions. Happy hunting!</p>
]]></content:encoded>
			<wfw:commentRss>http://justinratner.com/2011/01/guide-to-household-light-bulbs-incandescent-compact-fluorescent-cfl-and-led/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

