<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3665064696228706104</id><updated>2012-01-29T18:21:56.976+05:30</updated><category term='pypes python'/><category term='google+'/><category term='dream linux'/><category term='tools'/><category term='icons'/><category term='earth'/><category term='news'/><category term='books'/><category term='latex'/><category term='interesting'/><category term='development'/><category term='tagline'/><category term='stuff'/><category term='kde desktop'/><category term='community'/><category term='ozone'/><category term='last.fm'/><category term='proposal'/><category term='algorithms'/><category term='ambigram'/><category term='war'/><category term='mugshot'/><category term='opensocial'/><category term='chrome'/><category term='inotify'/><category term='dzone'/><category term='dying'/><category term='cellphones'/><category term='configuration'/><category term='study'/><category term='thoughts'/><category term='disappointed'/><category term='beryl'/><category term='nosql'/><category term='kget'/><category term='glowpad'/><category term='eye candy'/><category term='ma.gnolia'/><category term='c++'/><category term='rant'/><category term='pixelframe'/><category term='facebook'/><category term='scheme'/><category term='qrappyquotes'/><category term='n900'/><category term='choice'/><category term='walk'/><category term='lego'/><category term='hoplite'/><category term='soccer'/><category term='java'/><category term='global warming'/><category term='downtime'/><category term='codechef'/><category term='talk'/><category term='mumbai'/><category term='humour'/><category term='definition'/><category term='violence'/><category term='cq'/><category term='april fool'/><category term='memory'/><category term='ricochet'/><category term='arctic monkeys'/><category term='order of the phoenix'/><category term='semester'/><category term='ooxml'/><category term='webservice'/><category term='url memory'/><category term='preview'/><category term='observer'/><category term='mvc'/><category term='code snippet'/><category term='rekonq'/><category term='gsoc2010'/><category term='ui'/><category term='dv6910tx'/><category term='problems'/><category term='cold'/><category term='desktop'/><category term='practical'/><category term='build'/><category term='opinion'/><category term='drm'/><category term='out'/><category term='mac'/><category term='design'/><category term='code complete'/><category term='ieeextreme'/><category term='project'/><category term='osid'/><category term='dalits'/><category term='stupid'/><category term='svn'/><category term='google'/><category term='knockout'/><category term='ruby'/><category term='technology'/><category term='typhoid'/><category term='challenge'/><category term='high-five'/><category term='harrypotter'/><category term='kwin kde kde4'/><category term='magic'/><category term='tmux'/><category term='iso'/><category term='contextfree'/><category term='advertising'/><category term='inspiration'/><category term='demo'/><category term='delegation'/><category term='openoffice'/><category term='site'/><category term='design pattern'/><category term='blog action day'/><category term='notifications'/><category term='internet explorer sucks'/><category term='flow'/><category term='opensource'/><category term='mango'/><category term='markdown'/><category term='shell'/><category term='illiteracy'/><category term='computer'/><category term='nodejs'/><category term='gimp'/><category term='mindmap'/><category term='lll'/><category term='code'/><category term='flatscreen'/><category term='inkscape'/><category term='learning'/><category term='game of life'/><category term='IM'/><category term='hardware'/><category term='shoes'/><category term='hack'/><category term='greenhouse effect'/><category term='coredump'/><category term='orkut'/><category term='login'/><category term='pentadactyl'/><category term='english'/><category term='deathly hallows'/><category term='google code jam'/><category term='writer'/><category term='factor'/><category term='lasermania'/><category term='program'/><category term='music'/><category term='lifehacker'/><category term='paragliding'/><category term='microblog'/><category term='daiict'/><category term='depressed'/><category term='humanities'/><category term='kde'/><category term='awareness'/><category term='gsoc10'/><category term='print'/><category term='cool'/><category term='hackfest'/><category term='worldcup10'/><category term='twitter'/><category term='akademy'/><category term='pygame'/><category term='secret question'/><category term='foss'/><category term='back to normal'/><category term='qt'/><category term='rains'/><category term='gmail'/><category term='problem'/><category term='tetris'/><category term='pubsub'/><category term='pypes'/><category term='bushsucks'/><category term='portable computing'/><category term='installation'/><category term='fish'/><category term='funny'/><category term='web'/><category term='3d'/><category term='prerant'/><category term='iron man'/><category term='upnp'/><category term='shaastra'/><category term='comic'/><category term='art'/><category term='open source'/><category term='feature request'/><category term='freedom'/><category term='presentation'/><category term='home'/><category term='firefox'/><category term='colourcode'/><category term='fractal'/><category term='chocolate'/><category term='css'/><category term='society'/><category term='tips'/><category term='tetrablocks'/><category term='realtime'/><category term='repair'/><category term='kdeindia'/><category term='antiamerica'/><category term='ozone depletion'/><category term='vim'/><category term='review'/><category term='notebook'/><category term='nazgul'/><category term='humor'/><category term='harry potter'/><category term='bad'/><category term='security'/><category term='hd-dvd'/><category term='graffiti'/><category term='college'/><category term='language'/><category term='dream'/><category term='geek'/><category term='india'/><category term='game'/><category term='bash'/><category term='filter'/><category term='kde4'/><category term='boring'/><category term='movie'/><category term='trac'/><category term='maharashtra'/><category term='ahmedabad'/><category term='people'/><category term='custom'/><category term='svg'/><category term='intel'/><category term='software'/><category term='html'/><category term='mark haddon'/><category term='fun'/><category term='version control'/><category term='china'/><category term='amarok'/><category term='vcs'/><category term='hp'/><category term='computing'/><category term='recursion'/><category term='node.js'/><category term='annoyances'/><category term='yahoo'/><category term='chelsea'/><category term='gsoc'/><category term='phr'/><category term='proxy'/><category term='grub'/><category term='javascript'/><category term='multiplayer'/><category term='redis'/><category term='apple'/><category term='mitpune'/><category term='sdl'/><category term='change'/><category term='social'/><category term='environment'/><category term='confkdein'/><category term='winter'/><category term='backbonejs'/><category term='akademy10'/><category term='general'/><category term='internship'/><category term='foreign'/><category term='22bits'/><category term='achievement'/><category term='effects'/><category term='barcelona'/><category term='kwin'/><category term='knocked'/><category term='python'/><category term='admission'/><category term='browser'/><category term='monitor'/><category term='rounded corners'/><category term='forms'/><category term='windows'/><category term='bitsat'/><category term='me.dium'/><category term='happiness'/><category term='football'/><category term='affluenza'/><category term='driving'/><category term='highschool'/><category term='science'/><category term='arduino'/><category term='linux'/><category term='nile'/><category term='computer science'/><category term='whatsup'/><category term='key'/><category term='idea'/><category term='champions league'/><category term='twiml'/><category term='guide'/><category term='php'/><category term='kubuntu'/><category term='programming'/><category term='random'/><category term='synapse'/><category term='webdesign'/><category term='sierpinski triangle'/><category term='spartan'/><category term='nero'/><category term='syntax highlighting'/><category term='gandhinagar'/><category term='website'/><category term='e'/><category term='blog'/><category term='book'/><category term='akademy2010'/><category term='student'/><category term='face'/><category term='criticism'/><category term='web2.0'/><category term='food'/><category term='poor joke'/><category term='religion'/><category term='foss.in'/><category term='archlinux'/><category term='microsoft'/><category term='article'/><category term='mozilla'/><category term='aiglx'/><category term='damage'/><category term='techfest'/><category term='half-blood prince'/><title type='text'>KodeClutz</title><subtitle type='html'>unstoppable force hitting an immovable object...   or something like that anyway.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default?start-index=101&amp;max-results=100'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>268</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8801944317893674065</id><published>2012-01-29T12:08:00.001+05:30</published><updated>2012-01-29T12:08:38.164+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>The IT Crowd?</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;em&gt;(This article was originally published in Entelechy, edition 32, Jan 2012. It is being published here in full with some annotations.)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;It has continued to surprise me over the last 3.5 years how few information technology students actually bother to use the innovations of information technology to improve their productivity in any manner. More importantly, they are usually unaware of the products themselves. Recently the issue was brought to the fore when &lt;a href="http://sevobs.wordpress.com/about/"&gt;Skish Champi&lt;/a&gt; pointed out that &lt;em&gt;Zimbra Collaboration Suite&lt;/em&gt; had great calendar integration (and I agree), and we as a college are still struggling around with sending meeting emails and reminders.&lt;/p&gt;  &lt;p&gt;We are all experts at using &lt;a href="http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDirect_Connect_%28file_sharing%29"&gt;DC++&lt;/a&gt; to share files over our network. Yet, when it comes to sending the same files over the Internet you still stick to &lt;em&gt;(gasp)&lt;/em&gt; e-mail. If you send me a 50Mb file over email in 2012, I&amp;rsquo;m going to knock on your door with a gun in my hand. Use &lt;a href="http://www.dropbox.com"&gt;Dropbox&lt;/a&gt; or a thousand other such services. You only need to upload once, your multiple devices can continuously sync the files, individual folders can be shared with individual people &amp;mdash; this is great for working on projects and such. In addition Dropbox keeps old versions around. Heck, using the Public folder you can even host a complete static website without paying a paisa!  Once your file is on Dropbox you can go trigger happy with the public link and send the link in the e-mail instead. Less load for the e-mail servers, and the link can easily be shared via any other medium too.&lt;/p&gt;  &lt;p&gt;Similarly, if you are in charge of planning a lot of events (looks at the committees and clubs and faculty), create a new Calendar event in Zimbra and send it to all batches. That way a student simply has to accept the invitation, and he will also occasionally get reminders. Synced with a desktop Calendar application, you can even have your computer play sounds or show messages even when webmail is not open. Now you have no reason to forget or be late for a meeting.&lt;/p&gt;  &lt;p&gt;If you are working on a software project, and your way to &amp;lsquo;work as a team&amp;rsquo; on the code is to ship around newer versions of the files to everyone via e-mail, your project is already dead. Why? What happens when you suddenly need an older version? Or one feature from Amrita and the other one from Rajni? Spend your time copy-pasting? Let a &lt;a href="http://mercurial.selenic.com"&gt;version&lt;/a&gt; &lt;a href="http://www.git-scm.org"&gt;control&lt;/a&gt; &lt;a href="http://subversion.tigris.org"&gt;system&lt;/a&gt; do it for you!&lt;/p&gt;  &lt;p&gt;I&amp;rsquo;m going to mangle &lt;a href="http://www.faqs.org/docs/artu/ch01s06.html"&gt;The Unix Philosophy&lt;/a&gt; slightly to suit my purposes:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Use software that does one thing, and does it well.&lt;/li&gt; &lt;li&gt;Use software that does not lock your data in, or modify it so no other software can use it. A hyperlink should always be available.&lt;/li&gt; &lt;li&gt;A software which allows its output to be the input for another program, is usually better than one that doesn&amp;rsquo;t. An API can do wonders.&lt;/li&gt; &lt;li&gt;Understand your work flow. Don&amp;rsquo;t hesitate to throw away the clumsy parts.&lt;/li&gt; &lt;li&gt;Use tools in preference to manual labour, even if you have to detour to build the tools.&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;So why do we continue to use legacy technology, mouse around and generally not maximise our use of the computer?&lt;/p&gt;  &lt;p&gt;One reason is of course &lt;em&gt;inertia&lt;/em&gt;. Our biological brains are always trying to survive and if one thing works we aren&amp;rsquo;t willing to go improve. Another is a lack of curiosity about wanting to hear about new technology.&lt;/p&gt;  &lt;p&gt;But it is also an &lt;em&gt;attitude&lt;/em&gt; problem. Technology continues to be the poor step-daughter. If someone shows you how to skin potatoes faster, you&amp;rsquo;ll quickly adopt the technique. But as soon as the metaphor moves onto the computer, there is immediate unwillingness. From the very beginning of our computer education we&amp;rsquo;re asked to treat the computer as some magic box, and restricted from doing anything outside of that &lt;em&gt;&amp;lsquo;education&amp;rsquo;&lt;/em&gt;. &lt;em&gt;&amp;ldquo;Usse haat mat lagana nahi to kharab ho jayega.&amp;rdquo;&lt;/em&gt; is what your parents/teacher says. (English: Don&amp;rsquo;t touch that, you&amp;rsquo;ll break it). We carry over this belief that computers are frail creatures even when we become more responsible. The second reason is that the internals of computers continue to be treated as unknowns for much of the population. Most people who drive a car have a qualitative idea of how an internal combustion engine works. They also know how to change a tire. But the same people don&amp;rsquo;t know how to add RAM or the basics of a processor. Worldwide, &lt;em&gt;computer literacy&lt;/em&gt; focuses on office suites and the like. Even when you do eventually study the internals, they remains something from the textbook, so that whenever your C program is malfunctioning you don&amp;rsquo;t once bother to think in terms of how that program is being interpreted in a certain way, and how that can help solve the problem. This disconnect is alarming, I&amp;rsquo;ve seen computer science professors being unaware of basic computer features.  The funniest example I can think of this is when Windows users keep right clicking on the desktop and hitting &lt;em&gt;Refresh&lt;/em&gt; when things aren&amp;rsquo;t moving.&lt;/p&gt;  &lt;p&gt;The media is also responsible. World news is quick to highlight the policies and laws that will affect say, retail, or corruption or some industry. Technology media however is focused on &lt;em&gt;product reviews&lt;/em&gt; and the &lt;em&gt;next revolutionary technology&lt;/em&gt; (which is usually some old concept re-hashed), and sidelines &lt;em&gt;actual problems&lt;/em&gt; which will impact privacy, ownership and other fundamental rights in the digital age, so that the notion of &lt;em&gt;computing&lt;/em&gt; in itself is never given enough attention by the general public. If car manufacturers specified which brand of fuel you could use in their cars, there would be a hue and cry over anti-competitive behaviour and not giving choice to people. Yet mobile phone carriers fleece people every day with locked, underpowered cell phones. The &lt;a href="http://boingboing.net/2012/01/10/lockdown.html"&gt;war on computation&lt;/a&gt; keeps going the wrong way.&lt;/p&gt;  &lt;p&gt;I also believe, that just as in mathematics, computers require significantly more complex mental models to be manipulated in the mind. A car engine is heat and metal and chemicals and can directly be observed doing something. The levels of abstraction between the electrons racing through the wires and the point and click metaphor of daily interaction are numerous in comparison. As a user you do not of course need to have any inkling of them, but even at the software layer, a computer desktop is much more &lt;em&gt;congested&lt;/em&gt; and much less &lt;em&gt;tangible&lt;/em&gt;. Most normal people seem to keep missing subtle user interface clues that convey meaning. To those with the mental ability to hold these models and think rationally and logically (the only way in which the computer can think), the paradigms are much clearer.&lt;/p&gt;  &lt;p&gt;But as ICT students you are expected to have that mental ability. The &lt;strong&gt;first&lt;/strong&gt; thing to do is to lose fear of the computer.  Modern operating systems and applications are robust enough so that they won&amp;rsquo;t go down just due to clicking in the wrong place. Experiment with preferences, try buttons which have only icons, many a feature can be discovered this way.  &lt;strong&gt;Second&lt;/strong&gt;, internalise the knowledge as much as you can by always trying out new things yourself, until they become second nature. &lt;strong&gt;Third&lt;/strong&gt;, think through what you are doing rather than just clicking as your friend told you to. &lt;strong&gt;Fourth&lt;/strong&gt;, remember that like in all engineering disciplines, &lt;em&gt;convention&lt;/em&gt; is implicitly followed in computing as well. So concepts you learn in one application (say drag and drop) can be generalized and applied everywhere. &lt;strong&gt;Fifth&lt;/strong&gt;, start thinking of computing tasks as recipes. In cooking, you apply a series of &lt;em&gt;tools&lt;/em&gt;, to transform various &lt;em&gt;inputs&lt;/em&gt; (ingredients) to the final outcome. The output of the knife becomes the input of the frying pan. On the other hand, most software normal people use tends to be monolithic, one tool that will do all the steps. Good software on the other hand has separate knives and separate frying pans and allows a great deal of flexibility. The Unix command line is the most pervasive and powerful example. &lt;strong&gt;Sixth&lt;/strong&gt;, keep your eyes open for new ways of better using technology. Blogs like &lt;a href="http://www.lifehacker.com"&gt;lifehacker&lt;/a&gt; are an excellent source of such tips. &lt;strong&gt;Seventh&lt;/strong&gt;, pay attention when governments and companies try to cripple your right to compute and the right to information.&lt;/p&gt;  &lt;p&gt;With a little active effort, you streamline your computing experience, so that you can devote complete attention to the fantastic things you create.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/the-it-crowd"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8801944317893674065?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8801944317893674065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2012/01/it-crowd.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8801944317893674065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8801944317893674065'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2012/01/it-crowd.html' title='The IT Crowd?'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9045470543719533465</id><published>2012-01-09T17:18:00.001+05:30</published><updated>2012-01-09T17:27:17.370+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='pentadactyl'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>Toggling Proxy settings quickly with Pentadactyl and Firefox</title><content type='html'>&lt;div class="posterous_autopost"&gt;If you use the excellent &lt;a href="http://dactyl.sf.net/"&gt;Pentadactyl&lt;/a&gt; plugin for &lt;a href="http://www.firefox.com/"&gt;Firefox&lt;/a&gt; to get vim super-powers to the browser, here is a quick and painless way to toggle between a direct connection to the internet or using the default proxy settings. Add this to your &lt;code&gt;~/.pentadactylrc&lt;/code&gt;&lt;br /&gt;&lt;div class="CodeRay"&gt;&lt;div class="code"&gt;&lt;pre&gt;command proxy -nargs=1 :set! network.proxy.type=&amp;lt;args&amp;gt;&lt;br /&gt;nmap up :proxy 1&amp;lt;CR&amp;gt;&lt;br /&gt;nmap np :proxy 0&amp;lt;CR&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;Now pressing &lt;code&gt;up&lt;/code&gt; (&lt;b&gt;U&lt;/b&gt;se &lt;b&gt;P&lt;/b&gt;roxy) will enable &lt;i&gt;Manual Proxy Settings&lt;/i&gt; while pressing &lt;code&gt;np&lt;/code&gt; (&lt;b&gt;N&lt;/b&gt;o &lt;b&gt;P&lt;/b&gt;roxy) will use &lt;i&gt;Direct Connection&lt;/i&gt;. &lt;code&gt;network.proxy.type&lt;/code&gt; can take &lt;a href="http://kb.mozillazine.org/Network.proxy.type"&gt;other values&lt;/a&gt; which might be suited to your setup. You can change the key bindings too.&lt;br /&gt;&lt;div style="font-size: 10px;"&gt;&lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/toggling-proxy-settings-quickly-with-pentadac"&gt;nikhil's posterous&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9045470543719533465?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9045470543719533465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2012/01/toggling-proxy-settings-quickly-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9045470543719533465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9045470543719533465'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2012/01/toggling-proxy-settings-quickly-with.html' title='Toggling Proxy settings quickly with Pentadactyl and Firefox'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7856994129737919044</id><published>2011-12-22T23:37:00.001+05:30</published><updated>2012-01-13T09:01:33.373+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='svg'/><category scheme='http://www.blogger.com/atom/ns#' term='backbonejs'/><category scheme='http://www.blogger.com/atom/ns#' term='multiplayer'/><category scheme='http://www.blogger.com/atom/ns#' term='redis'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='realtime'/><category scheme='http://www.blogger.com/atom/ns#' term='pubsub'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Tic-Tac-Toe with Redis and Backbone.js</title><content type='html'>This post is a technical overview of my &lt;a href="http://tictactoe.nikhilism.com/"&gt;Tic-Tac-Toe&lt;/a&gt; implementation. It is a &lt;b&gt;zero server-side logic&lt;/b&gt;, &lt;b&gt;pub-sub&lt;/b&gt; based, &lt;b&gt;realtime&lt;/b&gt;, multiplayer game which uses &lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt; and &lt;a href="http://documentcloud.github.com/backbone/"&gt;Backbone&lt;/a&gt; as the key enablers of real-time and moving logic to the client side, respectively. Now that all the buzz-words are out of the way, the source code is on &lt;a href="https://github.com/nikhilm/tictactoe"&gt;Github&lt;/a&gt;.  There are rough edges with reliable communication, security holes do exist, but for the most part it works well.&lt;br /&gt;I would specially like to thank &lt;a href="http://twitter.com/yowgi"&gt;Nicolas Favre-Félix&lt;/a&gt; for &lt;a href="http://webd.is/"&gt;Webdis&lt;/a&gt; without which this would’ve been impossible.&lt;br /&gt;&lt;h3&gt;Basic functioning&lt;/h3&gt;On visiting the &lt;a href="http://tictactoe.nikhilism.com/"&gt;home page&lt;/a&gt; the user has an option to either join a game, or play with a friend. The join game option pairs the player with another player who also wants to play (if you are the only one online, you’ll have to wait). If you play with a friend you get a link you can send him/her so you can play together.&lt;br /&gt;The players are asymmetric in the sense that there is a ‘hoster’ and a ‘joiner’, whose roles I’ll get into in a bit.&lt;br /&gt;&lt;h3&gt;Technology Stack&lt;/h3&gt;&lt;a href="http://tictactoe.nikhilism.com/"&gt;Tic-Tac-Toe&lt;/a&gt; game me the opportunity to experiment with a ton of technologies/products I hadn’t handled before. The stack goes like this.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A &lt;a href="http://linode.com/"&gt;Linode&lt;/a&gt; VM hosts the service&lt;/li&gt;&lt;li&gt;&lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt; powers base Pub/Sub&lt;/li&gt;&lt;li&gt;&lt;a href="http://webd.is/"&gt;Webdis&lt;/a&gt; provides a REST API to &lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt; so that the clients can directly talk to it&lt;/li&gt;&lt;li&gt;&lt;a href="http://nginx.org/"&gt;nginx&lt;/a&gt; serves static files&lt;/li&gt;&lt;li&gt;&lt;a href="http://haproxy.1wt.eu/"&gt;haproxy&lt;/a&gt; routes requests to nginx or Webdis depending on the path&lt;/li&gt;&lt;li&gt;&lt;a href="http://documentcloud.github.com/backbone/"&gt;Backbone&lt;/a&gt; is used for MVC&lt;/li&gt;&lt;li&gt;&lt;a href="http://raphaeljs.com/"&gt;Raphaël&lt;/a&gt; is used to draw the grid and pieces using SVG&lt;/li&gt;&lt;li&gt;&lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; is used for AJAX and the &lt;a href="http://trentrichardson.com/Impromptu/index.php"&gt;impromptu&lt;/a&gt; is used for modal dialogs&lt;/li&gt;&lt;li&gt;&lt;a href="http://documentcloud.github.com/underscore/"&gt;underscore&lt;/a&gt; is a utility belt&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/LiosK/UUID.js"&gt;UUID.js&lt;/a&gt; for generating UUIDs&lt;/li&gt;&lt;/ul&gt;Yep, thats a lot of stuff for something so simple, so I’ve tried to rationalize it below :P&lt;br /&gt;&lt;h3&gt;Clients&lt;/h3&gt;All clients are identified by a UUID. The ‘host’ player’s UUID is used as the name of the Redis Pub/Sub channel. The ‘joiner’ will also subscribe to this channel and publish to it. This is why the ‘host’, ‘join’ bifurcation, so that a common channel can be used for communication. All messages are JSON objects.&lt;br /&gt;All communication is initiated by the ‘joiner’. The host player keeps waiting. The joiner starts the game, after which both players keep sending each other the moves made by the humans playing. After each move, both sides check for a win/lose/draw. Again, the joiner sends a &lt;i&gt;gameover&lt;/i&gt; message when it detects somebody has won (or it’s a draw). The host then &lt;i&gt;verifies&lt;/i&gt; that this is actually true, and responds back with it’s own &lt;i&gt;gameover&lt;/i&gt; message. Then both parties change their UI accordingly. This causes the slight delay between the actual win and the notification. &lt;br /&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/6554180495/" title="WSD forTic-Tac-Toe by Nikhil Marathe, on Flickr"&gt;&lt;img alt="WSD for Tic-Tac-Toe" height="386" src="http://farm8.staticflickr.com/7011/6554180495_52df260d2e.jpg" width="340" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Server side&lt;/h3&gt;The first question is &lt;i&gt;‘why both nginx and haproxy?’&lt;/i&gt; I could’ve run Webdis and nginx on two different ports since Webdis supports &lt;a href="http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing"&gt;CORS&lt;/a&gt;, but &lt;a href="http://www.opera.com/"&gt;Opera&lt;/a&gt; does not support it. Running just nginx web-facing and then proxying to Webdis based on path is also not possible since nginx does not currently support HTTP chunked replies, while haproxy does. Chunked replies are used by Webdis to relay Pub/Sub messages.&lt;br /&gt;&lt;h4&gt;Implementing ‘Join Game’&lt;/h4&gt;To allow two people to be paired, a Redis list is maintained. When a client clicks Join Game it attempts to LPOP a UUID off the list. If none are found (no other players), it RPUSHes itself onto the list.&lt;br /&gt;&lt;h3&gt;Client side&lt;/h3&gt;The client side has all the logic and so is more interesting. I won’t go deep (you can &lt;a href="https://github.com/nikhilm/tictactoe"&gt;read the source&lt;/a&gt;), but will discuss the key areas.&lt;br /&gt;Once a game has been initiated, both clients open a XMLHttpRequest to the subscriber channel. They watch for &lt;b&gt;readystatechange&lt;/b&gt; events and try to parse the messages. This is the &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/tictactoe.js#L4"&gt;&lt;b&gt;Subscriber&lt;/b&gt;&lt;/a&gt; which &lt;a href="http://documentcloud.github.com/backbone/#Events-trigger"&gt;fires events&lt;/a&gt; when it receives valid messages.&lt;br /&gt;The &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/tictactoe.js#L29"&gt;&lt;b&gt;Publisher&lt;/b&gt;&lt;/a&gt; component is used to send messages, while &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/tictactoe.js#L43"&gt;&lt;b&gt;Webdis&lt;/b&gt;&lt;/a&gt; is used for other Redis commands (currently only LPOP and RPUSH).&lt;br /&gt;The &lt;b&gt;GameRouter&lt;/b&gt; is the &lt;i&gt;controller&lt;/i&gt;, sets up models and views, watches for &lt;i&gt;gameover&lt;/i&gt; and beginning a host or join. HTML5 pushState or hashes are used to offer &lt;i&gt;permalinks&lt;/i&gt; for games. &lt;code&gt;/host/UUID&lt;/code&gt; is for hosting and &lt;code&gt;/play/UUID&lt;/code&gt; is the joiner. Backbone’s &lt;a href="http://documentcloud.github.com/backbone/#Router"&gt;Router&lt;/a&gt; and &lt;a href="http://documentcloud.github.com/backbone/#History"&gt;History&lt;/a&gt; is used to cleanly handle this. One feature I wish there was, is a way to query what the current route is via Backbone instead of mucking with &lt;code&gt;window.location&lt;/code&gt;.&lt;br /&gt;The &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/models.js#L1"&gt;&lt;b&gt;GridModel&lt;/b&gt;&lt;/a&gt; drives the game once it begins, triggering &lt;i&gt;gameover&lt;/i&gt; events and checking the grid after every move, also handling the turns. &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/views.js#L81"&gt;&lt;b&gt;GridView&lt;/b&gt;&lt;/a&gt; handles rendering the SVG grid and pieces based on GridModel and processes clicks while &lt;a href="https://github.com/nikhilm/tictactoe/blob/master/lib/views.js#L162"&gt;&lt;b&gt;HUDView&lt;/b&gt;&lt;/a&gt; notifies the user of his turn, piece and game state. Events are an integral part of this entire setup and Backbone makes it very simple and modularized.&lt;br /&gt;One thing that stands out in my use of Backbone is the absence of &lt;a href="http://documentcloud.github.com/backbone/#Sync"&gt;Sync&lt;/a&gt;. I’ve not used it, although it integrates well with Backbone. The game model didn’t seem suited to it, being more &lt;i&gt;event-based&lt;/i&gt; rather than the model reflecting the game state. &lt;a href="http://documentcloud.github.com/backbone/#Collection"&gt;Collection&lt;/a&gt; is also not used since there is only one grid.&lt;br /&gt;&lt;h3&gt;Issues&lt;/h3&gt;The lack of any server side code does lead to certain issues. None of them are serious when it comes to Tic-Tac-Toe but some affect the user experience and others are security issues.&lt;br /&gt;&lt;h4&gt;Usability&lt;/h4&gt;On the usability front, the current code is very &lt;i&gt;fickle&lt;/i&gt;. The joiner only tries to initiate the connection the first time it starts. If the host fails to respond for some reason (e.g. network connectivity) then both parties will keep waiting. If a joiner refreshes his page mid-way through a game, the game will restart for both parties (a good idea if you are a joiner and you are losing \:P). If the host refreshes the page, the joiner has to refresh after him.&lt;br /&gt;The slight lag to decide win/lose/draw was probably unnecessary. Rather than verifying both sides are on the same page, the notification could’ve been shown directly since this is just a game. The UX would’ve benefited.&lt;br /&gt;&lt;h4&gt;Security&lt;/h4&gt;Webdis sports a HTTP interface to Redis, but there is no real authentication support, which means the Redis instance hosting Tic-Tac-Toe is also effectively a public domain database (although the command set is restricted). Ideally this should run only in a trusted intranet. Ideally Webdis itself would be capable of serving files and deliver something like a nonce which it would then use to ensure that only its own connections are allowed to relay messages. Similarly nothing is stopping someone from grabbing the UUID and then playing future moves using a bot of some kind to always play optimally. In the case of Tic-Tac-Toe this is just a minor prick, but for actual client-side MVC applications this requires fixing.&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;Tic-Tac-Toe demonstrates that with a data structure server and HTTP interface to it, web applications where all logic is client-side are possible. Using the server as a Pub/Sub relay also allows near real-time performance, with WebSockets or SPDY possibly leading to better performance. Security policies still mean that true peer-to-peer isn’t possible. Authenticity and authorization also remain to be solved. On trusted intranets, such applications could be used for non-critical tasks. Meanwhile, games like this at least can be safely implemented and played as long as you have no sore losers :).&lt;br /&gt;&lt;div style="font-size: 10px;"&gt;&lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/tic-tac-toe-with-redis-and-backbonejs"&gt;nikhil's posterous&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7856994129737919044?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7856994129737919044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/12/tic-tac-toe-with-redis-and-backbonejs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7856994129737919044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7856994129737919044'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/12/tic-tac-toe-with-redis-and-backbonejs.html' title='Tic-Tac-Toe with Redis and Backbone.js'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7863072934769850179</id><published>2011-12-13T17:10:00.001+05:30</published><updated>2011-12-13T17:10:53.592+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='student'/><category scheme='http://www.blogger.com/atom/ns#' term='college'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Why Indian students should attend college</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;In recent months, the number of &lt;a href="http://www.hnsearch.com/search#request/submissions&amp;amp;q=title%3A%28drop+out%29&amp;amp;sortby=create_ts+desc&amp;amp;start=0"&gt;posts extolling dropping out&lt;/a&gt; of college, or of people recounting their experiences (mostly positive, probably because the negatives won&amp;rsquo;t share) has increased substantially on &lt;a href="http://news.ycombinator.com"&gt;Hacker News&lt;/a&gt; (I believe Steve Jobs effects on humanity extend here too). Meanwhile the &lt;a href="http://yuvi.in/blog/story-average-indian-techie/"&gt;The Story of Average Indian &amp;lsquo;Techie&amp;rsquo;&lt;/a&gt;, &lt;a href="http://aarvay.in/2011/12/07/whats-your-gpa.html"&gt;What&amp;rsquo;s your GPA?&lt;/a&gt; and &lt;a href="http://nainomics.blogspot.com/2011/11/welcome-to-indias-higher-education.html"&gt;other&lt;/a&gt; posts bring to the fore some things I do agree with:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Most computer science curricula are outdated or just poor quality&lt;/li&gt; &lt;li&gt;The majority of students are in it for the money&lt;/li&gt; &lt;li&gt;The professors are almost always bad&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;In fact I didn&amp;rsquo;t particularly like most of my CS courses either. There were a few gems like System Software and Computer Networks at DA-IICT, but the rest were totally out of sync with the real world. So if you are a precocious hacker should you drop out of college in India? (Assuming your Indian parents will let you do that!)&lt;/p&gt;  &lt;h3&gt;&lt;strong&gt;NO!&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;Try your utmost to get into a good college with &lt;em&gt;good infrastructure&lt;/em&gt;. Here is why you would want to do so. Not only is the infrastructure itself important, it also attracts the smartest people. Do well in college &lt;em&gt;while&lt;/em&gt; improving your own skills and knowledge.&lt;/p&gt;  &lt;p&gt;My reasons are based on personal experience, and in ways document some of my shortcomings too :P&lt;/p&gt;  &lt;h3&gt;Like minded people&lt;/h3&gt;  &lt;p&gt;Unlike the dense technological concentration of Silicon Valley, India doesn&amp;rsquo;t have technological hotspots. Even in Bangalore, very few people are &lt;strong&gt;passionate&lt;/strong&gt; about technology and are hacking on open source software or launching startups (while this is pretty high in India terms, it is nothing in Bangalore terms). FOSS talent is instead concentrated in the &lt;a href="http://google-opensource.blogspot.com/2011/10/whos-being-schooled.html"&gt;students of engineering colleges&lt;/a&gt;. (I focus on FOSS because it&amp;rsquo;s a good way to filter out passionate people.) You will get to discuss problems, hack on code and be inspired by these people. A concentration of geeks also leads to geek events like hackathons. During various college fests there will be programming contests and so on. You&amp;rsquo;ll get to have fun. Finally there will be a lot of smart people doing things other than computer science. But they will be equally as passionate as you are, they will be liberal and forward looking and it will be a pleasure to interact with them. Oh and please don&amp;rsquo;t think of every person you approach as a potential future employer, employee or general networking and increasing contacts kind of person. Sometimes you (and certain people in the Valley too) just need friends. Face it, do you want to spend the next few years talking to your mom about why REST-ful APIs are the bomb or why &lt;a href="http://xkcd.com/221/"&gt;this&lt;/a&gt; is funny?&lt;/p&gt;  &lt;h3&gt;Facilities&lt;/h3&gt;  &lt;p&gt;High-speed Internet access in India is still not too common, but colleges will usually have a great LAN setup, a lease line to the Internet and generally good connectivity. Use these to experiment with your peer-to-peer applications, host websites, or write the next great DDoS program (I&amp;rsquo;m not advocating this). That said they also may have ridiculously bureaucratic system administrators, censorship and the like. You just have to deal with in (and in some cases, circumvent).&lt;/p&gt;  &lt;p&gt;Your college will also have a certain &amp;lsquo;relic from the past&amp;rsquo; which is far more useful than any of our modern day, 140 characters technology. The library. Specific technology education is always best done via Internet, but general concepts and deep theory is still found in books. Use it well, you will regret the day you leave college and books will have to be purchased. (To overseas readers &amp;ndash; there is hardly a public library system in India.) Oh, and do remember the fiction section.&lt;/p&gt;  &lt;h3&gt;Motivation and Persistence&lt;/h3&gt;  &lt;p&gt;When you are working on personal projects it&amp;rsquo;s very easy to give up or change tracks. You also tend to focus only on the things you like. College courses will force you to persist at subjects you don&amp;rsquo;t like, and keep you onto one thing for 3-4 months. Valuable lessons when your first commercial project is 90% done and you don&amp;rsquo;t want to polish it up because &lt;em&gt;node.js&lt;/em&gt; just came along and is much more fun to play with. Do a great and challenging final project and end your education on a high note.&lt;/p&gt;  &lt;h3&gt;Find some other interests&lt;/h3&gt;  &lt;p&gt;Your life isn&amp;rsquo;t going to be just about CAP theorems, cache invalidation and naming your projects. You &lt;em&gt;will&lt;/em&gt; have to interact with society. Take a &lt;a href="http://blog.nikhilism.com/2011/10/have-some-humanity.html"&gt;humanities course&lt;/a&gt;. Learn to loosen up a bit &amp;mdash; travel, listen to music and play sports. Waste time with friends once in a while. Don&amp;rsquo;t burn out before you&amp;rsquo;ve even started. Your whole life before 25 should not be spent being a workaholic. Sometimes I think the Valley propagates Minimum Viable Product, pitching to VCs and beer and pizza far too much. You don&amp;rsquo;t want to end up like &lt;a href="http://www.wallchan.com/images/sandbox/42353-fat-nerd.png"&gt;this&lt;/a&gt;.  You might also want to try some of &lt;a href="http://apps.ycombinator.com/item?id=1866231"&gt;these things&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So if you were thinking of dropping out, just give it a second thought. If you are still convinced you should drop out, &lt;strong&gt;&lt;a href="http://derekneighbors.com/2009/01/just-fucking-do-it/"&gt;do it&lt;/a&gt;&lt;/strong&gt;. But please let me know at &lt;a href="mailto:nsm.nikhil@gmail.com"&gt;nsm.nikhil@gmail.com&lt;/a&gt; why you did so.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/why-indian-students-should-attend-college"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7863072934769850179?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7863072934769850179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/12/why-indian-students-should-attend.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7863072934769850179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7863072934769850179'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/12/why-indian-students-should-attend.html' title='Why Indian students should attend college'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-651888788477967151</id><published>2011-11-28T11:46:00.001+05:30</published><updated>2011-11-28T11:46:48.512+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='high-five'/><title type='text'>A High-Five Experiment</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;Final exam time is always a time of stress for students. When you have 6 exams in 6 days, the time just before the exam is one of general apprehension and attempts at mentally revising all the key points. Everybody notices that in the glum looks students have walking into the exam hall.&lt;/p&gt;  &lt;p&gt;Fortunately, the fourth year in DA-IICT is pretty light, and due to a multitude of projects, me and &lt;a href="http://experimentingwithidiotism.blogspot.com"&gt;Naman&lt;/a&gt; had only a couple of papers.  Inspired by Charlie Todd&amp;rsquo;s &lt;a href="http://www.ted.com/talks/charlie_todd_the_shared_experience_of_absurdity.html"&gt;TED video&lt;/a&gt; about &lt;a href="http://improveverywhere.com/"&gt;Improv Everywhere&lt;/a&gt; we decided to inject some cheer into the poor souls of the other batches.&lt;/p&gt;  &lt;p&gt;Four signs went up on Thursday, Nov 24, along the long, curved staircase leading to the hall.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm8.staticflickr.com/7172/6416695261_63ddf92cbd.jpg" alt="Somebody" /&gt; &lt;img src="http://farm7.staticflickr.com/6215/6416697199_9c53d67cf8.jpg" alt="wants to" /&gt; &lt;img src="http://farm7.staticflickr.com/6220/6416698209_50d43373a0.jpg" alt="give you" /&gt; &lt;img src="http://farm7.staticflickr.com/6106/6416699405_0f0afdd1cb.jpg" alt="a high five" /&gt;&lt;/p&gt;  &lt;p&gt;They were nicely spaced out so only one could be seen at a time, and we were standing at the end of it, right at the entry doors.&lt;/p&gt;  &lt;p&gt;As the students started coming in and the high-fives started flying, accompanied by words of encouragement (and the occasional &amp;ldquo;Heap sort is O(nlgn)&amp;rdquo;), it was very satisfying to see those faces light up in the happiness of an unexpected surprise and lose some of the pressure.&lt;/p&gt;  &lt;p&gt;So go out and spread some cheer! You can freely use and modify the above images for a noble cause :) There will of course always be people who are unable to take in why someone would do something like this, they&amp;rsquo;ll walk past you without an upward glance. Others will eye you with suspicion even as they raise a half-hearted hand. Grumpy administrators will tell you you aren&amp;rsquo;t supposed to be in the examination area if you don&amp;rsquo;t have an examination. But on that day I saw the most introverted student give a resounding high-five back and walk with a spring in his step. It was worth it.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/a-high-five-experiment"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-651888788477967151?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/651888788477967151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/11/high-five-experiment.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/651888788477967151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/651888788477967151'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/11/high-five-experiment.html' title='A High-Five Experiment'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8323012734362474378</id><published>2011-10-13T10:41:00.001+05:30</published><updated>2011-10-13T10:41:31.485+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='humanities'/><title type='text'>Have some humanity</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;em&gt;This article was first published in Entelechy (Issue 29, September 2011), the in-house DA-IICT magazine.&lt;/em&gt;&lt;/p&gt;  &lt;hr /&gt;  &lt;blockquote&gt;&lt;p&gt;&amp;ldquo;Technology [is] the knack of so arranging the world that we don&amp;rsquo;t have to experience it.&amp;rdquo;&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;-- Max Frisch&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt;  &lt;p&gt;DA-IICT is one of the few colleges in India to make humanities courses mandatory for students. It is sad then that most students treat it as a course to pass, and not as a way to gain insight into the world they&amp;rsquo;ll spend the rest of their lives in. I am going to try to convince you that humanities courses are perhaps more essential than even the technical courses.&lt;/p&gt;  &lt;p&gt;Observe the typical young engineer as he gets placed and eventually graduates from college. Engineers used to have dreams. That is why we have the Taj Mahal and the Golden Gate bridge. Today the most skilled engineers end up sitting at a desk writing non-user-friendly software for some mega-corp. Or they start a startup which aims to make another form of real communication virtual and &amp;lsquo;social&amp;rsquo; without considering the repercussions.&lt;/p&gt;  &lt;p&gt;The humanities have always been a has-been simply because they offer no financial value. A poet does not produce a life-saving vaccine or the next Fortune 500 company.&lt;/p&gt;  &lt;p&gt;The fundamental schism lies in the fact that engineers want concrete answers to problems, while the humanities never answers anything. It is about concepts and interpretations and I think engineers find that hard to fathom. Trust me, try it once, it is fun.&lt;/p&gt;  &lt;p&gt;We engineers are children of the binary, decisions are absolute, choices are fundamental. That is not how the real world works. The humanities teach us to look hard into those gray areas, and how they end up shaping history. I remember in the Environmental Studies class when the professor remarked that in the case of the Narmada project, you could not simply relocate the tribals. An economist or engineer is trained to see the world in terms of resources and equations and profits and margins. Our problems are so simple. We think that by throwing more hardware at it, or building better technology things will fix themselves. That to build a dam, we can simply move the people out and give them good homes. But we have no way to measure social cost. So the moving of tribals seemed a trivial problem. But the land they live on has been theirs for thousands of generations and they associate traditions and religion with it. It would be like evicting you from your home. All technological problems are finally attempts to improve society and the context in which they are implemented is essential.&lt;/p&gt;  &lt;p&gt;Even if you don&amp;rsquo;t want to be the decision maker or ideal citizen or a analysis spewing geek when all that your friends wanted to watch in the movie was the explosions, there is one concrete reason that you should take atleast a few humanities courses.&lt;/p&gt;  &lt;p&gt;Writing. The Indian education system especially thrives on canned solutions for much of school. Even the technical courses in college do not require writing papers or projects. But much of real-world engineering today is a team activity where written communication is a very important skill. For all your career you will be writing documentation, making reports and presenting findings to your boss. A good command of English and an ability to deliver crisp writing can help immensely. The humanities courses will be the only ones where you will have to analyse some aspect of art or literature, critique it and back up your opinions with arguments. Since you can&amp;rsquo;t do a copy-paste in humanities (since it doesn&amp;rsquo;t have any concrete answers), it is a good lesson in writing.&lt;/p&gt;  &lt;p&gt;Finally remember that as bits seep more and more into our lives, our cultures are framed by the file formats and user interfaces and other mechanisms that we will make. And they &lt;em&gt;will&lt;/em&gt; enforce the way we think. Do we want to end up in &lt;a href="http://www.prosebeforehos.com/image-of-the-day/08/24/huxley-vs-orwell-infinite-distraction-or-government-oppression/"&gt;Orwell&amp;rsquo;s 1984 or Huxley&amp;rsquo;s Brave New World&lt;/a&gt;? Facebook friends vs real friends, privacy vs sharing, customer-friendly or corporate-friendly, patent laws and other important &amp;lsquo;wars&amp;rsquo; are going to start erupting. Yet I find engineers have no awareness for any of this as they sit in their cubes creating the most widely propagated products that ever existed, constantly connected via a medium whose drivers are human. All these are areas where theologians and philosophers and lawyers have been arguing for centuries, in the eternally fluid and muddy concepts of property, privacy and ethics. Except they used to be able to make these decisions before the technology spread. Now App stores and locked-in products arise everyday, social networks grow exponentially and international surveillance is easy as pie, and law makers cannot catch up, so the engineer will have to specify those decisions by product design itself. There you and I will enter into the indefinite world of humanities because these problems have never arisen before. Only someone who understands both technology and humanities can solve this, otherwise we end up with abominations like the Digital Millenium Copyright Act or Software Patent Law based on real patent laws when it doesn&amp;rsquo;t fit the software model. This requires an ability to mull over these concepts and use the various interpretations debated in the past and the present. In some literary passage somewhere may lie the perfect system you strive for. The times, they are a changin.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/have-some-humanity"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8323012734362474378?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8323012734362474378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/10/have-some-humanity.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8323012734362474378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8323012734362474378'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/10/have-some-humanity.html' title='Have some humanity'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8607224564832867761</id><published>2011-10-03T10:50:00.001+05:30</published><updated>2011-10-06T09:32:53.730+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='challenge'/><category scheme='http://www.blogger.com/atom/ns#' term='gandhinagar'/><category scheme='http://www.blogger.com/atom/ns#' term='walk'/><category scheme='http://www.blogger.com/atom/ns#' term='ahmedabad'/><title type='text'>Talk the Walk</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;h3&gt;Prelude&lt;/h3&gt;  &lt;p&gt;A few months ago, on the way back to Gandhinagar from attending &lt;a href="http://www.doctypehtml5.in"&gt;DocTypeHTML5.in&lt;/a&gt; I wondered if it would be a good idea to walk from Ahmedabad to Gandhinagar to get home. The distance is 25km. The people accompanying me immediately shot down the idea :) but it stayed in my mind as something that had to be done at some point. So no, we didn&amp;rsquo;t just wake up at 4:30am one day and decide to walk to Ahmedabad. There was a plan. Over a busy semester I forgot about it, but in the summer I knew that the plan had to be executed as soon as I was back to college.&lt;/p&gt;  &lt;h3&gt;Are you crazy?&lt;/h3&gt;  &lt;p&gt;When I bounced the idea of a few people, pretty much all of the first reactions where &amp;ldquo;Are you crazy?&amp;rdquo; followed by refusal to accompany me. This kind of reaction was disappointing. Only two people stepped forward. One had had a similar idea in her head. The other was ready to do it. After significant rescheduling, the plan was finally put into motion on September 25, 2011. The latter had to drop out due to unforeseen circumstances.&lt;/p&gt;  &lt;h3&gt;The route&lt;/h3&gt;  &lt;p&gt;Our definition of &amp;lsquo;reaching&amp;rsquo; Ahmedabad was to walk along the Sarkhej-Gandhinagar highway till Iscon Mega Mall. The &lt;a href="http://maps.google.com/maps?saddr=DA-IICT+Road,+Infocity,+Gandhinagar,+Gujarat,+India&amp;amp;daddr=23.036993,72.511153+to:23.034184,72.5097881+to:NH+8C&amp;amp;hl=en&amp;amp;ll=23.121101,72.554054&amp;amp;spn=0.265542,0.445976&amp;amp;sll=23.035901,72.511976&amp;amp;sspn=0.016607,0.027874&amp;amp;geocode=FfjoYQEdFENUBClPUoeXOypcOTGmosAfM3l0mg%3BFUGEXwEdsW5SBCmDZJ_nSJteOTGA2J6pji5OKg%3BFUh5XwEdXGlSBCkJF88TSJteOTHFSWhoHlS14Q%3BFXVqXwEdHmRSBA&amp;amp;vpsrc=6&amp;amp;dirflg=w&amp;amp;mra=dme&amp;amp;mrsp=3&amp;amp;sz=16&amp;amp;via=1,2&amp;amp;t=h&amp;amp;z=12"&gt;Google Maps distance&lt;/a&gt; is 24.5km. The Google Maps walking estimate was 4 hours 58 minutes. The anticipation itself was a major stimulant.&lt;/p&gt;  &lt;p&gt;We left the DA-IICT main gate at 5:23am. Here is a log of all the landmarks, distances, and when we reached there.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;Start                  |  0.0km |  5:23&lt;br /&gt;Adalaj                 |  7.3km |  6:45&lt;br /&gt;Waterside              |  9.0km |  6:57&lt;br /&gt;Sardar Patel Ring Road | 12.8km |  7:40&lt;br /&gt;Nirma University       | 13.8km |  7:50&lt;br /&gt;Gota Circle            | 15.3km |  8:25&lt;br /&gt;Gujarat High Court     | 19.2km |  8:53&lt;br /&gt;Gurdwara (Acropolis)   | 23.2km |  9:35&lt;br /&gt;Iscon                  | 24.5km | 10:15&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;At Acropolis we took a 15 minute restroom break. We &lt;em&gt;did not&lt;/em&gt; sit. If I had sat down, I probably wouldn&amp;rsquo;t have gotten up again. We were now officially in Ahmedabad, the rest was just a formality to satisfy predecided constraints.&lt;/p&gt;  &lt;p&gt;The last 2km leg was finished in about 20 minutes. To be precise, we went up the south escalator and touched the glass door. The time was 10:15am. 4 hours 52 minutes with a 15 minute break.&lt;/p&gt;  &lt;p&gt;The feeling: priceless!&lt;/p&gt;  &lt;p&gt;(We took an auto back to DA-IICT after resting for 10 minutes.)&lt;/p&gt;  &lt;h3&gt;Tips&lt;/h3&gt;  &lt;ul&gt; &lt;li&gt;&lt;p&gt;Don&amp;rsquo;t think about the distance, or how much is left and where you are. There is a difference between observing and thinking. We observed landmarks and kept a log, but if you keep &lt;em&gt;thinking&lt;/em&gt; it&amp;rsquo;s 20 more kilometres, now it&amp;rsquo;s 10 more kilometres, especially when you are starting to feel the fatigue, you will want to give up.&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;p&gt;Company is good &amp;ndash; Not only is it an excellent way to pass some of the 5 hours, but it keeps the encouragement flowing. Again, avoid talking about the route, try playing games.&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;p&gt;Less food, more drink &amp;ndash; I had expected to be incredibly hungry through and after finishing the walk. This turned out to be wrong. Between 2 people the only food we had all morning was 2 chocolate bars and 4 biscuits. I don&amp;rsquo;t remember feeling hungry for atleast 3-4 hours even after the walk. So don&amp;rsquo;t bother carrying too much food (fortunately we didn&amp;rsquo;t). Carry a lot of water (fortunately we did) and some sugary drinks. Each of us had 2 litres of water, and about 500ml of mango drink. The lack of salt was noticed though, and we should have carried some salty drink like lime water. That said, even if you aren&amp;rsquo;t feeling hungry, keep snacking lightly after the walk.&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;p&gt;Take care of your feet &amp;ndash; Wear good shoes. I was initially planning to wear my Vibram Five Fingers, but didn&amp;rsquo;t because I have never walked more than 3-4km in them. I was a bit skeptical about the Saucony Kilkenny XC4 when I bought them 2 months ago, but they turned out to be brilliant shoes, never feeling uncomfortable or a burden. You &lt;em&gt;will&lt;/em&gt; get blisters. Wear soft socks. If you tend to sweat a lot, powder your feet before you leave. Since we refused to take a break, friction did eventually catch up. I think my first blisters appeared about 15km in. By the end I had 6 reminders of the walk :) Carry flip flops to change into at the end of the walk. Your feet will love you for it.&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;p&gt;When you reach the Wall, ignore it &amp;ndash; During my first 8km run last year, I realized what I had only heard from others. The Wall exists, and it is all mental. Your body is an exceptional piece of engineering that can keep going for a lot more than a mere 25km. But eventually your mind will start cribbing and noticing the pain and say things like &amp;ldquo;I&amp;rsquo;ve already done 15, this is enough for now&amp;rdquo;. That is your Wall. Punch a fist into that wall, gather up the pieces and stuff it in a little corner. Left foot, right foot.&lt;/p&gt;&lt;/li&gt; &lt;/ul&gt;   &lt;h3&gt;Awesome! Call me the next time you go&lt;/h3&gt;  &lt;p&gt;We succeeded. Objectively 25km is nothing, but subjectively it was the longest I&amp;rsquo;ve ever walked, and more than most normal people ever walk and so I consider it an achievement. When people found out, the &amp;ldquo;Are you crazy?"s were still the first question, followed by awe, followed by "Why did you do it?&amp;rdquo; and then &amp;ldquo;I want to do it too. Call me the next time you go&amp;rdquo;. Why did we do it? There was no point, no success to be achieved, no money to be won. It&amp;rsquo;s just that for me, life is about pushing myself. Where people shy away from pain, I embrace it. There is a difference between the pain of pushing oneself and the pain of real injury, and I think everyone should try for the former, but not push on till the latter. It turns out, that as soon as somebody proves it &lt;em&gt;is&lt;/em&gt; possible, people see that and they go &amp;lsquo;I can do this too&amp;rsquo; Till then, negativity keeps gnawing away, however much you explain it in terms of distances and times. The shortest answer is doing. That&amp;rsquo;s enough preaching :p&lt;/p&gt;  &lt;p&gt;There is unlikely to be a next time. I enjoyed the journey, but there was no end goal, and there are better ways of reaching Ahmedabad :) This challenge is done, it&amp;rsquo;s time to move on.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/talk-the-walk-48553"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8607224564832867761?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8607224564832867761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/10/talk-walk.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8607224564832867761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8607224564832867761'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/10/talk-walk.html' title='Talk the Walk'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2892732756460174124</id><published>2011-09-13T09:22:00.003+05:30</published><updated>2011-09-13T09:29:54.506+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='lll'/><category scheme='http://www.blogger.com/atom/ns#' term='chocolate'/><title type='text'>Life's Little Things: Chocolate</title><content type='html'>&lt;div class="posterous_autopost"&gt;If you can afford to buy a slab of chocolate once in a while, enjoy it. Few things in life come in small packages yet have great joy inside them.&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/johnloo/606739059/" title="Chocolate by John Loo, on Flickr"&gt;&lt;img src="http://farm2.static.flickr.com/1009/606739059_bff97744c2.jpg" width="500" height="375" alt="Chocolate"&gt;&lt;/a&gt;&lt;div style="font-size: 10px;"&gt;&lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/lifes-little-things-chocolate"&gt;nikhil's posterous&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2892732756460174124?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2892732756460174124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/09/life-little-things-chocolate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2892732756460174124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2892732756460174124'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/09/life-little-things-chocolate.html' title='Life&amp;#39;s Little Things: Chocolate'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm2.static.flickr.com/1009/606739059_bff97744c2_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9198248844322176340</id><published>2011-09-13T09:22:00.001+05:30</published><updated>2011-09-13T09:26:06.100+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='lll'/><title type='text'>Life's Little Things: Board Shorts</title><content type='html'>&lt;div class="posterous_autopost"&gt;If you tend to forget your shorts at home when you go swimming, board shorts that dry quick and can be squeezed hard are an invaluable investment.&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/efrenefren/4637992503/" title="men's board shorts-2 by efrenefren, on Flickr"&gt;&lt;img src="http://farm5.static.flickr.com/4053/4637992503_3fb55d6671.jpg" width="375" height="500" alt="men's board shorts-2"&gt;&lt;/a&gt;&lt;div style="font-size: 10px;"&gt;&lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/lifes-little-things-board-shorts"&gt;nikhil's posterous&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9198248844322176340?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9198248844322176340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/09/life-little-things-board-shorts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9198248844322176340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9198248844322176340'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/09/life-little-things-board-shorts.html' title='Life&amp;#39;s Little Things: Board Shorts'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4053/4637992503_3fb55d6671_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5359262045030552363</id><published>2011-09-04T16:40:00.001+05:30</published><updated>2011-09-04T16:40:16.080+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Toolset</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;Inspired by &lt;a href="http://usesthis.com/"&gt;The Setup&lt;/a&gt; and &lt;a href="http://pratul.in/toolset"&gt;Pratul&amp;rsquo;s post&lt;/a&gt;, here is how I &amp;lsquo;get my work done&amp;rsquo;.&lt;/p&gt;  &lt;h2&gt;Hardware&lt;/h2&gt;  &lt;p&gt;I currently use a four-core i7 15" Macbook Pro with 8GB of RAM and a 500GB HDD. I love it. For backups I have a Western Digital 160GB hard drive. I use cheap Skullcandy earphones when I need them (I usually prefer speakers).&lt;/p&gt;  &lt;h2&gt;Operating System&lt;/h2&gt;  &lt;p&gt;I used to be on Arch Linux until I got the MBP. Now I use OS X Snow Leopard. I still run Arch + KDE on a VirtualBox instance to occasionally hack on KDE. With 8GB of RAM, both keep running snappy :)&lt;/p&gt;  &lt;p&gt;Running OSX might come as a surprise considering my FOSS roots. But my software stack is such that it makes no difference what UNIX I use really.&lt;/p&gt;  &lt;h2&gt;Software&lt;/h2&gt;  &lt;p&gt;Considering I use the computer all day, the number of applications I actually run is tiny.&lt;/p&gt;  &lt;p&gt;I use &lt;a href="http://www.firefox.com"&gt;Firefox&lt;/a&gt; for browsing. I hide all chrome except the tab bar, and use the excellent &lt;a href="http://dactyl.sourceforge.net/pentadactyl"&gt;Pentadactyl&lt;/a&gt; extension to get vim key bindings and other keyboard driven goodness to Firefox.&lt;/p&gt;  &lt;p&gt;For viewing PDFs, I use Preview. The rare photo management is done with iPhoto. Music needs are satisfied with &lt;a href="http://www.clementine-player.org/"&gt;Clementine&lt;/a&gt; (my iTunes resides in the Trash), while &lt;a href="http://www.videolan.org"&gt;VLC&lt;/a&gt; handles video.&lt;/p&gt;  &lt;p&gt;I do use the excellent &lt;a href="http://notational.net/"&gt;Notational Velocity&lt;/a&gt; for note taking and idea jotting and the like. It fast, it stays out of the way and is easy to sync if I have to.&lt;/p&gt;  &lt;p&gt;iCal, synced with Google Calendar, is used for todos and submission reminders.&lt;/p&gt;  &lt;p&gt;And that is all the GUI apps I usually run. Which is why it doesn&amp;rsquo;t matter what UNIX I use, since most of my work is in the shell.&lt;/p&gt;  &lt;p&gt;Office suite you say? I find Google Docs suffices, to the point that if somebody sends me MS formats, I upload them to Google Docs. The Gmail web interface is also unbeatable so mail stays there.&lt;/p&gt;  &lt;p&gt;Accessories include Dropbox, Temperature Monitor Lite, gfxCardStatus to manually control which graphics card is in use, ShiftIt to position windows, afloat to allow &amp;lsquo;Always on Top&amp;rsquo; like KWin, Growl for notifications and Tunnelblick for VPN management.&lt;/p&gt;  &lt;p&gt;Now we come to the terminal. My terminal emulator is &lt;a href="http://iterm.sourceforge.net/"&gt;iTerm&lt;/a&gt;. I have only one window running maximized, with &lt;a href="http://tmux.sf.net"&gt;tmux&lt;/a&gt; acting as my &amp;lsquo;window manager&amp;rsquo; for shells. It has a slightly customized statusbar, with the solarized colour scheme. The shell is &lt;a href="http://www.zsh.org"&gt;zsh&lt;/a&gt; with a custom zshrc based on stuff I pick up around the Internet, with the &lt;a href="http://github.com/jcorbin/zsh-git"&gt;zsh-git&lt;/a&gt; prompt.&lt;/p&gt;  &lt;p&gt;This exact same terminal configuration is also available in the Linux VM (including vim configuration) so that I don&amp;rsquo;t need to switch my behaviour for the different OSes.&lt;/p&gt;  &lt;p&gt;For IRC I use &lt;a href="http://www.irssi.org"&gt;irssi&lt;/a&gt; although I use it as a total newbie.&lt;/p&gt;  &lt;p&gt;And the rest of my day is spent in &lt;a href="http://www.vim.org"&gt;vim&lt;/a&gt;. I do &lt;em&gt;all&lt;/em&gt; my long writing in vim &amp;mdash; code, articles, blog posts, configuration files &amp;mdash; everything. I use the molokai theme rather than solarized for the editor.&lt;/p&gt;  &lt;h2&gt;Vim plugins&lt;/h2&gt;  &lt;p&gt;First Tim Pope&amp;rsquo;s &lt;a href="https://github.com/tpope/vim-pathogen"&gt;pathogen&lt;/a&gt; is indispensible to easily manage other plugins.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=31"&gt;a.vim&lt;/a&gt; is a convenient little script to toggle between headers and sources.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://github.com/mileszs/ack.vim"&gt;ack.vim&lt;/a&gt; allows the invocation of &lt;a href="http://betterthangrep.com"&gt;ack&lt;/a&gt; from vim and presents the results in the Quickfix buffer. I map the keystroke &amp;lsquo;sd&amp;rsquo; to ack.vim.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://github.com/tpope/vim-fugitive"&gt;fugitive&lt;/a&gt; is useful for Git integration with vim, but I don&amp;rsquo;t use it that much yet except to do blames.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1984"&gt;fuzzyfinder&lt;/a&gt; is another indispensible script for me. I map &amp;lsquo;sf&amp;rsquo; to fuzzyfinder so I can quickly invoke that.&lt;/p&gt;  &lt;p&gt;Other plugins I use include nerdcommenter and vim-surround.&lt;/p&gt;  &lt;h2&gt;My Dream Setup&lt;/h2&gt;  &lt;p&gt;I would love a standing desk in my hostel room with an external monitor connected to my laptop, the way I worked at Mozilla. I am considering buying a Netgear Ultra 2 NAS to have redundant storage and sharing. Otherwise the MBP works great and is sufficient for now.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/toolset"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5359262045030552363?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5359262045030552363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/09/toolset.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5359262045030552363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5359262045030552363'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/09/toolset.html' title='Toolset'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9212613601374812263</id><published>2011-07-25T11:53:00.001+05:30</published><updated>2011-07-25T11:53:36.372+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='hp'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='harrypotter'/><category scheme='http://www.blogger.com/atom/ns#' term='movie'/><title type='text'>Harry Potter and the Deathly Hallows Part 2</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;I first saw DH2 on Friday night, and my thoughts after watching it were:&lt;/p&gt;  &lt;p&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;img alt="Screen_shot_2011-07-20_at_11" height="95" src="http://posterous.com/getfile/files.posterous.com/temp-2011-07-24/CHdAxDhyrBesIohcdradkkEstvfDuEemCxmqgytlmgbGgjiIhsHxogeskAxv/Screen_shot_2011-07-20_at_11.19.30_PM.png.scaled500.png" width="477" /&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;On Wednesday night I saw it again, determined to find out why I disliked it so much, and whether I was just being too hard on it. Interestingly, most Potter fans seem to have liked it this time, which was not the case before. Mike Patterson though has this &lt;a href="https://docs.google.com/document/pub?id=1WzN1nh7oZG9vhARIwtRiQ0A1x2oss_4RDfFaf4Mfa-8&amp;amp;pli=1"&gt;interesting writeup&lt;/a&gt; pointing out in very specific instances why the movie was bad. I myself have only raised my rating a couple of notches. Seen independently, the movie is decent, but after multiple readings of the book and ten years of association with Harry Potter it is plain bad.&lt;/p&gt;  &lt;p&gt;To get the good parts out of the way, the Prince&amp;rsquo;s Tale was beautifully done, Alan Rickman brings his marvellous portrayal of Snape to a great ending. The movie was visually pretty good, and Hogwart&amp;rsquo;s defending itself was well done, though a bit artificial in the performances of the professors.&lt;/p&gt;  &lt;p&gt;But in the bid to add action and drama to the movie, certain themes of the book were pushed aside, and that made this movie just another action thriller. There was some weak acting in places and just terrible situations too, but to focus:&lt;/p&gt;  &lt;h3&gt;Imperio&lt;/h3&gt;  &lt;p&gt;We start at Gringotts and Harry casts the Imperius Curse on the goblin. To lend some perspective, use of the Unforgiveable Curses is akin to murder in the Muggle world. Harry has demonstrated countless times before that he is not comfortable with hurting others (Expelliarmus anyone?). In fact, it is Griphook who has to put the idea in his head.&lt;/p&gt;  &lt;blockquote class="posterous_short_quote"&gt;  &lt;p&gt;&amp;ldquo;Act now, act now,&amp;rdquo; whispered Griphook in Harry&amp;rsquo;s ear, &amp;ldquo;the Imperius Curse!&amp;rdquo; &amp;ndash; Harry Potter and the Deathly Hallows, Page 531 of the US edition&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;and&lt;/p&gt;  &lt;blockquote class="posterous_medium_quote"&gt;  &lt;p&gt;And another memory darted through his mind, of the real Bellatrix Lestrange shrieking at him when he had first tried to use an Unforgivable Curse: &amp;ldquo;You need to mean them, Potter!&amp;rdquo; &amp;ndash; Harry Potter and the Deathly Hallows, Page 533 of the US edition&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;The use of Imperio in the book is an act of desperation, because certain things are simply evil, even in the magical world, and making a person go against his will is one of them. In the movie, we aren&amp;rsquo;t even shown Harry&amp;rsquo;s face as he casts the spell, and when Ron casts it again in the depths of Gringotts, he does it trivially. Obviously you cannot explain thought processes on screen, but a touch of hesistation, an expression, goes a long way into conveying the seriousness of the act. After all the goblin does die in the movie due to the curse.&lt;/p&gt;  &lt;h3&gt;Wands&lt;/h3&gt;  &lt;p&gt;Wands are the crux of the books, the one way humans get access to magic. They are &amp;lsquo;alive&amp;rsquo;, and bond and grow up with the wizard. Wands are respected, even Death Eaters don&amp;rsquo;t just destroy their enemy&amp;rsquo;s wand. The breaking of the holly and phoenix feather wand is immensely important. That wand has kept him alive 6 years. Its breaking is also symbolic of how Harry has to sever connections with Voldemort to defeat him. The re-joining of his wand is the last thing Harry does in the book, signifying a new beginning. &lt;em&gt;Where is the holly wand in the movie?!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Now to turn to the Elder Wand, the Deathstick, a wand with more lore than any other. The scene in the Headmaster&amp;rsquo;s office in &amp;ldquo;The Flaw in the Plan&amp;rdquo; is to show that Harry has the selflessness to give up that power and accept Death, but he still does not destroy it because it is an artifact, and Harry realizes that and puts it back in the grave, aware that its power is not really neutralized just yet.&lt;/p&gt;  &lt;p&gt;In the movie, he just snaps it and throws the pieces away. &lt;em&gt;You DO NOT snap a wand!&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;The Kiss&lt;/h3&gt;  &lt;blockquote class="posterous_short_quote"&gt;  &lt;p&gt;&amp;ldquo;Is this the moment?&amp;rdquo; Harry asked weakly&amp;hellip; &amp;ndash; Harry Potter and the Deathly Hallows, Page 625 of the US edition&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;Ron and Hermione do not kiss because they destroyed a Horcrux! The Kiss serves multiple purposes in the book. Tension between Ron and Hermione has been brewing since Book 3. Ron has always been attracted to Hermione, but she holds back, unsure of Ron&amp;rsquo;s seriousness. Book 6 and 7 are about Ron maturing and starting to think about others. Ron abandoning Harry and Hermione and then returning is the test of his growth.&lt;/p&gt;  &lt;p&gt;Meanwhile Hermione has always been the one to watch out for others. She also has a fanatical desire for equality of all species. Rowling clearly wanted to point out against discrimination in our society, and what better way than to use a Muggle-born girl with no pre-conceptions. S.P.E.W. is just her being formal, but all through Book 4-7 Hermione has stood up for the down-trodden &amp;ndash; even when Kreacher is lying she supports him.&lt;/p&gt;  &lt;p&gt;Ron remembering that the house-elves need to be rescued flips the switch. It convinces her that Ron truly has changed and is capable of the compromises required in a relationship. Second his acceptance for something she supports is crucial for her to commit.&lt;/p&gt;  &lt;p&gt;The Kiss was not spontaneous, it was building up for 4 books. The only thing spontaneous was the absurdity of the situation. All of this was lost in the movie.&lt;/p&gt;  &lt;h3&gt;The Flaw in the Plan&amp;hellip;&lt;/h3&gt;  &lt;p&gt;was badly dealt with.&lt;/p&gt;  &lt;p&gt;So there is the most powerful wizard of all time, he has the most powerful wand of all time, WHY would he try to rip out Harry&amp;rsquo;s face with bare hands?&lt;/p&gt;  &lt;p&gt;And why would you show both Bellatrix&amp;rsquo;s and Voldemort&amp;rsquo;s bodies as some kind of container for their souls, so that once the curse hits, they just disintegrate? Voldemort was after all, only human and the falling of his frail body with &amp;ldquo;mundane finality&amp;rdquo; was supposed to indicate this.&lt;/p&gt;  &lt;p&gt;Then the theme of love and remorse that is a cornerstone of the book is never raised. That Voldemort&amp;rsquo;s spells are no longer binding on anybody because Harry has effectively &amp;lsquo;pulled a Lily&amp;rsquo; on everyone is skipped. That love and sacrifice defeat Death is ignored. I would have loved to see Voldemort scream &lt;em&gt;&amp;ldquo;Accidents&amp;rdquo;&lt;/em&gt; like he does in the book, to show his ignorance of &lt;em&gt;&amp;ldquo;house elves and children&amp;rsquo;s tales, of love, loyalty, and innocence&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Expelliarmus and Avada Kedavra, Harry and Voldemort&amp;rsquo;s trademark moves were for a reason. For Voldemort it represents his conviction that Death is the worst damage you can inflict, while Disarming fits Harry&amp;rsquo;s character of not wishing death even to his attacker. In the movie the spells were never uttered (and we know that Harry is bad at non-verbal spells). The spells seemed to be different too, since Avada Kedavra does not disintegrate the body.&lt;/p&gt;  &lt;h3&gt;Dumbledore&lt;/h3&gt;  &lt;p&gt;Ah, were to start with this. Book 7 took this great great man that was Albus Dumbledore and tore him down, producing the flawed human every one of us is. Harry and Dumbledore are two characters shaped by death and Dumbledore&amp;rsquo;s reaction proves opposite to Harry&amp;rsquo;s reaction for a while. Dumbledore is the man who campaigns for equality, non-discrimination and all other things that are Voldemort. He is the character who brings out the deeper flaws in the wizarding world to casual readers. And contrary to being all this through wisdom, Rowling gave him these attributes by making him a man filled with remorse.&lt;/p&gt;  &lt;blockquote class="posterous_short_quote"&gt;  &lt;p&gt;&lt;em&gt;Rowling is trying to show throughout the books is that its the choices that matter!&lt;/em&gt;&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;If that wasn&amp;rsquo;t enough, Dumbledore is linked to the Hallows and Horcruxes and essentially scripts this entire storyline in a very high-level manner. His theories about the connection between Harry and Voldemort and how Magic is connected to conscious phenomena like Love is the only channel the reader has of deeper insights into the Wizarding World. To drop all mention of Dumbledore in the movie was representative of Hollywood&amp;rsquo;s bid to add only action and bling to known blockbusters, creating movies that do not make the reader think or disturb them.&lt;/p&gt;  &lt;blockquote class="posterous_short_quote"&gt;  &lt;p&gt;Many readers judge of the power of a book by the shock it gives their feelings. &amp;ndash; Henry Wadsworth Longfellow, Kavanagh, Chapter XIII.&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;In re-reading this article, I feel I haven&amp;rsquo;t been fully able to convince the reader due to a lack of writing skills. I&amp;rsquo;d take that up in specific comments if any :)&lt;/p&gt;  &lt;p&gt;Summing it up the books are about death and love and innocence and good and evil, but also about moments and small scenes that create intricate characters in our minds, and frame unspoken laws about the world of the book. You cannot make a good movie without keeping those in mind.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/harry-potter-and-the-deathly-hallows-part-2"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9212613601374812263?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9212613601374812263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/07/harry-potter-and-deathly-hallows-part-2.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9212613601374812263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9212613601374812263'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/07/harry-potter-and-deathly-hallows-part-2.html' title='Harry Potter and the Deathly Hallows Part 2'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8638585959088215542</id><published>2011-07-01T13:07:00.001+05:30</published><updated>2011-07-01T13:07:18.244+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='google+'/><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><title type='text'>Simulating the Facebook Wall in Google+</title><content type='html'>&lt;div class='posterous_autopost'&gt;Its been two days of Google+ and enough articles to fill a couple of &lt;br /&gt;books, so I'm not going to say anything about what I think of it and &lt;br /&gt;all that. &lt;p /&gt; But a couple of friends have been wondering how to do something like &lt;br /&gt;the Wall in Google+. The fine granularity of sharing means &lt;br /&gt;that you can directly use your Stream as a wall in G+ which is very &lt;br /&gt;convenient. If you are a programmer think of it in terms of Pub-Sub &lt;br /&gt;with highly configurable channels. &lt;p /&gt; To write on someone's wall, just create a new post, and share it only &lt;br /&gt;with them. That way only that person sees it in the stream &lt;br /&gt;which is effectively what a wall is. But a mutual friend can see the &lt;br /&gt;wall post in Facebook. How do you do that in Google+? That is what &lt;br /&gt;a circle is for. I think the real value of circles is as disposable &lt;br /&gt;ribbons around friends. You can pull and push people into them as &lt;br /&gt;required, &lt;br /&gt;create temporary circles to share among really small niches or over a &lt;br /&gt;set of overlapping circles and so on. &lt;p /&gt; Tip: LIke Facebook uses @ to mention names, Google+ uses, quite obviously, + &lt;p /&gt; What I would love to see is the ability to put one circle inside the &lt;br /&gt;other and so on, so that information shared with outer circles leaks &lt;br /&gt;to &lt;br /&gt;inner ones, but not the other way around. &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/simulating-the-facebook-wall-in-google"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8638585959088215542?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8638585959088215542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/07/simulating-facebook-wall-in-google.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8638585959088215542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8638585959088215542'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/07/simulating-facebook-wall-in-google.html' title='Simulating the Facebook Wall in Google+'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2248095022407858218</id><published>2011-06-14T13:12:00.002+05:30</published><updated>2011-06-14T22:00:37.728+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='semester'/><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>6: Time for a change</title><content type='html'>&lt;div class="posterous_autopost"&gt;&lt;p&gt;It’s been a month now since the semester is over, but when you are sitting in California, and visiting amazing places on weekends, writing blog posts isn’t the highest priority :) But the 6th semester deserves 10 blog posts and atleast one is mandated.&lt;/p&gt;  &lt;p&gt;6 not only had a personal highs, but in general wrought a lot of changes. I’ve begun taking a lot of pictures this semester. I always thought it was stupid of people to shoot images like crazy, but it turns out that photos are a very good way to trigger memories about past events. I also started scribbling down little notes about memorable days. Not only are they a great resource when writing posts a few months later, but you can capture your state of mind at that point which is impossible later. This is an outcome of the approach to the end of the college and seeing the emotional situation of the seniors during their final semester.&lt;/p&gt;  &lt;p&gt;I’ve been torn between making this post a chronicle of events or focusing on deeper things, which I don’t write very well about. Apologies to the two friends whom I chided on not writing good enough entries. It is hard work :P.&lt;/p&gt;  &lt;p&gt;Even semesters usually start with Synapse, and boy was this year’s Synapse blazing. The only reason this paragraph exists is so I could use the word &lt;em&gt;blazing&lt;/em&gt;. But Synapse does not fit where this note is going, although it served as the beginning for many of the things that happened.&lt;/p&gt;  &lt;p&gt;Life this semester was like American television shows, one larger story arc with lots of action in between :) That arc is of course trying for internships on two sides of the world. On the 22nd of March when Mozilla hired me past midnight – that was an EPIC moment! Living in Silicon Valley, working on Firefox and getting paid for it is a dream I never even considered, and it all became true in two hurried months of interviews with the nicest people, and visa procedures that make you an expert in filling up forms. I guess, now that I’m hired, I can reveal two interview gaffes I made. One of my interviews was during conf.kde.in when I was in Bangalore, with my Ahmedabad phone number. This meant I was on roaming. I conveniently forgot about the charges it entailed and was surprised when the call dropped half way through discussing hash tables. The second ‘disaster’ was on the final interview. Due to some time-zone blunder I was woken up by the interviewer and proceeded to give the interview in a most uncomfortable manner. That I still got the job seems like a bit of a shock now. (Note: Do not let the interviewer in on the fact that you’ve just woken up. Continue asking questions about the company until you are awake enough to deal with the technical parts.)&lt;/p&gt;  &lt;p&gt;Most of my college life has been an attempt at improving some or the other part of my personality. Being more impulsive has been at the top of that list. I used to be too much of a planner with an inbuilt cron daemon and all that, and if you continue with that you can miss a lot of the fun parts of college life. With the switch I’ve lost a lot of sleep, but it was well worth it. The outcome – memorable all-nighters which had nothing to do with studying, going to a movie the day before the exam because it was a three day international film festival and spending a lot more time away from the computer. I now think this is also an attempt to break down every stereotype associated with me in college, and since the t-shirt incident last year, I’ve been performing brilliantly at it :)&lt;/p&gt;  &lt;p&gt;As if determined to give me more reasons to be impulsive, India put on a massive World Cup win! I don’t really like cricket, but the crazy atmosphere in college, the constant cheering and the euphoria when the cup was won, was absolutely remarkable, and I think the Nikhil of yester-year would not have attended the matches.&lt;/p&gt;  &lt;p&gt;The other change has been to experience as many things as possible, which means eating in new places, travelling around, attending just about everything I could. This has been at the cost of certain responsibilities, which might be seen as bad by others (ie. not holding enough OSID sessions) but I’ve finally decided that it is more important for me to be personally satisfied with what I am doing than to conform (again) to those stereotypes that the old Nikhil has built up.&lt;/p&gt;  &lt;p&gt;I do not mean that I want to shirk my achievements. It feels good to know that you’ve set certain examples that others follow and to be a guide when jumping into the difficult world of FOSS development. This year, over 8 students were selected for Google Summer of Code from DA-IICT, and to know that me, Aditya and Dinesh had a part to play in it felt really good.&lt;/p&gt;  &lt;p&gt;While I was having fun, the KDE India community ticked off its dream of having a conference here. conf.kde.in was a very special occasion because it was the first time the KDE community had a India conference. Pradeepto and Shantanu and others in Bangalore put in a &lt;strong&gt;ton&lt;/strong&gt; of effort , and the eV provided full support, which led to a wonderful conference with well known KDE speakers and some great food :) The response was tremendous and some of the effects are already visible with the number of Summer of Code and other contributors who were conference attendees. My own contributions have been at an all time low and it seems it will be that way into the summer, but the motivation has not dwindled only due to the wonderful people.&lt;/p&gt;  &lt;p&gt;Academically this semester was a personal disaster. I had really easy courses for the most part, but I did not like the amount of effort I put in. The parts which I thoroughly enjoyed, I did &lt;a href="https://bitbucket.org/nikhilm/fileadelphia"&gt;really well&lt;/a&gt;, but for the most part I was a pig-headed ass, and that has to change. I did get a 9.4/10 overall though :)&lt;/p&gt;  &lt;p&gt;The software engineering course was Shakespeare all over again. I feared it, then I mocked it, then I rebelled against it, then I just mis-quoted it in desperation :), and in hindsight I respect it. It was a hard lesson in managing a team, getting work done and staying with one piece of software for four long months and polishing it. It proved to me that the hacker style of coding is not enough on its own to produce good software.&lt;/p&gt;  &lt;p&gt;Finally, in my ‘thoughts document’ (see SEN ke side effects!) that I mentioned at the beginning, there are certain names of people that have affected or inspired me in college. While writing this I’ve been deliberating on whether now is a good time. It’s not, but two groups of students do deserve a special mention:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;&lt;p&gt;The Press Club – We’ve had an excellent year with readership through the roof and high-quality articles. The batch of 2007 has been the principal force in rejuvenating the magazine and the main source of the more argumentative and well analyzed articles. At the same time you’ve been humble mentors and this is getting really fluffy so thanks a lot is all I’ve got to say.&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;p&gt;Special Ops – Ah, what to put here about the weirdest bunch of juniors and some batchmates, some of whom I got to know only this semester? Thanks for letting me enjoy the World Cup, listening patiently to my PJs, playing TT, and not treating me like a senior. Now just stop calling me bhaiya and we are cool. Also remember, you are all 10 pointers :)&lt;/p&gt;&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;There are other people, but I don’t want to embarass them and they don’t come under any group :P You know who you are.&lt;/p&gt;  &lt;p&gt;If you’ve made it till here and know me, you may be surprised at how this post has played out, considering I’m the un-emotional, hug-less boy. Do NOT raise this slew of changes in a face-to-face discussion with me (especially you Mama and Baba :)), in some things I’m still closed source.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/6-time-for-a-change"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2248095022407858218?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2248095022407858218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/06/6-time-for-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2248095022407858218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2248095022407858218'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/06/6-time-for-change.html' title='6: Time for a change'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7996294557924730515</id><published>2011-05-02T22:00:00.003+05:30</published><updated>2011-06-22T20:56:14.968+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='internship'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Interning</title><content type='html'>&lt;div class="posterous_autopost"&gt;DA-IICT 3rd year students usually do an internship in the summer. Good industrial internships are always hard to come by, although the situation is way better in IT than in other, more resource-intensive disciplines. 10 interviews, a hundred or so e-mails and lots of forms later this is part guide, part my internship search story. The first thing you’ve to decide is what kind of company you want to intern at. Most companies will have menial code jockey jobs which you don’t want. This is my first blog post typed out on the n900 for the most part while waiting for a flight home at Ahmedabad airport. What a keyboard!&lt;br /&gt;&lt;h2&gt;Why not a GSoC again?&lt;/h2&gt;Having over two years of FOSS contribution and 7 years of usage and having done a GSoC previously, I could have done one again. While a GSoC is an invaluable experience, it is not the same as an internship. GSoC is excellent at improving e-mail communication skills and long distance collaboration and giving a feel of the open source development style. But it is not the same as going to office, talking to people, having lunch together and hanging out. In addition internships usually will be in a city or country other than the one you live so it can be a great excuse to explore a new place. So if you’ve already done a GSoC, getting a different sort of experience is way more important in my opinion. So I didn’t apply at all this year. Besides I was confident that my experience would serve me just as well to get into the kind of companies I wanted.&lt;br /&gt;&lt;h2&gt;Have a good CV&lt;/h2&gt;Spell-check, design it well and put in only relevant things. If you are a good singer don’t put that in just to have stuff to show in a IT company. On the other hand positions of responsibility should always be highlighted. FOSS contributions top the charts in startups and other ‘cool’ or cutting-edge companies.&lt;br /&gt;&lt;h2&gt;Start early&lt;/h2&gt;By luck or resolve my best move was starting to look for internships in December for an intern to start in May. Keep in mind that HR departments are busy places, resumes can take time to process and sometimes do get lost. Wait for a week for a reply when you submit your CV, then ping them aggressively on IRC, Twitter and e-mail to ensure you aren’t forgotten. Interview procedures can take upto a month and for international interns there are visa procedures that take time. Finally you are likely to get rejected by the first few and you should have time to apply for more. In any case companies with established internship programs have information available on their websites and start each season with prior planning.&lt;br /&gt;&lt;h2&gt;Decide what you want to work on&lt;/h2&gt;The first two companies I applied to were Google India and RethinkDB. The RethinkDB folks were very positive about international interns. I had two interviews in early January which went ok. I was rejected, which in hindsight I know was due to me not really being passionate enough about what they were doing. So I narrowed down to the two specific interests I currently have.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Javascript engines and low level APIs&lt;/li&gt;&lt;li&gt;concurrency, distributed networking and web-scale computing.&lt;/li&gt;&lt;/ul&gt;and decided that I would only approach companies based on these work areas.&lt;br /&gt;&lt;h2&gt;Stick to a few companies.&lt;/h2&gt;Interviews are always stressful because you have to think on the spot. If you are trying internationally they will be at very bad times (most of mine were at 6am and 10pm). Companies hiring solely on phone interviews will usually take atleast three interviews. In addition you will have to prepare atleast a bit for them. This adds up to a lot of things to do. So stick to a few companies at a time. Prioritise which company you want to work for if hired by multiples companies. When you agree for interview times, make sure you convert timezones properly and that you don’t have any appointments more important than the interview at that time. Finally, remember you have a life too :) I gave one of my interviews at conf.kde.in, and another during Synapse. At such times be very careful with scheduling.&lt;br /&gt;&lt;h2&gt;Research&lt;/h2&gt;Off-campus internships (ie. ones you find on your own) are the way to go. The college will always aim for what is good for a majority of students, or towards established companies. But if your area of interest is niche you can do a much better job looking on your own.&lt;br /&gt;Try to find out as much as you can about what interns do in the company. With some searching you can usually find blog posts of former interns which can be very informative. Talk to people in the domain. If you are a FOSS contributor ask fellow IRC users about intern opportunities or experiences.&lt;br /&gt;Based on my areas I finally applied to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;RethinkDB&lt;/li&gt;&lt;li&gt;Google India&lt;/li&gt;&lt;li&gt;Directi&lt;/li&gt;&lt;li&gt;Opera&lt;/li&gt;&lt;li&gt;Mozilla&lt;/li&gt;&lt;/ul&gt;I was very lucky to meet a former Mozilla intern at the MIT Media Lab COEP workshop in late January. Without that I would never have thought of it as I was unaware of the Mozilla Foundation and Mozilla Corporation dichotomy.&lt;br /&gt;&lt;h2&gt;Be confident, but ready for rejection.&lt;/h2&gt;During the interview what matters most is being able to keep up a continuous stream of conversation going to show that you are capable of thinking. So if you tend to think mentally for 15 minutes and then produce the answer in a flash, it would be good to think out loudly. If you are confused, clarify the question, it does not penalise you. Remember that in interviews no one expects perfect code, and classes and documentation.  If you miss edge cases thats fine, performance – not an issue until the interviewer actually asks you for a better algorithm. Graph and string algorithms are a favourite of interviewers. For algorithms the &lt;a href="http://www.topcoder.com/tc?d1=tutorials&amp;amp;d2=alg_index&amp;amp;module=Static"&gt;TopCoder tutorials&lt;/a&gt; are a good read. For C++, the &lt;a href="http://www.parashift.com/c++-faq-lite/"&gt;C++ FAQ&lt;/a&gt; is &lt;i&gt;invaluable&lt;/i&gt;. In fact I suggest always having that page open during the interview. For C++, templates and virtual functions  tend to be a question spot. In addition, know the warts and good points of your favourite language. If you have FOSS projects, be ready to explain what they are, and how you implemented them. One favourite interviewer question is, “What was the hardest part to implement?”. In such a case be prepared to explain in as general terms as possible, since the APIs you use may not be something the interviewer has experience with.&lt;br /&gt;A typical telephone interview will last 30 minutes to an hour. Half of that time will be the technical interview and the other half when you can chat with the interviewer. A full recap of my interviews with each company are beyond the scope of this article, but suffice to say that I was lucky to have extremely nice interviewers. Google insists on algorithmic questions which you’ll usually answer via a shared Google Docs. Remember that in a phone interview it is important to know how to approach the problem. Since you have access to a computer, once you know what to do, you can look up your existing code or use the internet. Just keep discussing the approach on the phone and speak with utmost confidence. The interviewer may try to misguide you. For Mozilla and Opera the interview was purely on former experiences and some C++ stuff. Use the chat time later well. Good questions to ask are about prior interns, what they do, how they find the company etc. If you know their name before the interview, see if you can find out about them on the internet.&lt;br /&gt;&lt;h2&gt;Get to know and learn from the interviewers&lt;/h2&gt;My most memorable interview was the fourth one with Mozilla when due to some daylight savings confusion I was &lt;i&gt;woken up by the interview call&lt;/i&gt;. Desperate to get myself sane, I asked him a few questions before I let him start the technical round. After that I spent 45 minutes discussing spidermonkey and Mozilla’s general plans with Luke Wagner. It was a very humbling experience. If you can show the interviewer that you are passionate about the products and do you homework, there final review is much more likely to be glowingly positive. Finally they can tell you about some implementation features, constraints etc. that can be interesting to know about even if you never join that organization.&lt;br /&gt;&lt;h2&gt;Congrats, now get to work!&lt;/h2&gt;After all this, I hope you get selected somewhere. I can’t really write the part about how to handle it if you get rejected. So what happened to me?&lt;br /&gt;The response order was:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;RethinkDB reject – January 16, 2011&lt;/li&gt;&lt;li&gt;Directi reject – March ??, 2011&lt;/li&gt;&lt;li&gt;Mozilla accept – March 22, 2011&lt;/li&gt;&lt;li&gt;Google accept – March 25, 2011&lt;/li&gt;&lt;li&gt;Opera reject – March 28, 2011&lt;/li&gt;&lt;/ul&gt;based on my interview experiences, stipend and location I opted for Mozilla Corporation! When I got the confirmation on March 22, it was unbelievable but I guess all the hard work paid off. The Mozilla folks have been really nice and punctual throughout the process, and damn they know how to take care of their interns :) I think a series of posts will of course pour out of me regarding the internship in the coming months. I will be working at Mozilla HQ in Mountain View, California from next week to the end of July. My first assignment is typed array implementation improvements in JavaScript so Firefox can perform WebGL, audio/video  and binary data better. With Mozilla I found a great, FOSS friendly company, interesting work dealing directly with JavaScript engines, a new city to explore right in Silicon Valley and going to the United States of America for the first time ever. I couldn’t have asked for more :D&lt;br /&gt;&lt;hr /&gt;A note to DA-IICT students specifically! Our placement cell has an odd policy where when you apply for one or more internships through the placement cell, you are bound to accept the offer of whichever company accepts you first. So if a ‘better’ company delays their interviews, and a ‘lesser’ company hires you already, you are screwed.&lt;br /&gt;&lt;div style="font-size: 10px;"&gt;&lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/interning"&gt;nikhil's posterous&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7996294557924730515?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7996294557924730515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/05/interning.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7996294557924730515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7996294557924730515'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/05/interning.html' title='Interning'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1789130315674117152</id><published>2011-04-30T10:12:00.002+05:30</published><updated>2011-04-30T10:15:02.384+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>Why I love open source</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-vleKa_7_cc8/TbuTlQQUfqI/AAAAAAAAARs/1AGRPL6XdHQ/s1600/yajl.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 80px;" src="http://3.bp.blogspot.com/-vleKa_7_cc8/TbuTlQQUfqI/AAAAAAAAARs/1AGRPL6XdHQ/s400/yajl.png" alt="" id="BLOGGER_PHOTO_ID_5601232829793205922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class="mobile-photo"&gt;Someone who found my code interesting, can use it as a launchpad and take it ahead!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1789130315674117152?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1789130315674117152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/04/why-i-love-open-source.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1789130315674117152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1789130315674117152'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/04/why-i-love-open-source.html' title='Why I love open source'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-vleKa_7_cc8/TbuTlQQUfqI/AAAAAAAAARs/1AGRPL6XdHQ/s72-c/yajl.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7508074461320159628</id><published>2011-04-07T11:28:00.001+05:30</published><updated>2011-04-07T11:28:07.631+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='humor'/><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><category scheme='http://www.blogger.com/atom/ns#' term='comic'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Network Geeks</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/bombayrain/z9SsDBYx1HoqtdEBgCOZqEF2MJcPo1wepkarainBfkW3kGL4D8UJIpePNhN8/comic.png"&gt;&lt;img alt="Comic" height="221" src="http://posterous.com/getfile/files.posterous.com/bombayrain/4ehUEwoFolZcOWznwi7ZD5KP3bCrdCXnjuldGz01jlVc8TDPZUVdDBIqebxR/comic.png.scaled.500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/div&gt;  &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/network-geeks"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7508074461320159628?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7508074461320159628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/04/network-geeks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7508074461320159628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7508074461320159628'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/04/network-geeks.html' title='Network Geeks'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5328638598209789598</id><published>2011-03-23T13:46:00.003+05:30</published><updated>2011-03-23T13:56:45.229+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='guide'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Code reading and Bug fixing 101</title><content type='html'>&lt;p&gt;Summer is here, and &lt;a href="http://google-melange.com/"&gt;Google Summer of Code&lt;/a&gt; is on its way. The biggest hurdle new contributors often face (after compiling trunk ;)) is to get their head around the project they would like to work on, understanding how it works, where the parts fit in, and how to fix bugs or make improvements. Speaking from my experience, it took me the better part of a month to understand how KWin worked before I could actually hack on it for Season on KDE.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is my attempt to explain how I approach new code and the tools I use. To demonstrate, I am going to try and fix &lt;a href="https://bugs.kde.org/show_bug.cgi?id=260352"&gt;this bug&lt;/a&gt; in &lt;a href="http://amarok.kde.org/"&gt;Amarok&lt;/a&gt;. I am sorry for stealing a Junior Job.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The most important thing when working on existing code is:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DO NOT&lt;/em&gt; modify existing code that works, even if you absolutely have too&lt;sup id="fnref:1"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=3665064696228706104&amp;amp;postID=5328638598209789598#fn:1" rel="footnote"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;This means, avoid changing function signatures, variable names, and especially surrounding code that does not affect you. You may inadvertently introduce bugs.&lt;br /&gt;That said, remember that you are using a version control system, so &lt;a href="http://cam.ly/blog/2010/12/code-fearlessly/"&gt;code fearlessly&lt;/a&gt;. The best way to understand new code conceptually is to liberally insert some kind of debug/print statements all over relevant functions. With that in mind, let’s start.&lt;br /&gt;&lt;h2 id="understand_the_problem"&gt;Understand the problem&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;The bug report says:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;When you filter all items in Amarok, a warning notice is shown that “tracks have been hidden in the playlist”. However, if you filter, and then delete all results of that filter from the playlist, this warning is not shown&lt;/p&gt;Reproducible: Always&lt;br /&gt;&lt;p&gt;Steps to Reproduce:&lt;/p&gt;Set a filter&lt;br /&gt;Remove all matcheS&lt;br /&gt;&lt;/blockquote&gt;This is a fairly straight-forward bug with well written steps to reproduce. If not, its best to ask questions on the bug tracker or talk to someone more experienced to understand what the bug/feature actually requires. The next step is to &lt;strong&gt;reproduce the bug&lt;/strong&gt;. If you cannot make the bug occur, you have no way to prove that your changes fix it. Again, try to reproduce bug in the &lt;strong&gt;bleeding edge version&lt;/strong&gt; of the project. Otherwise it has already been fixed. So let’s add some tracks to the playlist, put something in the filter text. Observe that if you put a pattern that doesn’t match any track, you get the warning. Now change the pattern to match a few tracks. Remove those tracks from the playlist. No warning! This is what we have to fix.&lt;br /&gt;Up to this point, the process has been just what a user would do, now its time to enter the code.&lt;br /&gt;&lt;br /&gt;&lt;h2 id="where_is_the_problem"&gt;Where is the problem?&lt;/h2&gt;The Amarok &lt;a href="https://projects.kde.org/projects/extragear/multimedia/amarok/repository"&gt;source tree&lt;/a&gt; is pretty large. By convention, all source code is in the &lt;strong&gt;src/&lt;/strong&gt; directory. This is true for almost all open source projects. But what now?&lt;br /&gt;The easiest way to find out the source of the problem is to find a nice clue in the interface that gives us a good idea of what the relevant file will be called or where we can make a change.&lt;br /&gt;At this point, let me introduce a tool called &lt;a href="http://betterthangrep.com/"&gt;ack&lt;/a&gt;, which is &lt;code&gt;grep&lt;/code&gt; optimized for programmers. I won’t bother describing the features, but trust me, you should be using it!&lt;br /&gt;Let’s enter the Amarok source tree, and try to find “Warning: tracks have been hidden in the playlist”. Why so, well, since it is being hidden and shown, it obviously has something to do with our task.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$ cs amarok&lt;br /&gt;$ cd src # all code is here&lt;br /&gt;$ ls&lt;br /&gt;...&lt;br /&gt;playlist&lt;br /&gt;...&lt;br /&gt;$ ack "Warning: tracks have been hidden" playlist/&lt;br /&gt;playlist/ProgressiveSearchWidget.cpp&lt;br /&gt;45:    m_warningLabel = new QLabel( i18n("Warning: tracks have been hidden in the playlist"), this );&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Notice a few things. First, I ran the search only on the playlist directory. You could have run it on &lt;code&gt;src&lt;/code&gt; and it would just have taken more time. But its good to do a &lt;code&gt;ls&lt;/code&gt; on &lt;code&gt;src&lt;/code&gt; because knowing the directory structure is a good way to get the &lt;em&gt;highest-level&lt;/em&gt; overview of a project. &lt;code&gt;playlist&lt;/code&gt; is a suspiciously strong pointer to our bug. So let’s run it on this.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This seems like a good start, there is a label being created that has the message. But we need more information. So fire up your editor/IDE and go to &lt;code&gt;line 45&lt;/code&gt; of &lt;code&gt;src/playlist/ProgressiveSearchWidget.cpp&lt;/code&gt;. Knowing nifty utilities in your editor is a &lt;em&gt;good investment&lt;/em&gt;, you absolutely must know the shortcut to jump to a specific line since line numbers are used all over programming, in compilers, editors, and humans talking to each other. With &lt;a href="http://www.vim.org/"&gt;vim&lt;/a&gt; it’s:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ vim playlist/ProgressiveSearchWidget.cpp +45&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Now, let’s see where this label is being manipulated. For this we need another useful editor feature, to find instances of &lt;em&gt;symbol under cursor&lt;/em&gt;. QtCreator or KDevelop allow you to just right click on the variable name and find all uses. With &lt;code&gt;vim&lt;/code&gt; I hit the &lt;code&gt;*&lt;/code&gt; key.&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;void ProgressiveSearchWidget::showHiddenTracksWarning()&lt;br /&gt;{&lt;br /&gt;   m_warningLabel-&amp;gt;show();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void ProgressiveSearchWidget::hideHiddenTracksWarning()&lt;br /&gt;{&lt;br /&gt;   m_warningLabel-&amp;gt;hide();&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;And there is our first break. A pair of functions which show or hide the label. Continue this technique of ‘follow the useful symbol’. Let’s see where &lt;code&gt;showHiddenTracksWarning()&lt;/code&gt; is being called. In this case, its just above the definition.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;void ProgressiveSearchWidget::noMatch()&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;   if( m_showOnlyMatches )&lt;br /&gt;       showHiddenTracksWarning();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void ProgressiveSearchWidget::showHiddenTracksWarning()&lt;/code&gt;&lt;/pre&gt;But if you try to follow &lt;code&gt;noMatch()&lt;/code&gt;, it won’t be in this file. Running &lt;code&gt;ack&lt;/code&gt; again:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$ ack 'noMatch' playlist/&lt;br /&gt;playlist/ProgressiveSearchWidget.h&lt;br /&gt;130:    void noMatch();&lt;br /&gt;playlist/ProgressiveSearchWidget.cpp&lt;br /&gt;216:void ProgressiveSearchWidget::noMatch()&lt;br /&gt;playlist/PlaylistDock.cpp&lt;br /&gt;144:    connect( m_playlistView, SIGNAL( notFound() ), m_searchWidget, SLOT( noMatch() ) );&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, I assume you are smart enough to follow the code on your own, because pasting every sample here is annoying :) If you see playlist/PlaylistDock.cpp, then &lt;code&gt;m_playlistView&lt;/code&gt; represents &lt;em&gt;the playlist&lt;/em&gt; in some manner. &lt;code&gt;m_searchWidget&lt;/code&gt; on the other hand is the place where the user types the filter. &lt;em&gt;So when the playlist can’t find any matches, it tells the search widget, which then shows the label!&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Except, something is going wrong in the exact circumstances of the bug. One possible explanation is that &lt;code&gt;noMatch()&lt;/code&gt; never gets called. Your first idea might be – lets call notFound() when tracks are deleted and be done with it. But let’s dig deeper.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So what is &lt;code&gt;m_playlistView&lt;/code&gt;? Simple, &lt;em&gt;open the header file&lt;/em&gt; for PlaylistDock.&lt;/p&gt;&lt;code&gt;PrettyListView* m_playlistView;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Hmm, now where might &lt;code&gt;PrettyListView&lt;/code&gt; be? At this point, you can use your fancy IDE, but I am going to introduce another ancient UNIX tool – &lt;code&gt;find&lt;/code&gt;. When programming, it is helpful to generalize assumptions about how the code is organized and named, since it makes navigation a lot easier. If you’ve seen even the Amarok code that is just in this article, you can see that classes usually map &lt;strong&gt;one-to-one&lt;/strong&gt; to file names.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$ find -iname 'prettylistview*'&lt;br /&gt;./playlist/view/listview/PrettyListView.cpp&lt;br /&gt;./playlist/view/listview/PrettyListView.h&lt;/code&gt;&lt;/pre&gt;&lt;code&gt;find&lt;/code&gt; takes a &lt;strong&gt;lot&lt;/strong&gt; of powerful options, but here we say&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;Find all files from the current directory (src) downwards, whose name (&lt;code&gt;-name&lt;/code&gt;) matches the pattern ‘prettylistview*’, but ignore case (&lt;code&gt;-iname&lt;/code&gt;)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;and there you go, open &lt;code&gt;PrettyListView.cpp&lt;/code&gt; and search for &lt;code&gt;notFound&lt;/code&gt;. So &lt;code&gt;notFound&lt;/code&gt; is emitted by the &lt;code&gt;PrettyListView::find&lt;/code&gt; method, which itself is incidentally connected to &lt;code&gt;ProgressiveSearchWidget::filterChanged&lt;/code&gt; (connected in &lt;code&gt;Playlist::Dock::polish&lt;/code&gt;). Here is how our mental model goes till now:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img alt="Mental model" src="http://farm6.static.flickr.com/5183/5552602876_2a42924d5f_m.jpg" /&gt;&lt;/p&gt;When the user types something, &lt;code&gt;ProgressiveSearchWidget::filterChanged&lt;/code&gt; is being invoked, which is triggering &lt;code&gt;PrettyListView::find&lt;/code&gt;. When &lt;code&gt;find&lt;/code&gt; sees that no tracks are visible, it emits &lt;code&gt;notFound&lt;/code&gt;. This triggers &lt;code&gt;ProgressiveSearchWidget::noMatch&lt;/code&gt; which shows the warning label.&lt;br /&gt;With some more effort, you will also find that &lt;code&gt;PrettyListView::find&lt;/code&gt; is only called due to &lt;code&gt;filterChanged&lt;/code&gt;. We can now use this knowledge to figure out why the bug happens.&lt;br /&gt;&lt;blockquote&gt;Deleting a track does not change the filter in any manner. So following the call chain, &lt;code&gt;noMatch&lt;/code&gt; never gets called when tracks are deleted to re-evaluate the situation!&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="the_solution"&gt;The solution&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;The obvious solution is to somehow call &lt;code&gt;PrettyListView::find&lt;/code&gt; manually when tracks are deleted in the playlist. But how will we know that? We will again use some GUI hints. Tracks are deleted by right-clicking them and selecting ‘Remove From Playlist’. If you &lt;code&gt;ack&lt;/code&gt; this, you will find the action triggers a &lt;code&gt;removeSelection()&lt;/code&gt; (playlist/view/PlaylistViewCommon.cpp). The type of the receiver is just QWidget, so it would be a hassle to try and find out the type of &lt;code&gt;parent&lt;/code&gt;, but there is &lt;em&gt;only one&lt;/em&gt; definition of a method called &lt;code&gt;removeSelection()&lt;/code&gt; related to playlists. It is in &lt;code&gt;PrettyListView&lt;/code&gt;. At this point, you suddenly feel empowered as the solution clicks before your eyes.&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;As soon as we remove the tracks, we can just call &lt;code&gt;find()&lt;/code&gt; again and we will be done!&lt;/p&gt;&lt;/blockquote&gt;A fundamental constraint that inhibits us is the loose coupling made possible by signals and slots.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;PrettyListView&lt;/code&gt; is &lt;strong&gt;unaware of&lt;/strong&gt; &lt;code&gt;ProgressiveSearchWidget&lt;/code&gt; and its properties.&lt;br /&gt;&lt;/blockquote&gt;All it knows is that it is expected to emit certain signals (&lt;code&gt;found&lt;/code&gt;/&lt;code&gt;notFound&lt;/code&gt;) and things happen. PrettyListView also does not have direct access to whether items are being filtered or not. These things are passed on to it from the &lt;code&gt;filterChanged()&lt;/code&gt; signal’s arguments.&lt;br /&gt;At this stage, I hope that you now have a good idea of how things are connected. For a little indepth understanding of how things are playing out see &lt;sup id="fnref:2"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=3665064696228706104&amp;amp;postID=5328638598209789598#fn:2" rel="footnote"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img alt="" src="http://farm6.static.flickr.com/5295/5552603038_d6eddbe9a3_m.jpg" /&gt;&lt;/p&gt;With this in mind, there are atleast 2 solutions that come to mind. Our task is to somehow force the filter action to be performed again on the view so that it emits the relevant signals. Unfortunately the view itself does not have access to the &lt;code&gt;showOnlyMatches&lt;/code&gt; attribute present in the dock, and in the SortFilterProxies. We can,&lt;br /&gt;&lt;h3 id="1_use_playlistdock_which_has_access_to_the_search_widget"&gt;1. Use PlaylistDock, which has access to the search widget&lt;/h3&gt;A roundabout method I did first, involving:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;adding a getter, &lt;code&gt;ProgressiveSearchWidget::currentSearchFields()&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Connecting to the controller’s (&lt;code&gt;The::playlistController()&lt;/code&gt;) &lt;code&gt;changed()&lt;/code&gt; signal, a custom slot in &lt;code&gt;Playlist::Dock&lt;/code&gt; called &lt;code&gt;slotReapplyFilter()&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;slotReapplyFilter()&lt;/code&gt; calls &lt;code&gt;PrettyListView::find()&lt;/code&gt; again with relevant arguments.&lt;/li&gt;&lt;/ol&gt;&lt;h3 id="2_make_the_view_store_showonlymatches"&gt;2. Make the view store showOnlyMatches&lt;/h3&gt;A much simpler three line change.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Add a &lt;code&gt;bool m_showOnlyMatches&lt;/code&gt; to &lt;code&gt;PrettyListView&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;When &lt;code&gt;PrettyListView::showOnlyMatches()&lt;/code&gt; is called, along with passing along the value to the playlist, we also set &lt;code&gt;m_showOnlyMatches&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;In &lt;code&gt;PrettyListView::removeSelection()&lt;/code&gt;, call &lt;code&gt;PrettyListView::find()&lt;/code&gt; since we now have complete knowledge.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Programmers exchange changes in code with something called a &lt;strong&gt;diff&lt;/strong&gt;, or a file which only logs the &lt;em&gt;changes&lt;/em&gt; made in the code.&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ git diff&lt;br /&gt;diff --git a/src/playlist/view/listview/PrettyListView.cpp b/src/playlist/view/listview/PrettyListView.cpp&lt;br /&gt;index cd650f6..e81d396 100644&lt;br /&gt;--- a/src/playlist/view/listview/PrettyListView.cpp&lt;br /&gt;+++ b/src/playlist/view/listview/PrettyListView.cpp&lt;br /&gt;@@ -194,6 +194,8 @@ Playlist::PrettyListView::removeSelection()&lt;br /&gt;        QModelIndex newSelectionIndex = model()-&amp;gt;index( firstRow, 0 );&lt;br /&gt;        setCurrentIndex( newSelectionIndex );&lt;br /&gt;        selectionModel()-&amp;gt;select( newSelectionIndex, QItemSelectionModel::Select );&lt;br /&gt;+&lt;br /&gt;+        find( The::playlist()-&amp;gt;currentSearchTerm(), The::playlist()-&amp;gt;currentSearchFields(), m_showOnlyMatches );&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@@ -912,6 +914,7 @@ void Playlist::PrettyListView::updateProxyTimeout()&lt;br /&gt;&lt;br /&gt;void Playlist::PrettyListView::showOnlyMatches( bool onlyMatches )&lt;br /&gt;{&lt;br /&gt;+    m_showOnlyMatches = onlyMatches;&lt;br /&gt;    The::playlist()-&amp;gt;showOnlyMatches( onlyMatches );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;diff --git a/src/playlist/view/listview/PrettyListView.h b/src/playlist/view/listview/PrettyListView.h&lt;br /&gt;index f22a7c8..612be0b 100644&lt;br /&gt;--- a/src/playlist/view/listview/PrettyListView.h&lt;br /&gt;+++ b/src/playlist/view/listview/PrettyListView.h&lt;br /&gt;@@ -139,6 +139,8 @@ private:&lt;br /&gt;&lt;br /&gt;    QTimer *m_animationTimer;&lt;br /&gt;&lt;br /&gt;+    bool m_showOnlyMatches;&lt;br /&gt;+&lt;br /&gt;public:&lt;br /&gt;    QList&amp;lt;int&amp;gt; selectedRows() const;&lt;br /&gt;};&lt;/code&gt;&lt;/pre&gt;Since this is a minor patch, I could just commit this change. But I’m not going to for two reasons:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;You don’t have commit access, so I will show you how its done in that case.&lt;/li&gt;&lt;li&gt;This is not code that I have worked with before, so however small, it should go through &lt;strong&gt;review&lt;/strong&gt;. The reason is that I may have inadvertently affected the system due to incomplete knowledge. This is were unit and regression tests can also come in handy.&lt;/li&gt;&lt;/ol&gt;So let’s first get our diff into a file&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$ git diff &amp;gt; /tmp/amarok-bugfix-260352.patch&lt;/code&gt;&lt;/pre&gt;Now hop on to &lt;a href="http://git.reviewboard.kde.org/"&gt;reviewboard&lt;/a&gt;, and submit it. (Don’t actually do it, I’ve already done it!). Here is how the &lt;a href="https://git.reviewboard.kde.org/r/100928/"&gt;final submission&lt;/a&gt; looks.&lt;br /&gt;Now wait for somebody to reply or commit on behalf of you. That is it! Your first bug fix.&lt;br /&gt;&lt;p&gt;Code reading only gets easier as you go along. It does not involve complex equations, but instead mentally executing the program just as a computer would. The catch is to be able to go from the low level details to creating the software architecture in your head, and watching the messages flow through the program. You &lt;em&gt;must know&lt;/em&gt; your tools really well since they are a big time-saver.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To summarise, the following usually help to get a good idea of the code and allow you to fix bugs or add features.&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Use UI hints&lt;/li&gt;&lt;li&gt;Use debug statements where required.&lt;/li&gt;&lt;li&gt;Sometimes purposely crashing a program (&lt;code&gt;assert(0);&lt;/code&gt; anyone?) is a great way to see what code-path is being followed.&lt;/li&gt;&lt;li&gt;Follow the code along, until you can build a mental model.&lt;/li&gt;&lt;li&gt;Use the mental model to figure out multiple solutions.&lt;/li&gt;&lt;li&gt;Implement a solution.&lt;/li&gt;&lt;li&gt;Test it.&lt;/li&gt;&lt;li&gt;Submit for review or commit.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I hope this post has been useful. If you do wish to continue participating in an open source project, it is a good idea to spend the first few days just glossing over various parts of the code to get a feel of the system. Then you can go into your little section and get comfortable.&lt;br /&gt;&lt;/p&gt;&lt;div class="footnotes"&gt;&lt;hr /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li id="fn:1"&gt;except when &lt;em&gt;really&lt;/em&gt; required&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=3665064696228706104&amp;amp;postID=5328638598209789598#fnref:1" rev="footnote"&gt;↩&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li id="fn:2"&gt;If you don’t understand what I say in this paragraph, accept it at face value and continue. There is a powerful design pattern called &lt;a href="http://en.wikipedia.org/wiki/Model_View_Controller"&gt;Model-view-controller&lt;/a&gt; that allows separation of concern between the playlist contents, modifying them and drawing them. This is embedded into Qt using the various Item/View classes. Amarok uses this &lt;em&gt;extensively&lt;/em&gt;. (probably one of the biggest uses of Model View within KDE?) The PrettyListView is just deciding how to show and draw the tracks, which are actually stored in a set of models. Similarly a Controller will often modify the models as required, and the changes will automatically show up in the PrettyListView.&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=3665064696228706104&amp;amp;postID=5328638598209789598#fnref:2" rev="footnote"&gt;↩&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5328638598209789598?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5328638598209789598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/03/code-reading-and-bug-fixing-101.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5328638598209789598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5328638598209789598'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/03/code-reading-and-bug-fixing-101.html' title='Code reading and Bug fixing 101'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5183/5552602876_2a42924d5f_t.jpg' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-704261515065723672</id><published>2011-02-16T00:32:00.001+05:30</published><updated>2011-02-16T00:32:12.492+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='confkdein'/><category scheme='http://www.blogger.com/atom/ns#' term='inspiration'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>Why you should be at conf.kde.in</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;a href="http://conf.kde.in"&gt;conf.kde.in&lt;/a&gt; is happening in Bangalore from 9th-13th March. This is a &lt;em&gt;golden&lt;/em&gt; opportunity for students to have fun and learn some really interesting things that no college or class can teach. It is also a chance to form friendships that last forever.&lt;/p&gt;  &lt;p&gt;If you don&amp;rsquo;t like long posts: here is the gist.&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Short term benefits &amp;ndash; a great time and a cool t-shirt.&lt;/li&gt; &lt;li&gt;Long term benefits &amp;ndash; create something awesome, lots of friends and an impressive CV that recruiters will notice.&lt;/li&gt; &lt;/ul&gt;   &lt;hr /&gt;  &lt;p&gt;Remember that feeling you had the first time you made a paper boat all by yourself and set it on the water? Or the time when you sang really well on stage and a hundred people gave you a standing ovation? With KDE, its possible to create beauty everyday!&lt;/p&gt;  &lt;p&gt;When I first started using Linux in 2004, KDE 3.2 was an eye-opener about what truly functional and powerful computing could be. &lt;em&gt;It was liberating&lt;/em&gt;. But the real magic of KDE is in its &lt;a href="http://planetkde.org"&gt;people&lt;/a&gt;, highly talented, motivated and &lt;em&gt;very warm&lt;/em&gt; individuals with a lot of free hugs. So come and join the community. You don&amp;rsquo;t have to be a top-grade programmer, a really great designer or a Indian language expert to enter. At KDE we welcome everybody who has the passion to improve the computing experience for millions of people.&lt;/p&gt;  &lt;p&gt;If you are a programmer, at &lt;a href="http://conf.kde.in"&gt;conf.kde.in&lt;/a&gt; you have a chance to take away intimate knowledge about working with technologies like &lt;a href="http://qt.nokia.com"&gt;Qt&lt;/a&gt;, a cross-platform library which allows you to create high-quality applications on Linux, Windows, Mac OS, Symbian and even Android. With so much web and social and information, you might want to make use of KDE&amp;rsquo;s excellent Nepomuk framework to create semantically aware apps that can look at things like humans. Or the lab sessions will have you get started with submitting bug fixes for KDE in no time.&lt;/p&gt;  &lt;p&gt;If drawing and painting is your forte, we have sessions to get you contributing your skills to open source applications and improving the KDE look and feel. You could create the next UI paradigm and dominate the world! :)&lt;/p&gt;  &lt;p&gt;A billion people are waiting to use computers, and one of the things stopping them from having cheap, affordable machines is the lack of English literacy. So if you know more than one language, you could jump in and translate applications to Indian languages and bring a smile to some kid, and make his future!&lt;/p&gt;  &lt;p&gt;Don&amp;rsquo;t think that as a student you lack the qualifications to attend. A &lt;em&gt;HUGE&lt;/em&gt; chunk of KDE is made of students, with even teenage contributors! I myself am just a 3rd year undergraduate. We encourage students through programs like &lt;a href="http://google-melange.com"&gt;Google Summer of Code&lt;/a&gt;, Season of KDE and &lt;a href="http://code.google.com/opensource/gci/2010-11/index.html"&gt;Google Code-In&lt;/a&gt; for high-school students. conf.kde.in is here to guide you even if you have never programmed before. We have excellent &lt;a href="http://conf.kde.in/talks/"&gt;talks&lt;/a&gt; for all levels, by notable members of the KDE community. We also have interactive lab sessions where you will get to hack and explore more code than you will ever do in your college courses :P&lt;/p&gt;  &lt;p&gt;Make sure you drag along your teachers too. They can be introduced to the educational tools that make KDE such a great platform to learn new things on. Whether its astronomy or jigsaw puzzles or Ph. D. level computer courses, KDE has applications for them to make their teaching more tangible!&lt;/p&gt;  &lt;p&gt;Student passes are Rs. 500 (for all 3 days, including lunch), teachers can register for Rs. 700. For others its Rs. 900. &lt;a href="http://kde.in/conf/register/"&gt;Register online&lt;/a&gt; before 25th February to attend conf.kde.in. Although you can register after that, even on the spot at the day of the conference, &lt;em&gt;it will be more expensive later&lt;/em&gt; (Students: Rs. 700, Teachers: Rs. 900, Normal: Rs. 1200). Remember to enter discount codes to get a discount, and get your college ID card to the event.&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Student discount: KDEIN_DIS_STU&lt;/li&gt; &lt;li&gt;Teacher discount: KDEIN_DIS_TCR&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;If you need a letter to get permission from your college, we &lt;a href="http://kde.in/conf/letter-for-participation/"&gt;can arrange that&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;PS. If you can get a laptop with Linux on it to conf.kde.in, you can have twice the fun :)&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm6.static.flickr.com/5217/5448767358_3da45e22c6_m.jpg" alt="conf.KDE.in badge" /&gt;&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/why-you-should-be-at-confkdein"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-704261515065723672?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/704261515065723672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/02/why-you-should-be-at-confkdein.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/704261515065723672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/704261515065723672'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/02/why-you-should-be-at-confkdein.html' title='Why you should be at conf.kde.in'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5217/5448767358_3da45e22c6_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-468237017558489576</id><published>2011-02-06T10:46:00.000+05:30</published><updated>2011-02-06T10:47:54.262+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='qt'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='hack'/><title type='text'>QHttpServer: Web Apps in Qt</title><content type='html'>&lt;p&gt;Qt is a great GUI toolkit, but it is also an entire C++ standard library waiting to be used for other tasks. In addition the network module is really powerful. I&amp;#8217;ve been &lt;a href='http://mugshotapp.com'&gt;playing&lt;/a&gt; around with &lt;a href='http://nodejs.org'&gt;node.js&lt;/a&gt; for a while now, and realized that Qt&amp;#8217;s default asynchronous nature maps over perfectly to create a event-based web server. To make things better, Ryan Dahl&amp;#8217;s small and fast &lt;a href='http://github.com/ry/http-parser'&gt;http-parser&lt;/a&gt; is freely available. So I just combined the two, and here is &lt;a href='http://github.com/nikhilm/qhttpserver'&gt;QHttpServer&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is a &amp;#8216;web-application&amp;#8217; written completely in C++/Qt. You can even &lt;a href='http://205.185.125.105:5000/user/blogreader'&gt;try it out&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#!cpp&lt;br /&gt;#include &amp;quot;greeting.h&amp;quot;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;QCoreApplication&amp;gt;&lt;br /&gt;#include &amp;lt;QRegExp&amp;gt;&lt;br /&gt;#include &amp;lt;QStringList&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;qhttpserver.h&amp;gt;&lt;br /&gt;#include &amp;lt;qhttprequest.h&amp;gt;&lt;br /&gt;#include &amp;lt;qhttpresponse.h&amp;gt;&lt;br /&gt;&lt;br /&gt;Greeting::Greeting()&lt;br /&gt;{&lt;br /&gt;    QHttpServer *server = new QHttpServer;&lt;br /&gt;    server-&amp;gt;listen(QHostAddress::Any, 5000);&lt;br /&gt;    connect(server, SIGNAL(newRequest(QHttpRequest*, QHttpResponse*)),&lt;br /&gt;            this, SLOT(handle(QHttpRequest*, QHttpResponse*)));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Greeting::handle(QHttpRequest *req, QHttpResponse *resp)&lt;br /&gt;{&lt;br /&gt;    QRegExp exp(&amp;quot;^/user/([a-z]+)$&amp;quot;);&lt;br /&gt;    if( exp.indexIn(req-&amp;gt;path()) != -1 )&lt;br /&gt;    {&lt;br /&gt;        resp-&amp;gt;setHeader(&amp;quot;Content-Type&amp;quot;, &amp;quot;text/html&amp;quot;);&lt;br /&gt;        resp-&amp;gt;writeHead(200);&lt;br /&gt;        QString name = exp.capturedTexts()[1];&lt;br /&gt;&lt;br /&gt;        QString reply = tr(&amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Greeting App&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Hello  %1!&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;);&lt;br /&gt;        resp-&amp;gt;end(reply.arg(name).toAscii());&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        resp-&amp;gt;writeHead(403);&lt;br /&gt;        resp-&amp;gt;end(&amp;quot;You aren&amp;#39;t allowed here!&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main(int argc, char **argv)&lt;br /&gt;{&lt;br /&gt;    QCoreApplication app(argc, argv);&lt;br /&gt;&lt;br /&gt;    Greeting hello;&lt;br /&gt;    &lt;br /&gt;    app.exec();&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Awesome isn&amp;#8217;t it? You launch an instance of QHttpServer, it emits a signal whenever a new request comes in, you can handle and respond to it. The code is fully documented, so you can do a &lt;code&gt;git clone&lt;/code&gt; and run &lt;code&gt;doxygen&lt;/code&gt; in the &lt;code&gt;docs/&lt;/code&gt; folder to get API documentation. For now it doesn&amp;#8217;t deal with everything that can happen in HTTP, but it does know about keep-alives (no chunked encoding though). QHttpServer is &lt;em&gt;streaming&lt;/em&gt;, see the &lt;a href='http://github.com/nikhilm/qhttpserver/tree/master/examples/bodydata/bodydata.cpp#L34-48'&gt;body data example&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is a simple ApacheBench run comparing qhttpserver and node.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;QHttpServer Greeting app:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&amp;gt; ab -n 1000 -c 100 http://localhost:5000/user/nikhil&lt;br /&gt;This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;&lt;br /&gt;Benchmarking localhost (be patient)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Server Software:        &lt;br /&gt;Server Hostname:        localhost&lt;br /&gt;Server Port:            5000&lt;br /&gt;&lt;br /&gt;Document Path:          /user/nikhil&lt;br /&gt;Document Length:        88 bytes&lt;br /&gt;&lt;br /&gt;Concurrency Level:      100&lt;br /&gt;Time taken for tests:   0.467 seconds&lt;br /&gt;Complete requests:      1000&lt;br /&gt;Failed requests:        0&lt;br /&gt;Write errors:           0&lt;br /&gt;Total transferred:      151000 bytes&lt;br /&gt;HTML transferred:       88000 bytes&lt;br /&gt;Requests per second:    2142.47 [#/sec] (mean)&lt;br /&gt;Time per request:       46.675 [ms] (mean)&lt;br /&gt;Time per request:       0.467 [ms] (mean, across all concurrent requests)&lt;br /&gt;Transfer rate:          315.93 [Kbytes/sec] received&lt;br /&gt;&lt;br /&gt;Connection Times (ms)&lt;br /&gt;              min  mean[+/-sd] median   max&lt;br /&gt;Connect:        0    2   4.7      0      23&lt;br /&gt;Processing:    14   43  18.9     40     123&lt;br /&gt;Waiting:       13   43  18.9     40     123&lt;br /&gt;Total:         14   45  18.9     41     130&lt;br /&gt;&lt;br /&gt;Percentage of the requests served within a certain time (ms)&lt;br /&gt;  50%     41&lt;br /&gt;  66%     48&lt;br /&gt;  75%     53&lt;br /&gt;  80%     58&lt;br /&gt;  90%     69&lt;br /&gt;  95%     80&lt;br /&gt;  98%     98&lt;br /&gt;  99%    117&lt;br /&gt; 100%    130 (longest request)&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;node.js &lt;a href='https://gist.github.com/813128'&gt;greeting&lt;/a&gt; app:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&amp;gt; ab -n 1000 -c 100 http://localhost:5000/user/nikhil&lt;br /&gt;This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;&lt;br /&gt;Benchmarking localhost (be patient)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Server Software:        &lt;br /&gt;Server Hostname:        localhost&lt;br /&gt;Server Port:            5000&lt;br /&gt;&lt;br /&gt;Document Path:          /user/nikhil&lt;br /&gt;Document Length:        88 bytes&lt;br /&gt;&lt;br /&gt;Concurrency Level:      100&lt;br /&gt;Time taken for tests:   0.441 seconds&lt;br /&gt;Complete requests:      1000&lt;br /&gt;Failed requests:        0&lt;br /&gt;Write errors:           0&lt;br /&gt;Total transferred:      151000 bytes&lt;br /&gt;HTML transferred:       88000 bytes&lt;br /&gt;Requests per second:    2267.94 [#/sec] (mean)&lt;br /&gt;Time per request:       44.093 [ms] (mean)&lt;br /&gt;Time per request:       0.441 [ms] (mean, across all concurrent requests)&lt;br /&gt;Transfer rate:          334.43 [Kbytes/sec] received&lt;br /&gt;&lt;br /&gt;Connection Times (ms)&lt;br /&gt;              min  mean[+/-sd] median   max&lt;br /&gt;Connect:        0    2   4.4      0      18&lt;br /&gt;Processing:     4   40  22.7     37     101&lt;br /&gt;Waiting:        4   40  22.9     37     101&lt;br /&gt;Total:          4   42  21.7     39     101&lt;br /&gt;&lt;br /&gt;Percentage of the requests served within a certain time (ms)&lt;br /&gt;  50%     39&lt;br /&gt;  66%     50&lt;br /&gt;  75%     57&lt;br /&gt;  80%     63&lt;br /&gt;  90%     73&lt;br /&gt;  95%     83&lt;br /&gt;  98%     91&lt;br /&gt;  99%     95&lt;br /&gt; 100%    101 (longest request)&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;While not a very scientific benchmark, this does show them pretty close. C++ is compiled, but I believe node has less &amp;#8216;layers&amp;#8217; and a particularly efficient I/O infrastructure which allows it to be better even with an interpreted language.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I would really like to see this being used in Qt apps that need a web interface for remote control, or for simple delivery of files.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In addition, if you will be attending &lt;a href='http://conf.kde.in'&gt;conf.kde.in&lt;/a&gt; in Bangalore, India on March 9th-13th, my talk on Qt Scripting will involve writing a thin JavaScript wrapper over this and doing some other cool stuff! So be there.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-468237017558489576?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/468237017558489576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/02/qhttpserver-web-apps-in-qt.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/468237017558489576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/468237017558489576'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/02/qhttpserver-web-apps-in-qt.html' title='QHttpServer: Web Apps in Qt'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1224454514980839617</id><published>2011-01-05T00:39:00.001+05:30</published><updated>2011-01-05T00:39:50.249+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss'/><category scheme='http://www.blogger.com/atom/ns#' term='confkdein'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kdeindia'/><title type='text'>Spreading the KDE love in India</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;img src="http://farm6.static.flickr.com/5290/5324083767_7056c0f4c5_m.jpg" alt="conf logo" /&gt;&lt;/p&gt;  &lt;p&gt;The first &lt;em&gt;ever&lt;/em&gt; KDE conference in India takes place this March. On March 9th, 2011, gearheads will descend to the RV College of Engineering for &lt;a href="http://conf.kde.in"&gt;conf.kde.in&lt;/a&gt;. If you are interested in using or contributing to KDE, we look forward to meeting you there.&lt;/p&gt;  &lt;p&gt;There have been KDE contributors in India since the late 90s, but in recent years we have reached a more sizeable number. Contributors usually hang out on #kde-in, the KDE India IRC channel. The idea for a pure KDE conference in India first emerged about 2 months ago, and we&amp;rsquo;ve been doing the behind-the-scenes work since then. Now it&amp;rsquo;s time to GO! So we have this superb website made by Sayak Banerjee, brilliant artwork by Eugene Trounev, and hosting on the excellent KDE infrastructure.&lt;/p&gt;  &lt;p&gt;conf.kde.in will take place from 9th-11th March followed by a 2 day sprint/hackathon for existing contributors. conf.kde.in is a platform for Qt and KDE contributors and enthusiasts to meet up, share their knowledge, contribute, learn, play, have fun and create limitless possibilities. The primary objective is to have fun while learning something. We are especially looking forward to students and teachers, as they are the ones who benefit the most from KDE, but also have the most to give back to it, by contributing and promoting KDE throughout India. Registrations for the conference will begin soon. Meanwhile, the &lt;a href="http://conf.kde.in/faq/"&gt;FAQ&lt;/a&gt; should answer most questions. If not, &lt;a href="http://conf.kde.in/contact/"&gt;contact us&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There will of course be excellent talks by Qt and KDE contributors from around the world. If you would like to give a talk or conduct a workshop, the &lt;a href="http://conf.kde.in/cfp/"&gt;Call for Participation&lt;/a&gt; is now in progress. It will end on 22:00 IST 15th January, 2011.&lt;/p&gt;  &lt;p&gt;For more updates, follow us on &lt;a href="http://twitter.com/kdeindia"&gt;Twitter&lt;/a&gt;, &lt;a href="http://identi.ca/kdeindia"&gt;Identi.ca&lt;/a&gt;, or &lt;a href="http://facebook.com/kdeindia"&gt;Facebook&lt;/a&gt;.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/spreading-the-kde-love-in-india"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1224454514980839617?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1224454514980839617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2011/01/spreading-kde-love-in-india.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1224454514980839617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1224454514980839617'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2011/01/spreading-kde-love-in-india.html' title='Spreading the KDE love in India'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5290/5324083767_7056c0f4c5_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1748605749752500252</id><published>2010-12-20T14:56:00.001+05:30</published><updated>2010-12-20T14:56:54.161+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss.in'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><category scheme='http://www.blogger.com/atom/ns#' term='n900'/><title type='text'>foss.in 2010</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;The 10th and sadly last &lt;a href="http://foss.in"&gt;foss.in&lt;/a&gt; took place this week in Bangalore. I was there for all three days of the conference and it was great. This time around we were 6 students from my college. In addition, at the last minute a lot of &lt;a href="http://kde.org"&gt;KDE&lt;/a&gt; developers did turn up, including &lt;a href="http://vhanda.in"&gt;Vishesh Handa&lt;/a&gt;, Pradeepto, Abhishek and Sujith.&lt;/p&gt;  &lt;p&gt;Danese Cooper&amp;rsquo;s opening talk about the architecture of Wikipedia was inspiring. That one of the top 5 websites in the world, is powered by just 450 servers and 60 people is an inspiring tale of open source skill and passion. Danese was here to consider a possible server location in India to serve Asia. Wikimedia was also kind enough to give t-shirts as part of the foss.in delegate kit. The calendar in the delegate kit also has stunning wildlife photography.&lt;/p&gt;  &lt;p&gt;foss.in lunches are always delicious so that came before any talk. With Nokia being one of the sponsors, Meego was being pushed heavily with 2 days of talks and workshops. Nokia is already pushing QML as a&amp;hellip; but I&amp;rsquo;m getting ahead of myself.&lt;/p&gt;  &lt;p&gt;So yes, on day 1, Aditya Bhatt had a talk on &lt;a href="http://libface.sf.net"&gt;libface&lt;/a&gt; which by the way, will identify anything as a face. Rahul Sundaram&amp;rsquo;s talk about Fedora&amp;rsquo;s early mistakes was good learning for other FOSS projects. But I was distracted by this time by the announcement that Nokia was giving away two or three N900s!&lt;/p&gt;  &lt;p&gt;To those who don&amp;rsquo;t know, the N900 is a hand held computer powered by Maemo, with complete root access and lots of developer friendly features. At the same time it gives any smart-phone the run for its money. Nokia has been agressively pushing the N900 to developers so that the Meego platform can start getting application support. Since Qt applications run directly on Meego, KDE developers are a particularly strong N900 market. Now it was my chance to get one! The catch was to make a QML/Qt based program and submit it on the third day of the conference.&lt;/p&gt;  &lt;p&gt;I&amp;rsquo;ve had QML in my sights for quite some time, but never took out the time to actually try it out. Here was an opportunity. So I made &lt;a href="http://github.com/nikhilm/solarwolf-qml"&gt;Solarwolf&lt;/a&gt; in pure QML and JavaScript. QML&amp;rsquo;s state concept is very interesting and makes sense if you&amp;rsquo;ve read &lt;a href="http://research.microsoft.com/en-us/um/people/lamport/pubs/state-machine.pdf"&gt;Computation and State-machines&lt;/a&gt;. Of course there are certain areas where it was much easier to write imperative code in JS. The code itself was written sprint style and is not the neatest or most refactored. What QML really needs is something similar to &lt;em&gt;inheritance&lt;/em&gt; so that certain common properties (for example all Sprites have movement deltas) can be factored out. In addition it is odd that all Qt properties and classes have not been exposed in QML&amp;rsquo;s scripting environment. Things like &lt;code&gt;QRect::intersects()&lt;/code&gt; would have been very useful.&lt;/p&gt;  &lt;p&gt;Day 2 had Abhishek Patil&amp;rsquo;s talk about scripting Kate which was insightful and shows what an awesome piece of software Kate is. Anand Mitra&amp;rsquo;s talk about ZFS was the best technical talk in my two years at foss.in. He clearly had a good understanding of ZFS (seeing that I had nothing) and made everyone aware of the challenges of porting such core programs like filesystems. Leveraging the Git Object Store by Ramkumar Ramachandra was a good way to know how dumb &lt;em&gt;git&lt;/em&gt; is. After that I skipped all the talks to hack on Solarwolf, so I&amp;rsquo;m not aware of the others. Fahrenheit did do a good show however.&lt;/p&gt;  &lt;p&gt;By that night my game was pretty much done, it was working on Dinesh&amp;rsquo;s N900 and so with a bit of polish the next morning I was ready for submission. But with that, and talking to a few people about various things I missed &lt;em&gt;all&lt;/em&gt; the talks, including CouchDB and QtWebkit&amp;rsquo;s graphics layer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.tuxmaniac.com"&gt;Aanjhan Ranganathan&amp;rsquo;s&lt;/a&gt; &amp;ldquo;A Hacker&amp;rsquo;s Apology&amp;rdquo; was a brilliant end to the final foss.in. The point about preaching Hacker Culture, and not politics or philosophy is the most important thing today. Encouraging everyone in the world to be curious about their surroundings and always asking why should be encouraged, rather than fighting about whether its Linux or GNU/Linux :). The slides aren&amp;rsquo;t up yet, but everyone should see them when they are available.&lt;/p&gt;  &lt;p&gt;Following some moments of nostalgia by Atul Chitnis, The Raghu Dixit Project brought the house down with their superb music!&lt;/p&gt;  &lt;h2&gt;I won!&lt;/h2&gt;  &lt;p&gt;That&amp;rsquo;s right. I have a brand new N900. With a high-quality Bluetooth headset too. This chronologically goes in on the last day at around 5:00 pm, but I thought it deserved a seperate section. It&amp;rsquo;s a great phone except for the lack of STK support. Some of the little UI touches and shortcuts are especially heartening. They lend true geekiness to the phone. The camera is more than good enough for me, it plays virtually everything I throw at it, and it has inbuilt UPnP support! Now its time to play Angry Birds.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;Me, &lt;a href="http://adityabhatt.wordpress.com"&gt;Aditya&lt;/a&gt;, &lt;a href="http://saidinesh5.wordpress.com"&gt;Dinesh&lt;/a&gt;, &lt;a href="http://zarthon.wordpress.com"&gt;Mohit&lt;/a&gt;, Viranch and Nirmal.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/fossin-2010"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1748605749752500252?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1748605749752500252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/12/fossin-2010.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1748605749752500252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1748605749752500252'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/12/fossin-2010.html' title='foss.in 2010'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1179521780773803784</id><published>2010-12-15T19:48:00.001+05:30</published><updated>2010-12-15T19:48:49.845+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='mugshot'/><category scheme='http://www.blogger.com/atom/ns#' term='face'/><title type='text'>Introducing Mugshot</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;There is a certain fun in hacks, little projects you do on a whim and finish in a few days. And then you go and buy a domain for it and launch it. That's &lt;a href="http://mugshotapp.com"&gt;Mugshot&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Mugshot is a web service which offers face-detection. It uses the &lt;a href="http://libface.sf.net"&gt;libface&lt;/a&gt; library which was implemented mainly as a Google Summer of Code project for &lt;a href="http://kde.org"&gt;KDE&lt;/a&gt;. So one day I was thinking that services like Facebook and Flickr allow you to upload images and then tag them. But why not let the faces be detected automatically. So I hacked out Mugshot. It doesn't wrap the entire libface api for node.js, but only one function to detect the faces. Further details can be found on the &lt;a href="http://mugshotapp.com"&gt;website&lt;/a&gt;, including the documentation.&lt;/p&gt;  &lt;p&gt;At the moment libface can stumble on some faces, but when it works, the results can be &lt;a href="http://mugshotapp.com/view/57"&gt;quite interesting!&lt;/a&gt; That image is by &lt;a href="http://www.flickr.com/photos/pierre_tourigny/"&gt;Pierre Tourigny&lt;/a&gt; and is under the Creative Commons Share-alike Attribution license. Its used to avoid uploading any &lt;strong&gt;real&lt;/strong&gt; faces.&lt;/p&gt;  &lt;p&gt;Are there plans to add recognition support and other advanced services? I don't know, maybe if I have a whim. Meanwhile, go &lt;a href="http://github.com/nikhilm/mugshot"&gt;fork it&lt;/a&gt;.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/introducing-mugshot"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1179521780773803784?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1179521780773803784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/12/introducing-mugshot_15.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1179521780773803784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1179521780773803784'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/12/introducing-mugshot_15.html' title='Introducing Mugshot'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5044994921564021592</id><published>2010-12-09T19:26:00.001+05:30</published><updated>2010-12-09T19:26:19.748+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='synapse'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><title type='text'>Synapse 2011: Behind the website</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;img src="http://farm6.static.flickr.com/5285/5245942843_512a76f3a5_m.jpg" alt="Synapse 2011 Homepage" /&gt;&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://synapse.daiict.ac.in"&gt;Synapse&lt;/a&gt; website undergoes a over-haul every year to stay in sync with the theme for that year. Since the last year, I&amp;rsquo;ve been the webmaster and programmer for the website. Which means I do all the HTML/CSS/JS/PHP/SQL dirty work.&lt;/p&gt;  &lt;p&gt;This year&amp;rsquo;s theme for Synapse is &amp;ldquo;Silver Screen&amp;rdquo;, having to do with legendary movies and so on. Their is always the need to bring something new to the website, something that differentiates it from a normal website. At the same time it has to:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;degrade on older browsers&lt;/li&gt; &lt;li&gt;be standards compliant&lt;/li&gt; &lt;li&gt;have clean URLs&lt;/li&gt; &lt;li&gt;readability&lt;/li&gt; &lt;li&gt;look good in 1024x768&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;The last requirement is a by product of the maximum screen resolution in our computer labs. Finally, I&amp;rsquo;m the kind of person that develops kinesthetic memory about websites and like things to happen fast. If I&amp;rsquo;ve to wait for a navigational element to load before I can click on it, that just annoys me.&lt;/p&gt;  &lt;p&gt;The Synapse website team is listed on the contact page. We started working in October. I don&amp;rsquo;t remember how, but we had agreed to use horizontal scrolling. It was either that or a 4 way grid like &lt;a href="http://nofrks.com"&gt;NoFrks&lt;/a&gt;. I had seen it in action at &lt;a href="http://jointhegame.kde.org"&gt;Join the Game&lt;/a&gt; and it looked good if executed well.&lt;/p&gt;  &lt;h2&gt;Platform choices&lt;/h2&gt;  &lt;p&gt;Our website is powered by: * &lt;a href="http://codeigniter.com"&gt;CodeIgniter&lt;/a&gt; * &lt;a href="http://mysql.com"&gt;MySQL&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The backend is virtually untouched from the 2010 version. CI uses great url &amp;ndash;&gt; filename mappings, and I took full advantage of that to create a very dynamic website. Helpers are another use advantage. For an example, quite a lot of events require registration. Manually going to every page and adding an event specific link seemed like too much effort. Instead I inserted a common function in every page, and the function consults a table to see if the event actually requires registration or not, and returns the appropriate link. Given a choice I&amp;rsquo;d liked to use Python, but our server does not support it, and this way was probably better in time savings.&lt;/p&gt;  &lt;p&gt;On the client we use: * jQuery * jCarousel * simplemodal * tinyTips * easing * lightbox * scroll * Some CSS3 for rounded corners and WebFonts when available&lt;/p&gt;  &lt;p&gt;CI also allows clean URLs using routing and so that problem was solved. With a ready backend, we had much more time to work on the frontend.&lt;/p&gt;  &lt;p&gt;The site works in IE &gt; 7 and any relatively new Firefox and Chrome. It was never tested in IE6 because we didn&amp;rsquo;t have access to one. Finally, most visitors are engineering college students who are quite likely to use modern browsers.&lt;/p&gt;  &lt;h2&gt;Navigation&lt;/h2&gt;  &lt;p&gt;For a website like Synapse, which has 3 level events, the navigation can be a make or break. I wasn&amp;rsquo;t so happy with &lt;a href="http://synapse.daiict.ac.in/2010/"&gt;last year&amp;rsquo;s attempt&lt;/a&gt; which had too much hover, and the users had to search three levels deep if they forgot where the event was.&lt;/p&gt;  &lt;p&gt;An initial attempt at a better navigation was made using &lt;a href="http://thejit.org/static/v20/Jit/Examples/Spacetree/example1.html"&gt;SpaceTree&lt;/a&gt;. It is a really good navigational tool, and significant effort was invested in trying to make it fit the Synapse event model. The plan was that on the Events landing page, the SpaceTree would be the main content, and clicking on a event, would open the event details in a modal dialog. But that just sucks. I wanted to remove as many click&amp;rsquo;s as possible. The next option was to shift the SpaceTree a bit to the left and fit the content to the right. But with the 1024px constraint, that wouldn&amp;rsquo;t work. Meanwhile I was facing some issues with the spacetree, it requires a special script to work in IE, was causing graphic glitches in a Chrome beta, and wasn&amp;rsquo;t behaving nicely in terms of firing events. The Javascript Visualization toolkit is really good, but it didn&amp;rsquo;t cross over well to navigation.&lt;/p&gt;  &lt;p&gt;We decided to remove an entire level by showing the navigation in a modal dialog. So all the Technical events get shown together, all the Cultural together and so on. This still means two clicks to get anywhere, but gives users a very obvious heirarchy, while at the same time not requiring them to remember anything except the name and the category (which is usually quite obvious). The current representation is of course dependent on the theme, but I&amp;rsquo;ve to stick to a certain order in this article. Chronologically the theme plan came after the SpaceTree idea and before this one. We had two iterations even in the current situation. The first one was to push each navigation &amp;lsquo;card&amp;rsquo; to the top left, over the green of the joker&amp;rsquo;s head. That would leave us with more space for content. But it clashed horribly, and was too small. Also our site is such that my cursor is much more likely to be to the right of the screen, so it went to the right.&lt;/p&gt;  &lt;h2&gt;The Theme&lt;/h2&gt;  &lt;p&gt;Agreeing on a design to represent the theme was the hardest part of the entire endeavour (the second hardest was getting it to work in Internet Explorer). The Synapse website has 4 main areas:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Landing&lt;/li&gt; &lt;li&gt;Events&lt;/li&gt; &lt;li&gt;Sponsors&lt;/li&gt; &lt;li&gt;Contact&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;Registration can usually be put in a separate window or per event. We had four characters also finalised.&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Gabbar from Sholay&lt;/li&gt; &lt;li&gt;Amitabh Bacchan from ? ( yes I don&amp;rsquo;t know my Bollywood films )&lt;/li&gt; &lt;li&gt;King Leonidas from 300&lt;/li&gt; &lt;li&gt;The Joker from The Dark Knight&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;The first plan was to have a movie projector on the landing, with the Synapse logo embossed into it. Each navigation pane would be film-strip like. But that is a cliche cliche. I distinctly remember ideas involving, flowers and 4 coloured sarees. Then somebody stumbled upon &lt;a href="http://lucuma.com.ar"&gt;Lucuma&lt;/a&gt;. Oh, by the way:&lt;/p&gt;  &lt;blockquote class="posterous_short_quote"&gt;&lt;p&gt;The secret to creativity is knowing how to hide your sources. &amp;mdash; Albert Einstein&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;That was it, we had the motivation and the final vision. Merging the scenes from one to another was a very good idea. In addition, if you notice the Synapse website carefully, certain parts of the background are shown &lt;em&gt;only&lt;/em&gt; while changing the page. It was a bit tricky to get jCarousel to play nicely with that, but I got it working in the end. The Tree to Joker transition remains my favourite part of the site.&lt;/p&gt;  &lt;p&gt;That week of 25th-31st October, we had a 109 commits in total (out of the overall 154 till now). So the team &lt;em&gt;did&lt;/em&gt; work their asses off.&lt;/p&gt;  &lt;p&gt;The rest was pretty spartan. A very simple black and white theme. The top navigation font is Neucha. Incidentally, we use Sans Serif fonts all over, including the main copy, because we don&amp;rsquo;t have much to read, and dropping the serif means more &amp;lsquo;white&amp;rsquo; space. The character on each page adds a distinctive look. The top edge has a frayed look, but the bottom edge doesn&amp;rsquo;t. This is because while top margin positioning works across all browsers, the same doesn&amp;rsquo;t hold for bottom. It varies a lot with screen resolution and browser version and none of us had that good an understanding of the box model, or the arsenal of tricks more seasoned web-devs have to make this work.&lt;/p&gt;  &lt;h2&gt;The little things&lt;/h2&gt;  &lt;p&gt;Clicking on any events takes you to a event page, where all the top links scroll, except &amp;lsquo;Home&amp;rsquo;, which will refresh the page. This is intentional. The hash tag and jCarousel do not play well together. jCarousel has problems with indexing the right spots in the element list. So a hashtag couldn&amp;rsquo;t be used. Leaving the landing page their would mean a delay or click to get to the main content. But reordering the landing page on all the event pages would break consistency. With caching the home click should be almost instantaneous. So it was a compromise, and one that we should plan for next time.&lt;/p&gt;  &lt;p&gt;The sub-headings in events and contacts are generated with javascript. The actual thing is just some &lt;h2&gt;s, but scrolling in that tiny area can become tedious. So a domready hook collects all the h2s and create&amp;rsquo;s &amp;lsquo;tabs&amp;rsquo; out of them. jQuery is good for these kind of things.&lt;/h2&gt;&lt;/p&gt;  &lt;p&gt;The registration page tries to be nice. If you&amp;rsquo;ve already registered before, details like your name, and phone number get filled in automatically. For students &lt;em&gt;inside&lt;/em&gt; the college this &lt;em&gt;is&lt;/em&gt; instantaneous, and a major time-saver. Since more than half of our participation is from within college, this is a very good usability improvement.&lt;/p&gt;  &lt;p&gt;The second usability issue in the registration form is quite subtle. If you enter the wrong password, focus is immediately drawn back to the password field. But if you focus on a different field again, it won&amp;rsquo;t pull you back the second time. This is because it is quite possible that I want to fix the username instead of the password, and always pulling focus to the password again wouldn&amp;rsquo;t allow that. So alert the user once, but give up after that. Of course, the values are double checked upon submission, so security is not compromised.&lt;/p&gt;  &lt;p&gt;Finally by asking DA-IICT students for 9-digit IDs we can always contact them while ensuring uniqueness, while also auto-filling the institute name and removing the option for accomodation, ensuring that people are only shown what is required.&lt;/p&gt;  &lt;p&gt;The horizontal partition puts a physical differentiation between common fields and per-event fields. In fact, we can even add custom fields for events which require them, by simply making entries in the events details and the page will automatically include them.&lt;/p&gt;  &lt;p&gt;In summary, the Synapse website is a pretty good architecture, and quite well thought out. There are certain improvements that are visible in hindsight, but which we looked over inthat one week of crazy work. The result is quite stunning though.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/synapse-2011-behind-the-website"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5044994921564021592?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5044994921564021592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/12/synapse-2011-behind-website.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5044994921564021592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5044994921564021592'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/12/synapse-2011-behind-website.html' title='Synapse 2011: Behind the website'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5285/5245942843_512a76f3a5_t.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-138153996927697955</id><published>2010-12-09T18:15:00.001+05:30</published><updated>2010-12-09T18:15:41.303+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='semester'/><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Semester 5</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;Its been ages since I&amp;rsquo;ve got a post up, but I have my excuses. I have been working on a static site for myself, self-hosted and with my own domain name. I thought I would only resume blogging once that was done, but it is going to take some more time. Now with December a week old, it is time for my customary brain dump about the entire semester. In many ways these posts are highlights of the semester according to me. The short version: &lt;em&gt;It was busy&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="/blog/this-semester-was-legen-wait-for-it-dary/"&gt;Last time&lt;/a&gt;, it was summer and I was in GSoC euphoria, and since then I&amp;rsquo;ve had a couple of posts about it and KDE, but I left out all the human bits.&lt;/p&gt;  &lt;p&gt;The fifth semester is an important stepping stone in DA-IICT. It is the first time that you are free to chose half of the courses depending on your interests. It meant I could give up Communications, which had always hit me hard when it came to grades. So I had Introduction to Algorithms, Embedded Hardware Design (EHD), Database Management Systems (DBMS), Computer Networks (CNS), Introduction to VLSI and Approaches to Science Fiction (SF).&lt;/p&gt;  &lt;p&gt;EHD was a course which was very interesting and very boring. The interesting part was programming Atmel micro-controllers in C. I. Loved. It. We even made a wicked cool one-way chat that used two Atmel boards. Typing messages to the serial port on one computer, would send it to the board, which would &lt;strong&gt;Huffman encode&lt;/strong&gt; it, send it across the SPI bus, where another board would decode it and send it to the second computer. The SPI bus can be swapped with any system for longer range communication, it was only that our board didn&amp;rsquo;t support it. The boring part was the second half, when we were programming FPGAs using Verilog. FPGAs are the kind of technology that tries to think too much. It also makes programming the simple things on them extremely convoluted, with pin assignments on the massive board and using the god-awful slow Xilinx ISE environment. Write to Run time is a crucial parameter of programmer happiness. When you can finish a large ice-cream scoop in the time it takes to burn changes to a board, something is wrong.&lt;/p&gt;  &lt;p&gt;Speaking of ice-cream cones, for the first time ever, I bought an entire pack worth of ice-cream (Baskin Robbins) and ate it all. It was delicious! It was great. It just got a bit boring towards the end. The 24th was incidentally the coldest day of November in Gandhinagar, and at 1pm in the afternoon, I was shivering, it was raining and it was the middle of final exams. It&amp;rsquo;s good I wasn&amp;rsquo;t &lt;em&gt;thinking&lt;/em&gt; about the probability of getting sick.&lt;/p&gt;  &lt;p&gt;VLSI was my most challenging subject. The professor was top-notch, and I loved the course. The look at how ALUs and memory is made using CMOS gates &amp;mdash; that was truly full-stack knowledge. It was calculating the delay that seemed really tough for first two exams, but by the third exam I had it down well and managed to get a 7/10 overall.&lt;/p&gt;  &lt;p&gt;DBMS was a fiasco. I disliked the course, I disliked the teaching assistants, I disliked the boring stuff we had to do in the labs. CNS labs on the other hand were very interesting, we did a lot of Wireshark inspection and set up BGP/OSPF routers. Very hands-on. The lectures were another matter. I attended 3 out of the 40 odd that happen in a semester.Algorithms was pretty normal, some very interesting things like O(n) median finding in an unsorted array and dynamic programming is a wonderful technique for solving problems, although not easy to get your head around.&lt;/p&gt;  &lt;p&gt;Which brings me to the final course, Science Fiction. It was brilliant! We watched influential movies from the last fifty years, and I plan to review all of them in another post. It gave me a chance to review Stephen Baxter, analyze time travel and opened my eyes to this whole idea of SF being influenced by the society in which it was written. We had a very questioning professor, who introduced all these ideas. For all my life I&amp;rsquo;ve read novels pretty cursorily. The deeper themes and clues were lost as I spread through them. But that course brought all these things out. I&amp;rsquo;ve learnt to appreciate writing &amp;mdash; the subtlety of language, the thorough research, the names &amp;mdash; everything has to come together to create that perfect book.&lt;/p&gt;  &lt;p&gt;With that course, and Entelechy bringing out 3 editions in one semester, I&amp;rsquo;ve written tonnes of articles in those 4 months, and it has spurred a certain love of writing. I need to work more on my description, and emotion more though.&lt;/p&gt;  &lt;p&gt;Football always proceeds in fits and starts at DA-IICT, and this semester was more of fits. First I got a nasty ankle sprain, there went two weeks. Then my new pair of studs/cleats tore. Fortunately, the showroom didn&amp;rsquo;t have a replacement, so they gave me &lt;em&gt;better&lt;/em&gt; ones! Neck-deep in work, I also had to forgo the tournament in IIT Kanpur.&lt;/p&gt;  &lt;p&gt;As October approaches, Synapse preparations start. After last year&amp;rsquo;s series of disasters with a bad looking website and a server fire during the actual fest, we needed to strike back. So check out &lt;a href="http://synapse.daiict.ac.in"&gt;this year&amp;rsquo;s website&lt;/a&gt;. In fact, a full post about its making seems to be in order. This was done in one week, with two very late nights and taking advantage of the superb back-end code from last year. It has reinforced my belief that for something to be successful and worth doing, that initial idea has to be top-notch, a vision that provides very strong motivation. A mediocre idea will often lead to lack of perseverance in the team. Also I shamelessly request all readers who are college students to take part in &lt;a href="http://synapse.daiict.ac.in/index.php/event/appsdreamer"&gt;Apps Dreamer&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There was &lt;a href="/blog/hackfest-2010/"&gt;Hackfest&lt;/a&gt; of course, and I&amp;rsquo;m going to FOSS.in this year too. With an extremely busy four months, I&amp;rsquo;ve realised that its time to start saying no. I had a lot of mandatory tasks plus some others I took on voluntarily, but it proved a bit too much. So I&amp;rsquo;ve been really relaxing this month. That doesn&amp;rsquo;t mean I&amp;rsquo;ve stopped programming or learning. It means that I don&amp;rsquo;t do too much and the moment I feel tired, I stop. Next semester will again have a few projects, and I&amp;rsquo;ll be attempting the GRE, so I need to recharge this month.&lt;/p&gt;  &lt;p&gt;Overall, semester 5 was good. Not enough academic learning, but lots of non-academic learning, and &lt;em&gt;very&lt;/em&gt; busy days. Something I don&amp;rsquo;t want to repeat again :) The weather all throughout was magnificent though. The rains decided that 4 months was too short a time, and continued almost till the beginning of November. That coupled with winter felt just great.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/semester-5"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-138153996927697955?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/138153996927697955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/12/semester-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/138153996927697955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/138153996927697955'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/12/semester-5.html' title='Semester 5'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5679017404025510679</id><published>2010-10-17T10:13:00.003+05:30</published><updated>2011-01-18T07:56:53.519+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='upnp'/><title type='text'>UPnP MediaServer KIO Slave is OUT!</title><content type='html'>&lt;div class="posterous_autopost"&gt;&lt;p&gt;I’ve released the first version of the UPnP MediaServer KIO slave which allows KDE applications to seamlessly browse UPnP devices on the network, and access their files. An outcome of my Google Summer of Code, this is the first step towards getting UPnP Collection support into Amarok. For now, the slave is meant for application developers since dolphin &amp;amp; co. in KDE 4.5 do not directly know how to launch it.&lt;/p&gt;  &lt;p&gt;The recommended way to detect UPnP devices and invoke the slave is with &lt;a href="http://frinring.wordpress.com/2010/08/09/cagibi-0-1-1-released-network-kio-slave-freezes-kded-in-4-5-0/"&gt;Cagibi&lt;/a&gt;. To browse the device, run konqueror with the URL “upnp-ms://” where UUID is something like&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;bf7eace9-e63f-4267-a871-7b572d750653&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt;   &lt;p&gt;which has been retrieved from Cagibi&lt;/p&gt;  &lt;p&gt;Full release announcement is at &lt;a href="http://mail.kde.org/pipermail/kde-announce-apps/2010-October/004566.html"&gt;http://mail.kde.org/pipermail/kde-announce-apps/2010-October/004566.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Download v0.8.0: &lt;a href="http://download.kde.org/download.php?url=stable/kio-upnp-ms/0.8.0/src/kio-upnp-ms-0.8.0.tar.gz"&gt;http://download.kde.org/download.php?url=stable/kio-upnp-ms/0.8.0/src/kio-upnp-ms-0.8.0.tar.gz&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I request early adopters and developers to test this out. Bugs and feedback is welcomed at &lt;a href="mailto:nsm.nikhil@gmail.com"&gt;nsm.nikhil@gmail.com&lt;/a&gt;.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/upnp-mediaserver-kio-slave-is-out"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5679017404025510679?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5679017404025510679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/10/upnp-mediaserver-kio-slave-is-out.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5679017404025510679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5679017404025510679'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/10/upnp-mediaserver-kio-slave-is-out.html' title='UPnP MediaServer KIO Slave is OUT!'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4709085568521600374</id><published>2010-10-06T14:01:00.001+05:30</published><updated>2010-10-06T14:01:53.160+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='hackfest'/><category scheme='http://www.blogger.com/atom/ns#' term='shaastra'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Hackfest 2010</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;The usual convention in open source is that new developers get into a project by themselves. They follow online documentation and get into IRC channels and find their way around by themselves. Its not often that we get the chance to meet new guys and teach them the &amp;lsquo;tricks of the trade&amp;rsquo;. But that is exactly what happened at &lt;a href="http://www.shaastra.org/2010/main/events/coding/hack_fest"&gt;Hackfest @ Shaastra 2010&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hackfest got together mentors from various projects to introduce students to contributing to open source projects. We had &lt;a href="http://yuvi.in"&gt;Yuvi Panda&lt;/a&gt; for &lt;a href="http://www.gnome.org"&gt;GNOME&lt;/a&gt;, &lt;a href="http://pratul.in"&gt;Pratul Kalia&lt;/a&gt; for Android, and also Minix, and the Linux Kernel, and me for &lt;a href="http://www.kde.org"&gt;KDE&lt;/a&gt;. We also had &lt;a href="http://t3rmin4t0r.livejournal.com/"&gt;the t3rmin4t0r&lt;/a&gt; for an excellent talk about the state of the Web.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/5054542441/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4086/5054542441_d8654387e2.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;KDE had 8 students. On day 1 (30th September) the computer systems weren&amp;rsquo;t set up, so we covered basic signals and slots, and I discussed the KDE architecture and useful libraries and then walked them through some sample code. After that the students found a Junior Job each that they would like to fix.&lt;/p&gt;  &lt;p&gt;On day 2 we got KDE trunk compiled successfully and wrote a basic Hello Qt Application, following which I walked through a &lt;a href="http://github.com/nikhilm/foss.in"&gt;simple tweet fetcher&lt;/a&gt; to explain configuration, and creating basic GUIs. By the end of day 2, Anirudh S had got a simple &lt;a href="https://bugs.kde.org/show_bug.cgi?id=252303"&gt;menu entry bug&lt;/a&gt; fixed. I also fixed &lt;a href="https://bugs.kde.org/show_bug.cgi?id=218219"&gt;this Okular wish&lt;/a&gt; live, starting from scratch to demonstrate how to approach a bug. I will reviewboard it soon.&lt;/p&gt;  &lt;p&gt;On day 3, three of the participants fixed a &lt;a href="http://bugs.kde.org/show_bug.cgi?id=230283"&gt;kwin Junior Job&lt;/a&gt; and we tried to take a shot at adding something like a &amp;lsquo;tick mark&amp;rsquo; to the Notes plasmoid, although that didn&amp;rsquo;t succeed completely. After that everybody was pretty tired and so we stopped coding and we the mentors shared some stories of how we got into open source and so on with the crowd, Pratul being particularly good at that sort of thing. With that the actual event was done, and since my flight had been advanced to 5:30 in the morning I left.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/5055146726/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4112/5055146726_a10809603f.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The customized Shaastra distro made for the event!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The entire event was excellent, with the Hackfest coords and volunteers Subhashini, Sarthak, Kashyap, Kirtika and others did a great job with making us feel comfortable. I&amp;rsquo;ve never had someone send a taxi to the airport for me before :)&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/hackfest-2010"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4709085568521600374?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4709085568521600374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/10/hackfest-2010.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4709085568521600374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4709085568521600374'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/10/hackfest-2010.html' title='Hackfest 2010'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4086/5054542441_d8654387e2_t.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6164186690497318929</id><published>2010-09-09T13:23:00.001+05:30</published><updated>2010-09-09T13:23:59.279+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='tmux'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>tmux and vim configuration</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;I&amp;rsquo;ve now been on tmux for quite a few months since migrating from screen.&lt;/p&gt;  &lt;p&gt;&lt;code&gt;aterm + tmux + zsh + vim&lt;/code&gt; makes a super command-line combination.&lt;/p&gt;  &lt;p&gt;But there can be certain issues with the key bindings with vim. Since moving to tmux I&amp;rsquo;ve avoided using vim tabs since I couldn&amp;rsquo;t figure out the right key bindings to switch them using C-PgUp and C-PgDn when in tmux. But today with a little help on &lt;code&gt;#tmux&lt;/code&gt; and &lt;a href="http://kerneltrap.org/mailarchive/openbsd-misc/2009/7/12/6184463"&gt;kerneltrap&lt;/a&gt; I finally got things working. So here are my .tmux and .vimrc files for posterity.&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;# start a new session on tmux att if no existing session is running new  # screen prefix key set -g prefix C-a  # large history set-option -g history-limit 100000  # swap on C-a C-a bind-key C-a last-window bind-key k confirm-before kill-window bind-key r source-file ~/.tmux.conf bind-key v split-window -h #similar to vim's vsplit bind-key h split-window  set-option -g default-terminal &amp;quot;screen-256color&amp;quot;  # status bar customisation set-option -g status-bg default set-option -g status-fg green  # highlight status bar on activity set -g visual-activity on  # change foreground-background for the current window setw -g window-status-current-attr reverse setw -g monitor-activity on  # for vim setw -g xterm-keys on  # load average, battery, and date + time set -g status-right &amp;quot;#[fg=magenta] #(cat /proc/loadavg|awk '{print&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt;   &lt;p&gt;$1 \&amp;ldquo; \&amp;rdquo;  $2 \&amp;ldquo; \&amp;rdquo;  $3}&amp;lsquo;) #(acpi|awk &amp;rsquo;{print $4;}&amp;lsquo;) #[fg=cyan]%d-%m&lt;/p&gt;  &lt;h1&gt;[fg=green]%H:%M"&lt;/h1&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;# put the programs to start by default here # one $SHELL is always started at 0  # todo/bugtracker http://yokadi.github.com/ neww -n yokadi -t 10 yokadi  # focus on first window select-window -t 0  set status-left-attr reverse&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt;   &lt;p&gt;.vimrc&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;syntax enable filetype on filetype indent on filetype plugin on  &amp;quot; Fast editing of the .vimrc map e :e! ~/.vim_runtime/vimrc  &amp;quot; When vimrc is edited, reload it autocmd! bufwritepost .vimrc source ~/.vimrc  &amp;quot; indent related set backspace=indent,eol,start set smarttab set expandtab set sw=4 set tabstop=4 set softtabstop=4  &amp;quot; other view settings, some redundant set t_Co=256 set number set autoindent set smartindent set showcmd set showmatch set ruler set tw=0 set hlsearch set incsearch set magic  &amp;quot; I don't like swap files set noswapfile :highlight Pmenu ctermbg=238 ctermfg=white gui=bold  &amp;quot; for tmux set mouse=a set ttymouse=xterm  &amp;quot; following taken from http://items.sjbach.com/319/configuring-vim-right set hidden runtime macros/matchit.vim set wildmenu set wildmode=list:longest set title set visualbell  &amp;quot;mappings &amp;quot; fast saves &amp;quot; fast quit &amp;quot; and tag/tree toggling :nmap  :w :nmap  :wall :map  :qall :map  :TlistToggle :map  :NERDTreeToggle :map  :FuzzyFinderFile  :let NERDTreeQuitOnOpen = 1  &amp;quot; ignore case when searching :set ignorecase &amp;quot; but if any character is typed uppercase, respect the case :set smartcase  :set wildignore=*.o,*.pyc set completeopt=menuone,menu,longest,preview  :set scrolloff=8  :set wm=4  &amp;quot; use ack instead of grep for vimgrep :set grepprg=ack  &amp;quot; abbreviations &amp;quot; useful iab xauthor Nikhil Marathe &amp;lt;nsm.nikhil@gmail.com&amp;gt; iab xdate =strftime(&amp;quot;%d/%m/%y %H:%M:%S&amp;quot;)  let g:GetLatestVimScripts_allowautoinstall=1  &amp;quot; Tell vim to remember certain things when we exit &amp;quot;  '10 : marks will be remembered for up to 10 previously edited files &amp;quot;  &amp;quot;100 : will save up to 100 lines for each register &amp;quot;  :20 : up to 20 lines of command-line history will be remembered &amp;quot;  % : saves and restores the buffer list &amp;quot;  n... : where to save the viminfo files set viminfo='10,\&amp;quot;100,:20,%,n~/.viminfo  &amp;quot; when we reload, tell vim to restore the cursor to the saved position augroup JumpCursorOnEdit au! autocmd BufReadPost * \ if expand(&amp;quot;:p:h&amp;quot;) !=? $TEMP | \ if line(&amp;quot;'\&amp;quot;&amp;quot;) &amp;gt; 1 &amp;amp;&amp;amp; line(&amp;quot;'\&amp;quot;&amp;quot;) &amp;lt;= line(&amp;quot;$&amp;quot;) | \ let JumpCursorOnEdit_foo = line(&amp;quot;'\&amp;quot;&amp;quot;) | \ let b:doopenfold = 1 | \ if (foldlevel(JumpCursorOnEdit_foo) &amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt;   &lt;p&gt;foldlevel(JumpCursorOnEdit_foo &amp;ndash; 1)) |&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;\ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 | \ let b:doopenfold = 2 | \ endif | \ exe JumpCursorOnEdit_foo | \ endif | \ endif &amp;quot; Need to postpone using &amp;quot;zv&amp;quot; until after reading the modelines. autocmd BufWinEnter * \ if exists(&amp;quot;b:doopenfold&amp;quot;) | \ exe &amp;quot;normal zv&amp;quot; | \ if(b:doopenfold &amp;gt; 1) | \ exe &amp;quot;+&amp;quot;.1 | \ endif | \ unlet b:doopenfold | \ endif augroup END  :runtime! ftplugin/man.vim  vnoremap  * :call VisualSearch('f') vnoremap  # :call VisualSearch('b')  &amp;quot; Smart way to move btw. windows map  j map  k map  h map  l  &amp;quot; Allow Ctrl+PgUp/PgDn in tmux set t_kN=[6;*~ set t_kP=[5;*~  &amp;quot; reduce vi compatibility for more usefult stuff set nocp&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/tmux-and-vim-configuration"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6164186690497318929?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6164186690497318929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/09/tmux-and-vim-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6164186690497318929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6164186690497318929'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/09/tmux-and-vim-configuration.html' title='tmux and vim configuration'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5585466500488376670</id><published>2010-08-29T18:46:00.001+05:30</published><updated>2010-08-29T18:46:49.471+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='stuff'/><category scheme='http://www.blogger.com/atom/ns#' term='knockout'/><title type='text'>Knocked out of Node Knockout</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;em&gt;(This is one of those you-don&amp;rsquo;t-really-have-to-read-it kind of posts)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I was very excited about &lt;a href="http://nodeknockout.com"&gt;Node Knockout&lt;/a&gt;. I had a great idea for an &lt;a href="http://github.com/nko/binary-soul"&gt;IRC bouncer + websocket based client called Ircsome&lt;/a&gt; using &lt;a href="http://nodejs.org"&gt;node&lt;/a&gt;, &lt;a href="http://qooxdoo.org"&gt;qooxdoo&lt;/a&gt; and a couple of other things.&lt;/p&gt;  &lt;p&gt;I knew that I would only get 24 hours since Sunday had higher priority events, but I believed I could get the basic app working in 24 hours. Until things went downhill from last week. First my brand new shoes tore, and since Adidas has an idiotic replacement policy (even in their centralised, computer based inventory systems) where-in you&amp;rsquo;ve to go to the same store you bought it from, I lost about 3 hours of my time at home ( although I managed to pick up &lt;a href="http://www.amazon.com/ERLANG-Programming-Francesco-Cesarini/dp/0596518188"&gt;Erlang Programming&lt;/a&gt;. Then in the train home, I rebooted my cell phone and my SIM card just gave, it refused to work. There went my internet connection, no frequent push-pulls. Still I managed to get the client and server atleast talking to each other and logging onto IRC when the user filled in the details in the browser. I pushed out the changes over my home connection, and the push to Joyent succeeded, yet my server didn&amp;rsquo;t seem to be running, atleast my home internet configuration couldn&amp;rsquo;t manage to connect to it on any of the expected ports (even though push to the same server worked). By this time I was really annoyed, and had to sleep to, so I stopped. Knockout!&lt;/p&gt;  &lt;p&gt;I plan to continue on Ircsome though, so I can deploy my own home brewed bouncer on my (coming soon) VPS and access IRC and logs from anywhere. Qooxdoo is a pretty great toolkit, but lacking certain kinds of documentation and being very heavy in size. Its almost like Qt, though I dislike the Java getter naming convention.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/knocked-out-of-node-knockout"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5585466500488376670?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5585466500488376670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/08/knocked-out-of-node-knockout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5585466500488376670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5585466500488376670'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/08/knocked-out-of-node-knockout.html' title='Knocked out of Node Knockout'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7518880137007749407</id><published>2010-08-21T00:41:00.001+05:30</published><updated>2010-08-21T00:41:39.647+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='amarok'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc10'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Final Evaluations results processed for Amarok and KDE UPnP Integration</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;blockquote&gt;&lt;p&gt;Hi Nikhil Marathe,&lt;/p&gt;  &lt;p&gt;We have processed the evaluation for your project named Amarok and KDE UPnP Integration with KDE.&lt;/p&gt;  &lt;p&gt;Congratulations, from our data it seems that you have successfully passed the Final Evaluations. Please contact your mentor to discuss &gt;the results of your evaluation and to plan your goals and development plan for the rest of the program&lt;/p&gt;  &lt;p&gt;Greetings, The Google Open Source Programs Team&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Yay!&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/final-evaluations-results-processed-for-amaro"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7518880137007749407?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7518880137007749407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/08/final-evaluations-results-processed-for.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7518880137007749407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7518880137007749407'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/08/final-evaluations-results-processed-for.html' title='Final Evaluations results processed for Amarok and KDE UPnP Integration'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-194591869133399888</id><published>2010-07-31T18:27:00.002+05:30</published><updated>2010-07-31T23:10:27.196+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='rekonq'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc10'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Whats up doc?</title><content type='html'>&lt;div class='posterous_autopost'&gt;Pardon me for the excessively cliche title, I was short on time :P &lt;p /&gt; Its been a week now since college began, and already I feel the &lt;br /&gt;extreme busy-ness that occurs trying to squeeze every activity into 24 &lt;br /&gt;hours. The vacations were comparatively totally empty. &lt;p /&gt; The UPnP collection support in Amarok is concluding pretty well. Today &lt;br /&gt;I committed the fix that considerably shortens the amount of data &lt;br /&gt;transfer required over the network for subsequent queries once the &lt;br /&gt;local cache is relatively filled. With a relatively small share on &lt;br /&gt;miniDLNA, I got near native performance, with the tracks being &lt;br /&gt;populated as soon as I opened up a tree. The kioslave too has had some &lt;br /&gt;additions that allow applications using it to bypass many of the &lt;br /&gt;user-friendly features (required for browsing via Dolphin or &lt;br /&gt;Konqueror) and get blazing fast results instead. &lt;p /&gt; With another Amarok release coming up, I want to get some time to fix &lt;br /&gt;bugs, but it has been hard to come by, even on a weekend. &lt;p /&gt; My other pet KDE project has been Rekonq, more specifically Chrome &lt;br /&gt;extension support. I can't remember the last time I blagged about it, &lt;br /&gt;but just so it doesn't get buried as defunct project, let me give a &lt;br /&gt;status update. Work is slow but not stalled. I have extension &lt;br /&gt;installation working. I have figured out how to interface the C++ and &lt;br /&gt;JS parts, although it is a bit hacky. The Chrome Tabs API is mostly &lt;br /&gt;implemented, (localization and script injection and message passing &lt;br /&gt;are not), including the captureVisibleTab() method. Now that I have &lt;br /&gt;some experience, it should be much easier to implement the rest of the &lt;br /&gt;APIs. I still have to figure out how to implement background pages &lt;br /&gt;(most likely a WebTab not added to the UI), implement safe message &lt;br /&gt;passing and so on. A nice UI to manage extensions would also be &lt;br /&gt;required, and it would be great if others are interested in jumping in &lt;br /&gt;to the &lt;a href="http://gitorious.org/~nikhilm/rekonq/nikhilms-mainline"&gt;project.&lt;/a&gt; &lt;br /&gt;I would be glad to explain the architecture ( I have a IRC log lying &lt;br /&gt;around, thanks to Rohan Garg :P ) &lt;p /&gt; I don't know about 1.0, but extension support will get there in the &lt;br /&gt;end, so lets not remove my name from the Credits :) &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/whats-up-doc"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-194591869133399888?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/194591869133399888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/whats-up-doc.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/194591869133399888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/194591869133399888'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/whats-up-doc.html' title='Whats up doc?'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8132172003236931145</id><published>2010-07-17T18:40:00.001+05:30</published><updated>2010-07-17T18:40:24.677+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='amarok'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc2010'/><category scheme='http://www.blogger.com/atom/ns#' term='upnp'/><title type='text'>UPnP Searching</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;I&amp;rsquo;ve been pretty quite about GSoC progress. But I had a great time at aKademy and forgot all about blog posts. So the current status is thus. If programming was just about getting things done, I am done! But its not, which means although everything I was supposed to do is done in a big picture way, the next few weeks will see bug fixes, optimization and ensuring that certain things can be done faster, more accurately or in a more user-friendly manner. I also have to port the code over to use Solid, now that fellow GSoCer Paulo Romulo has improved UPnP support in it.&lt;/p&gt;  &lt;p&gt;Last time I gave a glimpse of the Browse based collection. UPnP MediaServers have two methods of accessing their content. Browse() is similar to going through your hard-disk directory by directory. As you can see, this can be quite inefficient for a Collection since it has to keep track of a large number of tracks. The other method is Search(), wherein users can query the MediaServer to give tracks/media matching certain criteria, such as belonging to a specific artist, or containing a certain pattern in the name. This is much more efficient because all the work is done by the server and we just need to handle the results.&lt;/p&gt;  &lt;p&gt;That has been the crux of my work this past month. Due to the restricted format of the UPnP search standard, it required a bit of work to handle more complex queries. In addition, due to the way the Amarok Collection and QueryMaker code works, I have to always ask the server for tracks rather than telling it to return on Artists or Albums. It took quite a bit of experimenting to understand these two things. But two days ago the collection started working with actual searching for simple patterns.&lt;/p&gt;  &lt;p&gt;Here is the Search based collection with no search.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4801188475/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4099/4801188475_1f4a84dd4e.jpg" border="0" height="145" width="300" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here it is with a search term.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4801187615/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4074/4801187615_968508e2f9.jpg" border="0" height="187" width="300" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I should point out that the code is intelligent. It will contact the server and ask it if it supports Searching, or only Browsing and use the appropriate collection.&lt;/p&gt;  &lt;p&gt;Other than that there are several bug fixes in the slave and in Amarok and support for reference IDs to prevent duplicate items ( every FOSS software server I tried still doesn&amp;rsquo;t support refID properly though ).&lt;/p&gt;  &lt;p&gt;By the way, I passed mid-term evaluations. Yay!&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/upnp-searching-0"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8132172003236931145?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8132172003236931145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/upnp-searching.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8132172003236931145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8132172003236931145'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/upnp-searching.html' title='UPnP Searching'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4099/4801188475_1f4a84dd4e_t.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3555142146393191854</id><published>2010-07-16T21:39:00.001+05:30</published><updated>2010-07-16T21:39:24.632+05:30</updated><title type='text'>Fogged goggles</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;It is my habit to go swimming daily in the summer. This is the time when I am home from college, but the poor Mumbai University chaps are trapped in exams. The swimming pool as an habitat is a fascinating picture. And with no distractions it proves to be an ideal ground to pay attention to the human species, not to mention overhear conversations. I&amp;rsquo;ve come to the conclusion that swimmers can be categorized and a taxonomy is not far off.&lt;/p&gt;  &lt;p&gt;First up are Blubbers. Physical characteristics: men, past their prime, pot-bellies. It is undoubtedly easy to identify a Blubber. A lone Blubber is not so interesting. A tendency to not take effort leads him to float on his back. Since &lt;a href="http://wiki.answers.com/Q/Do_fat_people_float_better_than_skinny_people&amp;amp;alreadyAsked=1&amp;amp;rtitle=Fat_people_stronger_than_skinny"&gt;fat people float without effort&lt;/a&gt;, he can enter a state of quiet contemplation.&lt;/p&gt;  &lt;p&gt;It is when Blubbers congregate that things can get interesting. If you ever have the opportunity to stand next to a Floogie ( a group of Blubbers ), watch them try to out do each other every time they talk. You will notice that all those &amp;lsquo;achievements&amp;rsquo; are &lt;em&gt;always&lt;/em&gt; in the past. Exploits of swims attempted in rivers in their youth, or nephews and sons who have reached heights come up often. But mostly it is the banter of how the country is going to hell and how every politician should be burnt and what they would have done in the same situation. I should mention that it is quite common for them to also plan the next drink-guzzling afternoon where-in each will try to increase his beer-belly more than others. Warning: It is dangerous to expose children to Floogies. Make sure you are strong minded and get far away at the first moment of light-headedness.&lt;/p&gt;  &lt;p&gt;We now turn to Ladies. Their count is lower due to a lack of time or often devotion to other things. I should remark that swimming seems to bring their words-per-minute down by about 80%. Owing to the awkwardness involved in getting close to one, Ladies are quite an under-studied species. Some female readers might be interested in expanding upon this, the US military is always looking for ways to spend money on completely pointless things.&lt;/p&gt;  &lt;p&gt;Kids. Don&amp;rsquo;t you wish you could be one. Kids are extremely easy to identify. They are small.&lt;/p&gt;  &lt;p&gt;Some tend to morbidly afraid of the water and will not go in until forced by a Moleskein guardian ( see below ). Once they take to the water they immerse in their own world, unaware that they are about to kick a swimmer. Groups of kids often avail of trivial pursuits like throwing a coin into the water and rushing to get it. This is encouraged, it is known to lead many to become Swimmers later. Interoperatability between the sexes is best at this point, after all ignorance is bliss. The ease of swimming is inversely proportional to the number of kids in the water, as normal traffic rules do not apply to them ( Lack of rules has also been observed in Blubbers ).&lt;/p&gt;  &lt;p&gt;The author feels no qualms when he puts himself in the species called Swimmers. They are the alpha males of the pool, strong, lithe and confident of their ability in the water. Their aim is to exercise, to push themselves to do as many laps as possible. It is quite unfortunate then, that every other class conspires to block them, hit them and more generally just piss them off by mere presence. In densely populated pools, Swimmers have been known to demonstrate extreme reaction times. It is my inference that this is due to the need to grind to a halt when a Kid comes in the way.&lt;/p&gt;  &lt;p&gt;Moleskeins. Mostly harmless.&lt;/p&gt;  &lt;p&gt;A major cause of concern in my pool is the lack of a species called Beautiful Girls. Taxonomically perfectly named with the English word &amp;lsquo;beautiful&amp;rsquo; denoting physical appearance and &amp;lsquo;girl&amp;rsquo; meaning &amp;lsquo;young of female gender&amp;rsquo;. Extremely rare species in these parts of the world, swimologists have laboured to collect information about them. Your author has had the bad luck to observe only one in his 3 month sojourn. It is unfortunate that she could swim a bit. This immediately discounted the species Damsels in Distress. This is bad because it has led to my inability to be called &amp;ldquo;my hero&amp;rdquo; which is important for a Swimmer&amp;rsquo;s confidence.&lt;/p&gt;  &lt;p&gt;The rarety can be comprehended by the fact that only &lt;em&gt;once&lt;/em&gt; in this time was the BG close enough to attempt communication. Alas, I was checked in my attempt by the arrival of a Blubber who attempted to teach the BG the right stroke. Considering that Blubber&amp;rsquo;s are incapable of coming within 50 yards of the right stroke, I think he must have read it in a book. This has led to my lifelong hatred of that species. It is the wish of me and my colleagues that Beautiful Girls increase in number, and that is the reason why I&amp;rsquo;m all for feminism.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;( this is meant to be an anecdote, my first attempt at writing one. I will not apologize for any Politically Incorrect behaviour. I do not believe in PC in jokes. Enjoy :) )&lt;/em&gt;&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://bombayrain.posterous.com/fogged-goggles"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3555142146393191854?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3555142146393191854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/fogged-goggles.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3555142146393191854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3555142146393191854'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/fogged-goggles.html' title='Fogged goggles'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7712626387001598305</id><published>2010-07-09T02:26:00.001+05:30</published><updated>2010-07-09T02:26:41.394+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='akademy'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='akademy2010'/><title type='text'>Akademy Day 5/6</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;Day 5 of Akademy was spent hacking too. Then I had a great meal at &lt;a href="http://fi.wikipedia.org/wiki/Plevna_(tehdasrakennus"&gt;Plevna&lt;/a&gt;), Tamperelainen, which was mashed potatoes + lingonberry jam + Tampere&amp;rsquo;s famous blood sausages. Well it lived up to its expectations, the sausages were definitely good, but different. It was kind of like &lt;em&gt;sabudana vada&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Unfortunately Germany lost :( The final will still be a good watch though.&lt;/p&gt;  &lt;p&gt;Once again, I would like to raise my fictional hat to COSS and all the volunteers for the &lt;strong&gt;excellent&lt;/strong&gt; organisation of this year&amp;rsquo;s Akademy.&lt;/p&gt;  &lt;p&gt;The day trip was spectacular.&lt;/p&gt;  &lt;p&gt;We were treated to Finland&amp;rsquo;s natural beauty in abundance. Merunlahti Centre for Nature Tourism has this camp like area right next to lake Höytämöjärvi with canoeing, slacklining and other activities.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4774523873/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4102/4774523873_fc167b0297.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The first thing to do was to jump in the lake, which was pretty cold. I have never properly swum in fresh water before ( which says something about India&amp;rsquo;s screwed up Nature ) so it was great. And unlike the sea, a lake actually has a reachable &amp;lsquo;other side&amp;rsquo;. So I swam across and back about 150 m or so. Give a human a log in the water and he is transformed to a 5 year old. KDE developers spent half the time trying various things like standing on the log, getting everyone on without falling off and other stunts, which was really funny and great &amp;lsquo;community bonding&amp;rsquo;. Maybe day trips should be done at the beginning of Akademy :)&lt;/p&gt;  &lt;p&gt;I tried my hand at a bit of darts, but I am bad at it. Archery was more my thing. Slacklining was not. Canoeing was great though. I got a feel of the boat immediately, although it was my first time ever, I think I&amp;rsquo;ll be trying it again when I get the opportunity.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4775159902/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4139/4775159902_bd552e4845.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The food was great too. We had bread and fruits and BBQed corn and potatoes, sausages we could cook ourselves over a fire and marshmallows!&lt;/p&gt;  &lt;p&gt;Now a sauna isn&amp;rsquo;t really my thing, but they had a great sauna house and so I took a few spins. When in Finland, do what the Finnish do. Get out of the sauna and jump into the lake!&lt;/p&gt;  &lt;p&gt;Tomorrow is the last day of Akademy, and I will miss this place and all the fascinating people. I wish I had a hackspace like Demola, fast internet, food, no disturbances. Kudos to the organizers again.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4775158616/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4134/4775158616_37038ca883.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/akademy-day-56"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7712626387001598305?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7712626387001598305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-56.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7712626387001598305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7712626387001598305'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-56.html' title='Akademy Day 5/6'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4102/4774523873_fc167b0297_t.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7059358843704702522</id><published>2010-07-07T02:49:00.001+05:30</published><updated>2010-07-07T02:49:32.901+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='akademy2010'/><title type='text'>Akademy Day 3/4</title><content type='html'>&lt;div class='posterous_autopost'&gt;Akademy just keeps getting better and better, and this year's location &lt;br /&gt;couldn't have been more perfect. &lt;p /&gt; The Demola office, if it could be called that, is the perfect &lt;br /&gt;hackspace. Lots of tables strewn over the place, no partitions, sofas &lt;br /&gt;to relax on and even a retro arcade game! &lt;p /&gt; Yesterday and today and the rest of the week will be hackdays and &lt;br /&gt;BoFs, so there isn't really much to report. &lt;br /&gt;But at the end of today I just took a random walk across Tampere, and &lt;br /&gt;its a beautiful city as you can see. &lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4768665941/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4074/4768665941_5cfa23ac46.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4768665575/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4100/4768665575_8d42878d66.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4769303374/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4102/4769303374_237b750bc5.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4768664861/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4117/4768664861_2f276f96f7.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; Tomorrow I plan to take the &lt;a href="http://tamperefreetours.com"&gt;free walking tour&lt;/a&gt; that takes place everyday in Tampere, any other KDE &lt;br /&gt;hackers planning to go? &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/akademy-day-34"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7059358843704702522?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7059358843704702522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-34.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7059358843704702522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7059358843704702522'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-34.html' title='Akademy Day 3/4'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4074/4768665941_5cfa23ac46_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2902387058407419216</id><published>2010-07-05T03:25:00.001+05:30</published><updated>2010-07-05T03:25:19.173+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='akademy2010'/><title type='text'>Akademy Day 2</title><content type='html'>&lt;div class='posterous_autopost'&gt;Today was the day of fluffy, hands down! Frederik Gladhorn gave a &lt;br /&gt;super lightning talk introducing his quite serious pet project &lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4761232453/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4116/4761232453_9d5fddf596.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; Other than this I attended Lubos' performance talk, and Milian and &lt;br /&gt;Aleix's great KDevelop feature promo. I mean if Ctrl+Space can give a &lt;br /&gt;complete program, why am I even learning C++? :) In addition Casper &lt;br /&gt;gave a very nice talk about getting KDE to work on windows, and hats &lt;br /&gt;of to the KDE-Windows team for there efforts. &lt;p /&gt; The show-stealer was of course Aaron Seigo's keynote, exhorting all of &lt;br /&gt;us to strive for 'elegance' now that KDE has achieved a great &lt;br /&gt;technical base. The simple brush paintings, which I assume are done &lt;br /&gt;with Krita, complemented it perfectly. So here's to more elegant &lt;br /&gt;software. &lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4761233081"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4142/4761233081_d337354c14.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; I spent the rest of the day tracking down a pretty annoying bug in the &lt;br /&gt;UpnpSearchCollection and then find out that UPnP has no way to group &lt;br /&gt;searches to clarify precedence. So I have to think about that &lt;br /&gt;tomorrow. The thing with the first two days of Akademy has been that &lt;br /&gt;by the time you settle in to do some coding, there is an interesting &lt;br /&gt;talk :) So with that done, I am planning to get quite some work done, &lt;br /&gt;not only with the GSoC but a few kwin and Amarok things too. &lt;p /&gt; I will also attempt the Qt certification to see if I'm good enough. &lt;p /&gt; The most important thing is that we had free icecream today, thanks to &lt;br /&gt;the basyskom guys. &lt;p /&gt; &lt;a href="http://www.flickr.com/photos/code_kreator/4761865710"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4097/4761865710_4dae16f283.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;p /&gt; Unlike yesterday's party, today was a relaxed evening, with the TOAS &lt;br /&gt;sauna running. I attempted it, but my body's capability to produce &lt;br /&gt;sweat is very high and I had to get out in 5 minutes. I did some &lt;br /&gt;random stuff, met some more people and figured out where the laundry &lt;br /&gt;room is! &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/akademy-day-2"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2902387058407419216?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2902387058407419216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2902387058407419216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2902387058407419216'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-2.html' title='Akademy Day 2'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4116/4761232453_9d5fddf596_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9015970207470897202</id><published>2010-07-04T03:38:00.001+05:30</published><updated>2010-07-04T03:38:07.240+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='akademy2010'/><title type='text'>Akademy Day 1</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;p&gt;Into the sea of existing akademy posts enters another one.&lt;/p&gt;  &lt;p&gt;Technically its my second day in Finland. I arrived on the 2nd with Pradeepto from mumbai. We met seele and Justin at Schiphol itself, while blauzahl and Mek were on the same flight! If that wasn&amp;rsquo;t enough, the bus from Helsinki to Tampere found aseigo and Hans Chen on it too, making it the Akademy bus.&lt;/p&gt;  &lt;p&gt;The Student House TOAS city is an awesome place to live in, with rooms just like in college, a bit better :)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4755354191/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4073/4755354191_1b9accf546.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Finlayson area hack room was really cool too, and yesterday I spent a few hours there getting to know quite a few people, including Vishesh Handa. I also bought my KDE shirt. At 8:30, the sun was still high up in the sky, at 11, its like evening in Mumbai which was bizarre. Akarsh and Prakash also caught up after a delayed flight.&lt;/p&gt;  &lt;p&gt;Today was even better. The keynote was pretty good, its great to see KDE going deeper into the mobile space. Meanwhile (Qt made sure to give us all a rubber duck)[&lt;a href="http://developer.qt.nokia.com/duck"&gt;http://developer.qt.nokia.com/duck&lt;/a&gt;].&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4758129089/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4099/4758129089_dfe0f9a0d8.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I met a lot of people who have been mentors, helpers and friends over IRC &amp;ndash; Martin Grasslin, Leo Franchi, Nikolaj Nielsen, Friedrich Kossebau, Martin Sandsmark, Lydia Pintscher and many many more, whom I have to talk too about various topics.&lt;/p&gt;  &lt;p&gt;Thomas Thym&amp;rsquo;s talk about principles in open source communities was very interesting while both Nikolaj and Leo conveyed social music capabilities and Amarok&amp;rsquo;s role in it very well. During the few talks I didn&amp;rsquo;t attend, I tried to do a bit of work, but it was a little hard due to all the excitement :)&lt;/p&gt;  &lt;p&gt;Now Martin had written a plugin for the match, but I couldn&amp;rsquo;t stand not watching it and missed his talk. I wasn&amp;rsquo;t alone. It was great fun to travel 9000 km to watch football with other KDE developers. And since KDE has a large number of Germans you can guess who was supported. Germany were amazing with a 4 goal trouncing of Argentina, and with this form they can easily win the Cup.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4758767042/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4134/4758767042_9ec0b7027b.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With all the talks out of the way, me, kstar and pinocchio went to the downstairs supermarket. I had a strawberry-pineapple bread and rajma-chawal for dinner :) followed by liquorice sticks.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.flickr.com/photos/code_kreator/4758767206/"&gt;&lt;img class="posterous_download_image" src="http://farm5.static.flickr.com/4080/4758767206_0d415ba878.jpg" border="0" height="375" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The KDE Akademy party was at the Love Hotel on Hameenkatu and it was fun meeting a lot of people and talking non code stuff and enjoying the Spain-Paraguay match. But now I&amp;rsquo;m really tired and have to crash if I want to be attentive tomorrow, particularly with performance, UX and cloud talks.&lt;/p&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/akademy-day-1"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9015970207470897202?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9015970207470897202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9015970207470897202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9015970207470897202'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/07/akademy-day-1.html' title='Akademy Day 1'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4073/4755354191_1b9accf546_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5229826130152705633</id><published>2010-06-26T12:28:00.002+05:30</published><updated>2010-06-26T13:01:19.950+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='happiness'/><category scheme='http://www.blogger.com/atom/ns#' term='society'/><category scheme='http://www.blogger.com/atom/ns#' term='flow'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>A new kind of happiness</title><content type='html'>&lt;div class="posterous_autopost"&gt;&lt;p&gt;&lt;a href="http://www.zacharyburt.com/2010/06/release-yourself-to-the-church-to-the-state-to-apple-corporation-or-flow/"&gt;http://www.zacharyburt.com/2010/06/release-yourself-to-the-church-to-the-stat...&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;The Apple marketing machine created a tribe, giving to the rise of superfans whose identity/self-image hinges on being one of the first to own a new product. I don’t know if it’s Apple you should really blame, though. You should blame our culture for allowing the media to manipulate us, brainwashing us, shaping the behavior to work jobs we hate so we can buy things so we can be happy.&lt;/p&gt;&lt;/blockquote&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com/"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/a-new-kind-of-happiness"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5229826130152705633?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5229826130152705633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/06/new-kind-of-happiness-tags-happiness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5229826130152705633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5229826130152705633'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/06/new-kind-of-happiness-tags-happiness.html' title='A new kind of happiness'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-553018197850558524</id><published>2010-06-24T19:08:00.001+05:30</published><updated>2010-06-24T19:08:27.917+05:30</updated><title type='text'>Test</title><content type='html'>&lt;div class='posterous_autopost'&gt;&lt;h1&gt;First post&lt;/h1&gt;  &lt;p&gt;This is a test of posterous&lt;/p&gt;  &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="kw"&gt;print&lt;/span&gt; &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p style="font-size: 10px;"&gt; &lt;a href="http://posterous.com"&gt;Posted via email&lt;/a&gt;  from &lt;a href="http://baritone.posterous.com/test-IeEDG"&gt;nikhil's posterous&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-553018197850558524?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/553018197850558524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/06/test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/553018197850558524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/553018197850558524'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/06/test.html' title='Test'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7371570233631016248</id><published>2010-06-19T15:07:00.003+05:30</published><updated>2010-06-19T15:19:04.039+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='humour'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Notification madness</title><content type='html'>Planet, my slave went awry :(&lt;br /&gt;I terminated the processes, but is there a way to kill all the notifications at once.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/TByRxzw5YwI/AAAAAAAAAQk/ojupnfHNZsc/s1600/upnpslave4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 335px; height: 400px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/TByRxzw5YwI/AAAAAAAAAQk/ojupnfHNZsc/s400/upnpslave4.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5484418731125334786" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7371570233631016248?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7371570233631016248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/06/notification-madness.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7371570233631016248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7371570233631016248'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/06/notification-madness.html' title='Notification madness'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8YErdCHGKN8/TByRxzw5YwI/AAAAAAAAAQk/ojupnfHNZsc/s72-c/upnpslave4.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9140299357910846626</id><published>2010-06-11T16:11:00.005+05:30</published><updated>2010-06-11T16:26:55.968+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='amarok'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc10'/><category scheme='http://www.blogger.com/atom/ns#' term='worldcup10'/><category scheme='http://www.blogger.com/atom/ns#' term='akademy10'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>GSoC Week 4: Experimenting with Collections</title><content type='html'>I didn't write a post last week, and it looks really bad in my form completion :) but I didn't have any user visible updates at all. This week is much better. First the visual then the text.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://akademy.kde.org/"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 227px;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/TBITw78cKXI/AAAAAAAAAPw/pm94JngnuCw/s400/upnpslave2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5481465427909159282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's cover art fetched from the UPnP device when the Content Directory has it available!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Other updates include smoother full and incremental scanning of the Collection. This is one area which needs a lot more improvement. The kio slave is now threaded and continuously monitors the UPnP device for updates. This is used by the Collection to mirror the actual contents whenever possible. The slave is also now fully normally evented, without pesky internal event loops and blocking. I learned a lot about how signals and slots work in the mean time, and uniqueness and disconnections. Certain thread related things have been sorted so that the slave is much more bug free, although Bart Cerneels still made it crash :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now today I'm stopping work much earlier, because its time for the World Cup to begin, and I'm supporting Germany! I hope my excuse is good enough.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Oh, by the way:&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/TBIU8LMq6NI/AAAAAAAAAP4/PNbAqUQKEq8/s1600/igta2010.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 380px; height: 200px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/TBIU8LMq6NI/AAAAAAAAAP4/PNbAqUQKEq8/s400/igta2010.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5481466720493955282" /&gt;&lt;/a&gt;&lt;div&gt;Here's to meeting a lot of KDE devs soon...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9140299357910846626?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9140299357910846626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/06/gsoc-week-4-experimenting-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9140299357910846626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9140299357910846626'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/06/gsoc-week-4-experimenting-with.html' title='GSoC Week 4: Experimenting with Collections'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/TBITw78cKXI/AAAAAAAAAPw/pm94JngnuCw/s72-c/upnpslave2.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1884654486021427730</id><published>2010-05-29T15:26:00.002+05:30</published><updated>2010-05-29T15:46:43.107+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc10'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='upnp'/><title type='text'>GSoC Week 2: Experimenting with Collections</title><content type='html'>&lt;div&gt;Another week is already gone, and although it didn't see much progress feature wise, I've been working a lot on the project. Three days were spent on a nasty little hard to produce bug, one that would only occur 4 levels deep into the Content Directory, and not always in that case either. Finally with a lot of debug statements, many hours talking to Tuomo Penttinen of &lt;a href="http://www.herqq.org"&gt;HUpnp&lt;/a&gt; we fixed a little bug in his library.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; The reason the bug was present - MediaTomb was disconnecting my slave for connecting multiple times very very quickly. When it rejected the request, two slots were fired in the HUpnp code which caused multiple access's to certain data which should be modified only once... I'll spare the details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once that was fixed, I spent half a day getting the DLNA recommended meta-data being reported by the slave using custom UDSEntry fields. That was pretty easy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That pretty much finishes the slave's Browse() API, since fetching file's is delegated to the HTTP slave. The next step is Search().&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But I took a little break and started experimenting with Amarok's Collection code, which is &lt;b&gt;HUMONGOUS&lt;/b&gt; and complicated. I still haven't figured it out completely. Like why Collection::queryMaker() has too return a new instance of a QueryMaker sub class everytime, or how the Capabilities system works, but I'll get there in the end. The result for today is manually inserting a track into the collection. Ah, I do like &lt;i&gt;seeing&lt;/i&gt; progress:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/TADlrCj2dfI/AAAAAAAAAPo/W9vmGpY38qI/s1600/upnpslave1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 312px; height: 307px;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/TADlrCj2dfI/AAAAAAAAAPo/W9vmGpY38qI/s400/upnpslave1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5476629674466899442" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1884654486021427730?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1884654486021427730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/05/gsoc-week-2-experimenting-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1884654486021427730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1884654486021427730'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/05/gsoc-week-2-experimenting-with.html' title='GSoC Week 2: Experimenting with Collections'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_8YErdCHGKN8/TADlrCj2dfI/AAAAAAAAAPo/W9vmGpY38qI/s72-c/upnpslave1.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5330892070704945942</id><published>2010-05-21T15:00:00.000+05:30</published><updated>2010-05-23T09:40:14.164+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc10'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='upnp'/><title type='text'>GSoC Week 1: Kioslave is shaping up</title><content type='html'>&lt;div&gt;&lt;i&gt;(This post was published on Friday, but I put in a wrong tag and I didn't get aggregated, so, republished)&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Although I've been hacking on my GSoC project for quite a while, doing little experiments and getting my mind around various factors involved, this week was my first official coding period, since that was what I had in my timeline.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first piece to implement is the kioslave to browse UPnP MediaServers. This involves writing a parser for the DIDL-Lite XML format used to describe directory structures. The parser I developed this week can now parse containers and items and their titles and pass them on to the slave. Meta-data and extra tag handling isn't done yet, but I have time :) The slave scheme is upnp-ms and right now you have to pass the UUID. But once the network:// slave is modified, it should be seamless for normal users&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/S_ZVitcx18I/AAAAAAAAAPg/qqIADiEtrKQ/s1600/upnpslave.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 241px;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/S_ZVitcx18I/AAAAAAAAAPg/qqIADiEtrKQ/s400/upnpslave.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5473656451919632322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Their are a few issues I have to take care of in the slave. UPnP identifies all objects merely by a numeric ID. Now it wouldn't be fun to have the user deal with IDs. So the kioslave uses names just like normal file browsing. This involves reconversion back to the ID whenever I have to talk to the server. If the user manually types a URL to jump to some other point, I have no information about the IDs leading up to that location. So I've to implement some resolving. This is what I did this week. It is still a bit buggy, but I haven't figured out if the bug is in my code or HUpnp ( most likely my code ).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5330892070704945942?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5330892070704945942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/05/gsoc-week-1-kioslave-is-shaping-up.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5330892070704945942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5330892070704945942'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/05/gsoc-week-1-kioslave-is-shaping-up.html' title='GSoC Week 1: Kioslave is shaping up'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/S_ZVitcx18I/AAAAAAAAAPg/qqIADiEtrKQ/s72-c/upnpslave.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6245349408824485257</id><published>2010-05-13T21:21:00.000+05:30</published><updated>2010-05-13T21:24:42.665+05:30</updated><title type='text'>Wink</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/S-wguM-I4FI/AAAAAAAAAPY/FiserIqhlJ8/s1600/secret.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 119px; height: 39px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/S-wguM-I4FI/AAAAAAAAAPY/FiserIqhlJ8/s400/secret.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5470783625476235346" /&gt;&lt;/a&gt;&lt;br /&gt;;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6245349408824485257?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6245349408824485257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/05/wink.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6245349408824485257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6245349408824485257'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/05/wink.html' title='Wink'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8YErdCHGKN8/S-wguM-I4FI/AAAAAAAAAPY/FiserIqhlJ8/s72-c/secret.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-879484377364896820</id><published>2010-05-11T16:27:00.002+05:30</published><updated>2010-05-11T16:32:52.108+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='semester'/><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><category scheme='http://www.blogger.com/atom/ns#' term='interesting'/><title type='text'>This semester was... LEGEN-wait for it-DARY</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's been a week since the summer holidays, and that means another semester is behind me. Reflecting on the past two years of engineering, I would say that this semester has been the best 6 months of my life ever. I have changed (read: improved) in a hell of a lot of ways. I also dumped some of my inclination to always plan out the day and introduced some spontaniety. Just before the sem there was December, which meant FOSS.in and the rural internship. Both thrust me into the public all alone, resulting in an eye-opening experience. FOSS.in was a collection of geeks where for the first time I could talk to other people all day about technology and computers and meet lots of coders from around the country. From a wi-fi enabled, air-conditioned environment to a laid-back village in the middle of nowhere in 3 days. That was the beginning of my rural internship. Those 4 days in the village were quite boring, yet it also opened my eyes to what India was. It doesn't mean I am going to go and use ICT in a socially responsible manner -- It isn't as much fun as programming.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next up was Synapse. For the first time any piece of my code was being interacted with by hundreds of people, as my backend powered the registration and site navigation for the fest. I knew my code was very good ( definitely better than some code I had to look at for some events with specific websites ), and it felt good when the amount of junk IDs were a very small percentage of the total number of registrations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then just a day before Synapse was to begin, we had a 'Bazinga!' moment. The server room air conditioner caught fire, rendering the entire DA-IICT network infrastructure down for about a week. No Synapse website, no updates to do in the dead of the night, which meant I had 3 days off to enjoy :-). This also meant I finally had time to give my laptop for repairs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy I did. This Synapse was and will remain a very memorable one. We had a blast decorating the SAC for D-lounge. This involved hanging flags on the awnings by climbing a shaky ladder up to the first floor, then leaving both hands to unravel and hook up the flag. Next up was putting up a installation in the middle of the lotus pond. This required calling in a special-ops team as the pond was full of water. Which reminds me, someone has photos of the entire drama. That same rickety ladder was placed flat and one person sat on the end to keep it from toppling into the water. Then about five of us walked across to the first stage of the pond. Then the ladder was pulled across to the next level. Then me and tanmay passed over. After that the ladder was pulled back, and the artwork was passed over. Time for the final jump. The ladder was brought up all the way to the centre, and we literally pushed the canvas across it, hoping it wouldn't end up tearing or going in the water. Then we repeated the entire sequence to get back out. Fortunately, no one fell in, although two poor souls had to stand barefoot in the dirty water all this while.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8YErdCHGKN8/S-k4bvegYOI/AAAAAAAAAPQ/H1EsD0csLeM/s1600/lotuspond.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://2.bp.blogspot.com/_8YErdCHGKN8/S-k4bvegYOI/AAAAAAAAAPQ/H1EsD0csLeM/s400/lotuspond.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5469965271670218978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;(effort)&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally at 3am the task was done, or so we thought.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Synapse Day 1 - 10:30pm I had just finished the last lecture of the day, and wanted to go to Ahmedabad and get my laptop back. But a gust of wind had caused the installation to collapse. Which meant going back in again, this time much more easily and confidently, and sticking it into the ground using bamboos and nails.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Of course this isn't a post about Synapse, so I am going to jump ahead to day 2, which was all about Indian Ocean.&lt;/div&gt;&lt;div&gt;There is a secret to getting the best view at the Pro Nites in Synapse. Get into security, and know a lot of people. The concert was just a treat, well worth all the effort put into Synapse. It was mindblowing and perhaps only the video can capture most of it. They played some never before played songs which are to be released in movies soon. Yet Ma Rewa and Kandisa stole the show as usual. But the most important part is at the end. Once the concert was done we formed a cordon to let the guys get to their room. Now we weren't allowed in, but in an act of spontaneity I took of my Synapse T-shirt (right there!) and threw it in to the coordinator so he could get it signed. And then I *ran*, to the nearest bathroom which was still some 100 metres away :o Well it definitely paid of. In my closet is now a T-shirt signed by Amit Kilam from Indian Ocean. Finally there was the D-Lounge treasure hunt and the late night pool-playing. Ah... those were the days.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok, enough about Synapse. The other thing I do in DA-IICT is play football. This year has been a record in terms of the number of tournaments we've played. In the 3rd semester we went to Patan and had our very own Concours. Then we won the IPTG Petro Cup. And in March we went to BITS Pilani, Goa. I've been in top form ( if I should say so myself ) and improved tremendously in ball control and dribbling this semester. Although we lost in the first round, I was happy to hold my ground and not make any mistakes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And finally there was of course the Google Summer of Code result. I hadn't got in last year. But this time I had put in a *lot* of effort and would have been really disappointed if I didn't make it. But fortunately &lt;a href="http://kodeclutz.blogspot.com/2010/04/success-google-summer-of-code.html"&gt;I did&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now I just got my results, and I got an 8 out of 10 SPI, my lowest yet :-( All thanks to CT and EL, although it was my fault... Well you can't have everything.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-879484377364896820?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/879484377364896820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/05/this-semester-was-legen-wait-for-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/879484377364896820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/879484377364896820'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/05/this-semester-was-legen-wait-for-it.html' title='This semester was... LEGEN-wait for it-DARY'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_8YErdCHGKN8/S-k4bvegYOI/AAAAAAAAAPQ/H1EsD0csLeM/s72-c/lotuspond.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-453278022900864985</id><published>2010-04-27T10:46:00.002+05:30</published><updated>2010-04-27T11:57:24.116+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Success! Google Summer Of Code</title><content type='html'>Well after all the micro-blogging at night and the IRC chat, and writing an exam, here is a really good post!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The proposal is &lt;a href="http://socghop.appspot.com/gsoc/student_proposal/show/google/gsoc2010/nsm/t126992126573"&gt;Amarok and KDE UPnP Integration&lt;/a&gt;. I'll be working with mentor Bart Cerneels. This news was awesome!  Last year I didn't get in for kwin-tiling, but I participated in Season of KDE and did a few other contributions all year and it paid off. This year I started of quite early and worked hard on the proposal. When the ideas list went up, Amarok UPnP integration seemed the most interesting to me. Since then I was in talks with Bart and started a discussion on the Amarok mailing list, that much to my surprise, was very responsive :-)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now with the result out of the way, its time to start working as soon as my final exams get over this week. This will involve choosing a UPnP library and daemon for device discovery. The next step is to implement a KIO slave which can browse UPnP media servers like any other folder. The final thing will be to write an Amarok Collection which can index music on UPnP servers on the network. This involves filtering and sorting and also making the server play music when in the playlist :-), can't forget that. So its going to be a very eventful 3 months, with lots of commits, a T-shirt and lets not forget the money. Right now I'm waiting for the invitation to the private mailing list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It was great to hear some stats. KDE got 50 slots, 11 Indians got into KDE, and 3 from DA-IICT got into KDE. Which is awesome! Sai Dinesh will be working on getting mobile phones working nicely with KDE. &lt;a href="http://komplexadi.blogspot.com"&gt;Aditya Bhatt&lt;/a&gt; will be working on Digikam face recognition. Others I know are Varrun Ramani, working on Amarok too, implementing Distributed Collections. Vishesh Handa will be working on Nepomuk, and finally the one and only :) Shantanu Tushar on Gluon. Happy hacking everyone...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-453278022900864985?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/453278022900864985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/04/success-google-summer-of-code.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/453278022900864985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/453278022900864985'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/04/success-google-summer-of-code.html' title='Success! Google Summer Of Code'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5508137236569902905</id><published>2010-04-26T11:26:00.004+05:30</published><updated>2010-04-26T12:11:02.167+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='achievement'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>KWin tiling is merged</title><content type='html'>I'm glad to announce that yesterday the kwin-tiling branch was merged into kwin trunk by &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1118677"&gt;commit 1118677&lt;/a&gt;!. It will be available in KDE SC 4.5. Please keep in mind that it is an experimental feature with rough edges. Bug fixes are already on the way, but some things, like session saving and so on are absent. Please do add feature requests and bugs to &lt;a href="http://bugs.kde.org/"&gt;the KDE bug tracker&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;s&gt;This screencast should show off a few things. &lt;/s&gt; Apparently xvidcap produced really bad video, so I will have to do it again, watch out for updates here.&lt;br /&gt;&lt;br /&gt;Thanks to Martin Graesslin for being my mentor during Season of KDE, and all the others who bugged me with emails about when tiling would be integrated into KWin :)&lt;br /&gt;&lt;br /&gt;GSoC results now 13 hours away...&lt;br /&gt;&lt;br /&gt;( &lt;span style="font-style:italic;"&gt;Mamma, I'm not stressed out :-)&lt;/span&gt; )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5508137236569902905?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5508137236569902905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/04/kwin-tiling-is-merged.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5508137236569902905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5508137236569902905'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/04/kwin-tiling-is-merged.html' title='KWin tiling is merged'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6564507153750640973</id><published>2010-04-22T11:52:00.002+05:30</published><updated>2010-04-22T12:14:34.530+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='cool'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='node.js'/><category scheme='http://www.blogger.com/atom/ns#' term='nosql'/><category scheme='http://www.blogger.com/atom/ns#' term='redis'/><category scheme='http://www.blogger.com/atom/ns#' term='IM'/><category scheme='http://www.blogger.com/atom/ns#' term='hack'/><title type='text'>Quick and dirty Instant Messaging with Redis</title><content type='html'>&lt;i&gt;(Aside: Yes this is a post after a zillion years, but I have a few more lined up, and waiting for some important stuff in about a week)&lt;/i&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://code.google.com/p/redis"&gt;Redis&lt;/a&gt; is a wicked cool NoSQL database, in that storing stuff is not the only thing that it does. Mathias Meyer already has a &lt;a href="http://www.paperplanes.de/2010/2/16/a_collection_of_redis_use_cases.html"&gt;collection of Redis use cases&lt;/a&gt;, but this great idea is mine. Like all good ideas it emerged in the shower :) ( I was not aware of &lt;a href="http://chat.redis-db.com/"&gt;Pieter Noordhuis' MUC&lt;/a&gt; when I did this, in either case mine deals with one-to-one IM )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using the new &lt;a href="http://code.google.com/p/redis/wiki/PublishSubscribe"&gt;publish-subscribe&lt;/a&gt; commands and a bit of &lt;a href="http://nodejs.org"&gt;node.js&lt;/a&gt; code, &lt;a href="http://gist.github.com/374881"&gt;here is a tiny instant messaging server&lt;/a&gt;. An explanation follows, refer to the code while reading it, Blogger sucks for publishing code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is how it works. For every client, the server maintains two connections to redis. This is because a subscriber is not allowed to invoke other commands. So we have a subscriber connection and publisher connection. Consider two clients are now connected, Alice and Bob.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When Alice connects ( &lt;b&gt;NICK Alice&lt;/b&gt; ), we insert her nickname into 'mclarens:inside', a Redis set. This allows us to have a &lt;b&gt;WHO &lt;/b&gt;command to list online members. Bob to does the same. To start chatting with Alice, Bob initiates a conversation ( &lt;b&gt;TALKTO Alice&lt;/b&gt; ). The node server does none of its own client management. Instead each client just maintains subscriptions to two channels/classes. Each client is always subscribe to '[nick]:info', where it is notified of talk initiations and exits etc. When Bob wants to talk to Alice, he sends a 'start Bob' to Alice's info channel, 'Alice:info'. Then both Alice and Bob subscribe to the class 'Alice:Bob', using alphabetical order to decide the name. When either of them wants to talk to the other, they do MSG [nick] [message]. The connection uses the publish redis connection to send a message to the channel, resulting in both sides being notified of the incoming message.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To terminate the chat, one side just has to send a 'STOP [nick]'. That unsubscribes the user from the class so that he no longer receives messages. It also sends a 'stop [nick]' to the other side, so that he/she can also unsubscribe.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On QUIT, we simply remove ourselves from the mclarens:inside set, unsubscription is handled automatically by Redis!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's it, simple Instant Messaging! Now this lacks any kind of security and ignore lists and status but proves the point. In fact I'm thinking of using this as the backend for the IM part of the &lt;a href="http://github.com/nikhilm/palantir"&gt;XMPP server&lt;/a&gt; I'm hacking on. At this point it is in no shape to have this feature just yet, but it should some day.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Thanks to roidrage and tnm on #redis for pointing out that I had to use two Redis connections for PubSub.)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6564507153750640973?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6564507153750640973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/04/quick-and-dirty-instant-messaging-with.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6564507153750640973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6564507153750640973'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/04/quick-and-dirty-instant-messaging-with.html' title='Quick and dirty Instant Messaging with Redis'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1155024966015049699</id><published>2010-02-14T22:42:00.001+05:30</published><updated>2010-02-14T22:42:53.677+05:30</updated><title type='text'>Temporary-Post-Used-For-Style-Detection-Title-189623709</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Temporary-Post-Used-For-Style-Detection-Content-189623709&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1155024966015049699?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1155024966015049699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2010/02/temporary-post-used-for-style-detection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1155024966015049699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1155024966015049699'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2010/02/temporary-post-used-for-style-detection.html' title='Temporary-Post-Used-For-Style-Detection-Title-189623709'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8146135159521938664</id><published>2009-12-23T19:22:00.003+05:30</published><updated>2009-12-23T20:21:10.457+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='humour'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='microblog'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><title type='text'>#emo</title><content type='html'>A few years down the line, we will have little devices stuck on your cheeks monitoring facial expressions. And then they will tweet "nikhil is #laughing", "nikhil is #sad" and perhaps even "nikhil got #slapped" - The cult of microblogging...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8146135159521938664?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8146135159521938664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/emo.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8146135159521938664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8146135159521938664'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/emo.html' title='#emo'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2470746979399570292</id><published>2009-12-20T21:24:00.004+05:30</published><updated>2009-12-20T21:28:45.844+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='node.js'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>Trending</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/Sy5JMJzDMRI/AAAAAAAAAOM/7i7earMqQ6s/s1600-h/rpentomino2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 201px; height: 271px;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/Sy5JMJzDMRI/AAAAAAAAAOM/7i7earMqQ6s/s400/rpentomino2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5417347874910581010" /&gt;&lt;/a&gt;&lt;br /&gt;Twitter usually syncs with the (developed) world pretty fast in hashtags. But I'm surprised Copenhagen is not on it.&lt;br /&gt;&lt;br /&gt;To add some semblance of code: I've been mucking with &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; and some of the effect is &lt;a href="http://github.com/nikhilm/node-taglib"&gt;simple TagLib bindings&lt;/a&gt; with that being used for something more important soon. Much improved ( or rather simplified ) kwin-tiling too with a few regressions like moving and resizing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2470746979399570292?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2470746979399570292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/trending.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2470746979399570292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2470746979399570292'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/trending.html' title='Trending'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/Sy5JMJzDMRI/AAAAAAAAAOM/7i7earMqQ6s/s72-c/rpentomino2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-224066265188356629</id><published>2009-12-06T11:58:00.003+05:30</published><updated>2009-12-06T12:16:00.119+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss.in'/><title type='text'>Foss.in Day 4 and 5</title><content type='html'>foss.in day 4 gave me a chance to attend quite a few talks. In the morning Girish Ramakrishnan and Prashanth had a open session for anyone interested in Qt, so I got a few things clarified about MVC in Qt, and had a quick introduction to QGraphicsView ( I haven't got around to trying it yet ).&lt;br /&gt;&lt;br /&gt;Then I spent the afternoon compiling trunk, again with repeated power failures, until I finally had a &lt;strong&gt;really great&lt;/strong&gt; KDE desktop. I love the new Add Applet panel, the new netbook view for the desktop and other smooth effects. Qt Kinetic raises animation to a whole new level, check out the examples.&lt;br /&gt;&lt;br /&gt;Later I attended &amp;ldquo;Writing plugins for Qt Creator&amp;rdquo; &amp;mdash; another great feature I didn't know existed. What is with Qt and great software? Gopal introduced &lt;a href="http://en.wikipedia.org/wiki/LibJIT"&gt;libjit&lt;/a&gt;. But &lt;a href="http://bluesmoon.info/"&gt;Philip Tellis&lt;/a&gt; gave perhaps the best talk I've ever seen, with on the fly shell hacking to analyse Apache logs. It was true open source collaboration with the audience interjecting about sed options and redundancy, especially since Philip couldn't see all of the screen :). He also demonstrated some Javascript hacks and &lt;a href="http://developer.yahoo.com/yql/"&gt;YQL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On day 5, I had only a few hours there before catching my flight. I chose to implement &lt;a href="http://imgur.com"&gt;Imgur&lt;/a&gt; support for the Pastebin applet, which is now on the &lt;a href="http://reviewboard.kde.org/r/2324/"&gt;Reviewboard&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-224066265188356629?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/224066265188356629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-4-and-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/224066265188356629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/224066265188356629'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-4-and-5.html' title='Foss.in Day 4 and 5'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3859793563476165038</id><published>2009-12-06T11:51:00.002+05:30</published><updated>2009-12-06T11:57:01.931+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss.in'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Foss.in Day 3</title><content type='html'>This was KDE Project of the Day at foss.in/2009&lt;br /&gt;&lt;br /&gt;This was best &lt;em&gt;captured&lt;/em&gt; by Sujith, so you should &lt;a href="http://sujithh.info/2009/12/kde-project-of-the-day-foss-in2009-day-3/"&gt;go there&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://22bits.exofire.net/downloads/foss_in_KDE_mainwindow.pdf"&gt;My slides&lt;/a&gt; &amp;ldquo;My next KDE application&amp;rdquo;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3859793563476165038?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3859793563476165038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3859793563476165038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3859793563476165038'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-3.html' title='Foss.in Day 3'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3305290301829460592</id><published>2009-12-06T11:38:00.002+05:30</published><updated>2009-12-06T11:50:25.533+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss.in'/><title type='text'>Foss.in Day 2</title><content type='html'>( &lt;em&gt;Forgive the past/present tense conflicts&lt;/em&gt; )&lt;br /&gt;&lt;br /&gt;My computer started behaving oddly ( again ) today. It has a tendency to randomly shut off once in a while. I'm not sure if it is due to over heating or some issue with the power supply. This is interrupting a lot of my compiles or svn updates. The rest of the KDE dev gang arrived today &amp;mdash; Akarsh, Prakash, Sujith and Kashyap.&lt;br /&gt;&lt;br /&gt;My laptop is now &lt;s&gt;desecrated&lt;/s&gt;decorated with a KDE bumper sticker, and I have a KDE sweatshirt I can't wait to try on. foss.in is turning out to be a great investment :D, what with trying out the Nokia N900 and having my first ever Wi-Fi experience.&lt;br /&gt;&lt;br /&gt;The rest of the day was spent in fixing up the slides, getting code to compile and having a final meeting to decide the course of the next day, the KDE Project of the Day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3305290301829460592?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3305290301829460592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3305290301829460592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3305290301829460592'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-2.html' title='Foss.in Day 2'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9103881906341757877</id><published>2009-12-06T11:27:00.004+05:30</published><updated>2009-12-06T11:50:55.939+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='foss.in'/><title type='text'>Foss.in Day 1</title><content type='html'>( &lt;em&gt;This series of posts was published on 6th Dec 2009, but written almost daily&lt;/em&gt; )&lt;br /&gt;Today was the first day of foss.in and although getting to the place was a bit of a hassle due to everything new, I did get there on time. A great opening by Atul Chitnis formally started foss.in. Chana masala was the first thing on my mind after that since I hadn't eaten in hours. After that I finally met some KDE guys, &lt;a href="http://ftbfs.wordpress.com/"&gt;Kartik Mistry&lt;/a&gt;, &lt;a href="http://twitter.com/pradeepto"&gt;Pradeepto&lt;/a&gt; and &lt;a href="http://www.shantanutushar.com/"&gt;Shantanu&lt;/a&gt;, Santosh, Madhusudan and more. So we spent the next 4 hours at the KDE booth setting up flyers, stickers and other schwag to get people into KDE ( yes we at KDE bribe people to contribute :p ). So I have three KDE badges and one sticker on my foss.in entry pass.&lt;br /&gt;&lt;br /&gt;Incidentally the release of Qt 4.6.0 coincided with day 1 of foss.in. With so many KDE guys around I decided it was time to rebuild kde trunk from scratch after almost two months. Behold the power of &lt;code&gt;git daemon&lt;/code&gt;, I just copied qt-kde and ready to go.&lt;br /&gt;&lt;br /&gt;I finally took some time off and attended &lt;a href="http://artagnon.com/"&gt;Ramkumar's&lt;/a&gt; Haskell talk. The guy really knows his functional programming !&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dimitris.glezos.com/"&gt;Dimitris Glezos&lt;/a&gt; was the first keynote speaker, he talked about building a disruptive open source project and sticking to the goal.&lt;br /&gt;&lt;br /&gt;( &lt;em&gt;Which reminds me, I should get someone to list my name in the speakers when all the PotD's get their slides attached&lt;/em&gt; )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9103881906341757877?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9103881906341757877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9103881906341757877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9103881906341757877'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/12/fossin-day-1.html' title='Foss.in Day 1'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4254113363993568167</id><published>2009-11-26T17:40:00.002+05:30</published><updated>2009-11-26T17:46:08.415+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='inotify'/><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='notifications'/><title type='text'>Automatic builds with some inotify magic</title><content type='html'>The &lt;a href="http://en.wikipedia.org/wiki/Inotify"&gt;inotify&lt;/a&gt; feature in the linux kernel allows you to receive events about changed files. Using &lt;a href="http://trac.dbzteam.org/pyinotify"&gt;pyinotify&lt;/a&gt;, here is a simple script to watch for changes to source code and run "make". Everything is hard coded right now, and since I was using &lt;a href="http://cmake.org"&gt;CMake&lt;/a&gt; with out-of-source builds, the directory structure is that way. It also uses the command line notify-send tool to display notifications. Perhaps some day I will make it configurable and more useful.&lt;br /&gt;&lt;br /&gt;Cheers.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# Notification tool&lt;br /&gt;# Run with the directory to watch&lt;br /&gt;# currently hardcoded to use &lt;br /&gt;#&lt;br /&gt;# +&lt;br /&gt;# |- src - contains source code and is monitored&lt;br /&gt;# |- build - assumes build to be here&lt;br /&gt;#&lt;br /&gt;# (c) 2009, Nikhil Marathe &lt;nsm.nikhil@gmail.com&gt;&lt;br /&gt;# Licensed under the MIT License&lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;import os&lt;br /&gt;import subprocess&lt;br /&gt;import re&lt;br /&gt;from pyinotify import WatchManager, Notifier, ProcessEvent, IN_MODIFY&lt;br /&gt;&lt;br /&gt;wm = WatchManager()&lt;br /&gt;&lt;br /&gt;class Compile( ProcessEvent ):&lt;br /&gt;    def process_IN_MODIFY( self, event ):&lt;br /&gt;        print event.path, event.name, event.mask &amp; IN_MODIFY&lt;br /&gt;&lt;br /&gt;        if re.match( '[a-zA-Z]*.cpp', event.name ):&lt;br /&gt;            os.chdir( event.path.replace( 'src', 'build' ) )&lt;br /&gt;            ex = subprocess.call( 'make' )&lt;br /&gt;            subprocess.call( ['notify-send', "Build output", "%s" % ( ex == 0 and "Success" or "Error" )] )&lt;br /&gt;&lt;br /&gt;c = Compile()&lt;br /&gt;notifier = Notifier( wm, c )&lt;br /&gt;wm.add_watch( sys.argv[1], IN_MODIFY, rec=True )&lt;br /&gt;&lt;br /&gt;notifier.loop()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4254113363993568167?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4254113363993568167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/11/automatic-builds-with-some-inotify.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4254113363993568167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4254113363993568167'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/11/automatic-builds-with-some-inotify.html' title='Automatic builds with some inotify magic'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6269567395808288159</id><published>2009-11-21T23:28:00.002+05:30</published><updated>2009-11-21T23:30:37.624+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Worse is Better</title><content type='html'>&lt;a href="http://codehale.com"&gt;Code Hale&lt;/a&gt; shows that sometimes &lt;a href="http://codahale.com/a-lesson-in-timing-attacks/"&gt;performance needs to be sacrificed for security&lt;/a&gt;. Premature optimisation is the root of evil :p&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6269567395808288159?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6269567395808288159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/11/worse-is-better.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6269567395808288159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6269567395808288159'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/11/worse-is-better.html' title='Worse is Better'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2647753747607903756</id><published>2009-11-07T23:18:00.003+05:30</published><updated>2009-11-07T23:30:47.127+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Chrome: Little UI touches</title><content type='html'>I forgot to mention that I made a &lt;s&gt;life changing decision&lt;/s&gt; change of browser about 2 weeks ago. I've been exclusively on &lt;a href="http://www.google.com/chrome/"&gt;Chrome&lt;/a&gt; ever since. I love the minimalist look, the great search features for downloads and the best feature is perhaps Ctrl+PgUp/Dn to switch tabs. Its also very fast on shutdown and startup compared to my firefox, almost Firebug like Developer Tools, really awesome view-source: component ( inspired by kio? ). I love the fact that I can kill some flash/java applet without crashing the browser. So fellow &lt;a href="http://www.archlinux.org"&gt;archers&lt;/a&gt; go and grab the &lt;a href="http://aur.archlinux.org/packages.php?ID=27031"&gt;PKGBUILD&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But the really interesting thing I noticed today is this:&lt;br /&gt;&lt;br /&gt;Hide the bookmarks toolbar. Open a new tab. In SpeedDial, notice how the bookmarks are shown at the top. Now show the bookmarks toolbar. Voila, bookmarks are hidden.&lt;br /&gt;&lt;br /&gt;As for the firefox plugins, well I don't miss any of them yet, except for the Delicious plugin, which I try to compensate for using the bookmarklet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2647753747607903756?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2647753747607903756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/11/chrome-little-ui-touches.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2647753747607903756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2647753747607903756'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/11/chrome-little-ui-touches.html' title='Chrome: Little UI touches'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8781886974365886366</id><published>2009-11-02T16:19:00.003+05:30</published><updated>2009-11-02T16:28:49.252+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='code snippet'/><category scheme='http://www.blogger.com/atom/ns#' term='design pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='observer'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>Macros for Observers</title><content type='html'>Here are two little macros too make implementing the Observer design pattern less repetitive. This is C++&lt;br /&gt;&lt;br /&gt;File: observermacros.h&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;#ifndef DDM_OBSERVERMACRO_H&lt;br /&gt;#define DDM_OBSERVERMACRO_H&lt;br /&gt;&lt;br /&gt;#define MAKE_OBSERVABLE( obscls ) \&lt;br /&gt;    private:\&lt;br /&gt;        std::list&lt; obscls *&gt; m_observers;\&lt;br /&gt;    public:\&lt;br /&gt;        void addObserver( obscls *obs ) {\&lt;br /&gt;            m_observers.push_back( obs );\&lt;br /&gt;        }\&lt;br /&gt;        void delObserver( obscls *obs ) {\&lt;br /&gt;            m_observers.remove( obs );\&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;#define NOTIFY( obscls, obsmethod, argument ) \&lt;br /&gt;        for( std::list&lt;obscls *&gt;::const_iterator it = m_observers.begin();\&lt;br /&gt;                it != m_observers.end(); it++ )\&lt;br /&gt;            (*it)-&gt;obsmethod( argument )&lt;br /&gt;    &lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now if you want a class to be observable do&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include "observermacros.h"&lt;br /&gt;&lt;br /&gt;class NeedsObserving&lt;br /&gt;{&lt;br /&gt;    MAKE_OBSERVABLE( Observes );&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Observes is the name of the class which will observe NeedsObserving.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;// add/del observers&lt;br /&gt;NeedsObserving no;&lt;br /&gt;Observes o = new Observes;&lt;br /&gt;no.addObserver( o );&lt;br /&gt;no.delObserver( o );&lt;br /&gt;&lt;br /&gt;// To notify observers of changes&lt;br /&gt;&lt;br /&gt;void NeedsObserving::didSomething()&lt;br /&gt;{&lt;br /&gt;    // CoolThing *coolThing is modified/used here&lt;br /&gt;    // ...&lt;br /&gt;    NOTIFY( Observes, coolThingDone, coolThing );&lt;br /&gt;    // Calls Observes::coolThingDone( CoolThing * );&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The code is pretty naive, but it might help. Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8781886974365886366?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8781886974365886366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/11/macros-for-observers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8781886974365886366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8781886974365886366'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/11/macros-for-observers.html' title='Macros for Observers'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6292436311805868980</id><published>2009-10-24T19:49:00.004+05:30</published><updated>2009-10-24T19:55:38.403+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ieeextreme'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='stupid'/><title type='text'>Spectacular failure ( success? ) at IEEEXtreme</title><content type='html'>Solved 2/12 problems in the first set successfully. Tried to solve 2 more, but not accepted. Can't take the straight concentration anymore. I'm hungry, dropping the contest. This was more appropriate for twitter, but I don't have an account. :o&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6292436311805868980?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6292436311805868980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/10/spectacular-failure-success-at.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6292436311805868980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6292436311805868980'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/10/spectacular-failure-success-at.html' title='Spectacular failure ( success? ) at IEEEXtreme'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3712510896357891936</id><published>2009-10-22T16:22:00.004+05:30</published><updated>2009-10-22T17:10:01.815+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Non-trivium</title><content type='html'>When you don't post for a long time, it usually means you have nothing interesting to do. But for me it usually means that I have a lot of things to do. And the last month have been horrible in terms of &lt;strong&gt;free time&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;We had a really great one day trip to &lt;a href="http://en.wikipedia.org/wiki/Diu"&gt;Diu&lt;/a&gt;, but from then on, it was all underhill :)&lt;br /&gt;&lt;br /&gt;You might want to check out the &lt;a href="http://synapse.daiict.ac.in/"&gt;Synapse website&lt;/a&gt; which was crafted from scratch with a little &lt;a href="http://www.codeigniter.com/"&gt;help&lt;/a&gt; &lt;a href="http://dennygeorge-abrain.blogspot.com/"&gt;from&lt;/a&gt; &lt;a href="http://www.midorijs.com/"&gt;these&lt;/a&gt; &lt;a href="http://www.devpro.it/bytefx/"&gt;guys&lt;/a&gt;. This was done under constant pressure of the not so great marks I received in the first midsem exam and the looming second insem, so I applaud myself.&lt;br /&gt;&lt;br /&gt;This was accompanied by Concours 09, the first time DA-IICT ever held an inter-college sports fest. We reached the finals and lost! (in football). But now the exams were just a week away.&lt;br /&gt;&lt;br /&gt;This exam week was the worst of my short stint in DA. Never before have I skipped football for 5 days straight. And the woozy feeling in the head when I soaked up about 1024Kb worth of signals and systems and put more than half out on the paper. This followed by Algebraic Structures meant that I was with &lt;a href="http://en.wikipedia.org/wiki/Tic"&gt;tics&lt;/a&gt; for the whole day. Whoo what a semester this is turning out to be...&lt;br /&gt;&lt;br /&gt;Thankfully I've been home for almost a week now, enjoying great food after quite some time. But my football holiday is now up to 15 days! I have hacked on the Synapse registration, read 3 chapters of Programming Scala, watched the &lt;a href="http://pycon.blip.tv/file/1996136/"&gt;first part of A curious course on Concurrency and Coroutines&lt;/a&gt;, submitted a first code review of kwin-tiling, and procrastinated on some other things. Through all this I also read a few books, and watched the first 5 episodes of Heroes Season 4. That was a lot of stuff in retrospect. Meanwhile FOSS.in is starting to pick up steam and I'm looking forward to when the registration for simple attendance begins.&lt;br /&gt;&lt;br /&gt;I'm also on the look-out for &lt;a href="http://mm.ilug-bom.org.in/pipermail/linuxers/Week-of-Mon-20091019/068922.html"&gt;an internship&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the next 48 hours, its back to DA, and time to get cracking on &lt;a href="http://ewh.ieee.org/ieee/xtreme/"&gt;IEEEXtreme&lt;/a&gt;, at which I am going to fail miserably, since I don't get time to do pure algorithm practice.&lt;br /&gt;&lt;br /&gt;And I thought I was on a holiday :(&lt;br /&gt;&lt;br /&gt;PS: I wish some one would sponsor me to go to &lt;a href="http://camp.kde.org/"&gt;Camp KDE&lt;/a&gt; or atleast Akademy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3712510896357891936?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3712510896357891936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/10/non-trivium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3712510896357891936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3712510896357891936'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/10/non-trivium.html' title='Non-trivium'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8749915031752578658</id><published>2009-09-26T23:37:00.004+05:30</published><updated>2009-09-26T23:43:26.078+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='osid'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>KDE introductory talk</title><content type='html'>The &lt;a href="http://groups.google.com/group/osid"&gt;Open Source Initiative in DA-IICT&lt;/a&gt; is our effort to get more students interested in open source, and get them to start contributing to projects. As part of that I evangelized KDE, showed off our cool apps, and demonstrated how Krunner + Kwin + Plasma come together to improve productivity a LOT. Here are the slides, Unfortunately my notes were handwritten, so you can't glean much from here. But someone else might be able to use it ( please attribute it to me though, thanks ).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nsm.nikhil.googlepages.com/kdeintro.pdf"&gt;Download the slides ( pdf, 461k )&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8749915031752578658?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8749915031752578658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/09/kde-introductory-talk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8749915031752578658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8749915031752578658'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/09/kde-introductory-talk.html' title='KDE introductory talk'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4124135392511124825</id><published>2009-08-24T23:15:00.002+05:30</published><updated>2009-08-24T23:29:28.983+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>Tiling screencast</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&lt;object height="350" width="425"&gt;&lt;param value="http://youtube.com/v/faOQAgapQYQ" name="movie"&gt;&lt;embed type="application/x-shockwave-flash" src="http://youtube.com/v/faOQAgapQYQ" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;p&gt;With a lot of requests to see tiling in action, I've uploaded &lt;span style="font-weight: bold;"&gt;my first ever video&lt;/span&gt;. Unfortunately I couldn't get my microphone to work. There are also a few glitches, forgive me for that.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4124135392511124825?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4124135392511124825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/08/tiling-screencast_24.html#comment-form' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4124135392511124825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4124135392511124825'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/08/tiling-screencast_24.html' title='Tiling screencast'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3559393541501333325</id><published>2009-08-21T20:07:00.002+05:30</published><updated>2009-08-21T20:18:13.880+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>Dynamic layouts are here</title><content type='html'>kwin-tiling now features dynamic layout switching per desktop. Use Meta+PgUp for Columns and Meta+PgDn for Spiral. Watch the windows change their place on the fly!&lt;br /&gt;&lt;br /&gt;A few bugs in both the layouts are also fixed. Overall kwin-tiling is pretty stable for now, so give it a whirl and notify me of any bugs you can find.&lt;br /&gt;&lt;br /&gt;What it still lacks is Xinerama awareness, but otherwise its virtually feature complete for the first release.&lt;br /&gt;&lt;br /&gt;Unfortunately since college has begun I've been able to work on Kwin for only a few hours a week, so progress is a bit slow.&lt;br /&gt;&lt;br /&gt;But the good news is that since GSoC is over, we should start seeing loads of new features being integrated into trunk/ to play around with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3559393541501333325?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3559393541501333325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/08/dynamic-layouts-are-here.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3559393541501333325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3559393541501333325'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/08/dynamic-layouts-are-here.html' title='Dynamic layouts are here'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6024657103090324602</id><published>2009-08-02T11:26:00.002+05:30</published><updated>2009-08-02T11:38:12.287+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='version control'/><category scheme='http://www.blogger.com/atom/ns#' term='cq'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='vcs'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Introducing Cq</title><content type='html'>&lt;a href="http://bitbucket.org/nikhilm/cq/"&gt;Cq ( Commit Queue )&lt;/a&gt; is a bridge between &lt;a href="http://mercurial.selenic.com"&gt;Mercurial&lt;/a&gt; and &lt;a href="http://subversion.tigris.org"&gt;Subversion&lt;/a&gt;. Its whole objective is to allow you to work offline on Subversion repositories, but continue doing atomic commits. Useful when you are on the move and don't have internet access.&lt;br /&gt;&lt;br /&gt;The premise is that you copy the working copy into a Mercurial repository. Hack away in the repository, and commit to the repository. Once you are back online, run cq commit to actually commit the changes to the Subversion repository. So it keeps track of commit messages and diffs using Mercurial hooks.&lt;br /&gt;&lt;br /&gt;This is not stable software yet, and shouldn't be used for critical code. That said, it definitely won't delete any code unless you tell it to. I also have no idea how this will interact with mercurial branches or some uncommon svn operations. Get it from &lt;a href="http://bitbucket.org/nikhilm/cq"&gt;Bitbucket&lt;/a&gt; and read the &lt;a href="http://bitbucket.org/nikhilm/cq/src/tip/README"&gt;README&lt;/a&gt; to use Cq. You can fork it or send patches or feature requests on Bitbucket or email.&lt;br /&gt;&lt;br /&gt;(KDE folks might be interested in this)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6024657103090324602?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6024657103090324602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/08/introducing-cq.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6024657103090324602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6024657103090324602'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/08/introducing-cq.html' title='Introducing Cq'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3648731082842351049</id><published>2009-07-29T07:32:00.003+05:30</published><updated>2009-07-29T07:53:13.372+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Hello Planet</title><content type='html'>( One of my entries already got aggregated, but this is the traditional introduction )&lt;br /&gt;&lt;br /&gt;Hello KDE people! My name is Nikhil Marathe. I'm a relatively new KDE developer ( ~3 months ), currently working on &lt;a href="http://websvn.kde.org/branches/work/kwin-tiling"&gt;implementing tiling in kwin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I started using KDE when I switched to ( what was ) Mandrake in 2001. I think it was KDE 3.2. Well I loved it, and have stuck with KDE ever since, following every release with great excitement. But I never considered myself able enough to hack the code. But it seems all those years of learning paid off, and motivation come in the form of Google's Summer of Code. Unfortunately tiling support didn't get a slot, but I decided to implement it anyway. And now it's &lt;a href="http://kodeclutz.blogspot.com/2009/06/kwin-preliminary-tiling.html"&gt;coming&lt;/a&gt; &lt;a href="http://kodeclutz.blogspot.com/2009/06/kwin-tree-based-tiling.html"&gt;along&lt;/a&gt; &lt;a href="http://kodeclutz.blogspot.com/2009/07/little-things-screw-up.html"&gt;just&lt;/a&gt; &lt;a href="http://kodeclutz.blogspot.com/2009/07/kwin-tiling-progress.html"&gt;fine&lt;/a&gt;. Thanks to Martin (mgraesslin), my mentor, for his guidance and &lt;a href="http://afterclap.com"&gt;Jonathan&lt;/a&gt; for his early interest in the code.&lt;br /&gt;&lt;br /&gt;So a little bit about myself. I'm 18 years old. I'm an Indian. I'm currently in the 2nd year of the undergraduate course at &lt;a href="http://www.daiict.ac.in"&gt;DA-IICT&lt;/a&gt;. Though I'm currently in &lt;a href="http://en.wikipedia.org/wiki/Gandhinagar"&gt;Gandhinagar&lt;/a&gt;, I'm a &lt;a href="http://en.wikipedia.org/wiki/Mumbai"&gt;Mumbai&lt;/a&gt; boy through and through.&lt;br /&gt;&lt;br /&gt;When I'm not &lt;a href="http://22bits.exofire.net/browse/code"&gt;hacking away&lt;/a&gt; I usually read or play football.&lt;br /&gt;&lt;br /&gt;Thats it. I hope to keep contributing to KDE for &lt;strong&gt;many&lt;/strong&gt; more years. I remember when I used to read the Planet wondering whether I would ever feature on it. Some dreams do come true!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3648731082842351049?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3648731082842351049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/07/hello-planet.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3648731082842351049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3648731082842351049'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/07/hello-planet.html' title='Hello Planet'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5910065890353197557</id><published>2009-07-28T17:37:00.002+05:30</published><updated>2009-07-28T17:46:13.282+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde4'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>KWin tiling progress</title><content type='html'>Between yesterday and today I made quite a lot of changes in kwin-tiling. Layouts now have a superclass which manages certain things. &lt;strong&gt;Each desktop now has its own layout&lt;/strong&gt;. The root tile is no longer stored directly by the workspace, instead the workspace stores layouts for each desktop. For now each desktop has the Spiral layout, but it should be possible to dynamically change layouts for each desktop a few weeks down the line. Right now the plan is to fix certain layout issues ( such as spiral not understanding when a window is removed and adjusting the next one properly ).&lt;br /&gt;&lt;br /&gt;The other major change is that cross virtual desktop moving is now supported. This was a major problem when it first arose, but once the first change was implemented, it was simply a matter of removing a tile from the old desktop and adding it to the new desktop.&lt;br /&gt;&lt;br /&gt;There is no screenshot because none of these changes can be shown in a static image. But you can always try using the branch!&lt;br /&gt;&lt;br /&gt;In other news I'm back in college. The third semester began yesterday, which means development time is now seriously down. I hacked on a (cool?) tool in the last two weeks, and I'll be announcing that soon. I'm also planning to add my blog to &lt;a href="http://planetkde.org"&gt;PlanetKDE&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5910065890353197557?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5910065890353197557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/07/kwin-tiling-progress.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5910065890353197557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5910065890353197557'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/07/kwin-tiling-progress.html' title='KWin tiling progress'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9181912725730340240</id><published>2009-07-16T15:45:00.001+05:30</published><updated>2009-07-16T15:55:20.468+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='half-blood prince'/><category scheme='http://www.blogger.com/atom/ns#' term='harry potter'/><category scheme='http://www.blogger.com/atom/ns#' term='movie'/><title type='text'>Harry Potter and the Half-Baked Prince</title><content type='html'>I've just returned from watching the Half Blood Prince, and it was a mess. I don't know what they were playing at, but I've never seen a worse Potter movie. The linear plot is suffocating. While the movie begins with somewhat of a bang, the rest of it proceeds at some enforced speed limit, leaving no climatic or anti-climatic moments. In addition some of the key characters are missing or have such restricted roles that is it disgusting to watch ( the Dursleys, Neville Longbottom ). In addition Harry actually seems to be supporting the Ministry. The lack of Rufus Scrimgeour even prevents him from being Dumbledore's man through-and-through. Ron Weasley is made somewhat of a tag-along for the Harry-Hermione pair. It seems they were trying to put forth the idea of a Harry-Hermione pair, but that is ruined by the obvious Harry-Ginny romance throughout the movie. The only point where Ron does something is to play Quidditch.&lt;br /&gt;&lt;br /&gt;Speaking of Quidditch, if you expected a nice match like the first three movies, you will instead be treated to the 7 Great Saves of Ronald Weasley.&lt;br /&gt;&lt;br /&gt;Darkness is indeed rising, but that does not mean that the Order of the Phoenix do nothing while Death Eaters abound. It was somewhat of a joke to see Arthur, Tonks and Lupin running (yes!), when Harry and Ginny are trapped by the Death Eaters. But wait a minute, what is Bellatrix doing at the Burrow, and how does it just burn down. Wasn't it given the most protection by the Ministry of Magic?&lt;br /&gt;&lt;br /&gt;It was also surprising to see the absence of the Order and Dumbledore's army at the Lightning Struck Tower ( or Dumbledore's tower as in the movie ). Meanwhile Harry stands around like some idiot while the Death Eaters and Dumbledore have a chat.&lt;br /&gt;&lt;br /&gt;The Half Blood Prince was essentially meant to explain Voldemort's past, the story of the Gaunts, and hints to the Deathly Hallows. All of this is pushed aside and replaced by two tiny memories of the orphanage and Horace Slughorn. The ring has no mention of the Peverell coat of arms, nor physically nor in speaking.&lt;br /&gt;&lt;br /&gt;If deviations from the book are not enough, David Yates failure to capture key moments was particularly visible. The kissing scene is just pathetic, the fear in the Wizarding world seems to be totally absent and the whole lake scene was just too lame. There is no palpable sense of magic about the cave ( quartz isn't magical you know ), nothing special in the potion ( it looks like water ) and the return to Hogwarts is far too easy. Dumbledore's death is very very underplayed. There is no dead silence, no grief in any of the characters except for a few unnatural tears.&lt;br /&gt;&lt;br /&gt;Overall every scene seems to have some kind of half-heartedness in its execution. The only thing the movie has going for it is the comedy and some of the romance. The fixation with feet is also a bit annoying. Who the hell ties their boyfriend's shoelaces? Since the previous movie Hogwarts seems to have become just another Muggle school, with robes hardly ever being worn. I think that HBP will only do well because it is riding on the success of the earlier movies. But do not expect book fans to come out satisfied. This is the only Potter movie which doesn't leave you with a sense of magic when you get out of the theater. I don't know how it has received brilliant pre-release reviews but apparently the reviewers seem to have seen the movie as some disconnected one of a kind event, but it fails to capture Harry Potter, the story as well as the phenomenon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9181912725730340240?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9181912725730340240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/07/harry-potter-and-half-baked-prince.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9181912725730340240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9181912725730340240'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/07/harry-potter-and-half-baked-prince.html' title='Harry Potter and the Half-Baked Prince'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-5372259665987929605</id><published>2009-07-13T20:02:00.002+05:30</published><updated>2009-07-13T20:11:24.506+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde4'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>The little things screw up</title><content type='html'>I had this really weird bug in kwin for half a week. When you started resizing windows, all of them would start dancing about the screen. There would be little gaps between them and so on. And I couldn't figure out why. So today I finally tried comparing ( x + width ) and ( right ) of a window. Turns out they are always off by one. So to the &lt;a href="http://doc.qtsoftware.com/4.5/qrect.html#right"&gt;QRect::right()&lt;/a&gt; documentation:&lt;br /&gt;&lt;blockquote&gt;Returns the x-coordinate of the rectangle's right edge.&lt;br /&gt;&lt;br /&gt;Note that for historical reasons this function returns &lt;strong&gt;left() + width() - 1&lt;/strong&gt;; use x() + width() to retrieve the true x-coordinate.&lt;/blockquote&gt;&lt;br /&gt;Argh! That ( and bottom() ) was causing the mess. What a relief.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-5372259665987929605?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/5372259665987929605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/07/little-things-screw-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5372259665987929605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/5372259665987929605'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/07/little-things-screw-up.html' title='The little things screw up'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8682548403094461163</id><published>2009-07-07T21:57:00.003+05:30</published><updated>2009-07-07T22:03:54.280+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kwin kde kde4'/><title type='text'>KWin dynamic resizing and the first layout</title><content type='html'>After a short break due to various other responsibilities and a general lack of clarity in planning some of the code, I've made progress and now you can resize windows while in tiling mode and watch all the others adjust themselves to fit the screen. Admittedly there are a few kinks, and an annoying bug where the resize pointer suddenly makes the window super-tiny, but they should be fixed in two or three days. I also implemented a basic Spiral layout today which keeps halving windows and moves towards the centre in a spiral. Gradually layouts will be in the form of a plugin system, and you would be able to choose different layouts for each virtual desktop. Here is the latest screenshot. House of Cards it is.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/SlN4YQZabEI/AAAAAAAAAMA/JCO10l2XNO4/s1600-h/spiral.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/SlN4YQZabEI/AAAAAAAAAMA/JCO10l2XNO4/s400/spiral.png" alt="" id="BLOGGER_PHOTO_ID_5355756739987401794" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8682548403094461163?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8682548403094461163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/07/kwin-dynamic-resizing-and-first-layout.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8682548403094461163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8682548403094461163'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/07/kwin-dynamic-resizing-and-first-layout.html' title='KWin dynamic resizing and the first layout'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_8YErdCHGKN8/SlN4YQZabEI/AAAAAAAAAMA/JCO10l2XNO4/s72-c/spiral.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4150334464951337885</id><published>2009-06-22T17:43:00.005+05:30</published><updated>2009-06-22T18:22:54.816+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde4'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>KWin tiling ratios and orientations...</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/Sj9-OF9L9uI/AAAAAAAAALc/gttPOn491Is/s1600-h/tiling.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/Sj9-OF9L9uI/AAAAAAAAALc/gttPOn491Is/s400/tiling.png" alt="" id="BLOGGER_PHOTO_ID_5350133662921520866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;... now with minimize support.&lt;br /&gt;&lt;br /&gt;KWin tiling has been proceeding forward at a steady rate. If you check out the latest revision, you will not only have a pretty stable experience, but will also get a design document for free.&lt;br /&gt;&lt;br /&gt;So orientation is horizontal and vertical, and ratio is how much space the left child gets. Using these two properties I expect to be able to do most layouts. For now you can use D-BUS calls to actually use tiling pretty well.&lt;br /&gt;&lt;br /&gt;Here are the calls&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;qdbus org.kde.kwin /KWin slotToggleOrientation&lt;br /&gt;qdbus org.kde.kwin /KWin slotSetRatio &amp;lt;float&amp;gt; # between 0 and 1&lt;br /&gt;qdbus org.kde.kwin /KWin dumpTiles  # get a nice tree if you have debugging enabled and visible&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Some applications will cause trouble. Especially some plasma widgets and Kruler aren't setting the right window attributes, so I can't exempt them from tiling. So don't launch panel settings or Kickoff menu, it won't look so well.&lt;br /&gt;&lt;br /&gt;Minimize and restore works now, it will keep track of where the window was before you minimized it and put it back there.&lt;br /&gt;&lt;br /&gt;Please leave feedback about bugs here or on the KWin mailing list, it will be appreciated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4150334464951337885?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4150334464951337885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-tiling-ratios-and-orientations.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4150334464951337885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4150334464951337885'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-tiling-ratios-and-orientations.html' title='KWin tiling ratios and orientations...'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_8YErdCHGKN8/Sj9-OF9L9uI/AAAAAAAAALc/gttPOn491Is/s72-c/tiling.png' height='72' width='72'/><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4418993229961413315</id><published>2009-06-10T17:35:00.002+05:30</published><updated>2009-06-10T17:44:37.279+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>Kwin : tree based tiling</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/Si-jgLIJyRI/AAAAAAAAALM/kwfIqTUddXU/s1600-h/snapshot1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/Si-jgLIJyRI/AAAAAAAAALM/kwfIqTUddXU/s400/snapshot1.png" alt="" id="BLOGGER_PHOTO_ID_5345671055850195218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the quest to implement tiling in KWin, I've decided to use binary trees as an internal representation. This morning, I hacked on it to produce a decent prototype, just to check if the idea would work well enough, without introducing too much complexity in the code. At the moment, it does tend to crash or have repaint issues once in a while. But it works, and it does what tiling is supposed to do. Of course there is a lot to do yet. Moving and Resizing remain particularly icky because so many choices about what is good as a default, what is expected, how to implement it, will have to be made. If you are adventurous enough to try the kwin-tiling branch, do not move the windows, or basically abuse it in anyway :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4418993229961413315?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4418993229961413315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-tree-based-tiling.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4418993229961413315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4418993229961413315'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-tree-based-tiling.html' title='Kwin : tree based tiling'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8YErdCHGKN8/Si-jgLIJyRI/AAAAAAAAALM/kwfIqTUddXU/s72-c/snapshot1.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8431894686199942842</id><published>2009-06-05T21:13:00.002+05:30</published><updated>2009-06-05T21:20:06.978+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Internship and back to college</title><content type='html'>Well, my holiday has been cut short...&lt;br /&gt;&lt;br /&gt;I'm leaving next Saturday to spend the last month and a half of my vacations in college.&lt;br /&gt;&lt;br /&gt;I've received an internship opportunity to work as a Playtester and Beta-tester &lt;a href="http://www.cs.berkeley.edu/~mattkam/millee/"&gt;MILLEE&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I really enjoyed the short vacation though, I learnt to drive, did a lot of swimming, and hacked &lt;a href="http://www.github.com/nikhilm/cleanup"&gt;some decent code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The last year (academic) has been really really unique, perhaps the most satisfying and enjoyable one. But thats for another post&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8431894686199942842?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8431894686199942842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/06/internship-and-back-to-college.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8431894686199942842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8431894686199942842'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/06/internship-and-back-to-college.html' title='Internship and back to college'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-455788509028760773</id><published>2009-06-05T20:56:00.003+05:30</published><updated>2009-06-10T17:45:12.712+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>KWin preliminary tiling</title><content type='html'>Yesterday I committed code which adds a semblance of tiling to kwin. Every time you launch a window, it will be maximized vertically, but each window shares the width of the screen equally. You can check out code from &lt;a href="http://techbase.kde.org/Getting_Started/Sources/Anonymous_SVN"&gt;KDE svn&lt;/a&gt;. The location is /home/kde/branches/work/kwin-tiling/&lt;br /&gt;&lt;br /&gt;You'll need to edit $KDEDIR/share/config/kwinrc and set Placement=Tiling.&lt;br /&gt;&lt;br /&gt;Then you are ready to go.&lt;br /&gt;&lt;br /&gt;Right now there are no configuration options, no key bindings, nothing! Still a long long way from a functional release.&lt;br /&gt;&lt;br /&gt;Please leave feedback and bugs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-455788509028760773?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/455788509028760773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-preliminary-tiling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/455788509028760773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/455788509028760773'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/06/kwin-preliminary-tiling.html' title='KWin preliminary tiling'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7372269792053545607</id><published>2009-05-17T12:12:00.004+05:30</published><updated>2009-05-17T12:20:37.777+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='driving'/><category scheme='http://www.blogger.com/atom/ns#' term='codechef'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>May updates</title><content type='html'>I'm home! Till almost the end of July I'll be @ home. Which means a better internet connection at the very least :p&lt;br /&gt;&lt;br /&gt;So I've been swimming and learning to drive! Driving is fun, I've finished five days out of the 22 and I've managed not to hit anyone or anything.&lt;br /&gt;&lt;br /&gt;In programming, I'm working on a game using Canvas for the &lt;a href="http://blog.codechef.com/2009/04/28/announcing-two-contests-in-may-alogirthm-and-gamers-challenge/comment-page-1/"&gt;CodeChef game contest&lt;/a&gt;. You can &lt;a href="http://github.com/nikhilm/cleanup"&gt;track its progress on github&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also I've been doing some C socket programming, mainly doing segmented multithreaded HTTP downloads. Right now all the code is prototype, but someday it will be a decent download manager.&lt;br /&gt;&lt;br /&gt;I'm also working on implementing tiling in KWin along with Martin Graesslin, my mentor. Right now there isn't much real progress apart from a &lt;a href="http://websvn.kde.org/branches/work/kwin-tiling/"&gt;KWin branch&lt;/a&gt; which maximizes every window you open.&lt;br /&gt;&lt;br /&gt;And yesterday I got a copy of &lt;a href="http://www.realworldhaskell.org/"&gt;Real World Haskell&lt;/a&gt;. Yay!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7372269792053545607?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7372269792053545607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/05/may-updates.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7372269792053545607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7372269792053545607'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/05/may-updates.html' title='May updates'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8245623036852441141</id><published>2009-04-22T07:34:00.002+05:30</published><updated>2009-04-22T07:39:18.510+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>I didn't get in, better luck next time</title><content type='html'>Well, none of my two proposals got selected for Summer of Code 09. Of course I will be applying to Summer of KDE soon, and getting a lot of experience over the next year, so that I have higher chances next time.&lt;br /&gt;&lt;br /&gt;Which reminds me, I am on the way to getting a KDE svn account, and I already have 5 patches into KGet. :) My code will be in 4.3!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8245623036852441141?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8245623036852441141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/04/i-didnt-get-in-better-luck-next-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8245623036852441141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8245623036852441141'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/04/i-didnt-get-in-better-luck-next-time.html' title='I didn&apos;t get in, better luck next time'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6688457870280417899</id><published>2009-03-30T07:32:00.003+05:30</published><updated>2009-03-30T07:40:36.656+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='kget'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><title type='text'>Multiple improvements in KGet</title><content type='html'>&lt;span style="font-weight: bold;"&gt;* This is another GSoC related post, normal users please ignore it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Abstract&lt;br /&gt;========&lt;br /&gt;KGet is a versatile and user-friendly download manager for KDE.&lt;br /&gt;This project will add various features to KGet to improve its functionality and&lt;br /&gt;usability. These include semantic information via Nepomuk, support for digital&lt;br /&gt;signatures, better Metalink integration and good Plasma support.&lt;br /&gt;&lt;br /&gt;Personal details&lt;br /&gt;================&lt;br /&gt;&lt;br /&gt;Name: Nikhil Marathe&lt;br /&gt;&lt;br /&gt;Email Address: nsm.nikhil@gmail.com&lt;br /&gt;&lt;br /&gt;Freenode IRC Nick: nsm&lt;br /&gt;&lt;br /&gt;Location (City, Country and/or Time Zone): Mumbai, India ( GMT + 5:30 )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Proposal Name&lt;br /&gt;==============&lt;br /&gt;Making downloading easier, safer, better - multiple improvements to Kget&lt;br /&gt;&lt;br /&gt;Motivation for Proposal / Goal&lt;br /&gt;==============================&lt;br /&gt;Kget is a very good download manager, with a crisp interface and nice&lt;br /&gt;integration into KDE. At the same time there is always room for improvements. These include quick renaming of partial downloads, support for&lt;br /&gt;verification of downloaded files and ability to download from multiple sources.&lt;br /&gt;I will attempt to add these improvements.&lt;br /&gt;&lt;br /&gt;Goals&lt;br /&gt;-----&lt;br /&gt;As specified in the proposal:&lt;br /&gt; * Add support for a context menu to alter download properties.&lt;br /&gt; * Allow manual addition of URLs to multithreaded downloads.&lt;br /&gt; * Integration of downloads from multiple sources - Bittorrent/HTTP/FTP.&lt;br /&gt; * Integrate KGpg to verify digital signatures.&lt;br /&gt; * Integrate Nepomuk support if available.&lt;br /&gt; * Metalink creation support.&lt;br /&gt; * Support to download an MD5SUMS file from servers if available and verify&lt;br /&gt;downloads. Manual intervention possible if the MD5SUMS is not found.&lt;br /&gt; * In case of a Metalink, attempt to verify PGP checksums using KGpg.&lt;br /&gt;&lt;br /&gt;In addition I have the following features I would like to implement:&lt;br /&gt; * Add Plasma applet drop target which can be added to panel - KGet's  current drop target tends to cover up screen content. Tucking it away in&lt;br /&gt;the panel seems a good workaround.&lt;br /&gt; * Allow KGet to display transfer details in the system tray tooltip - this&lt;br /&gt;feature ( seen in ktorrent ) is very useful.&lt;br /&gt; * Allow KGet to restart on crashes - it is very annoying to find that the download you left on and went for lunch didn't finish because KGet crashed and didn't restart. This should fix it.&lt;br /&gt;&lt;br /&gt;Apart from the motivation of improving KDE, I have a somewhat selfish motivation&lt;br /&gt;for improving KGet since it seems to be the only download manager that can&lt;br /&gt;resume partial files on my computer :)&lt;br /&gt;&lt;br /&gt;Implementation Details&lt;br /&gt;======================&lt;br /&gt;&lt;br /&gt;NOTE: Wherever UI changes are required, they will be made to the web interface too in case required.&lt;br /&gt;&lt;br /&gt;My current implementation plan includes:&lt;br /&gt; * Modify KGet UI for context menu. This also involves adding the appropriate HTML/Javascript/CSS to support the same through the web interface.&lt;br /&gt; * Add KIO operations for moving/copying files when download location is changed&lt;br /&gt;to the KGet core.&lt;br /&gt; * Add support to verify signatures using KGpg command line options ( as KGpg&lt;br /&gt;does not seem to have a D-BUS interface. )&lt;br /&gt; * Add dialog for creation of Metalinks from downloaded files, or local&lt;br /&gt;filesystem files, including automatic MD5 and PGP checksumming.&lt;br /&gt; * Submit data to Nepomuk about download location, download server.&lt;br /&gt; * Allow user to add tags/rating to download while it is going on.&lt;br /&gt; * Discreet option to add multiple download links for non-Metalink downloads.&lt;br /&gt; * For MD5SUMS verification, attempt to guess multiple types of filenames (&lt;br /&gt;MD5SUMS, md5sums.txt etc. ) or allow the user to enter link or checksum&lt;br /&gt;manually.&lt;br /&gt; * Implement plasma drop target which should also have settings for the&lt;br /&gt;following -&lt;br /&gt;   Prompt for download by raising KGet window or just downloading to a default location and not breaking the user's workflow.&lt;br /&gt; * Provide a setEmergencySaveFunction and crashHandler so that we can attempt to rescue files from corruption and restart KGet when it crashes.&lt;br /&gt;&lt;br /&gt;Tentative Timeline&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;now - May 23rd : Understand relevant KGet code. Take a look at how to hook into&lt;br /&gt;Nepomuk. Plan the UI and backend design.&lt;br /&gt;&lt;br /&gt;May 23rd - June end: Attempt to implement the core functionality of manual URL&lt;br /&gt;insertion, renaming and moving, and integration of multiple download methods.&lt;br /&gt;Integrate KGpg and Nepomuk. Add Metalink PGP verification.&lt;br /&gt;Write plasma drop target applet. Implement tooltip functionality.&lt;br /&gt;&lt;br /&gt;July : Implement Rating and Tagging support. Add configuration options.&lt;br /&gt;Implement MD5SUMS verification. Fix bugs, write documentation.&lt;br /&gt;&lt;br /&gt;August 1-10th: Fix remaining bugs, wrap loose ends, test test test.&lt;br /&gt;&lt;br /&gt;More personal details&lt;br /&gt;=====================&lt;br /&gt;Do you have other obligations from late May to early August (school, work,&lt;br /&gt;etc.)?:&lt;br /&gt;&lt;br /&gt;My 3rd semester begins in the last week of July, which means I'll have&lt;br /&gt;a bit less time ( around 25 hours a week ) towards the last two weeks of coding.&lt;br /&gt;Therefore I will attempt to finish almost all&lt;br /&gt;of my proposal by the end of July.&lt;br /&gt;&lt;br /&gt;About Me&lt;br /&gt;========&lt;br /&gt;&lt;br /&gt;I'm 18 years old.  I study in Gandhinagar, India. I'm pursuing&lt;br /&gt;a B. Tech. in Information and Communication Technology at DA-IICT where I'm in&lt;br /&gt;the first year.&lt;br /&gt;&lt;br /&gt;I've been programming and using Linux for about 6 years now. I'm fascinated by&lt;br /&gt;all the areas of computing, including compilers, operating systems, graphics and&lt;br /&gt;web design+development. Python is the coolest language for me, although C/++&lt;br /&gt;comes pretty close. I have significant experience in Qt ( including the new MVC&lt;br /&gt;architecture ) - having developed a local network instant messaging client using&lt;br /&gt;it. I am also familiar with the HTTP and FTP protocols and have used PGP&lt;br /&gt;encryption/signing to some extent. In addition I have a decent web development experience, including Ajax and JS effects, which are required for the KGet web interface.&lt;br /&gt;&lt;br /&gt;A complete list of my projects can be found at&lt;br /&gt;http://22bits.exofire.net/browse/code&lt;br /&gt;&lt;br /&gt;KDE has been a really great piece of software for me ever since I first used&lt;br /&gt;version 3.2. I've always been a fan of its configurability and the momentum and&lt;br /&gt;innovation in the KDE community, and KDE 4 totally took it to the next level. It&lt;br /&gt;has been a kind of&lt;br /&gt;dream to work on KDE someday. Unfortunately I could never participate in GSoC&lt;br /&gt;due to age restrictions. I also didn't have the experience to enter such a huge&lt;br /&gt;project until last year, but now I'm ready to become a full time contributor to&lt;br /&gt;KDE. I have recently patched bug 164137 (&lt;br /&gt;https://bugs.kde.org/show_bug.cgi?id=164137 ) in KWin to remove a redundant&lt;br /&gt;checkbox, which is currently awaiting feedback from KWin developers.&lt;br /&gt;&lt;br /&gt;When not in front of the computer I also love playing football, reading and&lt;br /&gt;listening to music.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6688457870280417899?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6688457870280417899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/03/multiple-improvements-in-kget.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6688457870280417899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6688457870280417899'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/03/multiple-improvements-in-kget.html' title='Multiple improvements in KGet'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-195237245316317077</id><published>2009-03-24T19:50:00.005+05:30</published><updated>2009-04-02T07:14:23.253+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>Proposal for Tiling support in KWin</title><content type='html'>&lt;span style="font-weight: bold;"&gt;*Note to my normal blog readers, this post may not be of interest to you&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Abstract:&lt;br /&gt;This project will add a tiling layout mode to KWin. Tiling window managers displays all windows on the desktop at once, side by side. This allows easy navigation and allows tasks shared across applications to be carried out effortlessly. Unfortunately it is usually presented as a power user option. This will be an attempt to make it more accessible to new users.&lt;br /&gt;&lt;br /&gt;Name: Nikhil Marathe&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Email Address: nsm.nikhil@gmail.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Freenode IRC Nick: nsm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Location (City, Country and/or Time Zone): Mumbai, India ( GMT + 5:30 )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Proposal Name:&lt;br /&gt;Implement support for tiling in KWin&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Motivation for Proposal / Goal:&lt;br /&gt;&lt;br /&gt;Tiling is a very good way to view multiple tasks/windows together. This is well&lt;br /&gt;suited for tasks like writing reports where you can keep looking at references, or watching multiple pictures/videos and even programming. Fast window&lt;br /&gt;switching via the keyboard also improves productivity and decreases needless&lt;br /&gt;Alt+Tabbing. Although tiling window managers have existed for a long time, KWin&lt;br /&gt;does not have this feature. It has been requested for a long time now too ( https://bugs.kde.org/show_bug.cgi?id=59338 ), and&lt;br /&gt;will be useful for those who want to use KDE yet still want a tiling WM.&lt;br /&gt;In addition tiling WMs have always tried to appeal to power users, leaving a gap for the new user to jump. They eschew the mouse and more often the configurability, while available in abundance, often requires scripting. My belief is that the tiling mode should be an intuitive and friendly user experience and should be offered to the new user as a must-have feature.&lt;br /&gt;&lt;br /&gt;Goals:&lt;br /&gt; * Provide an intuitive tiling mode, with different layouts ( like Awesome ) and&lt;br /&gt;support for certain floating windows.&lt;br /&gt; * Expose a D-BUS API for tiling so other applications, including Plasma can hook into it.&lt;br /&gt; * Use compositing and the mouse wherever possible for a fluid experience.&lt;br /&gt; * A feature where windows dragged to the edges will automatically resize themselves to half the screen size as suggested here http://lists.kde.org/?l=kwin&amp;amp;m=122749581132588&amp;amp;w=2 . Of course this could be extended and made more powerful.&lt;br /&gt; * Marking/Selection - Move/tile only certain windows.&lt;br /&gt; * Tiling Stacks - An entire set of&lt;br /&gt;windows could be pushed back, brought in front or moved, each preserving there tiled layout. This could easily be extended to work across multiple monitors.&lt;br /&gt; * Another UI feature that I would like to bring in from 'Present Windows'. The user should be able to select windows by typing a certain filter for the window titles. So a search for Dolphin followed by a keystroke would only tile dolphin instances, leaving xchat floating in the centre.&lt;br /&gt;&lt;br /&gt;Implementation Details:&lt;br /&gt;&lt;br /&gt;My goal would be to implement a complete tiling solution for KWin. This would&lt;br /&gt;involve:&lt;br /&gt;&lt;br /&gt; * Communicate with KWin team and community feedback, along with some help from the KDE Usability team to decide how best it can be made user friendly.&lt;br /&gt;&lt;br /&gt; * Add tiling code to the core, including new Placement modes, support for Stacks, session management and screen edge gestures. ( Currently when a window is being moved, edge gestures are still passed on to KWin which rotates the desktop or something else. I'd like to intercept these if the user says so to enable tiling )&lt;br /&gt;&lt;br /&gt; * Tiling architecture would be somewhat based on Awesome. Awesome is well engineered and well commented, and some of its principles can be adopted into KWin's tiling mode.&lt;br /&gt;&lt;br /&gt; * Ensure tiling plays well with layout commands like Cascade or Unclutter or Present Windows.&lt;br /&gt;&lt;br /&gt; * Add marking/selection and relevant key bindings.&lt;br /&gt;    Marking would be light weight, relevant only for the current window motion, while a Stack would be more permanent. This would use something like the resize geometry display box or if compositing is enabled, tinting or some similar effect.&lt;br /&gt;&lt;br /&gt; * Add D-BUS API.&lt;br /&gt;     * Is tiling enabled?&lt;br /&gt;     * Available layouts, current layout.&lt;br /&gt;     * Switching layouts&lt;br /&gt;     * Stack awareness.&lt;br /&gt;&lt;br /&gt; * Add configuration options for movement, shortcuts to layouts.&lt;br /&gt;    This would be intuitive. The shortcuts would only be active in tiling mode and not clash with application shortcuts. For example. in a multimedia keyboard Next would go to next track in Amarok, but Meta + Next would go to next layout or next stack.&lt;br /&gt;    Mouse (especially the scroll wheel) would be used extensively to do almost anything the keyboard can.&lt;br /&gt;&lt;br /&gt; * Implement panel applet and plasma grouping by editing relevant taskbar code and leveraging the D-BUS API.&lt;br /&gt;&lt;br /&gt; * Allow certain windows/applications to preserve their tiling by using KWin's Special Window/Application settings.&lt;br /&gt;&lt;br /&gt; * Write user documentation, fix up bugs.&lt;br /&gt;&lt;br /&gt;Tentative Timeline:&lt;br /&gt;&lt;br /&gt;now - May 23rd : Understand relevant KWin code. Use KWin less, use a tiling WM more. Read KDE documentation, interact with the mentor and&lt;br /&gt;community. Investigate entry points into code. Design the project and plan how the user interface should behave in&lt;br /&gt;tiling mode.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;May 23rd - June end: Attempt to implement the core completely. This includes the main tiling&lt;br /&gt;components, the D-BUS API, working well with Plasma and so on. This will include&lt;br /&gt;testing and bug squashing. Have a working tiling mode by the evaluation period.&lt;br /&gt;&lt;br /&gt;July : Implement configuration dialogs/options, write user documentation, make the UI&lt;br /&gt;sensible. Implement non critical features such as compositing support, bells and whistles.&lt;br /&gt;&lt;br /&gt;August 1-10th: Fix remaining bugs, wrap loose ends, test test test.&lt;br /&gt;&lt;br /&gt;Do you have other obligations from late May to early August (school, work,&lt;br /&gt;etc.)?:&lt;br /&gt;&lt;br /&gt;My 3rd semester begins in the last week of July, which means I'll have&lt;br /&gt;a bit less time ( around 25 hours a week ) towards the last two weeks of coding. Therefore I will attempt to finish almost all&lt;br /&gt;of my proposal by the end of July.&lt;br /&gt;&lt;br /&gt;About Me (let us know who you are!):&lt;br /&gt;&lt;br /&gt;I'm 18 years old.  I study in Gandhinagar, India. I'm pursuing&lt;br /&gt;a B. Tech. in Information and Communication Technology at DA-IICT where I'm in&lt;br /&gt;the first year.&lt;br /&gt;&lt;br /&gt;I've been programming and using Linux for about 6 years now. I'm fascinated by&lt;br /&gt;all the areas of computing, including compilers, operating systems, graphics and&lt;br /&gt;web design+development. Python is the coolest language for me, although C/++&lt;br /&gt;&lt;br /&gt;comes pretty close. I have significant experience in Qt ( including the new MVC&lt;br /&gt;architecture ) - having developed a local network instant messaging client using&lt;br /&gt;it.&lt;br /&gt;&lt;br /&gt;A complete list of my projects can be found at&lt;br /&gt;http://22bits.exofire.net/browse/code&lt;br /&gt;&lt;br /&gt;KDE has been a really great piece of software for me ever since I first used&lt;br /&gt;version 3.2. I've always been a fan of its configurability and the momentum and&lt;br /&gt;innovation in the KDE community, and KDE 4 totally took it to the next level.&lt;br /&gt;Okular and Amarok are the killer applications for me. It has been a kind of&lt;br /&gt;dream to work on KDE someday. Unfortunately I could never participate in GSoC due to age restrictions. I also didn't have the experience to enter such a huge project until last year, but now I'm ready to become a full time contributor to KDE.&lt;br /&gt;&lt;br /&gt;When not in front of the computer I also love playing football ( soccer ).&lt;br /&gt;Otherwise I can be found reading or listening to music.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-195237245316317077?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/195237245316317077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/03/proposal-for-tiling-support-in-kwin.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/195237245316317077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/195237245316317077'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/03/proposal-for-tiling-support-in-kwin.html' title='Proposal for Tiling support in KWin'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8532289452822089827</id><published>2009-02-22T16:14:00.005+05:30</published><updated>2009-02-22T17:10:29.453+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool'/><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='gmail'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='hack'/><title type='text'>GMail Notifier on an Arduino</title><content type='html'>The exams are over and I've been hacking a bit on the &lt;a href="http://www.arduino.cc/"&gt;Arduino&lt;/a&gt; today. So I came up with a simple hack which blinks an LED on the Arduino if you've got unread mails in your Gmail inbox. I assume that you're familiar with the basics of Arduino.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Equipment&lt;br /&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;A computer with an internet connection&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pyserial.wiki.sourceforge.net/pySerial"&gt;pySerial&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Arduino ( I'm using Duemilanove )&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Red LED&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Pushbutton (optional)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Wires&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;On the computer&lt;br /&gt;&lt;/h3&gt;A python script will run continuously on the computer, and fetch the &lt;a href="https://mail.google.com/mail/feed/atom"&gt;Gmail RSS feed&lt;/a&gt; every few minutes. pySerial will be used to notify the Arduino of new mails.&lt;br /&gt;&lt;br /&gt;Here are our imports and constants&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# ~ Gmail Notifier for Arduino&lt;br /&gt;# ~ This file is released under the public domain&lt;br /&gt;&lt;br /&gt;import httplib&lt;br /&gt;import getpass&lt;br /&gt;import base64&lt;br /&gt;import re&lt;br /&gt;import time&lt;br /&gt;import serial&lt;br /&gt;&lt;br /&gt;INTERVAL = 5 # check every INTERVAL minutes&lt;br /&gt;&lt;br /&gt;serv = 'mail.google.com'&lt;br /&gt;path = '/mail/feed/atom'&lt;br /&gt;# ask user name and password and encode them for authentication&lt;/code&gt;&lt;br /&gt;auth = base64.encodestring(&lt;br /&gt;                 '%s:%s'%(raw_input('Username: '),&lt;br /&gt;                   getpass.getpass()))&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So first, fetching the feed. We'll use httplib. Here is the code:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def getfeed():&lt;br /&gt;  print 'Checking...'&lt;br /&gt;  conn = httplib.HTTPSConnection(serv)&lt;br /&gt;  conn.putrequest('GET', path)&lt;br /&gt;  conn.putheader('Authorization', 'Basic %s'%auth)&lt;br /&gt;  conn.endheaders()&lt;br /&gt;  return conn.getresponse().read()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next lets get the count. Gmail replies in the following format. In the case of new mails there is more information, but we don't care about that. We're mainly interested in fullcount.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;feed version="0.3" xmlns="http://purl.org/atom/ns#"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Gmail - Inbox for nsm.nikhil@gmail.com&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;tagline&amp;gt;New messages in your Gmail Inbox&amp;lt;/tagline&amp;gt;&lt;br /&gt;&amp;lt;fullcount&amp;gt;0&amp;lt;/fullcount&amp;gt;&lt;br /&gt;&amp;lt;link rel="alternate" href="http://mail.google.com/mail" type="text/html" /&amp;gt;&lt;br /&gt;&amp;lt;modified&amp;gt;2009-02-22T11:00:33Z&amp;lt;/modified&amp;gt;&lt;br /&gt;&amp;lt;/feed&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So we'll use regular expressions to get the count.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def count(data):&lt;br /&gt; matches = re.findall('&amp;lt;fullcount&amp;gt;([0-9]+)&amp;lt;/fullcount&amp;gt;', data)&lt;br /&gt; if len(matches) == 0:&lt;br /&gt;     print 'Error in parsing feed, check user name and password are correct'&lt;br /&gt;     return 0&lt;br /&gt; return int(matches[0])&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We'll need to write this to the serial port.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def writeSer(data):&lt;br /&gt; try:&lt;br /&gt;     # the best way to find this out is to launch the Arduino environment&lt;br /&gt;     # and see what it says under Tools -&gt; Serial Port&lt;br /&gt;     ser = serial.Serial('/dev/ttyUSB0')&lt;br /&gt;     ser.write(data)&lt;br /&gt; except serial.serialutil.SerialException:&lt;br /&gt;     print 'Error writing to serial device'&lt;br /&gt;     raise&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now that we're done with the functions, it's time to make them work together&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# subtract so that we check first time&lt;br /&gt;last_check = time.time() - INTERVAL*60&lt;br /&gt;&lt;br /&gt;while True:&lt;br /&gt;    if time.time() - last_check &amp;lt; INTERVAL*60:&lt;br /&gt;        continue&lt;br /&gt;    last_check = time.time()&lt;br /&gt;    msgs = count(getfeed())&lt;br /&gt;    print msgs,'mails'&lt;br /&gt;    writeSer(str(msgs))&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thats the computer part.&lt;br /&gt;&lt;h3&gt;On the Arduino&lt;/h3&gt;&lt;br /&gt;The circuit :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/SaE2KqNVUsI/AAAAAAAAALE/YSGCUuSLeqI/s1600-h/Photo-0231.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/SaE2KqNVUsI/AAAAAAAAALE/YSGCUuSLeqI/s400/Photo-0231.jpg" alt="" id="BLOGGER_PHOTO_ID_5305581392775959234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The LED is on pin 13 and goes to ground. The button takes 5V through the power pins on the analog side, via a 220 ohm resistor. The other leg is grounded. Pin 4 can be used to read the state of the button. The wire from pin 4 connects to the 5V leg of the button.&lt;br /&gt;&lt;br /&gt;The code is dead simple and so is presented together.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;int ledPin = 13; // connect led to digital pin 13, or use default small one&lt;br /&gt;int bPin = 4; // connect button to digital pin 4&lt;br /&gt;boolean blink = false; // holds our current state&lt;br /&gt;&lt;br /&gt;int INTERVAL = 200; // led blink rate in milliseconds&lt;br /&gt;&lt;br /&gt;void setup() {&lt;br /&gt;  Serial.begin(9600);&lt;br /&gt;  pinMode(ledPin, OUTPUT);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;  if(Serial.available() &amp;gt; 0)&lt;br /&gt;    blink = Serial.read() &amp;gt; 48;// 48 is 0 is ASCII&lt;br /&gt;&lt;br /&gt;  if(digitalRead(bPin) == LOW) // button pressed&lt;br /&gt;    blink = false;&lt;br /&gt;&lt;br /&gt;  // blink is true if we got serial input&lt;br /&gt;  // or we had got serial input and button hasn't been pressed yet.&lt;br /&gt;  if(blink) {&lt;br /&gt;    digitalWrite(ledPin, HIGH);&lt;br /&gt;    delay(INTERVAL);&lt;br /&gt;    digitalWrite(ledPin, LOW);&lt;br /&gt;    delay(INTERVAL);&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;    digitalWrite(ledPin, LOW);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The button is used to switch off the blinking once you've noticed that you've got mail and don't want it to keep blinking till the next check.&lt;br /&gt;&lt;h3&gt;Running&lt;br /&gt;&lt;/h3&gt;Verify and Upload the code to the Arduino. You can try entering numbers in the Serial Monitor to check that the circuit works. Remember to switch off the Serial Monitor.&lt;br /&gt;&lt;br /&gt;Now start your script, &lt;strong&gt;python mailarduino.py&lt;/strong&gt;. Enter authentication details. Now sit back and relax... oh wait, you've got mail.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Full python script ( mailarduino.py )&lt;br /&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;import httplib&lt;br /&gt;import getpass&lt;br /&gt;import base64&lt;br /&gt;import re&lt;br /&gt;import time&lt;br /&gt;import serial&lt;br /&gt;&lt;br /&gt;INTERVAL = 5 # check every INTERVAL minutes&lt;br /&gt;&lt;br /&gt;serv = 'mail.google.com'&lt;br /&gt;path = '/mail/feed/atom'&lt;br /&gt;&lt;br /&gt;auth = base64.encodestring(&lt;br /&gt;                '%s:%s'%(raw_input('Username: '),&lt;br /&gt;                getpass.getpass()))&lt;br /&gt;&lt;br /&gt;def count(data):&lt;br /&gt; matches = re.findall('&amp;lt;fullcount&amp;gt;([0-9]+)&amp;lt;/fullcount&amp;gt;', data)&lt;br /&gt; if len(matches) == 0:&lt;br /&gt;     print 'Error in parsing feed, check user name and password are correct'&lt;br /&gt;     return 0&lt;br /&gt; return int(matches[0])&lt;br /&gt;&lt;br /&gt;def getfeed():&lt;br /&gt; print 'Checking...'&lt;br /&gt; conn = httplib.HTTPSConnection(serv)&lt;br /&gt; conn.putrequest('GET', path)&lt;br /&gt; conn.putheader('Authorization', 'Basic %s'%auth)&lt;br /&gt; conn.endheaders()&lt;br /&gt; return conn.getresponse().read()&lt;br /&gt;&lt;br /&gt;def writeSer(data):&lt;br /&gt; try:&lt;br /&gt;     ser = serial.Serial('/dev/ttyUSB0')&lt;br /&gt;     ser.write(data)&lt;br /&gt; except serial.serialutil.SerialException:&lt;br /&gt;     print 'Error writing to serial device'&lt;br /&gt;     raise&lt;br /&gt;&lt;br /&gt;last_check = time.time() - INTERVAL*60 # subtract so that we check first time&lt;br /&gt;&lt;br /&gt;while True:&lt;br /&gt;    if time.time() - last_check &lt; INTERVAL*60:&lt;br /&gt;        continue&lt;br /&gt;    last_check = time.time()&lt;br /&gt;    msgs = count(getfeed())&lt;br /&gt;    print msgs,'mails'&lt;br /&gt;    writeSer(str(msgs))&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8532289452822089827?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8532289452822089827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/02/gmail-notifier-on-arduino.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8532289452822089827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8532289452822089827'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/02/gmail-notifier-on-arduino.html' title='GMail Notifier on an Arduino'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8YErdCHGKN8/SaE2KqNVUsI/AAAAAAAAALE/YSGCUuSLeqI/s72-c/Photo-0231.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9130411200355789916</id><published>2009-01-27T20:21:00.004+05:30</published><updated>2009-01-29T12:38:22.851+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='techfest'/><title type='text'>Techfest 09 and the Arduino</title><content type='html'>I was in mumbai over the weekend, attending &lt;a href="http://www.techfest.org/"&gt;Techfest 2009&lt;/a&gt; at IIT Bombay. Techfest has been a large and great event for many years now, bringing cutting edge technology to students and holding great lectures by iconic people in technology.&lt;br /&gt;&lt;br /&gt;Me and three of my friends went specifically to attend the Physical Computing workshop by &lt;a href="http://towardsbetterinteraction.wordpress.com/"&gt;Keyur Sorathia&lt;/a&gt;, an interaction designer. This was my first foray into hardware hacking, mainly because hardware components are not so accessible in India.&lt;br /&gt;&lt;br /&gt;On day one, we hacked a keyboard, figured out which pins pressed which key and connected a tilt sensor to do the same. Then we popped them into an helmet. Unfortunately, soldering wasn't our strong point and although the helmet worked, we couldn't wear it on our head. Keyur also showed us videos about various  which aim to make computer interaction more like interacting with real objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/SYFVM6n1cYI/AAAAAAAAAKs/emTEt8B9P_c/s1600-h/kbd.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 345px;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/SYFVM6n1cYI/AAAAAAAAAKs/emTEt8B9P_c/s400/kbd.jpg" alt="" id="BLOGGER_PHOTO_ID_5296608317147541890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Day two, and we finally got our hands on the &lt;a href="http://www.arduino.cc/"&gt;Arduino&lt;/a&gt;. The Duemilanove is the latest iteration of Arduino and we had fun programming LEDs to light up on key presses. Of course we didn't get to see all of the Arduino's magic in a two day workshop. But we did get infrared sensors, peizo sensors and buttons to mess around with, which I'll start using soon.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/SYFVM-MUqoI/AAAAAAAAAK0/nKykgqdz5Zc/s1600-h/ysoseri.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/SYFVM-MUqoI/AAAAAAAAAK0/nKykgqdz5Zc/s400/ysoseri.jpg" alt="" id="BLOGGER_PHOTO_ID_5296608318105889410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On day three, the workshop unofficially over, we first saw Robot Wars, which was a bit of a disappointment because one of the machines got stuck and didn't move much for the remainder of the match. Then we attended an interesting lecture by Rhythm and Hues. Directi had a booth where they had 3 C snippets and visitors had to predict the output. Two out of the three were pretty tough, but I managed to answer 2/3 and got myself a T-shirt that says &amp;lt;geek&amp;gt; on the front and &amp;lt;/geek&amp;gt; on the back.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/SYFVNmNLFMI/AAAAAAAAAK8/96scCPZDBx4/s1600-h/nissan.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/SYFVNmNLFMI/AAAAAAAAAK8/96scCPZDBx4/s400/nissan.jpg" alt="" id="BLOGGER_PHOTO_ID_5296608328846873794" border="0" /&gt;&lt;/a&gt;Nissan concept car Pivo2&lt;br /&gt;&lt;br /&gt;Due to our train and other schedules, we were unable to attend Technoholix on any of days, which was bad. So next year I'm gonna take off more time and stay at Techfest and attend all the great events.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9130411200355789916?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9130411200355789916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2009/01/techfest-09-and-arduino.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9130411200355789916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9130411200355789916'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2009/01/techfest-09-and-arduino.html' title='Techfest 09 and the Arduino'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/SYFVM6n1cYI/AAAAAAAAAKs/emTEt8B9P_c/s72-c/kbd.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3420871972422180147</id><published>2008-12-27T10:15:00.003+05:30</published><updated>2009-01-03T20:56:20.729+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='paragliding'/><title type='text'>First flight</title><content type='html'>I went paragliding again last week, to finish my Elementary Pilot course. I had my first solo flight from a height of 45m on 24th Dec 2008. It was an exhilarating feeling, although short. After 3 days of solo top to bottoms, I now have 15 min of total air time. I'll put up the pictures soon. The sight is Shinde Wadi, around 125km from Mumbai.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-C-y6yTHI/AAAAAAAAAKE/D7qfAcV4eLU/s1600-h/n515029741_1048340_280.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-C-y6yTHI/AAAAAAAAAKE/D7qfAcV4eLU/s400/n515029741_1048340_280.jpg" alt="" id="BLOGGER_PHOTO_ID_5287088502888090738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-C-uqzs5I/AAAAAAAAAJ8/q302G1I75W8/s1600-h/1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-C-uqzs5I/AAAAAAAAAJ8/q302G1I75W8/s400/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5287088501747331986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-DeZNcmXI/AAAAAAAAAKM/kFaRlvBd164/s1600-h/n515029741_1048323_6311.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_8YErdCHGKN8/SV-DeZNcmXI/AAAAAAAAAKM/kFaRlvBd164/s400/n515029741_1048323_6311.jpg" alt="" id="BLOGGER_PHOTO_ID_5287089045742852466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I also had great fun at the Native Place, home to &lt;a href="http://www.flynirvana.com/"&gt;Nirvana Adventures&lt;/a&gt;. Hoping to go back in May and make progress towards Club Pilot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3420871972422180147?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3420871972422180147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/12/first-flight.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3420871972422180147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3420871972422180147'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/12/first-flight.html' title='First flight'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8YErdCHGKN8/SV-C-y6yTHI/AAAAAAAAAKE/D7qfAcV4eLU/s72-c/n515029741_1048340_280.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8245412388607775370</id><published>2008-12-01T18:48:00.003+05:30</published><updated>2008-12-04T16:32:40.329+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom'/><category scheme='http://www.blogger.com/atom/ns#' term='filter'/><category scheme='http://www.blogger.com/atom/ns#' term='mvc'/><category scheme='http://www.blogger.com/atom/ns#' term='qt'/><title type='text'>Filtering QTreeView</title><content type='html'>While working on my newest project, I had a miserable time figuring out how to filter sub-items in QTreeView and its associated models (like in kopete/pidgin). The first thing to do is to use QSortFilterProxy as a middleman. The problem is that QSortFilterProxy will only search top level tree nodes.&lt;br /&gt;The way to implement custom filters is to subclass QSortFilterProxy and reimplement filterAcceptsRow(). But I couldn't figure out any way to quickly access sub elements using QModelIndex, nor could I find anything on the 'net. So after quite a lot of fiddling around, I managed to get this, which works. So to save someone else some time, here is the code&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;bool MemberFilter::filterAcceptsRow(int sourceRow, const QModelIndex&amp; sourceParent) const&lt;br /&gt;{&lt;br /&gt;    if( sourceParent.isValid() &amp;&amp; sourceModel()-&gt;data(sourceParent).toString().contains(filterRegExp()) ) return true;&lt;br /&gt;&lt;br /&gt;    QString data = sourceModel()-&gt;data(sourceModel()-&gt;index(sourceRow, 0, sourceParent)).toString();&lt;br /&gt;&lt;br /&gt;    bool ret = data.contains(filterRegExp());&lt;br /&gt;&lt;br /&gt;    QModelIndex subIndex = sourceModel()-&gt;index(sourceRow, 0, sourceParent);&lt;br /&gt;    if( subIndex.isValid() )&lt;br /&gt;    {&lt;br /&gt;        for(int i = 0; i &lt; sourceModel()-&gt;rowCount(subIndex); ++i)&lt;br /&gt;        {&lt;br /&gt;            ret = ret || filterAcceptsRow(i, subIndex);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return ret;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On a side note, this has been a post after a long long time. This is because I've decided only to post important things or code related stuff. Right now I finished one semester of college, and will be home for a month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8245412388607775370?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8245412388607775370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/12/filtering-qtreeview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8245412388607775370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8245412388607775370'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/12/filtering-qtreeview.html' title='Filtering QTreeView'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1278345644856445418</id><published>2008-10-27T08:24:00.006+05:30</published><updated>2008-12-05T16:27:36.328+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='archlinux'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='notebook'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='hp'/><category scheme='http://www.blogger.com/atom/ns#' term='dv6910tx'/><title type='text'>Installing Arch linux on the HP DV6910TX</title><content type='html'>This is a record of my attempt to put Arch (2008.06 Core Dump) on the HP DV6910TX.&lt;br /&gt;Here is my system configuration&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Intel Core 2 Duo T5750 @ 2.00GHz&lt;/li&gt;&lt;li&gt;Ram : 3GB&lt;/li&gt;&lt;li&gt;Nvidia GeForce 8400M GS with 256Mb dedicated memory&lt;/li&gt;&lt;li&gt;320Gb harddisk&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Partitioning&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Here was my original partitioning scheme:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;C: 308Gb&lt;/li&gt;&lt;li&gt;D: (Recovery) ~10Gb&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Make sure you create your HP Recovery Discs first!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Since the arch install CD doesn't have ntfsprogs ( it has the packages, but not as part of the setup boot ), I booted from dreamlinux (you can use any liveCD) and used ntfsresize to shrink the C: (/dev/sda1) to 35Gb.&lt;br /&gt;&lt;br /&gt;Then I used gparted to create a proper partition layout. Here is how it goes&lt;br /&gt;&lt;ul&gt;&lt;li&gt;/dev/sda1 - ntfs - 35Gb (C:)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/dev/sda2 - ntfs - 10Gb (D:)&lt;/li&gt;&lt;li&gt;/dev/sda3 - swap - 4Gb ( to hibernate, you need atleast as much swap as your RAM )&lt;/li&gt;&lt;li&gt;/dev/sda4 - extended&lt;/li&gt;&lt;li&gt;--- /dev/sda5 - ext3 - 20Gb (/)&lt;/li&gt;&lt;li&gt;--- /dev/sda6 - ext3 - 50Gb (/home)&lt;/li&gt;&lt;li&gt;--- /dev/sda7 - ntfs - 180Gb (/shared)&lt;/li&gt;&lt;/ul&gt;After committing these changes I began the installation.&lt;br /&gt;&lt;br /&gt;The rest of the settings were normal Arch installation procedures, which can be found elsewhere.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Hardware&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Display&lt;/h4&gt;&lt;br /&gt;The dv6910tx has an nVidia 8400M GS with 256Mb of dedicated memory. Installing the nvidia drivers ( pacman -S nvidia nvidia-utils ) and running nvidia-xconfig generated the required xorg.conf, and the card worked perfectly.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Touchpad&lt;/h4&gt;&lt;br /&gt;Installing the synaptics package and merging the required changes into xorg.conf ensured that the touchpad worked too, including scroll areas and locking.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;CD/DVD drive&lt;/h4&gt;&lt;br /&gt;Works perfectly without any configuration.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Ethernet&lt;/h4&gt;&lt;br /&gt;Arch correctly used the r8169 driver&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Wifi&lt;/h4&gt;&lt;br /&gt;Arch was able to identify the card, but there is no hotspot here to test the connection.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Card reader&lt;/h4&gt;&lt;br /&gt;The 6910 has a 5-in-1 reader from Ricoh. But I could test only for SD cards.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Firewire&lt;/h4&gt;&lt;br /&gt;Detected fine,, but no device to test.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Power management&lt;/h4&gt;&lt;br /&gt;Installing Guidance (pacman -S guidance-power-manager) will allow you to quickly view battery performance and perform suspend or hibernate ( I'm using pm-utils ).&lt;br /&gt;To enable different power modes ( governors ), install &lt;strong&gt;cpufreq&lt;/strong&gt; and follow the &lt;a href="http://wiki.archlinux.org/index.php/Cpufreq"&gt;Arch Wiki Page on CPUfreq&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A special entry has to be made to mount/unmount NTFS partitions. Put the following in /etc/pm/sleep.d/66ntfs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash                                  &lt;br /&gt;&lt;br /&gt;MOUNTS="/windows/C /shared"&lt;br /&gt;&lt;br /&gt;function 66ntfsmount() {&lt;br /&gt;   for i in $MOUNTS   &lt;br /&gt;   do                 &lt;br /&gt;       mount $i       &lt;br /&gt;   done               &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function 66ntfsumount() {&lt;br /&gt;   for i in $MOUNTS&lt;br /&gt;   do&lt;br /&gt;       umount $i&lt;br /&gt;   done&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;case $1 in&lt;br /&gt;   hibernate)&lt;br /&gt;       66ntfsumount&lt;br /&gt;       ;;&lt;br /&gt;   suspend)&lt;br /&gt;       66ntfsumount&lt;br /&gt;       ;;&lt;br /&gt;&lt;br /&gt;   thaw)&lt;br /&gt;       66ntfsmount&lt;br /&gt;       ;;&lt;br /&gt;   resume)&lt;br /&gt;       66ntfsmount&lt;br /&gt;       ;;&lt;br /&gt;   *)&lt;br /&gt;       echo "BAD!"&lt;br /&gt;       ;;&lt;br /&gt;esac&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now make it executable ( chmod +x /etc/pm/sleep.d/66ntfs ).&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Webcam&lt;/h4&gt;&lt;br /&gt;Not tested yet.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;NTFS partitions&lt;/h4&gt;&lt;br /&gt;I installed ntfsprogs and used the fuse.ntfs system to mount ntfs in userspace as read and write. Here are the additions to /etc/fstab&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;UUID=...  /windows/D  fuse.ntfs  defaults 0 0&lt;br /&gt;UUID=...  /windows/C  fuse.ntfs  defaults 0 0&lt;br /&gt;UUID=...  /shared     fuse.ntfs  defaults 0 0&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;NOTE: The arch shutdown scripts kill the fuse ntfs system rather than unmounting the drives. To fix this issue edit &lt;strong&gt;/etc/rc.local.shutdown&lt;/strong&gt; and insert the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;. /etc/rc.conf&lt;br /&gt;. /etc/rc.d/functions&lt;br /&gt;&lt;br /&gt;# Unmount NTFS partitions&lt;br /&gt;stat_busy "Unmounting NTFS partitions"&lt;br /&gt;umount /shared&lt;br /&gt;umount /windows/C&lt;br /&gt;umount /windows/D&lt;br /&gt;stat_done&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h4&gt;Bluetooth&lt;/h4&gt;&lt;br /&gt;Device detected. I could scan for my cell phone, but I've yet to figure out how to exchange files.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Hotkeys&lt;/h4&gt;&lt;br /&gt;If you use KDE4, go to System Settings -&gt; Regional and Language -&gt; Keyboard Layout. Enable keyboard layouts and change the keyboard model to Hewlett-Packard Pavilion ZT11xx.  All the keys EXCEPT Quickplay and DVD work after that. The mute key does not turn red, but it does work. Of course it is your job to actually configure application shortcuts to use the keys.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Remote&lt;/h4&gt;&lt;br /&gt;The volume keys respond. Other keys should be configured to work with the respective applications using application specific settings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1278345644856445418?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1278345644856445418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/10/installing-arch-on-hp-dv6910tx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1278345644856445418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1278345644856445418'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/10/installing-arch-on-hp-dv6910tx.html' title='Installing Arch linux on the HP DV6910TX'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7486319298365667880</id><published>2008-09-30T12:56:00.002+05:30</published><updated>2008-09-30T13:25:33.900+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='random'/><category scheme='http://www.blogger.com/atom/ns#' term='mitpune'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><title type='text'>Random Ramblings</title><content type='html'>Sorry for not blogging in a long time. This has been a very busy week, and so I'm just going to drop some snippets.&lt;br /&gt;&lt;br /&gt;First &lt;a href="http://www.guardian.co.uk/technology/2008/sep/29/cloud.computing.richard.stallman"&gt;RMS and Larry Ellison both commented against cloud computing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://22bits.exofire.net/browse/code/graffiti"&gt;Graffiti&lt;/a&gt; is uploaded and ready to use ( but not necessarily stable ).&lt;br /&gt;&lt;br /&gt;I read &lt;a href="http://www.nealstephenson.com/snowcrash/"&gt;Snow Crash&lt;/a&gt; and &lt;a href="http://www.goodreads.com/review/list/51905?shelf=read"&lt;br /&gt;&gt;loved it&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm confused between getting a &lt;a href="http://www.reddit.com/r/hardware/comments/744p2/decide_between_dell_studio_15_and_hp_pavilion/"&gt;Dell Studio 15 and HP Pavilion dv6767tx&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Meanwhile I'll be leaving for Pune tomorrow for &lt;a href="http://www.mitpune.com/summit08.asp"&gt;SUMMIT '08&lt;/a&gt; at MIT Pune. This is a sports fest, and I'm proud to be the only first year in the football team. This is the first time I'll be playing football as part of an official team with jerseys ( no. 2 ) and all, so it will be fun.&lt;br /&gt;&lt;br /&gt;I'll be back on the 5th after which I will probably start with a new project. Right now I'm thinking of something like hyperlink visualizations, though I've no idea how to accomplish this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7486319298365667880?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7486319298365667880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/09/random-ramblings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7486319298365667880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7486319298365667880'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/09/random-ramblings.html' title='Random Ramblings'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7859381558852648572</id><published>2008-09-14T09:57:00.004+05:30</published><updated>2008-09-14T10:25:37.684+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><title type='text'>Graffiti is almost released</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/SMyWYEHujzI/AAAAAAAAAH4/NLdPUXTsj8Q/s1600-h/graffiti.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/SMyWYEHujzI/AAAAAAAAAH4/NLdPUXTsj8Q/s400/graffiti.png" alt="" id="BLOGGER_PHOTO_ID_5245733006146965298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Aside from some code cleanup, testing, and writing architecture documentation, Graffiti is good to go. You can &lt;a href="http://22bits.exofire.net/downloads/graffiti-20080914.tar.gz"&gt;Download it&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7859381558852648572?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7859381558852648572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/09/graffiti-is-almost-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7859381558852648572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7859381558852648572'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/09/graffiti-is-almost-released.html' title='Graffiti is almost released'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_8YErdCHGKN8/SMyWYEHujzI/AAAAAAAAAH4/NLdPUXTsj8Q/s72-c/graffiti.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7847528057510534370</id><published>2008-08-27T20:47:00.002+05:30</published><updated>2008-08-27T20:54:21.927+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><title type='text'>Reworked Graffiti's first render</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/SLVxXVRrXlI/AAAAAAAAAHw/eFeXbZv45f8/s1600-h/graffiti.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/SLVxXVRrXlI/AAAAAAAAAHw/eFeXbZv45f8/s400/graffiti.png" alt="" id="BLOGGER_PHOTO_ID_5239218387177659986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After quite a few weeks of work, Graffiti has (again) reached the stage where it can render it's first words. It's now at 488 lines of code, of which the CSS related stuff itself comes in at 288 lines! There is no word wrapping yet, or any layout logic. I've been busy fixing quite a few bugs in the CSS overlays and so on.&lt;br /&gt;&lt;br /&gt;This is how you would use it.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import pygame&lt;br /&gt;from pygame.locals import *&lt;br /&gt;&lt;br /&gt;import graffiti as g                                                                  # 1&lt;br /&gt;&lt;br /&gt;pygame.init()&lt;br /&gt;&lt;br /&gt;g.init()                                                                                      # 2&lt;br /&gt;&lt;br /&gt;pygame.display.set_caption('Graffiti Render Test')&lt;br /&gt;&lt;br /&gt;screen = pygame.display.set_mode((800, 600))&lt;br /&gt;screen.fill((0, 0, 0))&lt;br /&gt;&lt;br /&gt;page = g.page.Page('&amp;lt;body&amp;gt;&amp;lt;p&amp;gt;Testing  Graffiti&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;')  # 3&lt;br /&gt;&lt;br /&gt;page.render.on(screen)                                                        # 4&lt;br /&gt;&lt;br /&gt;while True:&lt;br /&gt;   for event in pygame.event.get():&lt;br /&gt;       if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):&lt;br /&gt;           pygame.quit()&lt;br /&gt;           sys.exit(0)&lt;br /&gt;&lt;br /&gt;   pygame.display.update()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7847528057510534370?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7847528057510534370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/08/reworked-graffitis-first-render.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7847528057510534370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7847528057510534370'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/08/reworked-graffitis-first-render.html' title='Reworked Graffiti&apos;s first render'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/SLVxXVRrXlI/AAAAAAAAAHw/eFeXbZv45f8/s72-c/graffiti.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-8410789926106622783</id><published>2008-08-17T11:48:00.003+05:30</published><updated>2008-08-17T11:58:44.774+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='archlinux'/><category scheme='http://www.blogger.com/atom/ns#' term='kde4'/><category scheme='http://www.blogger.com/atom/ns#' term='home'/><title type='text'>Nikhil meet Archlinux and KDE4</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8YErdCHGKN8/SKfE3oCdyRI/AAAAAAAAAHo/PbxfVrBpwlU/s1600-h/kde4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_8YErdCHGKN8/SKfE3oCdyRI/AAAAAAAAAHo/PbxfVrBpwlU/s400/kde4.png" alt="" id="BLOGGER_PHOTO_ID_5235369551761099026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've been home (Mumbai) this weekend and have been hacking away for the last two days to get Arch running on my external HDD, since I can't stand Mandriva anymore. The cool thing about Arch and Pacman is their flexibility. Following &lt;a href="http://wiki.archlinux.org/index.php/Install_From_Existing_Linux"&gt;this guide&lt;/a&gt; I was able to install Arch from within my internal hdd arch, and have all the latest packages (including KDE 4.1).&lt;br /&gt;&lt;br /&gt;There was only one problem which wasn't mentioned. External HDDs require usb support in the initrd which is not done in Arch by default. So before rebooting just edit &lt;strong&gt;/etc/mkinitcpio.conf&lt;/strong&gt; and add &lt;strong&gt;"usb"&lt;/strong&gt; to the line &lt;strong&gt;HOOKS="base udev …"&lt;/strong&gt;. Then remake the initrd using &lt;strong&gt;"mkinitcpio -g /boot/kernel26.img"&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I must say I'm pretty impressed with KDE 4.1. There are still a few rough edges like the khotkeys keyboard shortcuts not working and some KWin effects not exactly doing anything. But overall a great effort.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-8410789926106622783?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/8410789926106622783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/08/nikhil-meet-archlinux-and-kde4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8410789926106622783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/8410789926106622783'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/08/nikhil-meet-archlinux-and-kde4.html' title='Nikhil meet Archlinux and KDE4'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_8YErdCHGKN8/SKfE3oCdyRI/AAAAAAAAAHo/PbxfVrBpwlU/s72-c/kde4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2733454578487283824</id><published>2008-08-13T11:16:00.003+05:30</published><updated>2008-08-13T11:45:49.726+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Custom hash objects in Python</title><content type='html'>It's quite common to use strings, integers and other 'native' Python data types as hash keys. But sometimes it is much easier to be able to use your own class instances as keys. Python's magic methods allow you to do this.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: This is not a tip on implementing hash functions, this is how you can remove a certain layer of peeking around into objects&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;__hash and __cmp__&lt;/h3&gt;&lt;br /&gt;Consider a useless HTML parser with a simple node design where you want to associate the node name with its attributes.&lt;br /&gt;&lt;br /&gt;You want to use the absolute node name as a unique hash.&lt;br /&gt;&lt;br /&gt;The solution is to define custom implementations for &lt;strong&gt;__hash__&lt;/strong&gt; and &lt;strong&gt;__cmp__&lt;/strong&gt;, two magic methods. For more information and constraints about them take a look at &lt;a href="http://docs.python.org/ref/customization.html"&gt;the Python docs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The builtin functions &lt;strong&gt;hash(obj)&lt;/strong&gt; and &lt;strong&gt;cmp(obj1, obj2)&lt;/strong&gt; will attempt to call there __underscored__ counterparts on &lt;strong&gt;obj&lt;/strong&gt;s.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import UserDict # allow NodeAttrs to behave like a dictionary, not significant for this example&lt;br /&gt;&lt;br /&gt;class NodeName(object):&lt;br /&gt;  def __init__(self, name, parent=None):&lt;br /&gt;    self.name = name&lt;br /&gt;    self.parent = parent&lt;br /&gt;&lt;br /&gt;  def __str__(self):&lt;br /&gt;    return (parent and str(parent) or '') + self.name&lt;br /&gt;&lt;br /&gt;  def __hash__(self):&lt;br /&gt;    # the hash of our string is our unique hash&lt;br /&gt;    return hash(str(self))&lt;br /&gt;&lt;br /&gt;  def __cmp__(self, other):&lt;br /&gt;    # similarly the strings are good for comparisons&lt;br /&gt;    return cmp(str(self), str(other))&lt;br /&gt;&lt;br /&gt;class NodeAttrs(UserDict.UserDict):&lt;br /&gt;  def __init__(self, attrs={}):&lt;br /&gt;    self.update(attrs)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Where we assume that the parser is doing the heavy lifting of parsing the name, and putting the attributes in a dictionary. Now to use this in a dictionary you would do the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; d = {}&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; d[node_name] = attrs # node_name is an instance of NodeName and attrs&lt;br /&gt;&lt;br /&gt;... # do anything which can be done to a dictionary and its keys&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thats it! For more magic methods see &lt;a href="http://www.siafoo.net/article/57"&gt;Python __Underscore__ Methods&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2733454578487283824?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2733454578487283824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/08/custom-hash-objects-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2733454578487283824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2733454578487283824'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/08/custom-hash-objects-in-python.html' title='Custom hash objects in Python'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7341006560836897038</id><published>2008-08-04T19:55:00.005+05:30</published><updated>2008-08-04T20:04:13.137+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sierpinski triangle'/><category scheme='http://www.blogger.com/atom/ns#' term='pygame'/><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Sierpinski, my first fractal</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/SJcRpZndmMI/AAAAAAAAAHg/q9SbIslMJao/s1600-h/tri.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/SJcRpZndmMI/AAAAAAAAAHg/q9SbIslMJao/s400/tri.png" alt="" id="BLOGGER_PHOTO_ID_5230668895162833090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Sierpinski_triangle"&gt;The Sierpinski triangle&lt;/a&gt; in &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt;, inspired by &lt;a href="http://www.htdp.org/"&gt;HTDP&lt;/a&gt;, and using &lt;a href="http://www.pygame.org/"&gt;Pygame&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="overflow:auto"&gt;&lt;br /&gt;&lt;code style="overflow:auto"&gt;&lt;br /&gt;import sys&lt;br /&gt;import pygame&lt;br /&gt;from pygame.locals import *&lt;br /&gt;&lt;br /&gt;class Point(object):&lt;br /&gt;    def __init__(self, x, y):&lt;br /&gt;        self.x, self.y = x, y&lt;br /&gt;    &lt;br /&gt;    def distance_sq(self, other):&lt;br /&gt;        return (self.x-other.x)**2 + (self.y-other.y)**2&lt;br /&gt;    &lt;br /&gt;    def distance(self, other):&lt;br /&gt;        return sqrt(self.distance_sq(other))&lt;br /&gt;    &lt;br /&gt;    def tupl(self):&lt;br /&gt;        return (self.x, self.y)&lt;br /&gt;&lt;br /&gt;def midpt(p1, p2):&lt;br /&gt;    return Point( (p1.x+p2.x)/2, (p1.y+p2.y)/2 )&lt;br /&gt;&lt;br /&gt;def too_small(p1, p2, p3):&lt;br /&gt;    return max([ p1.distance_sq(p2), p2.distance_sq(p3), p3.distance_sq(p1) ]) &amp;lt; 5&lt;br /&gt;&lt;br /&gt;def draw_line(p1, p2, surf, col):&lt;br /&gt;    pygame.draw.line(surf, col, p1.tupl(), p2.tupl())&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;def draw_triangle(a, b, c, screen, col):&lt;br /&gt;    if too_small(a, b, c):&lt;br /&gt;        return&lt;br /&gt;    else:&lt;br /&gt;        a_b = midpt(a, b)&lt;br /&gt;        a_c = midpt(a, c)&lt;br /&gt;        b_c = midpt(b, c)&lt;br /&gt;        &lt;br /&gt;        draw_line(a, b, screen, col)&lt;br /&gt;        draw_line(b, c, screen, col)&lt;br /&gt;        draw_line(a, c, screen, col)&lt;br /&gt;        &lt;br /&gt;        draw_triangle(a, a_b, a_c, screen, col)&lt;br /&gt;        draw_triangle(b, a_b, b_c, screen, col)&lt;br /&gt;        draw_triangle(c, b_c, a_c, screen, col)&lt;br /&gt;        &lt;br /&gt;pygame.init()&lt;br /&gt;pygame.display.set_caption('Sierpinski')&lt;br /&gt;screen = pygame.display.set_mode((640,480))&lt;br /&gt;screen.fill((0, 0, 0))&lt;br /&gt;&lt;br /&gt;draw_triangle(Point(10, 10), Point(630, 10), Point(310, 450), screen, (255, 0, 0))&lt;br /&gt;draw_triangle(Point(50, 10), Point(630, 240), Point(310, 0), screen, (0, 255, 0))&lt;br /&gt;&lt;br /&gt;while True:&lt;br /&gt;    for event in pygame.event.get():&lt;br /&gt;        if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):&lt;br /&gt;            pygame.quit()&lt;br /&gt;            sys.exit()&lt;br /&gt;    pygame.display.update()&lt;br /&gt;        &lt;br /&gt;pygame.quit()&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7341006560836897038?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7341006560836897038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/08/sierpinski-my-first-fractal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7341006560836897038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7341006560836897038'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/08/sierpinski-my-first-fractal.html' title='Sierpinski, my first fractal'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/SJcRpZndmMI/AAAAAAAAAHg/q9SbIslMJao/s72-c/tri.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-2993555833911953192</id><published>2008-08-04T10:11:00.002+05:30</published><updated>2008-08-04T10:29:02.231+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='football'/><category scheme='http://www.blogger.com/atom/ns#' term='shoes'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>Great Weekend</title><content type='html'>So my second weekend in this place went pretty great. Now that I've found the right computer which easily boots from external devices I'm ready to slowly begin coding. On saturday five of us saw Ugly and Pagli — crappy movie — but I got my first pair of &lt;a href="http://en.wikipedia.org/wiki/Cleat_%28shoe%29"&gt;studs&lt;/a&gt;. Its been raining a lot for the last three days here. It starts at around 7 and goes on till late into the night, which means a lot of fun football (I've discovered that playing barefoot is better than playing with normal shoes), but being cooped up in the rooms afterwards.&lt;br /&gt;&lt;br /&gt;I also made some headway into &lt;a href="http://www.htdp.org/"&gt;How To Design Programs&lt;/a&gt; which is a really great book, and read almost all of &lt;a href="http://www.joelonsoftware.com/"&gt;Joel On Software (the book)&lt;/a&gt; which is entertaining to say the least.&lt;br /&gt;&lt;br /&gt;So right now I'm sitting here after attending a particularly boring calculus lecture. I haven't had a bath because there was no water, and I'm reading a boring story as part of the assignment for Communication Skills.&lt;br /&gt;&lt;br /&gt;Right now I'm replanning Graffiti since I &lt;a href="http://kodeclutz.blogspot.com/2008/07/graffiti-disaster.html"&gt;wiped it out&lt;/a&gt; a few weeks ago. I've also been messing around with Scheme, but can't think of what application to write to dig deeper into it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-2993555833911953192?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/2993555833911953192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/08/great-weekend.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2993555833911953192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/2993555833911953192'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/08/great-weekend.html' title='Great Weekend'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3067626126709803841</id><published>2008-07-29T16:33:00.000+05:30</published><updated>2008-07-29T16:39:38.503+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>A bit of improvement</title><content type='html'>I'm in the institute lab right now, booting from a pen drive (Slax). But tomorrow I'll get my external HDD and plug it in and try to be productive. These labs are only meant for 'academics' which means there are caps on downloads, so I can't even download firefox without it being interrupted. Also we haven't got our IDs yet, so this connection is thanks to a senior who was kind enough to let me use his account.&lt;br /&gt;&lt;br /&gt;Also there is a firewall/proxy which means no IM sites or IM protocols are allowed. This does kind of suck, but it is better than nothing. And this is only till December ( or so I hope ). Cheers, I'll update this tomorrow.&lt;br /&gt;&lt;br /&gt;PS. No CD drives on any computer, how do I install Arch? Probably go home and do it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3067626126709803841?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3067626126709803841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/bit-of-improvement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3067626126709803841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3067626126709803841'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/bit-of-improvement.html' title='A bit of improvement'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4405583452580353827</id><published>2008-07-28T15:34:00.002+05:30</published><updated>2008-07-28T15:38:01.858+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='boring'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Still no computer</title><content type='html'>So the second time I'm in a cyber cafe. In certain respects private universities aren't much better than public ones. We still haven't got ID cards, which means no net/linux access. Which means no coding too.&lt;br /&gt;&lt;br /&gt;Other than that its been pretty good, playing football and table tennis. But a bit tiring too. Its been raining a lot today, which means there isn't much to do. We had the first couple of lectures today, but nothing new was taught.&lt;br /&gt;&lt;br /&gt;This is boring, but the situation is likely to improve in a few days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4405583452580353827?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4405583452580353827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/still-no-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4405583452580353827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4405583452580353827'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/still-no-computer.html' title='Still no computer'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4081902163767439765</id><published>2008-07-25T11:14:00.003+05:30</published><updated>2008-07-25T11:21:12.560+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='boring'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>In DA-IICT</title><content type='html'>&lt;p&gt;Well, I'm here, or I've been here for 5 days now. Since we haven't got ID cards yet, there is no computer access, so I'm writing this from a cyber cafe. The last few days have been a bit boring. With no studies, playing and reading seem to be the only things you can do in &lt;strong&gt;24 HOURS!&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I haven't written any code in days, but I have managed to read &lt;a href="http://www.amazon.com/Programming-Haskell-Graham-Hutton/dp/0521692695/ref=pd_bbs_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1216964968&amp;amp;sr=8-1"&gt;Hutton's Haskell book&lt;/a&gt;, which is really good. This place's library is awesome for all the computer science/programming related books they have, now I just hope I'll have linux access in the labs. For atleast four more months personal computers are not allowed in the rooms. So it might be next year (read Jan 2009) before I actually have my own computer again. Till then I'll just hang on to the external harddisk.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4081902163767439765?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4081902163767439765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/in-da-iict.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4081902163767439765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4081902163767439765'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/in-da-iict.html' title='In DA-IICT'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7686782311109011683</id><published>2008-07-17T18:51:00.002+05:30</published><updated>2008-07-17T19:04:50.762+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='stupid'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><title type='text'>Graffiti: disaster</title><content type='html'>I &lt;a href="http://git.or.cz/"&gt;Gitted&lt;/a&gt; Graffiti yesterday, and made an error in adding the files to version control, so I decided to undo the changes and because Git complained, I added -f.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;git rm graffiti -rf&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;BOOM! Graffiti is gone.&lt;br /&gt;&lt;br /&gt;Except for the basic style parser which I was writing at that time, which was saved by Kate.&lt;br /&gt;&lt;br /&gt;I'm not blaming Git, just my stupidity.&lt;br /&gt;&lt;br /&gt;I usually don't version control as soon as I begin a project, since I like to get the structure right, without having really bad log comments. From next time, versioning first.&lt;br /&gt;&lt;br /&gt;In retrospect this is a really bad week. Experience isn't the most fun teacher.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7686782311109011683?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7686782311109011683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/graffiti-disaster.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7686782311109011683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7686782311109011683'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/graffiti-disaster.html' title='Graffiti: disaster'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-6666923743262916945</id><published>2008-07-17T18:44:00.004+05:30</published><updated>2008-07-17T18:51:48.426+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='study'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='computer science'/><title type='text'>Programming: The invisible wall</title><content type='html'>In the past few weeks, as I've &lt;a href="http://kodeclutz.blogspot.com/2008/07/graffiti-and-more.html"&gt;tried&lt;/a&gt; and &lt;a href="http://kodeclutz.blogspot.com/2008/07/failure-in-codejam-or-how-i-blew-up-my.html"&gt;failed&lt;/a&gt; at various projects, there has been a realisation that you can only go so far with random reading and coding.&lt;br /&gt;&lt;br /&gt;The first few years of programming are spent coding projects pretty minor on the algorithms/data structures side.&lt;br /&gt;&lt;br /&gt;But when you finally start growing out of it and when 'cool' projects for you start to become more complex, a seemingly invisible wall smacks you. The wall seperates amatuer and scientist. And unless you are/I am prepared to study, that wall isn't gonna give way.&lt;br /&gt;&lt;br /&gt;Crossing the wall is going to require some serious studying, where I actually try to solve the exercises at the back of &lt;a href="http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/0073523402/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1216300788&amp;amp;sr=1-1"&gt;Algorithms&lt;/a&gt; rather than just read the book. At college I'll probably be able to get my hands on a hard copy.&lt;br /&gt;&lt;br /&gt;And once this wall is broken, there will be more walls to break.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-6666923743262916945?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/6666923743262916945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/programming-invisible-wall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6666923743262916945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/6666923743262916945'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/programming-invisible-wall.html' title='Programming: The invisible wall'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-914081036951629739</id><published>2008-07-17T18:39:00.002+05:30</published><updated>2008-07-17T18:44:12.520+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='google code jam'/><title type='text'>A failure in the codejam or how I blew up my brain</title><content type='html'>Thursday morning, I saw the problems and took a printout of the Flyswatter. Then I spent about 3 hours figuring out the right area calculations, without success.&lt;br /&gt;&lt;br /&gt;Then I tried hacking away at the other 2 problems for a total of 1.75 hours. Again failed.&lt;br /&gt;&lt;br /&gt;Result: A total brain burnout&lt;br /&gt;&lt;br /&gt;Feeling: Really down for my not so leet algorithmic skills.&lt;br /&gt;&lt;br /&gt;Lesson learned: I seriously need 4 years of formal computer science education.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-914081036951629739?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/914081036951629739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/failure-in-codejam-or-how-i-blew-up-my.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/914081036951629739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/914081036951629739'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/failure-in-codejam-or-how-i-blew-up-my.html' title='A failure in the codejam or how I blew up my brain'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-1676068708283247250</id><published>2008-07-14T19:51:00.002+05:30</published><updated>2008-07-14T19:57:34.895+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='daiict'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Graffiti and more</title><content type='html'>It turns out parsing CSS according to specifications is no mean feat. So I am going to stall that for a moment, or implement a bare bones parser specifically written for Graffiti, and just plow along with Graffiti and doing what I can do, properly.&lt;br /&gt;&lt;br /&gt;Maybe later ( read quite a few months ) I'll write a nice SAC compliant CSS parser and hook it into Graffiti.&lt;br /&gt;&lt;br /&gt;Whatever I want to do, things aren't going to be moving fast. On Sunday I'm leaving for university ( &lt;a href="http://www.daiict.ac.in"&gt;DA-IICT&lt;/a&gt; ) and that involves a lot of pre-leaving things to do. And the week after that will go in getting settled there and taking a look at the computing facilities. I'll probably be taking a external HDD with all my files and I might just do a blind copy of this hard disk itself so I can boot Arch their if it is allowed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-1676068708283247250?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/1676068708283247250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/graffiti-and-more.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1676068708283247250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/1676068708283247250'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/graffiti-and-more.html' title='Graffiti and more'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-7190320344303534956</id><published>2008-07-12T10:16:00.003+05:30</published><updated>2008-07-12T10:24:13.520+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool'/><category scheme='http://www.blogger.com/atom/ns#' term='shoes'/><title type='text'>The best shoes I've ever seen</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8YErdCHGKN8/SHg4xCsRE4I/AAAAAAAAAHY/ESN7OhMNCOk/s1600-h/Photo-0104.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8YErdCHGKN8/SHg4xCsRE4I/AAAAAAAAAHY/ESN7OhMNCOk/s400/Photo-0104.jpg" alt="" id="BLOGGER_PHOTO_ID_5221986183123374978" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-7190320344303534956?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/7190320344303534956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/best-shoes-ive-ever-seen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7190320344303534956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/7190320344303534956'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/best-shoes-ive-ever-seen.html' title='The best shoes I&apos;ve ever seen'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8YErdCHGKN8/SHg4xCsRE4I/AAAAAAAAAHY/ESN7OhMNCOk/s72-c/Photo-0104.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-4224678772143319532</id><published>2008-07-10T17:13:00.005+05:30</published><updated>2008-07-10T17:51:07.778+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='program'/><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><category scheme='http://www.blogger.com/atom/ns#' term='google code jam'/><title type='text'>Always Turn Left</title><content type='html'>This is with reference to the &lt;a href="http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtcg4LEghjb250ZXN0cxh5DA"&gt;Google Code Jam practice problem&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;SPOILER WARNING: DISCUSSION ON THE SOLUTION BELOW&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This problem initially seemed vexing. After a little bit of thought about using bit twiddling to represent directions, generating the right codes was easy.&lt;br /&gt;&lt;br /&gt;If you have any experience with hexadecimal numbers, it should strike you that the direction table with 4 directions each of which can be yes or no, is a big hint that bit twiddles are exactly what is needed. Which means powers of two&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;N, S, W, E = 1, 2, 4, 8&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now I'm not going to show how you combine them, but here is how you get the code directly in Python ( somewhat similar in C ):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def code(dirs):&lt;br /&gt;return '%x'%dirs&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After this I scribbled a lot on paper, mapping the small input to the maze. It was easy to figure out that the problem could easily be solved by going both ways because always turn left means that you &lt;strong&gt;will&lt;/strong&gt; visit every part of the maze if you go both ways. I wasted a lot of time thinking how to orient the grid, until I read the specification that the entrace is always at the north.&lt;br /&gt;&lt;br /&gt;But there was another problem, how to generate a perfect size grid for a dynamic problem like that. I didn't want a 10000*10000 grid all the time, that would be very inelegant. First I tried using links for each Cell, but the problem is resolving W-E or N-S relationships would involve backtracking to find the adjacent Cell. This flummoxed me for a LONG time. Then I read João's idea [&lt;a href="http://groups.google.com/group/google-code/msg/03998b8542b7fa12"&gt;perfect maze size&lt;/a&gt;] and it hit me like a rock. This problem really requires you to break some preconceived notions, like a multidimensional array being the best representation for a Grid. A dictionary with coordinates as keys turned out to be perfect for this problem. After this the solution was dead simple, walk forward, preserving the right coordinates, then turn around and walk back, overlaying existing directions with new ones you find.&lt;br /&gt;&lt;br /&gt;Write a simple comparator function for coordinates, and use it to sort the grid and print it, and you have the &lt;a href="http://22bits.exofire.net/demos/maze.py"&gt;solution in Python&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In general the practice problems are creative, all they require a bit of common sense, some unconventional thinking and perhaps a few years of experience. Mainly it's about how &lt;strong&gt;elegant&lt;/strong&gt; your code can be. I'm just hoping the real ones will be easy too. &lt;s&gt;But irrespective of that, I'm not qualified to receive even a T-shirt, since I'm under age.&lt;/s&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-4224678772143319532?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/4224678772143319532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/always-turn-left.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4224678772143319532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/4224678772143319532'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/always-turn-left.html' title='Always Turn Left'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-9003517335548304887</id><published>2008-07-05T09:31:00.005+05:30</published><updated>2008-07-05T10:08:19.368+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='mark haddon'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Book Review: The Curious Incident of the Dog in the Night-time</title><content type='html'>&lt;strong&gt;The Curious Incident of the Dog in the Night-time by Mark Haddon&lt;/strong&gt; is a crime novel. Except it's written from the point of view of a 15 year old &lt;a href="http://en.wikipedia.org/wiki/Autism"&gt;autistic&lt;/a&gt; boy.&lt;br /&gt;&lt;br /&gt;This book was actually released in 2003 so I'm a bit late for the review, but I just stumbled upon it a few days ago at a friend's place. And the bright colour and really long rambling title really intrigued me.&lt;br /&gt;&lt;br /&gt;So, meet Cristopher Boone, who wants to be an astronaut, loves animals more than humans, has a photographic memory and brilliant logic but can't tell what other people feel and has no notion of metaphors and cultural references. Unlike many of us he cannot follow the 'I am thinking about what you are thinking about what I'm thinking' process that often happens. The only concept of emotion he has is a list of emoticons expressing common faces.&lt;br /&gt;&lt;br /&gt;Haddon does not try to invoke pity, Christopher is in no way purposely projected as someone worse than us. He lives with his Father and thinks his Mother is dead. When his neighbour's dog is killed he sets off to find the killer in an independent manner, in the process escapes to London and comes to reality with the fate of his Mother.&lt;br /&gt;&lt;br /&gt;Since the story is told from his view, and his lack of emotion and future projection means that he has no reason to lie leads to a &lt;strong&gt;very&lt;/strong&gt; truthful story, even to the point of making normal readers squeamish. He writes about poo, and sex and swear words with no change in tone than if he was talking about the weather. He doesn't feel death when he narrowly misses it and when he gets an A grade in his Math A-levels the only thing he feels is&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8YErdCHGKN8/SG72M4Di18I/AAAAAAAAAHQ/fLPV8RAqsB4/s1600-h/Smiley.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8YErdCHGKN8/SG72M4Di18I/AAAAAAAAAHQ/fLPV8RAqsB4/s400/Smiley.png" alt="" id="BLOGGER_PHOTO_ID_5219379719235098562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;At 134 pages the book is a quick read and there is no actual crime-solving but Christopher's need to fit into the world is very well written and a window into the mind of autistic people. At the same time it lets us marvel at the beauty of our brain to &lt;strong&gt;reject&lt;/strong&gt; so much information and yet generate so much of its own with no bindings to any law.&lt;br /&gt;&lt;br /&gt;Along the way the book has a sprinkling of math, including naming all chapters with prime numbers. Christopher almost always goes on cubing natural numbers or mentally calculating powers of 2  just to &lt;strong&gt;overcome nausea.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I doubled 2's in my head because it made me feel calmer. I got to 33554432, which is 2&lt;sup&gt;25&lt;/sup&gt;, which was not very much because I've got to 2&lt;sup&gt;43&lt;/sup&gt; before, but my brain wasn't working very well.&lt;br /&gt;-- Christopher Boone&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;But at the core the book is humourous with Christopher's long rambling sentences and attention to details leaving you chuckling. Mark Haddon has done an excellent job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-9003517335548304887?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/9003517335548304887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/book-review-curious-incident-of-dog-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9003517335548304887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/9003517335548304887'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/book-review-curious-incident-of-dog-in.html' title='Book Review: The Curious Incident of the Dog in the Night-time'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_8YErdCHGKN8/SG72M4Di18I/AAAAAAAAAHQ/fLPV8RAqsB4/s72-c/Smiley.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3665064696228706104.post-3715133703494361452</id><published>2008-07-04T08:08:00.002+05:30</published><updated>2008-07-04T08:16:53.072+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='stupid'/><category scheme='http://www.blogger.com/atom/ns#' term='annoyances'/><title type='text'>He stole the words out of my mouth :)</title><content type='html'>&lt;a href="http://camendesign.com/?200806291241"&gt;CamenDesign: A List Of People Who Need To Stop Writing Software&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'd also add Creative Nero, Adobe PDF Reader and &lt;a href="http://www.reliable.co.in/NewWeb/Services/Falcon%20Eq,FO/Main%20Page/Falcon%20Eq,%20F&amp;amp;O.htm"&gt;Falcon&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Half of "Windows Pain" comes from the crummy applications sitting on top of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3665064696228706104-3715133703494361452?l=blog.nikhilism.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.nikhilism.com/feeds/3715133703494361452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.nikhilism.com/2008/07/he-stole-words-out-of-my-mouth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3715133703494361452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3665064696228706104/posts/default/3715133703494361452'/><link rel='alternate' type='text/html' href='http://blog.nikhilism.com/2008/07/he-stole-words-out-of-my-mouth.html' title='He stole the words out of my mouth :)'/><author><name>Nikhil</name><uri>http://www.blogger.com/profile/02751486022348919717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
