<?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>jalf.dk</title>
	<atom:link href="http://jalf.dk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://jalf.dk/blog</link>
	<description>Musings and thoughts on programming and other geeky stuff</description>
	<lastBuildDate>Sat, 07 Jan 2012 15:42:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dear games industry. Grow up</title>
		<link>http://jalf.dk/blog/2012/01/dear-games-industry-grow-up/</link>
		<comments>http://jalf.dk/blog/2012/01/dear-games-industry-grow-up/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 15:42:18 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Meanwhile]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[games-industry]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=912</guid>
		<description><![CDATA[Sony Sony Again Nintendo Epic CodeMasters Bethesda BioWare Square Enix Sega BioWare EA 2011 was the year of the games industry, as a whole, getting hacked. Dear games industry; huge international publishers and development studios: are you seriously going to tell me you didn’t see this coming? For the last several years, the games industry [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.wired.com/gamelife/2011/04/playstation-network-hacked/">Sony</a></li>
<li><a href="http://www.joystiq.com/2011/05/02/sony-hit-with-second-attack-loses-12-700-credit-card-nu/">Sony Again</a></li>
<li><a href="http://arstechnica.com/security/news/2011/06/lulz-security-takes-on-nintendo-fbi-sony-fbi-fights-back.ars">Nintendo</a></li>
<li><a href="http://www.bluesnews.com/s/122640/epic-hacked">Epic</a></li>
<li><a href="http://www.engadget.com/2011/06/13/codemasters-website-hacked-tens-of-thousands-of-personal-acco/">CodeMasters</a></li>
<li><a href="http://arstechnica.com/gaming/news/2011/06/hacker-group-lulzsec-demands-hats-threatens-release-of-brink-user-data.ars">Bethesda</a></li>
<li><a href="http://arstechnica.com/gaming/news/2011/06/bioware-hacked-data-taken-from-decades-old-neverwinter-forum.ars">BioWare</a></li>
<li><a href="http://www.computerandvideogames.com/301202/anonymous-accused-of-hacking-eidos-deus-ex-websites/">Square Enix</a></li>
<li><a href="http://www.computerandvideogames.com/307915/news/madness-continues-sega-hacked-personal-data-stolen/">Sega</a></li>
<li><a href="http://www.rockpapershotgun.com/2011/06/24/bioware-hacked/">BioWare</a></li>
<li><a href="http://www.rockpapershotgun.com/2011/06/26/lulzsec-over-release-battlefield-heroes-data/">EA</a></li>
</ul>

<p>2011 was the year of the games industry, <em>as a whole</em>, getting hacked.</p>

<p>Dear games industry; huge international publishers and development studios: are you seriously going to tell me you didn’t see this coming?</p>

<p>For the last several years, the games industry has been been infested by a plague of account systems. EVERY company wanted their customers to sign up for THEIR unique account, marketplace, community and download central, preferably with separate accounts for each. And then another account for support requests, of course. And the more of these accounts can be associated with credit card information, the better. And of course, in true games industry fashion, as much as possible should be developed in-house.</p>

<p>Every games company wants me to create a unique account <em>just for them</em>. Every games company wants my password. And apparently, nearly as many let their security be handled by Joe the Intern who does their website on weekends.</p>

<p>It’s absurd. And not just because you are getting hacked en masse, and your users have their sensitive information leaked to hackers courtesy of you and your incompetence and your stubborn insistence on acquiring sensitive information that you have no need of, no business storing, and are not qualified to handle and safeguard.</p>

<p>It is also absurd because, even when you are not being hacked, it is infuriating your users. I don’t want to have to invest in your imaginary currency (which can only be bought in bulk, in quantities conveniently designed to force you to spend more money up front than the price of the item you wanted to buy), in order to purchase DLC for my games. I don’t want to have to remember 47 different account usernames and passwords. I don’t want to have to remember which email address I signed up with two years ago on the company you bought 6 months ago and whose account database you have now integrated into yours.</p>

<p>I don’t want to have to guess whether I am supposed to log in with my Bioware account or my EA account when unlocking stuff for my Bioware game  (published by EA).
I don’t want to have to log in to both Steam and GfWL to play a game. I don’t want to have to log in to Rockstar Games Social Club. Sega, was it <em>worth</em> it to make me sign up for a Sega Pass? Did you get enough value out of yet another username in your database to justify my password now being in the hands of hackers?</p>

<p>All of you, do you really <em>need</em> me to sign up for anything <em>at all</em>? Or is this just your vanity and your 20-year-old habit of prompting users to “please fill in your registration card while you wait for the installer”, updated to the internet era for no reason whatsoever?</p>

<p>The rest of the world has, by and large, learned a couple of important lessons over the last years:</p>

<ul>
<li>online security is hard, and</li>
<li>users have plenty of accounts everywhere already, and they don’t want to have to sign up for <em>your</em> exclusive site any more than they want to sign up for the 400 other sites they visited recently.</li>
</ul>

<p>Thus, quite a lot of serious websites now “outsource” the account security business to those who are qualified to handle it. We have Facebook Connect, relying on the assumption that Facebook, a site with 400 million users, and a <em>very</em> tempting target for hackers, is able to deal securely with authentication, and we have OpenID, relying on the assumption that users themselves will use a provider that they trust among the countless different ones available.</p>

<p>What these have in common is that they allow you, the company hosting a website and an online service, to provide all the benefits of a personal user account to your users, but without you ever <em>seeing</em> a password, and without you being able to lose quite as much sensitive data <em>when</em> you get hacked. It also provides the convenience benefit of allowing the user (without <em>forcing</em> the user to do so) to reuse the same user ID across multiple sites, and it even offers the potential for exchanging (with the users’ consent, of course) information <em>between</em> different game companies.</p>

<p>And you know what? Steam is an OpenID provider. You could implement OpenID-based authentication, and people would be able to log in with their Steam ID (or their GMail account, or any of the dozens of other OpenID providers, of course), and <em>you wouldn’t have to worry about protecting their passwords</em>.</p>

<p>You could, practically in your lunch break, write a login system which allows GMail users, Steam users and Facebook users to log in using their credentials from <em>those</em> services, handled securely by <em>those</em> services, where you get all the benefit of juicy direct and “exclusive” access to the user, without the headaches of “how do we store the users’ username and password, and without hassling the user with “please come up with a username and password for <em>yet another</em> site.</p>

<p>So, dear games industry. I’m sure that pretty much anyone who has played a game over the last decade has already had his username, password, pet name, address and credit card info leaked by now, thanks to you.</p>

<p>But how about putting a stop to it from now on? How about leaving security to the companies that actually invest in it, and who make it their business? How about, along the way, getting rid of the current account <em>hell</em> where every user has to, for every game, every development studio and every publisher, remember a unique combination of URL (where your “service” is hosted <em>this month</em>, after the latest relaunch, the latest merger or the latest “let’s just start over because our previous system sucked”), and username, password and email address to log in to said URL?</p>

<p>How about making your jobs easier, while also treating your customers better and giving less information away to hackers?</p>

<p>How about growing up and catching up?</p>

<p>A common sentiment when these hacks really exploded this past summer was “these hackers need to be stopped”, but that’s missing the point. They’re only showing how absolutely trivial it is to hack a huge number of websites. Arresting them, torturing them for a few years at Gitmo or condemning them to the deepest pit of Hell doesn’t matter, because your websites are still vulnerable, and in a world of 7 billion people, <em>someone</em> is going to try to exploit it.</p>

<p>Yes, the hackers need to be held accountable, but <em>so do you</em>. <em>You</em> are the ones who chose to start hoarding user information, and <em>you</em> are the ones who didn’t even care enough about your users to do so securely. You are the ones who betrayed your users. You are the ones who failed to live up to the responsibility you wouldn’t even have <em>had</em> if you’d stuck to your actual business: making games, rather than collecting usernames and passwords.</p>

<p>Grow up. Start storing only the data you actually need, and make sure that what you <em>do</em> store is kept absolutely goddamn secure. If you ever even <em>see</em> my password, encrypted, hashed and salted or otherwise, <em>you are doing it wrong</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2012/01/dear-games-industry-grow-up/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I’m not dead!</title>
		<link>http://jalf.dk/blog/2012/01/im-not-dead/</link>
		<comments>http://jalf.dk/blog/2012/01/im-not-dead/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 15:41:07 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=1019</guid>
		<description><![CDATA[I know, it’s been ages since I updated my blog. I started on a new job back in August, which took up a lot of my attention for the first couple of months. On the home front, things have been kind of busy too, and I’ve had less time than usual for programming, and writing [...]]]></description>
			<content:encoded><![CDATA[<p>I know, it’s been ages since I updated my blog.</p>

<p>I started on a new job back in August, which took up a lot of my attention for the first couple of months. On the home front, things have been kind of busy too, and I’ve had less time than usual for programming, and writing about programming.
<span id="more-1019"></span></p>

<p>But I’m not giving up on my blog. I just checked, and I have nearly as many draft posts lying around in various states of completion (47) as I’ve published (49). That is a lot of draft posts, and some of them are <em>nearly</em> finished.</p>

<p>So over the next weeks, I’ll see if I can’t wrap up a few of them, clearing out the backlog a bit and just making this place look a bit more “alive”.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2012/01/im-not-dead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A follow-up rant about Connect</title>
		<link>http://jalf.dk/blog/2011/08/a-follow-up-rant-about-connect/</link>
		<comments>http://jalf.dk/blog/2011/08/a-follow-up-rant-about-connect/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 15:01:08 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=966</guid>
		<description><![CDATA[So my last blog post got a surprising amount of attention, not least from a/the (no clue how many there are of those) Product Manager of Visual Studio, which is pretty neat. So, here’s a quick followup, in order to fully exploit my 15 minutes of fame! First, I highly recommend any newcomers read Doug [...]]]></description>
			<content:encoded><![CDATA[<p>So my <a href="http://jalf.dk/blog/2011/08/whats-wrong-with-visual-c-and-microsoft-connect/">last blog post</a> got a surprising amount of attention, not least from a/the (no clue how many there are of those) Product Manager of Visual Studio, which is pretty neat.</p>

<p>So, here’s a quick followup, in order to fully exploit my 15 minutes of fame!</p>

<p><span id="more-966"></span></p>

<p>First, I highly recommend any newcomers read <a href="http://jalf.dk/blog/2011/08/whats-wrong-with-visual-c-and-microsoft-connect/comment-page-1/#comment-8352">Doug Turnure’s comment</a> on my previous post. It is an interesting read, and seems surprisingly frank about the problems with Connect as it is today. And where I would normally have expected some canned PR speech about how all the perceived problems aren’t actually problems, or can’t reasonably be fixed, it actually states that the problems are <em>real</em>, and that they will be fixed. Thanks, Doug!</p>

<p>Of course, words are cheap, and it remains to be seen whether any of this will actually result in tangible improvements to Connect. But knowing that someone within Microsoft is actually working on it is a lot better than nothing.</p>

<p>But being the cynical and demanding bastard that I am, I worry that this is only brushing the surface. Because the problem is not just that bugs get forgotten on Connect. Let’s try to separate the issues a bit:</p>

<h3>Bugs are forgotten</h3>

<p>As we saw, bugs are left to languish <em>until they are mentioned on Twitter</em>, implying that the way to get a bug fixed is <em>not</em> to bother with Connect, but instead to make a lot of noise about it on social media. Doug answered this quite clearly, saying that bugs currently “fall through the cracks”, which can, should and will be prevented in the future. That’s great, but it doesn’t solve the <em>second</em> part of the problem:</p>

<h3>Even when bugs don’t fall off the radar, the way they’re handled is still broken</h3>

<p>Bugs seem to be treated completely randomly once they’re entered into Connect. Even if they don’t “fall through the cracks”, they are still treated to a line of over-zealous moderators or whatever they are, who seem to be competing on who can close the most issues the fastest. Bugs are closed haphazardly, sometimes as a duplicate of a bug reported on an internal system that customers can’t see, sometimes as “won’t fix”, and sometimes as “won’t fix”, but with a comment saying that it may get fixed for a future release (which means it’s not quite “won’t fix” after all).</p>

<p>Sometimes the same scenario will result in a “deferred” status (which makes a lot more sense than “won’t fix”), and sometimes the bug will be closed as “by design”. Sometimes they’re <strong>Resolved</strong> as <em>won’t fix</em>, and other times they’re <strong>closed</strong> as <em>won’t fix</em>. What’s the difference? Are statuses assigned completely at random, or does it just look that way?</p>

<p>Why are issues <em>closed</em> when the team doesn’t have time to fix them in the upcoming release? They’re still bugs, and until a decision is made to <em>never</em> fix the bug, it is hard to see why they should not be considered as open, or unresolved, at least from the users’ point of view (what status it is given internally is of course up to Microsoft. But when customers see a bug closed as “won’t fix” merely because “we don’t have time to fix this in time for the next release”, they’re going to see red, and for good reason.)</p>

<p>Is any or all of this a consequence of the messy internal systems that Doug described, or is it that new bugs are processed and cataloged badly (whether due to the responsible staff receiving insufficient training, the policies they’re supposed to follow being unclear, or the tools they use being, well, broken)? I don’t know, but something is clearly wrong. And it is not just that bugs fall through the cracks and are forgotten.</p>

<p>So the real problems go deeper…</p>

<h3>What needs to be done</h3>

<p>Once the “superficial” problems with Connect are fixed, the next step is to make sure bugs reports are actually handled correctly: that bugs aren’t closed with “won’t fix”, unless that is actually what the responsible team intends; that duplicate bug reports are closed either with the same reason, or marked as duplicates, and that in general, reporting a bug gives the user the impression that “the bug report isn’t participating in some random lottery, where a random person will eventually close it with a random reason”.</p>

<p>But even then, we’re not quite home free. Because even when a bug is “fixed”, there’s a significant problem:</p>

<p><strong>It hardly ever is!</strong></p>

<p>When a bug is marked as “fixed“on Connect, it usually means “we have fixed this bug internally, in our trunk, and at some unspecified point in the future, we will release some unspecified product built from this source tree”.</p>

<p>In other words, the bug has <em>not</em> been fixed in the product where it was reported. The bug may have been reported in Visual Studio 2010, but it was “fixed” in Visual Studio 2012 (or whatever).</p>

<p>That’s not what “fixed” means, is it?
A bug is fixed when it is no longer present in the product where it was reported.
In other words, if a bug was reported against VS2010, then I’d consider it “fixed” when the following conditions are true:</p>

<ul>
<li>the bug has been fixed in the VS2010 source tree, and</li>
<li>the fix is available to customers who own VS2010, or at the very least, has been <em>scheduled</em> for availability to users of VS2010.</li>
</ul>

<p>Of course, some bugs are so insignificant that it’s not worth pushing an update out to users of the current product, and sometimes a fix would be so complex that it can’t be reasonably implemented in the product. Of course there are cases where it makes sense to implement the fix in the trunk of your source tree, and not in the product version where it was reported. But at least give it a different status than “fixed” then.</p>

<p>When a bug is “fixed” in Connect today, the message to the person who reported the bug basically boils down to this:</p>

<blockquote>
  <p>We have identified the problem, and if you buy a different product, priced at several thousand dollars<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>, to be released in a year or two, you won’t experience it any more”.</p>
</blockquote>

<p>Gee, really? So where does Connect enter into it?
I’m pretty sure I can do that today <em>without ever submitting the bug report to Connect</em>. I could just buy a different OS or IDE. I hear a lot of people are pretty happy with XCode, for example.</p>

<p>Of course, exacerbating this problem, Visual Studio upgrades tend to be nontrivial for large code bases. The format of solution and project files is generally incompatible between versions (even when the only actual <em>change</em> to the format is an incremented version number), so not only does the user have to wait for a completely separate product to be released, and then buy it at the usual price, they <em>also</em> have to go through a potentially painful upgrade process… Just to see the fix to a bug they reported two years ago.</p>

<p>Even if all the other problems are fixed, this one still ensures that reporting bugs on Connect will feel like a waste of time. If we’re practically guaranteed that the product we reported the bug against won’t ever be fixed, why bother reporting the bug at all?</p>

<h3>So it’s not just Connect</h3>

<p>So this plays into another of my pet peeves about Visual Studio: I have no clue whose decision this is, and if it is actually an active decision made by someone who thinks it is a good idea, or if it is simply a fossilized holdover from the mid-80’s that no one have thought to change, <em>but the policy of never ever improving on a released product has got to go</em>. If I report a bug on VS2010 and you claim to have fixed it, I want the fix. If you don’t actually fix VS2010, then you haven’t fixed the bug that I reported. And if you’re not going to fix the bugs I report, where’s my incentive for reporting them?</p>

<p>Of course, once we accept that bugs should actually be <em>fixed</em>, when practically possible, it is worth asking why the same shouldn’t apply to new features and other improvements.</p>

<p>If you have a better compiler than the one I’m using, it really seems to be a win-win situation if you let me use it. I get to use a better compiler, I get more value out of the product I bought, and I am more inclined to buy VS vNext as well, if I know that <em>it</em> too will actually improve over time. Forcing me to use an, on average, 18 months old compiler doesn’t seem like good sales tactics.</p>

<p>Of course, not all VS users are affected equally by this.
When I worked with .NET, this bothered me less, because the VS compiler set the pace: the language got updated when the compiler said so, and there were no alternative implementations to speak of. Who cares if your compiler is 2 years old? The language evolves in lockstep with the compiler anyway. Sure, I’d still have loved to see improvements to the IDE itself, but I knew there would be little point in updating the compiler out of band.</p>

<p>But now that I work with C++ every day, it drives me nuts. The VC++ team is (like any other C++ compiler team) perpetually playing catch-up to an international standard, and to a half-dozen competing compilers. When VC10 was released, it was on par with the competition for about 2 months. Sure, it lacked plenty of features that other compilers supported, but it also supported some that weren’t yet implemented in other compilers. Then, a couple of months later, a new GCC version was released which supported the few features that had previously been unique to MSVC. And after that, we’re witnessing a 2–3 year period of utter stagnation, where the VC++ compiler stands completely still, while all around it, the competition is making huge strides towards compliance with the new C++ standard, and making new features available by the dozen.</p>

<p>How is that a good idea? How does this make Visual Studio look good? Why would I pay thousands of dollars for a product that is obsolete 95% of its lifetime?</p>

<p>And the product doesn’t even <em>need</em> to be obsolete at all. The VC++ team is busy implementing countless improvements to the IDE and the compiler. But they’re being “hoarded”, waiting for the next major release, rather than being shipped out to your paying customers. It is as if someone at the top of Microsoft’s DevDiv considers software to be like fine wine; as if new features should be given a few years in a cold cellar to “mature” before being sold to customers.</p>

<p>Does anyone really think that this makes VS a more attractive product?</p>

<p>Connect is current broken, sure, but the problem goes deeper than a few “forgotten” bugs. Once that is fixed, there seems to be a lot of work to do in making Connect appear worthwhile to users (by giving better, more consistent, feedback on received bugs, and probably also through general site improvements, fixing the UX disaster that it is today), and even once those are solved, end-users are unlikely to notice much actual improvement, unless some changes are made to how the Visual Studio team <em>in general</em> deal with bugs, features and product updates.</p>

<p>At the end of the day, until we, the end-users actually get to benefit from the improvements made as a result of of our bug reports, the system will remain broken.</p>

<p>You can make Connect as responsive, user-friendly and all-round wonderful to use as you like — but if we, the end-users, don’t get to <em>see</em> fixes to the bugs we report, the system is still broken.</p>

<p>Of course, my ranting about this is unlikely to change much. I’m hardly in a position to tell Microsoft how to run their business. But on the other hand, there can be no harm in pointing out what I see as problems. So here we go. :)</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>yes, most people and companies are able to get pretty major discounts on that, but not all, and it’s the principle of it that bothers me. <a href="#fnref:1" rev="footnote">↩</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/08/a-follow-up-rant-about-connect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What’s wrong with Visual C++ and Microsoft Connect?</title>
		<link>http://jalf.dk/blog/2011/08/whats-wrong-with-visual-c-and-microsoft-connect/</link>
		<comments>http://jalf.dk/blog/2011/08/whats-wrong-with-visual-c-and-microsoft-connect/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 14:17:59 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[visual-studio]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=947</guid>
		<description><![CDATA[Using Visual Studio 2010 with Service Pack 1, try doing the following: create a new project of type Win32 Console Application, and under Application Settings in the project wizard, select Console Application and Empty Project. create a single .cpp file add the code int main() {} to it hit build. You’ll now get the warning [...]]]></description>
			<content:encoded><![CDATA[<p>Using Visual Studio 2010 with Service Pack 1, try doing the following:</p>

<ol>
<li>create a new project of type <code>Win32 Console Application</code>, and under <code>Application Settings</code> in the project wizard, select <code>Console Application</code> and <code>Empty Project</code>.</li>
<li>create a single <code>.cpp</code> file</li>
<li>add the code <code>int main() {}</code> to it</li>
<li>hit <code>build</code>.
<span id="more-947"></span></li>
</ol>

<p>You’ll now get the warning (listed under “Errors”, for some reason): <code>IntelliSense: PCH warning: header stop cannot be in a macro or #if block. An intellisense PCH file was not generated</code>.</p>

<p>(I zipped up a solution reproducing the problem <a href="http://jalf.dk/pcherror.zip">here</a>. Note that everything is left at the default settings.</p>

<p>What the f…? How can something so simple break IntelliSense?</p>

<p>I am sometimes amazed at the apparent lack of testing that goes into a release of Visual C++.
VC2010 beta 1 had a glaringly obvious bug, where the above program <em>would fail with a linker error</em>. Apparently, no one had thought to test a program which used the standard-compliant <code>main</code> instead of <code>wmain</code> with UNICODE enabled. Sure, it was beta, and you’d expect errors, <em>but something simpler than a Hello World should still work, shouldn’t it</em>?</p>

<p>Now we get spurious IntelliSense errors if we have the audacity to create the tiniest, simplest program imaginable, at the default settings.</p>

<p>Of course, it gets better. Because as we all know, Microsoft Connect is beyond useless, and obviously, some optimistic/foolish VC++ users had already reported the problem with this warning message. Google gave me the following three bug reports:</p>

<ul>
<li><a href="http://connect.microsoft.com/VisualStudio/feedback/details/650359/intellisense-pch-warning-can-not-find-a-suitable-header-stop-location-a-pch-file-wasnt-generated">this one, closed as <em>By Design</em></a></li>
<li><a href="http://connect.microsoft.com/VisualStudio/feedback/details/651405/pch-warning-after-installing-sp1">this, closed as <em>Duplicate</em></a></li>
<li><a href="http://connect.microsoft.com/VisualStudio/feedback/details/665628/intellisense-pch-warning-header-stop-cannot-be-in-a-macro-or-if-block-an-intellisense-pch-file-was-not-generated">And of course, no discussion of Connect would be complete without something closed as <em>Won’t Fix</em></a></li>
</ul>

<p>It is one thing that errors that practically <em>leap</em> in the user’s face are allowed to exist in a shipping product <em>at all</em>, that literally the shortest, simplest program <em>possible</em> provokes the bug, but that Microsoft closes such bugs <em>with three different close reasons</em> only serves to underline how utterly useless, random and user–<em>hostile</em> Microsoft Connect is, and it is pretty hard to escape the conclusion that there is something fundamentally wrong with how Microsoft’s DevDiv operates.</p>

<p>I am generally reasonably positive towards Microsoft’s C++ compiler. It’s nothing special, certainly, and Microsoft’s policy of <em>never ever improving an existing product</em> means it is perpetually obsolete compared to the competition, but it generally <em>works</em>, and it has made great strides towards standards compliance. But the quality of the  IDE, and of Intellisense, is really absurd, at times. VC2010 seems to have shifted the absurdity of IntelliSense from “it just plain doesn’t work”, to “It works reasonably ok, but imposes some baffling requirements on the code, has some kind of love affair with precompiled headers and seemingly doesn’t even bother with code that doesn’t have one, reports false positive ‘errors’, and lists them in the ‘Errors’ window, along with <em>actual</em> compile errors.”</p>

<p>And Connect is nothing short of an insult towards Microsoft’s customers. It is apparently staffed by monkeys, perhaps assisted by a script that randomly closes issues as “Won’t Fix”, and seems to serve the sole purpose of underlining to Microsoft’s customers, all the errors <em>that will not get fixed</em>.</p>

<p>Here’s another great example I saw in my Twitter feed just two days ago:</p>

<p><!-- tweet id : 101749031428046848 --><style type='text/css'>#bbpBox_101749031428046848 a { text-decoration:none; color:#0084B4; }#bbpBox_101749031428046848 a:hover { text-decoration:underline; }</style><div id='bbpBox_101749031428046848' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#9AE4E8; background-image:url(http://a3.twimg.com/profile_background_images/37790197/01341_headingwest_1440x900.jpg); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>Bugs like this in WPF that date back to 2007 (I just hit it in .NET 4.0) makes me lose confidence in Microsoft Connect <a href="http://t.co/6IbRGQq" rel="nofollow">http://t.co/6IbRGQq</a></span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://jalf.dk/blog/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on August 11, 2011 21:17' href='http://twitter.com/#!/kellabyte/status/101749031428046848' target='_blank'>August 11, 2011 21:17</a> via <a href="http://mobile.twitter.com" rel="nofollow" target="blank">Mobile Web</a><a href='https://twitter.com/intent/tweet?in_reply_to=101749031428046848' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=101749031428046848' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=101749031428046848' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=kellabyte'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/1452324451/avatar-53c_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=kellabyte'>@kellabyte</a><div style='margin:0; padding-top:2px'>Kelly Sommers</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<!-- tweet id : 101750164804485120 --><style type='text/css'>#bbpBox_101750164804485120 a { text-decoration:none; color:#0084B4; }#bbpBox_101750164804485120 a:hover { text-decoration:underline; }</style><div id='bbpBox_101750164804485120' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#9AE4E8; background-image:url(http://a3.twimg.com/profile_background_images/37790197/01341_headingwest_1440x900.jpg); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>Seriously 4 years on a bug that a user just has to drag something and everything busts is a pretty LONG time to not fix that… FOUR YEARS</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://jalf.dk/blog/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on August 11, 2011 21:21' href='http://twitter.com/#!/kellabyte/status/101750164804485120' target='_blank'>August 11, 2011 21:21</a> via <a href="http://mobile.twitter.com" rel="nofollow" target="blank">Mobile Web</a><a href='https://twitter.com/intent/tweet?in_reply_to=101750164804485120' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=101750164804485120' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=101750164804485120' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=kellabyte'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/1452324451/avatar-53c_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=kellabyte'>@kellabyte</a><div style='margin:0; padding-top:2px'>Kelly Sommers</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<!-- tweet id : 101750589687468032 --><style type='text/css'>#bbpBox_101750589687468032 a { text-decoration:none; color:#0084B4; }#bbpBox_101750589687468032 a:hover { text-decoration:underline; }</style><div id='bbpBox_101750589687468032' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#9AE4E8; background-image:url(http://a3.twimg.com/profile_background_images/37790197/01341_headingwest_1440x900.jpg); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>What’s worse is someone submitted a fix to the Connect bug using reflector and fixed the Microsoft code and STILL unfixed 4 yrs later</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://jalf.dk/blog/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on August 11, 2011 21:23' href='http://twitter.com/#!/kellabyte/status/101750589687468032' target='_blank'>August 11, 2011 21:23</a> via <a href="http://mobile.twitter.com" rel="nofollow" target="blank">Mobile Web</a><a href='https://twitter.com/intent/tweet?in_reply_to=101750589687468032' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=101750589687468032' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=101750589687468032' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=kellabyte'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/1452324451/avatar-53c_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=kellabyte'>@kellabyte</a><div style='margin:0; padding-top:2px'>Kelly Sommers</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<!-- tweet id : 101752540290494465 --><style type='text/css'>#bbpBox_101752540290494465 a { text-decoration:none; color:#0084B4; }#bbpBox_101752540290494465 a:hover { text-decoration:underline; }</style><div id='bbpBox_101752540290494465' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#C0DEED; background-image:url(http://a0.twimg.com/images/themes/theme1/bg.png); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>@<a href="http://twitter.com/intent/user?screen_name=kellabyte" class="twitter-action">kellabyte</a> Feedback passed over directly to very senior people in charge of WPF, expect some response</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://jalf.dk/blog/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on August 11, 2011 21:31' href='http://twitter.com/#!/TheCATerminator/status/101752540290494465' target='_blank'>August 11, 2011 21:31</a> via <a href="http://www.tweetdeck.com" rel="nofollow" target="blank">TweetDeck</a><a href='https://twitter.com/intent/tweet?in_reply_to=101752540290494465' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=101752540290494465' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=101752540290494465' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=TheCATerminator'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a1.twimg.com/profile_images/1416748284/SkypePhoto_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=TheCATerminator'>@TheCATerminator</a><div style='margin:0; padding-top:2px'>Valery M</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<!-- tweet id : 101754113309675520 --><style type='text/css'>#bbpBox_101754113309675520 a { text-decoration:none; color:#0084B4; }#bbpBox_101754113309675520 a:hover { text-decoration:underline; }</style><div id='bbpBox_101754113309675520' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#9AE4E8; background-image:url(http://a3.twimg.com/profile_background_images/37790197/01341_headingwest_1440x900.jpg); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>May be a stupid question but why does a couple tweets get more traction than 4 years of people commenting on MSFT Connect? <a href="http://twitter.com/search?q=%23SystemIsBroke" title="#SystemIsBroke">#SystemIsBroke</a></span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://jalf.dk/blog/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on August 11, 2011 21:37' href='http://twitter.com/#!/kellabyte/status/101754113309675520' target='_blank'>August 11, 2011 21:37</a> via <a href="http://mobile.twitter.com" rel="nofollow" target="blank">Mobile Web</a><a href='https://twitter.com/intent/tweet?in_reply_to=101754113309675520' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=101754113309675520' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=101754113309675520' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=kellabyte'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/1452324451/avatar-53c_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=kellabyte'>@kellabyte</a><div style='margin:0; padding-top:2px'>Kelly Sommers</div></div><div style='clear:both'></div></div></div><!-- end of tweet --></p>

<p><code>#SystemIsBroke</code> indeed. Why even have Connect, when bugs apparently only get resolved once someone with lots of followers on Twitter complain about it?</p>

<p>And of course, this gem of a response from Microsoft on the bug report itself is really remarkable:</p>

<blockquote>
  <p>I do understand your concern, but we are beyond our ZBB date, therefore only ship-blocker bugs make the bar at this point. Considering that we have shipped this bug before, it is hard to make a case that we need to fix it in this release since it did not block our previous release. Thank you.</p>
</blockquote>

<p>Wait what? I guess this pretty much confirms what we all knew: that once a bug has been closed as “Won’t Fix”, the claims that “we will evaluate this for a future release” are just pretense. What <em>actually</em> happens is that the older a bug gets, the lower priority it’s given, according to some twisted “precedence” principle. “We’ve been able to ignore the bug for X years now, so surely, there’d be no harm in ignoring it one more year”.</p>

<p>Now sure, I’m not particularly concerned about WPF, but it shows that the problems with Connect are not limited to Visual C++ issues.</p>

<p>Dear Microsoft, Connect is broken. And everyone except you knows it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/08/whats-wrong-with-visual-c-and-microsoft-connect/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C++11’ish approved!</title>
		<link>http://jalf.dk/blog/2011/08/c11ish-approved/</link>
		<comments>http://jalf.dk/blog/2011/08/c11ish-approved/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 12:43:33 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[c++0x]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=944</guid>
		<description><![CDATA[Not much to say here, other than that C++11, or possibly C++12, formerly known as C++0x, has been approved unanimously by ISO. Hurrah! Apparently, it’ll take a few months for all the paperwork and such to catch up, and then the final standard will be published by ISO (I haven’t been able to find a [...]]]></description>
			<content:encoded><![CDATA[<p>Not much to say here, other than that C++11, or possibly C++12, formerly known as C++0x, has been <a href="http://herbsutter.com/2011/08/12/we-have-an-international-standard-c0x-is-unanimously-approved/">approved unanimously by ISO</a>.</p>

<p>Hurrah!</p>

<p>Apparently, it’ll take a few months for all the paperwork and such to catch up, and then the final standard will be published by ISO (I haven’t been able to find a clear answer to whether or not this might drag the final release all the way out to 2012, but hopefully, C++0x will be forever known as C++11).</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/08/c11ish-approved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The “I don’t care about version control, I just want other programmers to stop pestering me”-guide to version control</title>
		<link>http://jalf.dk/blog/2011/07/version-control-short/</link>
		<comments>http://jalf.dk/blog/2011/07/version-control-short/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 19:24:48 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[beginners]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[version-control]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=934</guid>
		<description><![CDATA[Every so often, I come across a programmer (usually a student, or a self-taught hobbyist) who doesn’t use version control (cue shock and horror). Of course, whenever someone dares to admit this, they’re set upon by everyone and heckled and pestered until they give in and install some VCS. And then they spend a few [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often, I come across a programmer (usually a student, or a self-taught hobbyist) who <em>doesn’t use version control</em> (cue shock and horror).</p>

<p>Of course, whenever someone dares to admit this, they’re set upon by everyone and heckled and pestered until they give in and install some VCS. And then they spend a few afternoons moaning about how they “could have been coding instead”.</p>

<p>And it occurred to me that there doesn’t seem to be any short, simple, minimalist guide to setting up and using a VCS system. There are plenty of excellent tutorials and guides which explain everything about everything, and are an amazing resource to those willing to actually spend time to learn how to use their tool.</p>

<p>But newcomers to version control are generally someone who’s willing to give it 2–3 minutes, if it’ll shut everyone else up so they can get back to coding. They’re not interested in knowing what their code looked like 7 months ago, or what exact changes were committed on the 28th of June 2010 at 9:37 pm. And they don’t really see why they’d want to branch and merge their code.</p>

<p>Thus…
<span id="more-934"></span></p>

<h1>The 5-minute guide to Bazaar<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></h1>

<p>You can use any VCS you like. But the distributed variants (DVCS) are newer, shinier, more powerful and easier to use. So use one of those. The three main ones are Git, Mercurial (Hg) and Bazaar (Bzr), in decreasing order of popularity (and, subjective alert, increasing order of user-friendliness). In any case, I like Bazaar, so that’s what this guide is going to use.</p>

<h2>Install Bazaar</h2>

<p><a href="http://wiki.bazaar.canonical.com/Download">Pick yer poison</a>. Bazaar is available for pretty much any OS. Pick the relevant one, download it and install it. (For Windows, you probably want the standalone installer, not the Python ones — unless you have Python installed, in which case you can pick the Python-based one if you like.</p>

<h2>Fire up the command line</h2>

<p>On Windows, that’s good old cmd.exe. On OS X or Linux, you’ve got terminals and a half-dozen different shells.<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>

<p>Now, <code>cd</code> to wherever your code is:</p>

<pre><code>c:\somewhere&gt; cd \dev\myproject
c:\dev\myproject&gt;
</code></pre>

<p>Initialize a repository. A repository is a small file-based database storing current and past versions of your code.<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup></p>

<pre><code>c:\dev\myproject&gt; bzr init
Created a standalone tree (format: 2a)
</code></pre>

<p>There we go. Bazaar now assumes that the current directory is what it’s supposed to track. It just created a subfolder with the name <code>.bzr</code>, into which it’s going to store all the versioning data associated with your project. If you ever want to just rip everything Bazaar out of your project, just delete that folder.</p>

<p>Now, it’s time to tell Bazaar which files to track:</p>

<h2>Putting files under version control</h2>

<p>We’ve probably already got some code, spread over one or more files. There’s almost certainly also some temporary files, intermediate files creating during a build, and your final executable, and whatever else, which we <em>do not</em> want to version control. Your VCS system should track the files needed to build your project. No more, no less.</p>

<p>So we need to divide our code up into these two groups. Files that should be version-controlled, and files that should be left out.</p>

<p>A good start is to ask Bazaar what it sees. If your project is a Visual C++ 2010 project, it might look something like this:</p>

<pre><code>c:\dev\myproject&gt; bzr status
unknown:
  Debug/
  myproject.sdf
  myproject.sln
  myproject.vcxproj
  myproject.vcxproj.filters
  myproject.vcxproj.user
  ipch/
  main.cpp
</code></pre>

<p>These are the files and directories which Bazaar found, and which, as it says, are <em>unknown</em>. We haven’t yet told Bazaar anything about them.</p>

<p>Well, running through the list, we can see:</p>

<ul>
<li><code>Debug</code>, where the output of a debug build are stored. It contains a half-dozen different file types, from our <code>myproject.exe</code> to a bunch of build logs, and intermediate build files, manifests and other stuff. It’s all generated during build, so we don’t want any of it.</li>
<li>The Intellisense database, <code>myproject.sdf</code>, and an associated <code>ipch</code> directory storing some other Intellisense cruft which is also generated automatically.</li>
<li>The Solution file, which we <em>do</em> want Bazaar to keep track of</li>
<li>The project file, including the project filters it uses, both of which should be version-controlled, and the <code>.user</code> file containing user-specific configuration. If you’re just one developer, you can let Bazaar track this as well, but with more than one developer, each will probably want his own <code>.user</code> file, so I’ll assume you want to keep it out.</li>
<li><code>main.cpp</code> — our actual source code. This should <em>definitely</em> be version-controlled.</li>
</ul>

<p>Well, we could selectively add the files we wanted, but that would leave us with <code>bzr status</code> being all cluttered up showing files we don’t care about. Instead, we should tell Bazaar to ignore the files we don’t want. Then we can add everything else.</p>

<pre><code>c:\dev\myproject&gt; bzr ignore Debug/
c:\dev\myproject&gt; bzr status
added:
  .bzrignore
unknown:
  myproject.sdf
  myproject.sln
  myproject.vcxproj
  myproject.vcxproj.filters
  myproject.vcxproj.user
  ipch/
  main.cpp
</code></pre>

<p>ok, so a very short detour first, We told Bazaar to ignore the <code>Debug</code> directory. (The trailing <code>/</code> tells Bazaar that it should only ignore <em>directories</em> with the name <code>Debug</code>. The command <code>bzr ignore Debug</code> would have ignored both files and directories named <code>Debug</code>.</p>

<p>Note that <code>bzr status</code> now shows us something a bit more interesting. <code>Debug/</code> has vanished from the eyes of Bazaar. The directory still exists, but we told Bazaar to ignore it, so it does. It is no longer “unknown”. On the other hand, we now have a <code>.bzrignore</code> file, and it is not unknown, it’s “added”. This means that it is registered as something that should be added to Bazaars repository, but it hasn’t actually been done yet. As you might have guessed, this is where it stores the information that <code>Debug/</code> should be ignored. Feel free to look inside the <code>.bzrignore</code> file, or edit it by hand. There’s no magic in it.</p>

<p>Now, let’s move on and ignore the remaining files:</p>

<pre><code>c:\dev\myproject&gt; bzr ignore Debug/
c:\dev\myproject&gt; bzr ignore /*.sdf
c:\dev\myproject&gt; bzr ignore *.user
c:\dev\myproject&gt; bzr ignore ipch/
c:\dev\myproject&gt; bzr status
added:
  .bzrignore
unknown:
  myproject.sln
  myproject.vcxproj
  myproject.vcxproj.filters
  main.cpp
</code></pre>

<p>Pretty straightforward, eh? Note that we can use <code>*</code> as wildcards, allowing us to ignore entire groups of files. We can also use a leading <code>/</code> to indicate that this rule only applies if the pattern matches <em>starting from the root</em>. In other words, we want to ignore <code>.sdf</code> files found in the root, but not in subdirectories, whereas with <code>.user</code> files, we just want a blanket ban. Wherever they’re found, Bazaar should ignore them.</p>

<p>Now our status  is down to showing just the files we actually <em>want</em> to add. So let’s just add everything.</p>

<pre><code>c:\dev\myproject&gt; bzr add
adding myproject.sln
adding myproject.vcxproj
adding myproject.vcxproj.filters
adding main.cpp
</code></pre>

<p>Here, it’s time for another little word of caution:<br />
We just told bazaar to add <em>everything</em> it can see. It will do so recursively. In my little example, that makes no big difference because I only had one subdirectory, and I already told Bazaar to ignore it. If you have subdirectories that are not ignored, then this command will make Bazaar add everything the files inside them as well, <em>even if they weren’t listed on the <code>bzr status</code> output</em>, which doesn’t look inside unknown directories. So it is possible that the <code>add</code> command just added a bunch of other intermediate files, which you didn’t actually want to put under version control. If so, you can use <code>bzr rm &lt;filename&gt;</code> to selectively remove files from version control again. Alternatively, you can just delete the intermediate files, and when Bazaar tries to add them in a minute, it’ll realize they don’t exist, and figure out that you probably didn’t want to add those after all. Or, of course, you could have played it safe and added <em>only</em> the directory itself (<code>bzr add mydir</code>), after which <code>bzr status</code> would have shown the contents of the directory as well, allowing you to easily see what should be ignored and what should be added.</p>

<p>At this point, either read over the output from <code>bzr add</code> above, or run a <code>bzr status</code> and check the <code>added:</code> section.
Make sure that the files you <em>want</em> to add are on the list, and that none of your generated/temporary files are. If your ignore patterns hide too many files from Bazaar, go ahead and edit the <code>.bzrignore</code> file.</p>

<h2>Committing changes</h2>

<p>Assuming the list of added files now matches what we actually <em>want</em> to add, go ahead and tell Bazaar to commit these changes:</p>

<pre><code>c:\dev\myproject&gt; bzr commit
</code></pre>

<p>Or, as I prefer,</p>

<pre><code>c:\dev\myproject&gt; bzr commit -m "initial commit: added files"
</code></pre>

<p>When you commit, Bazaar expects a small text message describing the changes that were just committed. With <code>-m</code> you can specify this message directly. If you don’t, Bazaar will open a text editor so you can type the message there, save the file and close the editor.</p>

<p>In both cases, you’ll get this output:</p>

<pre><code>Committing to: C:/dev/myproject/
added .bzrignore
added myproject.sln
added myproject.vcxproj
added myproject.vcxproj.filters
added main.cpp
Committed revision 1.
</code></pre>

<p>Now, Bazaar has stored a copy of all the files it knows about (files you just added, and files added previously) inside its <code>.bzr</code> subdirectory. If you ever want to go back and check what your code looked like in revision 1, you just have to ask Bazaar (but I won’t tell you how, because this is supposed to be a short minimalist guide).</p>

<p>Just for good measure, check the status again:</p>

<pre><code>c:\dev\myproject&gt; bzr status

</code></pre>

<p>Nothing. Bazaar sees nothing interesting. There are some ignored files, but we’re ignoring those. And there are some other files, which Bazaar already knows about, and they’re unchanged compared to the version Bazaar knows. So it has nothing to say, and is polite enough to say nothing.</p>

<p>This is what we like to see, because it means Bazaar is completely up to date on our code.</p>

<p>Now, go ahead and write some code. Change something in one of your files (in my case, that’ll be <code>main.cpp</code> since that’s the only actual code file I have), and run <code>bzr status</code> again:</p>

<pre><code>c:\dev\myproject&gt; bzr status
modified:
  main.cp
</code></pre>

<p>Aha! Bazaar has detected that our file has been modified, and these changes have not been recorded by Bazaar. Well, perhaps that’s because the code doesn’t compile, in which case that’s fine. We only want Bazaar to store the changes that are actually worth storing. The ones that mark an improvement to the code, or the ones we might want to be able to recover later on.</p>

<p>But perhaps these changes <em>are</em> actually something we’d like to keep, in which case we commit them:</p>

<pre><code>c:\dev\myproject&gt; bzr commit -m "Fixed a ton of bugs in main.cpp"
Committing to: C:/dev/myproject/
modified main.cpp
Committed revision 2.
</code></pre>

<p>And once again, <code>bzr status</code> is empty because everything is exactly as Bazaar expects it to be. Our code looks exactly like what Bazaar was given in our last commit.</p>

<p>And that is basically it. You’re now using version control. When you add new files to your project, just remember to <code>bzr add</code> them. When you’ve made some interesting changes, run <code>bzr commit</code> to tell Bazaar to store a snapshot of your code as it looks now. Regularly run <code>bzr status</code> in between to check that Bazaar’s view of the world correlates with your own. If it shows any <em>unknown</em> files, get them added or ignored. And if it shows other changes, it provides a list of what changes would be committed if you ran <code>bzr commit</code> now. (And also, a list of which changes would be lost if you accidentally overwrote the modified file).</p>

<p>If you want to look up how a command is used, simply type <code>bzr help &lt;command&gt;</code>.</p>

<p>Of course you can do all sorts of interesting things with your repository now<sup id="fnref:4"><a href="#fn:4" rel="footnote">4</a></sup>, but you wanted the quick version. As long as you add new files, and regularly commit your changes, other programmers will shut up and leave you alone. When you actually need the more interesting features of your version control system, you can always look them up.</p>

<p>But for now, you can go back to coding, and no longer have to hide when people ask “so do you use version control?”.</p>

<p>See? That wasn’t so bad, was it?</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>I chose <a href="http://bazaar.canonical.com/en/">Bazaar</a> because it’s my preferred VCS tool, and thus, easier for me to run through in record time. No big arguments here about why X is better than Y. There are dozens such sites already, proving conclusively that Git is better than Hg, Hg is better than Bzr and Bzr is better than Git. And of course, there are other sites showing just as clearly that the opposite is true. It just doesn’t matter. All three are <em>good enough</em>, and are used on several major software projects. I like Bzr because it’s convenient and easy to use. I’ve never used Hg, but that looks nearly as convenient and easy to use. Git is less convenient and less easy to use, but makes up for it by being ridiculously widely used. <a href="#fnref:1" rev="footnote">↩</a></p>
</li>

<li id="fn:2">
<p>Yes, there are graphical front-ends available as well. Bazaar comes with Bazaar Explorer, for example. Use them if you like. I use the command line interface because, to be honest, I find it to be the simplest and fastest solution. As you’ll see, the commands are all very simple, so just leave a command prompt (or terminal, for you Unixy folks) open in the background while you code. <a href="#fnref:2" rev="footnote">↩</a></p>
</li>

<li id="fn:3">
<p>Technically, in Bazaar it’d be more correct to say you are initializing a (named) branch. That’s what <code>bzr help init</code> says about the command too. The difference doesn’t really matter for now. Other VCS systems call this a repository. In brief, a repository stores the version history for one or more branches. In most VCS systems, you <em>need</em> a repository, because that’s where your branches are stored. Bazaar <em>allows</em> you to create a common repository which any number of branches can use to store data, eliminating a lot of duplication and speeding up certain operations. But a branch can also just store all its history itself. That’s the lazy option, and what we’re doing here. Look up “shared repositories” if you’re curious about how to use repositories in Bazaar. <a href="#fnref:3" rev="footnote">↩</a></p>
</li>

<li id="fn:4">
<p>in particular, once you’re willing to spend another minute or two fiddling with version control, you should investigate <code>bzr push</code>, which pushes a copy of your branch to another location — a different directory on your computer, or a remote server. This is obviously handy for sharing code, but it’s also a very convenient way to take backups. <a href="#fnref:4" rev="footnote">↩</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/07/version-control-short/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It’s that time of the year, I guess</title>
		<link>http://jalf.dk/blog/2011/07/its-that-time-of-the-year-i-guess/</link>
		<comments>http://jalf.dk/blog/2011/07/its-that-time-of-the-year-i-guess/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 17:45:43 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[gfwl]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=930</guid>
		<description><![CDATA[Hooray! Games for Windows Live is being relaunched again. Considering all the fun I had last time, I personally can’t wait for this. I am sure we’re all very excited to see if the Marketplace will actually allow us non-Americans to spend our money once this merger goes through. That would be incredible. Then they’d [...]]]></description>
			<content:encoded><![CDATA[<p>Hooray!</p>

<p>Games for Windows Live is <a href="http://www.joystiq.com/2011/07/02/games-for-windows-marketplace-to-merge-with-xbox-com-on-july-11/">being relaunched</a> again.</p>

<p>Considering <a href="http://jalf.dk/blog/2010/11/gfwl-malice-or-incompetence/">all the fun</a> I had last time, I personally can’t wait for this.
<span id="more-930"></span>
I am sure we’re all very excited to see if the Marketplace will actually allow us non-Americans to spend our money once this merger goes through.</p>

<p>That would be incredible. Then they’d just need to do something about their horrible client, the horrible restrictions it places on games, the horrible infrastructure it allows games to use, and all the other ways in which it currently tries so very hard to make games unbuyable, unpatchable, and unplayable. If they then also were to start taking <a href="http://www.spilljenta.com/2011/06/status-update/">potential security issues seriously</a>, then we might finally have reached a point where it stops <em>detracting</em> value from the games it is inflicted upon.</p>

<p>Or, of course, this could be yet another attempt at “rebranding” the same miserable junk “service” they’ve had for years.
It certainly wouldn’t be the first time they put out press release about how the service <a href="http://www.shacknews.com/article/67756/microsoft-games-windows-live-had#itemanchor_25453260">is</a> <a href="http://www.shacknews.com/article/66930/report-microsoft-to-focus-on">going</a> <a href="http://www.shacknews.com/article/55890/the-new-games-for-windows">to</a> <a href="http://www.shacknews.com/article/43364/microsoft-gamefest-2006-microsofts-games">improve</a>.</p>

<p>So far, it hasn’t <a href="http://arstechnica.com/gaming/news/2011/05/editorial-games-for-windows-live-is-a-broken-mess-and-i-hate-it.ars">won</a> <a href="http://www.rockpapershotgun.com/2011/03/09/on-the-rocks-games-for-windows-live/">many</a> <a href="http://www.rockpapershotgun.com/2009/01/27/fallout-3-new-content-adventures-in-gfwl/">people</a> <a href="http://www.rockpapershotgun.com/2008/03/03/boycott-games-for-windows-live/">over</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/07/its-that-time-of-the-year-i-guess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM Status Page</title>
		<link>http://jalf.dk/blog/2011/06/stm-status-page/</link>
		<comments>http://jalf.dk/blog/2011/06/stm-status-page/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 14:50:13 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[stm]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=907</guid>
		<description><![CDATA[As I mentioned not too long ago, I’ve recently resumed work on the STM library I created for my Masters Thesis. It’s still not quite where I want it to be, but I felt that at the very least, it deserved a proper status page. So here it is. A brand new page on my [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://jalf.dk/blog/2011/04/empty-statement-of-intent/">not too long ago</a>, I’ve recently resumed work on the STM library I created for my Masters Thesis.</p>

<p>It’s still not <em>quite</em> where I want it to be, but I felt that at the very least, it deserved a proper status page. So <a href="http://jalf.dk/blog/stm/">here it is</a>. A brand new page on my blog. As I’m still rather busy, I can’t promise that much will happen with the library over the summer, but when something significant happens, that page will be the first to know.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/06/stm-status-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Windows 8 Touch UI</title>
		<link>http://jalf.dk/blog/2011/06/the-windows-8-touch-ui/</link>
		<comments>http://jalf.dk/blog/2011/06/the-windows-8-touch-ui/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 09:25:59 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Meanwhile]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=882</guid>
		<description><![CDATA[I don’t get it. They obviously went to a lot of trouble to design a new touch-based interface. But because they need backwards compatibility as well, they have a “traditional” apps isolated into a kind of “Windows 7 ghetto”, something that looks just like Windows 7, and with no visible trace of being integrated into [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t get it.</p>

<p>They obviously went to a lot of trouble to design a new touch-based interface.
But because they need backwards compatibility as well, they have a “traditional” apps isolated into a kind of “Windows 7 ghetto”, something that looks just like Windows 7, and with no visible trace of being integrated into the whole Win8/touch thing… And this is for traditional PC’s. On my PC, I’m apparently going to have to choose which environment I’m using currently, because there’s limited interaction between them. And both worlds are going to suffer from that.
<span id="more-882"></span></p>

<p>But why did they do this? A traditional PC doesn’t benefit from a touch interface. So on a PC, they went to the trouble of providing a new, shiny-looking UI, which doesn’t integrate well with what a PC needs to <em>do</em>, or with the apps that already exist on a PC.</p>

<p>And on tablets? Well, they’re most likely going to use the infamous ARM port of Windows, aren’t they? And that means they won’t be able to run existing applications <em>anyway</em>. But they still get to drag around the entire legacy desktop “ghetto” UI. Why? So that they can run the PC versions of Excel or Visual Studio (assuming an ARM port exists)? Yeah, that’ll be hilarious to use.</p>

<p>From what we’ve seen so far, Microsoft has managed to produce a good touch-based UI — something that might actually give them a fighting chance in the tablet space. And they’ve got a good keyboard/mouse-based UI already. (A good command-line based UI is still MIA, of course) — and at the same time, Windows Phone makes no attempt at compatibility, and lives in its own little world.</p>

<p>I suspect that one of the keys to Apple’s success is that they’ve exploited each platform’s differences. They didn’t try to make OSX run on the iPhone or iPad. They wrote iOS for that (admittedly with a lot of code reuse, but as separate beasts with separate APIs and UIs). The result is that every iPad app is written for iOS and for  touch. Every OSX app is written for OSX and for the “PC” platform, for mouse and keyboard.</p>

<p>Trying to make every device do everything, as Microsoft is seemingly doing, sounds like it will merely give us the “traditional” Windows experience, the feeling that every app is written in another era, for a very different platform, with no attempt at fitting in. So our mouse-based apps on our tablets will get a fresh brush of paint, and then they’ll be let loose on the WinTablet. We’ll get touch-based apps designed for tablets, running on PC Windows, and trying to coexist with Excel, Visual Studio, Minesweeper, Notepad and Outlook. And no matter where the user turns, he’ll be faced with apps designed for a completely different UI paradigm. But for what purpose? Does Microsoft seriously think people will buy their tablet over the iPad <em>because it runs MS Word</em>? And are people going to buy a Windows 8 PC just so they can, using a mouse, play a port of Angry Birds or another touch-based game?</p>

<p>I don’t understand the attempt to make both coexist on every device. Neither PC’s nor tablets need both. Do they? Both seem to be weakened by the presence of the other. Can you honestly say that you’d like your iPad <em>more</em>, if it allowed you to run OSX apps out of the box, without requiring the apps to be rewritten and redesigned for touch? I doubt it.</p>

<p>I don’t get it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/06/the-windows-8-touch-ui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Panic-time is over</title>
		<link>http://jalf.dk/blog/2011/05/panic-time-is-over/</link>
		<comments>http://jalf.dk/blog/2011/05/panic-time-is-over/#comments</comments>
		<pubDate>Tue, 17 May 2011 09:08:38 +0000</pubDate>
		<dc:creator>jalf</dc:creator>
				<category><![CDATA[Meanwhile]]></category>

		<guid isPermaLink="false">http://jalf.dk/blog/?p=861</guid>
		<description><![CDATA[It’s been a bit quiet on this blog for a while. The last month or so has been brutal. By May 16th, I had to be out of my old apartment (long story), meaning I’ve had to find another place to live pretty urgently. Without getting into all the painful details, I’ve spent most of [...]]]></description>
			<content:encoded><![CDATA[<p>It’s been a bit quiet on this blog for a while. The last month or so has been brutal. By May 16th, I had to be out of my old apartment (long story), meaning I’ve had to find another place to live pretty urgently.</p>

<p>Without getting into all the painful details, I’ve spent most of the last month or two trying to find a new apartment, and this past weekend was spent moving out of our old apartment, painting it and fixing it up. It’s been stressful, and it hasn’t left much time for anything else.</p>

<p>Until July 1st, when I get to move into the new apartment, I’ll be living on a friend’s couch, so things aren’t quite back to normal yet. But the worst part is over, and hopefully I’ll be able to spend a bit of time now on interesting things, such as blogging, coding and blogging about coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://jalf.dk/blog/2011/05/panic-time-is-over/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

