<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0YBR3gyfCp7ImA9WhRUFUk.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611</id><updated>2012-01-25T20:25:56.694-05:00</updated><category term="Windows XP" /><category term="virtualization" /><category term="Visual Studio" /><category term="Windows Mobile" /><category term="interop" /><category term="datasets" /><category term="DNS" /><category term="diruse" /><category term="SQL" /><category term="debugging" /><category term="Token Bucket" /><category term="Podcasts" /><category term="Statistics" /><category term="RAID" /><category term="windows desktop search" /><category term="Fourier Series" /><category term="p/invoke" /><category term="Math" /><category term="Windows" /><category term="windows support tools" /><category term="MultiThreading" /><category term="help" /><category term="Concurrency" /><category term="headphones" /><category term="C++" /><category term="Application Settings" /><category term="virtual memory" /><category term="Chrome" /><category term="ActiveX" /><category term="tips" /><category term="xcopy" /><category term="remoting" /><category term="Networking" /><category term="Windows Azure" /><category term="Events" /><category term="ipc" /><category term="process explorer" /><category term="artificial intelligence" /><category term="command shell" /><category term="Anonymous Methods" /><category term="rant" /><category term="hardware" /><category term="LINQ" /><category term="Windows Forms" /><category term="Windows Vista" /><category term="threads" /><category term="internet explorer" /><category term="remote" /><category term="Visio" /><category term="Hackers" /><category term="Image Processing" /><category term="UML" /><category term="Design" /><category term="COM" /><category term="Algorithms" /><category term="gaming" /><category term="BackgroundWorker" /><category term="PERL" /><category term="USB" /><category term="C#" /><category term="android" /><category term="headset" /><category term="Linux" /><category term="pageheap" /><category term="COM Interop" /><category term="google reader" /><category term="regular expressions" /><category term="windows installer" /><category term="general programming" /><category term="wmi" /><category term="DirectX" /><category term="Fourier Transform" /><category term="5.1 surround sound" /><category term="subversion" /><category term=".NET" /><category term="Utilities" /><category term="DOS" /><title>Arnshea's Blog - Technothusiast Linguaphile</title><subtitle type="html">A mostly software (C#, C++, PERL and anything else I can make use of) focused blog about the insights, foibles, follies and frustrations of a programmer trying to be both productive and conscientious. 

