<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Independent Developer</title>
	<atom:link href="http://www.independentdeveloper.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.independentdeveloper.com</link>
	<description>Code, Art and Everything In-Between</description>
	<lastBuildDate>Tue, 11 Aug 2009 21:32:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>More Job Tips</title>
		<link>http://www.independentdeveloper.com/archive/2009/08/11/more-job-tips</link>
		<comments>http://www.independentdeveloper.com/archive/2009/08/11/more-job-tips#comments</comments>
		<pubDate>Tue, 11 Aug 2009 21:31:29 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=743</guid>
		<description><![CDATA[- Links are better than attachments. They&#8217;re easier and faster to forward and they&#8217;re more reliable. You never know if someone is going to be receiving that e-mail on their Blackberry or other mobile device, or low-bandwidth connection. - [Caveat] If you send a link, make sure your website is up and available. There&#8217;s nothing [...]]]></description>
			<content:encoded><![CDATA[<p>- <strong>Links</strong> are better than attachments. They&#8217;re easier and faster to forward and they&#8217;re more reliable. You never know if someone is going to be receiving that e-mail on their Blackberry or other mobile device, or low-bandwidth connection. </p>
<p>- [Caveat] If you send a link, <strong>make sure your website is up and available. </strong>There&#8217;s nothing worse than going to view someone&#8217;s portfolio and getting a &#8220;this user needs to renew their account&#8221; message. An attachment is still better than a non-working website.</p>
<p>- <strong>Tell me what you&#8217;re applying for, </strong>especially if its a cold contact.</p>
<p>- If you have a video, <strong>use a codec you know is pre-installed</strong> on most computers -OR- provide a link to where the codec can be obtained from. A codec that&#8217;s pre-installed is the better of the two choices.</p>
<p>- On your reel, <strong>be specific about which parts are yours. </strong>This is especially important on group projects. A shot list is helpful.</p>
<p>- Ditto on code samples.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/08/11/more-job-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Job Hunting Tips</title>
		<link>http://www.independentdeveloper.com/archive/2009/08/06/job-hunting-tips</link>
		<comments>http://www.independentdeveloper.com/archive/2009/08/06/job-hunting-tips#comments</comments>
		<pubDate>Thu, 06 Aug 2009 22:33:07 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[artist]]></category>
		<category><![CDATA[game dev]]></category>
		<category><![CDATA[game development jobs]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=724</guid>
		<description><![CDATA[As a former game dev lead and now as a studio head, I look at a lot of resumes. This is by no means a comprehensive guide, but if you&#8217;re looking for a job here are a few quick tips I can share from my own perspective from the hiring side. These are some of [...]]]></description>
			<content:encoded><![CDATA[<p>As a former game dev lead and now as a studio head, I look at <em>a lot</em> of resumes.</p>
<p>This is by no means a comprehensive guide, but if you&#8217;re looking for a job here are a few quick tips I can share from my own perspective from the hiring side. These are some of the top things, good and bad, that I see every day when I am evaluating potential candidates. </p>
<p><em>[Required disclaimer: This is just my personal opinion on hiring practices, not official policy for any company including my own! Different hiring managers use different criteria and techniques. Use your own best judgment when preparing your application.]</em></p>
<p>- <strong>Have a demo reel, portfolio or code sample.</strong> I can&#8217;t emphasize this enough. I&#8217;m going to be dead honest: I generally watch reels all the way through before I even open the attached resume. I may even watch your reel before I read your name. I don&#8217;t care how many years of experience you have if your reel is crappy&#8230; and vice versa, I&#8217;m more likely to give someone with little or no experience a shot if they have a really brilliant demo. In the end, we want to hire people who can produce a superior end product regardless of how you acquired your skills, and the best way to prove to me you can do that is to show me a great example of an end product.</p>
<p>- <strong>Your demo reel only needs to show what it needs to show.</strong> Or, to clarify: if you&#8217;re an animator, a reel with untextured characters or stock textures&#8211;as long as they are credited&#8211;is perfectly okay. If you&#8217;re a programmer, a well-written class file is enough. I don&#8217;t need to see a whole game or movie. I just need to get an idea of what you can do. In fact, this is <em>especially</em> true for programmers. Many programmers send compiled binaries and no source code. A compiled binary doesn&#8217;t tell me very much. I&#8217;d much rather have a sample of well-written code even if it doesn&#8217;t compile because the rest of the app is missing than a pretty demo with no source and no idea if it&#8217;s a rats nest under the hood.</p>
<p>- <strong>If you are a programmer, comment your code.</strong> An uncommented demo is an instant fail. If can&#8217;t bother to comment your demo why would I believe you would comment your actual source? </p>
<p>- <strong>Write a cover letter.</strong> It doesn&#8217;t have to be long or elegant; in fact, it&#8217;s better if it&#8217;s brief. Give me the &#8220;highlights reel&#8221; before I view your portfolio or resume. Tell me the one or two <em>very best</em> things about yourself that make you a better candidate for the position than anyone else. It gives me an idea of what you think I should focus on when I read your resume.</p>
<p>- <strong>Don&#8217;t call my desk line,</strong> but it&#8217;s okay to send me an e-mail even if we don&#8217;t have a job listing posted. It&#8217;s not that I don&#8217;t want to chat, it&#8217;s just that I&#8217;m much more likely to be frazzled and in the middle of something if you call me unexpectedly. <em>[Edit: For clarification, I mean cold calling. <img src='http://www.independentdeveloper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Regular calling when I expect you might is okay, naturally.]</em></p>
<p>- Freelancers [sometimes] have better chances of getting work, especially if they aren&#8217;t looking for full-time. There are two reasons why freelancers are desirable: The games industry is very seasonal in nature with lots of ups and downs. We may not have enough work or the budget for a full-time employee, but we may have specific projects that need done. (And, oddly, small projects often have a way of leading to more work&#8230;) Secondly, hiring people is just darn hard. It&#8217;s heartbreaking (really) to hire someone who doesn&#8217;t work out, and nobody likes doing it. Contracting is often a good way for both parties to see if the other will be a good fit. If it turns out there&#8217;s a ton of work to do, you love what you&#8217;re doing, and we love your work, then when a full-time opportunity does present itself it&#8217;s a much easier jump. Now to be fair, I know contracting is not for everyone so it&#8217;s by no means a requirement, but if you were thinking of freelancing already it&#8217;s worth considering. ** This tip may or may not apply to certain companies. Some companies never hire freelancers. We use freelancers frequently.</p>
<p>- <strong>If you send your resume as an e-mail attachment, put your name or something identifiable in the file name.</strong> Don&#8217;t name it &#8220;resume.doc&#8221;. &#8220;jane_doe_resume.doc&#8221; is <em>much</em> better. Resumes always get saved off to disk before reading so they can be virus-scanned first. Putting your name in your resume file name makes it stand-out when someone is searching through the folder of virus-scanned resumes for yours.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/08/06/job-hunting-tips/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>AC3D Plugin: Material by Crease Angle and Planar Map by Material</title>
		<link>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material</link>
		<comments>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material#comments</comments>
		<pubDate>Tue, 16 Jun 2009 01:10:31 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tools and Plugins]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[ac3d]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[plug ins]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[texture map]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=628</guid>
		<description><![CDATA[Two new plugins today! The first plugin, Set Material by Crease Angle, sets the materials of a model based on the crease angle of the mesh. For each selected area, the plugin creates a new color in the palette and &#8220;flood-fills&#8221; the area until the angle between the surfaces exceeds the crease angle of the [...]]]></description>
			<content:encoded><![CDATA[<p>Two new plugins today!</p>
<p>The first plugin, <strong>Set Material by Crease Angle</strong>, sets the materials of a model based on the crease angle of the mesh. For each selected area, the plugin creates a new color in the palette and &#8220;flood-fills&#8221; the area until the angle between the surfaces exceeds the crease angle of the mesh. The result is that contiguous areas are all set with the same palette material, and a new material is applied wherever a discontinuity occurs. This allows you to easily break a model into sections along its creases for easier texture mapping, or many other purposes.</p>
<p align="center"><a href="/images/materialbycreaseangle.jpg" rel="lightbox" title="Material by Crease Angle"><img src="/images/materialbycreaseangle_thumb.jpg" /></a></p>
<p>The second plugin, <strong>Planar Map by Material</strong>, actually includes <em>three</em> new commands. </p>
<p>The first command is <strong>Fit UV Coordinates to Map</strong>. This command is essentially the same as the &#8220;max&#8221; button in the TCE, forcing all UV coordinates into the 0-1 range, but unlike &#8220;max&#8221; this scales the map proportionally instead of independently on each axis.</p>
<p>The second command is <strong>Adjust UVs for Bilinear Filter</strong>. This is useful for game developers. This command scales your texture coordinates by a ratio of 240/256. The purpose is to create a small seam along the edge of the texture map so that if your game is using mipmapping with a bilinear or trilinear filter, the texture won&#8217;t bleed into its neighbors in your texture cache nor will it bleed into itself if you haven&#8217;t clamped the edges. </p>
<p>The last command, <strong>Planar Map by Surface Material</strong>, is probably the most useful of the three. Planar Map by Surface Material applies a &#8220;best fit&#8221; planar projection to all surfaces grouped by material in the current selection. If you section your model by material, this will treat each material color as a contiguous group and apply whichever planar projection fits it best in the TCE. You&#8217;ll still need to do some manual adjustment after you map it this way&#8211;especially texture packing, as this leaves plenty of room between areas so the surfaces aren&#8217;t too difficult to select&#8211;but it can save a lot of time in laying down a base mapping before you manually refine each area.</p>
<p>More information about each plugin is available in the readme.</p>
<p><a href="http://www.independentdeveloper.com/files/materialbyangle.zip">Download the Material by Crease Angle plugin. (Requires Windows XP, AC3D 6.2 or above.)</a></p>
<p><a href="http://www.independentdeveloper.com/files/autoplanaruv.zip">Download the Planar Map by Material plugin. (Requires Windows XP, AC3D 6.2 or above.)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tower Defense as a Thread Model</title>
		<link>http://www.independentdeveloper.com/archive/2009/06/11/tower-defense-as-a-thread-model</link>
		<comments>http://www.independentdeveloper.com/archive/2009/06/11/tower-defense-as-a-thread-model#comments</comments>
		<pubDate>Thu, 11 Jun 2009 23:28:23 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[thread model]]></category>
		<category><![CDATA[tower defense]]></category>
		<category><![CDATA[turret defense]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=614</guid>
		<description><![CDATA[I keep having the strangest reoccurring dream. In my dream, I&#8217;m playing a turret defense game. 1 However, it is no ordinary tower game. It&#8217;s actually a thread process model. In the dream, each turret type represents a thread synchronization mechanism, generally some sort of atomic primitive. The units marching along the paths represent the [...]]]></description>
			<content:encoded><![CDATA[<p>I keep having the strangest reoccurring dream. In my dream, I&#8217;m playing a <a href="http://www.newgrounds.com/portal/search/title/tower%20defense">turret defense</a> game. <sup><a href="#footnote">1</a></sup> <strong>However, it is no ordinary tower game. It&#8217;s actually a thread process model.</strong> In the dream, each turret type represents a thread synchronization mechanism, generally some sort of atomic primitive. The units marching along the paths represent the threads that require synchronization. Most are worker threads calculating a result set, but some may be polling threads reading device updates or doing other jobs. The range circle of each tower and the position of the unit along the path represent states when it is appropriate for the thread to be accessed, either quiescent states or work states where the thread has completed some useful task and has a result ready to be read. If the unit\thread moves out of the turret\synchronization range circle, the thread result is lost or held and operation on the next work cycle begins. Shooting a unit\thread with a turret is a read\synchronization operation and gathers the result.</p>
<p>Yeah, I know, clearly I&#8217;ve had threads on the mind a little too much lately. <img src='http://www.independentdeveloper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve been working on a major refactor of the engine at work and <a href="http://herbsutter.wordpress.com/?s=effective+concurrency">thread synchronization problems are tricky</a>.</p>
<p>Usually when I have dreams like this I wake up in the morning and have a good laugh wondering what the heck I was thinking. This time, however, I think there may be something to it. Now, I&#8217;m not suggesting a design built literally on the model exactly as it is in the dream but I think there are elements that could be useful.</p>
<p><strong>The part that is intriguing about the turret defense thread model is that you can guarantee completion (all units hit) without guaranteeing really very much at all about either the turrets or the units. </strong>The units are not synchronized with each other; in fact, in many tower games faster units can overtake slower ones. A unit does not guarantee a minimum speed&#8211;it may even be allowed to stop entirely on occasion&#8211;although it does guarantee a maximum speed. The turrets are not synchronized with each other, nor do they communicate any information to each. A turret does not guarantee a specific number of units hit, only that it will hit units at a specific rate. A turret also does not guarantee what order it will fire at units in. A unit likewise guarantees nothing about when or by whom it will be hit except that it can be hit when it is within a valid range.</p>
<p>Yet, with a sufficient number of correctly placed turrets all the units will be hit with none escaping. More importantly, most of the time you can have far fewer turrets than units and still complete successfully. The number of turrets required is a simple function of the <em>maximum</em> speed of the turret, the <em>maximum</em> speed of the unit, and the number of times the turret must hit the unit for completion. Placement is trickier, but with a thread model you could surely replicate that with signals. </p>
<p>Fascinating, isn&#8217;t it?</p>
<p>I&#8217;m not sure yet where to go with all this, but it seems like there&#8217;s a useful idea to be gleaned. It&#8217;s not that different that a traditional worker pool, but the lack of communication seems important. I&#8217;m sure there&#8217;s something useful that can be done with this.</p>
<hr/>
<p><em>1. <a name="footnote"></a>For anyone who cares, the specific game seems to be <a href="http://en.wikipedia.org/wiki/Crystal_Defenders">Crystal Defenders</a>, but with some elements of <a href="http://www.ninjakiwi.com/Games/Tower-Defense/Bloons-Tower-Defense-3.html">Bloons Tower Defense 3</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/06/11/tower-defense-as-a-thread-model/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube XL</title>
		<link>http://www.independentdeveloper.com/archive/2009/06/04/youtube-xl</link>
		<comments>http://www.independentdeveloper.com/archive/2009/06/04/youtube-xl#comments</comments>
		<pubDate>Thu, 04 Jun 2009 11:53:01 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[videos]]></category>
		<category><![CDATA[wii]]></category>
		<category><![CDATA[youtube xl]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=611</guid>
		<description><![CDATA[YouTube just released a new &#8220;game-console optimized&#8221; version, YouTube XL. Somehow I was out-of-the-loop on that one, so the release caught me by surprise. I like to watch videos on the Wii sometimes. I don&#8217;t use the Wii for web surfing regularly, but now and again the comfort of flopping down on the couch instead [...]]]></description>
			<content:encoded><![CDATA[<p>YouTube just released a new &#8220;game-console optimized&#8221; version, <a href="http://www.youtube.com/xl">YouTube XL</a>. </p>
<p>Somehow I was out-of-the-loop on that one, so the release caught me by surprise. I like to watch videos on the Wii sometimes. I don&#8217;t use the Wii for web surfing regularly, but now and again the comfort of flopping down on the couch instead of sitting in a desk chair at the computer more than makes up for the small screen resolution of the television. Today when I went to YouTube, however, I was greeted by an all new interface. Designed specifically for consoles such as the Wii and PS3, YouTube XL is a smaller, sleeker interface targeted specifically at television viewing.</p>
<p>I must say, I found YouTube XL a big improvement for game console-based video browsing. It seems many of the early reviews are mixed; many reviewers seem to be complaining about some of the missing features such as comments. Honestly as someone who <strong><em>actually uses</em></strong> YouTube on a game console on a semi-regular basis I think the new UI is far more practical. Certainly there are some missing features, such as comments, but I can&#8217;t really imagine tapping out a comment with a joystick anyway. Frankly I even avoid the search box when I can. (Thank goodness for auto-complete the rest of the time.)  The far improved use of screen real estate plus larger, easier to target buttons made for a much more pleasant viewing experience. The new YouTube XL isn&#8217;t a replacement for PC-based video surfing, but it&#8217;s a nice alternative when a comfortable seat on the couch beckons. I vote thumbs up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/06/04/youtube-xl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>memcpy_s</title>
		<link>http://www.independentdeveloper.com/archive/2009/05/22/memcpy_s</link>
		<comments>http://www.independentdeveloper.com/archive/2009/05/22/memcpy_s#comments</comments>
		<pubDate>Fri, 22 May 2009 20:55:45 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=471</guid>
		<description><![CDATA[On Friday, an article ran on Slashdot making note that Microsoft is &#8220;banning&#8221; the C function memcpy in favor of the new memcpy_s. While memcpy_s has in truth been around for a while, the notion that it would now generate compiler warnings has created quite an uproar. Some people seem curious as to why so [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday, <a href="http://tech.slashdot.org/article.pl?sid=09/05/15/152213">an article ran on Slashdot</a> making note that Microsoft is &#8220;banning&#8221; the C function memcpy in favor of the new memcpy_s. While memcpy_s has in truth been around for a while, the notion that it would now generate compiler warnings has created quite an uproar. Some people seem curious as to why so many people are upset by what seems a pretty innocuous change. The article author asked if was going to affect anyone&#8217;s creativity. I can assure you that&#8217;s not the concern. </p>
<p><strong>In a nutshell: the problem is you can&#8217;t tape a cupholder to a formula one race car and declare it street legal.</strong> It still doesn&#8217;t have any bumpers, it&#8217;s too low to be safe around other cars, and if you aren&#8217;t an expert driver you still shouldn&#8217;t be driving it. A cupholder doesn&#8217;t change that. </p>
<p><strong>So what? A cupholder is still an improvement&#8230; right?</strong> Who <em>doesn&#8217;t</em> want a cupholder? Imagine for a moment that having the cupholder suddenly disqualified you from a number of races. You couldn&#8217;t run that race if you have a cupholder. It also slowed down your car&#8211;not a lot, but a tiny fraction of a second. Maybe it doesn&#8217;t slow it down enough to matter, but in those few races won by hundredths&#8230; well, maybe it does. Suddenly that cupholder doesn&#8217;t seem so nice.</p>
<p>To be clear, I’m <strong>not</strong> suggesting giving up on attempts to improve memory management and prevent buffer overruns. I just question if this exact approach was the best one.</p>
<p>Memcpy_s is basically a race car with a cupholder. While memcpy_s will certainly prevent some bugs, the same people who got one parameter wrong are just as likely to get two parameters wrong&#8230; and cause <em>all new bugs</em> in the process. <a href="http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out"><strong>Garbage In = Garbage Out.</strong></a> It doesn&#8217;t matter what the calling convention is.</p>
<blockquote><p>On two occasions I have been asked,—&#8221;Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?&#8221; … I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.”</p>
<div align="right">— Charles Babbage, 1864<br/>discussing the first mechanical computer</div>
</blockquote>
<p>The change also comes with a price: it breaks cross-compatibility with other compilers, including older compilers on the same operating system as well as other platforms. This means the same code can&#8217;t cross-compile anymore if you use memcpy_s. <a href="http://blogs.msdn.com/sdl/archive/2008/10/22/good-hygiene-and-banned-apis.aspx">Someone with Microsoft suggested that GCC should pick up the change as well.</a> Perhaps, but that assumes that GCC is the only other compiler that matters. Certainly, it&#8217;s the <em>most popular</em> other compiler that matters, but it&#8217;s far from the <em>only</em> one especially if you do embedded systems work or anything running on &#8220;exotic&#8221; hardware. And let&#8217;s be honest&#8211;if you&#8217;re not writing something that&#8217;s fast or exotic, you&#8217;re probably not writing it in C. The exception, of course, being legacy code&#8230; but surely that&#8217;s even less likely to be changed. The whole point of legacy code is that you don&#8217;t have the time\budget to update it, otherwise you wouldn&#8217;t be running it at all. These are the guys who will wrap memcpy_s in a macro named memcpy, defeating it entirely. Sigh.</p>
<p>As for that speed difference I mentioned? We&#8217;re obviously only talking about an extra comparison operator and perhaps a branch or two here. I know an extra comparison operator seems trivial, but if an extra comparison operator didn&#8217;t matter <a href="http://www.acm.uiuc.edu/sigops/roll_your_own/2.a.html">ASSERT</a> macros wouldn&#8217;t exist. The speed difference is nominal, but it&#8217;s very, very real. On a lark I timed it. Copying 32 bytes 100,000 times with memcpy took on average 3952 counts, or about 0.001104 seconds, measured to nanosecond accuracy with QueryPerformanceCounter. Performing the identical operation with memcpy_s took on average 9706 counts, or about 0.002712 seconds. This was in &#8220;release mode&#8221; using Visual Studio 2008. (For the curious, in debug mode the difference averaged 8028 counts to 11340 counts, but you shouldn&#8217;t be shipping your code in debug mode anyway!)</p>
<p>Now hopefully you&#8217;ve done everything you can to avoid memcpy in your inner loop in the first place, but we all know there are rare occasions where it&#8217;s unavoidable. This all brings me back to my earlier point: if you&#8217;re not writing something that&#8217;s fast or exotic, you&#8217;re probably not writing it in C. <strong>Yes, you can write your own memcpy that&#8217;s probably faster than the system memcpy if you&#8217;re really worried about speed, but now we&#8217;re back to the portability issue.</strong> In short, I&#8217;m certain that to the people where the choice of language matters, those few clock cycles matter too. We&#8217;re talking folks writing device drivers here, not business applications. </p>
<p><strong>Nobody is twisting anyone&#8217;s arm to use memcpy_s.</strong> You can easily disable the compiler warnings and continue to use memcpy all you like. But hopefully you see where I&#8217;m going with this: A lot of the reason that people continue to use C for certain projects has to do with performance and portability. This change sacrifices both for dubious return. If the change is not going to have tangible benefits that outweigh the problems, why do it at all? </p>
<p>Sooner or later, you need to trust that the programmer knows what they are doing. If the programmer can&#8217;t manage memory responsibly, you&#8217;ve got a bigger problem than an extra parameter is going to fix. To be honest, while a lot of people don&#8217;t like to admit it programmers sometimes leak or botch memory <a href="http://developers.slashdot.org/article.pl?sid=07/11/17/0552247">even in managed languages.</a> There&#8217;s certainly a thesis paper or two in &#8220;possible alternatives&#8221; to the approach taken&#8211;perhaps checking the block size by querying the allocator instead of asking the programmer which would be even slower but more reliable, borrowing ideas from double entry accounting, etc, etc.&#8211;although the &#8220;real&#8221; fix surely involves more intelligent ways of thinking about memory, <strong>which realistically means a fundamental change in constructs, not a patched function.</strong></p>
<p>As always, <a href="http://xkcd.com/">XKCD</a> sums it up best (panel #2): </p>
<p><img src="http://imgs.xkcd.com/comics/well_2.png" alt="XKCD" /></p>
<p>Ah, I wait for the day&#8230; <img src='http://www.independentdeveloper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/05/22/memcpy_s/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sculpted Prim Wine Glass</title>
		<link>http://www.independentdeveloper.com/archive/2009/04/02/sculpted-prim-wineglass</link>
		<comments>http://www.independentdeveloper.com/archive/2009/04/02/sculpted-prim-wineglass#comments</comments>
		<pubDate>Thu, 02 Apr 2009 21:56:55 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[3D Tutorials]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Second Life]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[ac3d]]></category>
		<category><![CDATA[sculpted prim]]></category>
		<category><![CDATA[sculpty]]></category>
		<category><![CDATA[second life]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wine glass]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=444</guid>
		<description><![CDATA[A wine glass is one of the first things most people make when they learn to use a 3D program. It&#8217;s fun and it&#8217;s easy. Making a sculpted prim wine glass for Second Life is equally fun. In fact, it&#8217;s almost exactly the same except you need to UV map it before you upload it. [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.inivis.com/playmovie.php?name=tutorials/cup.mov">wine glass </a>is one of the first things most people make when they learn to use a 3D program. It&#8217;s fun and it&#8217;s easy.</p>
<p>Making a sculpted prim wine glass for Second Life is equally fun. In fact, it&#8217;s almost exactly the same except you need to UV map it before you upload it. A simple cylindrical map will do. Here&#8217;s a <a href="/files/wineglass.wmv">video to show you how</a> using AC3D.</p>
<p align="center"><a href="/files/wineglass.wmv"><img src="/images/wineglass_thumb.jpg" alt="Wineglass Video" /><a/><br/>Click to download video</p>
<p><strong>The step-by-step:</strong></p>
<ol>
<li>Draw a polyline that will form the outer edge of your wineglass.</li>
<li>(Optional) Use the spline tool to make your polyline into a smooth curve.</li>
<li>Revolve the polyline around the Y axis 360 degrees. The more segments you use the smoother it will be, but the more polygons. You don&#8217;t need very many polygons, so don&#8217;t overdo it.</li>
<li>Using the UV map tool, apply a cylindrical wrap around the Y axis.</li>
<li>Export!</li>
</ol>
<p align="center"><a href="/images/wineglass-uvmap.jpg" rel="lightbox"><img src="/images/wineglass-uvmap.jpg" /></a><br/>Here are the UV map settings I used.</p>
<p>When you import it into SL, be sure to set your mapping mode to cylindrical. If you don&#8217;t, the top and bottom of the glass will be solid instead of hollow.</p>
<p align="center"><a href="/images/wineglasssl.jpg" rel="lightbox"><img src="/images/wineglasssl_thumb.jpg" /></a><br/>Set the Stitching Type to Cylinder.</p>
<p><a href="/files/wineglass.zip">Download the model here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/04/02/sculpted-prim-wineglass/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AC3D Plugin: Poser Export</title>
		<link>http://www.independentdeveloper.com/archive/2009/03/30/ac3d-plugin-poser-export</link>
		<comments>http://www.independentdeveloper.com/archive/2009/03/30/ac3d-plugin-poser-export#comments</comments>
		<pubDate>Tue, 31 Mar 2009 04:17:50 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tools and Plugins]]></category>
		<category><![CDATA[ac3d]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[DAZ 3D]]></category>
		<category><![CDATA[joints]]></category>
		<category><![CDATA[Milkshape]]></category>
		<category><![CDATA[Poser]]></category>
		<category><![CDATA[PZ3]]></category>
		<category><![CDATA[rig]]></category>
		<category><![CDATA[skeleton]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=425</guid>
		<description><![CDATA[This plugin exports AC3D models to Smith Micro&#8217;s Poser PZ3 format. It also generates a WaveFront OBJ file that Poser will recognize as &#8220;grouped&#8221; surfaces. This allows you to create custom characters and props for use in your Poser scenes with AC3D, and reduces the amount of time spent in the Setup Room in Poser [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin exports AC3D models to Smith Micro&#8217;s Poser PZ3 format. It also generates a WaveFront OBJ file that Poser will recognize as &#8220;grouped&#8221; surfaces. This allows you to create custom characters and props for use in your Poser scenes with AC3D, and reduces the amount of time spent in the Setup Room in Poser grouping your surfaces.</p>
<p>Either the PZ3 or the OBJ can be used for importing a model into Poser. </p>
<p>The PZ3 is &#8220;pre-rigged&#8221; using the AC3D hierarchy as the skeleton and the AC3D object centres as the joint pivots. The PZ3 allows you to see working joints right away, but obviously the joints won&#8217;t be weighted as nicely as if you did it by hand. For this reason, I&#8217;d recommend starting with the OBJ file and building your skeleton in the Poser setup room instead unless your final output is a game engine or something else where Poser&#8217;s blend weights don&#8217;t matter. Like the Milkshape plugin, the Poser plugin supports null pivots. Any mesh in AC3D named &#8220;NULL_[whatever]&#8221; is treated as a null pivot so you can do &#8220;fancy&#8221; rigs if you need to. There are additional instructions in the readme.txt included with the plugin.</p>
<p><a href="http://www.independentdeveloper.com/files/poserexport.zip">Download the plugin. (Requires Windows XP, AC3D 6.2 or above, Poser 6.0 or above.)</a></p>
<p align="center"><a href="/images/atomizer-render.jpg" rel="lightbox" title="Displacement Mapper"><img src="/images/atomizer-render_thumb.jpg" /></a></p>
<p>I&#8217;ve also built a sample file in case you need a working example of how to build your model.</p>
<p><a href="http://www.independentdeveloper.com/files/atomizer.zip">Download the sample model.</a></p>
<p>In the sample, I&#8217;ve taken the perfume atomizer that comes in the AC3D stock model library. (You can load the original by clicking File > Library inside of AC3D and loading it from the samples folder.) I&#8217;ve re-rigged the atomizer so it can animate, then exported it using the Poser plugin. After import into Poser, I applied my materials, set the lights and tweaked the skeleton. All of the files are included so you can see each step.</p>
<ul>
<li>atomizer-rigged.ac &#8211; the rigged version of the atomizer from the AC3D library.</li>
<li>antomizer-rigged.pz3 &#8211; the unedited poser file exported by the plugin (yes, I realized belatedly I spelled it wrong, but I didn&#8217;t want to fix all the file links, doh)</li>
<li>atomizer-final.pz3 &#8211; the final file in poser, with materials applied and joint limits, etc., set</li>
</ul>
<p>If you&#8217;re into building Poser models in AC3D, I would also recommend Dennis&#8217;s <a href="http://www.supercoldmilk.com/ac3dplug/pmt.html" target="_external">Poser Morph Target Assistant</a>. The morph target assistant, as the name implies, will allow you to add morph targets to your Poser figures.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/03/30/ac3d-plugin-poser-export/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Send Me a Newsletter</title>
		<link>http://www.independentdeveloper.com/archive/2009/03/30/how-to-send-me-a-newsletter</link>
		<comments>http://www.independentdeveloper.com/archive/2009/03/30/how-to-send-me-a-newsletter#comments</comments>
		<pubDate>Mon, 30 Mar 2009 18:33:50 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[newsletter]]></category>
		<category><![CDATA[phish]]></category>
		<category><![CDATA[phishing prevention]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[subject]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=396</guid>
		<description><![CDATA[Like most people, I get waaaaaay too much e-mail. Between some crazy deadlines, out-of-town conferences and wiping out my primary desktop machine, I&#8217;ve been offline for a couple of weeks and boy-oh-boy have the messages piled up. [If you're waiting for a reply from me on something, I promise I haven't forgotten you. I'm still [...]]]></description>
			<content:encoded><![CDATA[<p>Like most people, I get waaaaaay too much e-mail. Between some crazy deadlines, out-of-town conferences and wiping out my primary desktop machine, I&#8217;ve been offline for a couple of weeks and boy-oh-boy have the messages piled up. <em>[If you're waiting for a reply from me on something, I promise I haven't forgotten you. <img src='http://www.independentdeveloper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I'm still re-installing and it's going to take me a few more days to dig my way out.] </em></p>
<p>While I don&#8217;t subscribe to nearly as many newsletters as I used to &#8212; most of my news-ish stuff comes in the form of RSS feeds these days &#8212; I still subscribe to a few. Here are some tips if you&#8217;re writing a newsletter that will decrease the odds that I&#8217;ll delete it without reading it:</p>
<ul>
<li><strong>Don&#8217;t change your &#8220;from&#8221; address.</strong> I white-list only those newsletters I want. If you change your address without telling me first, your newsletter will be deleted as spam and I won&#8217;t even know it.</li>
<li><strong>If you must change your e-mail address, tell me <em>before</em> you change it.</strong> Sending me a &#8220;we&#8217;ve changed our address&#8221; message from your new address is an instant FAIL. I&#8217;ll miss it because your new address isn&#8217;t white-listed. I can&#8217;t believe how many people don&#8217;t think about this one.</li>
<li><strong>A unique per-user ID in the subject line helps me tell your newsletter apart from <a href="http://en.wikipedia.org/wiki/Phishing" target="_external">phishes</a></strong> that look just like it. If I get too many phishes impersonating your newsletter, I&#8217;ll probably just unsubscribe it. I know it&#8217;s not your fault, but I don&#8217;t have the time to spend sorting out the fakes. A unique per-user ID in the subject is a very fast, easy way to make it obvious which messages are probably real and which are almost certainly fake. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/03/30/how-to-send-me-a-newsletter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming is Like a Dream</title>
		<link>http://www.independentdeveloper.com/archive/2009/03/17/programming-is-like-a-dream</link>
		<comments>http://www.independentdeveloper.com/archive/2009/03/17/programming-is-like-a-dream#comments</comments>
		<pubDate>Tue, 17 Mar 2009 20:09:37 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=361</guid>
		<description><![CDATA[Have you ever noticed that computer programmers are very easy to startle? Walk up behind an accountant or a web designer sketching out banner ads, and nine times out of ten they&#8217;ll know you&#8217;re coming from a mile away. But computer programmers aren&#8217;t like that. You can stand right behind a programmer for ten minutes [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Have you ever noticed that computer programmers are very easy to startle?</strong> Walk up behind an accountant or a web designer sketching out banner ads, and nine times out of ten they&#8217;ll know you&#8217;re coming from a mile away. But computer programmers aren&#8217;t like that. You can stand right behind a programmer for ten minutes and quite often they will not even know you are there&#8211;especially when they are working on a difficult section. The larger the system, the deeper the trance. </p>
<p>I just read two <a href="http://ninjamonkeys.co.za/2009/03/17/how-software-developers-work/" target="_external">fantastic essays</a> describing programming as a <a href="http://alexthunder.livejournal.com/309815.html" target="_external">dream-like state</a>. I&#8217;d never thought of it this way before, but I&#8217;d have to say that&#8217;s the most dead-on accurate description I&#8217;ve ever heard.</p>
<blockquote><p>Now, imagine you were in deep sleep, dreaming away about apples at 3am, and I came bashing into your room and said “Sorry, but we need you to dream about bananas now.” Do you think you could go straight back to sleep in a few seconds, dream about bananas for a bit, and then jump back to your original dream about apples? No, of course not, but this is what managers expect when they throw new tasks at us while we’re busy coding the first one. When this happens we’ve lost the hours we’ve spent on the first dream, we’re completely lost for half an hour, and then we eventually manage to get into the new dream.</p>
<div align="right"><em><a href="http://ninjamonkeys.co.za/2009/03/17/how-software-developers-work/">&#8211;How Software Developers Work</a></em></div>
</blockquote>
<p>This is very true. It takes a little while to &#8220;shift gears&#8221;. For small programs, it&#8217;s not so bad, because you can conceptualize the whole thing in a few minutes or seconds. For large systems it takes longer to get yourself back into the right frame of mind. You have to think about all the things you were thinking about when you put it down last, and this is often a lot harder than it sounds. <strong>There&#8217;s a small time penalty that&#8217;s paid every time a programmer sits down to work, but it&#8217;s only paid once per session.</strong> This is why a lot of programmers prefer to work in one long stretch instead of several short ones. In six 30 minute stretches, zero code will get written&#8211;zero <em>good</em> code, anyway&#8211;because you spend the entire time just getting started. In one three hour stretch, however, you might just compose a masterpiece. </p>
<p>I can sit down and start coding right away, but I don&#8217;t really &#8220;hit my groove&#8221; for an hour or two. Sometimes I try to accelerate that by leaving myself a thread the day before. I&#8217;ll intentionally not finish a block of code I was working on, but I&#8217;ll leave myself copious notes on how to write it so that when I sit down in the morning I can start right away on that block. In the morning I don&#8217;t really have to think about the block too much because the answer is right there, but by-and-by as I code it up the thoughts start rushing back to me. By the time I&#8217;ve finished writing the block, my head is where it needs to be and I can pick it up from there. Sometimes if the code is very complex I just keep thinking about the code until morning. Most programmers can and will do this, too. Some perhaps can&#8217;t hold onto the code for days or weeks, but virtually all can for a few minutes or even a couple of hours. </p>
<p>I know it sounds strange, but think of it this way: Have you ever had a dream that lingered? You know, when you have a nightmare or other intense dream, and it keeps coming back to you while your doing other things throughout the day? Your mind is still dreaming the dream even though you are awake, and you can feel it back there drifting around. Keeping code in your head feels very much the same way. </p>
<p><strong>There&#8217;s a right and a wrong way to interrupt a programmer. The best answer is &#8220;don&#8217;t&#8221;. But if you must&#8230;</strong> If you think about programming like dreaming, you&#8217;ll realize that programmers remember more if you interrupt them gently than if you barrage them. If someone wakes you out of bed and starts shouting a long list of things at you to remember, you&#8217;ll almost certainly forget what you were dreaming. However, if someone shakes you gently and gives you a few seconds to open your eyes and look around before they start talking, it&#8217;s a lot easier to remember the dream for later. The same works for programmers. If you just walk into their office and start talking, one of two things will happen: they&#8217;ll completely forget what they were coding, or they won&#8217;t really be paying attention to you. However, if you quietly walk up to them and let them know you are there but <em>say nothing until they are ready,</em> the programmer can come to the end of the thought they are on. Once they&#8217;ve finished their thought, it will be easier for them to pick up next time and still pay attention to what you have to say.</p>
<blockquote><p>Let&#8217;s take a maze for example. There is a task for the programmer to come up with an algorithm of finding the way out of the maze. When a programmer is working on this task he isn&#8217;t just a God&#8217;s Finger showing the directions to a little girl lost in a great maze. He isn&#8217;t that girl or the walls of a labyrinth either. He is actually all of that in a same time. In order to solve the task he must BECOME the labyrinth, the walls, the lost little girl and whatever else may just came along with it. It is not a figure of the speech &#8211; the programmer is literally SLEEPING and DREAMING that all in his mind.
<div align="right"><em><a href="http://alexthunder.livejournal.com/309815.html">&#8211;Don&#8217;t Wake Up the Programmer</a></em></div>
</blockquote>
<p><strong>My brother contends that it is this same phenomena that makes programmers so bad at estimates.</strong> The problem is, as he says, that the programmer <em>already knows everything that needs to be written.</em> When you have it all in your mind, it seems like it should be easy to write it all down. But it&#8217;s not. The physical act of writing the code takes a long time. But more importantly, your mind never thinks about all the &#8220;meaningless&#8221; details. It knows how to code them so well it doesn&#8217;t even need consider their existence anymore. Unfortunately, the computer still needs them. It can&#8217;t infer. All those loose ends, niggling details and corner cases end up eating a great deal of time&#8230; sometimes more than the rest of the program. </p>
<p>How does programming feel to you? What is your experience like?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/03/17/programming-is-like-a-dream/feed</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>
