<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Alex Beutel's Mental Masturbation, Musings, and Methods</title>
	
	<link>http://blog.ambmediadesign.com</link>
	<description>The Mind of Alex Beutel</description>
	<lastBuildDate>Thu, 28 Jan 2010 03:24:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AlexBeutel" /><feedburner:info uri="alexbeutel" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Rankophilia and Rankophiliacs</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/4whRMrL_MWA/</link>
		<comments>http://blog.ambmediadesign.com/275/rankophilia-and-rankophiliacs/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 03:24:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Duke]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=275</guid>
		<description><![CDATA[For my CPS 182S class, we have an assignment which is a competition among groups of students (and the professor) to have the highest ranking page on Google for the terms rankophilia and rankophiliac.  As such, I have created a page at rankophilia.dorm.duke.edu to be my group&#8217;s main page on Google.  For now, there [...]]]></description>
			<content:encoded><![CDATA[<p>For my CPS 182S class, we have an assignment which is a competition among groups of students (and the professor) to have the highest ranking page on Google for the terms rankophilia and rankophiliac.  As such, I have created a page at <a href='http://rankophilia.dorm.duke.edu/' target='_blank' title='rankophilia, rankophiliac, rankphilia, rankphiliac'>rankophilia.dorm.duke.edu</a> to be my group&#8217;s main page on Google.  For now, there is not much interesting on there, and I am merely posting it here in an attempt to increase the PageRank.  I am considering adding more interesting content and submitting it around online rather than just spamming.  I will post updates (probably at least a few for links) as the contest goes on.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/4whRMrL_MWA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/275/rankophilia-and-rankophiliacs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/275/rankophilia-and-rankophiliacs/</feedburner:origLink></item>
		<item>
		<title>SQL Injection at Duke TechExpo 2009</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/enAdIIfAmuA/</link>
		<comments>http://blog.ambmediadesign.com/265/sql-injection-at-duke-techexpo-2009/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 19:56:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Duke]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=265</guid>
		<description><![CDATA[I gave my first public talk today at Duke&#8217;s TechExpo 2009.  I along with my coworker Artem Kazantsev discussed the risks of SQL Injection.  The presentation gives a good overview of the capabilities of SQL injection along with how to prevent such vulnerabilities.  I also gave a demo of performing a SQL [...]]]></description>
			<content:encoded><![CDATA[<p>I gave my first public talk today at <a href="http://techexpo.oit.duke.edu/" target="_blank">Duke&#8217;s TechExpo 2009</a>.  I along with my coworker Artem Kazantsev discussed the risks of SQL Injection.  The presentation gives a good overview of the capabilities of SQL injection along with how to prevent such vulnerabilities.  I also gave a demo of performing a SQL injection attack on a vulnerable site during the talk.  For any web programmers who aren&#8217;t familiar with SQL injection, take a look at the code for the demo to see exactly how and why it is vulnerable, along with how to fix these vulnerabilities.</p>
<p><a href="http://ambmediadesign.com/SQLInjection.pdf">SQL Injection Presentation</a></p>
<p><a href="http://ambmediadesign.com/SQLInjectionDemo.zip">SQL Injection Demo</a></p>
<p>Additionally, earlier in the year I worked with Duke&#8217;s ITSO to write up examples of good coding practices to protect against a variety of web application security issues.  This referenced is linked on Duke ITSO&#8217;s site here: <a href="http://www.security.duke.edu/ITSO_Web_Application_Security_Standard_v1.pdf">http://www.security.duke.edu/ITSO_Web_Application_Security_Standard_v1.pdf</a></p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/enAdIIfAmuA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/265/sql-injection-at-duke-techexpo-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/265/sql-injection-at-duke-techexpo-2009/</feedburner:origLink></item>
		<item>
		<title>Drag and Drop off the Desktop in Duke Webfiles</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/bbF0ViAONec/</link>
		<comments>http://blog.ambmediadesign.com/255/drag-and-drop-off-the-desktop-in-duke-webfiles/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 23:07:39 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Duke]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=255</guid>
		<description><![CDATA[While on break, I&#8217;ve been playing around with Mozilla&#8217;s File API and integrating it with Duke Webfiles, which I work on for OIT.  This is only a proof of concept since the spec has not been completed and I only implemented it in the icon view of Webfiles.  Regardless, I think it is [...]]]></description>
			<content:encoded><![CDATA[<p>While on break, I&#8217;ve been playing around with Mozilla&#8217;s File API and integrating it with <a href="http://webfiles.duke.edu" target="_blank">Duke Webfiles</a>, which I work on for OIT.  This is only a proof of concept since the spec has not been completed and I only implemented it in the icon view of Webfiles.  Regardless, I think it is pretty cool and makes the application much easier to use.  Here is a screencast to see it in action:</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/9RBfyC60ADI&#038;hl=en&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9RBfyC60ADI&#038;hl=en&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>To do this I used examples from <a href="http://www.thecssninja.com/javascript/drag-and-drop-upload" target="_blank">here</a> for the new File API and <a href="http://blog.igstan.ro/2009/01/pure-javascript-file-upload.html" target="_blank">here</a> for the AJAX upload.  Obviously this could be expanded upon by implementing it in all three file views in Webfiles and by showing progress bars for each file.  Additionally, there are some small bugs with uploading large files.  However, if you are a Duke student and want to give it a try, follow the instructions below.   Please note, this is a alpha version of the software, and you may run into some bugs when using it.</p>
<ul>
<li>Make sure you are using <a href="https://developer.mozilla.org/devnews/index.php/2009/08/07/firefox-3-6-alpha-1-now-available-for-download/">Firefox 3.6 Alpha &#8211; Namoroka</a>.</li>
<li>Go to our <a href="http://pnsdev.oit.duke.edu" target="_blank">development version of Webfiles</a> and log in.</li>
<li><em>After</em> you are logged in, go <a href="http://pnsdev.oit.duke.edu/#beta" target="_blank">here</a> to turn on the new drag and drop feature.</li>
</ul>
<p>Please, give it a try and let me know your thoughts.  Thanks.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/bbF0ViAONec" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/255/drag-and-drop-off-the-desktop-in-duke-webfiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/255/drag-and-drop-off-the-desktop-in-duke-webfiles/</feedburner:origLink></item>
		<item>
		<title>Hilbert Curve with the Canvas element</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/SmuSHCcBVPA/</link>
		<comments>http://blog.ambmediadesign.com/247/hilbert-curve-with-the-canvas-element/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 22:56:48 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Miscellanious]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=247</guid>
		<description><![CDATA[For my discrete math course (CPS 102) this semester, I had to create a space-filling curve for one of my homework assignments.  I decided to take this as an opportunity to play with HTML5&#8217;s canvas element since I&#8217;ve yet to had a legitimate use for it in any programming yet.  I think it [...]]]></description>
			<content:encoded><![CDATA[<p>For my discrete math course (CPS 102) this semester, I had to create a space-filling curve for one of my homework assignments.  I decided to take this as an opportunity to play with HTML5&#8217;s canvas element since I&#8217;ve yet to had a legitimate use for it in any programming yet.  I think it came out decently well (and it&#8217;s kind of fun to play with), so I thought I&#8217;d post it.  Here is a link to it on my Duke account <a href="http://duke.edu/~amb79/fillSpace.html" target="_blank">http://duke.edu/~amb79/fillSpace.html</a> Like I said, nothing huge but fun to program and cool to watch.</p>
<p>I am on fall break now, and will be spending the weekend at home.  Hopefully I&#8217;ll do something cool while I&#8217;m home and will post if anything comes out good.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/SmuSHCcBVPA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/247/hilbert-curve-with-the-canvas-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/247/hilbert-curve-with-the-canvas-element/</feedburner:origLink></item>
		<item>
		<title>Ubiquity Scripts</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/8cJ0cON15zI/</link>
		<comments>http://blog.ambmediadesign.com/233/ubiquity-scripts/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 07:17:58 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=233</guid>
		<description><![CDATA[After playing with the Jetpack API and having an increasing desire to procrastinate my Spanish homework, I decided to give the Ubiquity API a shot too and make a few small scripts just to make my life easier.  The first extension I made was a script to do look ups of IP addresses and get [...]]]></description>
			<content:encoded><![CDATA[<p>After playing with the Jetpack API and having an increasing desire to procrastinate my Spanish homework, I decided to give the Ubiquity API a shot too and make a few small scripts just to make my life easier.  The first extension I made was a script to do look ups of IP addresses and get more information about them.  This is useful mainly if you are looking at raw logs from a web server.  After realizing how easy it was to make these scripts, I made two more for bit.ly links which I frequently come across on Twitter.  The first can get more info and stats about a link (the number of clicks) and easily send you to the bit.ly info page for that link.  The second script can be used to quickly expand the links from their compressed bit.ly form to their original form.  I know there are other scripts that can do this across an entire page, but felt I&#8217;d rather keep short links with a quick and easy way to find out what the link contains.  If any of these sound interesting/useful or if you just want to see some simple examples of how to code Ubiquity extensions, you can check the scripts out <a href='http://ambmediadesign.com/scripts/ubiquity.html' target='_blank'>here</a>.  I have also included screenshots for each of these scripts below.</p>
<div style='padding: 7px;'><img src='http://ambmediadesign.com/scripts/iptrace2.png' /></div>
<div style='padding: 7px;'><img src='http://ambmediadesign.com/scripts/bitly-info.png' /></div>
<div style='padding: 7px;'><img src='http://ambmediadesign.com/scripts/bitly-expand.png' /></div>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/8cJ0cON15zI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/233/ubiquity-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/233/ubiquity-scripts/</feedburner:origLink></item>
		<item>
		<title>Image Aliasing of Plane Propellers in Photos and Video</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/BaCCznsVOjs/</link>
		<comments>http://blog.ambmediadesign.com/135/image-aliasing-of-plane-propellers-in-photos-and-video/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 05:33:27 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Miscellanious]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=135</guid>
		<description><![CDATA[Recently, while flying between Durham and New York, I decided to take a picture of the propeller during take off.  I don&#8217;t know what prompted to me to do this, but when I pointed my iPhone camera at the propeller out my window I noticed very odd pattens.  I took multiple pictures throughout the flight [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while flying between Durham and New York, I decided to take a picture of the propeller during take off.  I don&#8217;t know what prompted to me to do this, but when I pointed my iPhone camera at the propeller out my window I noticed very odd pattens.  I took multiple pictures throughout the flight with my iPhone, and in some cases at the same time took pictures/video with my Canon camera.  To clarify the specs of the two cameras: I have an iPhone 3G (8 GB) and a Canon SD700 IS.  As you will see in the pictures below, the iPhone&#8217;s picture simply makes no sense with the blades appearing to be disconnected vertical lines.  The photo from the Canon seems reasonable, but as you will see in the video the propeller appears to be going fairly slowly, when in real life all I could see was a blur because of how fast it was moving.</p>
<div style='display:block; width: 100%;'>
<div style='float:left;'>
<div id="attachment_155" class="wp-caption alignnone" style="width: 193px"><a href="http://blog.ambmediadesign.com/wp-content/uploads/2009/07/IMG_0140.png" class='thickbox' rel='propellers' title='Plane Propeller Photo from iPhone 3G'><img class="size-medium wp-image-155  " title="Plane Propeller Photo from iPhone 3G" src="http://blog.ambmediadesign.com/wp-content/uploads/2009/07/IMG_0140-225x300.png" alt="Plane Propeller Photo from iPhone 3G" width="183" height="243" /></a><p class="wp-caption-text">Plane Propeller Photo from iPhone 3G</p></div>
</div>
<div style='float:left;'>
<div id="attachment_134" class="wp-caption alignnone" style="width: 187px"><a href="http://blog.ambmediadesign.com/wp-content/uploads/2009/07/IMG_2451.JPG" class='thickbox' rel='propellers' title='Canon SD700 IS Plane Propeller Photo'><img class="size-medium wp-image-134     " title="Canon SD700 IS Plane Propeller Photo" src="http://blog.ambmediadesign.com/wp-content/uploads/2009/07/IMG_2451-300x225.jpg" alt="Canon SD700 IS Plane Propeller Photo" width="177" height="134" /></a><p class="wp-caption-text">Canon SD700 IS Plane Propeller Photo</p></div>
</div>
<div style='float:left;'><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="265" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/lTqwBKeKnLM&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="320" height="265" src="http://www.youtube.com/v/lTqwBKeKnLM&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
</div>
<div style='clear:both;'></div>
<div style='display:block;clear:both;'>
This got me thinking about why the images looked the way they did.  I assumed they were related to frame rate and as a result wondered if I could work backwards to find the speed of the propeller.  When I got back to Duke, I talked it over with some of my friends.  We discussed one theory that explained the slow spinning in the video from my Canon.  I later found out is similar to the Wagon-wheel effect, and will go into more detail on this later.  We also discussed possible distortions and other possible causes but couldn&#8217;t figure out exactly what was causing the odd pattern in the iPhone photo.  Eventually, I decided to search around the internet and found that I was <a href="http://www.flickr.com/photos/jerlich/sets/72157614852342118/">not the only one</a> to notice this oddity.  I also stumbled upon <a href='http://scalarmotion.wordpress.com/2009/03/15/propeller-image-aliasing/' target='_blank'>this great post</a> explaining clearly and graphically why the iPhone photo looks the way it does.  In short, most cameras save pixels from all parts of the lens at once, while the iPhone camera goes through the lens saving pixels linearly over time, similar to watching a scanner save the page of a book.  <strong>(If anyone has an iPhone 3GS and can snap a picture and/or video of a propeller, please let me know.  I&#8217;m very intrested to see if Apple&#8217;s upgraded camera still behaves this way.  Please let me know if you find out.)</strong>  The writer of the post also demonstrated this in a cool video made from a <a href="/propeller/originalPropeller.m">Matlab script</a>:
</div>
<div>
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/T055cp-JFUA&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/T055cp-JFUA&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
</div>
<div style='padding-top: 10px; padding-bottom:10px;'>
Personally, I think this is really cool so I decided to play around with it some more.  As I mentioned earlier, my friends and I had discussed the wagon-wheel effect or the stroboscopic effect, so I thought I&#8217;d modify his script to demonstrate it more clearly since the Wikipedia pages on the <a href='http://en.wikipedia.org/wiki/Wagon-wheel_effect' target='_blank'>two</a> <a href='http://en.wikipedia.org/wiki/Stroboscopic_effect' target='_blank'>topics</a> both seemed a bit lacking.  First, it is necessary to explain the general concept.  The stroboscopic effect explains if you only see flashes or quick individual frames of a moving object at regular intervals you can get a distorted view of the motion, especially if the motion of the object that is being watched is cyclic or has a frequency.  The relationship between the frequency of the flashes or frames and the frequency of the motion is what determines the perceived motion.  The most common case of this is seeing a wheel which you know to be rolling forward, but it looks to be spinning backwards slowly.  I modified the previous Matlab code to create a basic example of this with the propeller (download the code <a href="/propeller/propeller.m">here</a>).  As you will see, the propeller on the left will spin counterclockwise at a moderate speed and every 8 frames the image on the right will update with a copy of the image on the left.  This out of sync updating will make the propeller on the right appear to rotate clockwise.</div>
<div id="matlabDemoVideo" style="display: none;position: absolute;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1130" height="516" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/propeller/matlab demo2.swf" /><embed type="application/x-shockwave-flash" width="1130" height="516" src="/propeller/matlab demo2.swf"></embed></object></div>
<div>
<div id="attachment_169" class="wp-caption alignnone" style="width: 510px"><a class="thickbox" href="#TB_inline?height=516&#038;width=1130&#038;inlineId=matlabDemoVideo"><img src="http://blog.ambmediadesign.com/wp-content/uploads/2009/07/matlab-screenshot.png" alt="Click the image to view the video" title="Screenshot of Wagon-wheel video" width="500" class="size-full wp-image-169"  style='padding: 15px; width: 500px; cursor: pointer;' onmouseover='this.style.backgroundColor="#333";' onmouseout='this.style.backgroundColor="";' /></a><p class="wp-caption-text">Click the image to view the video</p></div></div>
<div style='padding-top:10px;'>
I also decided to show this more mathematically by plotting these movements in Mathematica.  In the following examples I graph both the y-coordinate of the tip of the propeller and the angle that the blade has rotated in radians.  In the graph of y the coordinate, there are three sinusoidal functions representing 3 propellers, each offset from the previous by 120 degrees (thus equally spaced).  These lines and their colors correspond to the colored lines on the radian vs. time graph.  The red lines mark a flash or frame and the dot on the line shows the top-most propeller.  As you vary the spacing of the lines and thus change the frame rate, you can see the propeller will appear to stay still, then go backwards, then flip back and forth with no perceived motion, then go forwards, until it appears to stand still again.  Below are pictures showing each of these stages, followed by a video fluidly showing these variations.
</div>
<div>
Here is the propeller appearing to stand still.  This is due to the fact that the spacing of the frames is twice the period.<br />
<a href='/propeller/still.png' target='_blank' class='thickbox' rel='mathematica' title='Propeller appearing to stand still'><img src='/propeller/still.png' style='width: 500px;'/></a><br />
The graphs below show the propeller appearing to go backwards.  Here we see that the frame rate is just below two periods of the propeller.  The downward slope on the radian graph is a simple quick way to see the direction of the propeller rotation.<br />
<a href='/propeller/backwards.png' target='_blank' class='thickbox' rel='mathematica' title='Propeller appearing to go backwards'><img src='/propeller/backwards.png' style='width: 500px;' /></a><br />
Propeller appearing to flip repeatedly:<br />
<a href='/propeller/flip.png' target='_blank' class='thickbox' rel='mathematica' title='Propeller appearing to flip repeatedly'><img src='/propeller/flip.png' style='width: 500px;' /></a><br />
This example shows the propeller appearing to rotate forwards.  Again, the upwards slope of the points on the radian graph is an easy way to see the direction of rotation.<br />
<a href='/propeller/forwards.png' target='_blank' class="thickbox" rel='mathematica' title='Propeller appearing to rotate forwards'><img src='/propeller/forwards.png' style='width: 500px;' /></a><br />
Last, here is the propeller appearing to stand still again.  Unlike the first case of the propeller standing still, the spacing of the frames is not a multiple of the period.  Rather, we see here that it is a multiple of 1/3 the period.  It is only necessary that the spacing be a multiple of 1/3 the period because there are three blades and the blades are indistinguishable.<br />
<a href='/propeller/still2.png' target='_blank' class='thickbox' rel='mathematica' title='Propeller appearing to stand still again'><img src='/propeller/still2.png' style='width: 500px;' /></a></p>
<div style='padding-top: 10px; padding-bottom:10px;'>
And finally, putting it all together:
</div>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="340" height="475" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/propeller/graphs.swf" /><embed type="application/x-shockwave-flash" width="340" height="475" src="/propeller/graphs.swf"></embed></object>
</div>
<p>The Mathematica code can be viewed <a href="http://gist.github.com/151142" target='_blank'>here</a> or downloaded <a href="/propeller/propeller.nb">here</a>, and a printout of the entire Mathematica worksheet can be found <a href='/propeller/mathematica printout.pdf'>here</a>.  Last, if one had a camera which could vary the frame rate just so slightly as to find two nearest frame rates to show the propeller standing still, the frequency of the propeller could be calculated as shown below.</p>
<div style='padding-bottom: 15px;'>
<img src='/propeller/calc1-1.png' />
</div>
<p>As for the iPhone picture, a single image (and knowing the number of blades) is enough to roughly approximate the speed of the propeller as shown below.</p>
<div style='padding-bottom: 15px;'>
<img src='/propeller/calc2-2.png' />
</div>
<p>However, just as a warning both of these are back of the envelope calculations and it is very possible I made a mistake (if so please let me know).  That is all for now.  Nothing ground breaking, but as the title suggests, it was a good chance for some mental masturbation, playing with Mathematica and Matlab.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/BaCCznsVOjs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/135/image-aliasing-of-plane-propellers-in-photos-and-video/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/135/image-aliasing-of-plane-propellers-in-photos-and-video/</feedburner:origLink></item>
		<item>
		<title>Duke LDAP on the iPhone</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/DLprqt3jacY/</link>
		<comments>http://blog.ambmediadesign.com/113/duke-ldap-on-the-iphone/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 23:11:41 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Duke]]></category>
		<category><![CDATA[Miscellanious]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=113</guid>
		<description><![CDATA[I got an e-mail this morning from someone who saw my post on Twitter about using LDAP on the iPhone here at Duke.  The person said they followed the tutorial but couldn&#8217;t quite get it to work.  So I figured it may be useful to post a few quick instructions on setting it up.  As [...]]]></description>
			<content:encoded><![CDATA[<p>I got an e-mail this morning from someone who saw my <a href="http://twitter.com/alexbeutel/status/2691509584" target="_blank">post</a> on Twitter about using LDAP on the iPhone here at Duke.  The person said they followed the tutorial but couldn&#8217;t quite get it to work.  So I figured it may be useful to post a few quick instructions on setting it up.  As the post on Twitter explains, the basic instructions for getting to adding an LDAP account can be viewed <a href="http://blogs.sun.com/chienr/entry/configuring_ldap_on_iphone_3" target="_blank">here</a> and Duke&#8217;s LDAP server settings can be found <a href="http://www.oit.duke.edu/email-accounts/dukemail/how-to/ldap.php" target="_blank">here</a>.  Once you are set to add the LDAP account, simply set the server to ldap.duke.edu, no need for a username or password.  Once you click next you will want to turn off SSL and change the Search settings for duke,edu to have a base value of &#8220;ou=People,dc=duke,dc=edu&#8221; (leave the scope at subtree).  And that&#8217;s it.  To use it, which turned out to be the issue for the person emailing me, go to write a new email and start to type in the name of the person to search.  You should see a throbber show up at the top of your screen, showing that it is connecting to the server.  There is a bit of a lag but it should eventually return the contacts for people by that name.  Below are some pictures of the settings and the search.  Let me know if you run into any issues.</p>
<div style='float:left; padding-bottom: 10px; padding-right: 20px;'><a href='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap1.png' target='_blank' class='thickbox' rel='ldap' title='Main Settings'><img src='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap1.png' title='Main Settings' style='height: 350px;' /></a></div>
<div style='float:left;'><a href='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap2.png' target="_blank" class='thickbox' rel='ldap' title='Search Settings'><img src='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap2.png' title='Search Settings' style='padding-bottom: 10px; height: 350px;' /></a></div>
<div style='clear:both;'></div>
<p><a href='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap4.png' target='_blank' class='thickbox' rel='ldap' title='Email Search'><img src='http://blog.ambmediadesign.com/wp-content/uploads/2009/07/ldap4.png' title='Email Search' style='height: 350px;' /></a></p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/DLprqt3jacY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/113/duke-ldap-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/113/duke-ldap-on-the-iphone/</feedburner:origLink></item>
		<item>
		<title>Google Reader vs. Netvibes, and Jetpack Notifications</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/VvY3B05kQGY/</link>
		<comments>http://blog.ambmediadesign.com/81/google-reader-vs-netvibes-and-jetpack-notifications/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 18:41:02 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jetpack]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=81</guid>
		<description><![CDATA[A couple of weeks ago I decided to give Google Reader a try.  I have been addicted to Netvibes for at least 2-3 years now, but I saw that Reader had a more active community around it, so I thought it was worth trying out.  Almost immediately I disliked the look and feel.  I am [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I decided to give Google Reader a try.  I have been addicted to Netvibes for at least 2-3 years now, but I saw that Reader had a more active community around it, so I thought it was worth trying out.  Almost immediately I disliked the look and feel.  I am subscribed to over thirty fairly active RSS feeds and  in Reader it was hard to see which blogs had new posts.  The default action is to just look at a long list and viewing posts by blog is almost hard to do.  As a result &#8220;Mark[ing] all as read&#8221; for a specific blog takes many more scrolls and clicks, which had been extremely easy in Netvibes.   About this time I was giving Mozilla&#8217;s Jetpack a try and found the Google Reader Notifier, which would notify me via Growl of new posts.  So I decided to give Reader a longer try, despite some initial disappointments.</p>
<p>Ultimately, I became addicted to these near instant updates for new blog posts that the Jetpack extension provided.  At the same time I learned to love the fact that by default I was forced to read the title for every blog post in Reader.  Where as before in Netvibes I would never scroll through the backed up posts from Gizmodo and Engadget, Reader&#8217;s chronological ordering makes me go through each post.  Recently, this is just another case where what I think I want does not match up with what actual creates a better user experience (similar to Google&#8217;s analysis of users searching more with 10 results despite asking for as many as possible or  Dan Curtis&#8217;s explanation that we are <a href="http://dustincurtis.com/you_should_follow_me_on_twitter.html" target="_blank">not in control of our deicions</a>).  Also, this reminds me of <a href="http://www.azarask.in/blog/" target="_self">Aza Raskin</a>&#8217;s <a href="http://andywibbels.com/2009/06/aza-raskin-google-techtalk/" target="_blank">statement</a> &#8220;Every time you make the user make a decision they don&#8217;t care about, you have failed as a designer.&#8221;  Interestingly, Google forced me to make a harder decision than I wanted to make; where before I could avoid deciding whether or not to remove the blog by just leaving it on my page and just easily clicking away new posts with &#8220;Marking all as read,&#8221; I now had to decide to either read the post titles or make the leap to get ride of the RSS feed all together.  While I was able to be lazy before, it made for a more concrete decision and user experience.</p>
<p>The other thing I realized was that the Jetpack extension for Reader notifications was causing my browser to hang when I had a bad internet connection.  Sadly, living in an off campus apartment with spotty Internet this happens all too often, and I decided to disable Jetpack.  However, I missed the notifications and decided to fix the Jetpack extension.  I reworked the old extension to only perform asynchronous AJAX calls, getting rid of the browser hanging issue, and modified the extension to display notifications to show new posts by blog title, thus making the notifications more informative.  The status bar display and the new Growl notifications can be seen below.  Click <a title="Jetpack - Google Reader Notifier" href="http://ambmediadesign.com/scripts/Jetpack-gReader.html" target="_blank">here</a> to install this extension or <a href="http://ambmediadesign.com/scripts/greader.js" target="_blank">here</a> to view the code.  Of course, let me know your thoughts or any bugs you run into.  Thanks.</p>
<p>Also, as some friends like <a href="http://nirum.tumblr.com/" target="_blank">Niru</a>, <a href="http://djsharkey.com/blogz" target="_blank">DJ</a>, and <a href="http://blog.mediabymrb.com/" target="_blank">Marc</a> have pointed out, I have somewhat decreased my blogging but have been posting a good number of posts on Twitter.  So of course, you should follow me on Twitter <a title="Twitter - Alex Beutel" href="http://twitter.com/alexbeutel" target="_blank">here</a>.</p>
<p><img style="padding-bottom: 15px;" src="http://ambmediadesign.com/scripts/statusbar2.png" alt="" /><br />
<img src="http://ambmediadesign.com/scripts/growl-greader2.png" alt="" /></p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/VvY3B05kQGY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/81/google-reader-vs-netvibes-and-jetpack-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/81/google-reader-vs-netvibes-and-jetpack-notifications/</feedburner:origLink></item>
		<item>
		<title>Following Chromium Progress</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/ySJUeGJMMn8/</link>
		<comments>http://blog.ambmediadesign.com/65/following-chromium-progress/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 20:52:13 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=65</guid>
		<description><![CDATA[For the past few months I have been following the progress of Chromium for Mac and watching it develop and it has definitely made a lot of progress in that time.  In the past few month it has received increasing press, with people asking why it is taking so long.  One of the [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few months I have been following the progress of Chromium for Mac and watching it develop and it has definitely made a lot of progress in that time.  In the past few month it has received increasing press, with people asking why it is taking so long.  One of the lead developers on the project <a href="http://weblogs.mozillazine.org/pinkerton/archives/020035.html" target="_blank">responded </a>that people need to chill out and that building a browser takes time.  So, in part to show myself and others the progress, I decided to make a little application to show this progress.  Throughout the day builds and updates of Chromium are posted to <a href="http://build.chromium.org/buildbot/snapshots/sub-rel-mac/" target="_blank">http://build.chromium.org/buildbot/snapshots/sub-rel-mac/</a> but to read each changelog was a pain.  So, to give myself more exposure to new Python libraries and give the Twitter API a swing, I created a script to check for changes to the builds, pull log entries on the changes and post them all to a <a href="http://twitter.com/chromiumUpdates" target="_blank">Twitter stream</a> so there is a single source you can view updates.  The script is far from perfect, as it has to be running to catch the updates and doesn&#8217;t go back and look for ones it missed.  And currently I just have it running on one of Duke&#8217;s servers so it goes down occasionally.  But it generally works and provides plenty of updates so you can see what is actually be worked on and updated.  Check out the <a href="http://ambmediadesign.com/chromium.py">source code</a> below (twitter username and password cut out).</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.ambmediadesign.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=65&amp;download=chromium.py">chromium.py</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p652"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code" id="p65code2"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># encoding: utf-8</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib2</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">base64</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span> <span style="color: #ff7700;font-weight:bold;">import</span> minidom
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> twitter<span style="color: black;">&#40;</span>twitter_username, twitter_password, message<span style="color: black;">&#41;</span>:
	request = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">Request</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'http://twitter.com/statuses/update.json'</span><span style="color: black;">&#41;</span>
	request.<span style="color: black;">headers</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'Authorization'</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">'Basic %s'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span> <span style="color: #dc143c;">base64</span>.<span style="color: black;">b64encode</span><span style="color: black;">&#40;</span>twitter_username + <span style="color: #483d8b;">':'</span> + twitter_password<span style="color: black;">&#41;</span>,<span style="color: black;">&#41;</span>
	request.<span style="color: black;">data</span> = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlencode</span><span style="color: black;">&#40;</span><span style="color: black;">&#123;</span><span style="color: #483d8b;">'status'</span>: message<span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">try</span>:
		response = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>request<span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># The Response</span>
	<span style="color: #ff7700;font-weight:bold;">except</span> HTTPError, e:
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Error posting to twitter&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;HTTP Error code: &quot;</span>, e.<span style="color: #dc143c;">code</span>
	<span style="color: #ff7700;font-weight:bold;">except</span> URLError, e:
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Error posting to twitter&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;URLError reason: &quot;</span>, e.<span style="color: black;">reason</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	message = <span style="color: #483d8b;">&quot;&quot;</span>
	last_update = <span style="color: #483d8b;">&quot;17514&quot;</span><span style="color: #66cc66;">;</span>
	chromium_url = <span style="color: #483d8b;">&quot;http://build.chromium.org/buildbot/snapshots/sub-rel-mac/&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">while</span><span style="color: black;">&#40;</span><span style="color: #008000;">True</span><span style="color: black;">&#41;</span>:
		<span style="color: #ff7700;font-weight:bold;">try</span>:
			response = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>chromium_url + <span style="color: #483d8b;">&quot;LATEST&quot;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">except</span> HTTPError, e:
			<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;HTTP Error code: &quot;</span>, e.<span style="color: #dc143c;">code</span>
		<span style="color: #ff7700;font-weight:bold;">except</span> URLError, e:
			<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;URLError reason: &quot;</span>, e.<span style="color: black;">reason</span>
		<span style="color: #ff7700;font-weight:bold;">else</span>:
			latest = response.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
			<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;latest: &quot;</span>, latest
			<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>latest <span style="color: #66cc66;">!</span>= last_update<span style="color: black;">&#41;</span>:
				<span style="color: #ff7700;font-weight:bold;">try</span>:
					response2 = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>chromium_url + latest + <span style="color: #483d8b;">&quot;/changelog.xml&quot;</span><span style="color: black;">&#41;</span>
				<span style="color: #ff7700;font-weight:bold;">except</span> HTTPError, e:
					<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;HTTP Error code: &quot;</span>, e.<span style="color: #dc143c;">code</span>
				<span style="color: #ff7700;font-weight:bold;">except</span> URLError, e:
					<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;URLError reason: &quot;</span>, e.<span style="color: black;">reason</span>
				<span style="color: #ff7700;font-weight:bold;">else</span>:
					html = response2.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
					<span style="color: #808080; font-style: italic;"># print html</span>
					dom = minidom.<span style="color: black;">parseString</span><span style="color: black;">&#40;</span>html<span style="color: black;">&#41;</span>
					entries = dom.<span style="color: black;">getElementsByTagName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;logentry&quot;</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;">#[0].childNodes</span>
					<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;entries: &quot;</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>entries<span style="color: black;">&#41;</span>
					<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>entries<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
						link = chromium_url + latest + <span style="color: #483d8b;">&quot;/ &quot;</span>
						msg = entries<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>.<span style="color: black;">getElementsByTagName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;msg&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">firstChild</span>.<span style="color: black;">nodeValue</span>
						num = entries<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>.<span style="color: black;">getAttribute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;revision&quot;</span><span style="color: black;">&#41;</span>
						<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Revision: &quot;</span>, num
						twitter<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;USERNAME&quot;</span>, <span style="color: #483d8b;">&quot;PASSWORD&quot;</span>, <span style="color: #483d8b;">&quot;Chromium Revision &quot;</span> + num + <span style="color: #483d8b;">&quot;: &quot;</span> + msg<span style="color: black;">&#41;</span>
					last_update = latest
			<span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">60</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
	main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Play with the code or follow the twitter.  Also, I decided to try a new Wordpress plugin for code so let me know what you think.  Thanks.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/ySJUeGJMMn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/65/following-chromium-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/65/following-chromium-progress/</feedburner:origLink></item>
		<item>
		<title>Begginning of Summer 2009</title>
		<link>http://feedproxy.google.com/~r/AlexBeutel/~3/yRlFdDqPnJY/</link>
		<comments>http://blog.ambmediadesign.com/49/begginning-of-summer-2009/#comments</comments>
		<pubDate>Sat, 30 May 2009 19:14:43 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Duke]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ambmediadesign.com/?p=49</guid>
		<description><![CDATA[As usual I haven&#8217;t posted in a while but there actually have been some things going on that may be worth writing on here.  I&#8217;m at Duke for the summer doing research with the Physics Neutrino group, among other things so here are some things that have happened:
Ethical Hacking Seminar
Duke OIT gave me the opportunity [...]]]></description>
			<content:encoded><![CDATA[<p>As usual I haven&#8217;t posted in a while but there actually have been some things going on that may be worth writing on here.  I&#8217;m at Duke for the summer doing research with the Physics Neutrino group, among other things so here are some things that have happened:</p>
<p><strong>Ethical Hacking Seminar</strong></p>
<p>Duke OIT gave me the opportunity to take this hacking seminar at Duke the first week of summer.  It was definitely an extremely beginner course and I was a little disappointed to see that so much of it was just &#8220;pick the right tool and run it,&#8221; but good opportunity to dig a little deeper into network protocols and learn some new things; without a doubt was worthwhile.  If anyone reading this is as much of a beginner as I am check out things like <a href="http://ettercap.sourceforge.net/" target="_blank">Ettercap</a>, <a href="http://nmap.org/" target="_blank">nmap</a>, and <a href="http://www.nessus.org/nessus/" target="_blank">Nessus</a>.</p>
<p><strong>Duke&#8217;s AFS Online Interface &#8211; Webfiles</strong></p>
<p>The past year I have been working with OIT, half doing web application security and half doing programming updating Duke&#8217;s online interface for its AFS file system, <a title="Duke Webfiles" href="http://webfiles.duke.edu" target="_blank">Webfiles</a>.  Essentially, it was an attempt to make the online interface more comfortable for average users and make it most similar to Windows Explorer and OS X Finder so that using it is as intuitive as possible.  The coding was anything but beautiful, but it was a good opportunity to learn more about Javascript and play with some fun things.  General changes are that it now has an icon and outline view, drag and drop, some of the typical shortcut keys, etc.  Below are some screenshots and I will try to create a demo site at some point.  I am also excited to say Duke is making all my code open source so let me know if you would like to implement it yourself.  I believe Carnegie Mellon is currently looking at deploying it on their systems, which I think is exciting.</p>
<p><span style="padding-right: 20px;"><a href="http://blog.ambmediadesign.com/wp-content/uploads/2009/05/icon.jpg" target="_blank"><img src="http://blog.ambmediadesign.com/wp-content/uploads/2009/05/icon-150x150.jpg" alt="icon" title="icon" height="150" class="alignleft size-thumbnail wp-image-55" /></a></span> <a href="http://blog.ambmediadesign.com/wp-content/uploads/2009/05/outline.png" target="_blank"><img src="http://blog.ambmediadesign.com/wp-content/uploads/2009/05/outline-150x150.png" alt="outline" title="outline" height="150" class="alignleft size-thumbnail wp-image-56" /></a></p>
<p><strong>Neutrino Physics</strong></p>
<p>I just started working with Professor Chris Walter and his Neutrino Physics group.  So far, just to get into the group, I have been working on creating a plug-in for <a href="http://root.cern.ch" target="_blank">ROOT</a> to make it read and write to a specific kind of distributed file system faster.  It has been an interesting experience getting back into C++ and a little bit of Fortran, and learning about this large project out of CERN.  I&#8217;m still finishing up the plug-in but hopefully I will be able to post the code or at least write about how to easily integrate the plug-in into ROOT when I&#8217;m done.  Not sure what I will be doing after that; I am taking classes on GEANT4 and think I will be doing monte carlo simulations of some sort for the rest of the summer, but I will write about this when I know more.</p>
<p><strong>Simple Flash Cards in Python</strong></p>
<p>The second reason I am here for the summer is that I need to take Spanish to fulfill Duke&#8217;s foreign language requirement.  If you actually know me, you will know that I am horrible at foreign languages and have been dreading taking these classes since I got to Duke.  It has now been two years since I last took a Spanish course, so jumping back into the language has been an interesting experience.  Also, Spanish 63 is known to be a lot of work and over the summer its so jam packed together that it is actually a good amount of work each night.  Anyway, we had our first test last Friday, and I had about 100 words of vocabulary to memorize, one of my worse skills.  So, both to procrastinate from actually studying and because I thought it could be useful, I decided to make a basic command line flash card program.  I&#8217;m trying to bit by bit pick up Python, so I used it and it was fairly simple.  The program essentially takes in a plain text file with the two sides of the flash card on one line, each side separated by a colon.  It then goes through the lines, shows you the second half of the line first, waits for you to press enter and then shows you the first half.  If you press enter again it will discard the word and go to another random word in the deck; if you type &#8216;x&#8217; and then press enter it will put the word back in the stack.  Fairly basic, and the code is nothing special; probably took about 15 minutes to throw together, but it was surprisingly very useful as I could run through a lot of the vocab very fast and repeatedly.  I&#8217;ll probably update it to make it a little better packaged together with proper arguments, etc. so you can check back for that.  Anyway, to run it (if you have a Mac python is installed by default and in Windows you need to do it yourself) open up a terminal and make sure you are in the folder where the code and the text file with the vocab are.  Then just type:</p>
<pre>python flashcards.py yourvocabfile.txt</pre>
<p>The code for <a href="http://ambmediadesign.com/flashcards.py" target="_blank">flashcards.py</a>  (<a href="http://ambmediadesign.com/genteDeCine.txt" target="_blank">example vocab linked here</a>) can be seen below:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.ambmediadesign.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=49&amp;download=flashcards.py">flashcards.py</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p494"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code" id="p49code4"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># encoding: utf-8</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">random</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> clearscreen<span style="color: black;">&#40;</span>numlines=<span style="color: #ff4500;">100</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">name</span> == <span style="color: #483d8b;">&quot;posix&quot;</span>:
        <span style="color: #808080; font-style: italic;"># Unix/Linux/MacOS/BSD/etc</span>
        <span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'clear'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">name</span> <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;nt&quot;</span>, <span style="color: #483d8b;">&quot;dos&quot;</span>, <span style="color: #483d8b;">&quot;ce&quot;</span><span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># DOS/Windows</span>
        <span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'CLS'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #66cc66;">*</span> numlines
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span>argv=<span style="color: #008000;">None</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">if</span> argv <span style="color: #ff7700;font-weight:bold;">is</span> <span style="color: #008000;">None</span>:
		argv = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span>
	allLines = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
	again = <span style="color: #483d8b;">'x'</span>
	<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>argv<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>:
		again = argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
&nbsp;
	f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> f:
		allLines.<span style="color: black;">append</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
&nbsp;
	clearscreen<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
	cnt = <span style="color: #ff4500;">0</span>
	wrong = <span style="color: #ff4500;">0</span>
	wWords = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
	<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>allLines<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:
		cnt += <span style="color: #ff4500;">1</span>
		l = allLines.<span style="color: black;">pop</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">random</span>.<span style="color: black;">randint</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>allLines<span style="color: black;">&#41;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
		parts = l.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;:&quot;</span><span style="color: black;">&#41;</span>
		p = <span style="color: #ff4500;">1</span>
		p2 = <span style="color: #ff4500;">0</span>
		<span style="color: #ff7700;font-weight:bold;">print</span> cnt, <span style="color: #483d8b;">&quot;(&quot;</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>allLines<span style="color: black;">&#41;</span>, <span style="color: #483d8b;">&quot;). &quot;</span>, parts<span style="color: black;">&#91;</span>p<span style="color: black;">&#93;</span>
		inp = <span style="color: #008000;">raw_input</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>inp == <span style="color: #483d8b;">&quot;exit&quot;</span><span style="color: black;">&#41;</span>:
			<span style="color: #ff7700;font-weight:bold;">break</span>
		<span style="color: #ff7700;font-weight:bold;">print</span> parts<span style="color: black;">&#91;</span>p2<span style="color: black;">&#93;</span>
		inp = <span style="color: #008000;">raw_input</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>inp == <span style="color: #483d8b;">&quot;exit&quot;</span><span style="color: black;">&#41;</span>:
			<span style="color: #ff7700;font-weight:bold;">break</span>
		<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>inp == again<span style="color: black;">&#41;</span>:
			allLines.<span style="color: black;">append</span><span style="color: black;">&#40;</span>l<span style="color: black;">&#41;</span>
			wrong += <span style="color: #ff4500;">1</span>
			wWords.<span style="color: black;">append</span><span style="color: black;">&#40;</span>l<span style="color: black;">&#41;</span>
		clearscreen<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	clearscreen<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Missed &quot;</span>, wrong, <span style="color: #483d8b;">&quot; times&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> wWords :
		<span style="color: #ff7700;font-weight:bold;">print</span> line
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
	<span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span>main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Again, nothing special or fancy, but seemed to work well; I guess I&#8217;ll know how effective it was when I get the test back haha.  Anyway that is all for now, I may make public a <a href="http://blog.ambmediadesign.com/32/catching-up/">post</a> I wrote a few months ago that I never published, so check for that and I&#8217;ll write of any other things I do this summer.  Also check my twitter as I post more frequently there.  Time to go outside.</p>
<img src="http://feeds.feedburner.com/~r/AlexBeutel/~4/yRlFdDqPnJY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ambmediadesign.com/49/begginning-of-summer-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.ambmediadesign.com/49/begginning-of-summer-2009/</feedburner:origLink></item>
	</channel>
</rss>