While I work for Microsoft my employer can't be blamed (or praised) for anything posted on this entirely personal blog.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://arnshea.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>180</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/MusingsOfATechnothusiastLinguaphile" /><feedburner:info uri="musingsofatechnothusiastlinguaphile" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUIDQX86fyp7ImA9WhRQGE4.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-4220959520760962145</id><published>2011-12-13T23:39:00.001-05:00</published><updated>2011-12-13T23:39:30.117-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-13T23:39:30.117-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Motorola’s Droid RAZR vs. Samsung’s Infuse 4G</title><content type="html">&lt;p&gt;I’ve had Motorola’s Droid RAZR for a few weeks now so feel comfortable commenting on the advantages and disadvantages relative to my previous phone (the Samsung Infuse 4G and Samsung Captivate).&lt;/p&gt;  &lt;h1&gt;Advantages&lt;/h1&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Better Bluetooth stack&lt;/strong&gt;. I believe it supports Bluetooth 4.0. Voice dialing works with my car stereo (&lt;a href="http://mobile.jvc.com/product.jsp?modelId=MODL028809&amp;amp;pathId=142&amp;amp;page=1"&gt;JVC KD-A925BT&lt;/a&gt;) which wasn’t the case with the Infuse.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Speed&lt;/strong&gt;. The phone doesn’t get sluggish when I have a few apps open. 1GB of RAM and a dual core processor make the user experience much snappier.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Podcasts&lt;/strong&gt;. The native music app integrates podcast.com which seems to have a more recent (and larger) database of podcasts to choose from.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Social Networking&lt;/strong&gt;. The Droid RAZR supports more sites out-of-the-box: Facebook, Twitter, LinkedIn, Skype and YouTube.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Verizon’s Network&lt;/strong&gt;. This isn’t exactly exclusive to the RAZR but Verizon’s 4g network, at least at the time of this writing, runs circles around AT&amp;amp;T’s network. I’ve run numerous network speed tests in Seattle and Atlanta (the 2 cities I frequent) and get the same results every time. Verizon’s network is 3 to 5 times faster than AT&amp;amp;T’s network (4G LTE vs HSPA+). To stress how big the gap is, Verizon’s &lt;strong&gt;upload&lt;/strong&gt; speeds are consistently faster than AT&amp;amp;T’s &lt;strong&gt;download&lt;/strong&gt; speeds.&lt;/li&gt; &lt;/ol&gt;  &lt;h1&gt;Disadvantages&lt;/h1&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Camera quality&lt;/strong&gt;. Indoor close up shots are much sharper on the Infuse than the RAZR. I truly miss the camera on the Samsung Infuse.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Software Keyboard&lt;/strong&gt;. I make a lot more mistakes on the RAZR than on the Infuse. It’s almost as if the keyboard is optimized for 1-handed typing; the left half of the keyboard is too far to the right. I’m already on my 2nd keyboard (SwiftKey X) but still seem to have this problem.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Backup Assistant&lt;/strong&gt;. I’d like to make sure I don’t lose my contacts if I switch to a different brand of phone (especially considering how fast the android ecosystem is evolving!) so have no desire to use Backup Assistant but can’t get rid of it. This wasn’t a problem with the Infuse.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;MotoBlur&lt;/strong&gt;. They’ve done some things well (exchange email support, yahoo push support) but in general MotoBlur is more intrusive than Samsung’s TouchWiz.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Notifications screen&lt;/strong&gt;. This is the pull-down screen that displays notifications. Samsung phones include a set of controls that let you toggle Wireless, GPS, Bluetooth, etc... at the top of the notifications screen. The RAZR has no corresponding functionality.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;No text message preview&lt;/strong&gt;. If there is only 1 text message the RAZR displays the sender; if there are more than 1 messages then the RAZR displays the number of unread messages. I prefer Samsung’s approach which displays the sender and the first part of each message as a separate notification.&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-4220959520760962145?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/y1UHUCKHAv3oAtgiKO9KvKN95WE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/y1UHUCKHAv3oAtgiKO9KvKN95WE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/y1UHUCKHAv3oAtgiKO9KvKN95WE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/y1UHUCKHAv3oAtgiKO9KvKN95WE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/1O3Ce83hsNk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/4220959520760962145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/12/motorolas-droid-razr-vs-samsungs-infuse.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4220959520760962145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4220959520760962145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/1O3Ce83hsNk/motorolas-droid-razr-vs-samsungs-infuse.html" title="Motorola’s Droid RAZR vs. Samsung’s Infuse 4G" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>2</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/12/motorolas-droid-razr-vs-samsungs-infuse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8HQ385eyp7ImA9WhdaEEg.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-2410235525739675519</id><published>2011-10-19T14:54:00.001-04:00</published><updated>2011-10-19T16:07:12.123-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T16:07:12.123-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Concurrency" /><title>Optimistic Concurrency</title><content type="html">&lt;p&gt;I’d seen this term crop up from time to time over the past few years but didn’t know what it meant. Thanks to Wikipedia this cipher has been decoded.&lt;/p&gt;  &lt;p&gt;The optimism in optimistic concurrency refers to the attitude towards locks. An optimistic attitude assumes that locks aren’t necessary. This is considered optimistic because it assumes that transactions typically won’t step on each other. For some situations this is true; overlapping transactions are so rare that it’s more efficient to back-off and try again on the rare occasions they occur. Since locks are relatively expensive and rare, avoiding them lets the system handle more transactions overall (in this case).&lt;/p&gt;  &lt;p&gt;On the other hand, if overlapping transactions are common then the cost of backing off and re-trying may exceed the cost of acquiring a lock for each transaction. Of course this partly depends on the granularity of the lock. The goal of finer grained locks is to reduce contention and, ultimately, to improve throughput.&lt;/p&gt;  &lt;p&gt;The other aspect of optimistic concurrency is the way overlaps are handled. They’re detected, usually via some “modified-last” type token. If the underlying data has been changed since the writer last read it then the transaction fails and is reattempted.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-2410235525739675519?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/afskqCglCS6q4vzH28LvkVzxRsA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/afskqCglCS6q4vzH28LvkVzxRsA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/afskqCglCS6q4vzH28LvkVzxRsA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/afskqCglCS6q4vzH28LvkVzxRsA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/4RbuQUTxwis" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/2410235525739675519/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/10/optimistic-concurrency.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2410235525739675519?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2410235525739675519?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/4RbuQUTxwis/optimistic-concurrency.html" title="Optimistic Concurrency" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/10/optimistic-concurrency.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQnk_eyp7ImA9WhdWE0k.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-6933226084506813877</id><published>2011-09-06T17:12:00.001-04:00</published><updated>2011-09-06T17:12:23.743-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T17:12:23.743-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows Azure" /><title>Learning about Windows Azure</title><content type="html">&lt;p&gt;To prepare for a new role I’m transitioning into at Microsoft (SDE II – finally!) I’m ramping up on Windows Azure.&lt;/p&gt;  &lt;p&gt;For one it sounds a lot like the “distributed operating system” that was alluded to in grad school. Analogies abound. So, for instance, the relationship between Windows (or any other OS) running on a single machine is similar to the relationship between Windows Azure running on lots of machines (more specifically, virtual machines).&lt;/p&gt;  &lt;p&gt;Windows provides a program with access to the resources of a machine; CPU, storage, memory, network, etc…&lt;/p&gt;  &lt;p&gt;Windows Azure provides a program with access to the resources of a cluster of machines: compute, storage, etc…&lt;/p&gt;  &lt;p&gt;The analogy falls apart if extended too far because on Windows traditional applications are single instance. That is, a user launches an executable and uses that single instance of the running process to accomplish whatever functionality the program provides.&lt;/p&gt;  &lt;p&gt;Windows Azure, on the other hand, seems to imply an organization of work more similar to the way the Web works. To access a program on the web you enter its URL (analogous to clicking on the executable). If it’s a popular program (e.g., amazon, hotmail, etc…) then there’s a good chance that a single request can be serviced by 1 of several load balanced servers. And the next request (say, clicking on a link to your account data) might well be serviced by a different web server.&lt;/p&gt;  &lt;p&gt;In Windows Azure parlance this maps to Roles executing in Instances. Any 1 of several Instances may provide the program’s functionality.&lt;/p&gt;  &lt;p&gt;There’s more to it of course but the same issues that you run into moving from a traditional client program (single instance, built in semi-persistent/stateful) to a web application (multiple instances, no built in persistence/stateless) apply.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-6933226084506813877?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kWu_mXBu0cr9u_11KEQ4EXO1Opg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kWu_mXBu0cr9u_11KEQ4EXO1Opg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kWu_mXBu0cr9u_11KEQ4EXO1Opg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kWu_mXBu0cr9u_11KEQ4EXO1Opg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/6bKy252ncT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/6933226084506813877/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/09/learning-about-windows-azure.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6933226084506813877?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6933226084506813877?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/6bKy252ncT8/learning-about-windows-azure.html" title="Learning about Windows Azure" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/09/learning-about-windows-azure.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ENRXw8eCp7ImA9WhdRE0w.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-4726980840636632964</id><published>2011-08-02T14:57:00.001-04:00</published><updated>2011-08-02T15:01:34.270-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-02T15:01:34.270-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="command shell" /><category scheme="http://www.blogger.com/atom/ns#" term="wmi" /><title>Looking up a User SID</title><content type="html">&lt;p&gt;There are a several ways to do this but so far my favorite is (from a command prompt):&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;wmic&lt;br /&gt;useraccount &lt;span style="color: #0000ff"&gt;where&lt;/span&gt; name=”XXX” get caption, domain, sid&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Replace XXX with the user name (without the leading “&amp;lt;domain&amp;gt;\).&lt;/br&gt;You’ll need the wmic tool installed if it isn’t already on the system.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-4726980840636632964?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BtPbWeWEZJte1me8EZRGmhppZ74/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BtPbWeWEZJte1me8EZRGmhppZ74/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BtPbWeWEZJte1me8EZRGmhppZ74/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BtPbWeWEZJte1me8EZRGmhppZ74/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/972Pmdob-YY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/4726980840636632964/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/08/looking-up-user-sid.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4726980840636632964?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4726980840636632964?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/972Pmdob-YY/looking-up-user-sid.html" title="Looking up a User SID" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/08/looking-up-user-sid.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MMRX46fCp7ImA9WhdREko.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-2629186167123021113</id><published>2011-08-02T03:51:00.001-04:00</published><updated>2011-08-02T03:51:24.014-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-02T03:51:24.014-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Automatically connecting to a Bluetooth a2dp receiver from the Samsung Infuse 4G</title><content type="html">&lt;p&gt;I bought a Sony Bluetooth transceiver for use primarily in my car. Unfortunately I’ve had to manually connect to it every time I enable Bluetooth on my phone (Samsung Infuse).&lt;/p&gt;  &lt;p&gt;Fortunately this can be configured with a little tweaking:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Root your phone.&lt;/li&gt;    &lt;li&gt;Install ES File Explorer or some other Root Exploring app that lets you mount partitions in read-write mode.&lt;/li&gt;    &lt;li&gt;edit /etc/bluetooth/audio.conf. Uncomment AutoConnect=true (remove the leading #).&lt;/li&gt;    &lt;li&gt;reboot.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Thanks to the person that responded to the android bug &lt;a href="http://code.google.com/p/android/issues/detail?id=2831#c32" target="_blank"&gt;with the solution&lt;/a&gt;!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-2629186167123021113?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_PRzKipetcsl4WM1lLsoPTZ3kJA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_PRzKipetcsl4WM1lLsoPTZ3kJA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_PRzKipetcsl4WM1lLsoPTZ3kJA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_PRzKipetcsl4WM1lLsoPTZ3kJA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/SvmIltlnDTc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/2629186167123021113/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/08/automatically-connecting-to-bluetooth.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2629186167123021113?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2629186167123021113?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/SvmIltlnDTc/automatically-connecting-to-bluetooth.html" title="Automatically connecting to a Bluetooth a2dp receiver from the Samsung Infuse 4G" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/08/automatically-connecting-to-bluetooth.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcBSXw-fyp7ImA9WhdTEEs.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-6819283837425289771</id><published>2011-07-07T14:07:00.001-04:00</published><updated>2011-07-07T14:07:38.257-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-07T14:07:38.257-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="command shell" /><title>Command Prompt Tip–Autocomplete similar command</title><content type="html">&lt;p&gt;Console Windows have had TAB key completion for a while now. That is, pressing the TAB key at the command prompt will insert the closest matching filename. &lt;/p&gt; &lt;p&gt;While this is helpful for specifying file name parameters sometimes what you’d really rather do is insert an entire command. You can go through commands recently entered with the up and down arrows.&lt;/p&gt; &lt;p&gt;I recently discovered another way to insert an entire command. If you type the first few letters of the command then press F8 the closest matching command in the command history will be inserted! This is a great way to cut down on the amount of typing involved, especially when it comes to long commands with lots of parameters.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-6819283837425289771?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rfj-soNUUVQoTo5KbOh3LjxnUp0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rfj-soNUUVQoTo5KbOh3LjxnUp0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rfj-soNUUVQoTo5KbOh3LjxnUp0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rfj-soNUUVQoTo5KbOh3LjxnUp0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/QyrRr2zYqN8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/6819283837425289771/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2011/07/command-prompt-tipautocomplete-similar.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6819283837425289771?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6819283837425289771?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/QyrRr2zYqN8/command-prompt-tipautocomplete-similar.html" title="Command Prompt Tip–Autocomplete similar command" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2011/07/command-prompt-tipautocomplete-similar.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIAR347fyp7ImA9Wx9RGE8.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-828261862902047888</id><published>2010-12-20T00:17:00.001-05:00</published><updated>2010-12-20T00:22:26.007-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-20T00:22:26.007-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Upgrading the Samsung Captivate to Android 2.2 (Froyo)</title><content type="html">&lt;ol&gt;   &lt;li&gt;Root the phone. This provides superuser/administrator access to the OS. Refer to &lt;a href="http://forum.xda-developers.com/showthread.php?t=739304"&gt;this xda post for details&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;Install ClockworkMod’s ROM Manager. This can be downloaded from the Android Marketplace. It’s been so useful that I went ahead and bought it.&lt;/li&gt;    &lt;li&gt;Enable non-market apps on the phone (needed Titanium Backup used in the next step). Refer to &lt;a href="http://forum.xda-developers.com/showthread.php?t=738376"&gt;this xda post for details&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;Install Titanium Backup. This program provides a way to restore your apps once you’ve upgraded to the new OS. I used the free version but it’s so useful that I’ll probably buy it.&lt;/li&gt;    &lt;li&gt;In ROM Manager, flash to the most recent version of the restore firmware (it’s the first option in the list of commands) to the internal SD card.&lt;/li&gt;    &lt;li&gt;Make a Nandroid backup. To do this start ROM Manager then choose “Recovery Mode”. This will reboot the phone into recovery mode. The phone will boot to a text interface with menus for executing commands. The volume up, volume down and power buttons can be used to navigate up, down and select (respectively). I put the backup on the internal sd card (/sd on a stock Captivate) but it could just as well have been put on the external sd card (/sd/sd on a stock Captivate). Once the backup completes (took about 20mins on my device) and the phone reboots connect it to your PC and copy the update.zip file that was created as a part of the backup. Rename this file something meaningful like “stock_captivate_nandroid_backup.zip” in case you need to revert the OS back to the one that ships with the phone.&lt;/li&gt;    &lt;li&gt;Make a Titanium Backup backup. Include system and apps. The backup can be stored on the internal or external sd card. Make a copy of the file on your PC for safekeeping.&lt;/li&gt;    &lt;li&gt;Download a ROM. I used &lt;a href="http://cognition.theidiotshideout.net/mw/index.php"&gt;Cyanogen’s Cognition v2.3b8&lt;/a&gt; since it says that it’s “intended for the USA Captivate”. The ROM will be a single zip file. Copy the ROM onto the internal SD card of the phone.&lt;/li&gt;    &lt;li&gt;Start ROM Manager. Choose “Install ROM from SD Card” then browse to the Cognition ROM copied from your PC onto the internal SD card.&lt;/li&gt;    &lt;li&gt;Sit back, relax, brew some tea and take a walk. It’ll be a while (took about half an hour). The phone will boot into recovery mode (I think it’s recovery mode, might be download mode. Either way the whole process occurs in the text-based boot menu).&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Once it’s all finish setup your Gmail account first since other programs use this login information. Titanium Backup can be used to restore individual apps (change the filter to “uninstalled” to limit the display to uninstalled apps backed up by Titanium Backup). I’m not sure if this is strictly necessary for purchased apps because the Android Marketplace seems to remember the apps I’ve bought.&lt;/p&gt;  &lt;p&gt;Cognition includes AdFree (it’s not uninstallable directly) which seemed to cause Pandora to stop streaming after a while. So I downloaded AdFree from the Android Marketplace, used its “revert” host files option then uninstalled it.&lt;/p&gt;  &lt;p&gt;Enjoy Froyo! Cognition’s ROM takes a little getting used to (e.g., the Applications screen scrolls top-down while the home screen scrolls left to right) but seems quite responsive and solid (not having lots of “force close” dialogs). Kudos to designgears of xda for getting us Captivate users access to flash!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-828261862902047888?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3Q4LYdhZlfrJnhJF5pn1AzySc_0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3Q4LYdhZlfrJnhJF5pn1AzySc_0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3Q4LYdhZlfrJnhJF5pn1AzySc_0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3Q4LYdhZlfrJnhJF5pn1AzySc_0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/_u5Ib_TTNzs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/828261862902047888/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/12/upgrading-samsung-captivate-to-android.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/828261862902047888?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/828261862902047888?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/_u5Ib_TTNzs/upgrading-samsung-captivate-to-android.html" title="Upgrading the Samsung Captivate to Android 2.2 (Froyo)" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/12/upgrading-samsung-captivate-to-android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8GRn0_cCp7ImA9Wx9RF0U.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-8310781162608817727</id><published>2010-12-19T13:51:00.001-05:00</published><updated>2010-12-19T13:53:47.348-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-19T13:53:47.348-05:00</app:edited><title>Android and the Samsung Captivate</title><content type="html">&lt;h2&gt;Things I like about this phone and its OS&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;The screen is absolutely gorgeous. On those rare occasions where power isn’t a concern this screen is so beautiful that I sometimes crank up the brightness just to look at it in all its glory.&lt;/li&gt;    &lt;li&gt;The phone is incredibly slim with a stylish design. Even with a rubber protector/glove it easily fits into my pants pocket without looking like I’m smuggling bricks.&lt;/li&gt;    &lt;li&gt;The Android marketplace has really taken off. There are a lot of apps. My favorites so far are Google Maps/Nav, Google Listen, Pandora, Last.fm, SlingPlayer and TouchDown.&lt;/li&gt;    &lt;li&gt;Contacts. Firstly, linked contacts are awesome. No more having 5 entries for the same person from my yahoo address book, Google address book, Facebook, Twitter and SIM contacts. The native Twitter and Facebook clients pull data from the sites and automatically associates it with the corresponding contact. Google smartly included the ability to manually link contacts. It even tries to speed manual contact linking by displaying a list of close matches when you’re manually linking contacts.&lt;/li&gt;    &lt;li&gt;The browser is excellent. I really like how the browser automatically lays out most web pages so that text is displayed in a single column that doesn’t spill over and require horizontal scrolling. It doesn’t work on every website but works on most.&lt;/li&gt;    &lt;li&gt;Access to the shell. This comes in handy when debugging network connectivity issues since it’s a full featured linux shell. It’s also a quick way to reboot the phone without having to power down. I like having access to the underlying OS without having to jailbreak the phone (ala iPhone).&lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Things I don’t like about this phone and its OS&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;It’s got perhaps the buggiest GPS I’ve ever seen. The current location jumps about like a firecracker in a soda can. It’ll blithely move my car from a bridge across Lake Washington to a few dozen feet out on the water – who knew I was driving a submersible?&lt;/li&gt;    &lt;li&gt;Poor integration with the Windows Live suite of services. There’s a Bing client and I think there are ways to integrate with messenger but that’s about it. This may not be a problem for most people but if you’ve got a lot of stuff (pictures mainly) in the Windows Live infrastructure then it can be a pain.&lt;/li&gt;    &lt;li&gt;No native sync. So when I buy music on my laptop I have to manually move it onto the phone and vice versa. The phone is so handy that most of my music purchases are on the phone. I’ll have to check out DropBox, or a similar service, to address this.&lt;/li&gt;    &lt;li&gt;Android’s music client is blissfully unaware of classical music. I don’t listen to a lot of classical music but while cruising Amazon’s MP3 store there was a special on “99 essential pieces of classical music” that I couldn’t resist. Unfortunately it shows up in the music client as 99 separate albums!&lt;/li&gt;    &lt;li&gt;The native exchange integration, at least as of Android 2.1, is minimal. No global address search. No sender photos. No notes. Fortunately TouchDown shores this up with a stellar exchange client.&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-8310781162608817727?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L0vwqWSNK8murs_ysbEkwAgWO70/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L0vwqWSNK8murs_ysbEkwAgWO70/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L0vwqWSNK8murs_ysbEkwAgWO70/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L0vwqWSNK8murs_ysbEkwAgWO70/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/YN8mZ0Y9qJ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/8310781162608817727/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/12/android-and-samsung-captivate.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8310781162608817727?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8310781162608817727?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/YN8mZ0Y9qJ4/android-and-samsung-captivate.html" title="Android and the Samsung Captivate" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/12/android-and-samsung-captivate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYESXY6fyp7ImA9Wx5QEU8.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-6988785229711181540</id><published>2010-08-29T19:05:00.000-04:00</published><updated>2010-08-29T19:05:08.817-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-29T19:05:08.817-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><title>Disabling the Blue LEDs on the Antec 900 PC case</title><content type="html">The Antec 900 is a great case especially if you're running 2 or more video cards.&amp;nbsp; It supports up to 4 intake fans (two 200mm in front, one 200mm on the side and one 200mm inside the front) and 2 exhaust fans (one 230mm monster/"Big Boy" fan on top and one 120mm&amp;nbsp;rear fan).&lt;br /&gt;
&lt;br /&gt;
Despite the number of fans the case runs relatively quiet for the amount of cooling it provides.&amp;nbsp; These fans are larger than the standard 80mm so they can provide much more airflow even though they're running at lower RPMs.&lt;br /&gt;
&lt;br /&gt;
The only thing that I don't like about this case is that the 2 front fans come with extremely bright blue LEDs without an off switch.&amp;nbsp;Not a great configuration if your PC is in your bedroom facing your bed.&amp;nbsp;Normally I'd just put a book or piece of plastic in front of the LEDs but since these LEDs are attached to the intake fans that's not an option.&lt;br /&gt;
&lt;br /&gt;
Fortunately these LEDs can be disabled pretty easily.&amp;nbsp;Cutting one of the wires, as pictured below, connected to each of the 3 LEDs makes this otherwise excellent case suitable for bedroom use.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_avfw_u2ekCI/THrngzmWyOI/AAAAAAAAATs/R0vDjnIIlAU/s1600/disabling+blue+LEDs+on+the+antec+900.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://2.bp.blogspot.com/_avfw_u2ekCI/THrngzmWyOI/AAAAAAAAATs/R0vDjnIIlAU/s320/disabling+blue+LEDs+on+the+antec+900.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-6988785229711181540?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zxKiGvpvT8RbUQo4Z6z4YbPFEEs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zxKiGvpvT8RbUQo4Z6z4YbPFEEs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zxKiGvpvT8RbUQo4Z6z4YbPFEEs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zxKiGvpvT8RbUQo4Z6z4YbPFEEs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/HUdETwgivUA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/6988785229711181540/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/08/disabling-blue-leds-on-antec-900-pc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6988785229711181540?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/6988785229711181540?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/HUdETwgivUA/disabling-blue-leds-on-antec-900-pc.html" title="Disabling the Blue LEDs on the Antec 900 PC case" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_avfw_u2ekCI/THrngzmWyOI/AAAAAAAAATs/R0vDjnIIlAU/s72-c/disabling+blue+LEDs+on+the+antec+900.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/08/disabling-blue-leds-on-antec-900-pc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ABQnczfyp7ImA9Wx5REUg.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-2059502996757311102</id><published>2010-08-18T14:01:00.001-04:00</published><updated>2010-08-18T14:22:33.987-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-18T14:22:33.987-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="virtualization" /><title>First Week at Microsoft and Escaping Virtualization</title><content type="html">After driving across the country I'm finally starting to settle into my new job at Microsoft.&amp;nbsp; It's only been a week though so I'm still in the honeymoon phase.&amp;nbsp; Good god they use technology here, it's awesome!&lt;br /&gt;
&lt;br /&gt;
A few firsts:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;First time&amp;nbsp;ever having the option of using software as a work/desk phone.&amp;nbsp; Office Live Communicator truly rocks!&lt;/li&gt;
&lt;li&gt;First time ever logging onto a domain from a copier/scanner/fax machine.&lt;/li&gt;
&lt;li&gt;First time successfully using PXE boot without suspecting the network was really running on a dial-up modem. It was, and is, blindingly fast (usually).&lt;/li&gt;
&lt;/ul&gt;Escaping Virtualization&lt;br /&gt;
&lt;br /&gt;
Since testing involves installing lots of builds I've gotten to work with several virtualization programs.&amp;nbsp; They all seem to default to a different command sequence to 'escape' back to the host OS:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Virtual PC uses right ALT.&amp;nbsp;Not really my favorite as it takes my hand off the mouse.&lt;/li&gt;
&lt;li&gt;VirtualBox uses right CTRL.&amp;nbsp; Ditto.&lt;/li&gt;
&lt;li&gt;Hyper-V uses the truly draconian CTRL+ALT+LEFT ARROW. Yikes!&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/2808741807100459611-2059502996757311102?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2QUHgU50XwKgHrCtB6vk9RuI8L4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2QUHgU50XwKgHrCtB6vk9RuI8L4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2QUHgU50XwKgHrCtB6vk9RuI8L4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2QUHgU50XwKgHrCtB6vk9RuI8L4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/Nv1fcR8XnJQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/2059502996757311102/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/08/first-week-at-microsoft-and-escaping.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2059502996757311102?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2059502996757311102?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/Nv1fcR8XnJQ/first-week-at-microsoft-and-escaping.html" title="First Week at Microsoft and Escaping Virtualization" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/08/first-week-at-microsoft-and-escaping.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGQH4_cCp7ImA9WxFbGUs.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-846449622185883748</id><published>2010-07-12T15:20:00.001-04:00</published><updated>2010-07-12T15:20:21.048-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-12T15:20:21.048-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><category scheme="http://www.blogger.com/atom/ns#" term="general programming" /><title>Refactoring with References and Pointers Tip</title><content type="html">&lt;p&gt;Inherited source code is a fact of life for any professional programmer.&amp;#160; Sometimes you inherit a 5000+ line C++ method chock full of pointers and pointers to pointers.&lt;/p&gt;  &lt;p&gt;If you’re utilizing the copy-and-paste algorithm for refactoring large blocks of pointer and pointer-to-pointer riddled code then C++’s Pass by Reference support can make these changes much less painful.&amp;#160; Thankfully it supports References to Pointers!&lt;/p&gt;  &lt;p&gt;So instead of taking a block similar to the following:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; *ptr = NULL;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( someCond )&lt;br /&gt;    ptr = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len]; &lt;span style="color: #008000"&gt;// we either allocate it here or leave it null&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i=0; i &amp;lt; len; i++)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( ptr == NULL )&lt;br /&gt;    {&lt;br /&gt;        ptr = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len];&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;delete&lt;/span&gt; [] ptr;&lt;br /&gt;        ptr = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len + i];&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x = ptr[i] * ptr[i + 1];&lt;br /&gt;    &lt;span style="color: #008000"&gt;// ... several hundred lines of code&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;and converting the loop into something unreadable, error prone and barely recognizable as the former loop body:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SomeFunc(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;** ptr, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; len)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i=0; i &amp;lt; len; i++)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( (*ptr) == NULL )&lt;br /&gt;            (*ptr) = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len];&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;delete&lt;/span&gt; [] (*ptr);&lt;br /&gt;            (*ptr) = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len + i];&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x = (*ptr)[i] * (*ptr)[i + 1];&lt;br /&gt;        &lt;span style="color: #008000"&gt;// ... several hundred lines of code&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can convert the loop into something easily recognizable as the former loop ala:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SomeFunc(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;*&amp;amp; ptr, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; len)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i=0; i &amp;lt; len; i++)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( ptr == NULL )&lt;br /&gt;        {&lt;br /&gt;            ptr = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len];&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;delete&lt;/span&gt; [] ptr;&lt;br /&gt;            ptr = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;[len + i];&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x = ptr[i] * ptr[i + 1];&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-846449622185883748?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lvb6njLAyoyzqkfROqd6DKuiOLM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lvb6njLAyoyzqkfROqd6DKuiOLM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lvb6njLAyoyzqkfROqd6DKuiOLM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lvb6njLAyoyzqkfROqd6DKuiOLM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/8sXfgxq9bSw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/846449622185883748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/07/refactoring-with-references-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/846449622185883748?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/846449622185883748?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/8sXfgxq9bSw/refactoring-with-references-and.html" title="Refactoring with References and Pointers Tip" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/07/refactoring-with-references-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQEQH4yeyp7ImA9WxFbFkU.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-1240914711403961893</id><published>2010-07-09T10:55:00.001-04:00</published><updated>2010-07-09T10:55:01.093-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-09T10:55:01.093-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="general programming" /><category scheme="http://www.blogger.com/atom/ns#" term="DirectX" /><title>Intervals, Interval Boundaries and Pixels</title><content type="html">&lt;p&gt;Anyone working as a computer programmer has at some point had to precisely distinguish between intervals and interval boundaries.&lt;/p&gt;  &lt;p&gt;Intervals are delimited by interval boundaries.&amp;#160; For instance, 1-2 denotes a single interval.&amp;#160; In this case the interval is delimited by 2 interval boundaries (1 and 2).&lt;/p&gt;  &lt;p&gt;There are always 1 more interval boundaries than there are intervals (since intervals are closed).&lt;/p&gt;  &lt;p&gt;A similar relationship can be seen in languages that index arrays/collections from 0.&amp;#160; The total number of elements (or count) in an array is 1 greater than the number of indices.&lt;/p&gt;  &lt;p&gt;Having recently worked on drawing lines on 2D surfaces with DirectX I’m beginning to think of pixels as intervals and vertices as interval boundaries.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-1240914711403961893?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DeI9tY4i2F-9n4IPfo0IWfq28hA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DeI9tY4i2F-9n4IPfo0IWfq28hA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DeI9tY4i2F-9n4IPfo0IWfq28hA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DeI9tY4i2F-9n4IPfo0IWfq28hA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/B6JwmJLjseY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/1240914711403961893/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/07/intervals-interval-boundaries-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/1240914711403961893?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/1240914711403961893?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/B6JwmJLjseY/intervals-interval-boundaries-and.html" title="Intervals, Interval Boundaries and Pixels" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/07/intervals-interval-boundaries-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkANQno-eip7ImA9WxFbFU4.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-5458115538663536570</id><published>2010-07-07T17:39:00.001-04:00</published><updated>2010-07-07T17:39:53.452-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-07T17:39:53.452-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DirectX" /><title>RECT in GDI vs DirectX</title><content type="html">&lt;p&gt;In GDI the right and bottom edges of a RECT are adjacent to the region being specified by the RECT.&amp;#160; So the right most pixel in the region will be at RECT.X – 1.&lt;/p&gt;  &lt;p&gt;DirectX also uses RECTs to designate rectangular regions.&amp;#160; Does DirectX follow the same convention as GDI with respect to the exclusivity of the right and bottom edges?&amp;#160; From some preliminary testing I’d say no – RECTs are inclusive along all edges in DirectX.&amp;#160; I’ll need to do more testing to be sure of this.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-5458115538663536570?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2nXgQAR44rnxMahVZd3wBk82-iA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nXgQAR44rnxMahVZd3wBk82-iA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2nXgQAR44rnxMahVZd3wBk82-iA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nXgQAR44rnxMahVZd3wBk82-iA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/LKdci9Wyryo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/5458115538663536570/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/07/rect-in-gdi-vs-directx.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5458115538663536570?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5458115538663536570?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/LKdci9Wyryo/rect-in-gdi-vs-directx.html" title="RECT in GDI vs DirectX" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/07/rect-in-gdi-vs-directx.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUCSHo6fyp7ImA9WxFUE0w.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-3925587827236584574</id><published>2010-06-23T14:04:00.001-04:00</published><updated>2010-06-23T14:04:29.417-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-23T14:04:29.417-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>Accessing the Internet from a VPN connection</title><content type="html">&lt;p&gt;So you’ve got VPN working and people are able to access LAN resources remotely via VPN.&lt;/p&gt;  &lt;p&gt;But they’re not able to access the Internet via VPN.&amp;#160; This isn’t usually a problem since users can always use their local internet access to access the internet.&amp;#160; After all, this is how they’re getting to the VPN.&lt;/p&gt;  &lt;p&gt;There are situations where they’d rather access the internet via the VPN connection.&amp;#160; For instance, maybe their internet access allows VPN connections but blocks access to their favorite news site.&amp;#160; Or their favorite search engine.&lt;/p&gt;  &lt;p&gt;If you’re providing VPN access using a SOHO firewall/router combo device then there is a good chance that the device will not support providing internet access to its VPN clients.&amp;#160; Emphasis on “will” since this restriction is an optional restriction mainly aimed at getting you to buy a router.&amp;#160; It’s usually worded along the lines of something like “this device won’t transmit packets received on an interface back out that interface”. &lt;/p&gt;  &lt;p&gt;Fair enough, it *is* a routing function and businesses have every right to differentiate their products as they see fit.&lt;/p&gt;  &lt;p&gt;If you’re not interested in, or are unable to, purchase a router then you can use a proxy server to provide access to the internet for remote VPN clients.&amp;#160; &lt;a href="http://www.youngzsoft.net/ccproxy/purchase.htm" target="_blank"&gt;Proxy servers are cheap&lt;/a&gt; and setting them up is easy.&lt;/p&gt;  &lt;p&gt;The major downside to this approach is that clients have to configure their applications to use the proxy server.&amp;#160; Many networked applications have support for this (e.g., browsers) but the configuration is slightly different for each application.&amp;#160; And users have to remember to turn it on and off as their connection changes.&amp;#160; But in a pinch this will do the trick.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-3925587827236584574?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Xs5IHdlGrIJDcBzUWN9CEhVCbmw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xs5IHdlGrIJDcBzUWN9CEhVCbmw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Xs5IHdlGrIJDcBzUWN9CEhVCbmw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xs5IHdlGrIJDcBzUWN9CEhVCbmw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/xMXHlfgNtR0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/3925587827236584574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/accessing-internet-from-vpn-connection.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3925587827236584574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3925587827236584574?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/xMXHlfgNtR0/accessing-internet-from-vpn-connection.html" title="Accessing the Internet from a VPN connection" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/accessing-internet-from-vpn-connection.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUBRXY5cSp7ImA9WxFVGEQ.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-5264674797993208031</id><published>2010-06-18T16:17:00.001-04:00</published><updated>2010-06-18T16:17:34.829-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-18T16:17:34.829-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing" /><title>Is this image lined up?</title><content type="html">&lt;p&gt;A problem frequently encountered in image processing is that of determining if an image is oriented properly.&amp;#160; Sometimes this question is so difficult to answer that computer people, like their math people cousins, solve it by redefining the solution and solving for the redefinition.&lt;/p&gt;  &lt;p&gt;In this case, instead of answering the question “Is this image properly oriented” we answer the question “Is this image aligned to some other image?”&amp;#160; We’ll assume that “some other image” *is* oriented properly.&amp;#160; So if we can line up our image with canonical image then we’re good to go.&lt;/p&gt;  &lt;p&gt;There are a few techniques that are brought to bear.&amp;#160; One is a frequency based technique that exploits the fact that the product of 2 functions is maximal when they’re perfectly aligned.&amp;#160; This technique, convolution, is excellently visualized in &lt;a href="http://en.wikipedia.org/wiki/Convolution" target="_blank"&gt;this Wikipedia entry&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;When it comes to images each image can be considered a 2 dimensional function (f(x, y) = z where x and y are the coordinates of any given pixel) defined over some finite interval.&amp;#160; One can visualize sliding a 2D function over another 2D function by imagining a multicolored blanket sliding over another blanket.&amp;#160; It can be moved in either or both of 2 directions: x and y.&lt;/p&gt;  &lt;p&gt;The finite interval part is important.&amp;#160; In the case of an image the finite intervals are the dimensions of the image.&amp;#160; We assume it’s 0 everywhere else so that the product of the function outside of its dimensions is 0.&lt;/p&gt;  &lt;p&gt;Since this is a 2D function, unlike the 1D function depicted in the &lt;a href="http://en.wikipedia.org/wiki/Convolution" target="_blank"&gt;Wikipedia article&lt;/a&gt;, their product produces a surface.&amp;#160; The area under this surface will be maximal when they are perfectly aligned (assuming the images are identical).&lt;/p&gt;  &lt;p&gt;A coworker has just explained a different, spatial technique for determining image alignment (registration in the jargon of the trade).&amp;#160; In the spatial domain if 2 images are identical and perfectly lined up then if you were to subtract one from the other at each pixel location you would get 0s at every location.&amp;#160; To account for variations in magnitude the square of the difference at each point can be taken.&amp;#160; The sum of these squared differences will be zero when the images are perfectly aligned.&lt;/p&gt;  &lt;p&gt;If the images are identical but not perfectly aligned you can figure out how to align them but sliding one around the other and examining the sum-of-squared differences (SSD).&amp;#160; This too can be plotted as a surface the minimum of which represents the amount one image needs to be shifted in x and y to line up perfectly with the other.&lt;/p&gt;  &lt;p&gt;There’s a lot assumption-wise that I’ve left out of the discussion.&amp;#160; The technique assumes that the image has regular features.&amp;#160; And that there are strong/sharp features (in frequency space these are represented by high frequencies) that will tend to dominate the SSD such that when the images are out of alignment the SSD will be large vs near zero when in alignment.&amp;#160; If the image were uniform noise then the SSD is likely to bounce around with no clear minimum as there’s no sharp edge content to anchor the sum.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-5264674797993208031?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/W3rCllJE_h1A2U1IL_sWDi8jtfw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W3rCllJE_h1A2U1IL_sWDi8jtfw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/W3rCllJE_h1A2U1IL_sWDi8jtfw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W3rCllJE_h1A2U1IL_sWDi8jtfw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/C99yS96ZYpU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/5264674797993208031/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/is-this-image-lined-up.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5264674797993208031?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5264674797993208031?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/C99yS96ZYpU/is-this-image-lined-up.html" title="Is this image lined up?" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/is-this-image-lined-up.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04ASXo-fSp7ImA9WxFVGEU.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-9074184971442375372</id><published>2010-06-18T15:39:00.001-04:00</published><updated>2010-06-18T15:39:08.455-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-18T15:39:08.455-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="virtualization" /><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>Domains and Impersonation</title><content type="html">&lt;p&gt;What happens when your Windows Service tries to impersonate a local user while joined to a Domain?&amp;#160; &lt;/p&gt;  &lt;p&gt;Does “.” still represent the local machine or does it represent the default domain?&lt;/p&gt;  &lt;p&gt;To find out the answers to these questions I fired up Virtual PC 2007 and installed Windows Server 2003 R2.&amp;#160; Normally I’d have gone with Server 2008 but suspect that the target environment is running 2003.&lt;/p&gt;  &lt;p&gt;First read &lt;a href="http://en.wikipedia.org/wiki/Windows_Server_domain" target="_blank"&gt;this Wikipedia article&lt;/a&gt; on Windows Domains then follow &lt;a href="http://learnthat.com/447/certification/microsoft-certifications/introduction-to-active-directory/" target="_blank"&gt;this excellent tutorial for setting up Active Directory&lt;/a&gt;.&amp;#160; Why Active Directory (AD)? AD is basically the primary database for Windows Domains.&amp;#160; Even though it’s technically a directory service, not a traditional RDBMS.&lt;/p&gt;  &lt;p&gt;So, to answer the original questions, Impersonation works just fine whether or not the computer is joined to a domain.&amp;#160; And “.” still means local machine.&amp;#160; Yippeee!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-9074184971442375372?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2vewTVDz5fF9A0_uDA0f6KOD5Fo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2vewTVDz5fF9A0_uDA0f6KOD5Fo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2vewTVDz5fF9A0_uDA0f6KOD5Fo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2vewTVDz5fF9A0_uDA0f6KOD5Fo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/rQ1xhogYtzU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/9074184971442375372/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/domains-and-impersonation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/9074184971442375372?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/9074184971442375372?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/rQ1xhogYtzU/domains-and-impersonation.html" title="Domains and Impersonation" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/domains-and-impersonation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8HQXo4eSp7ImA9WhdRFkg.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-8666368664665222209</id><published>2010-06-16T09:51:00.001-04:00</published><updated>2011-08-06T15:10:30.431-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-06T15:10:30.431-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="interop" /><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>Generalist’s Delight: Impersonation, UNC, NFS and Virtual Machines</title><content type="html">&lt;p&gt;Recently got a chance to exercise some of the technical muscles us generalists love to preen.&lt;/p&gt;  &lt;p&gt;The basic problem: A windows service that writes files to a local directory needs to be able to write files to a directory on a Unix system.&amp;#160; Quickly (as in we have a day or two at most to get this to work).&lt;/p&gt;  &lt;h2&gt;Caveats&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;The windows service runs as LocalSystem which cannot access resources over the network.&amp;#160; It has to (as far as I know) run as LocalSystem because it needs interactive desktop access.&lt;/li&gt;    &lt;li&gt;FTP and Samba are not available due to local policy.&lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;But we can’t even SEE uNIX directories&lt;/h2&gt;  &lt;p&gt;Since the remote host is running some flavor of Unix I expected we’d have to use NFS.&amp;#160; Our Windows builds don’t include NFS support.&amp;#160; &lt;/p&gt;  &lt;p&gt;Fortunately Microsoft gives away a Windows add-on, Windows Services for Unix (SFU), that allows Windows to access NFS exports.&amp;#160; After a little setup that is.&amp;#160; In a non-NIS environment authentication is handled locally.&amp;#160; So the client system (the one mounting the NFS exported directory) needs its own copy of the user name, user id, password and group id of the account it will use to authenticate access to the Unix system.&lt;/p&gt;  &lt;p&gt;In the Unix world that would have been the end of the story.&amp;#160; You’d pass the info on the command-line when you access the remote directory.&amp;#160; Fortunately there’s a wonderful GUI in SFU (PCNFSD) that lets you map Windows accounts to locally defined Unix user IDs.&amp;#160; Once mapped NFS mounts can be accessed in the Windows familiar UNC format (&lt;a href="file://\\server\export"&gt;\\server\export&lt;/a&gt;) or NFS format (server://export).&lt;/p&gt;  &lt;h2&gt;Impersonation&lt;/h2&gt;  &lt;p&gt;Now that our Windows machine can “see” the remote directory we’ve got to modify our service so that it can write to it.&amp;#160; From my web programming days I remembered that a process can impersonate another user.&amp;#160; In a web context this is usually done when the app server process (worker process) needs to do something on behalf of the currently connected user; something the account under which the worker process executes does not have the privs to do.&lt;/p&gt;  &lt;p&gt;Since this is a .Net service, platform invoke is necessary to access the LogonUser() and related Win32 APIs.&amp;#160; Oddly enough System.Security.Principal has a class that wraps the impersonation API call but does not wrap the functionality necessary to acquire the security token required by impersonation.&lt;/p&gt;  &lt;h2&gt;But we don’t speak Unix here&lt;/h2&gt;  &lt;p&gt;We don’t have any systems running unix but fortunately, &lt;a href="http://arnshea.blogspot.com/2009/09/running-fedora-11-in-microsoft-virtual.html" target="_blank"&gt;as described in this previous post&lt;/a&gt;, I’ve still got a Virtual PC vhd of&amp;#160; RedHat Fedora 11.&amp;#160; This will do for testing purposes.&amp;#160; It’s painfully slow, since I can’t seem to get Fedora to boot in Virtual PC 2007sp? with hardware virtualization support enabled (heck, I was suprised that my laptop even supports hardware virtualization).&amp;#160; I’m sure a VMware appliance would run faster but I didn’t have that on-hand and time was short.&lt;/p&gt;  &lt;p&gt;After booting into Fedora I’m pleasantly surprised by all of the things they’ve copied from Windows.&amp;#160; I expected to have to play around with /etc/fstab then bounce nfsd manually but all of this configuration can be done via UI these days.&amp;#160; After creating a test user, exporting a directory in the test user’s home directory and noting the test user’s user ID and group ID we’re off to plug these into our PCNFSD account mapper and start testing.&lt;/p&gt;  &lt;h2&gt;But We Can’t Read Maps&lt;/h2&gt;  &lt;p&gt;Managed/.Net processes can apparently only see drives mapped by the user under which the process is running (maybe this limitation isn’t specific to managed processes?)&amp;#160; So using a persistent mapped drive, which SFU doesn’t support anyway, isn’t an option.&amp;#160; Fortunately UNC syntax works (albeit slowly the very first access).&lt;/p&gt;  &lt;h2&gt;Tying it all together&lt;/h2&gt;  &lt;p&gt;An ls –al provides that feeling of satisfaction as the recently created file shows up in the listing.&amp;#160; In pretty colors no less.&amp;#160; Woohoo!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-8666368664665222209?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3Gw38tKZ1bBjZB30i33ypP4fVXE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3Gw38tKZ1bBjZB30i33ypP4fVXE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3Gw38tKZ1bBjZB30i33ypP4fVXE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3Gw38tKZ1bBjZB30i33ypP4fVXE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/yQ8I6pXUDrU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/8666368664665222209/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/generalists-delight-impersonation-unc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8666368664665222209?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8666368664665222209?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/yQ8I6pXUDrU/generalists-delight-impersonation-unc.html" title="Generalist’s Delight: Impersonation, UNC, NFS and Virtual Machines" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/generalists-delight-impersonation-unc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcGRX89fCp7ImA9WxFVEk0.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-3422638837111367726</id><published>2010-06-10T16:33:00.001-04:00</published><updated>2010-06-10T16:33:44.164-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-10T16:33:44.164-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DirectX" /><title>D3DX – easing the path to 2D Direct3D9</title><content type="html">&lt;p&gt;Here I’m thinking I have to create my own vertex data structure and set (or mask) the FVF (flexible vertex format) flags but it turns out that D3DX, that most wonderful of utilty libraries on top of Direct3D, has predefined several useful structs.&lt;/p&gt;  &lt;p&gt;In my case, I’m only interested in drawing 2D shapes so D3DXVERTEX2 fits the bill.&amp;#160; Always nice to find a data structure that fits with the philosophy of using the least complicated data structure that’ll get the job done.&amp;#160; It exposes X and Y which is mostly all that I need.&lt;/p&gt;  &lt;p&gt;2D drawing with D3DX is not unlike drawing with GDI primitives.&amp;#160; In GDI you select a pen into a device context, set properties of the pen then draw onto the device context with various primitives possibly changing properties as you go to achieve a different result (e.g., color, line width, etc..).&lt;/p&gt;  &lt;p&gt;The D3DX analogue is a line (ID3DXLine).&amp;#160; This is created directly on a Direct3D device (which abstracts the underlying hardware in a way similar to the way a Device Context abstracts the underlying hardware in GDI).&amp;#160; Drawing is accomplished by setting various line properties then passing in an array of vertices representing the desired line segments.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-3422638837111367726?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U6cvdau90C-Plf3BvMgReE7_PVw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U6cvdau90C-Plf3BvMgReE7_PVw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U6cvdau90C-Plf3BvMgReE7_PVw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U6cvdau90C-Plf3BvMgReE7_PVw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/TcS7sTOhyy0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/3422638837111367726/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/d3dx-easing-path-to-2d-direct3d9.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3422638837111367726?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3422638837111367726?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/TcS7sTOhyy0/d3dx-easing-path-to-2d-direct3d9.html" title="D3DX – easing the path to 2D Direct3D9" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/d3dx-easing-path-to-2d-direct3d9.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MBR3Y7cCp7ImA9WxFWFkU.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-8361809064670890379</id><published>2010-06-04T15:53:00.001-04:00</published><updated>2010-06-04T15:57:36.808-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-04T15:57:36.808-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="COM" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>ActiveX control method name changing case out-of-the-blue?</title><content type="html">&lt;p&gt;I’m humming along working on an application when suddenly Visual Studio reports that it can’t find a certain property.&lt;/p&gt;  &lt;p&gt;The property name, let’s call it SomeProperty, is a property of an ActiveX control that gets referenced from a Windows Forms 2.0 application.&lt;/p&gt;  &lt;p&gt;So I do a clean or three assuming that an old AxInterop dll is lying around somewhere.&amp;#160; After the 2nd clean I blow away a few more library directories to guarantee that the control is both being created and imported from scratch.&lt;/p&gt;  &lt;p&gt;Still no luck.&amp;#160; So I clean out my temp directory since Visual Studio uses the temp directory for some intermediate files and who knows, maybe a file somehow got locked or had its permissions changed.&lt;/p&gt;  &lt;p&gt;Same error.&amp;#160; I pull up OleView to verify that SomeProperty really has become someProperty.&amp;#160; Sure enough, it shows up as someProperty.&lt;/p&gt;  &lt;p&gt;It turns out that this is a &lt;a href="http://support.microsoft.com/kb/220137" target="_blank"&gt;known issue with the IDL compiler&lt;/a&gt;.&amp;#160; It uses the case of the first instance of an identifier that occurs in the IDL file for any subsequent occurrences of that identifier &lt;strong&gt;even when the identifier is later used in a totally different context&lt;/strong&gt;!&lt;/p&gt;  &lt;p&gt;In this case, I recently added a struct with a member name that happens to collide with a property of an interface defined later in the file.&amp;#160; Who knew that all identifiers needed to be globally unique?&amp;#160; &lt;/p&gt;  &lt;p&gt;I’ll have to give the mapping thing mentioned in the KB article a try but for now I’ll leave a comment in the IDL and rename the struct member.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-8361809064670890379?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rfIfNnZTPpUNgAricXJpft46jQU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rfIfNnZTPpUNgAricXJpft46jQU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rfIfNnZTPpUNgAricXJpft46jQU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rfIfNnZTPpUNgAricXJpft46jQU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/Pq3Y8jIuRAA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/8361809064670890379/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/activex-control-method-name-changing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8361809064670890379?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/8361809064670890379?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/Pq3Y8jIuRAA/activex-control-method-name-changing.html" title="ActiveX control method name changing case out-of-the-blue?" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/activex-control-method-name-changing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4ERXY9fip7ImA9WxFWFUw.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-5397640461861213985</id><published>2010-06-02T17:05:00.001-04:00</published><updated>2010-06-02T17:08:24.866-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-02T17:08:24.866-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="general programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Design" /><title>Designing for the future</title><content type="html">&lt;p&gt;One of the surest ways to create designs that aren’t easily reused is to try to anticipate the domain-specific data structures that will be needed and create them in advance.&amp;#160; Like so much design advice this requires some caution to apply.&lt;/p&gt;  &lt;p&gt;The domain-specific part is crucial.&amp;#160; General purpose data structures are very reusable.&amp;#160; One general purpose data structure is a list.&amp;#160; A domain specific data structure is a list of Employees.&amp;#160; How do you know when a strongly typed list of Employees is going to be reusable?&amp;#160; One clue is that you yourself find that you need it.&amp;#160; Another clue is that you keep running across code where devs create collections (or arrays) of Employees and manipulate them in some way.&amp;#160; If you don’t find yourself in need of a data structure and you can’t find evidence of other devs needing/using that data structure &lt;strong&gt;then it is probably too early to create that data structure.&amp;#160; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Since most of us are terrible at predicting the future the odds of getting something like a domain-specific data structure right are low.&amp;#160; Since we’re more likely than not to get it wrong our prematurely created data structure might get in the way of discovering the right data structure.&lt;/p&gt;  &lt;p&gt;I find myself most able to re-use components that are highly cohesive and loosely coupled.&amp;#160; High cohesion means that a given method does only a single thing at the level of abstraction appropriate to its context.&amp;#160; Loose coupling reduces the number of dependencies between a given method or object and other methods or objects.&lt;/p&gt;  &lt;p&gt;In practice, loose coupling is mainly about choosing what to parameterize.&amp;#160; For any non-trivial method it’s usually too expensive to parameterize every thing.&amp;#160; If a method can usefully perform its highly cohesive functionality with only its input parameters then that method is loosely coupled.&amp;#160; These are great candidates for public entry points because they don’t make much in the way of assumptions about conditions.&amp;#160; Every method doesn’t need to be extremely loosely coupled but those that are tend to be more easily reused then those that aren’t.&amp;#160; Of course this has to be weighed against readability – a method that takes 500 parameters might be extremely reusable but it won’t be reused much because it’s too much work to use.&lt;/p&gt;  &lt;p&gt;For example, a method that sorts a list of strings tends to be highly reusable when working with lists of strings.&amp;#160; A method that takes a list of strings, tokenizes them, executes them in a shell, collects the output and summarizes the execution results will tend to be less reusable except in a very specific context.&lt;/p&gt;  &lt;p&gt;The second method is less reusable because it does so many things.&amp;#160; I’m less likely to be able to compose functionality from that method because it does things I don’t want it to do.&amp;#160; The fewer things a function does the less likely it is to do something I don’t want and, consequently, the more likely it is to be reused.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-5397640461861213985?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/as-eI-SxQbXDgdhGzNk01MLlv7A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/as-eI-SxQbXDgdhGzNk01MLlv7A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/as-eI-SxQbXDgdhGzNk01MLlv7A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/as-eI-SxQbXDgdhGzNk01MLlv7A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/PxdvwO6Vkxk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/5397640461861213985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/06/designing-for-future.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5397640461861213985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/5397640461861213985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/PxdvwO6Vkxk/designing-for-future.html" title="Designing for the future" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/06/designing-for-future.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0INQngycSp7ImA9WxFXGU0.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-4752316796293823189</id><published>2010-05-26T13:15:00.001-04:00</published><updated>2010-05-26T16:26:33.699-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-26T16:26:33.699-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>Waking up your PC over the Internet</title><content type="html">&lt;p&gt;To save power, particularly during the hot summer months, I’ve wanted to be able to wake up home PCs remotely.&amp;#160; I tend to use my home PCs to troubleshoot network connectivity issues while at work but other than that there’s really no need for the PCs to be on during the day.&lt;/p&gt;  &lt;p&gt;Wake-on-LAN (WOL) has been around since the 90s and provides a way to wake up a PC remotely.&lt;/p&gt;  &lt;p&gt;What does it take to make it work?&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;WOL must be supported and enabled in the BIOS. &lt;/li&gt;    &lt;li&gt;WOL must be supported and enabled on the Network Interface Card (Device Manager –&amp;gt; Network Adapter properties –&amp;gt; Advanced). &lt;/li&gt;    &lt;li&gt;Power Management must be enabled for the NIC (Device Manager –&amp;gt; Network Adapter properties –&amp;gt; Power Management though this may vary from driver to driver). &lt;/li&gt;    &lt;li&gt;A program that will send the magic-packet.&amp;#160; The &lt;a href="http://en.wikipedia.org/wiki/Wake-on-LAN" target="_blank"&gt;Wikipedia entry for Wake-on-LAN&lt;/a&gt; links to several programs that will do this.&lt;/li&gt;    &lt;li&gt;Forwarding a UDP port through the firewall to the LAN broadcast address.&amp;#160; In my case I forwarded UDP port 9 to 192.168.0.255.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;On Windows there are other ways to remotely wake up a PC.&amp;#160; Devices that support the “Network Device Class Power Management Reference Specification”, a Microsoft standard &lt;a href="http://www.microsoft.com/whdc/archive/netpm.mspx" target="_blank"&gt;described here&lt;/a&gt;, defines 2 additional methods: a network wake-up frame and detection of a change in the network link state.&amp;#160; The NIC has to support pattern-match based WOL to take advantage of the Network Wake-Up Frame method.&lt;/p&gt;  &lt;p&gt;Both the magic packet or the Network Wake-Up Frame can be delivered in 3 ways: NetBIOS broadcast, ARP resolution and Unicast.&lt;/p&gt;  &lt;p&gt;Since we intend to do this remotely we can rule out NetBIOS broadcast and ARP because the PCs are behind a firewall whose protection we want.&amp;#160; That leaves Unicast.&amp;#160; Windows registers the MAC address with the NIC driver as a pattern.&amp;#160; An IP packet with the MAC address and IP of the NIC will therefore serve as a Network Wake-Up Frame and bring the PC out of Sleep.&lt;/p&gt;  &lt;p&gt;Since the PCs are behind a firewall 1 or more ports will need to be forwarded.&amp;#160; On my D-LINK 855-DIR router forwarding port 9 to the broadcast address for the internal network (192.168.0.255 in my case) does the trick!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-4752316796293823189?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UFZa930FIQameSdyJxcbycgUFPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UFZa930FIQameSdyJxcbycgUFPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UFZa930FIQameSdyJxcbycgUFPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UFZa930FIQameSdyJxcbycgUFPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/hbrfM0ALtd4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/4752316796293823189/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/05/waking-up-your-pc-remotely.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4752316796293823189?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/4752316796293823189?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/hbrfM0ALtd4/waking-up-your-pc-remotely.html" title="Waking up your PC over the Internet" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/05/waking-up-your-pc-remotely.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EARn0-eip7ImA9WxFQFko.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-2320763717463899061</id><published>2010-05-12T10:47:00.001-04:00</published><updated>2010-05-12T10:47:27.352-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-12T10:47:27.352-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="debugging" /><title>Debugging with Immediate Mode</title><content type="html">&lt;p&gt;Sometimes you want a quick way to start stepping through some code that you suspect has an error.&lt;/p&gt;  &lt;p&gt;Depending on where the code lives simply getting to it can be a pain.&amp;#160; A function in a service that depends on a bunch of other libraries can be non-trivial to execute in an isolated context.&amp;#160; The 20mins or so of setup, over time, starts to add up.&lt;/p&gt;  &lt;p&gt;In a web or client-server context getting to the code of interest may be even more convoluted.&amp;#160; It may require a client to step through several pages before triggering the request that results in execution of the code.&amp;#160; Put that code inside a web service and oy, we’re talking 20-30mins just to start stepping through a function.&lt;/p&gt;  &lt;p&gt;Visual Studio’s immediate mode can execute functions in the context of the current project.&amp;#160; CTRL+D,W to open up the Immediate window then ?int temp=SomeStaticFunc(3);&lt;/p&gt;  &lt;p&gt;results in the value of temp being printed out.&amp;#160; If the function isn’t static you’ll need to have some other function that creates the desired instance (let’s call it p).&amp;#160; Then in the Immediate window ?int temp=p.SomeInstanceMethod(3); does the trick.&lt;/p&gt;  &lt;p&gt;Of course there are other ways to accomplish the same result but Immediate mode is another tool in the toolset for quickly getting into a function of interest.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-2320763717463899061?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vPwipYwJrrEtb58flvRiQNEhNtg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vPwipYwJrrEtb58flvRiQNEhNtg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vPwipYwJrrEtb58flvRiQNEhNtg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vPwipYwJrrEtb58flvRiQNEhNtg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/j7N7N9a-Wjo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/2320763717463899061/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/05/debugging-with-immediate-mode.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2320763717463899061?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/2320763717463899061?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/j7N7N9a-Wjo/debugging-with-immediate-mode.html" title="Debugging with Immediate Mode" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/05/debugging-with-immediate-mode.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUACR348eyp7ImA9WxFQEEU.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-533510954297175540</id><published>2010-05-05T14:22:00.001-04:00</published><updated>2010-05-05T14:22:46.073-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-05T14:22:46.073-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="virtual memory" /><title>Reservations and Commitments</title><content type="html">&lt;p&gt;Most programs need memory to do their work.&amp;#160; Since programs don’t typically know where in memory they’re going to be loaded programs work with a virtual address space.&lt;/p&gt;  &lt;p&gt;It’s virtual in the sense that it doesn’t correspond to any particular hardware implementation of memory.&amp;#160; Neither address lines nor flip-flops, the stuff of RAM that you buy in a store, spring into existence when your program refers to a location in memory.&lt;/p&gt;  &lt;p&gt;Under the hood the operating system keeps track of where a virtual address is stored in physical memory.&amp;#160; On Windows the data structure that stores this mapping is called the page map.&amp;#160; Virtual and physical memory are divided up into equal sized blocks called pages (on x86 these pages are 4k long).&lt;/p&gt;  &lt;p&gt;As programs start and stop, read and write and go about their business these pages are recycled (how conscientious of them!).&lt;/p&gt;  &lt;p&gt;At any given moment a Virtual Address Space Page can be Free, Reserved or Committed.&amp;#160; The importance of distinguishing these states often appears when dealing with Big Data (e.g. high resolution imagery, video, audio, large volumes of text).&lt;/p&gt;  &lt;p&gt;In many ways virtual pages are like tables at a restaurant.&amp;#160; Before a restaurant opens the tables may well be in a closet somewhere.&amp;#160; They’re &lt;strong&gt;free&lt;/strong&gt; to be used but customers can’t use them just yet.&amp;#160; Trying to use these tables, folded and unprepared as they are, is likely to be an unpleasant experience liable to draw the ire of the restaurant owner.&lt;/p&gt;  &lt;p&gt;Even before the tables are set and arranged a restaurant can take reservations for it.&amp;#160; Once &lt;strong&gt;reserved&lt;/strong&gt; it can’t be reserved for someone else (unless the reservation is cancelled).&amp;#160; On the other hand, even though it’s reserved it’s not yet in use and might well still be folded away in a closet (since the restaurant hasn’t opened yet).&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;committed&lt;/strong&gt; state is analogous to a table that’s been placed and prepared.&amp;#160; It now takes up space in the building.&amp;#160; The customer can use the table for whatever purposes are allowed by the restaurant.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-533510954297175540?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AfCoK0w_w_Q9f4X9DRv437lE-GQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AfCoK0w_w_Q9f4X9DRv437lE-GQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AfCoK0w_w_Q9f4X9DRv437lE-GQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AfCoK0w_w_Q9f4X9DRv437lE-GQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/S5kOn7tGSoA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/533510954297175540/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/05/reservations-and-commitments.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/533510954297175540?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/533510954297175540?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/S5kOn7tGSoA/reservations-and-commitments.html" title="Reservations and Commitments" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/05/reservations-and-commitments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIHQH04fCp7ImA9WxFRFEs.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-3806520286197132194</id><published>2010-04-23T14:46:00.001-04:00</published><updated>2010-04-28T11:28:51.334-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-28T11:28:51.334-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="COM Interop" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Properties in C++?</title><content type="html">&lt;p&gt;In the never-ending quest to reduce the duplication of data I’ve been consolidating some data structures into either native structures or managed classes (mainly depending on where they’re modified the most).&lt;/p&gt;  &lt;p&gt;While doing this I’ve run across a bit of syntax that I hadn’t seen before in native C++:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;pSomeSmartPointer-&amp;gt;SomeProperty;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I’m used to seeing properties in managed code and I suspect that the various managed C++ implementations (C++/CLI, managed extensions for C++) have something similar but this lovely expression compiled without complaint in plain old native C++.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;What gives?&amp;#160; Native C++ doesn’t have properties does it?&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The need to go digging has yielded thus:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Microsoft C++ does in fact have properties. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;They’re defined via the &lt;a href="http://msdn.microsoft.com/en-us/library/dabb5z75(VS.80).aspx" target="_blank"&gt;__declspec&lt;/a&gt; keyword. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;The compiler translates them into the corresponding getXXX() or setXXX() methods. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;The #import directive takes advantage of this when importing type libraries exported from managed assemblies.&amp;#160; This translation from IDL to C++, gets stored in .tlh and .tli files. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;See this &lt;a href="http://msdn.microsoft.com/en-us/library/yhfk0thd(VS.80).aspx" target="_blank"&gt;link&lt;/a&gt; for an example of using properties in native C++.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-3806520286197132194?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wa-8do2OR-NvX0byYGNTcKDQtKw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wa-8do2OR-NvX0byYGNTcKDQtKw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wa-8do2OR-NvX0byYGNTcKDQtKw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wa-8do2OR-NvX0byYGNTcKDQtKw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/JpcDsOqdepY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/3806520286197132194/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/04/properties-in-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3806520286197132194?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/3806520286197132194?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/JpcDsOqdepY/properties-in-c.html" title="Properties in C++?" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/04/properties-in-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUNRHc5eip7ImA9WxFSGEo.&quot;"><id>tag:blogger.com,1999:blog-2808741807100459611.post-558186594829395003</id><published>2010-04-21T14:08:00.001-04:00</published><updated>2010-04-21T14:08:15.922-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-21T14:08:15.922-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hackers" /><category scheme="http://www.blogger.com/atom/ns#" term="general programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Design" /><title>How the Hacker puts your system into debt</title><content type="html">&lt;p&gt;In the past I’ve &lt;a href="http://arnshea.blogspot.com/search/label/Hackers" target="_blank"&gt;posted on some of the differences&lt;/a&gt; between the hacker school of coding and the non-hacker school of coding.&amp;#160; I recently encountered another anecdote along the lines of this thread.&lt;/p&gt;  &lt;p&gt;The Hacker needs to provide users with a way to switch between multiple identical windows in a form.&amp;#160; It’d be nice to minimize use of vertical space since monitors tend to have less of it available and this application is image oriented.&lt;/p&gt;  &lt;p&gt;Sounds like a job for a &lt;a href="http://msdn.microsoft.com/en-us/library/e58c44b8(VS.90).aspx" target="_blank"&gt;ToolBar/ToolStrip&lt;/a&gt; right?&amp;#160; It’s got all sorts of built in functionality for adding and removing buttons, responding to user events, customizing the appearance, OS theme support, designer support, etc…&amp;#160; It’ll even support runtime repositioning in case there are users out there that prefer to dock it against a different edge of the form.&lt;/p&gt;  &lt;p&gt;Given such an easy way to provide the required functionality (and then some) why doesn’t the Hacker use it?&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;He doesn’t know that it exists.&amp;#160; One thing I’ve noticed is that coders from the Hacker school tend to have average to below-average recall.&lt;/li&gt;    &lt;li&gt;He thinks he can write a better ToolBar.&amp;#160; Part of being a Hacker is not having a good grasp of the big picture.&amp;#160; So his analysis of better tends to ignore things like designer support, accessibility, OS themes, System Preferences, System Events, Display Resolution, etc…&lt;/li&gt;    &lt;li&gt;It didn’t occur to him to use a built-in widget.&amp;#160; Hackers don’t think this way.&amp;#160; Oftentimes they were trained in an era where there weren’t very many built-in widgets.&amp;#160; Being Hackers they wouldn’t have used them even if they were available.&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Each of these in some respects arises from the natural desire and concomitant tendency to “subvert the system” that is a hallmark of most Hackers.&lt;/p&gt;  &lt;h2&gt;Why does this matter?&lt;/h2&gt;  &lt;p&gt;By writing his own toolbar the Hacker has just raised the &lt;a href="http://en.wikipedia.org/wiki/Technical_debt" target="_blank"&gt;technical debt&lt;/a&gt; both for himself and for any other team members that have to work with what he has built.&lt;/p&gt;  &lt;p&gt;One effect of technical debt is malfunction.&amp;#160; Situations where the Hacker’s homemade toolbar are likely to break: multiple monitors, large DPI fonts, different version of the Common Controls library, OS upgrades.&amp;#160; The homemade toolbar no longer functions as intended and/or no longer matches the native environment.&amp;#160; This debt costs time and money to track down and repair.&amp;#160; Often the Hacker is long gone or, if he’s still there, has completely forgotten the mechanics of his homemade toolbar.&lt;/p&gt;  &lt;p&gt;Another effect of technical debt is interface mismatch.&amp;#160; Put another way, Hackers tend to produce software that doesn’t interface with other software well.&amp;#160; So not only does the Hacker make it harder for the team to do its job, he makes it harder for the company to take advantage of the work of others.&lt;/p&gt;  &lt;p&gt;In any complex project there are going to be many instances where design decisions need to be made.&amp;#160; Some of these will be obvious, some less-so.&amp;#160; These will often provide a moment at which technical debt can be increased or avoided entirely.&amp;#160; Hackers, because of the reasons outlined in this and earlier posts, will almost always tend to choose the path that increases technical debt.&lt;/p&gt;  &lt;p&gt;Do your system and your company a favor; protect it from Hackers.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808741807100459611-558186594829395003?l=arnshea.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ER9ymmjrLWnex-7p2XBzU0LJkA0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ER9ymmjrLWnex-7p2XBzU0LJkA0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ER9ymmjrLWnex-7p2XBzU0LJkA0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ER9ymmjrLWnex-7p2XBzU0LJkA0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MusingsOfATechnothusiastLinguaphile/~4/KXFQTq4feBA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://arnshea.blogspot.com/feeds/558186594829395003/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://arnshea.blogspot.com/2010/04/how-hacker-puts-your-system-into-debt.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/558186594829395003?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2808741807100459611/posts/default/558186594829395003?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MusingsOfATechnothusiastLinguaphile/~3/KXFQTq4feBA/how-hacker-puts-your-system-into-debt.html" title="How the Hacker puts your system into debt" /><author><name>arnshea</name><uri>http://www.blogger.com/profile/18247516754090333870</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_avfw_u2ekCI/SedMlvp9VCI/AAAAAAAAACI/AU_QAB4msEI/S220/googleyeyes96.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://arnshea.blogspot.com/2010/04/how-hacker-puts-your-system-into-debt.html</feedburner:origLink></entry></feed>

