<?xml version="1.0" encoding="UTF-8"?>
<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/"
	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/"
	>

<channel>
	<title>thyncology &#187; JavaScript</title>
	<atom:link href="http://www.thynctank.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thynctank.com</link>
	<description>The Science of Thynctank.</description>
	<lastBuildDate>Sun, 19 Jun 2011 04:33:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>RequireJS, CoffeeScript, Vimperator, and Other Fancy Stuff</title>
		<link>http://www.thynctank.com/javascript/2011/06/requirejs-coffeescript-vimperator-and-other-fancy-stuff/</link>
		<comments>http://www.thynctank.com/javascript/2011/06/requirejs-coffeescript-vimperator-and-other-fancy-stuff/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 10:16:10 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[coffeescript]]></category>
		<category><![CDATA[funcunit]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[jailbreaking]]></category>
		<category><![CDATA[RequireJS]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vimperator]]></category>

		<guid isPermaLink="false">http://www.thynctank.com/?p=289</guid>
		<description><![CDATA[Topics for this post: Lots of JS, Selenium, Jailbreaking, Vimperator. I&#8217;ve begun messing with a number of different technologies all around the same time &#8211; namely, RequireJS, CoffeeScript, and FuncUnit. I&#8217;ve managed to reconcile them with one another for the most part, which is quite fun. RequireJS I&#8217;ve actually been tinkering with to varying degrees [...]]]></description>
			<content:encoded><![CDATA[<p>Topics for this post: Lots of JS, <a href="http://seleniumhq.org">Selenium</a>, <a href="http://lifehacker.com/5771943/the-always-up+to+date-guide-to-jailbreaking-your-ios-device">Jailbreaking</a>, <a href="http://vimperator.org">Vimperator</a>.</p>

<p>I&#8217;ve begun messing with a number of different technologies all around the same time &#8211; namely, <a href="http://requirejs.org">RequireJS</a>, <a href="http://coffeescript.com">CoffeeScript</a>, and <a href="http://funcunit.com">FuncUnit</a>. I&#8217;ve managed to reconcile them with one another for the most part, which is quite fun.</p>

<p>RequireJS I&#8217;ve actually been tinkering with to varying degrees for a few months now, and am finally starting to put into practice across the board at <a href="http://crossloop.com">CrossLoop</a>. I&#8217;ve got a few AMD modules in use, and a number of other scripts which RequireJS loads just as well. I&#8217;m in the process of breaking a lot of complexly-ordered script tag inclusions into neat-and-tidy cascading dependencies via AMD and RequireJS&#8217;s <code>define()</code> and <code>require()</code> functions.</p>

<p>I started work on an article on the topic of RequireJS a couple months ago, and hope to resume writing it in the next couple days. Interestingly, RequireJS has gone through some changes (and the CommonJS list has seen some activity revolving around &#8220;casting out&#8221; RequireJS or unlisting AMD as part of the CommonJS spec/draft/whatever. (some of this revolves around treating AMD as an &#8220;authoring format&#8221; versus as a &#8220;transport format&#8221;, which is an important differentiation to some. The feasibility of the dynamically-generated [with dependencies] transport proposition is questionable&#8230;) There is some feeling the two are irreconcilable. I&#8217;m not of that opinion, but I may not be in a good position to knowingly opine. So I won&#8217;t go into much more detail here than to say I&#8217;m still digging RequireJS, and that it&#8217;s helping me to organize my day job code better.</p>

<p>I&#8217;ve recently tried briefly to rewrite some of our CSS as Sass, and I&#8217;ve come to a stop. I think what would be more productive right now is a complete rewrite/reorg of the CSS as-is to shorten the files from 1000+ lines to something more manageable. We can always @import additional files, and RequireJS can stitch together CSS files once I come up with a proper build/release process and we automate it for production! (right now we&#8217;re entirely manual)</p>

<p>I&#8217;ve also finally gotten round to writing some unit tests for much of the JS code I&#8217;ve written for CrossLoop. I&#8217;ve been using <a href="http://docs.jquery.com/Qunit">QUnit</a> for this, which is handy enough for most basic work. Having previously used <a href="http://jania.pe.kr/aw/moin.cgi/JSSpec">JSSpec</a> thoroughly, I do miss proper setup/teardown across a group of related tests, and nesting these sorts of things would allow me to keep things much DRYer than I&#8217;m ending up doing currently. QUnit has &#8220;modules&#8221; as declared with the <code>module("module name")</code> call, but it doesn&#8217;t really logically group code together, merely bookends code between calls to <code>module()</code>. Meh.</p>

<p>The unit tests I&#8217;ve written thus far have all been written in CoffeeScript and loaded into the page via RequireJS&#8217;s &#8220;cs&#8221; plugin (<code>require(["cs!test1", "cs!test2"], $.noop)</code> for no post-test code, which is what I&#8217;ve been doing) Seems to work well and has given me good practice in writing concise CoffeeScript, as well as discovering gotchas like the &#8220;<code>isnt</code> is not <code>is not</code>&#8221; comment I made after writing more than a few asserts where I wrote something like <code>assert x is not -1</code>. What this actually resolves to is <code>assert(x == !-1)</code> which is the same as asserting x == 1, which it frequently wasn&#8217;t. (you may have guessed I was checking indexOf on strings, etc)</p>

<p>The CoffeeScript plugin for RequireJS is available right <a href="http://requirejs.org/docs/download.html#cs">on the main site</a> and works just like any other plugin; put it in the regular modules dir, no need to load it manually, etc.</p>

<p>I can definitely see myself writing more CoffeeScript going forward, likely it&#8217;ll be the source language for txtwax, a text adventure game library I&#8217;ve been putting off writing for some time now. It may also provide a coffee/node backend for txtwax servers. I really <em>love</em> a number of features in CoffeeScript, such as automatic local variables, array comprehensions, implicit returns, decomposition assignment, multiline strings, string interpolation, heregexes, function syntax, function binding, improved switches, ranges, postfix conditionals&#8230; the list really does go on a bit. Anyone who hasn&#8217;t played with it, you have no reason not to do so, this language is useful right now. Tests are the perfect use case to dip a toe in the coffee (!), since even if you do worry about CS stability or whatever, they&#8217;re not user-facing.</p>

<p>I do appreciate the &#8220;fixture&#8221; in recent versions of QUnit, which allows you to throw arbitrary markup into the DOM temporarily, with the understanding that QUnit will clean it up after you&#8217;re done with it. Now if only there was a way to tester higher-level application-level functionality in JS&#8230; waitaminnit, that&#8217;s what FuncUnit is for!</p>

<p>FuncUnit (a product of <a href="http://jupiterit.com">JupiterIT</a>, the lads behind <a href="http://javascriptmvc.com">JavaScriptMVC</a>) builds on QUnit, incorporating their Syn synthetic events library for typing in fields, tabbing into and out of fields, hovering over and dragging and dropping. Lots of heavyweight event stuff that might otherwise take quite a bit of hacking on your own to figure out. On top of this, FuncUnit adds support for opening pages in separate windows and navigating through the contents of the window via <code>S()</code>, a selector for running Syn methods identical to jQuery&#8217;s self-titled function or <code>$</code>. Like jQuery, FuncUnit uses the Sizzle selector engine for this purpose.</p>

<p>FuncUnit seems great, especially when you add in the ability to record tests via FuncIt, (a Selenium IDE-like recording environment) the ability to play back tests headless, (without a browser &#8211; via Resig&#8217;s env.js to mimic a browser for continuous integration) or the ability to drive Selenium RC for true multi-browser/platform automated testing. I&#8217;ve yet to give it a real run for its money, because I&#8217;ve hit a speed bump I&#8217;ve yet to find a way around, which is transitioning from http pages to https, or vice versa. Many pages, particularly logins, make this jump and I don&#8217;t believe a remote-controlled page using <code>S()</code> can retain control after the page switches protocols. I&#8217;m very happy to hear a workaround, though! (I&#8217;d imagine env.js or Selenium-driving wouldn&#8217;t have this problem, but I&#8217;d like to be able to run the tests raw in the browser as well..)</p>

<p>I also recently started using Vimperator. This software, combined with the speed Firefox 4 brings with it, have me switching back to Firefox as primary browser, both for development and general browsing as a user. Vimperator takes getting used to, for sure, but if you&#8217;re a Vim head like I&#8217;ve become over the last 6 months or so, you may never see browsing the same again. Quick hints allow you to jump to fields/click links/submit forms faster than ever before and without a mouse. Your fingers will fly, taking you from buffer to buffer (tabs), zooming with new ease, and adding macros and mapping arbitrary commands to keys. All of this is retained in a .vimperatorrc file, which feels right at home to a Vim user! Modal browsing is great, and shedding even more of the browser&#8217;s chrome is liberating as well. I occasionally still like to browse with tabs visible (:set gui=tabs) and haven&#8217;t found a handy way of launching Selenium IDE via a keybinding but am otherwise nice and clean with gui=none.</p>

<p>There&#8217;s a knockoff for Chrome called Vimium, which is uh&#8230; fun but not nearly as powerful as Vimperator, due to limitations in Chrome&#8217;s JS plugin architecture, I assume. There&#8217;s a newer version of Vimperator called Pentadactyl, but I haven&#8217;t found a reason to switch and some reasons to stay, such as support for apptabs in Firefox 4 (:set apptab toggles a buffer as one, and app tabs can&#8217;t be accidentally closed via <code>d</code> the way normal tabs can)</p>

<p>Speaking of Vim, I&#8217;m currently trying to find the best TextMate-like &#8220;select some text and wrap it with delimiters&#8221; plugin. This should allow me to select text in visual mode and wrap it with quotes, single or double, parens, curlies, asterisks, underscores, or what have you. Please let me know if you know of one! (would like to be able to edit the delimiters or have them correspond to those recognized by % when jumping to matching delimiters.) I&#8217;m also still really interested in getting CommandT working under Windows (and Linux for that matter) so any tips there are welcome as well.</p>

<p>I also finally jail broke my iPod Touch 2nd or 3rd gen, whatever it is. I&#8217;m almost ready to toss the damned thing, it&#8217;s so slow. jail breaking allows me to lock orientation and enables multitasking, though the device seems to crash under the weight of more than one app in memory at a time. Haven&#8217;t really used Cydia much, but if I do I&#8217;ll surely blog about my experiences with it. I can tell you, however, that the process of jail breaking (I used red sn0w) is needlessly littered with hurdles and makes the user feel silly at best. I&#8217;ve mostly been neglecting my iTouch in favor of my iPad, though.</p>

<p>Really excited to see the TouchPad (and Pre 3!) in person. Also excited about improved notifications in newer iOS, but multitasking in webOS is just so much nicer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thynctank.com/javascript/2011/06/requirejs-coffeescript-vimperator-and-other-fancy-stuff/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Weirdness in Firebug with XHR 302/JSON</title>
		<link>http://www.thynctank.com/javascript/2011/04/weirdness-in-firebug-with-302json/</link>
		<comments>http://www.thynctank.com/javascript/2011/04/weirdness-in-firebug-with-302json/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 21:39:27 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.thynctank.com/?p=271</guid>
		<description><![CDATA[Just discovered a strange bug in Firebug 1.7.1b1. It goes a little something like this: Make an XHR request (in this case a POST) to a service (in this case a Spring authentication URL) that redirects to some other URL which itself provides a JSON body indicating success or failure of login. So again, super [...]]]></description>
			<content:encoded><![CDATA[<p>Just discovered a strange bug in Firebug 1.7.1b1. It goes a little something like this:</p>

<p>Make an <em>XHR</em> request (in this case a POST) to a service (in this case a Spring authentication URL) that redirects to some other URL which itself provides a JSON body indicating success or failure of login.</p>

<p>So again, super simple:</p>

<ol>
<li>POST to URL A. This responds with a 302 to URL B.</li>
<li>Browser auto-GETs URL B, which contains a JSON content body.</li>
</ol>

<p>What Firebug sees, however, is this:</p>

<ol>
<li>POST to URL A. This responds with a 302 to URL B, but <em>also</em> appears to return a JSON body.</li>
<li>Browser auto-GETs URL B, which appears to have no body at all.</li>
</ol>

<p>And here&#8217;s what it looks like:</p>

<p><img src="http://www.thynctank.com/wp/wp-content/uploads/2011/04/2011-04-11_1423.png" alt="Firebug screen shot of strange behavior" /></p>

<p>I wonder why it&#8217;s mixing the responses like this&#8230; has anyone else seen this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thynctank.com/javascript/2011/04/weirdness-in-firebug-with-302json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Late night ebooking</title>
		<link>http://www.thynctank.com/javascript/2011/02/late-night-ebooking-2/</link>
		<comments>http://www.thynctank.com/javascript/2011/02/late-night-ebooking-2/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 14:38:33 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[CommonJS]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[RequireJS]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[webOS]]></category>

		<guid isPermaLink="false">http://www.thynctank.com/?p=255</guid>
		<description><![CDATA[After knocking out taxes tonight I read PDFs for a bit. Okay for a couple hours. Finished reading the relevant chapters of Vi and Vim and can safely say that other than scripting, I feel well-versed in vim usage. Finally managed to get pathogen working on my Windows work box (remotely) today, which made me [...]]]></description>
			<content:encoded><![CDATA[<p>After knocking out taxes tonight I read PDFs for a bit. Okay for a couple hours. Finished reading the relevant chapters of <a href="http://www.amazon.com/Learning-Vim-Editors-Arnold-Robbins/dp/059652983X/ref=sr_1_1?ie=UTF8&amp;qid=1297461280&amp;sr=8-1"><em>Vi and Vim</em></a> and can safely say that other than scripting, I feel well-versed in vim usage.</p>

<p>Finally managed to get <a href="https://github.com/tpope/vim-pathogen">pathogen</a> working on my Windows work box (remotely) today, which made me very happy. It was all being held up by a problem resolving https versions of repo URIs, in that all my submodular plugins under <code>bundle/</code> had failed to clone when the first https guy was reached. Be aware of this issue if you&#8217;re gitifying/pathogenizing your vim setup.</p>

<p>I just barely cracked the virtual cover of Stoyan Stefanov&#8217;s <em><a href="http://www.amazon.com/JavaScript-Patterns-Stoyan-Stefanov/dp/0596806752/ref=sr_1_2?ie=UTF8&amp;qid=1297461381&amp;sr=8-2">JavaScript <del datetime="2011-02-11T21:54:24+00:00">Design</del> Patterns</a></em> but am liking the tone quite a bit so far. I&#8217;ve certainly mentioned elsewhere that Stefanov&#8217;s previous book, <em><a href="http://www.amazon.com/Object-Oriented-JavaScript-high-quality-applications-libraries/dp/1847194141/ref=pd_sim_b_3">Object-Oriented JavaScript</a></em>, is my favorite book on the core language, so I have high expectations for this one.</p>

<p>Very excited to see what happens with the <a href="http://www.palm.com/us/products/pads/touchpad/index.html">new webOS stuff</a>, though like many others I&#8217;m a little upset they&#8217;ve pulled the plug on OTA 2.0. Gotta check out Enyo over the weekend. If you&#8217;ve already played with it, please share your opinions in the comments! Anyone heard even a rumbling on carrier rumors?</p>

<p>I also briefly toyed with <a href="http://joapp.com">Jo</a>, a cool [though in-flux] cross-platform mobile JS framework that&#8217;s easy to learn but fairly versatile. Hoping to leverage it (or similar) on a prototype app for CrossLoop Search.</p>

<p>Have used <a href="http://requirejs.org/">RequireJS</a> more at work this past week and am very happy with the ease of use. Next go round I&#8217;ll likely throw together a build file. Right now it&#8217;s just CLI optimizer, and I haven&#8217;t tried the new node-based version yet.</p>

<p>I see a lot of hubbub (some of it bordering on unfriendly) on the CommonJS list, but I&#8217;m glad there&#8217;s more discussion of modules in-browser these days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thynctank.com/javascript/2011/02/late-night-ebooking-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Node.JS Camp</title>
		<link>http://www.thynctank.com/javascript/2010/12/node-js-camp/</link>
		<comments>http://www.thynctank.com/javascript/2010/12/node-js-camp/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 05:24:04 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[express]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[socket.io]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.thynctank.com/?p=228</guid>
		<description><![CDATA[The following are my notes from Node.JS Camp, which I attended with several other developers, and at which I had a lot of fun. For $35, I got two meals, a T-shirt, and almost a whole day of exposure to node, which I&#8217;d previously been keen on but had not actually worked with. I tried [...]]]></description>
			<content:encoded><![CDATA[<p>The following are my notes from Node.JS Camp, which I attended with several other developers, and at which I had a lot of fun. For $35, I got two meals, a T-shirt, and almost a whole day of exposure to node, which I&#8217;d previously been keen on but had not actually worked with.</p>

<p>I tried to take notes on every presentation or workshop, but to tell the truth I wasn&#8217;t much good after lunch, as I&#8217;d not gotten much sleep the night before. These notes were taken using Simplenote on my iPad and Notational Velocity (a rad Simplenote client) on my MacBook.</p>

<p>Most examples we watched are available at <a href="https://github.com/joyent/node-camp.git">https://github.com/joyent/node-camp.git</a></p>

<p>There seems to be an awesome collection of links on the camp site as well: <a href="http://camp.nodejs.org/resources.html">http://camp.nodejs.org/resources.html</a></p>

<h1>Morning</h1>

<p>The morning started with a bevy of power issues from the daisy-chained strips, but this was settled before lunch. Wi-fi was very good throughout.</p>

<h2>Ryan Dahl</h2>

<p><a href="http://twitter.com/ryah">@ryah</a> was up first with a great little demo, building a chat server and client in about 10 minutes. Hilarious as always, he discussed standard out using <code>console.log</code>, the availability of <code>setTimeout</code> in node, and talked about net and http modules.</p>

<p>Of interest was hearing that <code>require</code> can take a version # if need be, but managing in package.json ensures existence of modules before runtime.</p>

<ul>
<li><p><code>http.createServer</code> takes a callback which itself takes request/response params, returns server object.</p></li>
<li><p><code>net.createServer</code> takes callback with socket param</p></li>
<li><p>socket can accept events using <code>on()</code> method</p></li>
<li><p>socket has properties such as <code>remoteAddress</code>, etc for obtaining info about the connection</p></li>
<li><p><code>on()</code> can take event names such as &#8220;data&#8221;, &#8220;end&#8221;</p></li>
<li><p>end event is useful for tracking data/cleanup</p></li>
<li><p><code>response.write()</code>, <code>response.writeHead()</code>, <code>response.end()</code></p></li>
<li><p>You must bind to a port before a server will continue running.</p></li>
<li><p>Concurrent connections are not a problem even out of box &#8211; maybe load issues?</p></li>
</ul>

<h2>Isaac Schlueter on npm &#8211; the node package manager</h2>

<p>This presentation started slow but became interesting a couple minutes in.</p>

<ul>
<li><p>npm can be used for handling dependencies for local projects, specifying tests, start scripts &#8211; all in package.json</p></li>
<li><p>start script is actually a line of shell command to run</p></li>
<li><p>Interesting commands: npm and various subcommands&#8230; ls, adduser, install, installed, publish, activate (jump to a version)</p></li>
<li><p>npm start loads dependencies before running start script from package.json</p></li>
</ul>

<p>Next up was Guillermo Rauch (<a href="http://twitter.com/rauchg">@rauchg</a>) on express (billed as just routing in the agenda for some reason?)</p>

<h2>Express</h2>

<p>This was a quite in-depth quick tour of Express. We built a blog app with express, using jade, and testing with Expresso was covered in brief, or at least mentioned. (maybe someone could school me on what went down when I had my head turned away)</p>

<ul>
<li><p>express routes are like Sammy/Sinatra, using HTTP verbs with patterns to match</p></li>
<li><p><code>next</code> passes on control to next piece of middleware</p></li>
</ul>

<p>Jade is very similar to haml:</p>

<ul>
<li>allows filters like haml (markdown!)</li>
<li>uses &#8220;-&#8221; to jump into js for condition lines etc, no blocks of js needed, just indentation</li>
<li>no % before tagname (haml uses this)</li>
<li>multiline text needs to be prefixed with &#8220;|&#8221; on each line (haml doesn&#8217;t need this)</li>
<li>&#8220;=&#8221; will escape html</li>
<li>&#8220;!=&#8221; will not</li>
<li>jade has layouts, partials like Rails</li>
<li><p>in template, <code>this</code> refers to app</p></li>
<li><p>Express routes receive params like Rails in <code>request.params</code></p></li>
<li><p>has <code>response.redirect</code>, <code>response.render</code> methods, similar to Rails</p></li>
</ul>

<p>&#8220;fs&#8221; module can be used for dealing with static files, has both sync and async methods.</p>

<p>Expresso comes with Express now (have I got this right?) You can use make to run tests? Comes with rcov-like tool called test-cov. Didn&#8217;t get much detail about this.</p>

<p><code>express</code> command works similar to <code>rails</code> command, generates an app directory, etc. Interestingly, you can&#8217;t use this outside an existing directory.</p>

<p>Tim Caswell (<a href="http://twitter.com/creationix">@creationix</a>) was up next.</p>

<h2>socket.io and the game client</h2>

<p>Tim built a cool demo, the beginnings of a game, really. You can see it on <a href="https://github.com/joyent/node-camp/tree/master/hexes">https://github.com/joyent/node-camp/tree/master/hexes</a>. He tried to bring some interactivity to the git-together (sometimes I kill me) by having people shout out ideas for games, etc. There were one or two volunteers with ideas, but mostly the room was silent.</p>

<p>People&#8217;s shyness (in large groups) seems to have kept them from participating much in sessions like this. (it certainly kept me from doing so&#8230;)</p>

<p>The main thing I got out of the talk was that socket.io (which seems freaking awesome) falls back to long-polling, Flash, XML request, iframe and maybe even more options if WebSocket is unavailable in the browser (should work everywhere)</p>

<h2>Matt Ranney on Redis</h2>

<p>His company is doing Voice over HTTP ha! Crazy right? He was majorly enthusiastic about Redis, I can tell you that!</p>

<p>Redis is &#8220;like&#8221; good for session, shared data across, &#8220;like&#8221;, many processes, great for when you outgrow one node.</p>

<p>Quick note: Ranney totally reminds me of  Jeff Haynie. Not totally sure why. I was very happy to finally hear someone else pronounce JSON &#8220;Jason&#8221;! Go team. And stuff.</p>

<p>Ranney&#8217;s redis client ensures client requests finish in order, so you can embed a callback in only the last request(this is accomplished via combining all queries into one http request, piped together)</p>

<ul>
<li><p>Redis is straight key/value, simple client (redis-cli) with GET/SET commands</p></li>
<li><p>special functions for pubsub, storing/getting entire hashes</p></li>
<li><p>harder to make work as primary db</p></li>
</ul>

<p>I was glad to hear him speak about redis as a great tool while still mentioning its downsides.</p>

<p>After this we broke for lunch, and my note-taking and consciousness-maintaining abilities suffered noticeably. The following are my afternoon notes:</p>

<h1>Afternoon</h1>

<h2>Cloud9 IDE with Rik Arends</h2>

<p>Cloud9 is working on a potentially very cool product, an in-browser IDE along the lines of Bespin, or Palm&#8217;s Ares, but with maybe more possibilities in store.</p>

<p>Unlike Bespin, Cloud9 IDE runs on a node server instead of python, and it uses DOM manipulation instead of canvas. Supposedly, they&#8217;ve run tests and shown that their DOM stuff works faster.</p>

<p>There was also talk of the projects merging, though I&#8217;m not quite sure if this is more of a fork in the project or what parts of each project will remain.</p>

<p>Cloud9 has a full debugger, just like Ares. It has many keyboard shortcuts, including different ones between win/Mac. We were told the debugger in V8 provides most internal functionality.</p>

<p>The tabbed editor in Cloud9 looks kind of like the tabs in Chrome. It looks pretty good, but it was hard to make out much in my state while also taking notes.</p>

<ul>
<li><p>Cloud9 will run locally, and eventually [the company] Cloud9 will be hosting projects, well, in the cloud, obviously!</p></li>
<li><p>Cloud9 [the IDE] already supports Textmate themes, and has some keyboard equivalents with that lovely editor.</p></li>
<li><p>Kinect driver for node? Demoed a live scan of the room using a Kinect sensor bar. &#8220;completely useless, but fun!&#8221; What, if anything, this has to do with the IDE is beyond me, but it was <em>definitely</em> fun. The Cloud9 guys have gotten WebGL working on the server side, rendering data live to the browser somehow.</p></li>
</ul>

<p>The only hitch I remember seeing was a stop button that wouldn&#8217;t work, which Rik responded to promptly &#8211; &#8220;I do have to mention we&#8217;re beta&#8221;. And somehow, I was the only one laughing? No one has a sense of humor!</p>

<ul>
<li><p>Realtime source editing &#8211; builds off V8 internals. This was slick, the browser demoing his server-rendered WebGL code showed a change in his code immediately after he saved the file, without having to reload the browser. Not really sure I understand what happened still, though.</p></li>
<li><p>Github account: <a href="https://github.com/ajaxorg/cloud9">https://github.com/ajaxorg/cloud9</a></p></li>
<li><p>Jslint coming soon, currently matches curlies</p></li>
<li><p>Autocomplete coming soon</p></li>
<li><p>Collab coming in the future&#8230; Great for pair programming</p></li>
<li><p>Local will continue to work well (open source), saas will focus on integration with other services etc</p></li>
<li><p>Works with git already</p></li>
<li><p>Ruby a next target language to code/debug against</p></li>
</ul>

<h2>More Socket.io</h2>

<p><a href="http://twitter.com/rauchg">@rauchg</a> was up again to talk about socket.io, but by this point I was fading fast. I have very vague notes about pub sub in socket.io, but nothing worth repeating.</p>

<p>One thing that did break through my haze of sleeplessness:</p>

<p>Someone recently commented that Twitter IDs may be reaching a point where they&#8217;re too big for js to handle as numbers. Does this break lots of current js clients? Haven&#8217;t followed up on this just yet, but it was interesting.</p>

<p>That&#8217;s all I&#8217;ve got, I didn&#8217;t make it to the presentation on deployment. I sure wish I had!</p>

<p>Oh, and much of the event is or will be available online as videos for everyone at <a href="http://www.ustream.tv/channel/node-js-camp">http://www.ustream.tv/channel/node-js-camp</a>.</p>

<p>Thanks for the great day to everybody at Joyent and the other contributors and attendees, and thanks to @ryah for putting node out there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thynctank.com/javascript/2010/12/node-js-camp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mojo Madness</title>
		<link>http://www.thynctank.com/javascript/2010/08/mojo-madness/</link>
		<comments>http://www.thynctank.com/javascript/2010/08/mojo-madness/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 03:40:42 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ares]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mojo]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.thynctank.com/?p=187</guid>
		<description><![CDATA[The last 10 months or so has been a blur of JavaScript code and forum posts as I&#8217;ve tinkered on the job and off with Palm&#8217;s webOS, as well as their amazing in-browser IDE, Ares. A post or two is sure to follow, here or elsewhere, regarding the Ares experience itself, but I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>The last 10 months or so has been a blur of JavaScript code and forum posts as I&#8217;ve tinkered on the job and off with Palm&#8217;s webOS, as well as their amazing in-browser IDE, Ares. A post or two is sure to follow, here or elsewhere, regarding the Ares experience itself, but I wanted to comment a bit on Palm&#8217;s Mojo app framework and the Palm dev and support staff who work the forums, run their Twitter account, fix and improve their library and their toolkit, and generally kick ass.</p>

<p>While nothing is perfect, Mojo has a lot of things going for it: consistency of API let&#8217;s users quickly ramp up to speed any time a new widget is added or simply learn more of the large existing set; a deep, thorough set of events for every widget allows you to hook behaviors on widgets at any point in their lifecycles; a growing list of services on the device means you have access to almost all the functionality you see Palm&#8217;s own apps exhibiting; and Prototype is quite powerful in its own right.</p>

<p>That last point is as good a place as any to dive in. Prototype is, like MooTools or Base, essentially a class system and set of utility functions. While libraries like jQuery focus solely on DOM, Prototype and its kin exist to facilitate extension of existing classes and the creation of new ones. It&#8217;s this presentation of the classical inheritance pattern that allows Prototype to shine. Prototype and similar libraries allow you to inherit from existing classes much more easily than with raw JavaScript.</p>

<p>Palm&#8217;s Mojo framework takes distinct advantage of this functionality by building a vast library of classes you can make use of: from the most important widget, list, to buttons, spinners and WebViews, Mojo has a lot of UI elements available for developers to take advantage of when building applications. In addition to the set of widgets available, Mojo presents most of its additional functionality through a unique twist on the MVC paradigm.</p>

<p>The view, of course, is represented in the DOM. Controllers manipulate the DOM as well as manage all the scenes and data management assistance for the closest thing to Ruby on rails is controllers. Assistants have various lifecycle phases such as setup activate, deactivate. You can hook into these phases and fire off whatever functionality you need. For instance, making a request of the GPS service. Once this on-device service has responded, you can make additional requests. For instance hitting a web service and passing in the GPS data as part of the parameters. In Mojo models are represented by the transient in memory objects connected to widgets. A model might contain, for instance, an array of elements which is used to populate the DOM in terms of the list widget. By updating the status of these structures in memory and then calling the modelChanged method widgets will automatically rearrange the DOM as needed.</p>

<p>Ares is an in-browser IDE (think Eclipse or Visual Studio in the browser!) that let&#8217;s you drag and drop to design scene layouts, hookup widgets, and assign initial model properties and attributes for these widgets. It also contains a full- fledged debugger (hooking into the emulator via Java applet) with breakpoints and interactive console a la Firebug. These tools are amazing, and sped up the development of Taxi Magic for webOS significantly. There&#8217;s even a standalone version of the debugger, which let&#8217;s you debug non-Ares projects!</p>

<p>This kind of advanced functionality is what Mojo is all about. I&#8217;ll be blogging about Palm, Mojo, the future of webOS (thank you, HP!), and my own experience with Mojo and Ares and related topics more soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thynctank.com/javascript/2010/08/mojo-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.706 seconds -->

