<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>If you fix bugs long enough, bugs start fixing you</title><generator>Tumblr (3.0; @antonkovalyov)</generator><link>http://self.kovalyov.net/</link><item><title>
Everything’s Better with a British Accent.
</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_kz26dkZ7Bn1qzufyno1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;
&lt;p&gt;Everything’s Better with a British Accent.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://self.kovalyov.net/post/438678215</link><guid>http://self.kovalyov.net/post/438678215</guid><pubDate>Wed, 10 Mar 2010 01:00:00 -0800</pubDate><category>interwebs</category><category>eng</category></item><item><title>Отладка и профилирование кода на JavaScript с помощью Web Inspector</title><description>&lt;p&gt;За последние шесть лет JavaScript совершил скачок в нашем сознании и превратился в мощный язык программирования: в эдакий LISP для народа, работающий прямо из браузера. С тех пор многие компании сделали ставку на дальнейшее развитие веб-приложений, неотъемлемой частью которых является детище Брендана Эйка. К примеру, прошлогодняя конференция Google I/O началась именно с показа возможностей JavaScript и HTML5. Всё это означает, что программы на этом языке стали намного интереснее, а их отладка сложнее.&lt;/p&gt;
&lt;p&gt;Вместе с развитием языка и браузеров не стояли на месте и средства отладки и профилирования JavaScript кода. И сегодня, при правильном использовании этих средств, сам процесс нахождения багов и узких мест может быть вполне безболезненным и интересным. Эта статья кратко описывает одну из таких программ, которая носит название Web Inspector и входит в состав всех браузеров на основе WebKit.&lt;/p&gt;
&lt;p&gt;&lt;a title="Отладка и профилирование кода на JavaScript c помощью Web Inspector" target="_blank" href="http://anton.kovalyov.net/javascript/webinspector.html"&gt;Продолжение на anton.kovalyov.net&lt;/a&gt;.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/433426633</link><guid>http://self.kovalyov.net/post/433426633</guid><pubDate>Sun, 07 Mar 2010 16:23:21 -0800</pubDate><category>javascript</category><category>rus</category></item><item><title>"I don’t understand blog posts, emails and other messages that begin with an apology. If you’re sorry..."</title><description>“I don’t understand blog posts, emails and other messages that begin with an apology. If you’re sorry to interrupt me with that spam, don’t send it.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Seth Godin&lt;/em&gt;</description><link>http://self.kovalyov.net/post/417197553</link><guid>http://self.kovalyov.net/post/417197553</guid><pubDate>Sun, 28 Feb 2010 00:17:12 -0800</pubDate><category>Quote-of-the-Day</category></item><item><title>Making Disqus faster</title><description>&lt;p&gt;&lt;i&gt;Hello. I am Anton Kovalyov, I work as a software engineer here at Disqus and this blog post is about one project I was working on. It extracts all the static parts out of our embeddable code which makes our widget much faster than it is now. We are still testing this update but you already can try it out. For more details on the project and how to enable it for your website, continue reading.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;It has been a little more than two years since Disqus was launched and today we have hundreds of thousands websites and millions of commenters using the service. During this time, we were constantly upgrading our infrastructure to handle this growth. But eventually we arrived at the point in which we had to revisit our initial approach to serving our client-side JavaScript code.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blog.disqus.com/post/397517128/making-disqus-faster"&gt;Continue on Disqus blog&lt;/a&gt;.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/397520497</link><guid>http://self.kovalyov.net/post/397520497</guid><pubDate>Thu, 18 Feb 2010 17:06:00 -0800</pubDate><category>disqus</category><category>eng</category></item><item><title>Another way to restore built-in method in Chrome/Safari</title><description>&lt;p&gt;A short follow-up to &lt;a target="_blank" href="http://self.kovalyov.net/post/270109060/getbuiltin"&gt;this post&lt;/a&gt;. Apparently, both Chrome and Safari restore built-in method if you try to delete it from the prototype. In other words:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Array.prototype.map = null;
[].map
&gt; null

