<?xml version="1.0" encoding="ISO-8859-1"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-US">
	<title>Jeff&#039;s Homepage</title>
	<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php" />
	<modified>2012-02-23T03:57:56Z</modified>
	<author>
		<name>Jeff Wilson</name>
	</author>
	<copyright>Copyright 2012, Jeff Wilson</copyright>
	<generator url="http://www.sourceforge.net/projects/sphpblog" version="0.5.1">SPHPBLOG</generator>
	<entry>
		<title>OSX Lost Windows</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry110627-181031" />
		<content type="text/html" mode="escaped"><![CDATA[Sometimes I run applications with multiple monitors on OSX and unplug the external monitor and a few applications will mysteriously disappear. They are actually still running, but for some reason they don&#039;t move over to the active screen (e.g. the laptop&#039;s LCD).<br /><br />To make matters worse, exiting and reopening the application doesn&#039;t work either. They apparently re-spawn to their last location which doesn&#039;t exist anymore. Plugging back in the external monitor will bring back the application, but access to my external monitor isn&#039;t always possible when I need to use a &quot;lost&quot; application.<br /><br />A few applications will allow you select Window from the File Menu and choose something like &quot;Tile&quot; which will work for recovery. However, I&#039;ve run across a few applications that don&#039;t have any roundabout solution like that to move the lost window. (SQLiteStudio has been the worst offender for me.)<br /><br />A bit of Googling found a solution with various similar AppleScripts that will check all windows and make sure they are visible and if not move them into view. This requires enabling System Preferences-&gt;Universal Access-&gt;[checkbox]Enabled Access for Assistive Devices to allow for this automation (potentially a security risk, but I digress).<br /><br />Here is an example script: <a href="http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/" target="_blank" >Gather Lost Windows Script</a><br /><br />This sounded great and I gave it a shot, but was immediately greeted with an error: &quot;Access for assistive devices is disabled&quot; when running the script. This was a bit perplexing because I had already checked that it was in fact enabled. I proceeded to play around with checking and unchecking the box in the Universal Access panel but nothing worked.<br /><br />I just assumed my laptop was somehow corrupted. However, Googling didn&#039;t indicate anyone else had a similar problem. So I did a little bit of script debugging and realized that some windows were successfully being tested for being &quot;off screen&quot; before the error finally triggered on one particular process. Toggling OFF the &quot;access for assistive devices&quot; would cause the very first process to trigger the error, while ON something like the 5th process would trigger it.<br /><br />I came to realize that the error that AppleScript returns is actually a permissions problem of some sort, just with a very poor and misleading error message. So I wrapped a TRY block around the offending code to allow the script to go to completion and it worked for recovering my SQLiteStudio window at least. I&#039;m not sure if other applications that get stuck offscreen may fail (due to the mystery permissions error), but I can at least gather my main offending application. My modified script follows (based off of the script linked above). Feel free to use it! And thanks to the original author for getting me most of the way there.<br /><br /><code>-- Example list of processes to ignore: {&quot;xGestures&quot;} or {&quot;xGestures&quot;, &quot;OtherApp&quot;, ...}<br />property processesToIgnore : {}<br /><br />-- Get the size of the Display(s), only useful if there is one display<br />-- otherwise it will grab the total size of both displays<br />tell application &quot;Finder&quot;<br />	set _b to bounds of window of desktop<br />	set screen_width to item 3 of _b<br />	set screen_height to item 4 of _b<br />end tell<br /><br />tell application &quot;System Events&quot;<br />	set allProcesses to application processes<br />	set _results to &quot;&quot;<br />	repeat with i from 1 to count allProcesses<br />		set doIt to 1<br />		repeat with z from 1 to count processesToIgnore<br />			if process i = process (item z of processesToIgnore) then<br />				set doIt to 0<br />			end if<br />		end repeat<br />		<br />		if doIt = 1 then<br />			tell process i<br />				try<br />					repeat with x from 1 to (count windows)<br />						set winPos to position of window x<br />						set _x to item 1 of winPos<br />						set _y to item 2 of winPos<br />						<br />						if (_x &lt; 0 or _y &lt; 0 or _x &gt; screen_width or _y &gt; screen_height) then<br />							set position of window x to {0, 22}<br />						end if<br />					end repeat<br />				on error errmesg number errnumber<br />					<br />				end try<br />			end tell<br />		end if<br />	end repeat<br />end tell</code><br />]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry110627-181031</id>
		<issued>2011-06-28T00:00:00Z</issued>
		<modified>2011-06-28T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Octave on Mac</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry110626-173746" />
		<content type="text/html" mode="escaped"><![CDATA[I wanted to install Octave on Mac, along with a GUI. I chose QTOctave.<br /><br />Initially I installed via macports, pkgs octave and qtoctave-mac. This works fine (took HOURS to compile), but the version of Octave was a bit out of date and didn&#039;t have some of the features I wanted. I discovered that pkg octave-devel is also offered, which is quite up-to-date.<br /><br />So I installed that instead. Unfortunately, qtoctave-mac failed to re-install (I initially had to un-install it when I removed the original octave pkg). This failure is because port detects a architecture mismatch due to universal versus 64 bit binaries. However, qtoctave just interfaces with octave on the command line and it doesn&#039;t matter what arch is used so long as it runs.<br /><br />If you run &#039;sudo port edit qtoctave-mac&#039; you can see/edit the portfile for qtoctave, which defines all the deps. I noticed an interesting line &quot;depends_skip_archcheck&quot;. I noticed that octave was listed, but not octave-devel. So I added it to the line (sep by space) and it worked like a charm!<br /><br />Anyways, that&#039;s all there is to getting qtoctave to work with octave-devel via macports.]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry110626-173746</id>
		<issued>2011-06-27T00:00:00Z</issued>
		<modified>2011-06-27T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Backing Up a Mac (with OSX and Bootcamp)</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry101205-113058" />
		<content type="text/html" mode="escaped"><![CDATA[If you have a Mac you are probably already familiar with Time Machine.  It works pretty well and has some nice features.  However, it’s not really the ideal way to recover from say a catastrophic hard drive failure.  My understanding is that your Time Machine backup cannot be used for a recovery back to EXACTLY the state of your machine at the point of the last backup.  For instance, upon restoring you might find that some of your software is no longer licensed correctly (because some digital certificates aren’t backed up properly).<br /><br />Because of this, many folks recommend making regular backup images, which are exact snapshots of your hard drive.  There are ways to do this with low level tools for free, but if you want to keep things easy then most people seem to recommend purchasing <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html" target="_blank" >SuperDuper!</a>.  This tool lets you make backups to an external or network drive.  You can also do efficient incremental backups (only updating the changes since the last backup) and do scheduling.  You can also mount the image (it’s a sparsebundle) and grab individual files/directories if you like.<br /><br />If you have a Windows OS on a Bootcamp partition then things get a bit trickier if you want to back that up too.  Windows 7 has a fairly nice built-in backup feature.  Unfortunately, from my understanding there is no way to recover a Windows 7 backup image without totally formatting the hard drive and then recovering the image.  This creates a catch-22 because in order run Windows under Bootcamp, you must first install OSX (which would immediately get wiped by the Windows 7 image recovery).<br /><br />The solution is to make backup images of your Bootcamp partition while OSX is booted.  There is exactly one easy-to-use tool that can do this:  <a href="http://download.cnet.com/Winclone/3000-2242_4-172338.html" target="_blank" >Winclone</a>.  Unfortunately, this is product is no longer supported.  It was released as donation-ware but donations are no longer accepted so it’s effectively free now.  From everything I’ve read online, it apparently still works (most of the time).  Many have been able to restore from the compressed Winclone images and you can even do resizing of the image if you want to increase or decrease the space that Windows takes up on your hard drive.<br /><br />So I have been making Winclone image backups with the realization that there might be problems.  So I also make user file backups with Windows 7’s incremental “Shadow Copy” feature (sort of like Time Machine).  If the Winclone image doesn’t work, I’ll just have to rebuild everything and reinstall my applications.<br /><br />I have spent a lot of time looking, but I can’t seem to find any better solution than Winclone.  Almost every other tool out there (including Acronis and others) can’t handle the partitioning scheme that Apple uses for Bootcamp (<a href="http://en.wikipedia.org/wiki/GUID_Partition_Table" target="_blank" >GUID Partitioning</a>).<br /><br />If you just need Windows for a just a couple pieces of Windows-specific software (or just for games), then you might not care about making recovery images at all.  Perhaps only using Windows 7 “Shadow Copy” backups for user files (or use DropBox or a remote backup service).<br /><br />I however really want the full image backups (that can actually be recovered under Bootcamp) because I boot into Bootcamp both from VMWare Fusion as well as directly.  This is officially against Microsoft’s licensing policy and you are supposed to buy TWO OS licenses if you want to do that.  However, it can be made to work if you jump through the right hoops.  If image recovery works for me (in the event of a failure or hard drive upgrade) then I can avoid going through all the effort of double-activating Windows 7 off of one license again.<br /><br />Hopefully some better tools will come out for completely backing up a Mac with Bootcamp.  I&#039;m surprised there isn&#039;t a better way already (or maybe I&#039;ve missed something).]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry101205-113058</id>
		<issued>2010-12-05T00:00:00Z</issued>
		<modified>2010-12-05T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Home Depot Fridge Installer Incompetence</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry101105-143551" />
		<content type="text/html" mode="escaped"><![CDATA[1.) First, the installers didn&#039;t turn the water off when they removed the old ice maker water line.<br /><br />2.) Then they kinked and crimped the crap out of the copper line trying desperately to stop the spray that went all over the place.<br /><br />3.) Next, they told my wife that the 1/4&#039;&#039; copper line would not &quot;fit&quot; the new fridge and we&#039;d need to pay a plumber to run a new line.<br /><br />So I salvaged what remained of the existing copper line and used the new compression fitting that CAME WITH THE NEW FRIDGE and did it myself.  You&#039;d think these guys would at least get a day of training!<br /><br />I can add this experience to my long list of complaints about Home Depot including buying a drain snake that was broken and used (indicated by the hair and gunk wrapped around the coil) inside the sealed box.  It was apparently returned by a customer and put right back on the shelf without inspection.  If you think that&#039;s bad, the same thing happened with a toilet I bought that someone installed but then decided they didn&#039;t want.<br /><br />(I would have passed on shopping at Home Depot again, but unfortunately they were the only ones that had the refrigerator we wanted.)<br />]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry101105-143551</id>
		<issued>2010-11-05T00:00:00Z</issued>
		<modified>2010-11-05T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Favorite Semordnilap</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry101021-071609" />
		<content type="text/html" mode="escaped"><![CDATA[<code><strong><center>bAT<br />VOMIT</center></strong></code><br /><br />Well, it&#039;s actually two <a href="http://en.wikipedia.org/wiki/Palindrome#Semordnilaps" target="_blank" >semordnilaps</a>.  The semordnilaps are from the old adventure game <a href="http://www.adventureclassicgaming.com/index.php/site/reviews/183/" target="_blank" >Manhunter: San Francisco</a> and are part of a rather clever puzzle that involves signage on a glass office door at a murder scene.  You (the gamer) must realize that you are seeing the lettering from the INSIDE of the office and thus a mirror image of the correct text.  Once you realize this, &quot;bAT VOMIT&quot; becomes:<br /><br /><br /><code><strong><center>TAd<br />TIMOV</center></strong></code><br /><br />Knowing the correct name, you can identify the victim and this allows you to make progress in the game. The use of the lowercase &#039;b&#039;/&#039;d&#039; does make the puzzle a little less elegant, but offers a clue as to how to solve it.<br /><br /><br />Here&#039;s a screen capture of the murder scene in all its gruesome 16-color glory:<br /><img src="images/manhunter_bat_vomit.png" width="512" height="311" border="0" alt="" /><br /><br /><br /><b>UPDATE:</b>  This &quot;bAT VOMIT&quot; phrase should probably actually be described as Mirrored Semordnilaps, following the pattern of Mirrored Palindromes.<br />]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry101021-071609</id>
		<issued>2010-10-21T00:00:00Z</issued>
		<modified>2010-10-21T00:00:00Z</modified>
	</entry>
	<entry>
		<title>XCode Preprocessor Declarations for String Aliases</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry101015-105411" />
		<content type="text/html" mode="escaped"><![CDATA[I recently ran into a problem with adding some preprocessor declarations to an XCode project.  Basically I needed to make the equivalent of a #defined symbol but declared within the project rather than source (a pretty common thing to do).<br /><br />Googling quickly identified the project setting &quot;Preprocessor Macros&quot; as being the way to do it.  It maps to the command line GCC option &quot;GCC_PREPROCESSOR_DEFINITIONS&quot;.<br /><br />The documentation says to specify the symbol and if it&#039;s an alias simply list the symbol followed by the equal sign and the value.  <br /><br />Like this:  <br /><br /><code>SYMBOL=FOO</code><br /><br />In my case, I needed the symbol to be a string.  <br /><br />Like this: <br /><br /><code>SYMBOL=&quot;foo&quot;</code><br /><br />This is where I ran into problems.  When I attempted to compile, I got errors that indicated that my quotes had disappeared by the time the preprocessor got the declaration.  So I figured this should be a simple solution.  I just needed to figure out how XCode expects me to escape the quotes.<br /><br />I tried everything to figure out what the stupid escape was.  I tried the standard C-style /&quot;, double-quotes, two single quotes, @&quot;STRING&quot;, HTML tags, etc.  NOTHING worked.  I tried Googling for solutions but came up empty too.<br /><br />Finally, I had my eureka moment.  I&#039;ll just create my own &quot;stringify&quot; macro function and pray I can define macro functions in XCode.<br /><br />If declared in C(++), it would look like this:<br /><br /><code>STRINGIFY(X) #X</code><br /><br />The # sign has special meaning inside preprocessor macros and converts the succeeding argument to an encapsulated string.<br /><br />The full solution is to first define STRINGIFY under XCode&#039;s &quot;Preprocessor Macros&quot; and then use that to define your alias declaration.<br /><br />Like this:<br /><br /><code>STRINGIFY(X)=#X SYMBOL=STRINGIFY(foo)</code><br /><br />And it worked!  I don&#039;t feel too bad about this being a bit hackish because the alternative would be modifying a lot of source code. ;)]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry101015-105411</id>
		<issued>2010-10-15T00:00:00Z</issued>
		<modified>2010-10-15T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Joke</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry100824-061707" />
		<content type="text/html" mode="escaped"><![CDATA[Stolen from &quot;Hognoxious&quot; on <a href="http://science.slashdot.org/story/10/08/24/0155229/The-Strange-Case-of-Solar-Flares-and-Radioactive-Decay-Rates" target="_blank" >Slashdot</a>.<br /><br /><blockquote>Overheard in a museum:<br /><br />Boy: Mister, how old is that dinosaur skeleton?<br /><br />Curator: [after some mumbling and finger counting] 60 million and four years, eight months and sixteen days.<br /><br />Boy&#039;s mother: How can you know so accurately?<br /><br />Curator: Well, in the training course they told me it was 60 million years old. That was when I joined, which would be back in January 2006...</blockquote>]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry100824-061707</id>
		<issued>2010-08-24T00:00:00Z</issued>
		<modified>2010-08-24T00:00:00Z</modified>
	</entry>
	<entry>
		<title>SR-71 Blackbird</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry100606-103545" />
		<content type="text/html" mode="escaped"><![CDATA[<a href="http://www.flickr.com/photos/jeff_wilson/4666935095/" title="SR-71 Blackbird by jayuph, on Flickr"><img src="http://farm2.static.flickr.com/1274/4666935095_812eae587c.jpg" width="500" height="375" alt="SR-71 Blackbird" /></a><br /><br />I recently went to the <a href="http://www.afarmamentmuseum.com/" target="_blank" >Air Force Armament Museum</a> in Fort Walton, FL.  It&#039;s definitely worth checking out if you are ever in the neighborhood.  It&#039;s completely free, though I recommend giving a donation.<br /><br />The coolest thing at the museum is definitely the retired <a href="http://en.wikipedia.org/wiki/SR-71_Blackbird" target="_blank" >SR-71 Blackbird</a> on display out in front of the museum.  Here is a pic I borrowed from an <a href="http://visitsouth.com/articles/article/air-force-armament-museum-fort-walton-beach-fl/" target="_blank" >article about the museum</a>:<br /><br /><img src="images/FWB_Blackbird_500.jpg" width="500" height="500" border="0" alt="" /><br /><br />It was cool to actually be able to get so close to the plane.  One thing that was interesting is just how light the materials were.  It felt very hollow away from leading edges.  It even seemed a bit fragile and would probably easily dent.  I guess if nothing can catch you, it doesn&#039;t matter if you&#039;re fragile. :)<br /><br />Also, the heat expansion joints were quite prominent.  I&#039;ve often heard how the Blackbird leaked fuel through the joints until the skin heats up from supersonic flight and seals tight.  The joint separation was smaller closer to the center of the plane and progressively got larger out towards the wings.  I guess the heat makes the plane bow outwards.<br /><br />The other interesting thing is that there are actually quite a lot of seams, welds, and ripples in the skin.  It&#039;s not perfectly smooth like an expensive sports car.  That matte black paint really gives the impression of being perfectly smooth in the press photos though.  I guess those small imperfections don&#039;t have any significant affect on the plane at Mach 3+.<br /><br />Here is a recent story from a <a href="http://gizmodo.com/5511236/the-thrill-of-flying-the-sr+71-blackbird" target="_blank" >real SR-71 pilot on Gizmodo</a>.  It&#039;s actually an excerpt from a book.  Be sure to read the story about the speed check from an air traffic controller.]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry100606-103545</id>
		<issued>2010-06-06T00:00:00Z</issued>
		<modified>2010-06-06T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Thoughts on AT&amp;T Femtocell</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry100325-093119" />
		<content type="text/html" mode="escaped"><![CDATA[I think the <a href="http://www.wired.com/gadgetlab/2010/03/att-microcell" target="_blank" >AT&amp;T Femtocell</a> is incredibly misguided technology (at least for smart phone owners).  On the surface, it looks kind of cool.  Essentially, it is like a tiny cell tower that you can connect to your existing internet connection.  Voice calls and data are routed via a 3G connection to the Femtocell and then converted to internet protocols and sent to AT&amp;T servers.  The advantage of the Femtocell is that you can get cell coverage where you might otherwise not get it such as in a deadzone, like a building with thick walls.  There are also advantages in that a private Femtocell connection will be available when all the regular cell bandwidth is used up by other users (e.g. cities like New York).<br /><br />So why is it misguided?  On the one hand I think customers will be upset that they need to pay $150 to fix a problem that AT&amp;T should probably be fixing for free.  However, that&#039;s not the problem that I have with the Femtocell.  The issue that bugs me is why use the Femtocell at all when everyone already owns WiFi access points?<br /><br />For instance, iPhones can already communicate with WiFi for internet data connections.  The iPhone will seamlessly switch from 3G to using a trusted WiFi AP with no impact on the user.  Also, we already know that iPhone apps can use the headset speaker and microphone and they can be used effectively with VOIP applications (e.g. Skype).  So instead of a $150 Femtocell box, AT&amp;T should be working with Apple (and other cell phone manufacturers) to create software that will automatically switch from cellular to encrypted VOIP for voice calls.  As mentioned before, they&#039;ve already got the internet data switching working.  And the iPhone is more than powerful enough to process VOIP data.<br /><br />The only negative I can think of is that maintaining an open WiFi connection is probably a big drain on a cell phone&#039;s battery.  For instance, I believe the iPhone closes the WiFi connection whenever it can (especially when the screen is turned off).  If cellular service is not available and the phone is sleeping, then no incoming calls will be able to be received.  Also, some WiFi APs might not have bandwidth of a quality good enough for VOIP.  This might necessitate a feature where the user can select which WiFI APs are trusted for voice to VOIP re-routing. (Perhaps too confusing for the average user.)<br /><br />However, I think a lot of folks are in a situation where they receive 1 or 2 bars at home, just good enough to receive a call.  However, if you don&#039;t stand in the &quot;magic spot&quot; the call gets dropped.  I think people in this scenario could benefit a lot from a WiFi-only solution rather than the Femtocell.  Finally, WiFi VOIP would have an immediate effect on reducing AT&amp;T&#039;s cell bandwidth whereas the Femtocell will only have an effect as quickly as they are sold.<br />]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry100325-093119</id>
		<issued>2010-03-25T00:00:00Z</issued>
		<modified>2010-03-25T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Tilt to Live</title>
		<link rel="alternate" type="text/html" href="http://jeff.wilson.name/index.php?entry=entry100225-183333" />
		<content type="text/html" mode="escaped"><![CDATA[I am excited to report that a previous student of mine from the GA Tech College of Computing Video Game Design class has released his first commercial game.  It&#039;s called <a href="http://onemanleft.com/tilttolive/index.php" target="_blank" >Tilt to Live</a> and it&#039;s available for iPhone on the <a href="http://itunes.apple.com/us/app/tilt-to-live/id335454448?mt=8" target="_blank" >App Store</a>.  It&#039;s a fast-paced arcade style game involving tilting of the phone to steer around avoiding baddies and collecting weapons/power-ups.  It is lots of fun and very intuitive. <br />Tilt to Live is only $2.  IMO, definitely worth it.  Buy it now and show your support for GT-educated game developers!  And if you like it, be sure to tell all your friends.<br /><br /><a href="http://www.youtube.com/watch?v=vr03CIfjK4I" target="_blank" >Tilt to Live Video Trailer - Direct Link</a><br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/vr03CIfjK4I&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vr03CIfjK4I&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />]]></content>
		<id>http://jeff.wilson.name/index.php?entry=entry100225-183333</id>
		<issued>2010-02-26T00:00:00Z</issued>
		<modified>2010-02-26T00:00:00Z</modified>
	</entry>
</feed>

