<?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>Bret Kuhns</title>
	<atom:link href="http://www.bretkuhns.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bretkuhns.com/blog</link>
	<description>Programming, Cars, and Life</description>
	<lastBuildDate>Mon, 05 Apr 2010 14:03:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I Love My Summer Tires</title>
		<link>http://www.bretkuhns.com/blog/2010/04/i-love-my-summer-tires/</link>
		<comments>http://www.bretkuhns.com/blog/2010/04/i-love-my-summer-tires/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:03:43 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Cars]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[summer tires]]></category>
		<category><![CDATA[tires]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=123</guid>
		<description><![CDATA[I absolutely love &#8220;Extreme Performance&#8221; summer tires! Last year I put my snow tires on early after noticing the extra wear on my summer tires, hoping to save the tread for this summer. I finally got my set of Bridgestone Potenza RE-01R&#8217;s back on last night and I am absolutely floored at the difference in [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_124" class="wp-caption alignright" style="width: 260px"><a href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/04/bridgestone_re01r.jpg"><img class="size-full wp-image-124" title="Bridgestone Potenza RE-01R" src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/04/bridgestone_re01r.jpg" alt="" width="250" height="250" /></a><p class="wp-caption-text">Bridgestone Potenza RE-01R tires provide oodles of grip.</p></div>
<p>I absolutely love &#8220;Extreme Performance&#8221; summer tires! Last year I put my snow tires on early after noticing the extra wear on my summer tires, hoping to save the tread for this summer. I finally got my set of <a href="http://www.tirerack.com/tires/tires.jsp?tireMake=Bridgestone&amp;tireModel=Potenza+RE-01R&amp;partnum=045WR6RE01R">Bridgestone Potenza RE-01R&#8217;s</a> back on last night and I am absolutely floored at the difference in my car. I completely forgot the level of grip these tires provide. It is literally a night and day difference, every aspect of my car&#8217;s performance has improved. The stock alloys my Potenzas are mounted on are lighter than the snow tires&#8217; steel wheels, so the car accelerates faster. The lateral grip blows the snow tires out of the water (comparison accelerometer log coming soon!) with an amazing improvement in steering response and highway straight-line stability courtesy of rock-solid sidewalls. But most importantly, the car now tugs at your face a bit in a hard stop.</p>
<p>If you&#8217;re driving a performance car without performance tires, you&#8217;re absolutely insane. It&#8217;s impossible to describe the feeling of confidence you get in the car when you can feel it so firmly planted to the ground. Imagine running around wearing bowling shoes versus a good pair of tennis shoes. That&#8217;s how drastic a difference I feel with these tires. Now I just need the money for <a href="http://en.wikipedia.org/wiki/Slick_tyre#R_compound_tyres_.28grooved_slicks.29">R-compound tires</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/04/i-love-my-summer-tires/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hyperterminal Replacement For Linux</title>
		<link>http://www.bretkuhns.com/blog/2010/03/hyperterminal-replacement-for-linux/</link>
		<comments>http://www.bretkuhns.com/blog/2010/03/hyperterminal-replacement-for-linux/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 18:17:21 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenLog]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=108</guid>
		<description><![CDATA[This is a little gem I found recently when I needed to communicate with my OpenLog board. A lot of tutorials want you to pull up HyperTerminal in Windows to talk to OpenLog over the USB-&#62;UART bridge. My biggest problem with this is that I&#8217;m primarily a Linux user, where HyperTerminal is unavailable. That&#8217;s all [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little gem I found recently when I needed to communicate with my <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9530">OpenLog</a> board. A lot of tutorials want you to pull up HyperTerminal in Windows to talk to OpenLog over the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8772">USB-&gt;UART bridge</a>. My biggest problem with this is that I&#8217;m primarily a Linux user, where HyperTerminal is unavailable. That&#8217;s all well and good, however, I&#8217;ll just boot into my Windows 7 install and do it, right? Wrong. Windows 7 no longer ships with HyperTerminal. I jumped back to my Ubuntu Linux install and started hunting for a HyperTerminal replacement. The best solution I ended up finding was a command-line application called <a href="http://en.wikipedia.org/wiki/Minicom">minicom</a>. This handy little app is a bit to get the hang of, but once you&#8217;re using it, it works like a charm. Here&#8217;s a quick rundown of connecting to a serial device over USB using Minicom.<span id="more-108"></span></p>
<p>First, let&#8217;s figure out the path to our serial device. Ubuntu typically places these devices at /dev/ttyUSB#. Use the following command to determine the appropriate number of your device.</p>
<pre class="brush: plain; gutter: false;">$ ls /dev/ttyUSB*</pre>
<p>Now we&#8217;ll install Minicom to get started.</p>
<pre class="brush: plain; gutter: false;">$ sudo apt-get install minicom</pre>
<p>Once that&#8217;s complete, we&#8217;ll need to configure Minicom so that it&#8217;s using the correct port. To do this, run the command below.</p>
<pre class="brush: plain; gutter: false;">$ minicom -s</pre>
<p>You&#8217;ll be prompted with a configuration menu. Arrow down to &#8220;Serial port setup&#8221; and press enter.</p>
<div id="_mcePaste">
<pre class="brush: plain; gutter: false;">+--------------------------------------------------------+
| A -    Serial Device      : /dev/ttyUSB0               |
| B - Lockfile Location     : /var/lock                  |
| C -   Callin Program      :                            |
| D -  Callout Program      :                            |
| E -    Bps/Par/Bits       : 115200 8N1                 |
| F - Hardware Flow Control : Yes                        |
| G - Software Flow Control : No                         |
|                                                        |
|    Change which setting?                               |
+--------------------------------------------------------+</pre>
</div>
<p>The first line will give you the path to the serial port Minicom is going to talk to. If this doesn&#8217;t match the /dev/ttyUSB# path you found above, hit &#8220;A&#8221; on your keyboard and enter in the correct path and press enter. Now double check your Bps/Par/Bits settings. The default 9600 8N1 is pretty standard, but you may need to hit &#8220;E&#8221; and provide a different Speed setting depending on the device you&#8217;re talking to. In my case, OpenLog is running at 115200bps, so I went through and made the appropriate changes. Hit enter again to exit the serial port settings menu. The other settings can usually be left to their default values, so arrow down to &#8220;Save setup as dfl&#8221; to save this configuration as default. This way you don&#8217;t have to configure Minicom every time you use it. Now arrow down to &#8220;Exit&#8221; and hit enter. Minicom will now start up using the settings you specified. If all goes well, you should now be connected to your device and ready to send/receive. From now on, you can start minicom without the -s switch.</p>
<pre class="brush: plain; gutter: false;">$ minicom</pre>
<p>Got a better HyperTerminal replacement that you use in Linux? Let me know about it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/03/hyperterminal-replacement-for-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flashing OpenLog Firmware in Ubuntu Linux</title>
		<link>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/</link>
		<comments>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:36:37 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenLog]]></category>
		<category><![CDATA[sparkfun]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=85</guid>
		<description><![CDATA[I recently hit a bug in the Sparkfun OpenLog v1.1 firmware that left the device useless. I found out the hard way that version 1.1 only supports up to 255 log files. Once it hits this limit the firmware doesn&#8217;t know what to do with itself and loops endlessly. This even prevents you from entering command [...]]]></description>
			<content:encoded><![CDATA[<p>I recently hit a bug in the Sparkfun <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9530">OpenLog </a>v1.1 firmware that left the device useless. I found out the hard way that version 1.1 only supports up to 255 log files. Once it hits this limit the firmware doesn&#8217;t know what to do with itself and loops endlessly. This even prevents you from entering command mode where you could otherwise reset the log number. <a href="http://github.com/nseidle">Nate Seidle</a> at SparkFun quickly released an update, v1.2, to correct this problem I was having. But now I had to figure out how to flash the firmware on my OpenLog. It turns out the process is extremely easy in Ubuntu, but the GitHub documentation targets mostly Windows, so I decided to document the process for Ubuntu users from start to finish here.<span id="more-85"></span></p>
<p>I expect that you have the Arduino IDE <a href="http://www.arduino.cc/playground/Learning/Linux">installed and running properly</a>. This means the avrdude and avr-gcc libraries necessary to flash OpenLog will already be installed. Next step is to pull the firmware source code from the <a href="http://github.com/nseidle/OpenLog">GitHub repository</a>. If you don&#8217;t have git installed, run the following command:</p>
<pre class="brush: plain; gutter: false;">$ sudo apt-get install git-core</pre>
<p>Now you can run the git command to pull the source code over the read-only HTTP path. This is generally the easiest path to use to avoid issues with proxies or closed/blocked ports on your network.</p>
<pre class="brush: plain; gutter: false;">$ git clone http://github.com/nseidle/OpenLog.git</pre>
<p>Once the command has completed, you&#8217;ll have an OpenLog directory in your currently active directory. Time to compile the source code to make the required hex file that we&#8217;ll write to OpenLog.</p>
<pre class="brush: plain; gutter: false;">$ cd OpenLog/Code/</pre>
<pre class="brush: plain; gutter: false;">$ make</pre>
<p style="text-align: left;">You should see several notices about compiling various .c files, linking main.elf, and most importantly loading main.hex. Now we need to get that hex file onto OpenLog. Grab your trusty <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8772">FTDI breakout board</a> (you should never leave home without it) and wire it to OpenLog as shown below.</p>
<p style="text-align: left; padding-top: 0;"><a href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/03/FTDI-Connections.jpg"><img class="aligncenter size-medium wp-image-86" title="FTDI to OpenLog connection diagram." src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/03/FTDI-Connections-300x96.jpg" alt="" width="300" height="96" /></a></p>
<p style="text-align: left; padding-top: 0;">Before connecting the FTDI to your computer, we want to make sure we have the correct device path for the next step. Look at the list of all tty-capable USB devices. It&#8217;s okay if none show up right now.</p>
<p style="text-align: left; padding-top: 0;">
<pre class="brush: plain; gutter: false;">$ ls /dev/ttyUSB*</pre>
<p style="text-align: left; padding-top: 0;">Now connect the FTDI board and run the command again. The new ttyUSB# device listed is your FTDI board. I&#8217;ll use ttyUSB0 in the command below, so you will need to change the zero if your # is different.</p>
<p style="text-align: left; padding-top: 0;">I hope you have an extra wire at hand. The Linux build of avrdude unfortunately doesn&#8217;t have the &#8220;DTR wiggle&#8221; necessary to automatically reset OpenLog&#8217;s ATMega328p, so we have to do it ourselves. Grab a wire and connect one end to ground. If necessary, the microSD socket&#8217;s case can be used as a ground if you don&#8217;t have OpenLog on a breadboard. You&#8217;ll need to tap the other end of the wire onto the GPIO pin 6 on OpenLog. This is the square pin pad near the &#8220;O&#8221; in &#8220;OpenLog&#8221; on the silkscreen (the bottom-left most pin in the image featured above). Timing here is of the essence; run the command below, hit enter on your keyboard, then immediately tap the other end of your grounded wire to pin 6. Don&#8217;t leave the wire sitting on pin 6, it&#8217;s just a quick tap to momentarily ground it and force a reset.</p>
<p style="text-align: left; padding-top: 0;">
<div id="_mcePaste">
<pre class="brush: plain; gutter: false;">$ avrdude -p atmega328p -P /dev/ttyUSB0 -c stk500v1 -b 57600 -U flash:w:main.hex</pre>
</div>
<p>Don&#8217;t forget to change the ttyUSB# number if necessary. If your timing was good enough, you should see avrdude show a progress bar as it flashes the hex firmware onto OpenLog. If not, you&#8217;ll likely see errors like &#8220;programmer not responding&#8221; or &#8220;out of sync&#8221;. Try try again. Tapping enter and grounding pin 6 should be almost instantaneous, with the enter key coming ever so slightly first.</p>
<p>After a few seconds, the updated firmware will now be on your OpenLog chip and you&#8217;ll be on your merry way. I hope this helps someone out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>8-bits of Processing Goodness</title>
		<link>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/</link>
		<comments>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:49:43 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Cars]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[senior design]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=30</guid>
		<description><![CDATA[The last semester of my undergrad program in CSE is finally here! This semester I have a Senior Design course where students form their own groups and come up with an idea related to the curriculum and implement it. Now if only I had an idea of what to design&#8230;
I&#8217;ve been participating in autocross events [...]]]></description>
			<content:encoded><![CDATA[<p>The last semester of my undergrad program in <a href="http://www.eng.utoledo.edu/eecs/">CSE </a>is finally here! This semester I have a Senior Design course where students form their own groups and come up with an idea related to the curriculum and implement it. Now if only I had an idea of what to design&#8230;</p>
<p>I&#8217;ve been participating in <a href="http://en.wikipedia.org/wiki/Autocross">autocross </a>events for years and have always wished I could afford a data acquisition system like those you see used in Formula 1, Indy, Le Mans, and/or NASCAR. With a <a href="http://en.wikipedia.org/wiki/Data_acquisition">DAQ</a>, I&#8217;d be able to see exactly what my car is doing at an event and use that information to help me drive the course faster on my next run. Hopefully.</p>
<p>That got me thinking. Surely I&#8217;m not the only amateur autocrosser wishing for an affordable data acquisition system made for the weekend warrior. In fact, LOTS of people across the nation, and across the globe would probably love such a system. I didn&#8217;t know of any that existed on a college student budget, so I figured why not make one? It just so happens this senior design semester is the perfect time to get started. But where to begin?<span id="more-30"></span></p>
<p>I began looking at professional systems to see what they were doing so I could get an idea where to start. After looking at a few of the products out there, most of them seemed to be doing some sort of GPS tracking as well as logging all the sensor data the user needs (or can afford). I started looking into using a USB GPS plugged into a laptop and use software to track and log the position data so the user could review it later. In the midst of looking for a GPS, I discovered most of the professional units were boasting GPS units with 5-20Hz refresh rates, but the units I found were all 1Hz. Hmm, I know I want to go cheap, but it also needs to do it&#8217;s job well. I had to find something better. I eventually stumbled upon a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9060">10Hz GPS chip</a> that sounded like it would do the trick, but how in the world was I going to get data off a lone circuit chip? I also want to use an accelerometer to measure precise movements of the car, but USB versions were expensive. Chip-only models were vastly cheaper, but how do I connect one to a computer? Time for some more research.</p>
<p>That&#8217;s when I met the <a href="http://www.arduino.cc/">Arduino</a>.</p>
<div id="attachment_78" class="wp-caption aligncenter" style="width: 310px"><a rel="lightbox" href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/arduino.jpg"><img class="size-medium wp-image-78 " title="Arduino Duemilanove" src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/arduino-300x225.jpg" alt="Arduino Duemilanove" width="300" height="225" /></a><p class="wp-caption-text">So many possibilities in such a tiny package.</p></div>
<p>I think the Nintendo was the last time I used an 8-bit processor, but I have a feeling I&#8217;m going to have so much more fun with this thing! Could your Nintendo convert an analog voltage into a 10-bit digital value? I didn&#8217;t think so.</p>
<p>The <a href="http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove">Arduino Duemilanove</a> is the latest board to come from the open hardware Arduino project. The beauty of Arduino is it&#8217;s openess and ease of use. The design schematics are openly available; ready for people to adapt and improve, or to integrate directly into their own projects. The microcontrollers used also come pre-programmed with the Arduino <a href="http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader">bootloader</a> which makes it a piece of cake to write some code, plug the board in via USB, click a button to upload the code and make it run. The Arduino drastically lowers the learning curve necessary to start using a microcontroller.</p>
<p>With my Arduino, the possibilities are endless. This little board has opened the door wide open to this project and should be able to handle everything a motorsport data acquisition system should need. Now it&#8217;s time to fire this thing up and see what it can do! Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Free Day For All!</title>
		<link>http://www.bretkuhns.com/blog/2010/01/free-day-for-all/</link>
		<comments>http://www.bretkuhns.com/blog/2010/01/free-day-for-all/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 14:13:07 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[freeday]]></category>
		<category><![CDATA[sparkfun]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=34</guid>
		<description><![CDATA[SparkFun Electronics held their Free Day event on January 7th, 2010 at 11am EST. I had a few parts that I wanted to order for my senior design project this semester (more coming on that in another post) and was really excited to be able to get those parts for free during the event!
Or maybe [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sparkfun.com/">SparkFun Electronics</a> held their <a href="http://www.sparkfun.com/commerce/news.php?id=321">Free Day</a> event on January 7th, 2010 at 11am EST. I had a few parts that I wanted to order for my senior design project this semester (more coming on that in another post) and was really excited to be able to get those parts for free during the event!</p>
<p>Or maybe not. I hopped into the #Sparkfun chatroom on irc.freenode.net the morning of Free Day to check out what people were chatting about. To my dismay, hours before the event started, there were already almost 700 people in the chatroom. According to Sparkfun&#8217;s limitations on the event, only 1,000 $100 orders would be awarded. The numbers were already daunting. I pulled up the Sparkfun website to find their recently updated web servers were already buckling under the load of people preparing their shopping carts. Uh oh. As time neared 11am, the chatroom hit the 1,400 user mark and my hopes of free electronics started to dwindle.<span id="more-34"></span></p>
<p>Minutes before the event, I went to my shopping cart, and prepared to click the Checkout button on the hour. 11am struck, my finger punctually tapped the mouse button, and my order request was on it&#8217;s way across the &#8216;tubes to Sparkfun&#8217;s datacenter in Colorado&#8230; Minutes later, the page timed out and I sent the request again, and again. As the minutes went by, so did the time outs and blank white pages across my screen. Scanning the chatroom, I saw reports of people successfully reaching the shipping page, ready to submit their Free Day order; still nothing on my screen. After an hour of failed attempts, I finally reached the log-in screen. Gah, I logged in just before the event started to avoid this! After providing my account info, I waited another 10 minutes and reached the shipping page. The taste of success was on my tongue as many before me reported their completed orders shortly after reaching the shipping page. I gleefully submitted my shipping information.</p>
<p style="text-align: center;"><a rel="lightbox" href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/sparkfun_free_day.png"><img class="size-medium wp-image-36 aligncenter" title="SparkFun Free Day" src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/sparkfun_free_day-300x229.png" alt="" width="300" height="229" /></a></p>
<p>And that was the last I saw of Sparkfun.com. As I watched the Firefox throbber spin away, my heart dropped as people reported the giveaway totals nearing dangerously to the $100,000 limit. Before I could reach the billing page, SparkFun <a href="http://twitter.com/sparkfun/status/7486293215">announced on Twitter</a> that Free Day was officially over. And so were lost my dreams of free electronics. Sulked, I returned to the chatroom to read the flurry of exuberant posts from those who had successfully received their Free Day orders.</p>
<p>This story ends happily, however. Once the rush of traffic to Sparkfun&#8217;s site died down after the event, I was able to trim my bloated cart of electronic goodies to only that which I needed for my project, and proudly submitted my non-free order.</p>
<p>Thanks for the experience, Sparkfun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/01/free-day-for-all/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Recursive Strings</title>
		<link>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/</link>
		<comments>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 00:58:29 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=1</guid>
		<description><![CDATA[I needed to construct a recursive string of regular expression patterns. Parts of a string may be built from another string which may also be built of other strings. If you&#8217;re familiar, think of production rules in a context-free grammar. If you&#8217;re not, then just take for granted this recursive string idea would be useful. [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to construct a recursive string of regular expression patterns. Parts of a string may be built from another string which may also be built of other strings. If you&#8217;re familiar, think of <a href="http://en.wikipedia.org/wiki/Production_%28computer_science%29">production rules</a> in a <a href="http://en.wikipedia.org/wiki/Context-free_grammar">context-free grammar</a>. If you&#8217;re not, then just take for granted this recursive string idea would be useful. I initially decided to build all my patterns into a single array, giving me a nice data collection to access them. I was also under the assumption that my recursive idea would work best with an array as the interpreter would have to account for all strings in the array at once. This would prevent order issues if one string relied on another but wasn&#8217;t yet declared. Unfortunately, PHP simply doesn&#8217;t seem to work as I had hoped.<span id="more-1"></span></p>
<p>Consider the following snippet of code:</p>
<pre class="brush: php;">&lt;?php
$a = array(
     0 =&gt; &quot;test {$a[1]}&quot;,
     1 =&gt; &quot;blah {$a[2]}&quot;,
     2 =&gt; &quot;argh&quot;
);
echo $a[0].&quot;\n&quot;;	// outputs: test

$s2 = &quot;argh&quot;;
$s1 = &quot;blah {$s2}&quot;;
$s0 = &quot;test {$s1}&quot;;

echo $s0.&quot;\n&quot;;	// outputs: test blah argh
?&gt;</pre>
<p>At first, we attempt to use an array to handle the string recursion, then we use string variables.We can see from the output that the array code simply doesn&#8217;t work. It appears you can&#8217;t access parts of the array from within itself. At the moment, it looks like I&#8217;m stuck avoiding arrays for this. If anyone out there knows a way around this, please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Apps aren&#8217;t ready for Chrome OS</title>
		<link>http://www.bretkuhns.com/blog/2009/07/google-apps-arent-ready-for-chrome-os/</link>
		<comments>http://www.bretkuhns.com/blog/2009/07/google-apps-arent-ready-for-chrome-os/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 23:38:00 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[chome_os]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=20</guid>
		<description><![CDATA[Google recently announced their Google Chrome OS project that will see release some time in 2010. It certainly looks to be a promising idea, though I can&#8217;t help but think that the project&#8217;s success lies heavily on a very small window of implementation decisions. The slightest deviation from the &#8220;perfect&#8221; solution could make Chrome OS [...]]]></description>
			<content:encoded><![CDATA[<p>Google recently announced their <a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html">Google Chrome OS</a> project that will see release some time in 2010. It certainly looks to be a promising idea, though I can&#8217;t help but think that the project&#8217;s success lies heavily on a very small window of implementation decisions. The slightest deviation from the &#8220;perfect&#8221; solution could make Chrome OS more a gimmick than anything. As the OS aims to be the most web-driven ever designed, it&#8217;s clear Google will use their slew of online applications to support the OS. In their current state however, the use of Google Apps as a true replacement for desktop applications is laughable. The biggest flaw in the implementation of all Google&#8217;s online applications is the necessity to sync the app before going offline. In their current state, if I were to go offline and maintain my current online experience, I would have to sync my Google reader feeds, my Gmail inbox, and my Google Docs files before going offline. How is Chrome OS going to be useful when it&#8217;s applications are worthless during unexpected spurts of offline use?<span id="more-20"></span></p>
<p>You might assume that Google&#8217;s offline technology, <a href="http://gears.google.com/">Google Gears</a>, just isn&#8217;t capable of seamless online/offline transitions, but a quick look through their <a href="http://code.google.com/apis/gears/architecture.html">developer tutorial</a> proves otherwise.</p>
<blockquote><p>In a &#8220;background sync&#8221;, the application continuously synchronizes the data between the local data store and the server. This can be implemented by pinging the server every once in a while or better yet, letting the server push or stream data to the client (this is called Comet in the Ajax lingo).</p>
<p>The benefits of background synching are:</p>
<ul>
<li>Data is ready at all times, whenever the user chooses to go offline, or is accidentally disconnected.</li>
<li>The performance is enhanced when using a  slow Internet connection.</li>
</ul>
<p>The downside is that the sync engine might consume resources or slow down the online experience with its background processing (if it&#8217;s not using the WorkerPool). Using WorkerPool the cost of synching is minimized and no longer affects the user&#8217;s experience.</p></blockquote>
<p>This is exactly the type of synchronization feature that Google&#8217;s apps need to make Chrome OS possible. Without it, Chrome OS will never succeed. Gears has been capable of background synchronization, yet each time Google adds offline capability to one of their apps they force you to manually sync your data before going offline. I&#8217;ve never understood this strategy and now it appears they must revise their offline strategy for the Chrome OS project. I&#8217;d imagine Google to think more ahead than this, but let&#8217;s hope they catch on and we start seeing background sync rolled into their web apps as the Chrome OS launch nears.</p>
<p>Update (2009-12-23): It looks like Gmail has the most robust offline support of all the Google web apps now. Reader still forces you to manually sync, you can&#8217;t create new documents in Docs if you&#8217;re offline, and Calendar still only lets you look at your events without changing anything. This is promising though, as Gmail is now a suitable replacement for a desktop e-mail client. One step at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2009/07/google-apps-arent-ready-for-chrome-os/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Microsoft wants its FAT back</title>
		<link>http://www.bretkuhns.com/blog/2009/02/microsoft-wants-its-fat-back/</link>
		<comments>http://www.bretkuhns.com/blog/2009/02/microsoft-wants-its-fat-back/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 02:05:00 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[micosoft]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=19</guid>
		<description><![CDATA[Ars Technica reported on a recent lawsuit filed by Microsoft against the GPS maker, TomTom. What&#8217;s interesting is the potential ground this lawsuit may cover, including Microsoft&#8217;s FAT filesystem. FAT is well documented, runs on any version of Windows and almost universally on Linux and Apple operating systems.  This universal OS support makes it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://arstechnica.com/microsoft/news/2009/02/microsoft-sues-tomtom-over-fat-patents-in-linux-based-device.ars">Ars Technica reported</a> on a recent lawsuit filed by Microsoft against the GPS maker, TomTom. What&#8217;s interesting is the potential ground this lawsuit may cover, including Microsoft&#8217;s <a href="http://en.wikipedia.org/wiki/File_Allocation_Table">FAT filesystem</a>. FAT is well documented, runs on any version of Windows and almost universally on Linux and Apple operating systems.  This universal OS support makes it an attractive candidate for mobile storage media such as digital camera memory cards, MP3 players, phones, GPS units, etc. Although Microsoft mostly disregarded FAT as a hard disk filesystem for it&#8217;s desktop/server operating systems in favor of it&#8217;s newer NTFS filesystem, FAT is still widely used today throughout the entire industry outside of Microsoft itself. A copyright lawsuit against TomTom for the use of FAT could create an enormous ripple in the computing industry that relies so heavily on it&#8217;s use.<span id="more-19"></span></p>
<p>Though this has the potential to be a disaster, I can&#8217;t help but to encourage Microsoft if it really plans to push this further. Alienating mobile device vendors that use FAT by forbidding the open use of the filesystem means a large majority of those vendors will pursue open royalty-free alternatives. FAT is antiquated and there are many other viable filesystems for the industry to adopt. This has the potential of becoming a very good technological push forward for the industry as a whole. There will be some pains for sure, but I can only encourage Microsoft in alienating itself from an industry that has become reliate on FAT and essentially forcing an upswing in filesystem adoption to more open platforms. If that&#8217;s the case, then thank you Microsoft.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2009/02/microsoft-wants-its-fat-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dammed Sources</title>
		<link>http://www.bretkuhns.com/blog/2009/02/dammed-sources/</link>
		<comments>http://www.bretkuhns.com/blog/2009/02/dammed-sources/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 20:27:00 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=18</guid>
		<description><![CDATA[I updated my laptop from Ubuntu 8.04 (Hardy Heron) to 8.10 (Intrepid Ibex) about a month or two ago. I noticed that I haven&#8217;t really seen too many updates come through in a while. I finally took a look at my software sources list and noticed everything was still configured for Hardy. I changed everything [...]]]></description>
			<content:encoded><![CDATA[<p>I updated my laptop from Ubuntu 8.04 (Hardy Heron) to 8.10 (Intrepid Ibex) about a month or two ago. I noticed that I haven&#8217;t really seen too many updates come through in a while. I finally took a look at my software sources list and noticed everything was still configured for Hardy. I changed everything to Intrepid, and the update floodgates opened!</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ZAG_39JOIAc/SaNdu5DZOjI/AAAAAAAAAKA/v1yl2AwknGU/s1600-h/updates.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 251px; height: 320px;" src="http://2.bp.blogspot.com/_ZAG_39JOIAc/SaNdu5DZOjI/AAAAAAAAAKA/v1yl2AwknGU/s320/updates.png" alt="" id="BLOGGER_PHOTO_ID_5306187846142999090" border="0" /></a>I wonder why my repository list never updated during the dist-upgrade&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2009/02/dammed-sources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