delete Array.prototype.map
[].map
&gt; function map() { [native code] }&lt;/code&gt;&lt;/pre&gt;</description><link>http://self.kovalyov.net/post/395796571</link><guid>http://self.kovalyov.net/post/395796571</guid><pubDate>Wed, 17 Feb 2010 18:33:00 -0800</pubDate><category>javascript</category><category>programming</category><category>eng</category></item><item><title>Media Attachments</title><description>&lt;p&gt;About a week ago we pushed my media attachments feature and yesterday &lt;a target="_blank" href="http://blog.disqus.com/post/380409674/you-might-like-this"&gt;we officially announced it&lt;/a&gt;. Media Attachments was a feature I wanted to do since my day one at Disqus. I really like when system is smart enough to extract links to images and videos and present them nicely. It is simple, there is no need for additional buttons. If you want to share an image or a video—just put a link inside your comment and press the button.&lt;/p&gt;
&lt;p&gt;Media Attachments is also a very flexible feature: we will support more services (photos, videos and others) soon.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/383320536</link><guid>http://self.kovalyov.net/post/383320536</guid><pubDate>Wed, 10 Feb 2010 22:51:00 -0800</pubDate><category>disqus</category><category>eng</category></item><item><title>Wired's Hide and Seek</title><description>&lt;p&gt;So I read this article about an attempt of one air force analyst to sell secrets to Iraq and China and there author claims that two puzzles created by Regan (the spy in question) were sent to the National Security Agency, where cryptanalysts spent hundreds of hours without any result. Then, they found some other guy that cracked the first code and apparently it was enciphered with Caesar’s shift.&lt;/p&gt;
&lt;p&gt;Now, are they telling me that NSA cryptanalysts failed to break Caesar’s code? Because I can hardly believe in that.&lt;/p&gt;
&lt;p&gt;KHUH LV D ZHE SDJH ZKHUH BRX FDQ SODB ZLWK WKLV FLSKHU: &lt;a target="_blank" href="http://www.simonsingh.net/The_Black_Chamber/caesar.html"&gt;FDHVDU VKLIW FLSKHU&lt;/a&gt;.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/376961927</link><guid>http://self.kovalyov.net/post/376961927</guid><pubDate>Sun, 07 Feb 2010 15:55:00 -0800</pubDate><category>crypto</category><category>eng</category></item><item><title>"4.4.  Dress Code

Since attendees must wear their name tags, they must also wear shirts or blouses. ..."</title><description>“&lt;p&gt;4.4.  Dress Code&lt;/p&gt;

