<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-315178725937017182</id><updated>2011-08-13T03:41:53.109-07:00</updated><category term='dinosaurs'/><category term='yoville'/><category term='diy'/><category term='geocoding'/><category term='secondlaw'/><category term='global warming'/><category term='voodoo'/><category term='dooom'/><category term='security'/><category term='stream'/><category term='talkback'/><category term='thievery'/><category term='cheap'/><category term='social'/><category term='environment'/><category term='wtf'/><category term='powertools'/><category term='climate change'/><category term='aloha'/><category term='game'/><category term='service'/><category term='ip'/><category term='bastards'/><category term='C++'/><category term='airport'/><category term='socket'/><category term='errorism'/><category term='hydrogen'/><category term='chainsaw'/><category term='explosions'/><category term='ocd'/><category term='uzi'/><category term='batteries'/><category term='lies'/><category term='interzone'/><category term='fun'/><category term='fail'/><category term='supra'/><category term='solar'/><category term='stupid'/><title type='text'>TurboCrank - Rants, opinions, bad car analogies.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-5149005987486207118</id><published>2011-08-01T05:01:00.000-07:00</published><updated>2011-08-01T09:11:57.299-07:00</updated><title type='text'>Constructing a Diminutive Velocipede</title><content type='html'>This is something I've wanted to do for a while, and a week ago I bit the bullet and did it.&lt;br /&gt;&lt;br /&gt;Required bits:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A 26" mountain bike&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A 10" - 12" scooter or child's bike&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Required utensils:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hacksaw&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Angle grinder&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Some form of welder&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Begin by cutting the front off the bike with the hacksaw, at the red lines shown below. Also, cut the handle bars shorter (I cut just inside the stock handgrips) and remove the stem that holds the handle bars in place. We'll weld the handle bars on directly for a more scale appearance.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-nLkLYVSD7TU/Tjaapa7ndrI/AAAAAAAAAFw/4L2UcX6Qn38/s1600/bike.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-nLkLYVSD7TU/Tjaapa7ndrI/AAAAAAAAAFw/4L2UcX6Qn38/s320/bike.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5635862020095440562" /&gt;&lt;/a&gt;&lt;br /&gt;Once you've done this, use the angle grinder to shape the stub of the stem so that it fits neatly with the shortened handle bars. Clamp the bars in the right position, tack weld them in place, and when you're happy with the alignment, weld them on. Remember to always clean any paint, rust etc. off the metal surfaces before welding.&lt;br /&gt;&lt;br /&gt;Cut the seat post to length (I made mine around 100mm long), once again shape it with the angle grinder so that it fits neatly on the top of the down tube, and weld it in place. This geometry isn't very strong, so cut a short length of pipe (I got mine from one of the seat stays) and use it as a brace to support the seat post. You can see the seat post support propped in place ready to weld.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-IFRz9WNUWo8/TjaWksCYmnI/AAAAAAAAAFo/_i3iktXBuuk/s1600/26072011409.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://3.bp.blogspot.com/-IFRz9WNUWo8/TjaWksCYmnI/AAAAAAAAAFo/_i3iktXBuuk/s320/26072011409.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635857540741372530" /&gt;&lt;/a&gt;&lt;br /&gt;In order to get a better shape to the frame, I simply cut a wedge out of the down-tube (leaving it attached by a strip across the top) and re-welded it in place. In this picture you can also seat the seat post support properly welded in place.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-p7An9YLwBlA/TjadyYtKG3I/AAAAAAAAAF4/EJkN073aH2M/s1600/28072011411.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/-p7An9YLwBlA/TjadyYtKG3I/AAAAAAAAAF4/EJkN073aH2M/s320/28072011411.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635865472651631474" /&gt;&lt;/a&gt;&lt;br /&gt;Next, I needed a rear wheel. At the recycling station near work, I found a kids' 10" scooter which fit the bill.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-1l7RMo_RK_8/Tjae8wvRGEI/AAAAAAAAAGA/ijsv0zPnZPs/s1600/28072011410.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://1.bp.blogspot.com/-1l7RMo_RK_8/Tjae8wvRGEI/AAAAAAAAAGA/ijsv0zPnZPs/s320/28072011410.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635866750413248578" /&gt;&lt;/a&gt;&lt;br /&gt;It was a simple job to neaten up the cut end of the frame, cut off the scooter's front fork, and weld it in place at the rear. I'm still very new to welding, and the wall of the tube on the right is maybe 2mm thick, so I had a hard time making them stick without blowing a hole in the tubing.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-CAywtJNbHSg/TjagAqJ8RmI/AAAAAAAAAGI/-VQqV24mmKY/s1600/28072011412.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/-CAywtJNbHSg/TjagAqJ8RmI/AAAAAAAAAGI/-VQqV24mmKY/s320/28072011412.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635867916877186658" /&gt;&lt;/a&gt;&lt;br /&gt;You should now have something ridable, but the colour scheme leaves somewhat to be desired.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-Vqbm9fNLkpI/TjahwgMuY0I/AAAAAAAAAGQ/R-zCj5MgKac/s1600/28072011414.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-Vqbm9fNLkpI/TjahwgMuY0I/AAAAAAAAAGQ/R-zCj5MgKac/s320/28072011414.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635869838349853506" /&gt;&lt;/a&gt;&lt;br /&gt;As this was to be prop for The Great Steampunk Affaire, bare brushed metal was fully appropriate. However, I plan to paint the frame black to prevent corrosion.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-7oohhdUFXU0/TjajqQHqbnI/AAAAAAAAAGc/ul1F5eDjLFk/s1600/30072011415.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/-7oohhdUFXU0/TjajqQHqbnI/AAAAAAAAAGc/ul1F5eDjLFk/s320/30072011415.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635871929977695858" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-QpRKs03vvnA/Tjajqfr6CqI/AAAAAAAAAGk/ZtRlHgCg0JA/s1600/30072011416.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/-QpRKs03vvnA/Tjajqfr6CqI/AAAAAAAAAGk/ZtRlHgCg0JA/s320/30072011416.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5635871934156245666" /&gt;&lt;/a&gt;&lt;br /&gt;I'd initially planned for electric propulsion, but it ended up being quite practical to merely kick it along until I got up to speed, and then coast for a while. It was certainly a lot of fun on the night. :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-5149005987486207118?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/5149005987486207118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2011/08/constructing-diminutive-velocipede.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/5149005987486207118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/5149005987486207118'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2011/08/constructing-diminutive-velocipede.html' title='Constructing a Diminutive Velocipede'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-nLkLYVSD7TU/Tjaapa7ndrI/AAAAAAAAAFw/4L2UcX6Qn38/s72-c/bike.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-3156844327800953688</id><published>2011-03-25T13:04:00.001-07:00</published><updated>2011-03-25T13:11:37.338-07:00</updated><title type='text'>Pascal's Wager</title><content type='html'>I'm sure we've all heard of Pascal's Wager in some form. The general logic runs that "if there is no God, then what I believe holds no consequence, but if there IS a God, then believing in Him is a significant net benefit." This makes a lot of sense... in fact Blaise Pascal himself trusted it to get him out of any awkward situations in which, after he died, he discovered that there in fact WAS a God.&lt;br /&gt;&lt;br /&gt;What's kind of scary is when you reverse the logic. "If there is, in fact, a God, despite the utter lack of any rational evidence of Him - then I'm screwed, because I chose to take the path which I was created to take. If there is no God, then religion, that structure which we humans have created around the presumed existance of an irrational, pathological creator, has caused more harm than we know how to repair."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-3156844327800953688?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/3156844327800953688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2011/03/pascals-wager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3156844327800953688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3156844327800953688'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2011/03/pascals-wager.html' title='Pascal&apos;s Wager'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-7665939293699904133</id><published>2010-11-15T20:41:00.000-08:00</published><updated>2010-11-23T21:38:32.251-08:00</updated><title type='text'>Creating a std::iostream socket class (Part 3)</title><content type='html'>So far we've covered implementation of a custom stream buffer that can be used with standard library functions. Now all that's left to go is the actual socket code itself! For more information on modern socket programming, I highly recommend &lt;a href="http://beej.us/guide/bgnet/"&gt;Beej's Guide to Network Programming&lt;/a&gt;. It's simple, easy to read, and covers what you need to know as you need to know it. It's also the reference I used while implementing my socket code. :)&lt;br /&gt;&lt;br /&gt;Connecting to a server is done in three steps: Resolve the address, create a socket, and connect the socket to the address. Resolving the address looks like this:&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;addrinfo hints, *info, *cur;&lt;br /&gt;&amp;nbsp;&amp;nbsp;memset(&amp;hints, 0, sizeof(hints));&lt;br /&gt;&amp;nbsp;&amp;nbsp;hints.ai_family = AF_UNSPEC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;hints.ai_socktype = SOCK_STREAM;&lt;br /&gt;&amp;nbsp;&amp;nbsp;int ret = getaddrinfo(host.c_str(), port.c_str(), &amp;hints, &amp;info);&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (ret != 0) handle_error();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Once we've resolved the address, we create a socket. Since &lt;code&gt;getaddrinfo()&lt;/code&gt; returns a linked list of address results, we need to find one that has an address type we can connect to. This way, it will automatically use IPv6 if that's all that's available. Once we have a connected socket we can free the returned address info.&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;for (cur = info; cur != NULL &amp;&amp; m_data-&gt;socket == -1; cur = cur-&gt;ai_next) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_data-&gt;socket = socket(cur-&gt;ai_family,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cur-&gt;ai_socktype, cur-&gt;ai_protocol);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (m_data-&gt;socket != -1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// we can bind via this protocol, can we connect?&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (::connect(m_data-&gt;socket, cur-&gt;ai_addr, cur-&gt;ai_addrlen) == -1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;::close(m_data-&gt;socket);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_data-&gt;socket = -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_data-&gt;remotehost = host + ":" + port;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;freeaddrinfo(info);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To read from the socket, use either &lt;code&gt;read()&lt;/code&gt; (which works with all file descriptors) or &lt;code&gt;recv()&lt;/code&gt; which also takes socket-specific flags. Note that by default, either will block if there's nothing to be read yet.&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;int num = recv(m_data-&gt;socket, m_data-&gt;buffer, BUFSIZE, 0);&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (num &lt;= 0) handle_socket_closed();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To check whether there's anything to read on a socket, use the &lt;code&gt;select()&lt;/code&gt; function:&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;timeval waittime = { 0, 0 };&lt;br /&gt;&amp;nbsp;&amp;nbsp;fd_set readset;&lt;br /&gt;&amp;nbsp;&amp;nbsp;FD_ZERO(&amp;readset);&lt;br /&gt;&amp;nbsp;&amp;nbsp;FD_SET(m_data-&gt;socket, &amp;readset);&lt;br /&gt;&amp;nbsp;&amp;nbsp;select(m_data-&gt;socket+1, &amp;readset, NULL, NULL, &amp;waittime);&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (FD_ISSET(m_data-&gt;socket, &amp;readset)) read_socket_data();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you want to listen for incoming network connections the setup is slightly different. We use a 'listener socket' which listens on a given port, and then when a connection attempt is made, a call to &lt;code&gt;accept()&lt;/code&gt; will return another socket which is connected to the remote client.&lt;br /&gt;&lt;br /&gt;To listen:&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;// bind to the requested port&lt;br /&gt;&amp;nbsp;&amp;nbsp;addrinfo hints, *info, *cur;&lt;br /&gt;&amp;nbsp;&amp;nbsp;memset(&amp;hints, 0, sizeof(hints));&lt;br /&gt;&amp;nbsp;&amp;nbsp;hints.ai_family = AF_UNSPEC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;hints.ai_socktype = SOCK_STREAM;&lt;br /&gt;&amp;nbsp;&amp;nbsp;hints.ai_flags = AI_PASSIVE;&lt;br /&gt;&amp;nbsp;&amp;nbsp;int r;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if ((r = getaddrinfo(NULL, port.c_str(), &amp;hints, &amp;info)) != 0) return false;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// try to get a socket to bind to the port&lt;br /&gt;&amp;nbsp;&amp;nbsp;for (cur = info; cur != NULL &amp;&amp; m_data-&gt;socket == -1; cur = cur-&gt;ai_next) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_data-&gt;socket = socket(cur-&gt;ai_family,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cur-&gt;ai_socktype, cur-&gt;ai_protocol);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (m_data-&gt;socket != -1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// insert lame joke about rings here&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (bind(m_data-&gt;socket, cur-&gt;ai_addr, cur-&gt;ai_addrlen) == -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;freeaddrinfo(info);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// if we have a socket, listen on it&lt;br /&gt;&amp;nbsp;&amp;nbsp;listen(m_data-&gt;socket, m_data-&gt;backlog);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// accept the incoming connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;sockaddr_storage addr;&lt;br /&gt;&amp;nbsp;&amp;nbsp;socklen_t addrlen = sizeof(addr);&lt;br /&gt;&amp;nbsp;&amp;nbsp;sock.m_data-&gt;socket = ::accept(m_data-&gt;socket, (sockaddr *)&amp;addr, &amp;addrlen);&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (sock.m_data-&gt;socket == -1) return false; // fail :(&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So there you go; almost everything you need to know to write socket code. And if you just want something that works, here's the full source of &lt;a href="http://dl.dropbox.com/u/10909093/tcpstream.cpp"&gt;tcpstream.cpp&lt;/a&gt; and &lt;a href="http://dl.dropbox.com/u/10909093/tcpstream.h"&gt;tcpstream.h&lt;/a&gt;. I've released it under attribution license, so feel free to use it in whatever projects you want, commercial or otherwise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-7665939293699904133?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/7665939293699904133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7665939293699904133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7665939293699904133'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part_15.html' title='Creating a std::iostream socket class (Part 3)'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-3343783856264936570</id><published>2010-11-13T19:46:00.000-08:00</published><updated>2010-11-14T02:28:23.029-08:00</updated><title type='text'>You can't reuse ports within 60 seconds</title><content type='html'>As the title says, just a little gotchya I ran into. After having an open socket on a port, you can't bind another socket to that port for some specified timeout time afterwards. My test program for my tcpstream class worked fine, but if I tried to re-run it, I couldn't re-bind to the port I was using until a short while had passed. After an hour or so of trying to figure out why my socket wasn't closing, I finally found that it was actually Working As Intended(TM). It's fully explained in &lt;a href="http://www.cim.mcgill.ca/~franco/OpSys-304-427/messages/node77.html"&gt;this post&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The short answer is:&lt;br /&gt;"No, you may not re-use the port for the first 60 seconds&lt;br /&gt;after a bound socket is closed (explicitly or because&lt;br /&gt;the program exited)".&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-3343783856264936570?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/3343783856264936570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/11/you-cant-reuse-ports-within-60-seconds.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3343783856264936570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3343783856264936570'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/11/you-cant-reuse-ports-within-60-seconds.html' title='You can&apos;t reuse ports within 60 seconds'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-7398092438347577346</id><published>2010-11-12T03:29:00.000-08:00</published><updated>2010-11-12T21:35:25.698-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='socket'/><category scheme='http://www.blogger.com/atom/ns#' term='stream'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Creating a std::iostream socket class (Part 2)</title><content type='html'>Last time I outlined how the tcpstream class should work. Having written socket code before, the biggest unknown was "how does I makes a stream of my owns"? The answer is "you implement a custom &lt;code&gt;std::streambuf&lt;/code&gt; object." Once you have a stream buffer reading from your source, you simply create a &lt;code&gt;std::iostream&lt;/code&gt; object and set it to use that stream buffer, et voila!&lt;br /&gt;&lt;br /&gt;The standard documentation for streambuf is rather terse and more than a little ambiguous, but happily, &lt;a href="http://oopweb.com/CPP/Documents/CPPAnnotations/Volume/cplusplus20.html"&gt;C++ Annotations Version 6.2.3&lt;/a&gt; chapter 20 begins by detailing the implementation of a custom &lt;code&gt;std::streambuf&lt;/code&gt; object.&lt;br /&gt;&lt;br /&gt;In short, all that's required to create your own stream buffer is to implement some or all of the following methods:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;// implement for std::streambuf read functionality&lt;br /&gt;virtual int underflow();&lt;br /&gt;&lt;br /&gt;// implement for std::streambuf write functionality&lt;br /&gt;virtual int overflow(int c = EOF);&lt;br /&gt;&lt;br /&gt;// optional but may improve performance&lt;br /&gt;virtual std::streamsize xsgetn(char_type *s, std::streamsize n);&lt;br /&gt;virtual std::streamsize xsputn(char_type *s, std::streamsize n);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The first of these, &lt;code&gt;underflow()&lt;/code&gt;, is called when the owner of the stream buffer runs out of data while reading. The general form that this method should take is:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;int underflow() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;int bytes_read = fillbuffer(m_pBuffer, MAX_BUFFER_SIZE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;setg(m_pBuffer, m_pBuffer, m_pBuffer + bytes_read);&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The setg() call sets the object's stream buffer. The arguments are, in order:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A pointer to the first byte of the buffer.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A pointer to the current byte in the buffer (which will usually be the first byte of the buffer, if you read a whole buffer at a time).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A pointer to the byte after the end of the buffer.&lt;/li&gt;&lt;/ul&gt;For tcpstream, I added a helper method, &lt;code&gt;fillbuffer()&lt;/code&gt;, which checks the socket for new data and is called at the beginning of all data-related methods. Since I didn't want to limit my stream to a predetermined fixed line length, I needed to buffer an arbitrary amount of data, and for this I settled on storing a linked list of data chunks. Each chunk represents a single read operation on the socket, and can store up to BUFFER_SIZE bytes.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;struct datachunk {&lt;br /&gt;&amp;nbsp;&amp;nbsp;int bytes;&lt;br /&gt;&amp;nbsp;&amp;nbsp;uint8_t *data;&lt;br /&gt;&amp;nbsp;&amp;nbsp;datachunk *next;  // pointer to next datachunk&lt;br /&gt;&amp;nbsp;&amp;nbsp;datachunk(int size) : bytes(size),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data(new uint8_t[size]), next(NULL) { }&lt;br /&gt;&amp;nbsp;&amp;nbsp;~datachunk() { delete[] data; }&lt;br /&gt;};&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;With this linked list, the logic became pretty simple: If there's a new data chunk queued up, delete the current chunk and start using the new chunk's data. If there isn't then we've temporarily run out of data and we return EOF.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;// implementation of underflow() for std::streambuf&lt;br /&gt;int tcpbuf::underflow() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;fillbuffer();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// bail if we don't have another buffer to swap to yet&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (m_data-&gt;inbox == NULL || m_data-&gt;inbox-&gt;next == NULL)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return EOF;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// we've used up the buffer at the front of the inbox, free it&lt;br /&gt;&amp;nbsp;&amp;nbsp;datachunk *old = m_data-&gt;inbox;&lt;br /&gt;&amp;nbsp;&amp;nbsp;m_data-&gt;inbox = old-&gt;next;&lt;br /&gt;&amp;nbsp;&amp;nbsp;delete old;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// and set the new buffer up for the stream to read from&lt;br /&gt;&amp;nbsp;&amp;nbsp;char_type *newdata = (char_type *)m_data-&gt;inbox-&gt;data;&lt;br /&gt;&amp;nbsp;&amp;nbsp;setg(newdata, newdata, newdata + m_data-&gt;inbox-&gt;bytes);&lt;br /&gt;&amp;nbsp;&amp;nbsp;return *newdata;&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note: In order to keep the interface completely platform-independent without resorting to factory methods and the like, the class stores its data in a wrapper struct m_data. For this method it's enough to know that &lt;code&gt;m_data-&gt;inbox&lt;/code&gt; is a pointer to the head of the list of &lt;code&gt;datachunk&lt;/code&gt;s.&lt;br /&gt;&lt;br /&gt;The second of the mandatory methods, &lt;code&gt;overflow()&lt;/code&gt;, is called in the inverse condition, when data is written to the stream. It just needs to make sure the byte it's given gets to where it needs to be. Unless you're buffering the data to write later (not a good plan for a socket class that's intended to be used somewhat interactively!) then it's usually a simple matter:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;// implementation of overflow() for std::streambuf&lt;br /&gt;int tcpbuf::overflow(int c) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (m_data-&gt;socket == -1) return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;return write(m_data-&gt;socket, &amp;c, sizeof(c));&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In this case, I didn't want to write my bytes to the socket individually every time, so I added an implementation for the optional &lt;code&gt;xsputn()&lt;/code&gt; method, which simply writes n bytes instead of a single byte:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;// implementation of xsputn() for std::streambuf&lt;br /&gt;std::streamsize tcpbuf::xsputn(const char *s, std::streamsize n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (m_data-&gt;socket == -1) return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;return write(m_data-&gt;socket, s, n);&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So there you go. That's all you have to do to implement a std::streambuf. Of course, I haven't covered any of the socket code here. That's for next time. &lt;br /&gt;&lt;br /&gt;One last thing; it's a drag to create a stream buffer, connect that to your network, and then create a new std::iostream to use that streambuffer, every time you want to connect a socket. There's a simple way around this though:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;// tcpstream - a tcpbuf-based iostream, for convenience&lt;br /&gt;class tcpstream : public std::iostream, public tcpbuf {&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;tcpstream() : std::iostream(this) { }&lt;br /&gt;};&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So now all of the socket-related methods in &lt;code&gt;tcpbuf&lt;/code&gt; are available on a &lt;code&gt;tcpstream&lt;/code&gt;, and you can also use the stream for your overloaded IO operators.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-7398092438347577346?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/7398092438347577346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part_12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7398092438347577346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7398092438347577346'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part_12.html' title='Creating a std::iostream socket class (Part 2)'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-2941250673348582989</id><published>2010-11-06T01:15:00.000-07:00</published><updated>2010-11-12T03:24:12.594-08:00</updated><title type='text'>Creating a std::iostream socket class (Part 1)</title><content type='html'>In the course of a project I'm currently working on, I've run across the need for some networking. In the past I've just wrapped up some Berkley sockets in a class and been done with it, but with this project I'm aiming to do things 'properly', using some of the more advanced features of C++ (including finally bidding a fond adieu to printf(), and starting to use std::cin / std::cout. After a bit of thought, I hit it. What better way to wrap up a socket than in a std::streambuf?&lt;br /&gt;&lt;br /&gt;First port of call was trusty old &lt;a href="http://www.cplusplus.com/reference/iostream/streambuf/"&gt;cplusplus.com&lt;/a&gt;. Hmm. Nope, the same "you don't  DESERVE to understand this" style as the standard library itself. Blargh. After some googling around, &lt;a href="http://oopweb.com/CPP/Documents/CPPAnnotations/Volume/cplusplus20.html"&gt;C++ Annotations 6.2.3&lt;/a&gt; to the rescue! Now we're getting somewhere. Aha! &lt;a href="http://www.drdobbs.com/184401305?pgno=1"&gt;Dr. Dobbs&lt;/a&gt; adds some insight.&lt;br /&gt;&lt;br /&gt;Encouraged by the fact that it seemed possible, I looked around for existing libraries. A few options presented themselves in &lt;a href="http://www.velocityreviews.com/forums/t277919-inheriting-streambuf.html"&gt;this excellent forum post&lt;/a&gt;, but they were all either too heavyweight or too awkward. Also, I just wanted to do it myself. Here's a snippet showing how simple it is to use:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;pre&gt;&lt;br /&gt;std::string line;&lt;br /&gt;tcpstream sock;&lt;br /&gt;sock.connect("www.google.com", 80);&lt;br /&gt;if (sock.bad()) handleError();&lt;br /&gt;sock &lt;&lt; "GET / HTTP/1.0\r\nConnection: close\r\n\r\n";&lt;br /&gt;while (sock.connected()) {&lt;br /&gt;   std::getline(sock, line);&lt;br /&gt;   cout &lt;&lt; line;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;Next time I'll detail the process for creating a custom std::streambuf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-2941250673348582989?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/2941250673348582989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/2941250673348582989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/2941250673348582989'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/11/creating-stdiostream-socket-class-part.html' title='Creating a std::iostream socket class (Part 1)'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-4963258738765119321</id><published>2010-03-07T19:17:00.000-08:00</published><updated>2010-03-07T19:42:41.722-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='voodoo'/><category scheme='http://www.blogger.com/atom/ns#' term='solar'/><category scheme='http://www.blogger.com/atom/ns#' term='secondlaw'/><category scheme='http://www.blogger.com/atom/ns#' term='hydrogen'/><title type='text'>Wait, what?</title><content type='html'>I'm seeing stuff in the news about some &lt;a href="http://web.mit.edu/chemistry/dgn/www/research/e_conversion.html"&gt;research done by MIT&lt;/a&gt; (usually a pretty good bunch) which claims to use some  combination of voodoo, a catalyst and some solar energy to crack water into hydrogen and oxygen. The numbers in their &lt;a href="http://www.scientificamerican.com/blog/post.cfm?id=shift-happens-will-artificial-photo-2010-03-03"&gt;press release&lt;/a&gt;, as reported by Scientific American, are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Energy input from a "five meters by six meters" photovoltaic array.&lt;/li&gt;&lt;li&gt;A time period of "less than four hours".&lt;/li&gt;&lt;li&gt;A total amount of stored hydrogen/oxygen fuel of "enough energy for the average American home", which he quotes as "30 kilowatt-hours". (Holy shit, the average American home uses 30 kWh/day?!)&lt;/li&gt;&lt;/ul&gt;OK, let's do the maths.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;5m x 6m = 30m^2 photovoltaic array, at the peak commercially available efficiency of 20%, at peak solar power density of roughly 1kW/m^2, that's 6kW of solar panels.&lt;/li&gt;&lt;li&gt;6kW over four hours gives 24kWh of electrical energy from the sunlight.&lt;/li&gt;&lt;/ul&gt;He claims to generate enough hydrogen/oxygen fuel to generate 30kWh, with an input of 24kWh of electricity. Now, even assuming that the electrolysis process is 100% efficient, one of two things MUST be true:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The 'catalyst' that he's developed is consumed in the process and it costs more than 6kWh to produce the amount he's quoting, OR&lt;/li&gt;&lt;li&gt;The second law of thermodynamics "doesn't apply because this is chemistry not physics." If anyone uses this argument I will personally punch them in the nipples.&lt;/li&gt;&lt;/ol&gt;My initial reaction to this claim was "thou shalt not suffer a witch to live", but instead I'm going to err on the side of assuming the reporting article is wrong and it actually says "enough energy for the average American home&lt;span style="font-style: italic;"&gt; in conjunction with changes to make the home more efficient&lt;/span&gt;" or something, which could easily mean that they're generating 10-15kWh of fuel from the 24kWh of solar energy, which is an attainable target if you accept the existence of a fancy new catalyst.&lt;br /&gt;&lt;br /&gt;Still, however impossible the initial claims, efficient storage of solar energy in the form of hydrogen is one piece of the puzzle for long-term renewable small-scale solar baseline power. I'll be keeping my eye on this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-4963258738765119321?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/4963258738765119321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/03/wait-what.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/4963258738765119321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/4963258738765119321'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/03/wait-what.html' title='Wait, what?'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-6654466619497626823</id><published>2010-02-15T17:30:00.000-08:00</published><updated>2010-02-15T17:46:06.663-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thievery'/><category scheme='http://www.blogger.com/atom/ns#' term='ip'/><category scheme='http://www.blogger.com/atom/ns#' term='bastards'/><category scheme='http://www.blogger.com/atom/ns#' term='lies'/><category scheme='http://www.blogger.com/atom/ns#' term='interzone'/><title type='text'>International IP Theft for Dummies</title><content type='html'>This post comes from slightly bitter experience; Interzone Games, a place I used to work, is currently at step 4/5 of this process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;Thievering Intellectual Property for Fun and Profit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;A How-To Guide&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Set up a nested stack of companies: [IP Owner] owns [LLC Debt Fuse] owns [Studio]&lt;/li&gt;&lt;li&gt;[Studio] does work-for-hire for [IP Owner]. Outgoing expense contracts are with [Studio], and IP produced is owned by [IP Owner].&lt;/li&gt;&lt;li&gt;When funding runs out, squeeze another 6-12 months of work out of [Studio] by running up debts on [Studio]'s credit. Promise anything you have to, from shares to nerf weapons to million-dollar beach condos for all after shipping. Nothing you say here is legally binding.&lt;/li&gt;&lt;li&gt;Once all avenues of stalling debt payments and exploiting workers' good faith (and gullibility) are exhausted, liquidate [Studio]. Assets lost will be minimal (basically just some old hardware), and [LLC Debt Fuse], being limited liability, insulates [IP Owner] from any of [Studio]'s debt being passed on.&lt;/li&gt;&lt;li&gt;Blame [Studio] for everything, set up [New LLC Debt Fuse] and [New Studio], and go to step (2).&lt;/li&gt;&lt;li&gt;Repeat until IP is finished enough to sell. Sell IP. Profit.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Pro Tips:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Don't explain the corporate structure to employees, it might tip them off.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt; Establish [Studio] in a different country to [IP Owner], so public servants and government departments will put any complaints and/or legal action in the 'too hard' pile until far too late.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-6654466619497626823?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/6654466619497626823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2010/02/international-ip-theft-for-dummies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/6654466619497626823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/6654466619497626823'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2010/02/international-ip-theft-for-dummies.html' title='International IP Theft for Dummies'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-8566230364309995466</id><published>2009-12-02T19:34:00.000-08:00</published><updated>2009-12-02T21:32:38.769-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='global warming'/><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='stupid'/><category scheme='http://www.blogger.com/atom/ns#' term='batteries'/><category scheme='http://www.blogger.com/atom/ns#' term='environment'/><category scheme='http://www.blogger.com/atom/ns#' term='hydrogen'/><title type='text'>Stop with the hydrogen already, it's stupid.</title><content type='html'>I love hydrogen, really I do. It's a prime ingredient in the biggest bombs we can make. It makes a wonderful bang when you fill a balloon with it and then poke it with a match. It burns clean, producing nothing but chemically pure DHMO. But for the love of god, stop with the 'hydrogen economy' crap. It's terribly inefficient. Don't take my word for it, go ask a physicist.&lt;br /&gt;&lt;br /&gt;Electric transportation is the way of the future, and it's awesome, but we need to ditch this fixation on hydrogen. Fuel cells are good for two things: Sounding cool, and distracting the public from battery electric vehicles. This whole hydrogen thing was started by car manufacturers back in the late '90s so they could look like they were saving the environment while they continued to build lounge-room-sized SUVs, and it was encouraged by the U.S. government because they couldn't figure out how to appropriately tax EVs. Petrol taxes elegantly combine paying for road wear caused with an incentive for efficiency by the vehicle in a way that is nigh impossible with EVs. But I digress.&lt;br /&gt;&lt;br /&gt;Let's face it, physics is not on the side of hydrogen. First, you have to generate the hydrogen, which today is generally done by processing 'natural gas', the primary source of which is fossil fuels. Yes, your hydrogen fuel cell car will run off dinosaur farts just like your old banger does now. The only carbon neutral sources of hydrogen are processing biogas (unlikely to ever provide the quantities required) and electrolysis of water, which in the very best case is still less than 50% energy efficient.&lt;br /&gt;&lt;br /&gt;Next, once you have your supply of pure hydrogen, you have to store it. This bit is a pain in the ass. The main technologies we currently have for hydrogen storage are high pressure tanks, cryogenic storage, and storage as metal hydrides. Compressing hydrogen to between 350 and 700 bar. for high pressure storage requires a large energy input, which is wasted as heat when the hydrogen cools to ambient temperature after compression. Cryogenic storage requires similar energy inputs to both compress and cool the hydrogen. Metal hydride storage systems are safer than high pressure systems but are heavy and require heating to 120-200°C to release the stored hydrogen.&lt;br /&gt;&lt;br /&gt;Now, you can get to the cool bit, which is recombining the hydrogen with oxygen to produce actual turning of wheels and so forth. The only problem is that by now, less than a quarter of the energy you had in the first place is still available to you in the form of hydrogen. 75% of that energy is gone.&lt;br /&gt;&lt;br /&gt;Compare this with a battery electric vehicle running with nanophosphate lithium batteries. Charging and discharging the battery requires power electronics which are typically around 80-90% efficient. Other than that, energy losses are minimal. Overall, a hydrogen infrastructure would require around three times as much input power as a battery-based infrastructure. And that's terrible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-8566230364309995466?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/8566230364309995466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/12/stop-with-hydrogen-already-its-stupid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8566230364309995466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8566230364309995466'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/12/stop-with-hydrogen-already-its-stupid.html' title='Stop with the hydrogen already, it&apos;s stupid.'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-5454644650378258692</id><published>2009-10-22T22:07:00.001-07:00</published><updated>2009-10-22T22:23:31.798-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='yoville'/><category scheme='http://www.blogger.com/atom/ns#' term='wtf'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>YoVille is scary and depressing.</title><content type='html'>So I logged in to YoVille, because my nearest and dearest just started playing it and she sent me some notification thing telling me to log on. She's no longer online (thanks to one of our cats making a mess) but her avatar's standing around in her house, which I'd logged out in... I guess that's like staying over, right? Anyway, apparently by 'joking' with her (by which I mean 'clicking on the happy/sad drama masks button and getting a funny face from her avatar in return') I reached a new level. I am now a 'friend'.&lt;br /&gt;&lt;blockquote&gt;Since you're great at maintaining relationships, you have the opportunity to share and collect Friendship Tokens for each of your friends. Collect them all!&lt;/blockquote&gt;So now visiting someone's virtual loungeroom once a day makes me 'great at maintaining relationships'? And Friendship Tokens are something I have to collect from my friends so that I know they like me? I feel vaguely ill. And then it gets better... her avatar sweetly entreats me:&lt;br /&gt;&lt;blockquote&gt;Remember to come back tomorrow or our friendship will weaken!&lt;br /&gt;&lt;/blockquote&gt;Seriously, wtf. Remember, this is my &lt;span style="font-style: italic;"&gt;wife&lt;/span&gt; we're talking about here, listed in my Facebook profile and everything, and this game is telling me that I have to visit her daily in-game to remain as her friend.&lt;br /&gt;&lt;br /&gt;I think if I ever need a game to reassure me that I'm 'great at maintaining relationships' (especially when I've done nothing in the game to indicate anything of the sort, although that reminds me, I must catch up with the lads for some beers, it's been weeks!) then I should probably engage in terminal autoasphyxiation immediately.&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-5454644650378258692?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/5454644650378258692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/10/yoville-is-scary-and-depressing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/5454644650378258692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/5454644650378258692'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/10/yoville-is-scary-and-depressing.html' title='YoVille is scary and depressing.'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-8469369999218785432</id><published>2009-10-22T18:32:00.000-07:00</published><updated>2009-10-22T20:24:07.950-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='global warming'/><category scheme='http://www.blogger.com/atom/ns#' term='dinosaurs'/><category scheme='http://www.blogger.com/atom/ns#' term='explosions'/><category scheme='http://www.blogger.com/atom/ns#' term='climate change'/><category scheme='http://www.blogger.com/atom/ns#' term='dooom'/><title type='text'>Trust me... the Earth will be fine.</title><content type='html'>There's an old saying that "those who do not study history will be doomed to repeat it". I hold that we're not looking &lt;span style="font-style: italic;"&gt;far enough&lt;/span&gt; in the past when we panic about the current state of our environment.&lt;br /&gt;&lt;br /&gt;Cast your mind back 65 million years, to when Tyrannosaurus Rex ruled the land and Plesiosaurs and Mosasaurs hunted the seas. The world was warm and tropical, with a cosy blanket of volcanic carbon dioxide covering the Earth. Glaciers were banished to the highest mountains. All appeared perfect, but for the dinosaurs, the terrible menace of climate change loomed.&lt;br /&gt;&lt;br /&gt;For millions of years, careless dinosaurs and hapless plants had been falling into peat bogs and, trapped, sinking to their dooms. Instead of decomposing on the surface and returning their nutrients to the biosphere as all environmentally responsible dinosaurs should do, the precious carbon that made up nearly a fifth of their body weight was trapped. Each peat bog death trapped enough carbon to remove from the atmosphere almost half the creature's body weight in carbon dioxide.&lt;br /&gt;&lt;br /&gt;For a time, volcanoes continued to release vast quantities of carbon dioxide into the atmosphere, and balance was preserved. Eventually, though, among the lush overgrowth, the peat bogs began to win their eternal war against the greenhouse effect. As the carbon dioxide levels dropped in the atmosphere, the Earth began to cool.&lt;br /&gt;&lt;br /&gt;The dinosaurs were now in terrible danger - if they'd had the same computer modelling tools that we humans have now, they'd have known that our Earth is very vulnerable to the so-called &lt;a href="http://en.wikipedia.org/wiki/Snowball_Earth"&gt;Snowball Earth&lt;/a&gt; scenario. As the climate cools, more of the Earth's surface is covered in highly reflective snow and ice. This increases the Earth's albedo, sending much-needed solar warmth back into space and further cooling the planet. The resulting positive feedback cycle sends the temperature spiralling downwards, and soon the entire globe is covered in ice and the equator is as cold as Antarctica.&lt;br /&gt;&lt;br /&gt;Eventually a massive meteor strike tipped the balance, and the Earth entered an ice age. After millions of years of warmth, the dinosaurs could not adapt to the snow and ice, and began to die out, leaving the world to the birds, the fish, and us annoyingly cute fuzzy warm things. We shivered and grew our fur ever longer to keep warm, and waited for the patient volcanoes to finally spew forth enough carbon dioxide to trap some scant warmth from the sun, and melt the ice again.&lt;br /&gt;&lt;br /&gt;Now jump forward to the present day. It looks like we're about to repeat the dinosaurs' fatal mistake, doesn't it? We're releasing all that sequestered carbon that they stored over so many years, carelessly tampering with our environment, and we're sure to cause certain doom... right?&lt;br /&gt;&lt;br /&gt;Wrong.&lt;br /&gt;&lt;br /&gt;Consider the following points:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The carbon balance got messed around in the opposite, &lt;span style="font-style: italic;"&gt;much&lt;/span&gt; more dangerous, direction while dinosaurs roamed the Earth. We're still here and the world is quite alright.&lt;/li&gt;&lt;li&gt;It wasn't actually carbon sequestration that caused the last ice age anyway, it was a stonkin' great meteorite that blew up a 600km wide chunk of the Indian ocean near Mumbai.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Earth is slowly heading &lt;span style="font-style: italic;"&gt;into&lt;/span&gt; an ice age, right now. Over the last 3 million years, the cycles of glacial growth have been intensifying. Every 40k - 100k years, the glaciers grow and then retreat, and each time they grow a little further.&lt;/li&gt;&lt;li&gt;The carbon dioxide that we're releasing by burning fossil fuels was taken out of the atmosphere when prehistoric plants and animals fell into peat bogs instead of decaying in the atmosphere. We're not introducing it into the atmosphere... we're just putting it &lt;span style="font-style: italic;"&gt;back&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;We're fuzzy mammals with big brains. We can build things like fur coats and air conditioners to allow us to live in a far wider range of environments than big slow dumb lizards can handle.&lt;/li&gt;&lt;/ol&gt;Really, the notion that we are responsible for this planet's biosphere is hubris beyond belief. Sure, we have an effect on it... but that effect is minuscule. Our entire contributions as a species, with all our terribly clever machines and 'big' industry, are responsible for &lt;span style="font-weight: bold;"&gt;less than 5%&lt;/span&gt; of carbon dioxide emitted into the atmosphere.&lt;br /&gt;&lt;br /&gt;There are things that can dramatically alter our planet's environment, this is true. These things can mess up our ecosystem and probably kill most of us, although I'm a firm believer in humanity's ability as a species to survive pretty much anything - we beat cockroaches hands down.&lt;br /&gt;&lt;br /&gt;Things that can destroy our planet's environment:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The sun. If the sun changes its output significantly in any way, we're fucked.&lt;/li&gt;&lt;li&gt;Meteorites. If we get hit by a supermassive meteorite, we're fucked.&lt;/li&gt;&lt;li&gt;Stars. If a star goes supernova within 20 light years, we're probably fucked.&lt;/li&gt;&lt;/ol&gt;Things that can mess with the environment enough to worry us:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Volcanoes. These things made virtually all of the carbon dioxide in the atmosphere. They can always make more, and in fact they're constantly doing so, a fact which saves us from a permanent 'snowball earth' scenario.&lt;/li&gt;&lt;li&gt;Continental drift. This seems to be a major factor in long-term (millions-of-years scale) climate changes.&lt;/li&gt;&lt;/ol&gt;Somewhere way down around position 73 on this list is 'humans doing stuff'.&lt;br /&gt;&lt;br /&gt;We'll be fine. Or if we're not, it'll be because of something that we can't do jack about, so there's no real point worrying. Carbon limits are fun (I intend to make my millions off 'em :). Renewable resources are wonderful because in future they'll become cheaper and more convenient than burning tonnes and tonnes of coal a day to keep the trains running on time. But really, people - stop worrying that we'll destroy the world. We're not that big.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-8469369999218785432?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/8469369999218785432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/10/trust-me-earth-will-be-fine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8469369999218785432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8469369999218785432'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/10/trust-me-earth-will-be-fine.html' title='Trust me... the Earth will be fine.'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-1687685010217597997</id><published>2009-05-12T22:59:00.000-07:00</published><updated>2009-05-12T23:25:44.939-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cheap'/><category scheme='http://www.blogger.com/atom/ns#' term='chainsaw'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='powertools'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><title type='text'>Cheap power tools are fun!</title><content type='html'>Having been getting a little into the D.I.Y. stuff recently, I'm coming to a deep appreciation of low-quality tools. You can get incredibly cheap knockoffs of virtually every power tool known to man, meaning that for under $50 you you can get just about anything that buzzes, cuts, nails, staples, or drills.&lt;br /&gt;&lt;br /&gt;The obvious good thing about tools like this is the simple fact that they're available. I need to cut a tree down, I can either spend 5 hours hacking at it with an axe, or I can plonk down $99 and pick myself up a &lt;a href="http://www.gmcompany.com/index.cfm?module=products&amp;amp;pid=623"&gt;chainsaw&lt;/a&gt;. :D Sure, you could go and spend $600 on a &lt;a href="http://www.stihl.com.au/Products/product.cfm?iModelID=509"&gt;STIHL&lt;/a&gt; that's virtually identical, but for me, the $99 one is &lt;span style="font-style: italic;"&gt;better&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The less obvious good thing, and the reason that in my opinion it's even better is that, while the two probably do similar jobs of actually cutting wood, the STIHL &lt;span style="font-style: italic;"&gt;won't break down&lt;/span&gt;. This is a bad thing, you say? Not if (like me) you like doing DIY stuff, and you like learning about how things work. I don't think I've owned a single China brand tool that hasn't broken at least once. In each case, I've taken the thing apart, learned exactly how it works, fixed it (cheap generally implies simple, so they're easy to fix) and put it back together. Ever afterwards, I'll not only have the power tool, but I'll &lt;span style="font-style: italic;"&gt;understand&lt;/span&gt; it.&lt;br /&gt;&lt;br /&gt;If money's no object, you just want a tool to get the job done and you don't care how, then by all means get the expensive version. But you'll learn a lot more by using and fixing the cheap one, and honestly, it'll be more fun. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-1687685010217597997?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/1687685010217597997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/05/cheap-power-tools-are-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/1687685010217597997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/1687685010217597997'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/05/cheap-power-tools-are-fun.html' title='Cheap power tools are fun!'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-2350433631008337292</id><published>2009-05-11T20:41:00.000-07:00</published><updated>2009-05-11T20:53:31.928-07:00</updated><title type='text'>Damn microwaves and frozen food</title><content type='html'>Remember back in the day, when microwave ovens focussed the microwaves at the center of the oven? And when you put that bowl of frozen soup in, you ended up with a little boiling pool of soup in the middle and frozen soup around the outside? Yeah, that was annoying when it was something solid you were heating and it was all uneven, but it was a damn sight better at thawing frozen soup than modern microwaves. I've had frozen soup for the last two days for lunch, and while it's delicious soup, it's really highlighting this shortfall for me.&lt;br /&gt;&lt;br /&gt;What we need is a microwave with two different microwave channels. One does the modern, well dispersed microwave pattern, and a second one (with adjustable power compared to the first) just nukes the hell out of the central 2 inches of the platter. That way we can have food heated evenly and the world will be a happy place and hugs and puppies and lollipops and a rainbow and a chocolate fountain!&lt;br /&gt;&lt;br /&gt;*sigh* Off to re-microwave my half boiling half frozen soup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-2350433631008337292?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/2350433631008337292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/05/damn-microwaves-and-frozen-food.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/2350433631008337292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/2350433631008337292'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/05/damn-microwaves-and-frozen-food.html' title='Damn microwaves and frozen food'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-8232845893832192112</id><published>2009-04-28T22:14:00.000-07:00</published><updated>2009-04-28T22:53:51.280-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uzi'/><category scheme='http://www.blogger.com/atom/ns#' term='stupid'/><category scheme='http://www.blogger.com/atom/ns#' term='airport'/><category scheme='http://www.blogger.com/atom/ns#' term='errorism'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Middle aged mum terrorises airport with imaginary gun!</title><content type='html'>&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Jackiey&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Budden&lt;/span&gt;, 51, was &lt;a href="http://www.news.com.au/travel/story/0,28318,25403108-5014090,00.html"&gt;detained for 45 minutes and strip searched&lt;/a&gt; after joking about having a gun when asked if she had "anything dangerous" in her bags at an airport. Maybe if I were more judgemental, I'd just say "serve her right for having parents who spell 'Jacky' wrong."&lt;br /&gt;&lt;br /&gt;I would be inclined to laugh it off as "only in England" if it weren't for the fact that a few years ago, I witnessed an almost identical event with my own mother. We were travelling to New Zealand, and while going through our second &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;pre&lt;/span&gt;-boarding screening at Perth International Airport, we had (once again) to plonk all our stuff into the plastic &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;conveyor&lt;/span&gt; belt box thingy. Mum held on to the plastic ticket pouch, which was about the size of a cheque book. The guard ordered her to put it in the tray with the other stuff and, being my mum, she replied "oh yeah, because I've got an Uzi in there!"&lt;br /&gt;&lt;br /&gt;An &lt;a href="http://en.wikipedia.org/wiki/Uzi"&gt;Uzi&lt;/a&gt;. An antique &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;submachine&lt;/span&gt; gun that's almost half a meter long and weighs 3.5 kilos. Not very subtle. Good for shooting Nazis and ruling small African nations with an iron fist. Not good for concealed carrying. Tucked in between our boarding passes in the 8-inch-long ticket pouch that she's waving around with one hand. Yeah. I laughed, the security guard didn't. He detained her for about 15 minutes (almost causing us to miss our plane), and if his superior hadn't told him to stop being a dickhead and let us go we'd probably still be there to this day. She got a massive angry lecture about how it's "no joking matter" and a "very serious offense to threaten security staff"... fer' &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;chrissake&lt;/span&gt;, some people just aren't smart enough to be let loose on polite society.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-8232845893832192112?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/8232845893832192112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/04/middle-aged-mum-terrorises-airport-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8232845893832192112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/8232845893832192112'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/04/middle-aged-mum-terrorises-airport-with.html' title='Middle aged mum terrorises airport with imaginary gun!'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-3267293092066334461</id><published>2009-04-28T00:11:00.000-07:00</published><updated>2009-10-05T20:38:31.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='talkback'/><category scheme='http://www.blogger.com/atom/ns#' term='ocd'/><category scheme='http://www.blogger.com/atom/ns#' term='geocoding'/><title type='text'>Help! I'm addicted to talkback!</title><content type='html'>It started with &lt;a href="http://slashdot.org/"&gt;Slashdot&lt;/a&gt;, then &lt;a href="http://blogs.news.com.au/bossy/"&gt;Ask Bossy&lt;/a&gt; (I've always been a closet Agony Aunt). From there it spread to commenting on news stories on &lt;a href="http://www.news.com.au/"&gt;news.com.au&lt;/a&gt;. So far, nothing sinister or worrying. Then, one day while driving to work, I heard a particularly stupid comment on the radio and the next thing I know, I'm looking for the 'post a comment' button on my steering wheel! Soon it was way out of control, and I've been wishing I could post responses to everything from billboards to peoples' bumper stickers.&lt;br /&gt;&lt;br /&gt;I really can't wait until the internet is better integrated with the world around us. I've always been fascinated by the idea of &lt;a href="http://en.wikipedia.org/wiki/Reverse_geocoding"&gt;reverse geocoding&lt;/a&gt;, in the extended sense of taking your current location and view direction, and finding locally relevant data to display. The end result would be sort of like real-life tooltips for your physical surroundings. I want to walk down a street, and when I look at a shop, I see an overlay saying "Today's specials: widget X for $75!". Or I look at a train station and the times and stopping patterns of the next three trains pop up above it. Or I'm meeting a friend in a crowded public space and they get a neon MMO-style nameplate floating above their head so I can see where they are (and they can see me) even round a blind corner. (This last one, you can do to an extent with &lt;a href="http://www.loopt.com/"&gt;Loopt&lt;/a&gt; on an iPhone).&lt;br /&gt;&lt;br /&gt;And of course, imagine the opportunities for commenting on stuff! You could tag someone's hawaiian shirt as "tastelessly unneccessary". You could voice your opinion on, well, pretty much anything! Which, I guess, is the fatal flaw of all this - that most people don't have that much interesting to say. :/ And worse yet, they have it to say about &lt;span style="font-style: italic;"&gt;everything&lt;/span&gt;,  so any system like this would result in an incredible quantity of mundane crap. Still, with some kind of reputation system to use as a filter on it all (mass moderation, Slashdot style? &lt;a href="http://en.wikipedia.org/wiki/Whuffie"&gt;Whuffie&lt;/a&gt;? Or even applying Google's PageRank to people en masse?) it could lead to some very interesting possibilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-3267293092066334461?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/3267293092066334461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/04/help-im-addicted-to-talkback.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3267293092066334461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3267293092066334461'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/04/help-im-addicted-to-talkback.html' title='Help! I&apos;m addicted to talkback!'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-3549217193148996449</id><published>2009-04-27T23:34:00.000-07:00</published><updated>2009-04-28T00:08:34.282-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='supra'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><title type='text'>So much for do-it-myself maintenance...</title><content type='html'>Well, I finally gave in and booked the Supra in for a service today. I've been going on a DIY binge recently, especially for things like car maintenance (I changed the front brake pads a couple of weeks ago which was fun, it took me three hours when it should have taken 30 minutes but now I know exactly how to do it and next time it'll be a lot quicker). I've got a 1980s-garage-style hydraulic jack now, which is awesome because I hate cranking the stupid emergency jack and when the car's up on it it's about as stable as Lindsay Lohan anyway. I've got all the different varieties of oil that I needed to do the change myself. I have a new oil filter ready and waiting. There was only one thing stopping me from doing the entire service.&lt;br /&gt;&lt;br /&gt;The damn sump lug.&lt;br /&gt;&lt;br /&gt;I don't have a proper set of stands yet, and I have to work on a gravel driveway anyway, so I don't want to be yanking too hard on the underside of the car while I'm under it, even though I'm reeeasonably sure that the jack and the bricks holding the car up can't BOTH fail at once. But when I'm lying on my back in the gravel, merrily bending a forged steel spanner on the sump lug which isn't even budging, with a tonne and a half of Supra poised six inches above my nose, the $150 it costs to get a mechanic to do the change in his shop doesn't seem  quite so bad. So now I've got the old girl in at the Auto Bahn near work. Here's hoping that they don't add another huge dent in the side like Carbon Tune did. And here's looking forward to One Of These Days(TM) when I have an actual garage with concrete floor and stuff. That's gonna be awesome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-3549217193148996449?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/3549217193148996449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/04/so-much-for-do-it-myself-maintenance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3549217193148996449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/3549217193148996449'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/04/so-much-for-do-it-myself-maintenance.html' title='So much for do-it-myself maintenance...'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-315178725937017182.post-7981961634751424147</id><published>2009-04-20T22:43:00.000-07:00</published><updated>2009-04-22T20:02:45.553-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aloha'/><title type='text'>Ah require a blogging tool.</title><content type='html'>Welcome to TurboCrank! All the soap has been removed from the box, it's upside down, and now I'm going to use it to stand on so that you-up-the-back can see what I'm writing.&lt;br /&gt;&lt;br /&gt;It's been a fair while since I had a web site. My old one, Fractal Infinities, finally died when the ISP I used to work for closed. I frequently rant about life, people, the world, culture, in fact pretty much whatever crosses my mind, so I figured if I had a blog and I pretended that people read it, that would save my friends and family from the worst of it. ;)&lt;br /&gt;&lt;br /&gt;About me; I'm 27, somewhat recently married, play World of Warcraft, work for a company that makes financial software (I used to work at &lt;a href="http://www.interzoneentertainment.com/"&gt;Interzone Games&lt;/a&gt; until their haed asplode due to the Global Fubar Crash). I like fast cars, alcohol (not at the same time), mi goreng, nachos, and things with blinky lights. My political views are fairly libertarian and my attitude towards nanny-state safety laws verges on Darwinism.&lt;br /&gt;&lt;br /&gt;You can expect literate, well thought-out and yet hopefully amusingly opinionated blahblah to follow. There will probably also be annoying movie quotes, mostly from Arnie because that's just how it is.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/315178725937017182-7981961634751424147?l=turbocrank.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbocrank.blogspot.com/feeds/7981961634751424147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://turbocrank.blogspot.com/2009/04/ah-require-blogging-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7981961634751424147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/315178725937017182/posts/default/7981961634751424147'/><link rel='alternate' type='text/html' href='http://turbocrank.blogspot.com/2009/04/ah-require-blogging-tool.html' title='Ah require a blogging tool.'/><author><name>Tane Pendragon</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
