<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<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/"
	>

<channel>
	<title>Programming Matters</title>
	<link>http://programmingmatters.com</link>
	<description>My thoughts on all things technical, programming and otherwise</description>
	<pubDate>Sat, 23 Jun 2007 15:49:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Programmer Paradigms and Programmer Audiences</title>
		<link>http://programmingmatters.com/2007/06/21/programmer-paradigms-and-programmer-audiences/</link>
		<comments>http://programmingmatters.com/2007/06/21/programmer-paradigms-and-programmer-audiences/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 20:55:23 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/programmer-paradigms-and-programmer-audiences/</guid>
		<description><![CDATA[I have been reflecting a lot on the age old question of the &#8220;optimal&#8221; programming language for a while now.  First I&#8217;ll issue the usual disclaimers about apples and oranges and how they need to be fit appropriately to the problems they need to solve.  But more than anything else one thing stands [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reflecting a lot on the age old question of the &#8220;optimal&#8221; programming language for a while now.  First I&#8217;ll issue the usual disclaimers about apples and oranges and how they need to be fit appropriately to the problems they need to solve.  But more than anything else one thing stands true.  This one thing I rarely see mentioned:</p>
<p>The optimal programming language is the one the programmers who will be using it are best suited to.</p>
<p>This doesn&#8217;t mean that it&#8217;s the one they already know.  This means it&#8217;s the one that matches their skill level and the way they think.  It&#8217;s more important to match up the language with the programmer than the problem that is being solved or any other criteria.  There has been a lot of talk lately about &#8220;bondage and discipline&#8221; languages, dynamic typing and expressive power in programming languages.  People think in different ways for different reasons.  People have different skillsets.  And others can be productive in an environment with rules and can create spaghetti in one without.</p>
<p>If I had a small team of top-notch programmers I would love to fully embrace and use a language like lisp or a purely functional language.   That being said I have worked with a large number of programmers who can&#8217;t understand the basics of object oriented programming.  They know the syntax but klduge the code into something that grinds to a halt and is unmanageable very quickly.  The thought of the meta-languages those same programmers would create in lisp send shivers up my spine.</p>
<p>I hear a lot of crap about &#8220;the heat and the kitchen&#8221; and &#8220;if you don&#8217;t have the highest quality programmers you are doomed to failure&#8221;.  Frankly that is pure crap.  A certain percentage of programmers are &#8220;beyond repair&#8221;.  But a large number of programmers are extremely solid when in the right environment.  Frankly they need more structure and less wiggle room.  And then maybe 1  in 10 programmers is the type that can be given full range to &#8220;be trusted&#8221; to use the full set of programming paradigms in any way they see fit.  It may seem a little heavy handed, but show me any experienced team lead who disagrees.</p>
<p>Personally I find &#8220;bondage and discipline&#8221; languages to be best suited to the real world.  We&#8217;ve all heard the statement &#8220;Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.&#8221;   That statement is almost correct.  I would redact that statement to the following &#8220;Any sufficiently complicated and well engineered program contains an implementation of Lisp.&#8221;  The first statement simply isn&#8217;t true by itself because,if nothing else, many implementations of Lisp have been written in C.  &#8220;ad hoc, informally-specified, bug-ridden, slow&#8221; - these added bits certainly don&#8217;t have to be the case.</p>
<p>I&#8217;ve done a lot of game programming in the past.  A very common technique is to have the core in C++/C and have a scripting language sit on top of it.  Often times it&#8217;s LUA or a Javascript-like language. The programming teams working on the scripting languages vs. the core C++/C code are different groups.</p>
<p>Design patterns are another way of embedding these principles in the language that&#8217;s being used.  You often hear, &#8220;Design patterns! - those are bad smells!  The programming language is insufficient - this is the only reason the design patterns are important&#8221;.  I disagree. Design patterns may involve &#8220;wordier&#8221; constructs than a language that supports those concepts natively.  This involves less expressive languages having more lines of code to express the same concepts.  This part always makes me laugh.  I don&#8217;t care what the programming language is - the number one problem I have seen again and again is TOO MUCH CODE and not enough THINKING. I&#8217;m not talking about lines of code - I&#8217;m talking about code control points or cyclomatic complexity.  Your XP junkie would cry foul but some programmers should learn using a punch card type mentality.  Once they have mastered their craft only then should they be able to rebuild and modify &#8220;on instinct&#8221;. Carpal tunnel syndrome should never be a programmers fear.</p>
<p>I have worked with C code that was object oriented.  Yes, I can hear you coughing.  It is wordier than any language that embraces some form of OO but it can be done.  And once it&#8217;s done it isn&#8217;t that terrible.  Encapsulation using static inside compilation units, function pointer tables and a system to manage it, the whole 9 yards.  Turing complete is turing complete.</p>
<p>Sometimes creating a barrier to entry to implementing more advanced concepts can be a good thing.</p>
<p>How many languages could be an optimal number to have at our disposal?  With all considerations taken - hiring new coders, etc., etc.  Some contenders based on popularity, power and potential include ones from several camps:</p>
<p>1.  Java/C# - These guys are today&#8217;s C++.  And they pretty much shine for the same reasons.   Any good programmers you hire will be able to code in them with reasonable proficiency.</p>
<p>2. Lisp and it&#8217;s spawns - These guys seem great for that core of coders that will be building domain specific languages and need the expressive power.  It&#8217;s hard to find  programmers that will do it justice (as opposed to kludge up something truly clumsy), but when you do you will have some terse truly elegant code that is both flexible and powerful.  But throw the code into a normal pool of programmers and they will beg to rewrite it in Java/C#.  So definitely don&#8217;t do that.</p>
<p>3. Javascript - Sure it&#8217;s Lispy.  But it is stands apart because of its ubiquity.  You can find plenty of coders who think they can do it justice.  And under constrained environments they may be right.</p>
<p>4. Truly functional languages - Haskell, etc.  - I&#8217;ll be frank.  I really can&#8217;t say I fully grok the trade-offs with these languages.  I definitely don&#8217;t see these languages ever going mainstream simply because of the difficulty in finding people to use them appropriately.   In certain domains they will rule, in others they will simply be overkill.</p>
<p>Those languages seem to have strong enough support and be sufficiently different to justify their utility.</p>
<p>That being said a lot of the conclusions I have come to are based on &#8220;justified&#8221; instinct based on my background.  The languages I&#8217;ve coded in extensively since 1982 include (chronologically) 6502 machine language, &#8220;Bill Gates&#8221; Basic, Borland&#8217;s Turbo Pascal, 80&#215;86 assembler, C, C++ and C#.  I have also done some commercial projects in Visual Basic, PHP, Java, and Javascript .  I have written code for a large number of languages but my career has involved those listed above.</p>
<p>I feel that in today&#8217;s world specialization is in order.  Programmers should be able to choose different tracks and learn different languages in school and for their careers.  We draw a distinction between digital logic design and programming languages.  I think we should also break programming into specialties.</p>
<p>The programming paradigm should fit the programming audience (those who code to it).  Like math or any science, programming is becoming a broad enough discipline that specialization is needed.  After all, would you want your brain surgery performed by any doctor?  I wouldn&#8217;t think so.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/06/21/programmer-paradigms-and-programmer-audiences/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programmers as Drivers on the Highway:Lisp / Ruby / Javascript / etc. vs. Java / C# / C++ / etc.</title>
		<link>http://programmingmatters.com/2007/05/22/programmers-as-drivers-on-the-highwaylisprubyjavascriptetc-vs-javaccetc/</link>
		<comments>http://programmingmatters.com/2007/05/22/programmers-as-drivers-on-the-highwaylisprubyjavascriptetc-vs-javaccetc/#comments</comments>
		<pubDate>Tue, 22 May 2007 23:01:38 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/programmers-as-drivers-on-the-highwaylisprubyjavascriptetc-vs-javaccetc/</guid>
		<description><![CDATA[Preface:
Please read Programming Paradigms and Programmer Audiences for a more through explanation of the metaphor below.
Driving:
Freedom&#8230;..

I know how fast I can safely drive and don&#8217;t need a speed limit to govern this.
I should be able to make a u-turn on the highway if I need to.
If there are no oncoming cars at a red light [...]]]></description>
			<content:encoded><![CDATA[<p>Preface:</p>
<p>Please read Programming Paradigms and Programmer Audiences for a more through explanation of the metaphor below.</p>
<p><strong>Driving:</strong></p>
<p><strong>Freedom&#8230;..</strong></p>
<ol>
<li>I know how fast I can safely drive and don&#8217;t need a speed limit to govern this.</li>
<li>I should be able to make a u-turn on the highway if I need to.</li>
<li>If there are no oncoming cars at a red light I  should be able to drive through.</li>
<li>When there is space to park right in front of my destination and its not marked as a parking space, parking lot spaces are truly inconvenient.</li>
<li>Turn signals aren&#8217;t useful for someone who is paying attention.</li>
<li>A driver&#8217;s license doesn&#8217;t actually help me drive any better.</li>
<li>I&#8217;m aware of my car and don&#8217;t need to have it inspected constantly in order to know it running properly.</li>
<li>Having tags on my car isn&#8217;t useful to me - if I commit a driving violation pull me over and I&#8217;ll give you that information.</li>
</ol>
<p>I am clever enough and good enough to master all of these things.</p>
<p><strong>Constraints&#8230;&#8230;.</strong></p>
<p>People are inconvenienced by them.</p>
<p>However,</p>
<ol>
<li>I feel safer knowing others have to obey the speed limit.</li>
<li>I don&#8217;t want people making u-turns on the highway.</li>
<li>People driving through red lights are accidents waiting to happen.</li>
<li>Parking spaces don&#8217;t impose perfect order by any means, but the order they do impose is good enough to prevent parking congestions.</li>
<li>Turn signals are reassuring because it seems like no one is paying attention.</li>
<li>Having a drivers license makes certain things more uniform and less arbitrary.</li>
<li>If people weren&#8217;t required to get their cars inspected the road would be a dangerous place.</li>
<li>People feel accountable with tags on their cars, they are more likely to play by the rules and abide by their contracts.</li>
</ol>
<p>I don&#8217;t feel people are clever enough and good enough to master all of these things without rules.<br />
<strong>Programming:</strong></p>
<p><strong>Freedom&#8230;&#8230;&#8230;</strong></p>
<ol>
<li>Rapid code generation and prototyping gets things up and running faster.</li>
<li>Lambda functions make it possible to elegantly solve some otherwise difficult problems.</li>
<li>If I know it is safe I should be able to do it &#8230;. period.</li>
<li>I should be able to organize data and code any way I&#8217;d like, flexibility and true macros are a good thing.</li>
<li>If I call a function it will see what I&#8217;m passing when it gets there - signature signaling is gratuitous.</li>
<li>I don&#8217;t need formal class definitions&#8230;.. I&#8217;m not sure what the point is.</li>
<li>Compile time checking is pointless - run time checking does it all.</li>
<li>Static typing enforces rules that would be enforced anyways.</li>
</ol>
<p>I feel I am clever enough and good enough to master all of these things.</p>
<p>However,</p>
<p><strong>Constraints&#8230;&#8230;.</strong></p>
<ol>
<li>So people create some truly terrifying prototype code.</li>
<li>Some people find lambda functions difficult to grok.</li>
<li>A lot of people will shoot themselves in the foot if handed a gun</li>
<li>Programmers can create some truly obscure metalanguages, and given the flexibility create masterpieces in obfuscation</li>
<li>When functions have explicit contracts they are more likely to at least try and follow them</li>
<li>Formal class definitions make it easier for most people to understand what is going on.</li>
<li>No matter how much you test you probably haven&#8217;t tested enough.</li>
<li>Static typing makes people more aware of what the rules and contracts actually are.</li>
</ol>
<p><strong>How do I think I drive:</strong></p>
<p>I&#8217;m streamlined, clever and carefree.  I bend the rules when I can to get the most flexibility I can.</p>
<p><strong>How do I really drive:</strong></p>
<p>Sometimes those rules and regulations really save me.  And I am extremely glad they are there for others.  There are some idiots on the road.</p>
<p><strong>SOLUTION:</strong></p>
<p>Why won&#8217;t these idiots just get off the road (not going to happen).</p>
<p>If programmers aren&#8217;t up to the tricky stuff they should be coding (not going to happen).</p>
<p><strong>REALITY:</strong></p>
<p>Everyone obeys the rules but bends them when they can to get the flexibility they need.</p>
<p>Languages need to support multiple paradigms to truly be safe and useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/05/22/programmers-as-drivers-on-the-highwaylisprubyjavascriptetc-vs-javaccetc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>24 years of game programming: thrills, chills and spills: part 3 of 3</title>
		<link>http://programmingmatters.com/2007/05/15/24-years-of-game-programming-thrills-chills-and-spills-part-3-of-3/</link>
		<comments>http://programmingmatters.com/2007/05/15/24-years-of-game-programming-thrills-chills-and-spills-part-3-of-3/#comments</comments>
		<pubDate>Wed, 16 May 2007 02:37:23 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Game Industry]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/24-years-of-game-programming-thrills-chills-and-spills-part-3-of-3/</guid>
		<description><![CDATA[If you haven’t read the first and second parts of this article, you’ll probably want to check them out here and here.

So I was working with a company that did 3D development for games!  It was 1998 and things were still fresh and new in that area.  The three API&#8217;s of mention were [...]]]></description>
			<content:encoded><![CDATA[<p><em>If you haven’t read the first and second parts of this article, you’ll probably want to check them out <a href="http://eureka3d.com/blog/?p=22">here </a>and <a href="http://eureka3d.com/blog/2007/24-years-of-game-programming-thrills-chills-and-spills-part-2/">here</a>.<br />
</em></p>
<p>So I was working with a company that did 3D development for games!  It was 1998 and things were still fresh and new in that area.  The three API&#8217;s of mention were Glide, Direct 3D and OpenGL.  I was working with some amazing artists and programmers and was glad to be learning more about the ins and outs of 3D development and tools.  This was my first taste of a scene graph using Paradigm Entertainment&#8217;s Viskit.  Scene Graphs are amazing things - and I was learning everything I could.  Viskit was based on SGI&#8217;s Performer and like OpenGL - they had done something really, really right when crafting this API.  Viskit sat effortlessly on top of OpenGL or Direct3D.  I ended up working quite a bit on our Multigen loader to get all the bells and whistles supported.  We used Max for our prerendered scenes but at this point Multi-Gen creator was huge in developing real-time models.  It was a great app that made both programmers and artists feel immediately at home.  Scene Graph nodes could be mapped very easily to Multi-Gen nodes.  It was a perfect match.</p>
<p>As usual my dedication ran high.  I was able to entice a truly stellar programmer from my time in NJ to live with me a significant portion of the month so he could code on the team as well.  I worked with two artists that two this day I have to say are second to none. We created an amazingly beautiful world with truly stunning environmental effects.  It was enthralling.  In the end though small companies with only one project are fraught with peril.  In 2000 Aeon closed it&#8217;s doors and my love for Viskit took me to my next job at console developer Paradigm Entertainment.  They had built a version of Viskit that ran on all the next-gen consoles including the X-Box, Game Cube, PS/2 and even the dreamcast.  It could still be baselined on the PC as well. This was my first time working with consoles - a fixed format machine, finally!<br />
It was now 2000 and I found myself in Dallas, Texas,  In typical game industry fashion several weeks after joining Paradigm they sold themselves to Infogrammes.  However, they still were able to call their own shots for my time at the company.  It was awesome having 3 or 4 teams working with 3D technology for multiple consoles.  This technology was developed by a dedicated core technology group - I hadn&#8217;t been lucky enough to work with a company big enough to have this luxury before.  They were the think tank of the company always getting all the heavy pressures but coming up with some truly stunning innovations.  All of our artists were using Maya - which worked well, it supported a group hierarchy for scenes like Multi-Gen creator had previously.</p>
<p>Consoles are truly outstanding beasts to develop for.  In all the years of working on the PC I had always dreamed of being able to develop for fixed platforms.  You could know that once your testing was done it was good to go - no surprises based on machine configurations later in the pipeline.  C++ was still the defining factor in game programming, although plenty of PS/2 code was written in Microcode as well.  Common acceptance of scripting languages for high level prototyping was still a few years off.  The best part about working at Paradigm was access to resources.  When teams ramped up they could have 8-10 artists and almost as many coders.  Things could really come together fast.<br />
2003 found me back in Virginia where I started working for ITSpatial - a company that  did 3D representations of cities a la Google Earth &#8230; before Google Earth had been around.  In fairness there was Keyhole, but what ITSpatial offered was a different kind of thing all together.  ITSpatial built a product that provided data integration and fusion in an environment that supported 2D and 3D mapping.  This was perfect for command and control applications, situational awareness and emergency training.  It was really one big serious game and had many of the elements of a full fledged game development effort and content production pipeline.  The only thing difference was the price point of the product and the number of shipping units.</p>
<p>ITSpatial was strong and knew a lot about sales and business development.  They were phenomenal sales people.  I will always be amazed at how effortlessly they were able to get potential clients in the building, looking at demos - 3 or 4 times a week some weeks.  They really were devoted to finding and wooing clients.  This is a skill I&#8217;ve still got a long way to go on.  I guess in some ways I&#8217;m still 100% a programmer at heart:)</p>
<p>In 2005 I broke away and this time started my own company Eureka 3D, Inc.  I&#8217;m more of a hired gun/contractor with the luck to have access to a lot of other proven hired gun contractors. Eureka3D has worked on entertainment 3D, GIS and I&#8217;ve really boned up on my web programming skills in the last two years.  Deep down inside I&#8217;m still wanting to get back &#8220;into the game&#8221; and sink my teeth into that big 2 year development project.  Right now my pipeline is very full and I really am enjoying what I&#8217;m doing - so no complaints!</p>
<p>Here we are in 2007.  What have I learned from the game and serious game industry after all these years?  So much&#8230; I&#8217;ve worked with top notch programmers, others who couldn&#8217;t program their way out of a paper bag; I&#8217;ve worked with great artists, and a young up and coming project manager who was one of the sharpest guys I&#8217;ve ever met.  I&#8217;ve worked with some truly genius biz-dev types that knew how to sell and pitch to clients.  In 24 years every theory on project management for software/hardware/games has been debated, turned over and debated again much to my chagrin.  I&#8217;ve seen every element of the business from pitching the contracts, building proof of concepts to final testing and delivery/deployment/distribution.  I&#8217;ve learned a thing or two about politics and how important it is to avoid if at al possible.  I&#8217;ve literally seen programmers in drop-down, drag out fights (visiting programmers from another company no less!).  Religious wars over version control systems, graphics api&#8217;s, and taking on the latest new technology - been there, seen that.<br />
The main thing I&#8217;ve learned however is that I thrive on the high-intensity, creative, ingenius environment that games and serious games involve.  Finding a team that works well together, or a few truly brilliant individuals makes it all so worth while.  I know I want to keep raising the bar and never lose the adventure.  Because in the end it&#8217;s about the product, the team, and the experience. What an amazing 24 years it&#8217;s been!</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/05/15/24-years-of-game-programming-thrills-chills-and-spills-part-3-of-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Top 10 Attributes of a Great Programmer</title>
		<link>http://programmingmatters.com/2007/02/05/the-top-10-attributes-of-a-great-programmer/</link>
		<comments>http://programmingmatters.com/2007/02/05/the-top-10-attributes-of-a-great-programmer/#comments</comments>
		<pubDate>Mon, 05 Feb 2007 08:25:14 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/the-top-10-attributes-of-a-great-programmer/</guid>
		<description><![CDATA[With all the latest attention again on what does and doesn&#8217;t make a good programmer, I couldn&#8217;t help but put together my own top 10 list.


Being a great problem solver.
Being driven and lazy at the same time.
Ability to understand other people&#8217;s code
Having a passion for programming
Loving learning for the sake of learning
Being good at math
Having [...]]]></description>
			<content:encoded><![CDATA[<p>With all the latest attention again on what does and doesn&#8217;t make a good programmer, I couldn&#8217;t help but put together my own top 10 list.</p>
<p><img align="right" id="image29" alt="The Thinker" title="The Thinker" src="http://eureka3d.com/blog/wp-content/uploads/2007/02/Thinker.jpg" /></p>
<ol>
<li>Being a great problem solver.</li>
<li>Being driven and lazy at the same time.</li>
<li>Ability to understand other people&#8217;s code</li>
<li>Having a passion for programming</li>
<li>Loving learning for the sake of learning</li>
<li>Being good at math</li>
<li>Having good communications skills</li>
<li>Strong debating skills</li>
<li>Extreme optimism</li>
<li>Extreme pessimism</li>
</ol>
<ol />After putting together this list some aspects surprised me, and I was the one who put together the list.  So let me explain each in detail.These attributes describe those I&#8217;ve found in pretty much every great programmer I&#8217;ve come across.  There were a number that fell through the cracks and I&#8217;ll explain those later.</p>
<ol>
<li>Being a great problem solver - Hopefully everyone recognizes this one.  Most good programming is all about being able to find solutions where others can&#8217;t see them.  If you don&#8217;t have this skill the others matter far less.</li>
<li>Being driven and lazy at the same time - This one surprises some people.  Programmers question things and are often &#8220;too lazy&#8221; to take the long route.  The will spend countless cycles trying to simplify the problem and simplify their task.  That said they having a burning need to get the job done, they just want to do it as efficiently as possible.</li>
<li>Ability to understand other people&#8217;s code - This point is essential but cuts some good programmers off from being great programmers.  It doesn&#8217;t matter how well you can rewrite everything yourself - you need to be able to work with other people&#8217;s code on existing projects, lean on opensource in new projects, and learn good techniques from the code base that is already out there.</li>
<li>Having a passion for programming - on some level you have to love programming for programming&#8217;s sake.  I suppose to be truly great at anything you have to love it in most cases.</li>
<li>Loving learning for the sake of learning - Programming is a moving target.  Unless you love the art of edification you will sink fast.  There are no laurels to rest on and no one cares what you did yesterday.  Unless you are aware of the techniques on the horizon, you won&#8217;t be ready to embrace them when they become relevant.</li>
<li>Being good at math - Different people will have different opinions here - but at the very least having a strong grip on pre-Calculus math.  I&#8217;ve never seen a great programmer without a solid grasp of at the very least algebra and trig.</li>
<li>Having good communications skills - This doesn&#8217;t mean that they can communicate with anyone and everyone.  Specifically this means that they are able to clearly express their thoughts on their own terms.  I&#8217;ve met plenty of great programmers who couldn&#8217;t communicate well with the world at large. However, given someone to talk to who understands the problem domain, they were all able to clearly state the problem and the solutions proposed.</li>
<li>Strong debating skills - This follows the same logic as #7.</li>
<li>Extreme optimism - Great programmers I have encountered have an insane certainty they can get the job done once they have chewed on it a bit.</li>
<li>Extreme pessimism - Great programmers I have encountered have an insane insistence that when they lack the information needed to make a good judgment that they won&#8217;t be able to make one at all.</li>
</ol>
<p>Some of the things I <em>instinctively wanted</em> to put on the list but <strong>couldn&#8217;t say were true</strong> of at least 95% of great programmers include the following:</p>
<ol>
<li>Being extremely organized - Understanding when and where organization is important, yes.  But anal attention to detail is something present in great programmers as often as it is people in other disciplines.</li>
<li>Being good at managing other people and or programming projects - Somehow these skill sets are wonderfully synergistic when they sit side by side, but management and programming are often completely different disciplines.</li>
<li>Being able to write good design documents - Same as #2.  This skill may make some people better programmers and I am in favor of learning it.  However, plenty of great programmers I have encountered couldn&#8217;t write a coherent design doc if their life depended on it.  This will know doubt be debated by heavily by some.</li>
<li>Having an ability to estimate time frames - Once again like #2.  This is an acquired skill and a very useful one.  However, I have seen absolutely zero correlation between great programmers and estimation skills.</li>
<li>Prolific reading of tech books - I do this all the time myself, but many great programmers don&#8217;t.  Let me be clear though - most programmers who aren&#8217;t all that hot could definitely benefit from bootstrapping their skills with some good reading.</li>
<li>Ability to transfer their programming skills to any programming domain - Although many can, some great programmers can&#8217;t, or refuse to, grok other programming technologies.  I like to think that this is a &#8220;refuse to&#8221; situation.</li>
<li>Write code that is correct the first time around - Many great programmers commonly have syntactic issues flagged by compilers or at runtime interpretation.  Some are zealots about the details the first time out, others are much more &#8220;extreme&#8221; in this area.</li>
<li>Having other areas of great skills - some great programmers are good at only one thing - programming.</li>
<li>Social or antisocial - Great programmers come in both forms.</li>
<li>Are someone you&#8217;d want on you team - Unfortunately some of them just can&#8217;t work with others well.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/02/05/the-top-10-attributes-of-a-great-programmer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wonderful Blogs, Evil Splogs and Now Entertaining Clogs&#8230;.</title>
		<link>http://programmingmatters.com/2007/01/26/wonderful-blogs-evil-splogs-and-now-entertaining-clogs/</link>
		<comments>http://programmingmatters.com/2007/01/26/wonderful-blogs-evil-splogs-and-now-entertaining-clogs/#comments</comments>
		<pubDate>Sat, 27 Jan 2007 00:44:50 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/wonderful-blogs-evil-splogs-and-now-entertaining-clogs/</guid>
		<description><![CDATA[Wonderful (web)blogs, evil sp(am)logs and now entertaining c(orporate)logs.  We&#8217;ve come a long way since the .plan files that internet users made publilc to keep people up to date back in the day.  Each popular thing evolves - this is the nature of technology and the net.  And .plan files evolved with the [...]]]></description>
			<content:encoded><![CDATA[<p>Wonderful (web)blogs, evil sp(am)logs and now entertaining c(orporate)logs.  We&#8217;ve come a long way since the <a title="plan files" href="http://en.wikipedia.org/wiki/.plan">.plan</a> files that internet users made publilc to keep people up to date back in the day.  Each popular thing evolves - this is the nature of technology and the net.  And .plan files evolved with the power of html to the force of nature they are today.</p>
<p>Blogs, splogs and clogs.  Technology has a way of coining cute terms and sticking to the theme. The latest in the series, the clog, a new breed of corporate advertising log.  What&#8217;s a clog and how did they get here?  Let&#8217;s look from the start.</p>
<p>When blogs came on the scene they changed the landscape over night it seemed.  Who would have thought that such a simple concept could have such impact.? I remember years ago when online diary sites were a minor hit.  And I do mean minor.  It was inconceivable that in the future many, many people would be busy posting their ideas and feelings about topics on the web on daily basis.  But that time came.  Networks and communities sprung up overnight.  Social networking sites like myspace and livejournal became 10 pound gorillas.  At some point it seemed like everyone had a blog.  It didn&#8217;t take for that crafty breed of annoying innovator , the spammer, to take notice.</p>
<p>Enter splogs.  Spammers scraping sites to generate the appearance of personal, fresh content.  They usually <em>smell bad</em> like all spam, but they proliferated all the same.  Spammers were sprinkling bot dust on real blogs and even creating deep scraped blogs of their own.  They did this of course to fool people into clicking on and buying products.  Or to generate enough raw pages and links to get pagerank and get their affiliate sites high up in search engine rankings.  Google and blogging software were finding themselves fully occupied to combat this.  At around the point where everyone had a blog and was complaining about the prevalence of splogs&#8230;.. clogs start to come on the scene.</p>
<p>These not so distant relatives of splogs and blogs are unique in their own right.  Companies paying money to increase their search engine rank and presence on the web by creating high quality corporate blogs.  Typically the polish of their content was higher than blogs, however, their motives were oddly similar to sploggers.  They wanted to add real quality content and value to increase search engine placement, create more interest and generate exposure.  Sometimes the lines get blurred.  Everybody remembers the Blair Witch  online hype from before that movie.  This was the grandmother of cloglike thinking, studios themselves creating interest using efforts that appeared to be grassroots  .  UTube has been hit by the same kinds of things in their arena.  Nobody likes deception.  But oddly enough many of these high quality paid or encouraged clogs are starting to take hold.  Many companies let their employees blog about their jobs online at work.  The line is blurred in a good way.<br />
Today there are quite a few companies clogging and adding real value to the web. They are entertaining and providing the information using the informal setup of the<br />
blogs.  In many cases they are visually appealing and contain great content.  The web has grown up like all industries do.  At first pioneers break new ground, prove their concept and gain notoriety.  Then the corporate world catches on and takes the concept, polishes it and runs with it.  This is certainly the case with clogs.</p>
<p>Think about <a target="_blank" title="Joel" href="http://www.joelonsoftware.com/">Joel Spolsky</a> or <a target="_blank" title="Matt Cutts" href="http://www.mattcutts.com/blog/">Matt Cutts</a>&#8230; personable bloggers who mention their companies in each passing breath.  But this is all good.  Content is still king.  And everyone has come to the table willing to share.  Blogs, splogs and clogs&#8230;.</p>
<p>The overriding question is where will it end and what will be next in this evolution?</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/01/26/wonderful-blogs-evil-splogs-and-now-entertaining-clogs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How SEO will kill google - or the problem with backlinks</title>
		<link>http://programmingmatters.com/2007/01/19/how-seo-will-kill-google-or-the-problem-with-backlinks/</link>
		<comments>http://programmingmatters.com/2007/01/19/how-seo-will-kill-google-or-the-problem-with-backlinks/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 05:09:31 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/how-seo-will-kill-google-or-the-problem-with-backlinks/</guid>
		<description><![CDATA[When the web was young, backlinks were the perfect way to measure a sites popularity.  The sites with backlinks were more popular and the sites with backlinks from more popular sites were even more popular as you would expect.  And all was well.
But in today&#8217;s world no matter how much bleach you apply [...]]]></description>
			<content:encoded><![CDATA[<p>When the web was young, backlinks were the perfect way to measure a sites popularity.  The sites with backlinks were more popular and the sites with backlinks from more popular sites were even more popular as you would expect.  And all was well.</p>
<p>But in today&#8217;s world no matter how much bleach you apply to your white hat, you can&#8217;t get around that little bit of knowledge you&#8217;ve acquired.  Backlinks = success on Google.  And by knowing this and &#8220;exploiting&#8221; this you will knock out those websites that don&#8217;t attempt to do any &#8220;SEO&#8221;.  Your white hat may look white, but really it&#8217;s gray.  You will do all the right things to generate backlinks.  Invariably as much as Google would hate to admit it, this breeds a competitive landscape.  &#8220;You can&#8217;t win if you don&#8217;t play.&#8221;  It has now become essential to &#8220;ethically&#8221; build backlinks in order to get organic Google search results.  And this is very bad for the quality of links on Google&#8217;s search results.</p>
<p>No matter how innocent you try to be, the cat is out of the bag.  It is far to easy to get a large number of &#8220;encouraged&#8221; backlinks to a given site.  When you search on Google the really big players come up first.   And this is good.  They have such a huge number of backlinks that they can pretty much be seen as genuine.  It&#8217;s the middle ground.  The &#8220;long tail&#8221;.  These are the problems.  If a smart developer/designer releases a Wordpress theme with a backlink and that theme is used by several hundred people they get lots of page rank.  These wordpress themes can be used on popular blogs with plenty of pagerank themselves.  This is &#8220;white hat&#8221; activity.  But it&#8217;s really intelligently gaming the system.  The SEO gurus know plenty of tricks to get backlinks and PR.<br />
Because of this many Google &#8220;long tail&#8221; searches that are  more specific are filled with SEO&#8217;d sites both white hat and black hat spam.  I know quite a few people who actually are switching to other search engines because of the &#8220;backlink&#8221; spam.  &#8220;Quality backlinks&#8221; are just too easy to get, especially if you are willing to pay money for them.  And that goes on everyday.</p>
<p>Backlinks were a good idea at some point.  Now they are only showing that you are trying really hard.  The people that talk the loudest and the most often aren&#8217;t always the best.  And proliferating backlinks to your site with all the right keywords to game the system doesn&#8217;t mean your content is the best either.  It just means that you are good at generating backlinks.</p>
<p>Until spiders can have a clue what they are parsing it will be hard to impossible to solve this problem and still use backlinks.<br />
Social networks like digg.com, stumbleupon.com and reddit.com are &#8220;the next new thing&#8221;.  By having people vote on pages&#8230; the crap filters to the bottom.  This of course will have it&#8217;s own set of problems - but invariably will be far better and more accurate than backlinks.  At the end of the day some content will be brilliant and good - and still be undiscovered.  However more data will yield better results.</p>
<p>How do you really judge the worth of a website?  Is it how many people like it?  The demographics of those people linking to worth for specific topics?  How long people spend on the site itself?  These are fascinating questions that search engines will be forced to answer in upcoming year - or they will be inconsequential.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/01/19/how-seo-will-kill-google-or-the-problem-with-backlinks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why Silver Bullets Tarnish Over Time - New Paradigms Getting Thrashed in the Field</title>
		<link>http://programmingmatters.com/2007/01/19/why-silver-bullets-tarnish-over-time-new-paradigms-getting-thrashed-in-the-field/</link>
		<comments>http://programmingmatters.com/2007/01/19/why-silver-bullets-tarnish-over-time-new-paradigms-getting-thrashed-in-the-field/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 07:30:29 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Software Technology]]></category>

		<category><![CDATA[Development Philosophy]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/2007/why-silver-bullets-tarnish-over-time-new-paradigms-getting-thrashed-in-the-field/</guid>
		<description><![CDATA[This concept really applies to much of life, however, computer science in particular.
Why is is that new ways of doing things can have remarkable success when they are at &#8220;the discovery stage&#8221; and end up being useful but disappointing in the field?  Object oriented programming turns into spaghetti class interdependencies and deep hierarchies in [...]]]></description>
			<content:encoded><![CDATA[<p>This concept really applies to much of life, however, computer science in particular.</p>
<p>Why is is that new ways of doing things can have remarkable success when they are at &#8220;the discovery stage&#8221; and end up being useful but disappointing in the field?  Object oriented programming turns into spaghetti class interdependencies and deep hierarchies in day to day use.  A giant leap forward and two steps back.  Software patterns turn into misuse and abuse of the Singleton pattern and inappropriate shoehorning.  Extreme programming becomes an excuse to write unmaintainable code that passes each and every unit test.  Simplicity becomes an excuse to build things so bare bone as to become unusable.  It seems like each new &#8220;promising technique&#8221; becomes troublesome once it goes mainstream.  Still worth the trouble, but troublesome all the same.</p>
<p>You may find yourself scratching your head about why such issues aren&#8217;t discovered before they gain mass acceptance.  Why when things are in &#8220;the R&#038;D&#8221; phase they perform so well.  Even when these same things are tested in limited circles on &#8220;real world problems&#8221; they continue to seem like the next silver bullet.</p>
<p>The answer unfortunately is as hard to swallow as it is simple. Early on the people developing and working with these new technologies are quite often some of the best in the field and the smartest guys out there.  By the time the concept migrates to the other 90% of the coding world it finds itself slammed against the middle and trailing ugly end of the bell curve.  These portions of the curve will often times misunderstand and misuse the new tools and techniques presented to them.  It&#8217;s during these phases that the backlash usually kicks in.  Guidelines and rules must be created to keep the average programmer from hanging himself with too much rope.</p>
<p>Often times new paradigms go through a few separate stages of development and acceptance.  In stage 1 the really smart R&#038;D types hit it.  These people are actually great at creating new solutions that are both groundbreaking and elegant.  Once these &#8220;conceptual entrepreneurs&#8221; have firmed things up it is ready for stage 2.  In stage 2 the brightest of the &#8220;real world group&#8221; is brave enough to tackle integrating these concepts into production code.  They become evangelists of the techniques they have had so much success with.  Stage 3 involves more risk takers embracing the techniques advocated by stage 2.  They pour over the concepts involved, grok them and integrate them into their code bases.  It&#8217;s at stage 4 that the tide starts to turn.  At stage four the middle of the bell curve is beginning to be pierced.  The new mantra is gaining success.  By stage 5 you have everyone accepting the new paradigm as &#8220;the way to go&#8221; based more on appeal to authority and peer pressure.  At this stage a significant number may not understand the new techniques at all.  They will advocate them but only graft them on top of their existing ways of doing things.</p>
<p>I like to think of myself as a stage 3 integrator.  At this point things have hit my comfort zone and they are worth a try.  I will do everything I can to understand a new technique, but by no means have created it or been the true dare devil integrating it at stage 2 into production code.  Later down the pipe when I see these concepts misused and abused - I avidly follow the &#8220;shoring up&#8221; techniques to keep people from blowing body parts off my misusing a new technique.</p>
<p>No matter what the latest silver bullet appears to be, it is merely getting it justly deserved 15 minutes of fame during its integration period.  These techniques will live on but the focus will move on.  It&#8217;s important not to throw the baby out with the bath water.  New techniques may disappoint after several years of growth - but in the end they often stay part of our process.  Object orientation, design patterns, components, agile programming, the list goes on.  Don&#8217;t forget that silver bullets are still bullets even when they tarnish.  Just because a concept hasn&#8217;t completely lived up to its hype doesn&#8217;t make it a great and useful part of your process.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/01/19/why-silver-bullets-tarnish-over-time-new-paradigms-getting-thrashed-in-the-field/feed/</wfw:commentRss>
		</item>
		<item>
		<title>24 years of game programming: thrills, chills and spills: part 2</title>
		<link>http://programmingmatters.com/2007/01/10/24-years-of-game-programming-thrills-chills-and-spills-part-2/</link>
		<comments>http://programmingmatters.com/2007/01/10/24-years-of-game-programming-thrills-chills-and-spills-part-2/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 07:36:21 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Game Industry]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/?p=24</guid>
		<description><![CDATA[If you haven&#8217;t read the first part of this article, you&#8217;ll probably want to check it out here.
1995 - Legend Entertainment - My First Industry Years
I was finally working full-time in the game industry at Legend Entertainment and couldn&#8217;t be more thrilled!  No more sandwiching game coding in between contracting gigs.  I was [...]]]></description>
			<content:encoded><![CDATA[<p><em>If you haven&#8217;t read the first part of this article, you&#8217;ll probably want to check it out <a title="24 Years of Game Programming" target="_blank" href="http://eureka3d.com/blog/?p=22">here</a>.</em></p>
<p><strong>1995</strong> - Legend Entertainment - My First Industry Years</p>
<p>I was finally working full-time in the game industry at Legend Entertainment and couldn&#8217;t be more thrilled!  No more sandwiching game coding in between contracting gigs.  I was with a company that has produced a large number of award winning titles, gotten them published and distributed - all with a company of under 20 people!</p>
<p>I started out coding in Watcom C on a daily basis and working in crunch time on a game called Star Control 3.  I was thrilled working with industry veterans from the Zork era!  We even had an inhouse testing team.  I can honestly say I&#8217;ve never worked at a company that ran as smoothly and without contention as the time I worked at Legend.  There were blips on the radar, but over-all development fell into place extremely well during my years there.  This is a testament to team dynamics.  Get a good team that works well together and keep them together.</p>
<p>I learned so much while at Legend.  These guys were experts at what they did.  It was amazing being able to sit in on the entire development process - creative, technical and other.  A lot of my best practices I learned while I was at Legend and over the years this feeling never left me.  We&#8217;re talking about game development done the way everyone dreams of it being done.  Projects would often times have just a few coders on them for most of their development cycle.  I can say that I never saw a game canceled while I was at Legend - and had never heard of one being canceled before I joined them.  They ran lean and mean and couldn&#8217;t afford that kind of wasteful slack.  This had an extremely positive effect on morale needless to say.</p>
<p>At the time we were writing DOS based games that used SVGA libraries to build 256 color 640&#215;480 games.  The WATCOM  compiler let us overcome DOS&#8217; one meg memory barriers and access all of extended memory.  We had to support a dizzying array of low tech video cards and collection of VESA video modes.  But boy was it fun.</p>
<p>From a philosophy standpoint I finally started to get behind the understanding that old rules change. Optimization was still king, but design came first.  Things I had previously considered wasteful were trivial on 486 systems with 4 meg of available memory.  I began to realize that when working with a group of programmers design and communication were of paramount importance.  These things had to be worked at, they just didn&#8217;t fall out naturally.</p>
<p>By 1996 I was coding in C++ in Microsoft (Visual) C++ and we were working on a game library using Direct X 5 for Windows 95.  DirectX was all the rage.  The access to hardware sprites and features was a major boon.  OpenGL was at the time still too high level(slow) and lacked ubiquitous support.  Of course we weren&#8217;t using DirectX for Direct3D at the time.  Direct3D was a few revs a way from being usable.  But uniform driver support for 2D sprites and pages was a major plus in itself.  However 3D was on the horizon and I was very curious.</p>
<p>While I was at Legend I worked on 3 games and saw 5 games ship - all with a group of under 20 people; including the testing department, customer support and marketing!  I owe them a huge debt of gratitude for everything they taught me and breaking me into the game industry.</p>
<p>By 1997 I would find myself somewhere new.  I had a hunger for cutting edge 3D and a company in NJ was doing that and more.  They were actually producing their own OpenGL compliant hardware for the military using an off the shelf Glint chip (from 3D Labs) and a proprietary in house ASIC they had built for voxelized 3D terrain rendering.   I was now at ASPI!</p>
<p><strong>1997 - </strong>ASPI<strong><br />
</strong></p>
<p>ASPI was another opportunity to work with a small group of brilliant people.  The engineers that worked on digital logic design considered machine language high level.  They used custom software to produce their own ASIC&#8217;s, soldering them to the boards in-house.  I had already become very sold on object oriented development at the time.  I had definitely drank the cool aid.  I picked up a copy of Design Patterns by the Gang of Four and fell in love with it.  Years later I would spend plenty of time examining the ways that novice coders abused OOP and design patterns.  But in 1997 I was still loving learning all the ins and outs.  I picked the few patterns that fit the API we were developing and got to work.  It took a bit but I got everyone on board with tightly optimized C++ (which at the time many saw as an oxymoron).  I had realized that C++ could give you the low level control to maintain C like speed.  And I liked it - a lot.</p>
<p>I was now using OpenGL and MESA(an opensource OpenGL) and accepting the fact that on modern machines - OpenGL definitely was worth the minor performance loss.  Back in those days there were still camps that wanted much lower level access to graphics hardware to eek out every last bit of power.  We even got to write our own custom drivers for MESA under SCO Unix.</p>
<p>The cards were awesome and we ended up calling them the &#8220;True Terrain 3D&#8221;.  The military had a contract to buy them up and deploy them.  They were able to ingest DTED data and use LODed voxel planes to create amazing looking terrain.  We interleaved access to the frame and depth buffers with the Glint chip and OpenGL/Mesa to add polygonal features.  This was in 1997 and at the time polygonal 3D cards couldn&#8217;t come close to generating the terrain that the custom cardset could.  Not in the under $20,000 price range at least.<br />
I loved everyone I was working with but invariably even cutting edge high tech couldn&#8217;t keep me from wanting to go back into the games industry.  Somehow high tech and &#8220;serious games&#8221; were exciting, but games were still in my blood.<br />
By 1999 I was back in the industry working on a submarine sim at Aeon Entertainment in Baltimore.</p>
<p>But we&#8217;ll cover that in part 3&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2007/01/10/24-years-of-game-programming-thrills-chills-and-spills-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How null breaks polymorphism: or the problem with null: part 2</title>
		<link>http://programmingmatters.com/2006/12/31/how-null-breaks-polymorphism-or-the-problem-with-null-part-2/</link>
		<comments>http://programmingmatters.com/2006/12/31/how-null-breaks-polymorphism-or-the-problem-with-null-part-2/#comments</comments>
		<pubDate>Mon, 01 Jan 2007 06:05:42 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/?p=23</guid>
		<description><![CDATA[If you haven&#8217;t read part one you really need to do that first.  It&#8217;s here. 
I got a lot of interesting feedback on part 1 of this topic and found I needed to further explain myself in certain areas.

Two initial responses to issues brought to me from part 1: 
1. Typed languages 
In languages [...]]]></description>
			<content:encoded><![CDATA[<p><em>If you haven&#8217;t read part one you really need to do that first.  It&#8217;s <a title="How null breaks polymorphism: the problem with null: part 1" href="http://eureka3d.com/blog/?p=21">here</a>. </em></p>
<p><em>I got a lot of interesting feedback on part 1 of this topic and found I needed to further explain myself in certain areas.<br />
</em></p>
<p><em>Two initial responses to issues brought to me from part 1: </em></p>
<p><em>1. Typed languages </em></p>
<p><em>In languages that aren&#8217;t typed at all, null is no more a problem than any other reassignments as they never care about types.  They all can result in similar issues.  Which in my mind is in fact a problem.  I am definitely a huge proponent compile time type checking.  This is why perhaps I seem so hard on it in part 1.  Compile time checks should be able to help out.<br />
</em></p>
<p><em>2. When functions might not return a value </em></p>
<p><em>There are plenty of times when a function may or may not return a value.  If this is the case the return type should reflect that.  Having null used as a &#8220;magic number&#8221; is not the ideal solution in my mind.  I&#8217;d much rather see a return type that forces the issue to be very clear.  It may seem non-standard but a type masquerading as a collection that potentially has one item seems ideal.  Most any programmer will realize he needs to check the size of a collection before trying to access its first element.  This is no more cumbersome than checking for null - but seems logically intuitive.  This can be easily optimized so that there is no performance hit in a language like C++ using templates.  A container is intuitive as it can be potentially empty - this very straightforward.</em></p>
<p><strong>Making the problem even more clear:</strong></p>
<p>I often find it easier to express programming concepts in real world terms.  This helps to reduce them to the absurd when appropriate.  This doesn&#8217;t always work but a lot of times can help look at the problem from a different perspective.</p>
<p>Let&#8217;s take the concept of typical null check behavior and attempt to map it to a real world procedure.</p>
<p>We are going to explore John teaching Norm to drive a car.  The following may sound a little familiar.</p>
<p>John: &#8220;First you are going to need to make sure you have a car.  Do you have a  car?  If you don&#8217;t have a car just return to what you were doing.  I won&#8217;t be able to teach you to drive a car.</p>
<p>&#8220;Norm: &#8220;I have a car.&#8221;</p>
<p>John: &#8220;Let&#8217;s call that car normsCar.  Check to see if your car has a door.  We&#8217;ll call it normsCarDoor.  Does normsCar have a normsCarDoor?&#8221;</p>
<p>Norm: &#8220;Yes&#8221;</p>
<p>John: &#8220;Great, but if you don&#8217;t just skip the rest of this - I won&#8217;t be able to tell you how to drive a car.&#8221;</p>
<p>Norm: &#8220;I have a car door.&#8221;</p>
<p>John: &#8220;Once you open the door check and see  if it has a seat we&#8217;ll call normsComfySeat.  If you don&#8217;t have a seat skip the rest of this - I won&#8217;t be able to tell you how to drive a car.&#8221;</p>
<p>Norm: &#8220;I have a seat&#8221;</p>
<p>John: &#8220;Things have changed scope a bit - can you check whether you have a door again for me - we called it normsCarDoor?&#8221;&#8230;&#8230;&#8230;..</p>
<p>I think you can see where this is going.  Classes have contracts.  It should be reasonable to talk about a car that always has a door and a seat without having to neurotically check at all times.</p>
<p>Unlike the real world, when we code we make new things up all the time.  So even though seats and doors can be reasonably inferred on cars the things that a UserAgentControl may or may not have probably won&#8217;t be obvious.  Does the UserAgentControl have a ThrottleManager all the time?  If I have a non-nullable class type I can check by looking at the class.  If I get it wrong for some reason maybe I can have the compiler issue a warning.  Maybe I can be forced to &#8220;conjugate&#8221; it with a special syntax every time I use it to help me remember (&#8221;.&#8221; vs. &#8220;->&#8221; in C++).  Or a naming convention.</p>
<p><strong>Why is this such an overarching problem?</strong></p>
<p>It may seem like griping over a simple check for a things existence.  Except this check can conceivably apply to each and every object I can have (or don&#8217;t have).  This makes the issue enormous.  A lot of the time programmers put in checks for null when it seems appropriate or when unit testing throws an exception at run-time.  This sounds a whole lot like something statically typed languages are supposed to help us protect ourselves against.  The unchecked null is by far the most common runtime error and the &#8220;overchecked&#8221; null one of the most prevalent unintentional code obfuscation techniques.</p>
<p><strong>Solutions that don&#8217;t involve changing existing languages:</strong></p>
<p>1. If your language supports the concept out of the box (C++, <a title="Spec#" target="_blank" href="http://research.microsoft.com/specsharp/">Spec#</a>, <a title="F#" target="_blank" href="http://research.microsoft.com/fsharp/fsharp.aspx">F#</a>, <a title="OCaml" target="_blank" href="http://en.wikipedia.org/wiki/OCaml">OCaml</a>, <a title="Nice" target="_blank" href="http://nice.sourceforge.net/">Nice</a>, etc.) or it can be built with templates or other mechanisms use not-nullable types.  Use these types whenever possible.  If you&#8217;re language doesn&#8217;t support it then use number 2 alone.<br />
2. Create a simple naming convention (don&#8217;t go hungarian on me) to discern what is nullable and what isn&#8217;t.  This is a fundamental concept and it should be obvious everytime a value, instance or object is accessed.  Use this to compensate for your languages deficiency in a similar manner to prefixing private variables in languages that don&#8217;t have mechanisms for hiding access to variables and member functions.<br />
3. Check for null as early as possible in the food chain and prefer to call methods that are granular and don&#8217;t have to check themselves.   This means make every parameter passed to a routine get used.  If a parameter is optional write a new routine.  Make the types passed to these routines be not-nullable if the language supports it.</p>
<p>4. If it makes sense prefer empty collections to collections containing nothing but null for obvious reasons.</p>
<p><strong>Wrap-up</strong>:</p>
<p>There is no perfect solution.  But so many times in code I see null being checked or not checked and am left wondering.  Is the check gratuitous?  Is this a runtime error waiting in the wings?  And unless its commented it or I check it&#8217;s usage - I get that typically uneasy feeling.  Bound to catch it at runtime with unit testing.  This is not the answer I want to hear.</p>
<p>I think a few simple practices and conventions could get this off our plate so we can get back to the problem at hand.  Solving actual problems.</p>
<p><em>Afterthoughts:</em></p>
<p><em>Some other articles that beat me to the punch on some of these concepts:</em></p>
<ol>
<li><em> <a target="_blank" title="Artima" href="http://www.artima.com/weblogs/viewpost.jsp?thread=168511">Let&#8217;s Reconsider That Offensive Coding</a> from Michael Feathers.</em></li>
<li><em><a target="_blank" title="Null" href="http://blog.blainebuxton.com/2006/11/null-runtime-error-generator.html">Null:The Runtime Error Generator</a>  by Blaine Buxton</em></li>
</ol>
<p><em>Empty containers solve this problem nicely for return types.  Also as many readers have mentioned, monads are extremely useful in solving this problem as well.  But once again, stop propagating unneeded nulls and similar &#8220;safer null-like&#8221; structures as soon as possible.  As Michael Feathers states - it&#8217;s just offensive code.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2006/12/31/how-null-breaks-polymorphism-or-the-problem-with-null-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>24 years of game programming: thrills, chills and spills: part 1</title>
		<link>http://programmingmatters.com/2006/12/31/24-years-of-game-programming-thrills-chills-and-spills-part-1/</link>
		<comments>http://programmingmatters.com/2006/12/31/24-years-of-game-programming-thrills-chills-and-spills-part-1/#comments</comments>
		<pubDate>Sun, 31 Dec 2006 18:07:21 +0000</pubDate>
		<dc:creator>Steve Riley</dc:creator>
		
		<category><![CDATA[Game Industry]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eureka3d.com/blog/?p=22</guid>
		<description><![CDATA[Originally I was thinking about calling this article 24 years of game programming: observations and lessons learned.  Somehow the title seemed much too stuffy for an entry about something I&#8217;ve loved so much over the years.
In this three part series I trace my 24 years of game programming.  From machine language in 1982, [...]]]></description>
			<content:encoded><![CDATA[<p><em>Originally I was thinking about calling this article 24 years of game programming: observations and lessons learned.  Somehow the title seemed much too stuffy for an entry about something I&#8217;ve loved so much over the years.</em></p>
<p>In this three part series I trace my 24 years of game programming.  From machine language in 1982, Pascal in 1987, C in 1992, C++ in 1995, using &#8220;high level API&#8217;s&#8221; like OpenGL in 97, catching the pattern craze in &#8216;98, the component mantra in 99, coding for 3 consoles at once in 2000, moving into Java, C#, and javascript on the top of C++ in the 21st century.  And more!</p>
<p><strong>Let&#8217;s go back to 1982:</strong></p>
<p>This is where it all began for me.  I had received my first computer a Vic-20 and dreamed of everything I could do with it.  William Shatner had advertised it as a gaming system and a computer too (and we all know he has integrity from the whole priceline fiasco).  I remember writing my first basic program for it from the thin manual that came with it.  An animated bird that used character graphics to flap it&#8217;s wings and fly around the screen.  I was mesmerized!</p>
<p>I quickly learned the machine inside and out, bought the Vic-20 Programmer&#8217;s  Reference Guide, hung the schematic of the machine on my wall and went to work.  Very quickly I realized that a 1 mhz machine with 5k of ram was going to take some heavy tricks to create games for.  So I learned 6502 machine language to really pull the stops out.  An 8 bit processor with an X, Y and Accumulator that could add and subtract any 8 bit value!  X and Y could only increment and decrement.  And of course when the numbers were larger than 255 a little juggling was required.</p>
<p>Very soon the Commodore 64 came out and I immediately upgraded.  Programmable sprites, a SID chip for sound, 64k of ram (with 16k bank switched under rom that held Bill&#8217;s basic and the &#8220;OS&#8221;).   Now we were playing with power.  I wrote more than a few games for the Commodore 64 as a hobbiest in straight machine code.  An Olympic games type clone, a chess game that worked with the 300 baud modem, a utility to dump on screen graphics to the printer, some arcade variations, a sprite editor.<br />
These were the truly brass tacks years.  6502 machine language mixed with little bits of bootstrap basic was hardcore by any standards.  Jumping to subroutines was something you couldn&#8217;t take lightly and the &#8220;hardware&#8221; stack was only 512 bytes long.  It was strictly for keeping the return address from subroutine calls.  I was firmly convinced games required maximum power and could only be written in machine language.  I was pretty convinced this fact would never change.</p>
<p>I was of course wrong.</p>
<p><strong>Fast forward to 1987:</strong></p>
<p>The IBM PC/XT was starting to show promise and a friend introduced me to Turbo Pascal on it.  4.77 megahertz!  640k of ram.  Sure my machine was an XT and only capable of CGA graphics (and character mode graphics - not even programmable at that).  But Turbo Pascal was my first true compiler.  It was actually possible to write a significant chunk of many games in high level code.  Sure low-level interrupt stuff was often in assembly.  We spent many, many all nighters coding games and often ignoring our girlfriends.  But they couldn&#8217;t code:)  I slowly got used to the fact that passing variables on the stack was a useful enough concept that it was worth the performance hit it sometimes had on games.  We are talking about functions passing parameters on the stack!  But this was &#8220;non-trivial&#8221; and took cycles.  Things were still so tight that every cycle mattered<strong>.</strong></p>
<p><strong>Fast forward to 1992:</strong></p>
<p>I got my first  386 20 mhz clone with 4 meg of memory and an 80 meg hard drive.  I quickly bought a soundblaster card for it.  Before long I was coding games in MCGA 320&#215;200 256 color graphics mode.  I learned everything I could about palette manipulation and palette color theory.  I was coding in C by this time as well 8086 assembly of course.  You could actually inline your assembly right there with the C code.  It was awesome.  I wrote a sprite compiler that would literally turn all the data into straight machine code so it didn&#8217;t have to loop and check for key colors.  It used a triple buffer, dirty rect system to update the screen as efficiently as possible.</p>
<p>I learned Autodesk animator inside and out and spent hundreds of hours working on a sprite editor with bucket fills, circles, lines and palette manipulation functions as well as animation capability.  I was in heaven.  I recruited some good friends to do graphics for me and created a number of demos to show off the library.</p>
<p>I still hand-optimized everything and didn&#8217;t trust the compilers at all.  A C compiler may not use a bit shift for an integer multiplication.  The horror!</p>
<p>I made sure and learned all I could about fixed point numbers.  At this point floats were still done in software and slower than hell.  Since C didn&#8217;t support operator overloading the code looked pretty clunky.  But it didn&#8217;t matter.  320&#215;200 256 color mode was fast - really fast.  And I was learning all I could from Abrash books about mode 13 hex that allowed the full 256k of graphics memory to be utilized.  At the time the PC was still back switching 64k into it&#8217;s memory map.  And don&#8217;t even get me started on 80&#215;86 segment offset addressing!</p>
<p>I ended up releasing all my code as shareware and learning the ins and outs of shareware distribution mechanisms.  I remember printing labels for 5 1/4 and 3 1/2 disks and mailing them off to shareware distribution hubs.  This was before the internet took off of course and everything was BBS based.</p>
<p>1995 was right around the corner and soon I would find myself working at Legend Entertainment on Star Control 3 - my first commercial game product.</p>
<p><strong>Part 2 cracks the lid open on my game industry years.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://programmingmatters.com/2006/12/31/24-years-of-game-programming-thrills-chills-and-spills-part-1/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
