<?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>Sat, 19 May 2012 20:56:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<div id="google_plus_one"><g:plusone></g:plusone></div>	<item>
		<title>LATW Episode 16 (April 15 &#8211; May 15, 2012)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-16-april-15-may-15-2012/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-16-april-15-may-15-2012/#comments</comments>
		<pubDate>Sat, 19 May 2012 20:56:57 +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/?p=310</guid>
		<description><![CDATA[Web Video Box Office Cool sound and water experiment &#160; Berkeley Ridiculously Automated Dorm &#160; Computing Please Don&#8217;t Learn to Code Please Understand Learning to Code How to pay back a programming technical debt More Universities Should Shut Down Their CS Programs Why you need to work with the machine, not against it How to [...]]]></description>
			<content:encoded><![CDATA[<h2>Web Video Box Office</h2>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:fa634866-8c37-4d47-be7a-d2d41e058e7d" class="wlWriterEditableSmartContent">
<div><object width="448" height="252"><param name="movie" value="http://www.youtube.com/v/mODqQvlrgIQ?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/mODqQvlrgIQ?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div>
<div style="width:448px;clear:both;font-size:.8em">Cool sound and water experiment</div>
</div>
<p>&#160;</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:4d7411d4-58f8-43f2-86d6-308a45a34703" class="wlWriterEditableSmartContent">
<div><object width="448" height="252"><param name="movie" value="http://www.youtube.com/v/6x1GkgbVP1I?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/6x1GkgbVP1I?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div>
<div style="width:448px;clear:both;font-size:.8em">Berkeley Ridiculously Automated Dorm</div>
</div>
<p>&#160;</p>
<h2>Computing</h2>
<ul>
<li><a href="http://www.codinghorror.com/blog/2012/05/please-dont-learn-to-code.html">Please Don&#8217;t Learn to Code</a></li>
<li><a href="http://dave.fayr.am/posts/2012-05-15-please-understand-learning-to-code.html">Please Understand Learning to Code</a></li>
<li><a href="http://markdrago.com/blog/2012/04/23/a-pragmatic-exploration-of-tech-debt/">How to pay back a programming technical debt</a></li>
<li><a href="http://blog.jeffreymcmanus.com/1924/more-universities-should-shut-down-their-computer-science-programs/">More Universities Should Shut Down Their CS Programs</a></li>
<li><a href="http://venturebeat.com/2012/05/11/work-with-the-machine-not-against-it/">Why you need to work with the machine, not against it</a></li>
<li><a href="http://adam.heroku.com/past/2011/4/28/scaling_a_development_team">How to scale a development team</a></li>
<li><a href="http://www.bloomberg.com/news/2012-04-22/software-engineers-will-work-one-day-for-english-majors.html">Software Engineers Will Work One Day for English Majors</a></li>
<li><a href="http://www.cattell.net/talk/TiwiliesTalk.htm">Things I Wished I Learned in Engineering School</a></li>
<li><a href="http://www.venturegrit.com/dont-hire-a-product-manager-without-these-key-leadership-skills/">Don’t Hire a Product Manager Without These Key Leadership Skills</a></li>
<li><a href="http://bhorowitz.com/2010/08/29/the-right-kind-of-ambition-2">Right kind of ambition</a></li>
<li><a href="http://radar.oreilly.com/2012/04/great-machine-learning-products.html">What it takes to build great machine learning products</a></li>
<li><a href="http://arstechnica.com/gadgets/2012/04/netflix-never-used-its-1-million-algorithm-due-to-engineering-costs/">Netflix never used its $1 million algorithm due to engineering costs</a></li>
<li><a href="http://www.forbes.com/sites/markfidelman/2012/05/04/why-atlassian-is-to-software-as-apple-is-to-design/">Why Atlassian is to Software as Apple is to Design</a></li>
<li><a href="http://alarmingdevelopment.org/?p=680">An IDE is not enough</a></li>
<li><a href="http://dynamicaspects.org/blog/2012/05/15/back-to-the-future/">Interactive Programming</a></li>
</ul>
<h2>Science &amp; Technology</h2>
<ul>
<li><a href="http://menkes76.com/projects/boarding/boarding.htm">Airplane boarding simulation</a></li>
<li><a href="http://messymatters.com/deadlines/">How to Set Deadlines for Your Students</a></li>
<li><a href="http://ieet.org/index.php/IEET/more/pellissier20120516">“The Self” in the Future: Will it be Extinguished, by Neuroscience?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-16-april-15-may-15-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Challenges of pursing a CS degree at the CMU Qatar campus</title>
		<link>http://shahriarhaque.com/blog/blog/challenges-of-pursing-a-cs-degree-at-the-cmu-qatar-campus/</link>
		<comments>http://shahriarhaque.com/blog/blog/challenges-of-pursing-a-cs-degree-at-the-cmu-qatar-campus/#comments</comments>
		<pubDate>Thu, 10 May 2012 18:14:00 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/?p=307</guid>
		<description><![CDATA[Last Monday I went to the Qatar National Convention Center to attend the senior convocation. In the dinner banquet that followed I was fortunate enough to share the table with a gentleman who was on the advisory board of CMU alongside two other rising seniors. Given his position, the gentleman naturally asked us if we [...]]]></description>
			<content:encoded><![CDATA[<p>Last Monday I went to the Qatar National Convention Center to attend the senior convocation. In the dinner banquet that followed I was fortunate enough to share the table with a gentleman who was on the advisory board of CMU alongside two other rising seniors. Given his position, the gentleman naturally asked us if we had any feedback about the Qatar campus. I was afraid that the three of us would commence a long rant about the horrors of the CS program. But what followed was a very well-structured explanation of what’s wrong in the CS program offered in Qatar. In fact, the explanation was so good that I decided to summarize it over here in this blog post.</p>
<h3>Inability to offer classes to meet all curriculum requirements</h3>
<p>This is by and large, the biggest problem CS students face on the Qatar campus. A good number of students walking at the convocation this year, will not get a degree because of this problem alone. The culprit in almost all of these cases is the Science Lab requirement. As per the curriculum,&#160; CS students have to take 4 science courses, one of them being a science lab course. For a long time the Qatar campus has not been able to offer the lab requirement. Students were advised to cross register with Texas A&amp;M/Cornell or spend a semester abroad in Pittsburgh to meet this requirement. For many students, neither of these options were feasible because of schedule clashes, or the unwillingness to study abroad. To be completely honest, the university did plan to offer lab courses many times. But for many consecutive semesters, these courses were canceled due to low number of registrations, or other logistic reasons. Even when the occasional Biology/Chemistry/Psychology lab was offered, students often found themselves unable to enroll in them because of not meeting pre-requirements. I understand, that this is a new campus and it will take time to iron out all the issues, but if there is consistently an issue with a single requirement, there should be a simple solution to offer a permanent class or waive the requirement all-together.</p>
<h3>Ever changing elective requirements</h3>
<p>This is one of those problems that affects both the campuses, but is aggravated over here because of the lack of choices for electives. The CS curriculum requires students to complete on course each to meet the Algorithms and Logic electives. In the Pittsburgh campus, there are about half a dozen choices for each of these electives. However, even one course for each elective is not offered consistently. Different visiting faculty often attempt to offer a different course every year, and the CS department tries to shoe-horn these courses to meet the elective requirements. Whenever, the schedule of classes is published every semester, it is often impossible to get a straight answer from academic advisors as to what requirements these new classes meet. The confusion surrounding this matter sometimes continues well after students have already started attending classes. Again, this does not seem like a very difficult problem to solve. Any debate about which requirement a course meets should be resolved before the schedule of classes is published and should be clearly documented.</p>
<h3>Lack of a roadmap for future course offerings</h3>
<p>This is somewhat related to the previous to. But I thought it deserves some special attention. As I said before, there are lab courses that are canceled right before the semester, unexpected lab courses for which students don’t have pre-requisites for, and even courses that switch to a different category during the semester. The situation regarding minors is even more unclear. The only thing for certain is that students can minor in BA and IS. With varying number of cross-registered/main campus courses, it is possible to minor in Maths and Design. Students have done it before. But only those students will be able to tell you what work-around they needed for the minor. Walk up to your advisor and ask for a suggested course sequence for a minor in X, chances are your advisor will be just as clueless as you are. Given all these complications, it is very difficult for a student to plan out a 4 year degree plan. What the CS program desperately needs is a roadmap of course offerings. I understand that there are many unforeseen factors. But I think a one-year or two-year roadmap of course-offerings is a reasonable demand.</p>
<h3>Others</h3>
<p>Besides these we also talked about other problems from our own experience. But they were mostly subjective in nature. That’s why I decided to file them under “others” and talk only about the most common of the issues. Given the dramatically small class sizes in CS, students get a lot of face time with professors both in and outside of class. While this could have been potentially beneficial, professors seem to abuse the extra face time by openly discussing poor grades, resulting in poor academic morale in an already challenging undergraduate program.</p>
<p>&#160;</p>
<p>I was very happy to see the gentleman taking notes of all our feedback. I hope he gets the chance to bring them up someday and truly make a difference for prospective students.</p>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/blog/challenges-of-pursing-a-cs-degree-at-the-cmu-qatar-campus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LATW Episode 15 (March 1 &#8211; April 15, 2012)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-15-march-1-april-15-2012/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-15-march-1-april-15-2012/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 19:15:32 +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/?p=304</guid>
		<description><![CDATA[Web Video Box Office 100 years of ships Perpetual Ocean Science &#38; Technology 500MW from half a gram of hydrogen: The hunt for fusion power Physicist uses math to beat traffic ticket Jennifer Aniston Neuron Titanic: How do you convert a movie to 3D, anyway? MIT Scientist Captures 90,000 Hours of Video of his son [...]]]></description>
			<content:encoded><![CDATA[<h1>Web Video Box Office</h1>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/04/ship.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ship" border="0" alt="ship" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/04/ship_thumb.png" width="493" height="341" /></a></p>
<p>100 years of ships</p>
<p><a href="http://shahriarhaque.com/blog/wp-content/uploads/2012/04/wind.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="wind" border="0" alt="wind" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/04/wind_thumb.png" width="488" height="278" /></a></p>
<p>Perpetual Ocean</p>
<h1>Science &amp; Technology</h1>
<ul>
<li><a href="http://www.extremetech.com/extreme/123837-500mw-from-half-a-gram-of-hydrogen-the-hunt-for-fusion-power-heats-up">500MW from half a gram of hydrogen: The hunt for fusion power</a></li>
<li><a href="http://www.physicscentral.com/buzz/blog/index.cfm?postid=4656335810518469535">Physicist uses math to beat traffic ticket</a></li>
<li><a href="http://www.npr.org/blogs/krulwich/2012/03/30/149685880/neuroscientists-battle-furiously-over-jennifer-aniston">Jennifer Aniston Neuron</a></li>
<li><a href="http://www.extremetech.com/extreme/124965-titanic-how-do-you-convert-a-movie-to-3d-anyway">Titanic: How do you convert a movie to 3D, anyway?</a></li>
<li><a href="http://www.fastcompany.com/1733627/mit-scientist-captures-his-sons-first-90000-hours-on-video">MIT Scientist Captures 90,000 Hours of Video of his son</a></li>
<li><a href="http://www.nytimes.com/2012/04/08/opinion/sunday/a-man-a-woman-just-friends.html">A Man. A Woman. Just Friends?</a></li>
</ul>
<h1>Computing</h1>
<ul>
<li><a href="http://blog.stephenwolfram.com/2012/03/the-personal-analytics-of-my-life/">Stephen Wolfram reveals the personal analytics of his life</a></li>
<li><a href="http://www.fastcompany.com/1824235/8-reasons-to-choose-a-startup-over-a-corporate-job">8 Reasons To Choose A Startup Over A Corporate Job</a></li>
<li><a href="http://blog.dweek.ly/four-startup-archetypes-hacker-hustler-designer-operator/">Four Archetypes Startups Need To Succeed</a></li>
<li><a href="http://www.softwarequalityconnection.com/2012/03/14-ways-to-contribute-to-open-source-without-being-a-programming-genius-or-a-rock-star/">14 Ways to Contribute to Open Source</a></li>
<li><a href="http://dtrace.org/blogs/brendan/2012/03/26/subsecond-offset-heat-maps/">Unusual patterns from cloud computing</a></li>
<li><a href="http://joshondesign.com/2012/03/14/sacred-cows-2">An open letter to language designers: Kill your sacred cows.</a></li>
<li><a href="http://e1ven.com/2012/03/21/comparison-of-open-source-licenses/">Comparison of Open Source Licenses</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-15-march-1-april-15-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qatar&#8217;s emerging technology scene</title>
		<link>http://shahriarhaque.com/blog/projects/qatars-emerging-technology-scene/</link>
		<comments>http://shahriarhaque.com/blog/projects/qatars-emerging-technology-scene/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 00:17:39 +0000</pubDate>
		<dc:creator>Shahriar</dc:creator>
				<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://shahriarhaque.com/blog/?p=292</guid>
		<description><![CDATA[Every now and then a senior year student asks me “Do you know of any companies that are hiring computer science graduates?” Or the parent of a prospective student asks me, “Should I let my daughter study Information Systems, is there really a market for this major?” I try to answer with as much enthusiasm [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then a senior year student asks me “Do you know of any companies that are hiring computer science graduates?” Or the parent of a prospective student asks me, “Should I let my daughter study Information Systems, is there really a market for this major?”</p>
<p>I try to answer with as much enthusiasm as I can gather. I tell them about the tons of internships students do each year. I tell them about myself, about how I got myself into General Electric. As long as I talk, I can see a glow in their eyes. But it is very short-lived. I know as soon as I leave, they’ll start to have doubts again. I wish I could point people to a resource that they could browse at the comfort of their homes and use to make informed decisions about themselves or their children.</p>
<p>I believe there is a big gap between what the citizens of Qatar believe about the job market, and how it really is. And it’s really a matter of shame. Qatar has been investing in its knowledge based economy for about a decade now. To make this investment worthwhile, we need to close this gap from both sides. We need a platform to let students know what’s happening in Qatar’s technology scene, and we need the tech-companies to know more about students, their curriculum, their research, their projects etc..</p>
<p>All this is about to change with “Emerging Technologist”, a one of a kind internet show aimed at bridging the gap between Qatar’s tech industry and its world-class academia. Over the course of the next few months ET will:</p>
<ul>
<li><span style="color: #555555;">Chase down working graduates from leading universities in Qatar and interview them about their jobs, their experience and their ambitions.</span></li>
<li><span style="color: #555555;">Collaborate with professors to get some insight on academic research and have students describe their contribution.</span></li>
<li><span style="color: #555555;">Interview potential employers and build detailed job profiles ahead of the career fair season.</span></li>
<li><span style="color: #555555;">Maintain up-to-date records of internship and full-time employment details of students majoring in tech.</span></li>
<li><span style="color: #555555;">Go on a university-level talent hunt looking for budding technology entrepreneurs with interesting personal projects.</span></li>
</ul>
<p>The show is currently going through the planning phase for season 1. The current team consists of recent graduates, seniors and juniors from Carnegie Mellon University in Qatar. To be able to produce this show successfully we’ll need talented students to direct, record and edit our short episodes. The team is also looking for student contacts in TAMUQ, QU and CNAQ to expand our coverage to all technology domains.</p>
<p>If you are interested in a semester-long engagement, or willing to brainstorm with us over the summer, drop us an email, or follow us on:</p>
<p align="center"><a href="mailto:emergingtechnologist@gmail.com">emergingtechnologist@gmail.com</a></p>
<p align="center"><a href="http://emergingtechnologist.tumblr.com/">http://emergingtechnologist.tumblr.com</a></p>
<p align="center">
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/projects/qatars-emerging-technology-scene/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LATW Episode 14 (February 1 &#8211; February 29, 2012)</title>
		<link>http://shahriarhaque.com/blog/reading-list/latw-episode-14-february-1-february-29-2012/</link>
		<comments>http://shahriarhaque.com/blog/reading-list/latw-episode-14-february-1-february-29-2012/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 19:55:27 +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-14-february-1-february-29-2012/</guid>
		<description><![CDATA[Video Box Office Interactive Starry Night Water droplets orbiting a needle Photo of the month Guess the subject of the photograph Science Why haven&#8217;t we cured cancer yet? Bioconservatives vs. Bioprogressives Seeing in ultraviolet Collection of talks by Richard Feynman Computing Hackers had full control of NASA&#8217;s computers How target figured out a teen girl [...]]]></description>
			<content:encoded><![CDATA[<h1>Video Box Office</h1>
<p><a href="http://vimeo.com/36466564"><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="starry_night" border="0" alt="starry_night" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/03/starry_night.png" width="590" height="329" /></a></p>
<p>Interactive Starry Night</p>
<p><a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=qHrBhgwq__Q"><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="needle" border="0" alt="needle" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/03/needle.png" width="581" height="309" /></a></p>
<p>Water droplets orbiting a needle</p>
<h1>Photo of the month</h1>
<p><a href="http://io9.com/5883452/can-you-guess-the-subject-of-this-photograph"><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="guess" border="0" alt="guess" src="http://shahriarhaque.com/blog/wp-content/uploads/2012/03/guess.png" width="589" height="312" /></a></p>
<p>Guess the subject of the photograph</p>
<h1>Science</h1>
<ul>
<li><a href="http://io9.com/5883180/why-havent-we-cured-cancer-yet">Why haven&#8217;t we cured cancer yet?</a></li>
<li><a href="http://reason.com/archives/2012/02/17/bioconservatives-vs-bioprogressives/singlepage">Bioconservatives vs. Bioprogressives</a></li>
<li><a href="http://www.extremetech.com/computing/118557-the-eyes-have-it-seeing-ultraviolet-exploring-color">Seeing in ultraviolet</a></li>
<li><a href="http://chill.com/brian/collection/richard-feynman-talks">Collection of talks by Richard Feynman</a></li>
</ul>
<h1>Computing</h1>
<ul>
<li><a href="http://www.bbc.co.uk/news/technology-17231695">Hackers had full control of NASA&#8217;s computers</a></li>
<li><a href="http://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/">How target figured out a teen girl was pregnant before her father did</a></li>
<li><a href="https://www.computerworld.com/s/article/9224415/If_It_Ain_t_Broke_Don_t_Fix_It_Ancient_Computers_in_Use_Today">Ancient computers in use today</a></li>
<li><a href="http://arstechnica.com/business/news/2012/02/how-red-hat-killed-its-core-productand-became-a-billion-dollar-business.ars">How Red Hat became a billion dollar business</a></li>
<li><a href="http://www.whattofix.com/blog/archives/2012/02/what-level-prog.php">What level of programmer are you?</a></li>
<li><a href="http://xorl.wordpress.com/2012/02/14/hack-analysis-cve-2010-0738/">Deconstruction of a computer worm</a></li>
<li><a href="http://afaikblog.wordpress.com/2012/02/10/a-new-approach-to-gnome-application-design/">A new approach to Gnome application design</a></li>
<li><a href="http://shkspr.mobi/blog/index.php/2012/03/api-design-is-ui-for-developers/">API design in UI for developers</a></li>
<li><a href="http://www.bigfastblog.com/how-to-get-experience-working-with-large-datasets">How to get experience working with large datasets</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shahriarhaque.com/blog/reading-list/latw-episode-14-february-1-february-29-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>2</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><span style="color: #555555;">Will cleaning up the code reduce development time in the future?</span></li>
<li><span style="color: #555555;">Will it make testing easier?</span></li>
<li><span style="color: #555555;">Will it make deployment less time consuming?</span></li>
<li><span style="color: #555555;">Does #1, #2, #3 take more time the time it will take you to rewrite the code?</span></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(logn). 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>
	</channel>
</rss>

