<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7911969244113689481</id><updated>2012-02-16T18:37:45.159-08:00</updated><title type='text'>The Golden Shovel</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-4117476554716255502</id><published>2011-02-08T09:01:00.000-08:00</published><updated>2011-02-08T09:07:04.112-08:00</updated><title type='text'>Three Stooges Syndrome</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: rgb(31, 73, 125); "&gt;True Story: Coworker and I recently found a bug where three programmers who no longer work with us had touched the code in the rendering loop and introduced three separate quite serious bugs.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(31, 73, 125); "&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D"&gt;The result was a &lt;a href="http://www.youtube.com/watch?v=BhW2hb6cRIg"&gt;“Mr Burns” bug&lt;/a&gt; where the bugs were acting symbiotically together to produce almost acceptable behavior and not crash.   Fixing one or two (but not all three) bugs would result in catastrophic failure since any remaining bug would cause fatal behavior.  However, leaving all three bugs in the code together allowed it to survive and limp along without crashing but with suboptimal results under certain conditions.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(31, 73, 125); "&gt;The only way to fix any of the bugs without causing issues was to fix all three simultaneously - which is what I did but only after a couple serious WTF's.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: rgb(31, 73, 125); "&gt;Rarely have I ever seen such an outstanding collaboration of obviously wrong code somehow cobbled together to produce a result that seems to work under many conditions even though it’s obvious that serious coding errors were present and demonstratably exhibiting buggy behavior while the code was “working”…  it was truly a bad code masterpiece.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-4117476554716255502?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/4117476554716255502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=4117476554716255502' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4117476554716255502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4117476554716255502'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2011/02/three-stooges-syndrome.html' title='Three Stooges Syndrome'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-3161820375056684028</id><published>2010-08-31T10:35:00.000-07:00</published><updated>2010-08-31T10:43:32.031-07:00</updated><title type='text'>Memory Manager</title><content type='html'>&lt;div&gt;I've spent a large chunk of time rewriting the memory system for Mortal Kombat.  It was a huge and ambitious endeavor using a lot of new techniques that are not really used in other systems.  Development on it was expensive but justifiable because we plan on reaping benefits from the system and eventually sharing it with other studios under the WB Games umbrella.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;So my "Director of Engineering" told me today that Rock Steady Studios (the developers of Batman: Arkham Asylum) have integrated the Memory Manager I developed for Mortal Kombat into their latest game under development.  It only took them 2 days without any help and was a very smooth integration.  Right off the bat it saved them 4.5MB on PS3 which is an enormous amount to get back just from a memory manager and also it resulted in a large increase in stability for that platform.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Woo hoo!  I feel pretty good about that.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-3161820375056684028?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/3161820375056684028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=3161820375056684028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3161820375056684028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3161820375056684028'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2010/08/memory-manager.html' title='Memory Manager'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-3401794660418402234</id><published>2010-02-23T09:29:00.000-08:00</published><updated>2010-02-23T09:41:40.355-08:00</updated><title type='text'>More Windows 7 Gripes</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;b&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;Windows 7 isn't all good -- it's mostly good but I continue to find little quirks where they "dumbified" things which were more useful in Windows Vista.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;Taskbar Behavior&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In Windows 7, the Taskbar is Always-On-Top.  The only way to have full sized windows on your primary screen is to turn on the Auto-Hide Taskbar option.  There is no longer an OS supported way to have a TaskBar that is not always on Top.  Basically, this is a "dumbification" of the UI that ends up with a choice between wasting screen space or forcing you to auto-hide the Taskbar.&lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://www.sevenforums.com/attachments/customization/40771d1260136432-disabletaskbarontop-disable-taskbar-always-top-disabletaskbarontop.zip"&gt;hack &lt;/a&gt;in the &lt;a href="http://www.sevenforums.com/customization/44913-disabletaskbarontop-disable-taskbar-always-top.html"&gt;Windows Seven Forum&lt;/a&gt; though to reintroduce this Vista/XP functionality... I'm not sure why MS removed useful functionality from Vista in making 7.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, sans-serif;font-size:100%;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, sans-serif;font-size:100%;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px;"&gt;The hack isn't perfect though and has some flaws.  It would have been much nicer to just have the feature in the OS and work correctly.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;b&gt;Windows 7 Explorer Quirks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Open Window Position&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;New Explorer Windows open to wherever you moved the most recent Explorer Window.  They do not remember where they opened from before for that directory (or root).  Windows XP and Vista both remember where Explorer windows were opened for a particular file root.  For example, you could get "My Computer" or a directory shortcut to open in a consistent screen location before.  Now they open wherever the last active Explorer window was.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;br /&gt;&lt;i&gt;Folder Views&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Menu "Tools"-&gt;Menu Item "FolderOptions"-&gt;Tab "View"-&gt;Item "Folder Views"-&gt;Button "Apply To Folders"&lt;br /&gt;&lt;br /&gt;This no longer actually applies the current folder view to all other folders -- only to folders of similar types.  In particulare, it doesn't work at all for certain folder types.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;It mainly bothersome because I'm stuck with the "XBOX360 Neighborhood" browser constantly defaulting to "tile" view even though I prefer "list" view and I have to change it anytime I recreate the folders (i.e. clean builds) on my development system.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Read-Only Handling in Explorer&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In Windows 7, Directories can not be made Read-Only, only the files within them are made read only.  The button for the properties probably doesn't work the way you expect it to (i.e. it defaults to read-only but files created there are not really read-only - they only change state when you update the checkbox and click OK).&lt;br /&gt;&lt;br /&gt;Also, &lt;span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; "&gt;delete&lt;/span&gt; (or move) will &lt;span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; "&gt;delete&lt;/span&gt; (or move) Read-Only files without any additional confirmation (other than the initial confirmation you may get with non-Read-Only-protected files).&lt;br /&gt;&lt;br /&gt;Basically, the "read-only" flag no longer protects files in the Windows 7 Explorer GUI.  Just a word of warning to y'all.&lt;br /&gt;&lt;br /&gt;NOTE ON CMD commands with Read-Only Flag: The "read-only" flag is also ignored for "rd /s" or "rmdir /s". However, the "read-only" flag still does work for some commands like "del".&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-3401794660418402234?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/3401794660418402234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=3401794660418402234' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3401794660418402234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3401794660418402234'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2010/02/more-windows-7-gripes.html' title='More Windows 7 Gripes'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1011800569036205675</id><published>2010-02-23T09:09:00.001-08:00</published><updated>2010-02-23T09:25:26.990-08:00</updated><title type='text'>Windows 7 Photo Viewer Gripe</title><content type='html'>Overall, Windows 7 is pretty good but there are a couple things that I actually like better about Vista.  The main problem is that Microsoft removed some useful functionality and "dumbified" parts of the OS.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, the "Windows Photo Viewer" in Windows 7 has been totally castrated.  In the Vista version, you could view photos and perform simple modifications: rename (from DSC_0216.jpg to MakingAGoofyFace.jpg for example while looking at that picture),  fix red eye, crop picture.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All the editing features save rotation have been removed in the Windows 7 version.  They didn't even included the simple ability to rename a picture.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get these standard Vista features back you need to download the "Live Essentials Photo Gallery" which installs all sorts of fun stuff like an SQL Server CE 3.1, MS Application Error Reporting Service, Windows Live Sync, and Windows Live Communications Platform.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Basically, in order to get back a small number of useful features, you need to install the entire "Live" platform of cruftware.  Not to mention that the install of the new "Live Essentials Photo Gallery" requires 56MB of diskspace !!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wonder why they didn't leave the simple basic functionality in the original viewer rather than making you have to download an entire "Live Essential" Platform to get a poor Picassa clone.&lt;/div&gt;&lt;div&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/7911969244113689481-1011800569036205675?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1011800569036205675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1011800569036205675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1011800569036205675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1011800569036205675'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2010/02/windows-7-photo-viewer-gripe.html' title='Windows 7 Photo Viewer Gripe'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1005211688268118545</id><published>2010-01-05T11:12:00.001-08:00</published><updated>2010-01-05T11:13:28.662-08:00</updated><title type='text'>Windows 7 GodMode</title><content type='html'>&lt;p class="MsoNormal"&gt;If you have Windows 7, you can create a folder called the following:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:8.5pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#3C3B3B"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Then, if you type “GodMode” in the Explorer Bar, you basically get a one-stop configuration panel that handles 95% of your config panel needs from a single click without going through the fluffy layers of the “Control Panel” happy hierarchy.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a href="http://www.tomshardware.com/news/GodMode-Windows-7-How-to,9345.html"&gt;http://www.tomshardware.com/news/GodMode-Windows-7-How-to,9345.html&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-1005211688268118545?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1005211688268118545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1005211688268118545' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1005211688268118545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1005211688268118545'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2010/01/windows-7-godmode.html' title='Windows 7 GodMode'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-5430407732674617012</id><published>2009-05-28T00:59:00.000-07:00</published><updated>2009-05-28T01:02:45.819-07:00</updated><title type='text'>Another Note on Empty Structs</title><content type='html'>I mentioned this C++ Standard Violation by MSVC++ in my last post on empty structs:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;- There is no padding (other than for alignment) between the last base class and the first class member or vft-pointer(s). *** NOTE: this is an over-aggressive empty-base-optimization that can break the C++ standard.&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let me explain:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The standard on empty struct inheritance specifies that separate structs of the same type should yield unique addresses. In the following code, the two addresses printed should be different in a standards compliant compiler (Intel or GCC). MSVC++ ends up printing the same address twice.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;class a { public: void awork() {} };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;class b : public a { public: int bdata; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;class c : public a { public: b cdata; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;c test;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;a *pca=&amp;amp;(test);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;a *pcb=&amp;amp;(test.cdata);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;printf("Offset of c::a %d\n",size_t(pca));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;printf("Offset of c.b::a %d\n",size_t(pcb));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-5430407732674617012?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/5430407732674617012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=5430407732674617012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/5430407732674617012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/5430407732674617012'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2009/05/another-note-on-empty-structs.html' title='Another Note on Empty Structs'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-2868605554448800861</id><published>2009-05-01T17:04:00.000-07:00</published><updated>2009-05-01T17:05:50.667-07:00</updated><title type='text'>Empty Struct / Class &amp; Empty Base Rules for MSVC++ and GCC</title><content type='html'>I now GROK empty class (and empty base optimizations) fully on MSVC and GCC.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;GCC C++ follows these rules:&lt;br /&gt;&lt;br /&gt;- class EmptyBase {}; --&gt; sizeof(EmptyBase) == 1&lt;br /&gt;&lt;br /&gt;- Any number of empty-bases will map to 0 in the struct offset as long as all are unique types (including parenting).&lt;br /&gt;&lt;br /&gt;- Non empty-base parents are simply in the order declared with only padding for alignment.&lt;br /&gt;&lt;br /&gt;- If the first member of a derived class that immediately follows empty-bases does not derive from any of those bases, it is allowed to start at the first properly aligned offset for that member that is greater-than-or-equal-to the empty-base address -- this may be the same address as the empty-bases.&lt;br /&gt;&lt;br /&gt;- If the first member of a derived class that immediately follows empty-bases does derive from any of those bases, it will start at the first properly aligned offset for that member that is greater-than the empty-base address -- this is never the same address as the empty-bases.&lt;br /&gt;&lt;br /&gt;- Members that are empty-classes take at least one byte of storage in the containing class.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;MSVC++ follows these rules:&lt;br /&gt;&lt;br /&gt;- class EmptyBase {}; --&gt; sizeof(EmptyBase) == 1&lt;br /&gt;&lt;br /&gt;- The only way an empty-base class (or class derived from an empty-base) will start at offset 0 (zero) is if it is the first base class.&lt;br /&gt;&lt;br /&gt;- A Non-empty-base class will start at the next valid alignment offset for the base class.&lt;br /&gt;&lt;br /&gt;- All empty-base classes will appear to have zero effective storage in the derived class and do not affect the current offset unless followed by another empty-base class (or class derived from an empty-base) in which case you should see the following rule.&lt;br /&gt;&lt;br /&gt;- An empty-base class (or class derived from an empty-base) that follows an empty-base class (or class derived from an empty-base) will add 1 to the current offset position before padding to the proper alignment for the class.&lt;br /&gt;&lt;br /&gt;- There is no padding (other than for alignment) between the last base class and the first class member or vft-pointer(s). *** NOTE: this is an over-aggressive empty-base-optimization that can break the C++ standard.&lt;br /&gt;&lt;br /&gt;- Members that are empty-classes take at least one byte of storage in the containing class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-2868605554448800861?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/2868605554448800861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=2868605554448800861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2868605554448800861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2868605554448800861'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2009/05/empty-struct-class-empty-base-rules-for.html' title='Empty Struct / Class &amp; Empty Base Rules for MSVC++ and GCC'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-5177096324079099777</id><published>2009-04-30T15:18:00.000-07:00</published><updated>2009-04-30T15:40:52.242-07:00</updated><title type='text'>The C++ Empty Struct Conundrum</title><content type='html'>Empty structs are treated differently in C++ than in C.  Heck, they're treated differently by different C++ compilers :-(&lt;br /&gt;&lt;br /&gt;Here's some weirdness with empty structures being treated differently (i.e. different offsets, sizes, binary layout) between C and C++.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;struct&amp;nbsp;foo&amp;nbsp;{&amp;nbsp;};&lt;br /&gt;struct&amp;nbsp;foo2&amp;nbsp;{&amp;nbsp;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foo&amp;nbsp;var1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;var2;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar2&amp;nbsp;:&amp;nbsp;foo&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;var2;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar3&amp;nbsp;:&amp;nbsp;foo&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;a,b;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar4&amp;nbsp;:&amp;nbsp;foo&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bar3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var3;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar5&amp;nbsp;:&amp;nbsp;foo,&amp;nbsp;foo2&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar6&amp;nbsp;:&amp;nbsp;bar2,&amp;nbsp;foo2&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;bar7&amp;nbsp;:&amp;nbsp;foo2&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bar2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;v;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;C89&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo)&amp;nbsp;==&amp;nbsp;0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rest&amp;nbsp;are&amp;nbsp;C++-only&amp;nbsp;(inheritance)&lt;br /&gt;&lt;br /&gt;C99&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;empty&amp;nbsp;"struct&amp;nbsp;foo"&amp;nbsp;not&amp;nbsp;allowed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rest&amp;nbsp;are&amp;nbsp;C++-only&amp;nbsp;(inheritance)&lt;br /&gt;&lt;br /&gt;C++&amp;nbsp;Standard&amp;nbsp;(comments&amp;nbsp;show&amp;nbsp;where&amp;nbsp;the&amp;nbsp;C++&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;standard&amp;nbsp;requires&amp;nbsp;padding&amp;nbsp;/&amp;nbsp;wasted&amp;nbsp;space)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo)&amp;nbsp;==&amp;nbsp;1&amp;nbsp;(*&amp;nbsp;typical&amp;nbsp;value)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;sizeof(foo)&amp;nbsp;!=&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;(usually&amp;nbsp;1&amp;nbsp;but&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;possibly&amp;nbsp;some&amp;nbsp;other&amp;nbsp;value&amp;nbsp;that&amp;nbsp;is&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;compiler/alignment&amp;nbsp;dependent)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!!&amp;nbsp;Wasting&amp;nbsp;space&amp;nbsp;on&amp;nbsp;empty&amp;nbsp;struct&amp;nbsp;!!!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;C++-only:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar2)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar3)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OK&amp;nbsp;-&amp;nbsp;no&amp;nbsp;padding&amp;nbsp;before&amp;nbsp;first&amp;nbsp;member&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar4)&amp;nbsp;==&amp;nbsp;12&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!!&amp;nbsp;pad&amp;nbsp;before&amp;nbsp;first&amp;nbsp;member&amp;nbsp;due&amp;nbsp;to&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;identical-empty-base&amp;nbsp;conflict&amp;nbsp;between&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&amp;nbsp;class&amp;nbsp;and&amp;nbsp;first&amp;nbsp;member&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar5)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar6)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar7)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&lt;br /&gt;GCC&amp;nbsp;C++&amp;nbsp;(PS3):&amp;nbsp;--&amp;nbsp;Fully&amp;nbsp;compliant&amp;nbsp;to&amp;nbsp;Standards&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with&amp;nbsp;best-allowed&amp;nbsp;empty-base-optimization&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo)&amp;nbsp;&amp;nbsp;==&amp;nbsp;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo2)&amp;nbsp;==&amp;nbsp;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar)&amp;nbsp;&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar2)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar3)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar4)&amp;nbsp;==&amp;nbsp;12&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar5)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar6)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar7)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&lt;br /&gt;MSVC++&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo)&amp;nbsp;&amp;nbsp;==&amp;nbsp;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(foo2)&amp;nbsp;==&amp;nbsp;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar)&amp;nbsp;&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar2)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar3)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar4)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!!&amp;nbsp;NONCOMPLIANCE&amp;nbsp;!!!&amp;nbsp;--&amp;nbsp;sizeof()&amp;nbsp;should&amp;nbsp;be&amp;nbsp;12&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;overaggressive&amp;nbsp;empty-base-optimization&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(bar4::foo&amp;nbsp;not&amp;nbsp;allowed&amp;nbsp;to&amp;nbsp;resolve&amp;nbsp;to&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;same&amp;nbsp;address&amp;nbsp;as&amp;nbsp;bar4.var3::foo)&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar5)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Wasted&amp;nbsp;Space&amp;nbsp;-&amp;nbsp;standard&amp;nbsp;allows&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;empty-base-optimization&amp;nbsp;of&amp;nbsp;foo&amp;nbsp;&amp;&amp;nbsp;foo2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar6)&amp;nbsp;==&amp;nbsp;12&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Wasted&amp;nbsp;Space&amp;nbsp;-&amp;nbsp;standard&amp;nbsp;allows&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;empty-base-optimization&amp;nbsp;of&amp;nbsp;foo&amp;nbsp;&amp;&amp;nbsp;foo2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sizeof(bar7)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;NullCounterNoInit&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FORCEINLINE&amp;nbsp;void&amp;nbsp;Inc()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;struct&amp;nbsp;ThreadOwnedCounter&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UINT32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_nCountVal;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FORCEINLINE&amp;nbsp;UINT32&amp;nbsp;Inc()&amp;nbsp;{&amp;nbsp;return(++m_nCountVal);&amp;nbsp;}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;template&amp;nbsp;&lt;br /&gt;class&amp;nbsp;Test1&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TCounter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;counter;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;ReadFoo()&amp;nbsp;{&amp;nbsp;counter.Inc();&amp;nbsp;return(foo);&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;template&amp;nbsp;&lt;br /&gt;class&amp;nbsp;Test2&amp;nbsp;:&amp;nbsp;TCounter&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;ReadFoo()&amp;nbsp;{&amp;nbsp;TCounter::Inc();&amp;nbsp;return(foo);&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sizeof(Test1)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!!&amp;nbsp;Wasting&amp;nbsp;space&amp;nbsp;on&amp;nbsp;empty&amp;nbsp;struct&amp;nbsp;!!!&lt;br /&gt;sizeof(Test2)&amp;nbsp;==&amp;nbsp;4&lt;br /&gt;&lt;br /&gt;sizeof(Test1)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;sizeof(Test2)&amp;nbsp;==&amp;nbsp;8&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-5177096324079099777?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/5177096324079099777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=5177096324079099777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/5177096324079099777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/5177096324079099777'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2009/04/c-empty-struct-conundrum.html' title='The C++ Empty Struct Conundrum'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-3316230335253110245</id><published>2008-08-22T14:42:00.000-07:00</published><updated>2008-08-23T14:09:03.655-07:00</updated><title type='text'>Vista UAC not compatible with VS2005</title><content type='html'>So I tried installing Visual Studio 2005 on my Vista machine at home. After installing a default install of VS2005, you need to install three service packs to run it on a Vista machine:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Visual Studio 2005 Service Pack 1&lt;/li&gt;&lt;li&gt;Visual Studio 2005 Service Pack 1 Update for Windows Vista&lt;/li&gt;&lt;li&gt;SQL Server Express Service Pack 2 (&lt;a href="http://www.microsoft.com/sql/howtobuy/windowsvistasupport.mspx"&gt;the SQL Server Express is installed by the default VS2005 installation but it's not Vista compatible without the service pack update&lt;/a&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;So anyhow after that, it is recommended that you set the VS2005 app to "&lt;a href="http://msdn.microsoft.com/en-us/vs2005/aa964140.aspx"&gt;Run As Administrator&lt;/a&gt;".&lt;/p&gt;&lt;p&gt;Even then you'll probably run into a whole hose of issues &lt;a href="http://msdn.microsoft.com/en-us/vs2005/aa948853.aspx"&gt;noted by Microsoft&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The big three issues I ran into immediately even after doing this were:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Double-clicking on a file (*.cpp) launches VS2005 but fails to open the file in VS2005&lt;/li&gt;&lt;li&gt;Drag-and-Drop of a file(*.cpp) from Explorer to the VS2005 Editor Pane fails to open the file in the editor&lt;/li&gt;&lt;li&gt;Drag-and-Drop of a file(*.cpp) from Explorer to the VS2005 Project Pane fails to add the file to the project&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Now the Drag-and-Drop issues (where VS2005 is the target for the 'Drop') also seem to occur for P4 and other programs.&lt;/p&gt;&lt;p&gt;Supposedly there are two ways to fix this:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Set all your programs that could Drag-and-Drop to VS2005 to "Run as Administrator"&lt;/li&gt;&lt;li&gt;Disable UAC&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;#1 is a bad idea since I'd have to Run as Administrator for Explorer which defeats a big chunk of UAC anyhow. Plus it'd be a pain to enable this for any program that could Drag-And-Drop to VS2005 (although right now that's probably only 3 programs for me: Explorer, P4, and FileLocator Pro).&lt;/p&gt;&lt;p&gt;I ended up disabling UAC (#2) for now which is unfortunate since UAC would be a good idea if it worked without extreme inconvenience to VS2005 users. However, disabling UAC also causes the Windows Security Center to put an angry icon in the system tray :(&lt;/p&gt;&lt;p&gt;Update:  I tried re-enabling UAC and doing #1 but it turns out that #1 doesn't work.  VS2005 only allows drag-and-drop with UAC disabled!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-3316230335253110245?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/3316230335253110245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=3316230335253110245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3316230335253110245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/3316230335253110245'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/vista-uac-not-compatible-with-vs2005.html' title='Vista UAC not compatible with VS2005'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-8788144105138401898</id><published>2008-08-11T13:03:00.000-07:00</published><updated>2008-08-11T13:11:56.002-07:00</updated><title type='text'>The VirtualBox Snapshot Manager Sucks</title><content type='html'>If you use the snapshot manager under VirtualBox, this post may keep you from inadvertently losing your most recent work in your VM.&lt;br /&gt;&lt;br /&gt;I had VirtualBox mostly working but I borked my VM hard (disk errors on the vdi file) by trying to run DPaint (yup old DOS program) under it just for kicks because running crappy old software that's not compatible with your current OS is an ideal way to test a Virtual Machine.  Well, VirtualBox didn't like DPaint.  Not only did it hang the VM instance, but the VirtualBox app itself hung and I had to kill the app.  This ended up corrupting my VDI (virtual disk image) file.&lt;br /&gt;&lt;br /&gt;No harm done though... I made a snapshot after my clean install, and then another snapshot after applying all the XP updates, ie 7, WMP11, antivirus, etc, etc.  Just revert to the last snapshot and I'd be fine.&lt;br /&gt;&lt;br /&gt;So I did a revert but thanks to their crappy snapshot manager, I actually jumped back past my last snapshot and ended up blowing away changes (which was several hours of updating, installing, and tweaking to get XP running just right after the clean install).&lt;br /&gt;&lt;br /&gt;Turns out in VirtualBox, if you "Revert to Previous Snapshot", it deletes your current state *AND* your last snapshot and goes to the second-to-last snapshot (while destroying your last actual snapshot).  If you want to just revert to your latest snapshot, there is something like "Discard Current State" which really isn't that intuitive.  If you have something that could potentially throw away a bunch of work in a non-recoverable fashion, your choices and explanation of the choices should be a bit more clear.&lt;br /&gt;&lt;br /&gt;In VirtualBox, snapshots are linear -- there is no branching.  Reverting to a snapshot is a destructive process that cannot be undone, and it's confusing because you can either revert to your latest snapshot (which they call reverting to current rather than revert to snapshot) or revert to the snapshot before that (which throws away all current changes as well as throws away your latest snapshot).  It's not intuitive and you can lose work.&lt;br /&gt;&lt;br /&gt;VMWare is definitely nicer for snapshots.  The have snapshot trees (they allow branching points for a VM) which you can selectively revert to any arbitrary snapshot in the tree.  Moving to another snapshot is non-destructive and you can move back and forth between branches -- i.e. ABCD revert to C have ABCE and then go back to D.&lt;br /&gt;&lt;br /&gt;Oh well... now that I know how the sucky snapshot editor in VirtualBox works, I'm less likely to screw it up in the future.&lt;br /&gt;&lt;br /&gt;BTW, one other little annoyance on top of all this... if you do a disk-check at startup under XP with VirtualBox, for some reason, VirtualBox won't reboot itself after the diskcheck completes so you have to do that manually.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-8788144105138401898?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/8788144105138401898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=8788144105138401898' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8788144105138401898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8788144105138401898'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/virtualbox-snapshot-manager-sucks.html' title='The VirtualBox Snapshot Manager Sucks'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-7907019778963720086</id><published>2008-08-10T14:21:00.000-07:00</published><updated>2008-08-10T18:44:27.341-07:00</updated><title type='text'>VirtualBox Free VM from Sun</title><content type='html'>&lt;p&gt;Virtual Box from Sun is available here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.virtualbox.org/wiki/Screenshots"&gt;http://www.virtualbox.org/wiki/Screenshots&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So I'm a big fan of VMWare (I own VMWare 5.5) and I have been thinking about upgrading to VMWare 6.0. However, I just heard of a free competitor called VirtualBox from Sun that's supposed to be pretty good.&lt;br /&gt;&lt;br /&gt;So last night, I played around with VirtualBox and set up an XP VM under Vista with it. It's not as slick as VMWare but for $free$ it's not bad. The seamless window integration is particularly nice.&lt;br /&gt;&lt;br /&gt;Even though I only played with it for a couple hours, it lags behind my VMWare 5.5 in the following features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;VMWare has better snapshot / revision handling &lt;/li&gt;&lt;li&gt;VMWare has all-in-one-directory portable VM's (currently VirtualBox has a machine file in one dir, disk files in another dir, and entries in a global xml table in a third dir) &lt;/li&gt;&lt;li&gt;Much faster 3D acceleration (VMWare does fairly decent DX8.1 in 5.5 and below and DX9 in 6.0 and above) &lt;/li&gt;&lt;li&gt;Multicore support (VMWare supports two virtual cores for multithreading) &lt;/li&gt;&lt;li&gt;Networking support (NAT only / I couldn't get bridging to work so I couldn't get Windows File Sharing between host and guest with my Vista Host since the guest didn't map to the same subnet) &lt;/li&gt;&lt;li&gt;Audio issues (the SB16 emu didn't work at all / you have to use the ICH for audio in XP guest) &lt;/li&gt;&lt;li&gt;Configuration is more painful than it should be... the default setup values are all too low (i.e. memory at 192MB, Vid Mem at 4 MB when you need at least 10 for seamless windowing) You need to tweak all the values and you won't find out that a feature isn't available until it fails and you have to shutdown the VM and go back and tweak. &lt;/li&gt;&lt;li&gt;Built-in shared directory implementation is non-obvious (you'll have to actually follow a walkthrough or manual to use them on VirtualBox) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I'm sure it would lag even further behind VMWare 6.0 (or the beta 6.5). However, for casual non-3D use (i.e. safe browsing, backwards app compatibility) it's not bad. If you were doing a lot of revisioning and deployment, needed reliable audio or 3D, or need bridged networking, you're better off with VMWare.&lt;br /&gt;&lt;br /&gt;Here's where VirtualBox better than VMWare:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Free (vs $189 full price / $99 upgrade) &lt;/li&gt;&lt;li&gt;Vista Host support (my VMWare 5.5 only does XP and I have to pay to get VM6.0 if I want to run under Vista) &lt;/li&gt;&lt;li&gt;Seamless window mode is very nice (makes VM windows appear similar to host windows but I think this is in VMWare 6.0 as well) &lt;/li&gt;&lt;li&gt;Supposedly better 64-bit OS support (host or guest) &lt;/li&gt;&lt;li&gt;Supposedly better performance for non-3D software (although they both feel about the same speed in the tests I've done) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;My out-of-the-box experience is that VMWare is much easier to use and setup and easier to make portable VM's. VMWare is easier to maintain with it's advanced snapshot management as well. Most of the reasons why VirtualBox is better from my simple testing boils down to the fact that it's free but if it's good enough, why pay for an alternative ?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-7907019778963720086?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/7907019778963720086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=7907019778963720086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/7907019778963720086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/7907019778963720086'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/virtualbox-free-vm-from-sun.html' title='VirtualBox Free VM from Sun'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-6253918786274037016</id><published>2008-08-10T13:49:00.000-07:00</published><updated>2008-08-10T13:56:16.522-07:00</updated><title type='text'>GParted (Gnome Partition Editor)</title><content type='html'>So I wanted to change the size of a couple of my partitions on my HD and move stuff around.  My older DOS version of Partition Magic 8 doesn't seem to like working with Vista and also seems to be a bit weird about handling my 1TB drives.  So I looked around a bit and found &lt;a href="http://gparted.sourceforge.net/"&gt;GParted&lt;/a&gt; which is pretty cool.&lt;BR&gt;&lt;BR&gt;&lt;br /&gt;It works fine with Vista and XP and large disks.  Just a couple issues I've run into:&lt;br /&gt;&lt;br /&gt;1) If you resize a Vista boot partition, you need to use your Vista Disc to "recover" the partition after the resize and then things will work fine.&lt;br /&gt;&lt;br /&gt;2) GParted is much much slower than I remember Partition Magic being.  I mean *REALLY* *SLOW*.  Sure it works but be prepared to let it run for about 24 hours straight to resize a 700GB (only 50 GB used) partition on a 1 TB drive.  I think PQMagic would have done the same thing in about 1/10 the time since it ignores empty blocks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-6253918786274037016?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/6253918786274037016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=6253918786274037016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/6253918786274037016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/6253918786274037016'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/gparted-gnome-partition-editor.html' title='GParted (Gnome Partition Editor)'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-4176991571860352027</id><published>2008-08-05T21:28:00.001-07:00</published><updated>2008-08-05T21:47:25.558-07:00</updated><title type='text'>Windows Vista - Attempt #2</title><content type='html'>So I actually got XP installed on my computer after much pain and I decided to make it dual-boot Vista. My previous experience with Vista showed that it was very demanding on the harddrive in the following ways:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows Search Indexing (Background Building of Search Indices for Built-In Windows Search)&lt;/li&gt;&lt;li&gt;Registry: queries (reads) and small writes to the registry for nearly every action performed by the OS on a continual background basis.&lt;/li&gt;&lt;li&gt;Frequent writes to the PageFile for Virtual Memory &lt;/li&gt;&lt;li&gt;NTFS filesystem updates Last Access Time whenever a file is touched in any way (including just looking at it) &lt;/li&gt;&lt;li&gt;Additional journaling writes by NTFS &lt;/li&gt;&lt;li&gt;Runs "System Restore" on volumes by default &lt;/li&gt;&lt;li&gt;"Simplified" disk defragmenter scheduled to run on all volumes &lt;/li&gt;&lt;li&gt;May store arbitrary install and temp files on any drive (examples: MSOCACHE, ie temporary install files, service pack files, etc) &lt;/li&gt;&lt;li&gt;Runs background scans on disk (Windows Defender) &lt;/li&gt;&lt;li&gt;Writes for automatic optimization of disk for boot (SuperFetch)&lt;/li&gt;&lt;li&gt;Autoupdate background downloading&lt;/li&gt;&lt;li&gt;Various *.LOG files being written&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Oh and then add 3rd party software&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Antivirus Suite (this is a killer if you get a low one like McAfee or Norton)&lt;/li&gt;&lt;li&gt;Various updaters (Apple is very guilty here)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Vista has a great tool for seeing how much disk activity is going on. Hit CTRL-ALT-DEL then click on "Start Task Manager". On the "Performance" tab, click "Resource Manager". UAC will prompt you to continue. Then click to expand the "Disk" section. You can see even when you think your computer should be idle that Vista probably has several dozen outstanding writes queued up to the hard drive at just about any time.&lt;br /&gt;&lt;br /&gt;Anyhow, my solution was three-fold for my second attempt at Vista.&lt;br /&gt;&lt;br /&gt;1) Get the fastest HD possible. I bought a 300GB Western Digital Velociraptor 10K RPM drive. It's fast -- not quite as fast as the SSD's that should be coming out later this year or early next year but a lot more affordable. Pretty much the fastest drive that is still affordable. You can get one without taking a second mortgage on the house. If you can't drop $300 for the Velociraptor, the Samesung F1 1TB 32MB cache drive is very fast as well.&lt;br /&gt;&lt;br /&gt;2) Reinstall Vista without any cruft. I was going to do a restore on the GT5628 and then uninstall as much cruft as possible. However, this wasn't necessary. Luckily the restore CD for my GT5628 doesn't restore to factory settings but rather to a clean Vista Install.&lt;br /&gt;&lt;br /&gt;3) Install only fast security software. I installed "Comodo Firewall Pro" and "avast!" antivirus. They are much faster than Norton / McAfee.&lt;br /&gt;&lt;br /&gt;Now the computer is mostly useable under dual-boot for XP or Vista.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-4176991571860352027?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/4176991571860352027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=4176991571860352027' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4176991571860352027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4176991571860352027'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/windows-vista-attempt-2.html' title='Windows Vista - Attempt #2'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-8877787986537652152</id><published>2008-08-05T00:29:00.001-07:00</published><updated>2008-08-05T00:51:45.064-07:00</updated><title type='text'>The pain of downgrading to XP.</title><content type='html'>OK, so I downgraded to XP on my machine -- a Gateway GT5628 -- and let me tell you it wasn't easy.&lt;br /&gt;&lt;br /&gt;First I tried installing XP Pro from a CD.  BLUE SCREEN.&lt;br /&gt;&lt;br /&gt;Then I tried slipstreaming SP1 into XP Pro CD.  BLUE SCREEN.&lt;br /&gt;&lt;br /&gt;Then I tried slipstreaming SP1 and SP2 into XP Pro CD.  BLUE SCREEN.&lt;br /&gt;&lt;br /&gt;I found out the BLUE SCREEN's were because I needed new drivers so I installed the DriverPacks BASE software (http://driverpacks.net/) and then installed the CPU, Chipset and MassStorage driver packs.&lt;br /&gt;&lt;br /&gt;I tried installing the DriverPack + SP3 and it got into the install but then failed on the Product Key.  So no longer a BLUE SCREEN but I do have a THIRD useless CD Coaster at this point.&lt;br /&gt;&lt;br /&gt;Turns out that if you slipstream a SP3 XP disk under Vista, that Vista will screw with at least two of your files in the "I386" directory: PIDGEN.DLL and DPCDLL.DL_.  The solution is to find an XP machine and slipstream your XP install disk under XP.  Alternatively, supposedly you can still do it under Vista but copy those two files from your SP2 install or directly from the "I386\ic" dir in SP3.  Anyhow, I just slipstreamed under XP and it worked.&lt;br /&gt;&lt;br /&gt;Finally Install and you're good to go.  I did a clean install on a fresh partition and everything worked pretty well.&lt;br /&gt;&lt;br /&gt;The "Media Card Reader" and Network drivers for Vista from the Gateway site work under XP.  I grabbed the latest video drivers from NVidia.  The only issue was audio drivers and those I got from the Intel website.&lt;br /&gt;&lt;br /&gt;So now XP works just fine and dandy on my GT5628 after about 10 tries to install that failed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-8877787986537652152?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/8877787986537652152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=8877787986537652152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8877787986537652152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8877787986537652152'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/08/pain-of-downgrading-to-xp.html' title='The pain of downgrading to XP.'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-8317284642089536727</id><published>2008-07-09T09:27:00.001-07:00</published><updated>2008-07-09T09:31:03.964-07:00</updated><title type='text'>Best ways not to get a virus in Windows</title><content type='html'>I recently have helped several friends deal with viruses on Windows.  My general solution is clean install and then set them up with AV/Firewall.  I put together a little guide to help people out:&lt;br /&gt;&lt;br /&gt;Best ways not to get a virus in Windows:&lt;br /&gt; &lt;br /&gt;#1) Run up-to-date antivirus software.  If you don't have any you can get one free at &lt;A HREF="http://www.comodo.com"&gt;www.comodo.com&lt;/A&gt;&lt;br /&gt; &lt;br /&gt;#2) Run a firewall.  If you have Windows XP, Service Pack 2 and higher have one built-in.  Also, you can get an advanced firewall for free at &lt;A HREF="http://www.comodo.com"&gt;www.comodo.com&lt;/A&gt;&lt;br /&gt;(same link as the free antivirus)&lt;br /&gt; &lt;br /&gt;#3) Don't click to run e-mail attachments even if they're from people you trust.  Viruses often disguise themselves as e-mails from people you trust or use someone's address book to send themselves to other people.  This is the whole "Trojan Horse" concept where they need your naive help by clickin on all your attachments to take over your computer. If you do want to look at e-mail attachments, save them first to your HD and scan them for viruses.  It also helps if you have &lt;A HREF="http://www.fileinfo.net/help/windows-show-extensions.html"&gt;known file extensions not be hidden&lt;/A&gt; so you don't run the wrong type of file. FWIW, most pictures are jpg, png, gif, or bmp.  Don't open anything with the following extensions: exe, vbs, com, bat.  And be quite cautious of any unknown extensions.&lt;br /&gt; &lt;br /&gt;4) Don't click on popup ads or visit sites that ask you to install extra unknown software to view the site.  Be cautious of any browser extensions or ActiveX controls you are asked to install.&lt;br /&gt; &lt;br /&gt;5) Don't reply to SPAM or fill out forms with personal details on sites you don't trust.  That's just asking for more SPAM or e-mails loaded with viruses in them.&lt;br /&gt; &lt;br /&gt;6) Don't install catchy little programs like free screensavers, smiley tools, etc.  Whatever you do, if you're browsing and a browser popup window says "you're infected with a virus, click here to run a scan" or "download this activex to optimize your computer" don't do it - Most of those fake virus scanner pop-ups actually install some form of malware (spyware, trojan, worms, viruses, etc) on your computer.  Even if the program itself is not deliberately malicious (and quite a few of them are by including SpyWare that tracks you online), these programs often have connect to the internet and have security holes that allow another attack vector for viruses and worms to get on your computer.&lt;br /&gt; &lt;br /&gt;In general, use common sense, be proactive in running defensive software, be paranoid of installing anything on your computer, and be smart enough to realize there's almost nothing free on the internet and anything that sounds to good to be true probably is -- there's a lot of snake oil out there.  Finally, if you have room on another hard drive in your computer, consider making a backup or a copy of your uninfected HD for safety's sake.  Once you get a computer infection in Windows, it's often very hard to remove and sometimes a clean install or reinstall of a backup is the only way to get your computer bug-free.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-8317284642089536727?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/8317284642089536727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=8317284642089536727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8317284642089536727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/8317284642089536727'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/07/best-ways-not-to-get-virus-in-windows.html' title='Best ways not to get a virus in Windows'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1304367419228697332</id><published>2008-07-03T23:33:00.001-07:00</published><updated>2008-07-03T23:37:01.305-07:00</updated><title type='text'>"Downgrading" to XP</title><content type='html'>Well, I'm finally tired of trying to use Vista on my QuadCore.  I keep on finding my new computer randomly doing things where it suddenly goes crazy for 20 minutes and is dog slow while Vista is doing some sort of disk indexing or other craziness that I haven't yet figured out how to turn off.  XP just seems faster and snappier -- my old computer with XP seems faster than the new QuadCore with Vista.  Plus XP works well with all the programs I use and I don't want to spend a couple hundred upgrading Ghost and VMWare and other reliable standby software that I own that isn't Vista ready.  I'm going to keep the HD Vista came on just in case I want to play with DX10 but for my daily use, I'm sticking with XP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-1304367419228697332?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1304367419228697332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1304367419228697332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1304367419228697332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1304367419228697332'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/07/downgrading-to-xp.html' title='&quot;Downgrading&quot; to XP'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1920066830093438803</id><published>2008-05-28T09:08:00.000-07:00</published><updated>2008-05-28T09:17:40.036-07:00</updated><title type='text'>POEM: The Innocent do not Rest</title><content type='html'>The unknowing yet innocent still believe what they will.&lt;br /&gt;Only the guilty understand what innocence cannot comprehend&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;– mortals are we all, yet some must strive for less.&lt;br /&gt;&lt;br /&gt;Keep the shadow a shadow only in your mind&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;– refuse to look into the darkness.&lt;br /&gt;Now is not the time to listen to the wind,&lt;br /&gt;Omniscient is the barren broken soul that releases&lt;br /&gt;With a gasping dying breath, an existence ceases&lt;br /&gt;&lt;br /&gt;Mortal men with souls immortal are the ones that face their beasts&lt;br /&gt;Eternity in darkness is the only final peace.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Copyright 1991-1992 Adisak Pochanyon&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-1920066830093438803?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1920066830093438803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1920066830093438803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1920066830093438803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1920066830093438803'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/05/poem-innocent-do-not-rest.html' title='POEM: The Innocent do not Rest'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-4169546456111523610</id><published>2008-05-27T12:59:00.000-07:00</published><updated>2008-05-27T22:31:02.080-07:00</updated><title type='text'>Global Warming ?</title><content type='html'>So we're having unseasonably cool weather here in Chicago.  Downright cold if you consider having temps in the 40's a few days before June.  And over lunch I heard the whole, "How can we be having global warming if it's getting colder here and in other places as well?"&lt;br /&gt;&lt;br /&gt;Well, climate is complex and there's no easy answer to that.&lt;br /&gt;&lt;br /&gt;Global climate is a chaotic system that is currently in a temporary stable localized homeostasis.  Certain factors influence the climate in well known ways -- for example, the length of days corresponding to temperature and seasons.  The climatic system as a whole in general terms system usually bounces between fairly well established norms, displaying a partially predictable hysteresis response to influences.&lt;br /&gt;&lt;br /&gt;The vast number of inputs and varying responses make predicting detailed climate response to specific events impossible.  This is why we can predict winter and summer in advance (the seasons in general terms) but we have close to zero ability to accurately predict if it's going to rain the second tuesday of next month.&lt;br /&gt;&lt;br /&gt;The reason most educated people are at least concerned about "Global Warming" is that nearly all locally stable chaotic systems have what is known as a "tipping point".  You push them a little and they will come back to "center" with some minor random variations in between -- taking a partially unpredictable path trending back towards a predictable destination.  However, if you push them past the "tipping point" -- all bets are off -- the system can fly off in any direction and run away chaotically or it could just as easily come back to rest in the same localized homeostasis or it may find a new stable locale.&lt;br /&gt;&lt;br /&gt;That's why a little carbon emission might predictably cause a corresponding global warming but a lot of carbon emission might cause everything from an ice age to a long dry period of sprawling hot deserts -- or it might not cause any problems at all.  One can honestly say that the best educated guess is we have no idea at all what will happen -- However, we can state at the same time that lots of carbon emissions are *MORE LIKELY* to push us into either an age of Deserts / Ice (something other than our current localized stable state) and the fact is that research or computer simulations can show both of those happening depending how they try to represent the climate system.&lt;br /&gt;&lt;br /&gt;We can never hope to fully understand a truly chaotic system since by definition, it is random in response to certain inputs and beyond our complete understanding.  However, we can understand issues like the "tipping point" and smaller effects on the system and try to avoid doing anything genuinely catastrophic.  Reducing carbon emissions and anything else that is possible of influencing the climate is more likely to keep us in the stable locale we currently occupy (i.e. a habitable planet) not to mention that lessened dependence on fossil fuels has plenty of other economic and political benefits that are much better understood so we should pursue them anyhow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-4169546456111523610?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/4169546456111523610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=4169546456111523610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4169546456111523610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/4169546456111523610'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/05/global-warming.html' title='Global Warming ?'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1314879606878871876</id><published>2008-05-16T13:28:00.000-07:00</published><updated>2008-05-16T13:31:30.123-07:00</updated><title type='text'>Can the "will of the people" ever be wrong?</title><content type='html'>The "will of the people" is not always correct. In a state where the rights of only the majority are respected, minorities are oppressed. If you want to see what happens in a place where the majority is always "right", imagine moving to a Muslim country with Shariac Law in the Middle East as a Christian minority.&lt;br /&gt;&lt;br /&gt;Protection of minorities is essential in a Free State and Democracy. That's why the U.S. Constitution grants us rights such as the freedom of speech, freedom of religious choice, and the right to vote. We are granted further inalienable rights such as the right to life, liberty, and the pursuit of happiness.&lt;br /&gt;&lt;br /&gt;When the "will of the people" is to quash these inalienable rights by passing laws which remove the rights of a class of minorities, the Constitution must step in to protect us. Equal rights for all citizens outweigh any "popular vote" of opinion.&lt;br /&gt;&lt;br /&gt;Let us turn back the clock a few mere decades to see how the "will of the people" can be wrong.&lt;br /&gt;&lt;br /&gt;In 1967, a Gallup pool showed 96 percent of white Americans disapproved of interracial marriage. Sixteen states had laws making it illegal for Blacks to marry Whites. These states included Alabama, Arkansas, Delaware, Florida, Georgia, Kentucky, Louisiana, Mississippi, Missouri, North Carolina, Oklahoma, South Carolina, Tennessee, Texas, Virginia, and West Virginia. Furthermore, some of the laws prevented Asians, Native Americans, Filipinos, or all non-Whites to marry Whites.&lt;br /&gt;&lt;br /&gt;In the same year, when the U.S. Supreme Court declared unconstitutional these anti-miscegenation laws there was a public outrage in many of these states. Opponents of mixed-race marriages decried the union of loving interracial couples, claiming that such marriages would destroy our traditions and undermine the moral foundation of America.&lt;br /&gt;&lt;br /&gt;But before the defeat of all anti-miscegenation laws in the US Supreme Court, there were smaller skirmishes in various state supreme courts.&lt;br /&gt;&lt;br /&gt;Some of these skirmishes went for the segregationists.&lt;br /&gt;&lt;br /&gt;In 1958, Richard and Mildred Loving, a mixed couple in Virginia had gone to D.C. to get married where interracial marriages were legal. They returned to Virginia and were arrested for living together as an interracial couple. They were found guilty and were sentenced to jail terms for merely "Loving" each other. Judge Leon Bazile suspended their sentence on the condition that the Lovings would leave Virginia and not return for 25 years.&lt;br /&gt;&lt;br /&gt;So the Lovings were banished from the state and moved to D.C. Five years later they tried to appeal this decision but the judge replied:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"Almighty God created the races white, black, yellow, and red, and he placed them on separate continents. And but for the interference with his arrangement there would be no cause for such marriages. The fact that he separated the races shows that he did not intend for the races to mix."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Other skirmishes went to committed couples who fought the "popular vote" to be together -- For example, the 1948 ruling in California's Supreme Court which overturned the state's 98 year old "tradition" of outlawing mixed-race marriages.&lt;br /&gt;&lt;br /&gt;The issue of interracial marriages had been supposedly "settled" by state laws prior to the 1967 US Supreme Court ruling. In the end, though, the issue was decided in the courts (both federal and states) where some brave judges upheld that fundamental rights the Constitution grants us for the pursuit of happiness overrule any mere law passed by Legislators following the shouts of the majority.&lt;br /&gt;&lt;br /&gt;These judges were merely doing their job making America a better place by insuring her citizens were granted equal rights. They were not "activist judges" although perhaps that's what they would be called today. They were certainly called worse names back in the day.&lt;br /&gt;&lt;br /&gt;Does this sound familiar today?&lt;br /&gt;&lt;br /&gt;Ask yourself if you would be denied the right to love before you ask another to give up that right.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Please pass this on. Thanks.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-1314879606878871876?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1314879606878871876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1314879606878871876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1314879606878871876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1314879606878871876'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/05/can-will-of-people-ever-be-wrong.html' title='Can the &quot;will of the people&quot; ever be wrong?'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-2852556714593581521</id><published>2008-04-07T08:43:00.000-07:00</published><updated>2008-04-07T08:44:42.408-07:00</updated><title type='text'>... the codebase... a poem</title><content type='html'>my godlike STL is no good if you understand&lt;br /&gt;four line loops in 7 files are for if you're a real man&lt;br /&gt;there is a world of pain you'll never know... bjarn-turbation&lt;br /&gt;schedule capture requirements for an ivory-tower nation&lt;br /&gt;onion-layers stinky code / tinfoil wrapping poo&lt;br /&gt;my helloworld is 30MB but I'm a better coder than you&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-2852556714593581521?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/2852556714593581521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=2852556714593581521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2852556714593581521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2852556714593581521'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/04/codebase-poem.html' title='... the codebase... a poem'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-2540844518764066976</id><published>2008-03-21T11:08:00.000-07:00</published><updated>2008-03-21T11:32:12.117-07:00</updated><title type='text'>Vista Disk Manager</title><content type='html'>Ok... so after playing around with Vista for a couple days, I did finally find a NEW feature -- actual useable functionality not present in XP!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.howtogeek.com/howto/windows-vista/resize-a-partition-for-free-in-windows-vista/"&gt;The Vista Disk Manager can resize partitions without data loss&lt;/a&gt;.  It does have an odd limitation that it will only shrink to 50% of the current partition size regardless of how much free space is available.  It also won't move unmoveable files like the MFT.&lt;br /&gt;&lt;br /&gt;Running Partition Magic / gparted on XP would allow you to resize much smaller since they don't have the artificial 50% limit and they will compact/defragment the drive including those "unmoveable" system files.  However, just having the ability to resize your partitions is a welcome addition to the default Disk Manager even if the feature is less powerful than some of the much older commercial and free software out there.&lt;br /&gt;&lt;br /&gt;This means for the most part you won't need Partition Magic which doesn't seem to work with Vista anyhow or gparted &lt;a href="http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/"&gt;which only works with some voodoo requiring a Vista Installation Disc&lt;/a&gt; -- not a "Restore" Disc like Gateway gave me :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-2540844518764066976?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/2540844518764066976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=2540844518764066976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2540844518764066976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/2540844518764066976'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/03/vista-disk-manager.html' title='Vista Disk Manager'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-7760247612788896862</id><published>2008-03-20T09:55:00.000-07:00</published><updated>2008-03-20T10:01:51.879-07:00</updated><title type='text'>Cruftware - a quick survey of useless software on my new PC</title><content type='html'>So I bought a new PC with Vista and my first impressions of Vista were less than enthusiastic.&lt;br /&gt;&lt;br /&gt;The other bad news is besides coming with Vista, it came preloaded with lots of trial-ware and bloat-ware including stuff which infests the "all programs", desktop, startbar, favorites, autorun, quicklaunch, explorer context (right click) menu, and run lots of background tasks and services. I need to spend some serious time "de-crapifying" my PC.  Now, cruft isn't unique to either Gateway or Vista -- my last PC was a Dell with XP and that had plenty of crap installed as well.&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.youtube.com/watch?v=1EbCyibkNB0"&gt;The Apple Mac vs PC have never rung soooo true...&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Crapware Installed&lt;br /&gt;&lt;ul&gt;&lt;li&gt;AOL&lt;/li&gt;&lt;li&gt;BigFix (crufty auto update)&lt;/li&gt;&lt;li&gt;Google Desktop&lt;/li&gt;&lt;li&gt;Google Toolbar for Internet Explorer&lt;/li&gt;&lt;li&gt;McAfee (90 day trial - works only after nagging/registration/activation)&lt;/li&gt;&lt;li&gt;Microsoft Office 2007 Home and Student Edition (Trial -- Note: Home / Student version does NOT include OUTLOOK!)&lt;/li&gt;&lt;li&gt;Napster (30 day trial)&lt;/li&gt;&lt;li&gt;NetZero&lt;/li&gt;&lt;li&gt;SpareBackup (monthly charge to use)&lt;/li&gt;&lt;li&gt;WildTangent (10 demo games with 60 minutes of game play)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Software that might be of some use&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Adobe Reader (free)&lt;/li&gt;&lt;li&gt;CyberLink Power2Go (CD/DVD burning software)&lt;/li&gt;&lt;li&gt;Sun Java (free)&lt;/li&gt;&lt;li&gt;Microsoft Works 8.5 (does not come with Word or Excel)&lt;/li&gt;&lt;li&gt;Microsoft Money 2006&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;OK, I lied about the "some use" part -- Java and Reader can be had as free downloads but they both needed updating.  Works is pretty much worthless… especially since the PC is setup to try to open all .doc files and spreadsheets using the "trial" version of Office 2007 that nags you to pay and even if you uninstall the "trial" Office, you'd still have to manually set your types for Works to open your files for you by default. I haven't tried the burning software yet so that is still a coin toss and Money might be ok even though I'm still using a 10 year old version of Quicken that works fine. &lt;/p&gt;&lt;p&gt;And speaking of trialware / missing feature, how about the OS itself?  My PC came with Fax/Modem Hardware but Vista Home versions do not include Fax capability (that requires Vista Ultimate or Vista Business).&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-7760247612788896862?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/7760247612788896862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=7760247612788896862' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/7760247612788896862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/7760247612788896862'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/03/cruftware-quick-survey-of-useless.html' title='Cruftware - a quick survey of useless software on my new PC'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7911969244113689481.post-1538795736428131805</id><published>2008-03-20T09:24:00.001-07:00</published><updated>2008-03-20T09:55:34.266-07:00</updated><title type='text'>New PC - thoughts on Vista</title><content type='html'>So I bought a new PC. It's a Gateway GT5628 with QuadCore Q6600 processor, 3GB RAM, 500 GB 7200 RPM 16 MB cache HD. Pretty high end specs for a computer that I'll mainly use for browsing the Web, checking my e-mail, and doing my finances on Quicken.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Vista&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It came with Vista Home Premium and I decided I am going to try Vista a bit before deciding whether it deserves to get wiped and replaced with XP. I'll probably keep it and suffer or dual-boot just so I can play around with DirectX 10 though. Some initial impressions of Vista:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I had Vista only a couple days before SP1 came out. The SP1 install took a long time to download and a long time to install but it's the first time I've done such a huge update with multiple reboots where I could start it up and pretty much walk away and not have the computer sit there "waiting" for me to click "Yes Reboot" or OK continue.&lt;/li&gt;&lt;li&gt;Vista (or maybe the preloaded Google Desktop software) seems to be nearly constantly throttling my harddrive. I'm getting 1-2% CPU usage but out of the box, the computer was agonizingly slow until I let is sit thrashing for about 24 hours to perform whatever drive indexing it needed to do before it would let me actually do anything productive.&lt;/li&gt;&lt;li&gt;The new AERO Glass interface looks nice but seems to take up a lot of room with unused space while providing reduced functionality (you have a big unused clear pane at the top of the explorer windows but no longer a useful title bar or menus).&lt;/li&gt;&lt;li&gt;I've decided the new "start" menu is great to use from a keyboard (type and search to run) but absolutely 100% worthless to use with a mouse. Navigation is a horror with multiple clicks to descend through the levels of nested start menus. The old XP "start" menu is bad but at least it's useable if you clean things up. Using the Vista start menu with a mouse is a total joke.&lt;/li&gt;&lt;li&gt;UAC. Yep it's pretty annoying. Especially when you have to click it multiple times to do something very simple. Not to mention even with clicking OK through countless UAC pop-ups, somehow Vista wouldn't let me change the "icon" for a folder on the shared desktop. I had to make a folder in the user's documents and change the icon there and then copy the folder to the shared desktop.&lt;/li&gt;&lt;li&gt;Disk Defrag - MS really neutered this program for Vista. They simplified it down to a single button with no display. You can't chose which disk to defrag (it's all-your-drives-or-none) so you're pretty much S-O-L if you just need to defrag a single drive. Plus there is no visible feedback to the program. XP's defrag had a display showing before and after defragmentation and a progress bar that would at least try to guess (if sometimes wildly incorrectly) how much progress had been made and how much time remained.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Well, that's all I have from playing with Vista for just a couple days but I'm sure I'll have more to post. From a User Perspective, I didn't really see much new that I liked other than the keyboard search on the start menu (which is negated by the mouse navigation of the start menu). So far, Vista basically feels like a slower, more annoying version of XP with a slightly prettier interface.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7911969244113689481-1538795736428131805?l=adisakp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adisakp.blogspot.com/feeds/1538795736428131805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7911969244113689481&amp;postID=1538795736428131805' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1538795736428131805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7911969244113689481/posts/default/1538795736428131805'/><link rel='alternate' type='text/html' href='http://adisakp.blogspot.com/2008/03/new-pc-thoughts-on-vista-and-cruftware.html' title='New PC - thoughts on Vista'/><author><name>Adisak</name><uri>http://www.blogger.com/profile/10396251348513878959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_e14s3onqTKQ/St-MNGgqW1I/AAAAAAAAAE8/MtopFnTmiQI/S220/Adisak_Face80.png'/></author><thr:total>1</thr:total></entry></feed>
