<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Ethiel's blog</title>
	<link>http://icodeinc.com/blog</link>
	<description>programming, algorithms, computer security, systems engineering hacks.</description>
	<pubDate>Thu, 21 Jan 2010 22:00:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Joel Spolsky&#8217;s talk</title>
		<link>http://icodeinc.com/blog/?p=406</link>
		<comments>http://icodeinc.com/blog/?p=406#comments</comments>
		<pubDate>Thu, 21 Jan 2010 21:52:42 +0000</pubDate>
		<dc:creator></dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://icodeinc.com/blog/?p=406</guid>
		<description><![CDATA[Joel Spolsky (author of Joel on Software) gave a talk at the Department of Computer Science at Yale.
The script is an interesting read: Part 1, Part 2, Part 3.
]]></description>
			<content:encoded><![CDATA[<p>Joel Spolsky (author of <em>Joel on Software</em>) gave a talk at the Department of Computer Science at Yale.</p>
<p>The script is an interesting read: <a href="http://joelonsoftware.com/items/2007/12/03.html">Part 1</a>, <a href="http://joelonsoftware.com/items/2007/12/04.html">Part 2</a>, <a href="http://joelonsoftware.com/items/2007/12/05.html">Part 3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://icodeinc.com/blog/?feed=rss2&amp;p=406</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript video lectures by Douglas Crockford</title>
		<link>http://icodeinc.com/blog/?p=385</link>
		<comments>http://icodeinc.com/blog/?p=385#comments</comments>
		<pubDate>Sun, 19 Apr 2009 00:38:47 +0000</pubDate>
		<dc:creator></dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[JS/AJAX]]></category>

		<guid isPermaLink="false">http://icodeinc.com/blog/?p=385</guid>
		<description><![CDATA[These lectures are given by Douglas Crockford who is a senior JavaScript Architect at Yahoo!. He is well known for his work in introducing JavaScript Object Notation
First four lectures are on the basics of language:

JavaScript Video Lecture Part I
JavaScript Video Lecture Part II
JavaScript Video Lecture Part III
JavaScript Video Lecture Part IV

The next three lectures are [...]]]></description>
			<content:encoded><![CDATA[<p>These lectures are given by <a href="http://www.crockford.com/"><font color="#613517">Douglas Crockford</font></a> who is a senior JavaScript Architect at Yahoo!. He is well known for his work in introducing JavaScript Object Notation</p>
<p>First four lectures are on the basics of language:</p>
<ul>
<li><a href="http://video.yahoo.com/watch/111593/1710507"><font color="#613517">JavaScript Video Lecture Part I</font></a></li>
<li><a href="http://video.yahoo.com/watch/111594/1710553"><font color="#613517">JavaScript Video Lecture Part II</font></a></li>
<li><a href="http://video.yahoo.com/watch/111595/1710607"><font color="#613517">JavaScript Video Lecture Part III</font></a></li>
<li><a href="http://video.yahoo.com/watch/111596/1710658"><font color="#613517">JavaScript Video Lecture Part IV</font></a></li>
</ul>
<p>The next three lectures are on Advanced JavaScript:</p>
<ul>
<li><a href="http://video.yahoo.com/watch/111585/1027823"><font color="#613517">Advanced JS Part I</font></a></li>
<li><a href="http://video.yahoo.com/watch/111586/1027832"><font color="#613517">Advanced JS Part II</font></a></li>
<li><a href="http://video.yahoo.com/watch/111587/1027854"><font color="#613517">Advanced JS Part III</font></a></li>
</ul>
<p>Then there are 6 more lectures on JavaScript which should probably be viewed only after you have viewed the ones just mentioned.</p>
<ul>
<li>Advancing JavaScript with Libraries - <a href="http://video.yahoo.com/video/play?vid=410472"><font color="#613517">Part I</font></a> and <a href="http://video.yahoo.com/video/play?vid=412541"><font color="#613517">Part II</font></a></li>
<li><a href="http://video.yahoo.com/video/play?vid=568351"><font color="#613517">Maintainable JavaScript</font></a></li>
<li>An Inconvenient API: The Theory of the DOM - <a href="http://video.yahoo.com/watch/111582/992708"><font color="#613517">Part I</font></a>, <a href="http://video.yahoo.com/watch/111583/996002"><font color="#613517">Part II</font></a> and <a href="http://video.yahoo.com/watch/111584/996008"><font color="#613517">Part III</font></a></li>
</ul>
<p>The following is a talk based on Douglas’s recent book “<a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/freesciencand-20"><font color="#613517">JavaScript: The Good Parts</font></a>“.</p>
<p>It’s 1 hour long and it will definitely make your understanding of JavaScript better:</p>
<p class="center-aligner"><embed allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/hQVTIJBZook&amp;hl=en&amp;fs=1" height="344" width="425"></embed><br />
Direct URL: <a href="http://www.youtube.com/watch?v=hQVTIJBZook"><font color="#613517">http://www.youtube.com/watch?v=hQVTIJBZook</font></a></p>
<p>Here are some interesting points from the lecture:</p>
<p>[09:57] JavaScript was influenced by Scheme, Java and Perl. From Scheme it borrowed lambda functions and loose typing. From Java it took most of the syntax, and from Perl some of its regular expressions. And finally, it derived the idea of prototypal inheritance and dynamic objects from sellf</p>
<p>[11:38] JavaScript bad parts:</p>
<ul>
<li><strong>Global variables</strong>. Global variables make it harder to run independent subprograms in the same program. If the subprograms happen to have global variables that share the same names, then they will interfere with each other and likely fail, usually in difficult to diagnose ways.</li>
<li><strong>Newlines get converted into semicolons</strong>. JavaScript has a mechanism that tries to correct faulty programs by automatically inserting semicolons. It sometimes inserts semicolons in places where they are not welcome. For example:
<pre>return
{
    status: true
};</pre>
<p>returns undefined because JavaScript inserts ‘;’ after return.</p>
<p>Correct way:</p>
<pre>return {
    status: true
};</pre>
</li>
<li><strong>Operator typeof is not very helpful</strong>. For example, “typeof null” is “object”, “typeof [1,2,3]” is also “object”.</li>
<li><strong>Operator + adds numbers and concatenates</strong>. The + operator can add or concatenate. Which one it does depends on the types of the parameters. If either operand is an empty string, it produces the other operand converted to a string. If both operands are numbers, it produces the sum. Otherwise, it converts both operands to strings and concatenates them. This complicated behavior is a common source of bugs. If you intend + to add, make sure that both operands are numbers.</li>
<li><strong>Operators == and != do type coercion</strong>. Use of the === and !== operators is always preferred.</li>
<li><strong>Too many falsy values</strong>. 0, Nan, ” (empty string), false, null, undefined are all false.</li>
</ul>
<p>[17:25] for … in operator mixes inherited functions with the desired data members (it does deep reflection). Use object.hasOwnProperty to filter out names that belong to object itself:</p>
<pre>for (name in object) {
    if (object.hasOwnProperty(name)) {
        ...
    }
}</pre>
<p>[22:00] Javascript good parts:</p>
<ul>
<li><strong>Lambda</strong>. Enough said.</li>
<li><strong>Dynamic objects</strong>. Just add a property to an object, or remove it, no need for classes and derivation to create a similar object.</li>
<li><strong>Loose Typing</strong>. No need for type declarations.</li>
<li><strong>Object Literals</strong>. {} for object literals, [] for array literals and // for regexp literals.</li>
</ul>
<p>[23:00] Two schools of inheritance - classical and prototypal. Prototypal inheritance means that objects can inherit properties directly from other objects. The language is class-free.</p>
<p>[24:35] Realization of prototypal inheritance in JavaScript:</p>
<pre>if (typeof Object.create !== 'function') {
    Object.create = function (o) {
        function F() {}
        F.prototype = o;
        return new F();
    };
}</pre>
<p>Now a newObject can be created by inheriting from oldObject:</p>
<pre>newObject = Object.create(oldObject);</pre>
<p>[26:05] Example of global variables and why they are bad and how to solve the problem by using closures.</p>
<pre>var my_thing = function () {
    var names = ["zero", "one", ... ];
    return function(n) {
        return names[n];
    };
}();</pre>
<p>[29:00] There are four ways to create a new object in JavaScript:</p>
<ul>
<li>Object literal — var object = { }.</li>
<li>New — var object = new Object()</li>
<li>Object.create — var object = Object.create(old_object).</li>
<li>Call another constructor (use different inheritance model).</li>
</ul>
<p>[42:42] <a href="http://www.jslint.com/"><font color="#613517">JSLint</font></a>. JSLint defines a professional subset of JavaScript. JSLint will hurt your feelings.</p>
<p>[52:00] Q/A: Does strict mode change the behavior or does it take things out? — Can’t have “with” in strict mode, changes the way eval() works, changes error handling.</p>
<p>[53:00] Q/A: What’s going on with DOM? — Ajax libraries fix DOM, these changes should be propagated back into DOM API.</p>
<p>[55:30] Q/A: How do you spell lambda in JavaScript? — function.</p>
<p>[55:54] Q/A: How to solve global variable problem? — Each of compilation unit should be isolated, but there should be a way how they can introduce (link) to each other.</p>
<p>[56:30] Q/A: How do JavaScript objects differ from hash tables, they seem the same to me?</p>
<p>[57:23] Q/A: What’s wrong with HTML 5 and web apps? — They are doing too much and there are way too many of them.</p>
<p>[59:10] Q/A: How come JSON and JavaScript have almost the same syntax? — Doug admits he forgot to include Unicode Line Separator (LS) and Paragraph Separator (PS) control codes as whitespace chars.</p>
<p>[01:00:32] Q/A: Why does JSON require quotes around the property names? — Three reasons: 1. Wanted to align with Python where quotes are required, 2. Wanted to make the grammar of standard simpler, 3. JavaScript has stupid reserved word policy.</p>
<p>[01:02:40] Q/A: Are there any prospects for adding concurrency to the language? — Definitely no threads. Could be some kind of a messaging model.</p>
]]></content:encoded>
			<wfw:commentRss>http://icodeinc.com/blog/?feed=rss2&amp;p=385</wfw:commentRss>
		</item>
		<item>
		<title>Free Intro to Algorithms video lectures from MIT</title>
		<link>http://icodeinc.com/blog/?p=382</link>
		<comments>http://icodeinc.com/blog/?p=382#comments</comments>
		<pubDate>Thu, 16 Apr 2009 10:26:58 +0000</pubDate>
		<dc:creator></dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Algorithms]]></category>

		<guid isPermaLink="false">http://icodeinc.com/blog/?p=382</guid>
		<description><![CDATA[Course Description
This course teaches techniques for the design and analysis of efficient algorithms, emphasizing methods useful in practice. Topics covered include: sorting; search trees, heaps, and hashing; divide-and-conquer; dynamic programming; amortized analysis; graph algorithms; shortest paths; network flow; computational geometry; number-theoretic algorithms; polynomial and matrix calculations; caching; and parallel computing.
http://academicearth.org/courses/introduction-to-algorithms
]]></description>
			<content:encoded><![CDATA[<h3>Course Description</h3>
<p>This course teaches techniques for the design and analysis of efficient algorithms, emphasizing methods useful in practice. Topics covered include: sorting; search trees, heaps, and hashing; divide-and-conquer; dynamic programming; amortized analysis; graph algorithms; shortest paths; network flow; computational geometry; number-theoretic algorithms; polynomial and matrix calculations; caching; and parallel computing.</p>
<p><a href="http://academicearth.org/courses/introduction-to-algorithms">http://academicearth.org/courses/introduction-to-algorithms</a></p>
]]></content:encoded>
			<wfw:commentRss>http://icodeinc.com/blog/?feed=rss2&amp;p=382</wfw:commentRss>
		</item>
		<item>
		<title>Free SE video lectures from MIT</title>
		<link>http://icodeinc.com/blog/?p=381</link>
		<comments>http://icodeinc.com/blog/?p=381#comments</comments>
		<pubDate>Thu, 16 Apr 2009 10:17:06 +0000</pubDate>
		<dc:creator></dc:creator>
		
		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://icodeinc.com/blog/?p=381</guid>
		<description><![CDATA[
Course Description
This course covers topics on the engineering of computer software and hardware systems: techniques for controlling complexity; strong modularity using client-server design, virtual memory, and threads; networks; atomicity and coordination of parallel activities; recovery and reliability; privacy, security, and encryption; and impact of computer systems on society. It also looks at case studies of [...]]]></description>
			<content:encoded><![CDATA[<p class="results-list">
<h3>Course Description</h3>
<p>This course covers topics on the engineering of computer software and hardware systems: techniques for controlling complexity; strong modularity using client-server design, virtual memory, and threads; networks; atomicity and coordination of parallel activities; recovery and reliability; privacy, security, and encryption; and impact of computer systems on society. It also looks at case studies of working systems and readings from the current literature provide comparisons and contrasts, and do two design projects.</p>
<p><a href="http://academicearth.org/courses/computer-system-engineering">http://academicearth.org/courses/computer-system-engineering</a></p>
]]></content:encoded>
			<wfw:commentRss>http://icodeinc.com/blog/?feed=rss2&amp;p=381</wfw:commentRss>
		</item>
		<item>
		<title>Free CS video lectures from Harvard</title>
		<link>http://icodeinc.com/blog/?p=380</link>
		<comments>http://icodeinc.com/blog/?p=380#comments</comments>
		<pubDate>Thu, 16 Apr 2009 10:14:56 +0000</pubDate>
		<dc:creator></dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Algorithms]]></category>

		<guid isPermaLink="false">http://icodeinc.com/blog/?p=380</guid>
		<description><![CDATA[Course description:
Introduction to Computer Science I is a first course in computer science at Harvard College for concentrators and non-concentrators alike. More than just teach you how to program, this course teaches you how to think more methodically and how to solve problems more effectively. As such, its lessons are applicable well beyond the boundaries [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 85%"><span style="font-weight: bold">Course description:</span><br />
Introduction to Computer Science I is a first course in computer science at Harvard College for concentrators and non-concentrators alike. More than just teach you how to program, this course teaches you how to think more methodically and how to solve problems more effectively. As such, its lessons are applicable well beyond the boundaries of computer science itself. That the course does teach you how to program, though, is perhaps its most empowering return. With this skill comes the ability to solve real-world problems in ways and at speeds beyond the abilities of most humans.</p>
<p><a href="http://academicearth.org/courses/introduction-to-computer-science-i">http://academicearth.org/courses/introduction-to-computer-science-i</a></p>
]]></content:encoded>
			<wfw:commentRss>http://icodeinc.com/blog/?feed=rss2&amp;p=380</wfw:commentRss>
		</item>
	</channel>
</rss>
