<?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>shahriar</title>
	<atom:link href="http://shahriarhaque.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahriarhaque.com/blog</link>
	<description>A dreamer, an inventor, a big time procrastinator...</description>
	<lastBuildDate>Fri, 17 Feb 2012 21:26:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<div id="google_plus_one"><g:plusone></g:plusone></div>	<item>
		<title>Structural Pattern Matching using Exceptions</title>
		<link>http://shahriarhaque.com/blog/blog/structural-pattern-matching-using-exceptions/</link>
		<comments>http://shahriarhaque.com/blog/blog/structural-pattern-matching-using-exceptions/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 21:26:39 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[algebraic types]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pattern matching]]></category>
		<category><![CDATA[structural]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/blog/structural-pattern-matching-using-exceptions/</guid>
		<description><![CDATA[Back in college when I was first exposed to functional languages, I fell in love with algebraic data types and structural pattern matching. Now that I have joined the work-force I no longer have the freedom to work with those languages. So I decided to give a shot at emulating structural pattern matching in Java. [...]]]></description>
			<content:encoded><![CDATA[<p>Back in college when I was first exposed to functional languages, I fell in love with algebraic data types and structural pattern matching. Now that I have joined the work-force I no longer have the freedom to work with those languages. So I decided to give a shot at emulating structural pattern matching in Java.</p>
<p>If this concept is new to you here’s a short intro. Let’s say we want to represent binary trees. We know that a tree has three kinds of structures:</p>
<ul>
<li><font color="#555555">A node that can have a left branch and right branch</font></li>
<li><font color="#555555">A leaf that has a value</font></li>
<li><font color="#555555">An empty tree with no value or branches</font></li>
</ul>
<p>In Haskell, we can group these three structures under a single data type:</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb.png" width="268" height="67" /></a></p>
<p>Now, whenever we do any kind of operation on trees, we can use pattern matching to find out which of these three structures we are dealing with. For example, here is function that calculates the depth of a tree.</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb1.png" width="446" height="84" /></a></p>
<p>This recursive function, tests the structure of the tree and returns different values depending on the pattern that matched.</p>
<p>Now, all that is good. But how do we implement the same in an object oriented language that does not support algebraic data types or pattern matching. Well, the closest thing to algebraic data types in an OOP language like Java is a class. And to simulate pattern matching we will use a feature called polymorphism.</p>
<p>Here’s our first implementation:</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb2.png" width="416" height="516" /></a></p>
<p>Nothing fancy is going on in this code snippet. I declared an interface called Tree which defines a method signature called “depth”. There are three classes that implement this interface. And each class provides it’s own implementation of depth. With this setup, the master depth function is trivial:</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb3.png" width="277" height="58" /></a></p>
<p>With the help of polymorphism, at each step of the recursion, the right implementation of depth is going to be called based on the class.</p>
<p>So? What’s the problem?&#160; Well, it was trivial to write, but it’s going to be a nightmare to maintain this setup. Let’s say, tomorrow we want to add a function to flatten a tree, or a function to do an in-order traversal. We would have to add the methods to the tree interface. And then we would need to add an implementation of these methods to each of the three classes. Doesn’t sound like a lot of work. But imagine if we were distributing these classes as a library and there were hundreds of other people using it. Each time we add a couple of utility methods to the Tree interface we would need to recompile all the classes and deploy a new version of the library, and ask hundreds of users to update to the latest version.</p>
<p>So, we will need to think of a different approach. One that does not require us to change the original classes. We need an approach that empowers the library user to write his own implementation of “depth” without any fuss.</p>
<p>The quick and dirty way would be to use the instanceof operator to perform pattern matching manually.</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb4.png" width="463" height="341" /></a></p>
<p>This version works, but it has its problems. By using the instanceof operator we are giving up all compile-time guarantees on whether we are doing our cast correctly. That means, if you make any mistake, you’ll only find that out only at runtime. Moreover, our previous approach used interfaces. So we were guaranteed to have an implementation of depth for each possible structure. In our new approach, there are no such guarantees. If the library user, forgot to check for a particular variant of the tree structure he wouldn’t get any compile time warning, just an exception at runtime.</p>
<p>We need a new approach. One that takes advantage of compile time checks and also forces us to exhaustively check for all possible structures. We can do that using Exceptions and Try-Catch blocks. Here’s our new implementation of Tree:</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb5.png" width="417" height="550" /></a></p>
<p>Here are the important differences:</p>
<ul>
<li><font color="#555555">Tree is not an interface anymore, it’s a concrete class</font></li>
<li><font color="#555555">Tree extends Exception, so it can be thrown</font></li>
<li><font color="#555555">Node, Leaf, and Empty are also exceptions, so they can also be thrown</font></li>
<li><font color="#555555">The match method can throw an exception corresponding to each possible structure</font></li>
</ul>
<p>With our new approach, here is our new depth function:</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/image_thumb6.png" width="495" height="346" /></a></p>
<p>Since the match method of the Tree class exhaustively lists all possible structures as throwable Exceptions, the depth function will even not compile unless there is a catch block for each structure. As a result, you are getting both exhaustiveness and compile time checks at the same time. To be honest, this does not guarantee 100% exhaustiveness. The developer of the library has to make sure he throws an Exception for each possible sub-class of his algebraic type. But at least, in this approach, the burden of responsibility lies on the API side, not on the user. Therefore, if any future release of the library introduces a new structure, users won’t have to read the documentation, or discover it at runtime. They can just rely on the compiler to do the check for them and identify the affected methods.</p>
<p>There’s just one thing that makes this approach less than perfect. Unfortunately, our tree class cannot be generic. Because of the way generics are implemented in Java, sub-classes of Exception are not allowed to be generic.</p>
<p>If this is a deal breaker for you, check out <a href="http://apocalisp.wordpress.com/2009/08/21/structural-pattern-matching-in-java/">this excellent blog post</a> that describes another approach using the Functional Java library.</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/blog/structural-pattern-matching-using-exceptions/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Paradox of a CS major</title>
		<link>http://shahriarhaque.com/blog/reading-list/cs-reality-check/paradox-of-a-cs-major/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/cs-reality-check/paradox-of-a-cs-major/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 20:02:06 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[cs reality check]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/paradox-of-a-cs-major/</guid>
		<description><![CDATA[We know how to write a History essay or an English research paper, but don’t have any clue when it comes to writing a functional specification document or a technical design document. We can accurately measure the run time complexity of an algorithm but cannot reliably say how long we will need to write a [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>We know how to write a History essay or an English research paper, but don’t have any clue when it comes to writing a functional specification document or a technical design document.</li>
<li>We can accurately measure the run time complexity of an algorithm but cannot reliably say how long we will need to write a piece of code.</li>
<li>We can make sense of an assembly dump, but cannot parse a piece of code written by someone else and proceed to rewrite it.</li>
<li>We learn how how to code the hard way with Vim and Emacs, but never bother to learn to use all the features of Eclipse.</li>
<li>We can do miracles while coding alone, but have no clue how to commit, checkout, branch, tag, and merge using a revision control software for a team project.</li>
<li>We excel at writing thousands of lines of code, but have difficulty compiling, linking, and creating executables.</li>
<li>We enjoy the challenge of a good debugging session, but hate to write unit tests and regression tests.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/cs-reality-check/paradox-of-a-cs-major/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LATW Episode 13                                   (January 1 &#8211; January 31, 2012)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-13-january-1-january-31-2012/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-13-january-1-january-31-2012/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:15:24 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[links around the world]]></category>
		<category><![CDATA[reading-list]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/latw-episode-13-january-1-january-31-2012/</guid>
		<description><![CDATA[Web Video Box Office Breathtaking aurora formed by the largest magnetic storm in 10 years Interesting short film about prejudice against robots Computing Introducing HUD menus for Ubuntu Deobfuscating malicious code layer by layer The rise of developeronmics Science 47 year old television signals bouncing back to Earth Your body wasn&#8217;t built to last 10 [...]]]></description>
			<content:encoded><![CDATA[<h2>Web Video Box Office</h2>
<p><a href="http://vimeo.com/35618405"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="arora" border="0" alt="arora" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/arora.png" width="540" height="358" /></a></p>
<p>Breathtaking aurora formed by the largest magnetic storm in 10 years</p>
<p><a href="http://io9.com/5878285/no-robots-a-beautiful-five+minute-film-about-anti+machine-prejudice"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="robots" border="0" alt="robots" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/02/robots.png" width="547" height="281" /></a></p>
<p>Interesting short film about prejudice against robots</p>
<h2>Computing</h2>
<ul>
<li><font color="#555555"><a href="http://www.engadget.com/2012/01/24/canonical-bringing-hud-to-ubuntu-12-04-companys-assault-on-men/">Introducing HUD menus for Ubuntu</a></font></li>
<li><a href="http://pandalabs.pandasecurity.com/deobfuscating-malicious-code-layer-by-layer/">Deobfuscating malicious code layer by layer</a></li>
<li><a href="http://www.forbes.com/sites/venkateshrao/2011/12/05/the-rise-of-developeronomics/">The rise of developeronmics</a></li>
</ul>
<h2>Science</h2>
<ul>
<li><a href="http://www.rimmell.com/bbc/news.htm">47 year old television signals bouncing back to Earth</a></li>
<li><a href="http://singularityhub.com/2012/01/09/your-body-wasn%E2%80%99t-built-to-last-a-lesson-from-human-mortality-rates/">Your body wasn&#8217;t built to last</a></li>
<li><a href="http://io9.com/5874229/10-incredibly-strange-brain-disorders">10 incredibly strange brain disorders</a></li>
</ul>
<h2>Bonus</h2>
<ul>
<li><a href="https://rocketui.com/page/index">Rocket UI – Build complex UI widgets without coding</a></li>
<li><a href="http://thenounproject.com/?hn">The Noun Project – Vector Art for Everything</a></li>
<li><a href="http://androidpttrns.com/">AndroidPttrns – Design/Interaction Patterns</a></li>
<li><a href="http://wistia.com/product/superembeds">SuperEmbedBuilder</a></li>
<li><a href="http://www.videogamedesignschools.net/20-great-sites-to-learn-the-ins-and-outs-of-video-game-design/">Video Game Programming Tutorials</a></li>
<li><a href="http://citizen428.net/blog/2010/08/12/30-free-programming-ebooks/">30 free programming e-books</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-13-january-1-january-31-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitfalls of Programming at Work</title>
		<link>http://shahriarhaque.com/blog/reading-list/cs-reality-check/pitfalls-of-programming-at-work/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/cs-reality-check/pitfalls-of-programming-at-work/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:15:15 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[cs reality check]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/cs-reality-check/pitfalls-of-programming-at-work/</guid>
		<description><![CDATA[As I slowly approach to the end of my second year of work at GE, I can sense how much I have changed as a programmer since I left CMU. In this article I want to put down my “lessons learnt” on paper. Chances are that in a few years I won’t even remember what [...]]]></description>
			<content:encoded><![CDATA[<p>As I slowly approach to the end of my second year of work at GE, I can sense how much I have changed as a programmer since I left CMU. In this article I want to put down my “lessons learnt” on paper. Chances are that in a few years I won’t even remember what it felt like to go to college. So before I forget I want to pass on the experience that no text book could ever teach me. Rather than a write a wordy reflective essay, I will just list some of the common pitfalls that you should avoid as a newly hired programmer.</p>
<h4>Resist the urge to rewrite code</h4>
<p>This is probably the hardest one. So it deserves some special attention. You will come across a lot of crappy code in your work life. There’s seldom any documentation. So your only option will be to read through code. And the more you read, the more you will feel the code has no structure, things are not done in a proper way, there’s a lot of repetition etc.. Well guess what? It might be crappy code, but it’s well tested crappy code. A lot of the obscure code-blocks are undocumented patches to bugs people found after months of testing. If you are new to the company, you will have absolutely no clue about all the bizarre edge cases of a program. Chances are when you rewrite a piece of code, you will produce a clean but buggy application. If you are unsure whether to rewrite or not, ask yourself these questions:</p>
<ol>
<li><font color="#555555">Will cleaning up the code reduce development time in the future?</font></li>
<li><font color="#555555">Will it make testing easier?</font></li>
<li><font color="#555555">Will it make deployment less time consuming?</font></li>
<li><font color="#555555">Does #1, #2, #3 take more time the time it will take you to rewrite the code?</font></li>
</ol>
<p>If the answer to all four of these questions are “yes”, try to see if your coworkers think the same too.</p>
<h4>Not being satisfied by anything other than your work</h4>
<p>This is also a hard one. If you are a hard-working and productive programmer, you will get a lot of responsibility on your shoulder. There’s nothing wrong with that. But don’t go overboard. Typically there will be others in your company who can also code. You may not think that they are as skillful as you. But practically speaking, given enough time they can also get the job done. So don’t lose your sleep trying to be a one man army. Be a team player. Learn to delegate. Document your code, so that others can fill in when you go on a well deserved vacation.</p>
<h4>Get over the need for speed</h4>
<p>Yes, changing that data structure to a tree will make lookups O(1). But it will only reduce runtime from 10 minutes to 9.5. It’s usually very hard to give a find out the big O complexity of real life programs. So don’t jump at the first chance you get to apply your algorithm skills. Profile your code thoroughly. Get an understanding of what the real bottlenecks are and whether they are under your control. And even then, you should only optimize if your users are complaining about it.</p>
<h4>Reluctance to test your code</h4>
<p>Admit it. We all hate testing. We hated in college. We got mad at professors who graded your test cases. And we still hate it at work. The only difference is, now the code may affect the lives of hundreds or even thousands of people. So get over it. If you feel testing is a waste of time. Write test scripts. Write modular code. Write unit tests as you code. Get your co-workers to test your code. The more testing you pile up till the end, the more repulsive it will get. And then procrastination will take over and you will end up shipping buggy code. </p>
<p>Those were the main pitfalls I could think of. Maybe someday I will write a part 2 for this post with all the small tips and tricks I picked up over the years. Anyhow, if you manage to start your career avoiding these pitfalls, you should have a bright future ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/cs-reality-check/pitfalls-of-programming-at-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A rant against &#8220;religious spam&#8221;</title>
		<link>http://shahriarhaque.com/blog/blog/a-rant-against-religious-spam/</link>
		<comments>http://shahriarhaque.com/blog/blog/a-rant-against-religious-spam/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 20:34:18 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/blog/a-rant-against-religious-spam/</guid>
		<description><![CDATA[I don’t claim to be a religious person. However I do view religion as a part of my identity, just like my nationality. Just like I won’t tolerate racist behavior against Bangladeshis, I wouldn’t tolerate mistreatment of Muslims either. However the opposite scenario is also true. Just like how I am sickened when I hear [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t claim to be a religious person. However I do view religion as a part of my identity, just like my nationality. Just like I won’t tolerate racist behavior against Bangladeshis, I wouldn’t tolerate mistreatment of Muslims either. However the opposite scenario is also true. Just like how I am sickened when I hear about a Bangladeshi doing something stupid to ruin our reputation, I am also ashamed when a fellow Muslim make us all look misinformed. This is really what this rant is all about.</p>
<p>Since the olden days of “Hotmail” people have been forwarding emails containing scientifically inaccurate “proofs” of vague concepts mentioned in the Quran. Even with the advent of social networks, people haven’t changed much. I still see some of my Facebook friends copy and paste statuses that outrageously inaccurate. Here’s one of my recent favorites:</p>
<blockquote><p align="left"><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/image_thumb.png" width="334" height="364" /></a></p>
</blockquote>
<p align="left">&#160;</p>
<p>So “all the rays will emit from your brain to earth”, will it? As if electromagnetic waves are like water drops and will drip of your hair when you lower your head? So why I don’t see sunlight coming out of ears when you pray. Or why not the latest episode of America’s got Talent? They are all electromagnetic waves just like mobile signals.</p>
<p>I don’t mind people posting religious content on Facebook. In fact I actually encourage it because social networks are a great way of reaching out to people and I don’t see why religious scholars shouldn’t make use of it. I would just like to see authentic material. Quote something inspiring from the Quran, or a Hadith. Translate it into English or in your mother-tongue so others can understand. Just stop posting this non-scientific nonsense. You guys are all educated people. Just exercise your high-school science skills before copying statuses and spreading religious spam. </p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/image_thumb1.png" width="165" height="52" /></a></p>
<p>And if you would like to go the extra mile, click next to the post and mark it as spam to help stop spread this disease.</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/blog/a-rant-against-religious-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First Cinegraph</title>
		<link>http://shahriarhaque.com/blog/blog/my-first-cinegraph/</link>
		<comments>http://shahriarhaque.com/blog/blog/my-first-cinegraph/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 23:31:07 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/blog/my-first-cinegraph/</guid>
		<description><![CDATA[It’s not a perfect cinegraph, but she’s adorable nonetheless…]]></description>
			<content:encoded><![CDATA[<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/Cinegraph_final.gif"><img style="margin: 0px 0px 10px; display: inline" title="Cinegraph_final" alt="Cinegraph_final" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/01/Cinegraph_final_thumb.gif" width="601" height="452" /></a></p>
<p align="center">It’s not a perfect cinegraph, but she’s adorable nonetheless…</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/blog/my-first-cinegraph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LATW Episode 12,                                  (November 15 -December 31, 2011)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-12-november-15-december-31-2011/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-12-november-15-december-31-2011/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 20:59:12 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[links around the world]]></category>
		<category><![CDATA[reading-list]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/latw-episode-12-november-15-december-31-2011/</guid>
		<description><![CDATA[Web Video Box Office Time lapse video of comet Lovejoy Vertical progression through the human skull Image Gallery Long exposure photo of a candle procession World’s largest 3d painting Gale Crater: Landing site for the Curiosity Mars Rover Larissa Sansour: Palestine in Sci-fi Inventor of the multi-tabbed browser Science How to build smarter airport terminals [...]]]></description>
			<content:encoded><![CDATA[<h2>Web Video Box Office</h2>
<p><a href="http://vimeo.com/34204309"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="comet-lovejoy" border="0" alt="comet-lovejoy" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/comet-lovejoy.png" width="594" height="311" /></a></p>
<p>Time lapse video of comet Lovejoy</p>
<p><a href="http://www.youtube.com/watch?v=NNMvzkJY6DQ"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="vertical-progression" border="0" alt="vertical-progression" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/vertical-progression.png" width="518" height="353" /></a></p>
<p>Vertical progression through the human skull</p>
<h2>Image Gallery</h2>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/candle-procession.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="candle-procession" border="0" alt="candle-procession" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/candle-procession_thumb.png" width="325" height="480" /></a></p>
<p>Long exposure photo of a candle procession</p>
<p><a href="http://boingboing.net/2011/11/18/worlds-largest-3d-painting-c.html"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="3d-painting" border="0" alt="3d-painting" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/3d-painting.png" width="615" height="412" /></a></p>
<p>World’s largest 3d painting</p>
<p><a href="http://io9.com/5867869/whats-so-special-about-mars-gale-crater"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="gale-crater" border="0" alt="gale-crater" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/gale-crater.png" width="612" height="350" /></a></p>
<p>Gale Crater: Landing site for the Curiosity Mars Rover</p>
<p><a href="http://io9.com/5870651/why-did-lacoste-try-to-suppress-a-palestinian-artists-science-fictional-art-project"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="palestine-sci-fi" border="0" alt="palestine-sci-fi" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/palestine-sci-fi.png" width="613" height="319" /></a></p>
<p>Larissa Sansour: Palestine in Sci-fi</p>
<p><a href="http://boingboing.net/2011/12/10/bookwheel-the-multiple-tabbed.html"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="bookwheel" border="0" alt="bookwheel" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/12/bookwheel.png" width="359" height="480" /></a></p>
<p>Inventor of the multi-tabbed browser</p>
<h2>Science</h2>
<ul>
<li><a href="http://www.popularmechanics.com/technology/aviation/news/how-to-build-a-smarter-airport-terminal?click=pm_latest">How to build smarter airport terminals</a></li>
<li><a href="http://io9.com/5863422/10-mega+construction-projects-that-could-save-the-environment--and-the-economy">10 mega-construction projects that could save the environment</a></li>
<li><a href="http://io9.com/5862418/10-bodily-functions-that-continue-after-death">10 bodily functions that continue after death</a></li>
<li><a href="http://www.nytimes.com/2012/01/01/magazine/tara-parker-pope-fat-trap.html?_r=1">Out bodies want us to stay fat</a></li>
<li><a href="http://io9.com/5863666/why-inbreeding-really-isnt-as-bad-as-you-think-it-is">Perils of in-breeding: Debunked</a></li>
<li><a href="http://www.pbs.org/wgbh/nova/physics/special-relativity-nutshell.html">Special relativity in a nutshell</a></li>
</ul>
<h2>Computing</h2>
<ul>
<li><a href="http://blog.wolfram.com/2011/11/21/detecting-kinship-from-a-pair-of-images/#more-8424">Detecting kinship from a pair of images</a></li>
<li><a href="http://demos.twilightparadox.com/demos/AsciiTracer/asciitracer.html">Ascii Ray tracer</a></li>
<li><a href="http://unixwiz.net/techtips/iguide-crypto-hashes.html">Illustrative guide to cryptographic hashes</a></li>
<li><a href="http://www.lisazhang.ca/2009/12/elevator-algorithms.html">Elevator Algorithms</a></li>
<li><a href="https://gist.github.com/1387113">Infinite Compilation Problem</a></li>
<li><a href="http://news.ycombinator.com/item?id=3238514">Why do big companies tend to only build with Java</a></li>
</ul>
<h2>Bonus Links</h2>
<ul>
<li><a href="http://www.jaredlunde.com/brandstack-name-generator">Brand Name Generator</a></li>
<li><a href="http://mycolorscreen.com/">Android Home Screen Gallery</a></li>
</ul>
<p><font color="#666666"></font></p>
<p><font color="#666666"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-12-november-15-december-31-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LATW Episode 11, (October 1&#8211;November 15, 2011)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-11-october-1november-15-2011/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-11-october-1november-15-2011/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 18:18:13 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[links around the world]]></category>
		<category><![CDATA[reading-list]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/latw-episode-11-october-1november-15-2011/</guid>
		<description><![CDATA[Web Video Box Office Canon 5D2 DSLR Time Lapse Bouncing water droplets Throwable Ball Panoramic Camera Whale Fall: After life of a whale TED Talk: How to spot a liar &#160; Image Gallery Nikon D300s travel’s to the edge of space WebGL Terrain Simulation Design that solves problems for the poor Science Why we can’t [...]]]></description>
			<content:encoded><![CDATA[<h2>Web Video Box Office</h2>
<p><a href="http://vimeo.com/29950141"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image.png" width="573" height="302" /></a></p>
<p><a href="http://vimeo.com/29950141">Canon 5D2 DSLR Time Lapse</a></p>
<p><a href="http://www.youtube.com/watch?v=pbGz1njqhxU"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image1.png" width="335" height="255" /></a></p>
<p><a href="http://www.youtube.com/watch?v=pbGz1njqhxU">Bouncing water droplets</a></p>
<p><a href="http://www.youtube.com/watch?v=Th5zlUe6gOE"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image2.png" width="358" height="335" /></a></p>
<p><a href="http://www.youtube.com/watch?v=Th5zlUe6gOE">Throwable Ball Panoramic Camera</a></p>
<p><a href="http://vimeo.com/29987934"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image3.png" width="593" height="323" /></a></p>
<p><a href="http://vimeo.com/29987934">Whale Fall: After life of a whale</a></p>
<p><a href="http://www.ted.com/talks/pamela_meyer_how_to_spot_a_liar.html"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image4.png" width="466" height="247" /></a></p>
<p><a href="http://www.ted.com/talks/pamela_meyer_how_to_spot_a_liar.html">TED Talk: How to spot a liar</a></p>
<p>&#160;</p>
<h1>Image Gallery</h1>
<p><a href="http://www.engadget.com/2011/10/23/nikon-d300s-travels-to-the-edge-of-space-survives-to-share-the/"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image5.png" width="591" height="379" /></a></p>
<p><a href="http://www.engadget.com/2011/10/23/nikon-d300s-travels-to-the-edge-of-space-survives-to-share-the/">Nikon D300s travel’s to the edge of space</a></p>
<p><a href="http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image6.png" width="485" height="181" /></a></p>
<p><a href="http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html">WebGL Terrain Simulation</a></p>
<p><a href="http://www.nytimes.com/2007/05/29/science/29cheap.html"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://shahriarhaque.com/blog/wp-content/uploads/2011/11/image7.png" width="577" height="332" /></a></p>
<p><a href="http://www.nytimes.com/2007/05/29/science/29cheap.html">Design that solves problems for the poor</a></p>
<h1>Science</h1>
<ul>
<li><a href="http://globetrooper.com/notes/why-cant-we-drink-sea-salt-water/">Why we can’t drink sea water</a></li>
<li><a href="http://www.bbc.co.uk/news/health-15619393">Myths about the mind</a></li>
<li><a href="http://lifehacker.com/5847591/10-stubborn-food-myths-that-just-wont-die">10 stubborn myths about food</a></li>
<li><a href="http://reverendbayes.wordpress.com/2008/05/29/bayesian-theory-in-new-scientist/">Bayesian theory of the brain</a></li>
</ul>
<h1>Computing</h1>
<ul>
<li><a href="http://swombat.com/2011/10/26/siri-command-line">Siri: A verbal command line</a></li>
<li><a href="http://www.gregerwikstrand.com/blog/2011/09/15/extroverted-programmers/">On extroverted programmers</a></li>
<li><a href="http://torrentfreak.com/piracy-is-not-theft-111104/">Piracy is not theft</a></li>
<li><a href="http://www.catonmat.net/blog/announcing-perl1line-txt/">A collection of handy Perl one-liners</a></li>
</ul>
<h1>Bonus</h1>
<ul>
<li><a href="http://sleeptiming.com/">Sleep Timing</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-11-october-1november-15-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS Reality Check: Attitude</title>
		<link>http://shahriarhaque.com/blog/reading-list/cs-reality-check-attitude/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/cs-reality-check-attitude/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 20:22:15 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[cs reality check]]></category>
		<category><![CDATA[reading-list]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/cs-reality-check-attitude/</guid>
		<description><![CDATA[I see CS kids bragging about their major everyday. Quite often bragging turns into insulting other people’s intellect. I used to be okay with this when I was a student. But after joining the workforce I see it as a mental disease spread by the CMUQ CS culture. If you want a CS job worthy [...]]]></description>
			<content:encoded><![CDATA[<p>I see CS kids bragging about their major everyday. Quite often bragging turns into insulting other people’s intellect. I used to be okay with this when I was a student. But after joining the workforce I see it as a mental disease spread by the CMUQ CS culture.</p>
<p>If you want a CS job worthy of your CMU education, a job that does not require you to be a code monkey, you will need to learn how to be respectful towards other people. Cracking a joke that makes a BA student look dumb doesn’t make you smarter, it only shows how arrogant you are. In real life, you’ll have to work with these people at some level, and if you can’t make them appreciate your work, you will find yourself replaced with more capable people.</p>
<p>As for IS students, don’t treat them as a lesser version of yourselves. Remember, the CS degree is focused more on the theoretical aspect of computing. In the workplace, IS students will have a competitive edge with their practical knowledge and communication skills.</p>
<p>Even if you get a technical job, you will be surrounded by people who are much older and experienced than you. If you are lucky, people will ask what major you were in, but never which college you went to. You have nothing to be proud of. So, from the next time on, watch that attitude !</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/cs-reality-check-attitude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS Reality Check: Courses</title>
		<link>http://shahriarhaque.com/blog/reading-list/cs-reality-check/cs-reality-check-courses/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/cs-reality-check/cs-reality-check-courses/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 21:22:10 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[cs reality check]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/reading-list/cs-reality-check/cs-reality-check-courses/</guid>
		<description><![CDATA[Freshmen often ask me what CS courses do we take in CMU. Sophomores and Juniors want to know which CS electives would help them in their senior thesis. Seniors want to know which courses are useful to get a job. To answer everybody’s questions I have a prepared a list of CS courses I have [...]]]></description>
			<content:encoded><![CDATA[<p>Freshmen often ask me what CS courses do we take in CMU. Sophomores and Juniors want to know which CS electives would help them in their senior thesis. Seniors want to know which courses are useful to get a job. To answer everybody’s questions I have a prepared a list of CS courses I have taken in CMU, a short description of each, and a rating indicating it’s real life value. Note that some of these courses may not be offered any more and the content of some might have changed.</p>
<h4>Introduction to Programming (10/10)</h4>
<p>Taught me object-oriented programming. Taught me Java, the language I use at work the most.</p>
<h4>Intermediate Programming (10/10)</h4>
<p>More Java, and lots and lots of data-structures: Trees, Hashes, Linked Lists. Once you get a grasp of programming this course will give you a toolbox to solve real world problems.</p>
<h4>Concepts of Mathematics (4/10)</h4>
<p>This course gives you a gentle introduction to the world of discrete mathematics and proofs. For some, this is the first real challenging course in CS. It’s not at all useful in real life, however, it does prepare you for upcoming disasters in discrete maths.</p>
<h4>Data Structures &amp; Algorithms (7/10)</h4>
<p>Even more Java. At this point, it starts to get repetitive. Her you learn about exotic data structures which you will most likely never use in real life. The only reason this course gets a 6 is because of the various graph algorithms you will prove to be a useful addition to your toolbox.</p>
<h4>Great Theoretical Ideas of Computer Science (10/10)</h4>
<p>Rating this course is tricky. It doesn’t teach you something that you can directly use in real life. But GTI helps build character. It separates the curious CS enthusiast from the ones who are worthy of a CS degree. This course helps you build the stamina to solve difficult mathematical problems and write formal proofs to justify your solution.</p>
<h4>Programming in C in Unix (10/10)</h4>
<p>I am one of the lucky few who doesn’t work in a Microsoft dominated company. Our entire software architecture is Unix-based. Whatever Perl and shell scripting I learned in this class, I use it every day. On the other hand, programming in C made me a better man and prepared me to face Fortran which I often face at work.</p>
<h4>Fundamental Principles of Programming (5/10)</h4>
<p>Better known to CS students as “ML”, this course attempts to bend your mind by teaching you functional programming. It’s really fun, if you get it, otherwise you’ll feel that ML is just a twisted language. Not much real world application today. However, functional languages are coming back in fashion. So doesn’t hurt to have a taste of it in college.</p>
<h4>Web Application Development (7/10)</h4>
<p>This is one of those light-weight courses that doesn’t add to your workload, but gives you a lot to learn. You are introduced to the wonderful world of Ruby on Rails, the bread and butter of IS students. Regardless of whether you like developing web apps or not, writing code in Ruby will be a breeze of fresh air after Java, C and ML.</p>
<h4> Introduction to Computer Systems (9/10)</h4>
<p>This is the first serious CS course in CMU where you really get your hands dirty. You get down to the assembly level and learn the basics of compilers, computer architecture and memory management. For sure, you won’t need much of this directly in real life. But the realization that “there is no magic inside the box” will help you understand performance bottlenecks of even the most complex systems.</p>
<h4>Algorithm Design &amp; Analysis (6/10)</h4>
<p>This is the grand-daddy of all discrete math courses. While it’s not as mind-bending as its pre-requisite GTI, it’s still teaches you some useful stuff. Understanding how to determine the time and memory complexity of algorithms will help you design better applications. In a company where a lot of applications build on your work, demonstrating a sound knowledge of algorithm design will raise a lot of eyebrows</p>
<h4>Algebraic Structures (0/10)</h4>
<p>Really abstract mathematics. Simply pointless.</p>
<h4>Formal Languages &amp; Automata (3/10)</h4>
<p>This is a course I really enjoyed, even though there is a lot of talk about abstract computational devices. Here you get to learn about regular languages, context free grammars, Turing machines etc. Nothing terribly practical, but very insightful nonetheless.</p>
<h4>Foundation of Programming Languages (0/10)</h4>
<p>More ML, but this time with a focus on formal analysis of programming languages. You get to write your own toy programming language every week. Sounds fun but terribly dry and useless.</p>
<h4>Technical Communication for Computer Scientists (0/10)</h4>
<p>This course has the potential to be a useful course. There is a variety of technical documents that a CS professional need to author on a regular basis, (e.g. Technical Design Document, Functional Specifications, Technical Requirements Document, Programmer’s Guide etc.) This course teaches none of them. I will write more about this point in a future article. CMU really needs to improve the content and instructors of this course.</p>
<h4>Software Engineering (2/10)</h4>
<p>Another course that had the potential to be very useful. But I guess there is no way to make students without industry experience appreciate the impact of good architecture and design. If I could go back to CMU and take any course, it would be this one. Any how, software engineering skills is what helps you climb up the corporate ladder and takes you from a code monkey to a software architect.</p>
<h4>Computer Networks (8/10)</h4>
<p>Another heavy duty programming course in C. A lot of new material. You learn networking from its dirty low levels of sending individual bits, error correction, collision detection &amp; avoidance, routing, queuing, Ipv4, Ipv6, TCP/IP, and even some application level network protocols. The programming assignments are pretty demanding. You get to read the technical specification of the IRC protocol and build your own IRC server. You even get to write your bit-torrent client in the last assignment. The networking stuff isn’t that useful to me as a programmer. However, as a distributed systems programmer, the code from the assignments are a useful reference for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/cs-reality-check/cs-reality-check-courses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

