<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Of code and color</title>
	
	<link>http://blog.gyoshev.net</link>
	<description>personal weblog of Alex Gyoshev</description>
	<lastBuildDate>Sun, 21 Aug 2011 12:28:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/OfCodeAndColor" /><feedburner:info uri="ofcodeandcolor" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Maintaining an up-to-date Vim configuration with git submodules</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/2AyrhG6Cw_0/</link>
		<comments>http://blog.gyoshev.net/2011/08/maintaining-an-up-to-date-vim-configuration-with-git-submodules/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 08:08:55 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=329</guid>
		<description><![CDATA[Nowadays, people share even their DNA on GitHub. With such a healthy open-source ecosystem and new updates every day, here is a way to keep up with the latest versions of your vim plug-ins. Git submodules Let&#8217;s start with an idea &#8211; consider your vim configuration as project, with plug-ins as dependencies. Since you want [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays, people share even <a href="https://github.com/kennethreitz/genome">their DNA</a> on GitHub. With such a healthy open-source ecosystem and new updates every day, here is a way to keep up with the latest versions of your vim plug-ins.</p>
<h3>Git submodules</h3>
<p>Let&#8217;s start with an idea &#8211; <strong>consider your vim configuration as project</strong>, with <strong>plug-ins as dependencies</strong>. Since you want to have the latest and greatest, you may want to directly link to their sources on github. But how? This is where <a href="http://kernel.org/pub/software/scm/git/docs/git-submodule.html">git submodules</a> come in:</p>
<pre><code title="git submodule basic syntax">git submodule add &lt;repository&gt; [&lt;path&gt;] </code></pre>
<p>In the case of your vim configuration, the above command will take the following form:</p>
<pre><code title="cloning the NerdTree plug-in to your vim bundle">git submodule add https://github.com/scrooloose/nerdtree.git .vim/bundle/nerdtree</code></pre>
<p>The above command will add a reference to the project located at <strong>&lt;repository&gt;</strong> to your vim configuration (that is itself in git). However, there is a problem: due to the fact that many projects have their own directory structure, you cannot just add them easily to the specific directories that vim expects. Luckily, <a href="http://www.vim.org/account/profile.php?user_id=9012">vim superstar</a> <a href="http://tpo.pe/">Tim Pope</a> has developed a remedy called &#8220;pathogen&#8221;.</p>
<h3>Pathogen</h3>
<p>This great plug-in will load other plug-ins from the ~/.vim/bundle directory. Since pathogen is yet another dependency of the project, it should be placed in the .vim/bundle folder:</p>
<pre><code title="cloning the NerdTree plug-in to your git bundle">git submodule add https://github.com/tpope/vim-pathogen.git .vim/bundle/pathogen</code></pre>
<pre><code title="pathogen initialization">source ~/.vim/bundle/pathogen/autoload/pathogen.vim
call pathogen#infect()</code></pre>
<p>Now that vim is infected with the pathogen, your modules are fully loaded. Hack away!</p>
<h3>Updating plug-ins</h3>
<p>Here comes the really sweet part: if you want to update all your plug-ins (bound by submodules), it is as sexy as running one line in bash:</p>
<pre><code title="updating all git submodules (i.e. vim plug-ins)">git submodule foreach git pull origin master </code></pre>
<p>Updating a single module is done by a <code>git pull origin master</code>, if you ever need to.</p>
<h3>In conclusion</h3>
<p>I hope that this will let you manage your vim configuration with ease &#8211; it works great for me! We are one step closer to our personal configuration heaven. If you found this article to be useful, <a href="#commentform">leave a comment</a> or hit me up on <a href="http://twitter.com/alex_gyoshev">twitter</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2011/08/maintaining-an-up-to-date-vim-configuration-with-git-submodules/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2011/08/maintaining-an-up-to-date-vim-configuration-with-git-submodules/</feedburner:origLink></item>
		<item>
		<title>qHint – enforcing coding conventions with jsHint and qUnit</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/BTiJHOLU698/</link>
		<comments>http://blog.gyoshev.net/2011/04/enforcing-coding-conventions-with-jshint-and-qunit/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 14:10:03 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=307</guid>
		<description><![CDATA[[Update: the project is now called qHint, as Leo Balter suggested] Open-source and coding conventions Adhering to coding conventions (other than your own) is hard. This is particularly true in the open-source world, where every project may have different style requirements. This makes code contributions harder, since you either: have to remember the coding style [...]]]></description>
			<content:encoded><![CDATA[<p>[Update: the project is now called <strong>qHint</strong>, as <a href="https://github.com/gyoshev/qhint/pull/1#issuecomment-1069899">Leo Balter suggested</a>]</p>
<h3>Open-source and coding conventions</h3>
<p>Adhering to coding conventions (other than your own) is hard. This is particularly true in the open-source world, where every project may have different style requirements. This makes code contributions harder, since you either:</p>
<ul>
<li>have to remember the coding style for each project that you contribute to, or</li>
<li>submit patches that do not follow the style guide of the project (thus either scrambling the code or making the reviewers&#8217; job harder)</li>
</ul>
<p>Tools like <a href="http://www.jslint.com/">jsLint </a>solve these problems by enforcing strict rules about the coding style. However, requiring all developers to run jsLint is prone to errors, as it is yet another step in the process of contribution. This post provides a solution to this problem, for projects that have unit tests written in <a href="http://docs.jquery.com/Qunit">qUnit</a> &#8212; but the same process can be applied for any other unit test framework.</p>
<h3>JsHint</h3>
<p><a href="http://jshint.com/">jsHint</a> is a code quality tool forked from jsLint. While the latter had strict rules and pretty much tried to enforce a general coding convention, the former allows flexible customization of the rule set, so that it matches your coding standards. Its <a href="http://jshint.com/#docs">configuration</a> is dead simple, and you get a nice array of all style violations when you call the JSHINT function.</p>
<h3>Integrating jsHint into qUnit</h3>
<p>Imagine that you could validate a JavaScript file against jsHint with the following line:</p>
<pre><code>jsHintTest('Core', '../src/core.js');</code></pre>
<p>It would be neat, right? Well, the following code introduces this new type of qUnit test. It fetches the specified JavaScript file and outputs any validation errors like qUnit test errors.</p>
<pre><code>function jsHintTest(name, sourceFile, options) {
    function validateFile(source) {
        var i, len, err,
            result = JSHINT(source, options),
            errors = JSHINT.errors;

        ok(result);

        if (result) {
            return;
        }

        for (i = 0, len = errors.length; i < len; i++) {
            err = errors[i];

            if (!err) {
                continue;
            }

            ok(false, err.reason + " on line " + err.line +
                                   ", character " + err.character);
        }
    }

    return asyncTest(name, function() {
        $.ajax({
            url: sourceFile,
            success: function(source) {
                start();
                validateFile(source);
            }
        });
    });
}</pre>
<p></code></p>
<p>And the result is...</p>
<p><img class="alignnone size-full wp-image-323" title="jshint-and-qunit" src="http://blog.gyoshev.net/wp-content/uploads/2011/04/jshint-and-qunit.png" alt="Screenshot of qUnit tests that validate coding style using jsHint" /></p>
<p>The <a href="https://github.com/gyoshev/qhint">latest qHint code is on github</a>.</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2011/04/enforcing-coding-conventions-with-jshint-and-qunit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2011/04/enforcing-coding-conventions-with-jshint-and-qunit/</feedburner:origLink></item>
		<item>
		<title>Beginning Vim</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/BqGfBlIwv-c/</link>
		<comments>http://blog.gyoshev.net/2011/03/beginning-vim/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 17:37:54 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=279</guid>
		<description><![CDATA[Vim? What? Why? Let me say that: there is a raging war out there, driven by the eternal question &#8220;What text editor do you use?&#8221;. Personally, I was ignorant of the two camps (namely, the vi-like editors and Emacs). However, I got curious when I found out that Notepad-like programs are not even considered as [...]]]></description>
			<content:encoded><![CDATA[<h3>Vim? What? Why?</h3>
<p>Let me say that: there is a <a href="http://en.wikipedia.org/wiki/Editor_war">raging war</a> out there, driven by the eternal question &#8220;What text editor do you use?&#8221;. Personally, I was ignorant of the two camps (namely, the vi-like editors and Emacs). However, I got curious when I found out that Notepad-like programs are not even considered as text editors. When people have such strong feelings about a program, it definitely deserves a few hours to play with.</p>
<p>So what is Vim? Simply put: an extensible text editor, focused on manipulation of text, rather than pure editing. There are currently about <a href="http://www.vim.org/scripts/script_search_results.php?keywords=&amp;script_type=&amp;order_by=rating&amp;direction=descending&amp;search=search">3500 extensions</a> for it, ranging from <a href="http://www.vim.org/scripts/script.php?script_id=90">source control integration</a> to a <a href="http://www.vim.org/scripts/script.php?script_id=2226">personal wiki</a>.It is said that mastering Vim will yield great productivity gains in term of coding. Well, that&#8217;s pretty convincing!</p>
<h3>Learning Vim</h3>
<p>If you feel hooked, you should <a href="http://www.vim.org/download.php">download</a> and install it. There is only one practical way of learning Vim, and it&#8217;s to use it. The first advice I got was to do all my text editing in it for a week before judging it. But let me give you a word of warning &#8212; the learning curve is steep, to say the least.</p>
<p>Personally, I started off with the integrated <strong>interactive tutorial</strong> in Vim, called vimtutor. It&#8217;s a shell script that can be found in the installation directory. Under 64bit Windows, that&#8217;s <code>C:\Program Files (x86)\Vim\vim73\vimtutor.bat</code>. You&#8217;ll need to run it several times (when practicing &#8220;how to close vim&#8221;), so keeping a command prompt or explorer window in the directory is quite handy.</p>
<p>If you prefer <strong>video</strong>, and want to spare a few bucks to treat yourself, PeepCode has the <a href="http://peepcode.com/products/smash-into-vim-i">Smash Into Vim series</a> (2 x $12). The alternative are Derek Wyatt&#8217;s <a href="http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-novice-tutorial-videos/">craaaazy vim novice screencasts</a><a href="#footnote_derek_wyatt">*</a> &#8211; these are funny, too! <a href="http://vimcasts.org/episodes/archive">Vimcasts</a> have videos that cover interesting information to supplement the other tutorials, but aren&#8217;t targeted at complete novices.</p>
<p>If you are an active <strong>Twitter</strong> user, you may like to follow <a href="http://twitter.com/vimtips">@vimtips</a> for daily vim tips. Past tips are archived on <a href="http://vimtweets.com/">vimtweets.com</a>, and there are real gems among them.</p>
<p>And if you want to setup your workspace for learning, you can use the <a href="http://naleid.com/blog/2010/10/04/vim-movement-shortcuts-wallpaper/">Vim movement shortcuts wallpaper</a>.</p>
<h3>Making it beautiful</h3>
<p><img class="alignnone size-full wp-image-284" title="vim-railscasts-with-consolas" src="http://blog.gyoshev.net/wp-content/uploads/2011/03/vim-railscasts-with-consolas1.png" alt="One definition of beautiful = vim + railscasts color scheme + consolas" width="656" height="439" /></p>
<p>This is absolutely necessary, since the default color scheme / font combination is really ugly. I think that this repels many people and could be fixed for  the sake of better first-time user experience. Of course, this may be an intentional design decision, made either to please the die-hard fans or to create a tribal vim community. Or a bit of both.</p>
<p>My personal preference is the <a href="http://www.vim.org/scripts/script.php?script_id=2175">railscasts color scheme</a>, with the Consolas font. In order to apply these, you need to create a _vimrc file (that stores the Vim configuration) in your user directory (for windows 7, that&#8217;s <code>C:\users\yourusername</code>) and place the following two lines in it:</p>
<pre>colorscheme railscasts
set guifont=Consolas:h12</pre>
<p>In order to use the railscasts theme, you have to download it from the link above and place it in the <code>vimfiles/colors/</code> subdirectory of your user directory.</p>
<h3>Sharing your Vim configuration across multiple computers</h3>
<p>If you want to learn Vim both at work and at home (like me!), it is convenient to share your configuration between computers, so that you get the same environment without much effort. What better way to share it than to <a title="my Vim configuration, hosted on GitHub" href="https://github.com/gyoshev/config">put it on GitHub</a>! However, there happened to be two problems with this:</p>
<ol>
<li>I turned out to be too lazy to pull my configuration every time I make a  change. Dropbox to the rescue! I simply cloned the configuration  repository to my Dropbox folder and it got synced across my work and  home PC.</li>
<li>I didn&#8217;t want the local repository to be the same as my Windows 7 user  folder. This can be easily fixed by creating a symbolic link for the  _vimrc and vimfiles, like this:
<pre><code>cd c:\users\gyoshev
mklink _vimrc "F:\github\config\_vimrc"
mklink /D vimfiles "F:\github\config\vimfiles"</code></pre>
<p>In Windows Explorer, the newly created links should look like this:</p>
<p><img class="alignnone size-full wp-image-280" title="vim-config-symlinks" src="http://blog.gyoshev.net/wp-content/uploads/2011/03/vim-config-symlinks.png" alt="symbolic links to _vimrc and vimfiles" width="114" height="42" /></li>
</ol>
<p>Voila! Everything gets synced everywhere.</p>
<h3>Conclusion</h3>
<p>Well, I hope that these resources will prove useful to you! I certainly feel more confident after having read and watched most of them. And if you need help, don&#8217;t forget to <code>:h command</code> it ;-)</p>
<p>P.S.: Many thanks to <a href="http://twitter.com/korchev">@korchev</a>, for the initial help and the aggressive Vim marketing  at work :)</p>
<p><em class="footnote"><a name="footnote_derek_wyatt">*</a> Don&#8217;t worry, after the first 2-3 of them, he calms down. At first, I  expected that he&#8217;ll ritually consume his mouse, with candles and  everything. You&#8217;ll see what I mean.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2011/03/beginning-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2011/03/beginning-vim/</feedburner:origLink></item>
		<item>
		<title>Cutting the Google Analytics Script in Half</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/W8jKW4BXIyM/</link>
		<comments>http://blog.gyoshev.net/2011/01/cutting-the-google-analytics-script-in-half/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 19:03:39 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=192</guid>
		<description><![CDATA[[Update: after a humbling pull request on GitHub, I was pointed to a blog post that shows a better process.] I am a bit extreme when it comes to optimization (as I will prove in a bit). Both YSlow and Google PageSpeed are great pals in this, and I get concerned when they report inefficiencies. [...]]]></description>
			<content:encoded><![CDATA[<p>[Update: after a <a href="https://github.com/paulirish/html5-boilerplate/pull/305">humbling pull request on GitHub</a>, I was pointed to a <a href="http://mathiasbynens.be/notes/async-analytics-snippet">blog post that shows a better process</a>.]</p>
<p>I am a bit extreme when it comes to optimization (as I will prove in a bit). Both <a href="http://developer.yahoo.com/yslow/">YSlow</a> and <a href="http://code.google.com/speed/page-speed/">Google PageSpeed</a> are great pals in this, and I get concerned when they report inefficiencies. You see, I use <a href="http://www.google.com/analytics/">Google Analytics</a> in order to track the page views of this site. If you ever used it, you have certainly copied the tracking script  from the GA site &#8212; the script that is generated for you automatically and  you just need to paste in the pages that you want to track. I like this feature pretty much, as it saves time; it also saves Google the need to explain  what code you need to write to get it done. However, the code that gets generated isn&#8217;t optimized, nor minified, so the above tools find it offensive. So I took the effort of optimizing it, and here is how.</p>
<h3><strong>Starting script</strong></h3>
<pre>&lt;script type="text/javascript"&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXX']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script');
    ga.type = 'text/javascript';
    ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www')
                 + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;</pre>
<p>This is the default snippet that gets generated from the GA site, without additional options.</p>
<h3>Optimization process</h3>
<ol>
<li><a href="http://www.w3schools.com/jsref/jsref_push.asp">Array.push can accept  multiple arguments</a>. This is even <a href="http://code.google.com/intl/en-US/apis/analytics/docs/tracking/asyncUsageGuide.html#MultipleCommands">mentioned in the online help</a>, but the generated code does not contain it.
<pre>_gaq.push(['_setAccount', 'UA-20578581-1'],['_trackPageview']);</pre>
</li>
<li>Both the HTTP and HTTPS GA scripts are identical. Furthermore, both URLs work fine without specifying a subdomain. Thus, using <a href="http://encosia.com/2011/01/19/cripple-the-google-cdns-caching-with-a-single-character/">protocol-less URLs</a> (part of the URI RFC) in order to link the JavaScript shaves off a few more bytes.
<pre>ga.src = '//google-analytics.com/ga.js';</pre>
</li>
<li>(Theoretically optional) The script persists its location in the document, which is nice for more advanced scenarios that require more tracking. However, placing the script anywhere else than before the closing body tag might degrade performance. If performance is more important than tracking,
<pre>document.body.appendChild(ga);</pre>
</li>
</ol>
<p>And after a few manual minification tricks, here comes the&#8230;</p>
<h3><strong>Optimized script</strong></h3>
<pre>  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXX'],['_trackPageview']);

  (function(d) {
    var s = d.createElement('script');
    s.type = 'text/javascript';
    s.async = true;
    s.src = '//google-analytics.com/ga.js';
    d.body.appendChild(s);
  })(document);</pre>
<h3>Optimization statistics</h3>
<p>After <a href="http://marijnhaverbeke.nl/uglifyjs">minification</a>, the reduction is by 45% (187 bytes), since the current GA code generator does not minify its output. Voila!</p>
<p>The optimized script is active on this site, and was tested in IE6 (&#8217;nuff said).</p>
<p>I hope that you will find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2011/01/cutting-the-google-analytics-script-in-half/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2011/01/cutting-the-google-analytics-script-in-half/</feedburner:origLink></item>
		<item>
		<title>Professional staffing, WTF?</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/QefuxremSW0/</link>
		<comments>http://blog.gyoshev.net/2010/10/professional-staffing-wtf/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 09:12:43 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=146</guid>
		<description><![CDATA[Having just read REWORK, the idea behind HR agencies really annoys me. I can&#8217;t see a worse way to completely miss the point of hiring, both from the candidates&#8217; and employers&#8217; point of view. Template messages with no personality will never attract people who are not desperate. And a boatload of Skype messages tend to [...]]]></description>
			<content:encoded><![CDATA[<p>Having just read <a href="http://37signals.com/rework/">REWORK</a>, the idea behind <a href="http://www.minds-ps.com/itstaff.html">HR</a> <a href="http://bulwork.net/">agencies</a> really annoys me. I can&#8217;t see a worse way to completely miss the point of hiring, both from the candidates&#8217; and employers&#8217; point of view. Template messages with no personality will never attract people who are not desperate. And a boatload of Skype messages tend to be too intrusive for first encounters, no?</p>
<h3>Employers!</h3>
<p>If you want to hire mediocre people, that do not care about what you work on, then great for you! But if you actually care, you want to hire somebody who does, too. Filtering the candidates is something you should do, instead of trusting foreigners blindly. In order to do remarkable work, it is not required to be famous, or have a great deal of experience. And if a person values her work, she will want to get in touch with other people that will honor this &#8211; like you.</p>
<h3>Candidates!</h3>
<p>Really? Would you let someone else determine where you spend the better part of your day? Your work should be more important for you than that. Instead, you could go for something you value and believe in. In fact, it does not speak really well of an employer if a staffing agency is involved (as noted above). Going to an interview without knowing what the company stands for, and without looking at what it does, undermines <em>your </em>image. A honest cover letter can outline your appreciation for the work being done, and your research will certainly pay off once you meet the future employers. As the saying goes, failing to prepare is preparing to fail.</p>
<h3>And&#8230;</h3>
<p>Introducing more people to your hiring process just increases its complexity (and it is already complex enough). The moment both sides start to care, the middle man perishes. So&#8230; start caring.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2010/10/professional-staffing-wtf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2010/10/professional-staffing-wtf/</feedburner:origLink></item>
		<item>
		<title>IE8 gets JSON love through Windows Update</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/gpdgqYHHmz8/</link>
		<comments>http://blog.gyoshev.net/2010/02/ie8-gets-json-love-through-windows-update/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 07:46:50 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[old archive]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=102</guid>
		<description><![CDATA[Now that&#8217;s a nice move &#8211; improving ECMAScript compatibility through Windows Update (namely, fixing bugs in encoding/decoding JSON). I immediately started dreaming about patching some vicious bugs in both the script and rendering engine this way&#8230;]]></description>
			<content:encoded><![CDATA[<p>Now that&#8217;s a nice move &#8211; <a href="http://support.microsoft.com/kb/976662">improving ECMAScript compatibility</a> through Windows Update (namely, fixing bugs in encoding/decoding JSON). I immediately started dreaming about patching <a href="http://jhop.me/ie8-bugs">some vicious bugs</a> in both the script and rendering engine this way&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2010/02/ie8-gets-json-love-through-windows-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2010/02/ie8-gets-json-love-through-windows-update/</feedburner:origLink></item>
		<item>
		<title>Array-like objects in JavaScript</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/MbknEW3ha4o/</link>
		<comments>http://blog.gyoshev.net/2009/12/array-like-objects-in-javascript/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 10:01:52 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=68</guid>
		<description><![CDATA[Consider the following JSON: var dates = { "2009": { "4": [20, 21] } }; It can be accessed like an array, say dates[2009][4], yet it doesn&#8217;t contain some 2000 elements. Neat, huh? This is especially useful when you have to describe a few specific values (say, the date of Easter) from a big collection [...]]]></description>
			<content:encoded><![CDATA[<p>Consider the following JSON:</p>
<p><code>var dates = { "2009": { "4": [20, 21] } };</code></p>
<p>It can be accessed like an array, say <code>dates[2009][4]</code>, yet it doesn&#8217;t contain some 2000 elements. Neat, huh?</p>
<p>This is especially useful when you have to describe a few specific values (say, the date of Easter) from a big collection (say, all dates in the 1970 &#8211; 2030 range).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2009/12/array-like-objects-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2009/12/array-like-objects-in-javascript/</feedburner:origLink></item>
		<item>
		<title>Writing bots for web-based games</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/g__F6Y4UIQA/</link>
		<comments>http://blog.gyoshev.net/2009/10/writing-bots-for-web-based-games/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 16:36:15 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=62</guid>
		<description><![CDATA[Browser games are a great way to eat up a significant amount of your time without remembering it at all. While I have fallen in that trap several times, I tend to view them as an&#8230; opportunity. Opportunity to become better at understanding code, much like the Weekly Source Code series by Scott Hanselman. Indeed, [...]]]></description>
			<content:encoded><![CDATA[<p>Browser games are a great way to eat up a significant amount of your time without remembering it at all. While I have fallen in that trap several times, I tend to view them as an&#8230; opportunity. Opportunity to become better at understanding code, much like the <a href="http://www.hanselman.com/blog/CategoryView.aspx?category=Source+Code">Weekly Source Code series</a> by <a href="http://www.hanselman.com/blog/">Scott Hanselman</a>.</p>
<p>Indeed, <em>using</em> a bot may seem really unfair to the passionate gamers that try to spend their time at becoming self-proclaimed gods in the given reality. But this is exactly my point. Most of these games are based completely on collecting numbers &#8211; either gold, points, stats or whatever. And you can&#8217;t beat an intelligent toaster at this one. And I just want to understand the toasters. I&#8217;d love to take on a challenge of creating better ones, actually. And this is partially related to game developers, too &#8211; if your game is stupid enough to be robotized, it should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2009/10/writing-bots-for-web-based-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2009/10/writing-bots-for-web-based-games/</feedburner:origLink></item>
		<item>
		<title>asp:TextBoxes for passwords protect you from yourself!</title>
		<link>http://feedproxy.google.com/~r/OfCodeAndColor/~3/Uy22rROxrtw/</link>
		<comments>http://blog.gyoshev.net/2009/09/asptextboxes-for-passwords-protect-you-from-yourself/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 07:57:33 +0000</pubDate>
		<dc:creator>gyoshev</dc:creator>
				<category><![CDATA[public]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.gyoshev.net/?p=50</guid>
		<description><![CDATA[I.e. the Text property is not rendered. &#60;asp:TextBox runat="server" ID="TextBox1" Text="Sample text" TextMode="Password" /&#62; How to hack work-around it? Use the HTML value property. &#60;asp:TextBox runat="server" ID="TextBox1" value="Sample text" TextMode="Password" /&#62; It&#8217;s lovely how ASP.NET looks after you.]]></description>
			<content:encoded><![CDATA[<p>I.e. the Text property is not rendered.</p>
<pre>&lt;asp:TextBox runat="server" ID="TextBox1" Text="Sample text" TextMode="Password" /&gt;</pre>
<p>How to <span style="text-decoration: line-through;">hack</span> work-around it? Use the HTML value property.</p>
<pre>&lt;asp:TextBox runat="server" ID="TextBox1" <strong>value</strong>="Sample text" TextMode="Password" /&gt;</pre>
<p>It&#8217;s lovely how ASP.NET looks after you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gyoshev.net/2009/09/asptextboxes-for-passwords-protect-you-from-yourself/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.gyoshev.net/2009/09/asptextboxes-for-passwords-protect-you-from-yourself/</feedburner:origLink></item>
	</channel>
</rss>

