<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     >
  <channel>
    <title>Macha</title>
    <link>http://blog.initprogram.com</link>
    <description>Gaming, Programming and Random Rants</description>
    <pubDate>Tue, 27 Sep 2011 19:00:05 GMT</pubDate>
    <generator>Blogofile</generator>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>76 IEs? Not Likely.</title>
      <link>http://blog.initprogram.com/2011/09/27/76-ies-not-likely/</link>
      <pubDate>Tue, 27 Sep 2011 19:35:00 IST</pubDate>
      <category><![CDATA[Technology]]></category>
      <category><![CDATA[Programming]]></category>
      <guid isPermaLink="true">http://blog.initprogram.com/2011/09/27/76-ies-not-likely/</guid>
      <description>76 IEs? Not Likely.</description>
      <content:encoded><![CDATA[<p>Paul Irish believes that by 2020, web designers will be forced to
   <a href="http://paulirish.com/2011/browser-market-pollution-iex-is-the-new-ie6/">support 76 variations of Internet Explorer</a> between the nearly annual release schedule IE is on lately and the compatibility modes each of these IEs will have for previous versions of Internet Explorer. <sup id="fnr1-133215864"><a href="#fn1-133215864">1</a></sup>
</p>
<p>IE6's entrenched position came from the fact that (a) it was the latest version of Internet Explorer for a <strong>huge</strong> amount of time and (b) its status as the IE dead end for Win2k and below.
</p>
<p>When IE7 came out, any company that still had any Win2k machines had to keep designing with IE6 in mind if they wanted their new apps to work on all their computers. (I'm making the assumption that if they were relying on IE previously, they couldn't just switch to Firefox or something).
</p>
<p>Now, IE8 I think most people can accept is going to end up in IE6's current place. It's the IE dead end for XP, a hugely popular OS. But IE7? None of those companies that don't upgrade upgraded to IE7. Home users that upgrade will also have installed the IE8 upgrade. So you're left with what? Unpatched Vista installations. These are much rarer than unpatched XP installations simply because Vista had a shorter lifespan, and Windows Vista to 7 is sufficiently undramatic an upgrade for the types of people who would take years to go from XP to Vista.
</p>
<p>So so far we have:
</p>
<ul>
 <li>
     IE6 will drag on as long as XP does.
 </li>

 <li>
     IE7 won't last particularly long. While it's popular now,
       earlier Vista computers will be replaced in the close 
       future (2-3 years), causing it to lose market share to IE8.
 </li>

 <li>
     IE8 will have a long lifespan, although probably not as long as IE6.
 </li>
</ul>
<p>IE9? IE9 has never been shipped by default with any version of Windows. That means anyone who installed it did decide to upgrade. These users will likely upgrade away, meaning in the future, IE9 will be even more of a non-issue than IE7.
</p>
<p>IE10 will likely also go the way of IE7. While it will be installed by default on Windows 8, the amount of dramatic changes in W8 will scare off many of the companies that are slow to upgrade.
</p>
<p>So in 5 years time, what versions of IE will realistically you need to support?
</p>
<ul>
 <li>
     IE6 (maybe - probably, hopefully, enterprise only at this stage)
 </li>

 <li>
     IE8
 </li>

 <li>
     IE10 (enterprise will never use it because Win8 is scary and different to them
       so for home users only)
 </li>

 <li>
     IElatest-1 So IE13 or something?
 </li>

 <li>
     IElatest IE14 or something.
 </li>
</ul>
<p>Needing to support IE6 and IE10 will likely be mutually exclusive, so that's 4 versions for sites targeted at home users and 5 for sites aimed at both enterprise and home users. Still ugly, but far from 76. And all those versions will be dead in the timescale that the article is using. Insofar as IE6 will ever die, anyway.
</p>
<p>IE6 for home users will be dead at that point. Most of those old early XP computers will be "broken" and replaced, even if "broken" is just slow and annoying. Using XP in five years will be like using Win98/Win2k. Yes, people do use them. No, they aren't a large enough group for most to worry about. I even have a small amount of hits from Netscape 6. I haven't a clue what my page looked like for them, and don't care.
</p>
<p>In theory, if even IE is aiming for at least yearly releases from now on, no future IE will end up in the position that IE6 is in, and that IE8 will find itself in, as upgrading your browser frequently becomes a fact of life. The compatibility modes will be much less important too, as the shorter lived the browser, the less likely that the compatibility mode for it will ever be used.
</p>

<div class="footnote"><hr/><ol>
 <li id="fn1-133215864"><p>This post was originally posted as a comment on HN. <a href="http://news.ycombinator.com/item?id=3044428">Check the thread</a> for possible replies.<a href="#fnr1-133215864" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
</p>

 </li>
</ol>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Not Invented Here and New Programmers</title>
      <link>http://blog.initprogram.com/2011/05/10/not-invented-here-and-new-programmers/</link>
      <pubDate>Sun, 08 May 2011 19:00:00 IST</pubDate>
      <category><![CDATA[Programming]]></category>
      <guid>http://blog.initprogram.com/2011/05/10/not-invented-here-and-new-programmers/</guid>
      <description>Not Invented Here and New Programmers</description>
      <content:encoded><![CDATA[<p>The general consensus is that the one of the best ways to learn how to program
   better, beyond learning the basic syntax is to
   just go ahead and write some programs on your own. Another consensus is
   that the best type of program to write is one that scratches your own
   itch. Yet another consensus is that it is best to avoid the "Not
   Invented Here" syndrome of writing everything from scratch and instead
   reuse as much code as possible.
</p>
<p>However, for someone learning to program today, for the most part, large
   parts of any
   itch that could be scratched has already been done so by someone else.
   Usually, this is someone who has done a much better job of it than any
   newbie code. This means that if they follow the advice regarding NIH,
   they would be reduced to writing glue code for quite some time, tying
   together libraries written by other people while they program relatively
   boring code.
</p>
<p>The problem with this is twofold:
</p>
<ol>
 <li>
     The newbie doesn't really learn much about designing their own
        programs. Sure, they see how the (hopefully) well written libraries
        do it, but they don't get to see the thought process required, or any
        of the refactoring that removes earlier bad design decisions.
 </li>

 <li>
     Glue code is boring. How many people are driven away from programming
        by this experience?
 </li>
</ol>
<p>One of the first big programs I wrote personally was a PHP social network. I did
   many parts of it from scratch - a database abstraction library, a templating system,
   even a primitive MVC system<sup id="fnr1-837129986"><a href="#fn1-837129986">1</a></sup>, and so on. The code that 
   resulted was horrible, and probably riddled with security problems, but I 
   learned a lot from the process.
</p>
<p>How would a newbie do that nowadays? They'd install cakePHP or Django or
   Rails, getting them a DBA layer, templating, MVC all written for them.
   And sure, the resulting program will probably be cleaner and less buggy, as all the
   hard parts are handled by the framework. But the job of the programmer
   gets relegated to writing some models and a few views that are pretty
   much the same everywhere.
</p>
<p>But then a lot of the benefit from trying to write a
   program for themselves just isn't there. They don't get the benefit of
   finding out why some ideas don't work, as they just use the framework.
   Most of what they learn are the APIs of the framework, not any of the
   thought processes involved in creating the program. Not to mention,
   while people writing more complex programs than anything a newbie might
   be delighted to have that problem taken out of their hands, as they
   figure out how to make their database not fall over with 20k users.
</p>
<p>The fun of programming is solving new problems. That's why Rails and co.
   are so popular. After you've written your second or third wep app, then
   these problems quickly become old problems, and having Rails handle them
   for you is really convenient. But for a new programmer, they haven't
   solved these before. Their programs will not be as ambitious (as
   anything that ambitious will most likely be dismissed by them as too
   hard), so having Rails solve these problems will leave them without any
   problems to solve.
</p>
<p>Of course, another benefit is that when they are finished, they can go
   look at the existing solution to see how it compares to their own
   solution. This can help them to compare the thoughts that led to their
   own solution to the (presumably) better result of the existing solution.
   If they managed to find some itch that hadn't been scratched by someone
   else already, they wouldn't be able to find a sample to compare to their
   own work.
</p>
<p>In short, laying off the avoidance of "Not Invented
   Here" can help newbies learn quicker in many cases than 
   being relegated to writing glue code.
</p>

<div class="footnote"><hr/><ol>
 <li id="fn1-837129986"><p>Before I knew what MVC was, so it ended up as more of a VC system.<a href="#fnr1-837129986" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
</p>

 </li>
</ol>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Android, the early days</title>
      <link>http://blog.initprogram.com/2011/03/09/android-the-early-days/</link>
      <pubDate>Wed, 09 Mar 2011 21:25:00 GMT</pubDate>
      <category><![CDATA[Me]]></category>
      <category><![CDATA[gadgets]]></category>
      <guid>http://blog.initprogram.com/2011/03/09/android-the-early-days/</guid>
      <description>Android, the early days</description>
      <content:encoded><![CDATA[<p>So, for quite some time, I've been meaning to buy a smartphone to
   replace my current dumbphone and iPod Touch 2G combination. It had
   worked fairly well for most of the last few years, with a few exceptions, but I
   was getting tired of carrying around 2-3 devices with me (depending on
   if I needed a camera or not) and iOS 4 was very problematic. I was left
   to choose between a stable, responsive device (downgrading to 3.1.2) and one which could continue to install most apps from the App Store. My iPod Touch 2G was also looking like it would soon fall completely to 
   the onslaught of planned obselence breathing down it's neck, as updates
   such as iOS 4.3 did not appear to support it, and many apps ran
   unacceptably slowly on it.
</p>
<p>Initially I had hoped to buy a device in roughly the price range of a
   new iPod Touch, at around €300. This obviously ruled out the iPhone, but
   I reckoned that once I'd eliminated the Apple tax, I'd be able to get an
   acceptable smartphone for that price range.
</p>
<p>As some of you already laughing at my naivety have guessed, I was wrong
   on that point. The sub-€300 price range was represented by a cheap
   Vodafone branded phone, the obsolete-at-birth Sony Ericsson X8, and the
   Samsung i5500 and HTC Wildfire, both of which had a screen resolution
   identical to my 3 year old €80 dumbphone, the Sony Ericsson k800i.
   Nice job guys. I know it's relatively the budget end but you're selling a
   smartphone that has fallen at the first hurdle to a 3 year old phone at
   1/3 of the price.
</p>
<p>So with the budget end ruled out, I waited a while until I had enough
   cash and decided to have a look at more expensive phones. The iPhone?
   €460 for the obselete 3GS, €600 for the iPhone 4. Pass. Around the €400
   mark, I noticed the HTC Desire. It was certainly well reviewed and the
   3.7" screen was roughly around the size I wanted. It did however look a
   little dated with the HTC Desire HD and HTC Desire Z having been
   released since. 
</p>
<p>None of the networks here sold the Desire Z, which limited my HTC
   choices to the HTC Desire or the Desire HD. There was also the Samsung
   i9000 hanging around that price point also, but the general consensus I
   got from people I knew was that HTC was the better of the two.
</p>
<p>So, with the choices down to two, I agonised over the HTC Desire vs. the
   HTC Desire HD. While the HTC Desire HD was €50 dearer, that wasn't a
   major factor. Instead, I was worried that the 4.2" screen was too big
   for practicality.
</p>
<p>However, that decision was made for me pretty quickly when HTC announced
   the Desire S, a definite replacement to the Desire. Not as you might
   think, to wait for the Desire S, as with the phone networks here there
   is no telling how long that would be, but for the Desire HD. So pretty
   quickly I went into the store to buy it. I know, I know. You bought it
   in store? What a caveman! However, the online discount of €30 was only
   slightly more than the €20 discount I got in store from switching from
   O2 to Vodafone, and I find it always helps to be able to shout at a
   specific store if things go wrong.
</p>
<p><img src="http://i.imgur.com/GSih0.jpg" alt="My new phone"/>
</p>
<p>When I'd first bought my iPod Touch, one of my initial thoughts was how
   much better the screen looked than any other device I'd owned before.
   While people with Retina displays might scoff at the 800x480 screen on
   the Desire HD, that too managed to inspire the same reaction, being a
   huge improvement over my old iPod Touch's 320x480 screen. 
</p>
<p>Performance was a huge improvement too, although anything would have
   been as iOS 4 completely destroyed any semblance of responsiveness in my
   iPod Touch. However, it still seemed faster than my iPod had been under
   3.1.2 and than my friend's 3GSes (none of them had an iPhone 4 for me to
   compare with).
</p>
<p>It's more stable than iOS from what I've seen so far. Safari used to
   crash on a fairly regular basis, occasionally requiring the entire iPod
   to be rebooted. However, I'm not willing to make a final judgement on
   this until I've used the device a bit more, and twice I've hit the home
   button to be brought back to a Loading dialog for a minute instead of my home screen,
   as if the home screen app has been closed.
</p>
<p>Compared to an unjailbroken iOS device, the vanilla Android experience
   is extremely well featured. Notifications are handled much better,
   though the pull down UI was a bit unusual. I like the idea of the
   letters typed appearing above the area occupied by my fingers, though on
   my first few uses as I got used to it from iOS, I had to shrug off the
   feeling that I was hitting the wrong button upon seeing this. One annoyance when typing that I still mess up is that the close
   keyboard button occupies the space taken by the button to bring up
   numbers and symbols on iOS devices. I've heard that this keyboard is HTC
   specific, but I haven't access to any other Android device to check at
   the moment.
</p>
<p>Applications are pretty good too. My must have App Store  apps on an iOS device are
   Twitter, Canabalt and Angry Birds. Far from a huge collection,
   obviously, as I got bored of most other apps and removed them
   eventually, and for some found they never worked that well anyway on my
   iPod (Call of Duty, Simcity, etc.). Angry Birds is on Android, free too,
   though the ads are somewhat annoying. If they offered a paid no-ads
   option I would probably buy it again. Canabalt is not, however my device
   has a flash player, so I can actually play it on <a href="http://canabalt.com">Canabalt's
website</a>. I probably won't, because it's not the
   most practical, thought it was a funny discovery.
</p>
<p>Twitter was already included on the device, and my first few comments
   were about how it was inferior to Twitter for iPhone, but acceptable. A
   quick search of Twitter clients (Twidroyd, HTC Peep) failed to show up
   anything better so I stuck with Twitter for Android. However, I soon
   discovered that preinstalled apps don't auto update, and manually
   installing it from the Market got me Twitter for Android 2. Which is
   pretty close to the iPhone app, missing only the My Tweets, Retweeted
   functionality. On the plus side, it has no dickbar.
</p>
<p><img src="http://3.bp.blogspot.com/-WhEQKCWgNw4/TVRH-qhSCXI/AAAAAAAAAKo/EC1yo1M1E1Q/s1600/android-screenshot-1b.jpg" alt="Twitter for Android 2, seem familiar?"/>
</p>
<p>Moving onto jailbreak applications, my must haves were sbsettings,
   MxTube, and.. and.. well that was about it really at the end. sbsettings
   I do miss, mainly for the brightness control, as auto brightness (on
   either device) never seems to set brightness to the minimum, which makes
   using the device when it's anyway dark rather painful. MxTube had tons
   of equivalents on the Android market, and the one I went for is
   TubeMate. It's a bit clunky, but it'll do.
</p>
<p>I also found plenty of GBA emulators. While there was one on the iPhone,
   gPSPhone, which I used when it was free, I just kept the free version
   until I updated to iOS 4 which it no longer worked on. Since iOS 4 had
   performance problems, I never bothered with any emulators on it. There
   is also a PSX emulator, FPSe. It's very nice, and unlike on my iPod
   Touch 2G, it runs the games at an acceptable speed without ruining the
   sound. There is also psx4droid, which I tried, but putting a ROM on it
   took more than 15 minutes so I missed the refund window when I
   discovered it was too slow.
</p>
<p>An interesting fact about these emulators is that they are on the
   Android Market, and worked without rooting, unlike the iOS ones which
   required Cydia and a jailbroken device. Likewise, other jailbreak
   features such as custom themes and a slide down app launcher (part of
   sbsettings) are inbuilt into the software. Anything that saves on
   potental warranty voiding is always good.
</p>
<p>One of the nicest features of Android is how syncing works. Take files,
   drag and drop to device, either by plugging it into a computer or by
   using sftp over an app running on the device (I use SSHDroid but it was
   literally the first I found). No crapware programs, and none of the
   horribly painful bloat that is iTunes. On the negative side, this does
   make album art a bit more difficult to manage.
</p>
<p>All in all, I'm fairly happy with my new phone, though there are still a
   few teething issues, such as the close keyboard button placement, and my
   tendency to not use the search key in a lot of cases where I should.
</p>]]></content:encoded>
    </item>
    <item>
      <title>The Magic Layer</title>
      <link>http://blog.initprogram.com/2011/01/16/the-magic-layer/</link>
      <pubDate>Sun, 16 Jan 2011 19:00:00 GMT</pubDate>
      <category><![CDATA[Programming]]></category>
      <guid isPermaLink="true">http://blog.initprogram.com/2011/01/16/the-magic-layer/</guid>
      <description>The Magic Layer</description>
      <content:encoded><![CDATA[<blockquote><p>Any sufficiently advanced technology is indistinguishable from magic.
</p>
<p> <em>Arthur. C. Clarke</em>
</p>
</blockquote><p>As a programmer, and a computer nerd, I obviously know more about
   how they work than if you just grabbed a random person off the street.
   As such, it's always interesting to see how people with less knowledge
   about computers use them.<sup id="fnr1-53263853"><a href="#fn1-53263853">1</a></sup> To a lot of people, they click some
   buttons on the screen, and then the computer does something that may as
   well be magic, and finally results appear on screen.
</p>
<p>However, it's not just those unfamiliar with technology that find that
   at some level, the processes going on may as well be magic. Very few
   people understand the entirety of how things work from top to bottom.
   Moving on from the unfamiliar user and the buttons they click, for many
   poorer developers they type (or copy and paste) in some code they don't
   really understand and somehow it all works. Their magic layer is lower
   than that of the user who doesn't understand how the program actually
   works. After all, they understand that programming code needs to be
   written, but they still don't understand any of what goes on beyond
   that. Their magic layer is off in the function calls, in the syntax on
   the language, in the meaning of the code. They may understand small
   sections, but the entire program as a whole is still magic to them.
</p>
<p>Moving on from the poorer developers, novice developers, who instead of
   incompetence only have the problem of knowledge they don't yet have.
   They understand for the most part how their code works. They know how to
   structure their functions, they know when to use objects (and when not
   to), they can create programs from scratch. But they may not quite
   understand what is going on in the library routines, or what happens
   when the compiler creates a program from their code.
</p>
<p>As you go further up in the skill of the developers, the magic level
   recedes. They realise that the library routines are just like functions
   they create themselves for the most part. Some might make system calls,
   but other than that, there isn't much magic there. They understand that
   the compiler reads their code, and produces machine code which is run by
   the CPU. The magic is banished from their code to the inner workings of
   the compiler/interpreter and the operating system. 
</p>
<p>Finally, once the developer learns how those last few retreats of magic
   work, they can understand pretty much the whole picture, as far as
   software goes. However, this still isn't the final end of the story.
   Sure, the magic might be gone from the software side, but there is still
   the hardware. How do those system calls translate to data being written
   to disk? How does the CPU know that <code>MOV eax, ebx</code> moves data between
   registers? And at this point you're in the hardware layer.
</p>
<p>So, where is your magic layer? Personally I'm at the "inner workings of
   the compiler/OS" stage, and to work on pushing it further back, I've
   found some useful online resources. As a self taught programmer, most of
   the resources I've had up until now glossed over these areas, and it's
   my main aim for this year to push the magic layer back into the
   hardware. For compilers, I've found Jack Crenshaw's <a href="http://compilers.iecc.com/crenshaw/">Let's Build a
Compiler</a> useful to start with, and
   I'm currently reading through that, and for operating systems, a bunch
   of useful articles have actual coincidentally popped up on Reddit and HN
   recently on that topic, though I'm still open for suggestons on other
   resources.
</p>
<p>If you found this article interesting, why not follow me on
   <a href="http://twitter.com/MachaSign">Twitter</a>, leave a comment, or suscribe to
   my <a href="/feed">RSS feed</a>.
</p>
<p>Some further discussion of this post can be found at <a href="http://news.ycombinator.com/item?id=2110021">Hacker News</a> and on <a href="http://www.reddit.com/r/programming/comments/f3dxb/wheres_your_magic_layer/">Reddit</a>.
</p>

<div class="footnote"><hr/><ol>
 <li id="fn1-53263853"><p>Except when they frustratingly do everything in the most
   convoluted way possible.<a href="#fnr1-53263853" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
</p>

 </li>
</ol>
</div>]]></content:encoded>
    </item>
    <item>
      <title>The AUR and its flaws</title>
      <link>http://blog.initprogram.com/2010/12/12/the-aur-and-its-flaws/</link>
      <pubDate>Sun, 12 Dec 2010 21:00:00 GMT</pubDate>
      <category><![CDATA[Linux]]></category>
      <guid isPermaLink="true">http://blog.initprogram.com/2010/12/12/the-aur-and-its-flaws/</guid>
      <description>The AUR and its flaws</description>
      <content:encoded><![CDATA[<p>First of all, yes, I am picking on Arch again. But, something to keep in mind is although I've been complaining about Arch a lot over the past few months, I'm still using it, and I haven't been pushed enough to replace it. The big negatives I complain about are countered by big positives also, such as the ability to have the latest up to date programs far ahead of other distributions that make you wait for the next major release of the distribution to get version 3.x+1 automatically without installing other packages (I'm looking at you Ubuntu).
</p>
<p>Anyway, with that disclaimer out of the way, here's today's complaint. The target for today is the AUR - the Arch User's Repository. This is for those packages that haven't been confirmed stable enough to go into the main repositories, aka, most of the interesting ones.
</p>
<p>My first complaint of today is that so many of its packages are just flat out broken. More than once I've come accross a package that has it's download URL as something along the lines of http://somesite.com/latest.zip . However, since that time, latest.zip has changed to the latest version, with the result that it no longer passes the checksum, and you can't install it. Someone may have already flagged the package as out of date, but for a lot of them, that's no guarentee that it will be updated.
</p>
<p>The next thing that annoys me is source packages. Sure, they're fine for some little toy panel program, but when you try and install something major like new versions of Firefox or Chrome? Well, it changes the install time from 1 minute to 30 minutes. Which is especially annoying when something goes wrong after the compilation in the installation, such as say, the firebrand package declaring it needs firefox&gt;=3.6 and your AUR helper waiting to uninstal the old package after the compilation process, and then deciding that actally, it can't do that. Sure, you may be installing firefox4, but firebrand needs Firefox now, damn it! I am aware it doesn't completely recompile from scratch, but it's still significantly slower. This problem probably also applies to BSD's ports system or Gentoo's Portage.
</p>
<p>Another aspect is that so many packages are duplicated without any apparent reason. What exactly is the difference between epsxe-launcher-bash and epsxe-launcher-gentoo? They both have the same description and the same version number. And then some packages, while not duplicates, do need pruning. Why is there a firefox-qt at version 3.6.3 (outdated) and a firefox-qt-beta at 3.5b4 (even more outdated)? For that matter, why are there so many Firefox packages that seem to do the same thing (integrate with KDE)? We've got firefox-qt, firefox-qt-beta, firefox-branded-kde (also outdated) and firefox-kde-opensuse. Now, I'm picking on Firefox here because as a popular package, it will have the most variants on the AUR, but duplicates do crop up on lesser used packages too.
</p>
<p>All in all, some of these are to be expected. After all, it wouldn't be possible to have perfectly up to date packages for everything, no matter how hard the packagers tried. But it would be nice if AUR usage was to become as easy to use as the offical repos.
</p>]]></content:encoded>
    </item>
    <item>
      <title>On HN</title>
      <link>http://blog.initprogram.com/2010/11/23/on-hn/</link>
      <pubDate>Tue, 23 Nov 2010 21:47:00 GMT</pubDate>
      <category><![CDATA[Web]]></category>
      <guid isPermaLink="true">http://blog.initprogram.com/2010/11/23/on-hn/</guid>
      <description>On HN</description>
      <content:encoded><![CDATA[<p>This post is a response to the view of Hacker News outlined in this <a href="http://mattmaroon.com/2010/11/23/i-quit-hacker-news">blog post on MattMaroon.com</a>, read that post first for context. The main points are summarised up below, but I suggest you still read the original post.
</p>
<blockquote><ol>
 <li>
     Vocal, small groups can cause certain topics (e.g. the TSA) to become too popular.
 </li>

 <li>
     Votes are used to represent agreement, not value added.
 </li>

 <li>
     The community repeats the same views over and over again.
 </li>

 <li>
     The community doesn't recognise the world outside itself.
 </li>

 <li>
     It takes too much time.
 </li>

 <li>
     It takes comments from blogs to itself.
 </li>

 <li>
     It takes away time that could be used for blogging.
 </li>
</ol>
</blockquote><ol>
 <li>
     This is a problem on <em>any</em> social media site. The other one that I use, Reddit is even worse. And while it does let you pick certain categories to subscribe to, that doesn’t always help. TSA stuff ended up in /r/science even. And don’t talk to me about Prop 19. The site was rendered useless for me for the better part of 2 days because of people that are trying to pressure people to vote for something about some point I’m indifferent about at post in a country I don’t live in.<br />
I’m on the fence about downvotes in general. While I have thought downvotes will be useful at times, they lead to possible abuse like Digg’s bury brigade that came out a while back. The fact that the top voted comment on any sensationalist post is a highly voted rebuttal usually counters it out for me.
 </li>

 <li>
     No argument here.
 </li>

 <li>
     Pretty much agree with you. Though tech companies tend to polarize all communities. Reddit tends to dislike Apple to the same extent that HN likes it.
 </li>

 <li>
     No argument here.
 </li>

 <li>
     No argument here either
 </li>

 <li>
     I don’t know about this one. I’ve submitted links to my blog to HN, some of which have done quite well before. On the one hand, it does bother me a bit to have the 50 or so comments occuring on HN while only 5 or 6 occur on my blog. But, had it not gone on HN, I might have had 2 on my blog and none elsewhere. So while I would like more of the discussion to be on my blog, it still benefits me. And in my experience, HN referrals are far more likely to bring comments than other sites.
 </li>

 <li>
     On the one hand that is kind of true. Certainly there have been some things that I have posted as comments on HN and Reddit that could have been blog posts. But on the other hand, some of these are not fully formed thoughts until I read the post that HN is linking to. Furthermore, reading these sites sometimes gives me ideas that do become blog posts. And finally, given that HN has brought me in most of my traffic when my blog posts go popular there, would I feel comfortable just hit and run submitting my links? Definitely not.
 </li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Welcome to argv</title>
      <link>http://blog.initprogram.com/2010/11/21/welcome-to-argv/</link>
      <pubDate>Sun, 21 Nov 2010 21:52:00 GMT</pubDate>
      <category><![CDATA[Me]]></category>
      <guid isPermaLink="true">http://blog.initprogram.com/2010/11/21/welcome-to-argv/</guid>
      <description>Welcome to argv</description>
      <content:encoded><![CDATA[<p>So, I've had my blog and my twitter account for a while, and sometimes the constraints imposed by both formats has led to thoughts that didn't really have a place. Too long for Twitter, not long enough for a full blog post. 
</p>
<p>To top that off, Twitter lost all my tweets from when I started using it to about a month ago, further making me want to bring my content under my own control. This also rules out using Tumblr for this blog.
</p>
<p>Taking some inspiration from <a href="http://zedshaw.com">Zed Shaw</a> and his many sites, I've set up a seperate blog for these shorter posts. I'm not going to take it to the extreme of one blog per topic, however.
</p>
<p>Also, for some technical experimentation, this is powered by <a href="http://blogofile.com">blogofile</a>, a Python blogging program which takes posts in Markdown and renders it to a static site. This does mean that it won't have comments initially, but I have strong opinions on the need for comments, so I'm looking for how to deal with that. I don't particularly like Disqus (it's way too bloated), but I'll probably end up needing to use that.
</p>]]></content:encoded>
    </item>
    <item>
      <title>The more things change, the more they stay the same.</title>
      <link>http://blog.initprogram.com/2010/10/26/the-more-things-change-the-more-they-stay-the-same/</link>
      <pubDate>Tue, 26 Oct 2010 19:49:59 IST</pubDate>
      <category><![CDATA[Technology]]></category>
      <guid>http://blog.initprogram.com/2010/10/26/the-more-things-change-the-more-they-stay-the-same/</guid>
      <description>The more things change, the more they stay the same.</description>
      <content:encoded><![CDATA[<p>Ubuntu 10.04 Netbook Edition (2010)<sup id="fnr1-847035861"><a href="#fn1-847035861">1</a></sup><br />
<img title="Ubuntu 10.04 (2010)" src="http://imgur.com/Gm8YZ.png" alt="" width="600" height="351">
</p>
<p>Mac OS X Lion (presumably 2011)<br />
<a href="http://blog.initprogram.com/blog/wp-content/uploads/2010/10/launchpad.png"><img class="size-full wp-image-304 " title="Mac OS X Lion (presumably 2011)" src="http://blog.initprogram.com/blog/wp-content/uploads/2010/10/launchpad.png" alt="" width="356" height="221" /></a>
</p>
<p>Windows 3.1 (1992)<br />
<img title="Windows 3.1" src="http://i.imgur.com/DSyJj.gif" alt="" width="512" height="336" />
</p>
<p>Liked this post?  Follow me <a href="http://twitter.com/MachaSign">on Twitter (@MachaSign)</a>
</p>

<div class="footnote"><hr/><ol>
 <li id="fn1-847035861"><p>Originally misidentified as Unity for Ubuntu 11.04, see comments.<a href="#fnr1-847035861" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
</p>

 </li>
</ol>
</div>]]></content:encoded>
    </item>
    <item>
      <title>A quick, basic guide on the IRC protocol</title>
      <link>http://blog.initprogram.com/2010/10/14/a-quick-basic-primer-on-the-irc-protocol/</link>
      <pubDate>Thu, 14 Oct 2010 15:44:00 IST</pubDate>
      <category><![CDATA[Technology]]></category>
      <category><![CDATA[Programming]]></category>
      <guid>http://blog.initprogram.com/2010/10/14/a-quick-basic-primer-on-the-irc-protocol/</guid>
      <description>A quick, basic guide on the IRC protocol</description>
      <content:encoded><![CDATA[<p>While working on my <a href="http://github.com/Macha/Mbot">Haskell IRC bot</a>, I needed some information on the actual IRC protocol. Much of this information sadly isn't available in any centralised format, and much of the information that is there is just a copy/paste of the RFC. There are two formal descriptions of the IRC protocol, an older one (<a href="http://tools.ietf.org/html/rfc1459">RFC 1459</a>) and a newer one (<a href="http://tools.ietf.org/html/rfc2812">RFC 2812</a>), though the actual protocol as used by most servers doesn't adhere exactly to either of these. So, here is a short summary of the information that I have gathered in my research. This is by no means a comprehensive tutorial, but it is sufficient to write a basic IRC bot.
</p>
<p>The first part of the IRC protocol is the rough layout of messages. The first, optional part, is the source (username and hostmask, or server) preceded by a colon, as in <code>:holmes.freenode.net</code> . Because they only deal with one other part of the network, the server, clients will rarely, if ever send this part, while servers nearly always will.
</p>
<p>The next part of the protocol, seperated by a space is the command name, which is in all-caps. Most of these are pretty much the same as what the user types in after the /. For example, the <code>/join</code> command becomes <code>JOIN</code>. The most notable exception is the <code>PRIVMSG</code> command, which is used for sending a message to a user or channel (it's the same command for both).
</p>
<p>After this come the arguments for the command, again, space seperated. Most of these are limited to one word values. The one exception is the final argument, which can have more than one word, and is started off by a colon.
</p>
<p>There are a few types of channel, but nearly all the channels you will encounter are of the <code>#channel</code> variety, so we will not go into detail on other types.
</p>
<p>Finally, the command is terminated by <code>\r\n</code> not <code>\n</code> according to the spec, though it seems most servers will accept either.
</p>
<p>An example of a full message is as such:
</p>
<pre><code>:Macha!~macha@unaffiliated/macha PRIVMSG #botwar :Test response
</code></pre><p>The first part of any IRC connection is sending the <code>NICK</code> and <code>USER</code> messages. The first of these is simple, just <code>NICK name</code>. The next is the <code>USER</code> message.
</p>
<p>An example of a <code>USER</code> message is:
</p>
<pre><code>USER username 0 * :Real name
</code></pre><p>The * part is a remnant of earlier days, and will not need to be changed. The 0 is a bitmask for the user's mode, but with just one switch. Change it to 8 to be invisible to those not in a channel with you.
</p>
<p>The next part of the protocol we will discuss is the <code>PING</code> message, because some servers need one immediately after these two messages. The server will send you a message in the format <code>PING :message</code> to which it needs a response of <code>PONG :message</code>. This is the most common case of a server not sending a source. Most servers use the server name as the message part, but this isn't consistent.
</p>
<p>For all of the rest of these messages,  there is a source on the other messages from the server side. This is a user and hostmask for a user's message, and a server name otherwise. If you are writing a client, do not send the :source part.
</p>
<p>The next message to deal with is <code>JOIN</code>. The basic format of this message from most servers I've tested is
</p>
<pre><code>:source JOIN :#channel
</code></pre><p>although the <a href="http://tools.ietf.org/html/rfc2812#section-3.2.2">spec says otherwise</a> as regards the need for the colon. This is pretty self explanatory, and works the same as the /join used in an IRC client. The one unintuitive part of this command is that <code>JOIN 0</code> leaves all channels.
</p>
<p>Its counterpart is <code>PART</code>. Its format is
</p>
<pre><code>:source PART #channel :reason
</code></pre><p>The reason part is optional, and some servers (for example Freenode) seem to just cut it off, as it did not exist in <a href="http://tools.ietf.org/html/rfc1459#section-4.2.2">earlier versions</a> of the IRC protocol.
</p>
<p>Both of these messages can also accept a list of channels separated by commas when sent from the client, for example <code>PART #channel1,#channel2</code>. Don't put spaces between the channels in this list.
</p>
<p>The most important command in the IRC protocol is <code>PRIVMSG</code>. This command is used for sending messages both to channels and between users. Its format is
</p>
<pre><code>:source PRIVMSG &lt;target&gt; :Message
</code></pre><p>where the target is either a user's nick, or a channel name. So to send a message to a channel, use <code>PRIVMSG #channel :Hello, World</code> and to send a private message to a user, send <code>PRIVMSG Nick :Hi!</code>
</p>
<p>The final message you will use in basic usage is <code>QUIT</code>. Its format is
</p>
<pre><code>:source QUIT :reason
</code></pre><p>where the reason is optional.
</p>
<p>These commands are sufficient to write a basic IRC bot but are by no means the full list. There are also numeric commands, and you can find more detail on these <a href="http://mirc.net/raws/">here</a>.
</p>
<p>If you found this post interesting and want to hear more from me, you should <a href="http://twitter.com/MachaSign">follow me on Twitter</a>.
</p>]]></content:encoded>
    </item>
    <item>
      <title>A Self-Taught Programmer's Journey</title>
      <link>http://blog.initprogram.com/2010/09/27/a-self-taught-programmers-journey/</link>
      <pubDate>Mon, 27 Sep 2010 20:25:18 IST</pubDate>
      <category><![CDATA[Me]]></category>
      <category><![CDATA[Programming]]></category>
      <guid>http://blog.initprogram.com/2010/09/27/a-self-taught-programmers-journey/</guid>
      <description>A Self-Taught Programmer's Journey</description>
      <content:encoded><![CDATA[<p>I was helping someone who is just beginning to program over the past few weeks, and it led me to actually write a blog post I'd been saying I should write for a long time, about how I got where I am today as a programmer. This is mostly from memory, so some of the timing may be wrong.
</p>
<p>My first experience with anything even close to programming was when I was around 12. I had gone through all my mum's ECDL stuff for MS Office years before, and there was one program in Office on my then computer that wasn't even mentioned - Frontpage. So I got bored one day, and decided to check what it was. I gathered quickly enough that is was for making websites, and I sort of got parts of it, but I had to get a book from the library to figure it out fully. Armed with this newfound knowledge, I managed to make a basic website, a horribly primary-coloured frame-filled website, but a website nonetheless.
</p>
<p>Of course, my instinct was to show it to people, so I found out about Angelfire for hosting from an even older book, and uploaded it, then showed it to people online. Needless to say, people didn't like it very much. But a few people did give me some somewhat useful advice, to drop Frontpage. They mentioned something called Dreamweaver as being better, and also suggested learning HTML. Which I did, until eventually I was using Dreamweaver as a glorified text editor.
</p>
<p>Meanwhile, looking for the next thing to do, I decided to learn actual programming, in the form of Java. In retrospect, not the best choice of language for starting out, but it was one of the few that my local library had books for. The other alternative if I was to stick to library books was Visual Basic 6.0, so it was definitely the better of the two options. I went through the whole book of Java All-In-One for dummies, went through it, did all the examples, got to the end, and wrote a little Java clock applet for my website. I was so happy with myself, that I decided to go even further, and my next plan of a project was to make a Simcity clone in Java. Unsurprisingly, that didn't work out too well, and the failure put 13 year old me off programming for a while.
</p>
<p><img class="   " title="Finally learning it's not that easy" src="http://blog.initprogram.com/blog/wp-content/uploads/2010/09/l_259_194_71000F94-07FF-4E75-A0D4-2F7458A0F93E.jpeg" alt="" width="259" height="194" /><br />
By this stage, I had long cured any illusions of coding being anything like the Matrix
</p>
<p>The next time I came into contact with programming was when I was running a forum with a few friends. It ran off phpBB, and when installing mods, I noticed that all I was doing was editing programming code, which was kind of familiar. I looked into it a bit more, found out about PHP, and then quickly learned that. It was significantly easier to learn, both because it was my second language to learn, and also because languages with weak dynamic types are easier to learn in my opinion.
</p>
<p>Of course, the problem with learning PHP, especially if you use the phpBB 2 code base as your example is you pick up bad habits. Now there's nothing inherently wrong with the language nowadays, but this was the PHP 4 days, with it's half-assed attempts at OOP. On top of that, something that is still a problem today is the amount of bad material floating around. Now, this is a problem with <a href="http://www.codinghorror.com/blog/2009/05/the-bathroom-wall-of-code.html">any language</a>, but given PHP's large userbase, and popularity with hobbyist coders, it's far more pronounced in PHP than others I have used. So code found on the internet is ripe with a lack of care towards seperating output and processing, full of SQL injection holes, and often even relying on register_globals.<noscript>_</noscript> But this isn't anything new. But it does lead me to recommend to everyone trying to get a good book. I started with <a href="http://www.everythingphpmysql.com/">this one</a>, and while it did help me learn PHP, it set me back a long distance in terms of proper coding practices. Eventually, I got <a href="http://apress.com/book/view/9781590598627">this book</a> to learn how to code <strong>properly</strong> in PHP.
</p>
<p>Around that time I started reading programming blogs, and found out about source control, in the form of <a href="http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html">Subversion</a>, a rather important topic that no programming book seems to mention. Seriously, apart from Code Complete, which mentions it in glancingly a few times, the only book on my shelf that explains source control at all is the Linux Bible, 2009 edition. And that's talking about CVS. Now for all Subversion's faults, any source control is better than no source control. Later I was introduced to git and DVCS in general by some friends, and it's now my preferred form of source control (git for all Linux projects, hg if I have to work with Windows users). It didn't exist at the time, but for anyone looking for a good DVCS tutorial now, I reccomend Joel Spolsky's <a href="http://hginit.com">hginit</a>. Even if you plan on using git or another program afterwards, it's the best basic explanation of the concepts of DVCS I've seen.
</p>
<p><a href="http://blog.initprogram.com/blog/wp-content/uploads/2010/09/linux-bible.jpg"><img class="size-full wp-image-270" title="linux-bible" src="http://blog.initprogram.com/blog/wp-content/uploads/2010/09/linux-bible.jpg" alt="Linux Bible 2009" width="300" height="376" /></a><br />
This was the only book to mention version control.
   Going back to my own journey, after that time in PHP, and several ill-fated projects, countless attempts at building a forum, a incomplete social network, and a completed, if basic, social network that I failed to get anyone to join, I moved on to Javascript. I spent ages messing about in that, making small scripts to move things around, before getting more ambitious. Yet again, I returned to the idea of a simcity clone. Given that this was before canvas became well supported or known about, the core of the program used a 200x200 table for the game's grid. It was every bit as slow as that sounds.
</p>
<p>After a while of this, I returned to trying to make GUI desktop apps. I know, I know, many considering this a step backwards from web apps, but at the time, I couldn't think of many examples of web apps that had progressed of the "Oh, that's mildly interesting" stage. I had used Swing before, in my failed Simcity game, but wasn't particularly impressed by it. I gave SWT a go, before giving up again. I guess my problem with GUI apps resolves from my desire to control every last detail, compared to the designer-tool-centric design of most of the GUI toolkits. Somewhat bored with GUI apps again, but also bored of the general dislike of my main language, PHP, I went on a quick tour of several languages, including C#, C++, Ruby, Python, Ruby again, before finally deciding on Python as my new favourite.
</p>
<p>Around this time, I switched to Linux as my primary OS. I'd tinkered with Linux for a while before this, but had always been too used to Windows to actually make the switch until then. Since then, Windows has been mostly relegated to use for gaming and iTunes.
</p>
<p>I spent a while coding in Python, before going on a short hiatus from programming for a while, being somewhat bored as all the languages I learned being roughly the same at this stage, and no new ideas for a project to keep me interested. Projects are another thing I recommend to anyone starting to teach yourself programming, as even the failed ones or ones you get bored of are a good learning experience, especially if you have others looking over the code.
</p>
<p>After a while, I decided to learn a less mainstream programming language, and after a quick straw poll on Twitter, Haskell emerged the winner. Luckily for me, Haskell has a good beginner's tutorial, <a href="http://learnyouahaskell.com">Learn You a Haskell</a>. I've heard it described as like Why's Poignant Guide, but it's not really. It's much more to the point which works for me (I'm sorry to say I found Why's Guide a rather boring read, having too much unneeded meandering with stories. But I accept it's good for others). It is a rather basic tutorial, but there is also <a href="http://realworldhaskell.org">Real World Haskell</a> for when you need to go further, even if it isn't as well done.
</p>
<p>And now, my current project is to write an <a href="http://github.com/Macha/Mbot">IRC bot in Haskell</a> to learn Haskell better. I'm still learning and improving, and it's going to be a handy headstart for college that I have all this done already, so the story goes on. If you want to hear more about me, you can always read more of this blog, or <a href="http://twitter.com/MachaSign">follow me on Twitter</a>.
</p>]]></content:encoded>
    </item>
  </channel>
</rss>