&lt;p&gt;Since attendees must wear their name tags, they must also wear shirts or blouses.  Pants or skirts are also highly recommended.  Seriously though, many newcomers are often embarrassed when they show up Monday morning in suits, to discover that everybody else is wearing T-shirts, jeans (shorts, if weather permits) and sandals.  There are those in the IETF who refuse to wear anything other than suits. Fortunately, they are well known (for other reasons) so they are forgiven this particular idiosyncrasy.  The general rule is “dress for the weather” (unless you plan to work so hard that you won’t go outside, in which case, “dress for comfort” is the rule!).&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a target="_blank" href="http://tools.ietf.org/rfcmarkup?doc=fyi17#section-4.4"&gt;The Tao of IETF: A Novice’s Guide to the Internet Engineering Task Force&lt;/a&gt;&lt;/em&gt;</description><link>http://self.kovalyov.net/post/375128242</link><guid>http://self.kovalyov.net/post/375128242</guid><pubDate>Sat, 06 Feb 2010 17:59:00 -0800</pubDate><category>culture</category><category>eng</category></item><item><title>Brewer's CAP Theorem</title><description>&lt;p&gt;Brewer’s Theorem is pretty neat. It essentially states that you cannot have a clustered system that supports consistency, availability and partition-tolerance at the same time. So, if you want to build a nice clustered system you have to stop partitions from happening, or accept the fact that from time to time affected services will either be unavailable or inconsistent.&lt;/p&gt;
&lt;p&gt;Eric Brewer presented this theorem in 2000 and two years later it was proved to be correct by Seth Gilbert and Nancy Lynch of MIT.&lt;/p&gt;
&lt;p&gt;I was introduced to this theorem through a pretty good article by Julian Browne: &lt;a target="_blank" href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem"&gt;Brewer’s CAP Theorem&lt;/a&gt;. Also, there is another interesting article—&lt;a target="_blank" href="http://guysblogspot.blogspot.com/2008/09/cap-solution-proving-brewer-wrong.html"&gt;A CAP Solution (Proving Brewer Wrong)&lt;/a&gt;—in which author claims that consistency, availability and partition-tolerance is possible if we loosen the &lt;i&gt;at the same time&lt;/i&gt; condition.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/373767437</link><guid>http://self.kovalyov.net/post/373767437</guid><pubDate>Fri, 05 Feb 2010 23:28:00 -0800</pubDate><category>programming</category><category>eng</category></item><item><title>ACM ICPC 2010 World Finals</title><description>&lt;a href="http://cm.baylor.edu/ICPCWiki/Wiki.jsp?page=Results%20World%20Finals%202010"&gt;ACM ICPC 2010 World Finals&lt;/a&gt;: &lt;p&gt;Gold medals go to teams from Shanghai Jiaotong, Moscow State, National Taiwan and Taras Shevchenko Kiev National universities.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/372073738</link><guid>http://self.kovalyov.net/post/372073738</guid><pubDate>Fri, 05 Feb 2010 00:59:00 -0800</pubDate><category>programming</category><category>eng</category></item><item><title>"In the 1790s, when the Bill of Rights was ratified, any two people could have a private..."</title><description>“In the 1790s, when the Bill of Rights was ratified, any two people could have a private conversation—with a certainty no one in the world enjoys today—by walking a few meters down the road and looking to see no one was hiding in the bushes. There were no recording devices, parabolic microphones, or laser interferometers bouncing off their eyeglasses. You will note that civilization survived. Many of us regard that period as a golden age in American political culture.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Whitfield Diffie&lt;/em&gt;</description><link>http://self.kovalyov.net/post/355802728</link><guid>http://self.kovalyov.net/post/355802728</guid><pubDate>Tue, 26 Jan 2010 23:35:15 -0800</pubDate><category>Quote-of-the-Day</category></item><item><title>"Buxton, whose warm waters have made thy name famous, perchance I shall visit thee no more—Farewell."</title><description>“Buxton, whose warm waters have made thy name famous, perchance I shall visit thee no more—Farewell.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Mary, Queen of Scots on her last visit to Buxton&lt;/em&gt;</description><link>http://self.kovalyov.net/post/340457316</link><guid>http://self.kovalyov.net/post/340457316</guid><pubDate>Sun, 17 Jan 2010 22:27:12 -0800</pubDate><category>Quote-of-the-Day</category></item><item><title>Quick JavaScript profiling</title><description>&lt;p&gt;&lt;i&gt;The text below was posted on my old blog in August, 2008. Since I still use this technique, I think it is worth moving it here.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Sometimes, you need to know how many times a function was executed and how much time did it take. It is not a problem if you have good profiling tools, but sometimes they are not available. A few months ago I was optimizing my code in some very early Fx3 build and the tools I use were not ready yet (Firebug was too buggy to use and Venkman didn’t work at all). So I was on my own. Fortunately, in javascript, you can monkey patch already created functions and insert your profiling code there:&lt;/p&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;function p_register(func_name) {
  var func = window[func_name];
  var h_name = "__" + func_name + "__";
  window[h_name] = func;
  window[func_name] = function() {
    // start profiling
    var result = window[h_name].apply(window, arguments);
    // store profiling results
    return result;
  };
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the code above, I’ve copied the function and replaced the original with a new one which contains my profiling code and a call to the hidden copy. So, every call to a function I wanted to profile was counted. As for the bottleneck, it was about prototype.js, its `Element.hasClassName` method and elements extension: it was too expensive to use them with a lot of elements, so I wrote a tiny func which acted just as `.hasClassName` but without element extension.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/339920500</link><guid>http://self.kovalyov.net/post/339920500</guid><pubDate>Sun, 17 Jan 2010 16:22:00 -0800</pubDate><category>javascript</category><category>programming</category><category>eng</category></item><item><title>Seattle Space Needle and downtown, a few days go.</title><description>&lt;img src="http://28.media.tumblr.com/tumblr_kw85k9UISD1qzufyno1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Seattle Space Needle and downtown, a few days go.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/333733283</link><guid>http://self.kovalyov.net/post/333733283</guid><pubDate>Wed, 13 Jan 2010 22:48:00 -0800</pubDate><category>travel</category><category>seattle</category></item><item><title>The Seattle Central Library</title><description>&lt;p&gt;&lt;img src="http://farm5.static.flickr.com/4063/4263394657_1745e20003.jpg" alt="The Seattle Central Library, Level 3" width="500" height="333"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="The Seattle Central Library on Wikipedia" target="_blank" href="http://en.wikipedia.org/wiki/Seattle_Central_Library"&gt;The Seattle Central Library&lt;/a&gt; is one of the best things I saw here, in the United States. Not only it has a pretty large collection of books, its building is very beautiful. The 11-story glass and steel building in downtown Seattle, it has wonderful interior, gets tons of natural light and contains a lot of reading spots with power sockets and free wireless internet. And it is free to use for everybody (well, at least I paid nothing and nobody stopped me).&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Inside the building you can do several things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read a book (it is a library, after all)&lt;/li&gt;
&lt;li&gt;Grab a table and do whatever you want on your laptop&lt;/li&gt;
&lt;li&gt;Use one of dozens public computers available to study, do research or work&lt;/li&gt;
&lt;li&gt;Look for a job; I believe they have some kind of community program for that&lt;/li&gt;
&lt;li&gt;Or you can just wonder around noting all the small things architects and interior designers thought about (I was doing that for almost an hour and now I am on the third floor, typing this text)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Level 3 (exit to fifth avenue is on the left):&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263506911/"&gt;&lt;img src="http://farm3.static.flickr.com/2600/4263506911_3db2622007.jpg" alt="Seattle Central Library, Level 3" width="500" height="334"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Levels six through nine have main books collection. Here are some bookshelves from the eight level:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4264261402/"&gt;&lt;img src="http://farm5.static.flickr.com/4044/4264261402_c8e008e38b.jpg" alt="Seattle Central Library, Level 8" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Elevators in the library are super cool:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263506079/"&gt;&lt;img src="http://farm3.static.flickr.com/2796/4263506079_c677b692d2.jpg" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263507699/"&gt;another picture of another elevator&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;And, the most gorgeous, level 10:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263508903/"&gt;&lt;img src="http://farm3.static.flickr.com/2748/4263508903_99dcf628ed.jpg" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263510149/"&gt;&lt;img src="http://farm5.static.flickr.com/4003/4263510149_5f865b480b.jpg" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263511231/"&gt;&lt;img src="http://farm3.static.flickr.com/2770/4263511231_4d78639cc6.jpg" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I seriously envy some people who work here. Look at this office space, isn’t it nice?&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.flickr.com/photos/antonkovalyov/4263510739/"&gt;&lt;img src="http://farm5.static.flickr.com/4065/4263510739_a4d10d5061.jpg" width="500" height="333"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://self.kovalyov.net/post/327671892</link><guid>http://self.kovalyov.net/post/327671892</guid><pubDate>Sun, 10 Jan 2010 15:36:00 -0800</pubDate><category>seattle</category><category>travel</category><category>eng</category></item><item><title>Possible memory leak in Chrome</title><description>&lt;p&gt;If you are writing an extension for Chrome, it is probably not a good idea to log everything since the browser does not have any limit on how many console messages to store.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/323937711</link><guid>http://self.kovalyov.net/post/323937711</guid><pubDate>Fri, 08 Jan 2010 14:25:00 -0800</pubDate><category>chromium</category><category>programming</category><category>eng</category></item><item><title>My first Chrome extension!</title><description>&lt;p&gt;Since Google Chrome for Mac now supports extensions I decided to write one. I called it Tessie Notifier and all it does is display the status of the latest Disqus build. At work, we have special, testing-only machine called Tessie that automatically runs all the tests after each repository commit. It then generates a nice little report page. So my extension loads the page, checks the status and updates a &lt;a href="http://code.google.com/chrome/extensions/browserAction.html"&gt;browser-action&lt;/a&gt; icon.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_kvx2iyyjC61qzuszc.png"/&gt;&lt;/p&gt;
&lt;p&gt;(The ball on the right; it is blue (image of Neptune) when all tests passed, orange (Sun) when there are failures and white (Eris) when Tessie is not available. Also its tooltip shows latest commit information and clicking on it will load the report page for you)&lt;/p&gt;
&lt;p&gt;Development process is pretty nice and simple. There is only one configuration file to write—JSON-formatted manifest file—and everything else is basically HTML and JavaScript. If you are using &lt;a href="http://code.google.com/chrome/extensions/background_pages.html"&gt;background page&lt;/a&gt;, debugging your extension is just like debugging any other site on the web using WebKit development tools. And there is also no need to pack the extension and restart your browser every time you want to try it out.&lt;/p&gt;
&lt;p&gt;As a conclusion, here is the complete source code: &lt;a href="http://github.com/antonkovalyov/playground/tree/master/tessienotifier/"&gt;tessienotifier&lt;/a&gt;. Consider it only as a code sample since I doubt that the actual extension could be of any use to anybody who is not working at Disqus.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/322944079</link><guid>http://self.kovalyov.net/post/322944079</guid><pubDate>Thu, 07 Jan 2010 23:09:00 -0800</pubDate><category>chromium</category><category>programming</category><category>eng</category></item><item><title>New York is such a nice city but I have to go back tomorrow.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_kvlu4uysPH1qzufyno1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;New York is such a nice city but I have to go back tomorrow.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/312364611</link><guid>http://self.kovalyov.net/post/312364611</guid><pubDate>Fri, 01 Jan 2010 21:34:06 -0800</pubDate><category>travel</category></item><item><title>Pacific coastline at the Pebble Beach.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_kvfz2us0TB1qzufyno1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Pacific coastline at the Pebble Beach.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/307085674</link><guid>http://self.kovalyov.net/post/307085674</guid><pubDate>Tue, 29 Dec 2009 17:35:18 -0800</pubDate><category>travel</category></item><item><title>On commit messages</title><description>&lt;a href="http://who-t.blogspot.com/2009/12/on-commit-messages.html"&gt;On commit messages&lt;/a&gt;: &lt;p&gt;A list of things you should do when committing, and why you should do it.&lt;/p&gt;</description><link>http://self.kovalyov.net/post/307073590</link><guid>http://self.kovalyov.net/post/307073590</guid><pubDate>Tue, 29 Dec 2009 17:26:16 -0800</pubDate><category>programming</category></item></channel></rss>
