<?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-361580925428658432</id><updated>2011-10-10T08:09:53.002+05:30</updated><category term='books web code'/><category term='c#'/><category term='emacs keybinding chrome gnome'/><category term='wily introscope frustrated'/><category term='ui round corner GWT'/><category term='javascript'/><category term='java'/><category term='object oriented'/><category term='GWT UI compiler dojo'/><category term='keyboard'/><category term='windows shell'/><category term='GWT UI'/><category term='java eclipse compiler bug'/><category term='encapsulation'/><category term='google chrome pdf'/><category term='python dict gotchas'/><title type='text'>.code</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>dog</name><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>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-3876144997932389994</id><published>2011-01-31T20:49:00.000+05:30</published><updated>2011-01-31T20:49:55.850+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs keybinding chrome gnome'/><title type='text'>emacs keybinding for chrome in gnome</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;"&gt;Type this in the terminal&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;"&gt;gconftool-2 --set /desktop/gnome/interface/gtk_key_theme Emacs --type string&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'dejavu sans mono', monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; white-space: pre-wrap;"&gt;and below shortcuts work. Thanks to &lt;/span&gt;&lt;/span&gt;&lt;a href="http://kb.mozillazine.org/Emacs_Keybindings_-_Firefox"&gt;http://kb.mozillazine.org/Emacs_Keybindings_-_Firefox&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'dejavu sans mono', monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'dejavu sans mono', monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: none; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-size-adjust: auto; font-family: sans-serif; font-size: 11px; white-space: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="1" cellpadding="5" rules="all" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-size: 11px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ctrl+A&lt;/td&gt;&lt;td&gt;Go to beginning of line&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+E&lt;/td&gt;&lt;td&gt;Go to end of line&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+F&lt;/td&gt;&lt;td&gt;Go right one character&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+B&lt;/td&gt;&lt;td&gt;Go left one character&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+P&lt;/td&gt;&lt;td&gt;Go to previous line ("up") (only works in multiline text areas)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+N&lt;/td&gt;&lt;td&gt;Go to next line ("down") (only works in multiline text areas)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+K&lt;/td&gt;&lt;td&gt;Delete to end of line (if cursor is at the end of the line, deletes the following newline)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+U&lt;/td&gt;&lt;td&gt;Delete entire line (different from readline, in which Ctrl+U deletes to the beginning of the line)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+W&lt;/td&gt;&lt;td&gt;Delete word, left&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+H&lt;/td&gt;&lt;td&gt;Delete character, left (backspace)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ctrl+D&lt;/td&gt;&lt;td&gt;Delete character, right&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-3876144997932389994?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/3876144997932389994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=3876144997932389994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/3876144997932389994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/3876144997932389994'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2011/01/emacs-keybinding-for-chrome-in-gnome.html' title='emacs keybinding for chrome in gnome'/><author><name>dog</name><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-361580925428658432.post-6666691653925260782</id><published>2010-12-04T15:53:00.000+05:30</published><updated>2010-12-04T15:53:20.165+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='google chrome pdf'/><title type='text'>PDF viewer in Google Chrome</title><content type='html'>Google Chrome has enabled PDF rendering in their &lt;a href="http://www.google.com/landing/chrome/beta/"&gt;latest beta&lt;/a&gt;. It's fast as expected and the rendering seems good compared to &lt;a href="http://projects.gnome.org/evince/"&gt;evince&lt;/a&gt;. See the screenshots below.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_05G-zoiSPGc/TPoWF_gxMTI/AAAAAAAAAic/tYuHiHUs970/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://1.bp.blogspot.com/_05G-zoiSPGc/TPoWF_gxMTI/AAAAAAAAAic/tYuHiHUs970/s320/Screenshot-1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_05G-zoiSPGc/TPoWGaursYI/AAAAAAAAAig/d0Lr7GjWVMM/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://3.bp.blogspot.com/_05G-zoiSPGc/TPoWGaursYI/AAAAAAAAAig/d0Lr7GjWVMM/s320/Screenshot.png" width="320" /&gt;&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/361580925428658432-6666691653925260782?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/6666691653925260782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=6666691653925260782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6666691653925260782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6666691653925260782'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2010/12/pdf-viewer-in-google-chrome.html' title='PDF viewer in Google Chrome'/><author><name>dog</name><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/_05G-zoiSPGc/TPoWF_gxMTI/AAAAAAAAAic/tYuHiHUs970/s72-c/Screenshot-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-8352973042553505973</id><published>2010-12-01T19:08:00.005+05:30</published><updated>2010-12-03T06:36:39.465+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='encapsulation'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='object oriented'/><title type='text'>private members</title><content type='html'>In languages like java/c# private members of an object are not accessible by objects of other classes. But they are accessible by other objects in the same class.&lt;br /&gt;&lt;br /&gt;for e.g.&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;br /&gt;class A {&lt;br /&gt;  private int secret;&lt;br /&gt;&lt;br /&gt;  A(int secret) {&lt;br /&gt;      this.secret = secret;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  void printSecret(A otherObject) {&lt;br /&gt;      Console.WriteLine(otherObject.secret);&lt;br /&gt;  }&lt;br /&gt;}&lt;div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;And then&lt;div&gt;&lt;pre&gt;&lt;br /&gt;var x = new A(42);&lt;br /&gt;var y = new A(43);&lt;br /&gt;&lt;br /&gt;x.printSecret(y);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You see that x is able to access the secret of y. The protection mechanism in these languages are class oriented and not object oriented.&lt;br /&gt;&lt;br /&gt;In JavaScript using functional style classes we get access restriction across objects&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;function A(secret) {&lt;br /&gt;  var self = {};&lt;br /&gt;&lt;br /&gt;  self.printSecret = function(otherObject) {&lt;br /&gt;      //Won't work as secret is a closed variable within A and not part of self&lt;br /&gt;      alert(otherObject.secret);&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;  return self;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var x = A(42);&lt;br /&gt;var y = B(43);&lt;br /&gt;x.printSecret(y); //x cannot access y's secret&lt;br /&gt;  &lt;/pre&gt;&lt;br /&gt;disclaimer: expect compiler errors as I am writing this directly into the blog editor. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-8352973042553505973?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/8352973042553505973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=8352973042553505973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/8352973042553505973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/8352973042553505973'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2010/12/private-members.html' title='private members'/><author><name>dog</name><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-361580925428658432.post-2260206067855327996</id><published>2009-11-03T21:04:00.002+05:30</published><updated>2009-11-03T21:17:11.921+05:30</updated><title type='text'>xmonad</title><content type='html'>There were many reasons i switched to emacs. I do hate emacs also, but all those are for another post. One of the reasons i found hooked to emacs was the window management (or panes as you call it in normal world). Many times i wondered how it would be like to have something like that for normal windows.&lt;br /&gt;Enter XMonad. It's an automatic tiling window manager. If you are in an old microsoft windows (i don't have access to a newer one right now), try clicking the taskbar and do tile all windows. If i can remember correctly, all the windows will align itself in the screen so that no screen space is wasted and you can see all of them. XMonad is something like that except whenever you open any window, you automatically tile the window.&lt;br /&gt;This is really cool while working. When working you don't want interference from anything. Usually i'll open my editor (emacs), documentation, browsers etc. XMonad automatically fills all these in my screens so that i don't have to worry about resize/maximize/minimize the windows as you do in an ordinary window manager. I got all the power to view all the window, or view only a window. The keyboard shortcuts to learn are minimal.&lt;br /&gt;Another reason to switch was the second monitor i got. I realized that i was not using the second monitor all the time unlike i should have had. Now i put my emacs in the main screen and all the others in the second.&lt;br /&gt;Try it out. I do use gnome/kde while not working as i'm used to normal window managers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-2260206067855327996?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/2260206067855327996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=2260206067855327996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/2260206067855327996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/2260206067855327996'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2009/11/xmonad.html' title='xmonad'/><author><name>dog</name><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-361580925428658432.post-6588850539290161364</id><published>2009-07-24T12:56:00.002+05:30</published><updated>2009-07-24T13:13:37.394+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python dict gotchas'/><title type='text'>dict bites</title><content type='html'>Python dict has a nice method called setdefault which sets a value if key is missing, and finally returns the value for the key&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d = {}&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d.setdefault('x', []).append(42)&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d&lt;br /&gt;   {'x': [42]}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;which is almost similar to&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d = {}&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; if 'x' not in d:&lt;br /&gt;   ...     d['x'] = []&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d['x'].append(42)&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d&lt;br /&gt;   {'x': [42]}&lt;br /&gt;&lt;/pre&gt;   &lt;br /&gt;The setdefault is really handy when you have many nested dicts. But today it bit me. I didn't take into account that parameter you pass to a function will be evaluated first. So that second parameter you pass to setdefault will be evaluated even though the dict already&lt;br /&gt;contains the key. Let me give you an example&lt;br /&gt;&lt;br /&gt;Say i have a Value class which maintains no of instances created&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; class Value(object):&lt;br /&gt;   ...     count = 0&lt;br /&gt;   ...     def __init__(self):&lt;br /&gt;   ...         Value.count += 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and i use this in setdefault&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; v = Value()&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; v&lt;br /&gt;   &amp;lt;Value object at 0x884d56c&amp;gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d = {'x': v}&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d['x']&lt;br /&gt;   &amp;lt;Value object at 0x884d56c&amp;gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d.setdefault('x', Value())&lt;br /&gt;   &amp;lt;Value object at 0x884d56c&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Everything seems fine till now. The setdefault correctly returned existing Value object for the key 'x'. But if you check the no of instances created&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; Value.count&lt;br /&gt;   2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So that's right. The second parameter passed to setdefault in the last step got evaluated and it had side effect. It's obvious now but easy to overlook.&lt;br /&gt;&lt;br /&gt;Another interesting thing in python is defaultdict. It returns a default value if key is not present. Again there's a catch there that a lookup will actually insert the value.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; from collections import defaultdict&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d = defaultdict(lambda: 42)&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d['x'] = 100&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d&lt;br /&gt;   defaultdict(&amp;lt;function &amp;lt;lambda&amp;gt; at 0xb7dfb8ec&amp;gt;, {'x': 100})&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d['y']&lt;br /&gt;   42&lt;br /&gt;   &amp;gt;&amp;gt;&amp;gt; d&lt;br /&gt;   defaultdict(&amp;lt;function &amp;lt;lambda&amp;gt; at 0xb7dfb8ec&amp;gt;, {'y': 42, 'x': 100})&lt;br /&gt;&lt;/pre&gt;   &lt;br /&gt;As you see i did a lookup of 'y' and it correctly returned the default value 42. But it also inserted that in the dict. Easy to miss this side effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-6588850539290161364?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/6588850539290161364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=6588850539290161364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6588850539290161364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6588850539290161364'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2009/07/dict-bites.html' title='dict bites'/><author><name>dog</name><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-361580925428658432.post-1441125062622728378</id><published>2009-07-23T22:18:00.004+05:30</published><updated>2009-07-23T22:40:36.882+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='keyboard'/><title type='text'>A new keyboard</title><content type='html'>I got myself a &lt;a href="http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=043"&gt;Microsoft Ergonomic keyboard 4000&lt;/a&gt; today. Actually my mouse middle button stopped working sometime back, so i thought i'll get a new keyboard as well apart from the mouse. Two main things i don't like about the keyboard are&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The 'b' key is on the left. I had learned typing for a month or so during my school days. They taught me to use the right hand for the b key. Now i have to relearn that. I am wondering why they made me use my right hand :?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The space key. It's bad. There's a big friction between the space key and the plastic that surrounds it. I have put some lubricant, but not so much help.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_05G-zoiSPGc/SmiYjrsOn1I/AAAAAAAAAX0/oS4cAdK4j_Y/s1600-h/image_thumb.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 343px;" src="http://3.bp.blogspot.com/_05G-zoiSPGc/SmiYjrsOn1I/AAAAAAAAAX0/oS4cAdK4j_Y/s400/image_thumb.png" alt="" id="BLOGGER_PHOTO_ID_5361703095175651154" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;The keys are not so much better compared to my previous one (it cost around 5 times more than a normal keyboard). The leathery arm rest is nice and i hope to get adjusted to this one soon hopefully. The control key is big and will help me in emacs. Interestingly most of the extra keys work right out of the box for ubuntu. The volume keys, search, calc etc works properly. The zoom thing right in the middle of the keyboard doesn't work. I have to checkout &lt;a href="http://keytouch.sourceforge.net/"&gt;keytouch&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-1441125062622728378?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/1441125062622728378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=1441125062622728378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1441125062622728378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1441125062622728378'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2009/07/new-keyboard.html' title='A new keyboard'/><author><name>dog</name><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/_05G-zoiSPGc/SmiYjrsOn1I/AAAAAAAAAX0/oS4cAdK4j_Y/s72-c/image_thumb.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-451582781632117369</id><published>2008-06-25T15:34:00.002+05:30</published><updated>2008-06-25T15:40:32.883+05:30</updated><title type='text'>A problem statement</title><content type='html'>Try to implement this in your language and tell me how it goes.&lt;br /&gt;&lt;br /&gt;Problem Statement&lt;br /&gt;&lt;br /&gt;There is a class/struct/record Node which is something like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Node {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Node next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    string value;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It has a default constructor, so you can call new Node().&lt;br /&gt;&lt;br /&gt;Implement a function (or something similar) with which it should be possible to say&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;safeAssign(node.next.next.next.next.value, "dragon")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and it should create any next objects if not present and finally assign the value to dragon. It should not cause any null pointer exception. You should not modify the Node class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-451582781632117369?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/451582781632117369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=451582781632117369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/451582781632117369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/451582781632117369'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/06/problem-statement.html' title='A problem statement'/><author><name>dog</name><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-361580925428658432.post-5427456130800867615</id><published>2008-06-10T14:35:00.004+05:30</published><updated>2008-06-10T14:58:03.905+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='wily introscope frustrated'/><title type='text'>Introscope</title><content type='html'>At work i'm trying to use &lt;a href="http://www.wilytech.com/solutions/products/Introscope.html"&gt;wily introscope&lt;/a&gt; for checking out application performance. As a starting point, i want to know how much time each method takes for a request and also the memory consumption for each request.&lt;br /&gt;&lt;br /&gt;My experience with the tool has been really bad so far. All the configurations are done through property files. You need to specify the classes you need to analyze in some property files. Suppose you want to analyze a class and all the subclass of it, well there is no way decent way to do that prior to java 5 (i don't know what they've done with java 5 which makes this possible). As far as i know, they inject their code in the bytecode at interesting points.&lt;br /&gt;I spent some time in figuring out how to analyze all the classes in a particular package and failed. And whereever i read, anything which touches many class files are not recommended by introscope. If i know the classes which are taking time, they why would i need to analyze anyway?&lt;br /&gt;&lt;br /&gt;Turned out there was an option to do that. It's something like&lt;br /&gt;&lt;br /&gt;SetFlag: X&lt;br /&gt;TurnOn: X&lt;br /&gt;IdentifyMatchingClassesAs: "com.example*" X&lt;br /&gt;TraceAllMethodsIfFlagged: X BlamePointTracer "Perf|{packagename}|{classname}|{method}"&lt;br /&gt;&lt;br /&gt;The viewer (which requires a j2ee server of it's own) is so sluggish. I am not sure if it's because of turning on all the classes.&lt;br /&gt;&lt;br /&gt;I was able to trace a single soap request. But turns out certain classes are not traced part of the request, and they come as separate trace. Sometime back i read about a single request tracing tool somewhere. They inject some metadata into the request and whereever code is touched, the metadata is transferred. I wonder introscope uses such mechanism?&lt;br /&gt;&lt;br /&gt;Today i tried to change the config file and restart the app server. Well, introscope stopped working. A look at log file suggested that the problem was in the line&lt;br /&gt;&lt;br /&gt;introscope.autoprobe.directivesFile=perf.pbd, leakhunter.pbd&lt;br /&gt;&lt;br /&gt;it failed because of the space after the ',' ! It tried to load ' leakhunter.pbd' and failed. Now i want to know who in the world codes without stripping extraneous spaces in a config file. sigh!&lt;br /&gt;&lt;br /&gt;Regarding memory analysis. I was excited to  see something called LeakHunter. Well reading at docs suggests that it can only check if any java.util collections classes are growing over a period of time (by checking it's size() method). Nothing good.&lt;br /&gt;&lt;br /&gt;I really really hope they still have something good and i'm not wasting my time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-5427456130800867615?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/5427456130800867615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=5427456130800867615' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/5427456130800867615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/5427456130800867615'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/06/introscope.html' title='Introscope'/><author><name>dog</name><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-361580925428658432.post-6963516029491428010</id><published>2008-05-30T11:48:00.005+05:30</published><updated>2008-05-30T12:06:32.197+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows shell'/><title type='text'>windows console</title><content type='html'>One of the major things that's missing in windows is a decent command window. The command interpreter in windows is not as good as bash, but it's decent enough for many things. If you think interpreter is bad, you can use &lt;a href="http://www.cygwin.com/"&gt;cygwin&lt;/a&gt;. And now there is &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;powershell&lt;/a&gt;. I am yet to try out powershell (which reminds me of the book i have to &lt;a href="http://www.oreilly.com/catalog/9780596521783/"&gt;read &lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The pain is in managing multiple command prompts. In gnome or kde, you can open multiple tabs and navigate easily. When you are working with vim, you would want to code in one tab, execute in another. I used emacs in windows just for this reason. Emacs can have multiple buffers and multiple windows. It has a shell command which emulates the command prompt. But it's not that great and the mysql command prompt don't work over there.&lt;br /&gt;Another pain is the font. For a long time i didn't know that anything existed beyond the default raster fonts. There is an option btw, the Lucida Console font. It will look crappy if you don't &lt;a href="http://www.microsoft.com/typography/cleartype/tuner/Step1.aspx"&gt;enable cleartype&lt;/a&gt;. If i get an option, i would love to use &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&amp;amp;displaylang=en"&gt;consolas&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Well, here comes &lt;a href="http://sourceforge.net/projects/console/"&gt;Console&lt;/a&gt;. It has both the features which i longed for. You have configurable keyboard shortcuts, transparancy (if you're into that sort of things), configurable command interpreters. Download the beta and try it out.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://sourceforge.net/projects/console/"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_05G-zoiSPGc/SD-eskLdcSI/AAAAAAAAAKw/jbeuNo14feg/s400/console.png" alt="" id="BLOGGER_PHOTO_ID_5206054182726758690" 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/361580925428658432-6963516029491428010?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/6963516029491428010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=6963516029491428010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6963516029491428010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/6963516029491428010'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/05/windows-console.html' title='windows console'/><author><name>dog</name><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://bp0.blogger.com/_05G-zoiSPGc/SD-eskLdcSI/AAAAAAAAAKw/jbeuNo14feg/s72-c/console.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-9005091757022336094</id><published>2008-05-09T19:06:00.003+05:30</published><updated>2008-05-09T19:49:44.929+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='books web code'/><title type='text'>books i picked</title><content type='html'>I picked up three books today&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596529260/"&gt;&lt;br /&gt;RESTful Web Services&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596529260/toc.html"&gt;&lt;img alt="RESTful Web Services" src="http://www.oreilly.com/catalog/covers/9780596529260_cat.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've been hearing enough about resource oriented architecture, APP etc. Though i don't plan to publish any web related apis in near future, it would be good to know about this. At work I've been using only SOAP web services and been quite ignorant about everything. Last i tried reading &lt;a href="http://safari.oreilly.com/0321146182"&gt;J2EE web services&lt;/a&gt; and quit somewhere in between and only to be &lt;a href="http://web.archive.org/web/20070401220650/rmh.blogs.com/weblog/2005/06/jaxrpc_is_bad_b.html"&gt;told by the author&lt;/a&gt; that it's complex over engineered thing. Maybe reading this book help me in designing simple web services. I've read some parts of it this afternoon and it looks promising.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596102357/"&gt;Building Scalable Web Sites&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596102357/toc.html"&gt;&lt;br /&gt;&lt;img alt="Building Scalable Web Sites" src="http://www.oreilly.com/catalog/covers/0596102356_cat.gif" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;This one is by the lead engineer from flickr. Can't wait to read it&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596510046/"&gt;&lt;br /&gt;Beautiful Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/9780596510046/toc.html"&gt;&lt;br /&gt;&lt;img alt="Beautiful Code" src="http://www.oreilly.com/catalog/covers/9780596510046_cat.gif" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;I've been reading some chapters of this book sometime back. This book didn't get through that much attention i think. (read &lt;a href="http://en.wikipedia.org/wiki/Bryan_Cantrill"&gt;Bryan Cantrill&lt;/a&gt;'s &lt;a href="http://blogs.sun.com/bmc/entry/beautiful_code"&gt;entry&lt;/a&gt;). &lt;br /&gt;There is a &lt;a href="http://beautifulcode.oreillynet.com/"&gt;companion website&lt;/a&gt; to this book where people discuss beautiful code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-9005091757022336094?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/9005091757022336094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=9005091757022336094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/9005091757022336094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/9005091757022336094'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/05/books-i-picked.html' title='books i picked'/><author><name>dog</name><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-361580925428658432.post-4567949564741602532</id><published>2008-05-06T17:22:00.004+05:30</published><updated>2008-05-06T17:55:52.067+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ui round corner GWT'/><title type='text'>Rounded Corners</title><content type='html'>Rounded corners adds nice touch to user interface. Read this &lt;a href="http://www.folklore.org/StoryView.py?story=Round_Rects_Are_Everywhere.txt"&gt;macintosh story&lt;/a&gt;.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Quoting from the aritcle&lt;br /&gt;&lt;blockquote&gt;Steve suddenly got more intense. "Rectangles with rounded corners are everywhere! Just look around this room!". And sure enough, there were lots of them, like the whiteboard and some of the desks and tables. Then he pointed out the window. "And look outside, there's even more, practically everywhere you look!". He even persuaded Bill to take a quick walk around the block with him, pointing out every rectangle with rounded corners that he could find. &lt;/blockquote&gt;And of course i want rounded corners in my UI. I searched around how to add rounded corners and got lots of way involving css, javascript and images. Most of the ones which i looked involved some complexity be it by wrapping content in four or five divs, adding a javascript library, adding external image etc. I almost decided to create a custom GWT panel by wrapping the techniques used by one of  libraries.&lt;br /&gt;&lt;br /&gt;Then i thought of seeing how google's UI implemented rounded corners. I fired up my firebug and started searching. It was a little disappointing to see both GMail and Google Reader using background images to rounded corners. Then i looked at Google Mashup Editor and i found some simple CSS properties that they've used.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_05G-zoiSPGc/SCBJ_TLAIPI/AAAAAAAAAJw/pElHSvSxkPo/s1600-h/ff.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_05G-zoiSPGc/SCBJ_TLAIPI/AAAAAAAAAJw/pElHSvSxkPo/s400/ff.png" alt="" id="BLOGGER_PHOTO_ID_5197235321812558066" border="0" /&gt;&lt;/a&gt;But they looked mozilla specific. So i opened the editor in IE and sure enough, rounded corners are not there. &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_05G-zoiSPGc/SCBKJzLAIQI/AAAAAAAAAJ4/-XJP4gxY_vg/s1600-h/ie.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_05G-zoiSPGc/SCBKJzLAIQI/AAAAAAAAAJ4/-XJP4gxY_vg/s400/ie.png" alt="" id="BLOGGER_PHOTO_ID_5197235502201184514" border="0" /&gt;&lt;/a&gt;It's interesting that they've decided not to have this style in IE. Maybe mashups are only created by people using firefox :)&lt;br /&gt;&lt;br /&gt;I've decided to add the same thing to my UI as it's the simplest of the approaches i've seen.  These are the properties&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;-moz-border-radius-topleft&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;-moz-border-radius-topright&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;-moz-border-radius-bottomleft&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;-moz-border-radius-bottomright&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: gray; text-align: justify; -moz-border-radius-topright: 0.5em; -moz-border-radius-bottomleft: 0.5em; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-topleft: 0.5em; vertical-align: middle;"&gt;&lt;br /&gt;And here is the example. If you are viewing this blog in firefox, you will see this text in rounded corners.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&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/361580925428658432-4567949564741602532?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/4567949564741602532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=4567949564741602532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/4567949564741602532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/4567949564741602532'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/05/rounded-corners.html' title='Rounded Corners'/><author><name>dog</name><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://bp3.blogger.com/_05G-zoiSPGc/SCBJ_TLAIPI/AAAAAAAAAJw/pElHSvSxkPo/s72-c/ff.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-1193721936491765634</id><published>2008-04-29T17:21:00.000+05:30</published><updated>2008-04-29T17:35:27.104+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java eclipse compiler bug'/><title type='text'>Compiler fix in eclipse</title><content type='html'>&lt;div style="text-align: justify;"&gt;Eclipse uses its own compiler called ecj. You can download is as a standalone jar file. It is an &lt;a href="http://en.wikipedia.org/wiki/Incremental_compiler"&gt;incremental compiler&lt;/a&gt; . I guess they had to write that because at the time sun's javac was a batch compiler. &lt;a href="http://jcp.org/en/jsr/detail?id=199"&gt;JSR 199&lt;/a&gt; now provides programmatic apis to the compiler, and probably we can build eclipse kindof editors with these apis. I haven't read the apis though.&lt;br /&gt;Anyway, sometime back while i was reading the Java Puzzlers book, while checking out puzzle 37, i found that eclipse compiler didn't work as it was expected.  So i &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=209429"&gt;filed a bug&lt;/a&gt;. You can read the puzzler there. The example is kindof weird and i can't think of a usecase for that right now. The bug is fixed now and i just verified it in the I20080429-0100 build.&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/361580925428658432-1193721936491765634?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/1193721936491765634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=1193721936491765634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1193721936491765634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1193721936491765634'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/04/compiler-fix-in-eclipse.html' title='Compiler fix in eclipse'/><author><name>dog</name><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-361580925428658432.post-8220810125487704005</id><published>2008-04-29T02:11:00.000+05:30</published><updated>2008-04-29T02:26:54.774+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT UI compiler dojo'/><title type='text'>GWT updates</title><content type='html'>I came home today and started the layout design fresh. I used DockPanel everywhere and used the setCellHeight/setCellWidth api with percentages. To my surprise everything worked as i expected it to be. I was in joy. Sadly it was shortlived one. When i started testing it in firefox, the ScrollPanel no longer scrolled. It increased the page height with the size of the inner contents instead of giving a scroll bar. A little bit searching found that this was a bug (GWT issue 316). I tried modifying different style options in firebug, but was unable to do anything useful. The interesting thing here was it worked in IE as well as in the hosted mode (i think the hosted mode uses some old firefox).&lt;br /&gt;I gave up. I had options to hardcode the size in pixels (that worked, but percentages doesn't) and somehow listen to browser resize events to dynamically modify the size. I guess the mashup editor is doing that.&lt;br /&gt;&lt;br /&gt;All is not lost yet!&lt;br /&gt;I remembered that once when i used a SplitPanel, it put a scrollbar inside. Why not use SplitPanel instead of ScrollPanel? And it perfectly suits my needs in this particular UI. I tried it and it works like a charm, even in firefox. So my main layout tools now in GWT are DockPanel and Vertical/Horizontal SplitPanels. I bet there are tons of other glitches as well. Patiently waiting for other surprises.&lt;br /&gt;&lt;br /&gt;While compiling from the shell, i got weird  OutOfMemoryException in compiler while checking some permutation. Wonder what they are doing to cause this :(&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_05G-zoiSPGc/SBY5XDLAIOI/AAAAAAAAAJQ/_eoNi3ZQWuU/s1600-h/compiler_error.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_05G-zoiSPGc/SBY5XDLAIOI/AAAAAAAAAJQ/_eoNi3ZQWuU/s400/compiler_error.PNG" alt="" id="BLOGGER_PHOTO_ID_5194402288369672418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;p.s I couldn't find any scroll related panel in dojo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-8220810125487704005?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/8220810125487704005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=8220810125487704005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/8220810125487704005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/8220810125487704005'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/04/gwt-updates.html' title='GWT updates'/><author><name>dog</name><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://bp0.blogger.com/_05G-zoiSPGc/SBY5XDLAIOI/AAAAAAAAAJQ/_eoNi3ZQWuU/s72-c/compiler_error.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-361580925428658432.post-1860010900833637970</id><published>2008-04-28T15:04:00.000+05:30</published><updated>2008-04-28T15:54:50.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT UI'/><title type='text'>Layout woes</title><content type='html'>I've been trying out &lt;a href="http://code.google.com/webtoolkit/"&gt;GWT &lt;/a&gt;for my project from last week. Everything looks wonderful except layout. It doesn't do as what i want. The DockPanel for example doesn't dock things like it ought to do. So i checked the generated html in &lt;a href="http://www.getfirebug.com/"&gt;firebug &lt;/a&gt;and found that they actually use tables for panels. Setting the cell's horizontal and vertical alignments helped me most of the times.&lt;br /&gt;Interestingly the UI which i designed first in &lt;a href="http://dojotoolkit.org"&gt;dojo &lt;/a&gt;looks similar to the &lt;a href="http://editor.googlemashups.com/editor"&gt;Google Mashup Editor&lt;/a&gt;. I would have given up on GWT if not for the mashup editor. It is written in GWT and works like charm. I love its simplicity. If you have seen some of the dojo examples (the beta &lt;a href="https://beta.bloglines.com/"&gt;bloglines &lt;/a&gt;comes to mind), you would appreciate the simplicity of google designers.&lt;br /&gt;So anyway, i am checking out mashup editor through firebug and found one class called gwt-VerticalExpander to be doing what i wants. The only css knowledge i have is from last two days when i tried reading the&lt;a href="http://www.amazon.com/Cascading-Style-Sheets-Designing-Web/dp/0321193121"&gt; CSS book&lt;/a&gt; (btw i found this book to be much readable from others)&lt;br /&gt;Once all these are resolved, i will try to post the quirks in GWT.&lt;br /&gt;&lt;br /&gt;My requirements are - the application should fit the viewport. No hardcoding of pixels (i am ready to use em units at some places). The application UI is very similar to mashup editor, but i would love if the sidebar was a draggable split panel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/361580925428658432-1860010900833637970?l=shibinck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shibinck.blogspot.com/feeds/1860010900833637970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=361580925428658432&amp;postID=1860010900833637970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1860010900833637970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/361580925428658432/posts/default/1860010900833637970'/><link rel='alternate' type='text/html' href='http://shibinck.blogspot.com/2008/04/layout-woes.html' title='Layout woes'/><author><name>dog</name><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>
