JavaScript Jabber

JavaScript Jabber is a weekly discussion about JavaScript, front-end development, community, careers, and frameworks.

Subscribe

Get episodes automatically

020

020 JSJ Cloud9


Panel

Discussion

Picks

This episode is sponsored by

comments powered by Disqus

TRANSCRIPT

020 JSJ Cloud9 MATT: My girlfriend was away for two days or three days so I ended up doing 20 hour a day just to get the time in. [Chuckles] It turns out that having a girlfriend is a good idea. CHUCK: [Laughs] [This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.] [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net.] CHUCK: Hey everybody and welcome to episode 20 of the JavaScript Jabber show. This week on our panel, we have Jamison Dance. JAMISON: Howdy? CHUCK: We have Tim Caswell. TIM: Hello. CHUCK: I’m Charles Max Wood form devchat.tv and this week we have a special guest and that is Matt Pardee. Did I say that right? MATT: Pardee. Yeah. CHUCK: Pardee. JAMISON: Is it French? MATT: It’s something. I don’t know. I think so. Pardee. CHUCK: Pardee. Pardon moi. [Laughter] Anyway you are new to the podcast, so why don’t you just introduce yourself for us? MATT: Yeah. It’s great to be here. I am the evangelist for Cloud9. It is my official title, but since we are startup, I do a lot of different things on any given day and one of those things that I do a lot is development; so I actually work on the IDE all the time and do marketing and then I travel around and tell people about all the cool stuff that we are working on. CHUCK: Awesome. So, what exactly is Cloud9? MATT: Cloud9 is an IDE that we build entirely in the browser and we didn’t do it just because it was novel and something interesting to do, we did it because we think that the web is the best delivering mechanism out there for software. And it offers all these really amazing opportunities for collaborating on your code and for tapping your projects into run VMs and the power of working with distributed computers and working from anywhere that you want, from any modern browser; if you have your laptop with you or if you go home and you wanna get on your desktop or you go to work etcetera, etcetera. And so, we’ve been building it out for the last year and a half. We came out of beta last January, at the demo conference and since then, we’ve just been innovating like crazy. And a couple of weeks ago, we came out with our new release that has collaboration – so, real time code editing. Each project is now powered by what we are calling a “workspace”, which is basically your own VM in the cloud, your own runtime environment and more powerful code completion for JavaScript. And also a local version that you can use in the same way that you use sublime for instance. So you can actually launch a project from your terminal by just pressing the C9 command or entering the C9 command rather and it will open up your browser and you can synchronize your projects with the cloud or pull them down locally to work on them offline. JAMISON: I’m going to ask how does it work offline? Is that a premium feature? I messed around with it a little bit but it was just a free account, so… I couldn’t tell what I just didn’t know how to do and what it didn’t have and what it have that you have to be a premium member to use. MATT: So you can use it as a free user, but we are working on the workflows. The work flows are not exactly clear at this point. But the idea is that when you launch the local client for the first time, it will ask you to sign in and then you are synchronized with your hosted account. And then you can see your own online projects and you can also see all of the projects that you started locally. So, if you enter C9, and then a period after it and the project directory on your hard drive, it will keep that record inside of the dashboard of your local instance. Then, you can synchronize that project with the hosted version and when you are  on the hosted version, there’s a little button in the upper right corner that says, “synchronize for offline use”. And then it will connect to your local computer and make it available for offline use and download all the files there. So, we built this because the browsers don’t really have the ability to do this yet, and we wanted to make it so that the full vision of the IDE was realized on all fronts. There is this criticism that I think is in the back of everyone’s minds about operating in the cloud that once you are offline, then you are disabled or crippled in some way. And we recognized that, so we wanted to build these things so that your project files were with you whenever you went. CHUCK: So if your project files are with you, then can you actually use Cloud9 effectively offline or do you have to use another editor? MATT: You can use Cloud9. So you actually get the whole IDE is opened in the browser locally. So we run a local server and it’s just a small little application and we run a local server to serve you the files and manage your connections and all these things. I should maybe step back a little bit and say that what you see online at c9.io or if you are operating locally, the entire IDE interface is something that we’ve open sourced. So that whole “local version” is an open source package that you can go to GitHub, you can totally download it and use it and hack on it and even snip pull request all those things. And on the hosted version, what we do is spin up a process of the IDE every time you open up a workspace. So that’s all that is, is just the interface that we’ve taken and implemented into a local version, and spun it every time that you wanna start a project or synchronize it with the hosted version. CHUCK: Cool. JAMISON: That’s sweet. MATT: Yeah. JAMISON: So I was just playing with it. I’ve played with it a couple of months ago and then I used it again today and it seems like it has a lot more features now. I was pretty impressed actually. There are lots of things that I was like, “Well, this is kind of cool, but it can’t do this.” And then I’ll look in the menu and be like, “Oh, yes it can.” It has fuzzy file opening and you can move between tabs and stuff. It really feels like a pretty complete experience. MATT: Thanks. JAMISON: So that’s just me comparing to using it as a replacement for VIM or something. You know? Just like a normal editor, I’m editing code on my machine. So what do you think are the main advantages over just above and beyond just at its text as well as some other text editor, you know? MATT: Yeah. So in a lot of ways, of course when you introduce a product to the world, you are inevitably compared to what’s already out there. And you know, Cloud9 for a long time was sort of just proving this concept that you could actually do this in the browser. Some people that used it really believed that it was a browser based application and maybe a stretch for a lot of people who have used it for a while. But all the functionality that you get from the IDE existing in the browser was… it just seem to users like this is a novel concept, this is kind of interesting, but maybe not something I can do for everyday development. And with our latest release, what we’ve done is we’ve taken that platform and kind of elevated it to the next level with all these features, like collaboration which is something that existed in some projects. Google just open sourced one of their internal projects that is based on collaborative code editing but it wasn’t as established as you would say like Google docs’ for doing document editing which is something that I use now on an everyday basis . So collaboration is definitely one of those features that I think everybody expected from a cloud based IDE. And that’s something that we just delivered that we think has the potential to totally change the game of remote development. You look at the landscape today of how people actually do work and it’s a lot different than the way it used to be, because you can have a distributed team now. You know, we’ve proven that with tools like Git or Mercurial, where you can have different people working on the same project commit their own branches and commit a pull request and then get that pulled it. But there’s still the problem of if you have remote development team like we do at Cloud9, that not everybody is aware what is going on. You can’t really just turn around and ask somebody for help. And so we were kind of scratching our own itch there by implementing this, but we think it has much bigger potential than just helping teams get work done. We think that it could help with teachers teaching the art of programming in the class room or working at a conference for instance, presenting and having people actually looking at the code as you are typing instead of squinting their eyes and trying to figure out what’s going on in the screen. So we think that’s a lot of potential over collaboration that people… it hasn’t really been a part of the culture of programming for so long that people haven’t really tapped into the full power of it but that’s something that we are really excited about. We just introduced it and we have a lot of ways we think we can improve it. But basically, just the ability to see the same code in another user up to I think 16 users at a time can be editing the same file and to chat with each other at the same time is really exciting. And then the other thing that I think is much more powerful in terms of how you actually get work done every day is what we are calling your workspace in the cloud. So this is the equivalent of putting your computer, your laptop in the cloud. A lot of people would find it easiest to compare it to a VM. It’s not exactly the same thing, but you basically have your own hard drive space, your own memory capacity. And if you are premium user, we even give you a terminal — that Tim worked on — and it allows you to connect directly to the box itself, and so every keystroke that you enter is sent to the server and then reflected back on your screen in the same way that you would do a remote terminal; normally like over SSH or something. And so, what we’ve done there by doing that, every workspace now has its own VM, is we make it possible to do things like run Apache or run a MySQL server or PostgreSQL server or something like that and run Ruby and Python apps. So in one swoop, we went from this JavaScript specific Node.js tooling, to something that — and it’s still really great for all that stuff by the way — but to something that is really powerful for your general development workflow. You can even… I mean the other day I was compiling C++ application. I know Tim compiled Lua on his workspace, so. JAMISON: Sweet. CHUCK: I was going to ask you that. I’ve heard about Cloud9 more in relation into JavaScript and it has some nifty tools for that, but does it do Ruby and Python and Lua? TIM: The Ace editor is open source and people have contributed highlighting for a lot of languages. And on top of that, we’ve done some integration at the IDE level for a lot of different platforms. CHUCK: So the Ace editor? What do you mean by that? JAMISON: That’s the actual editor IDE thing, right? TIM: Right. That’s the actual text editor widget that was written by Fabian. Mozilla like joined… they had this thing called Bespin and that used Ace. And it’s a really good text editor. It’s just a widget that lives in the browser. CHUCK: Okay. Cool. MATT: Yeah. So we are just starting to get into… so you can actually use the command line. Again this is the for premium users, but we are going to work expanding out our run panel so that you can set up a PHP-Apache server combination really easily when you click the run button or when you click the preview button to preview PHP files, it will actually run it. I think that actually might be available today. We might have done a release a couple of days ago that updated that. But also the same thing for Python and Ruby applications basically wanna be able to hit the run button and have it start up. And I know that we are doing a release in a few days that will enable you to deploy your applications — your PHP applications — to Heroku. So, we are upgrading the rest of our components to fit these kind of one-click visual workflows for all of our users and then premium users can do anything on the command line like they would normally on their own computer. JAMISON: I just wanna say that seems like one of the coolest parts. The collaboration thing is really cool. There’s also some other stuff if you really want to collaborate, you can also do that in other ways. But the built in… it feels like deployment is as much a part of the workflow as editing our code – which is really cool. You can also set that up on your own environment but, it’s awesome that it’s built in and it just happens by clicking stuff. MATT: Yeah. There’s some really cool integration with for instance like Cloud Foundry is really great one since it’s an open source pass. JAMISON: Yeah. MATT: You can actually supply your own end point. So if you have Cloud Foundry running on your own Amazon stack or something like that, you can specify that IP address or that URL to deploy directly to that. And so there’s this opportunity here where you can have staging server or a beta server and then a production server and deploy each one of those while you are developing. And Cloud Foundry for Node.js applications at least, the deployment time and reboot time for VM is something like 10 seconds. So you can do super, super fast deployments instantly. I should take this opportunity actually, it reminded me that we have a feature called RemoteSSH that allows Cloud9… if you have an Amazon server for instance or another hosting provider like Media Temple, you can connect directly to that over SSH with Cloud9. And so, Tim can talk a little bit about this. It uses a virtual file system, so Cloud9 is just the interface on the back and it’s pulling in all of the files and executing all the commands on your remote server. So if you already have a development server that’s much more powerful, then you can connect directly to that. And you know, if you have any Amazon server that you want to develop your projects on, specifically instead of using Cloud9’s backend, then you can do that. CHUCK: So I wanna jump in here real quick because it seems like you are kind of flirting with hosting. So do you actually provide hosting or is this more of just kind of, hey kind of see what your code is doing right at the moment and when you want it out where people can use it, then you deploy it. MATT: Yeah, so definitely the latter. There’s this temptation – and a really big one – some development providers are doing this to do hosting because it’s the logical next step I think in people’s minds, but we think about it differently. The hosting game is definitely very fluid and it’s really difficult to provide the kind of support that you would need if you are doing hosting service. And so we are concentrating pretty much specifically on development and in the way that you characterize the development environment kind of starting up when you’re using it and shutting down when you are not using it, is where we are really concentrating on. And then we integrate really well with all these deployment partners and also you can use the command line tooling — everyone can use Git for instance on the command line — to push to providers like  Nodejitsu or Nodester or Heroku, and do that really easily and really quickly. So we are kind of replicating some of these hosting providers and providing Node.js and PHP and Apache support and Ruby and Python and then you can test it on Cloud9 and then instantly deploys to all those other providers. CHUCK: I have to say actually that that’s fairly heartening because I know several people who have gotten into the hosting game and found out that it’s both very competitive and extremely difficult to do. And so, you know, the fact that you guys are just going to focus on providing a terrific tool for editing code and you know, maybe doing a little bit of demo work with it, you know, it’s nice to know that you are not going to go and find a quagmire to be in while you excel in another area and then maybe have that bring the whole thing down. MATT: Right. Exactly. Yeah, it’s very, very tempting to do that. But like you said, it’s really competitive and this is a full time job, that’s for sure. You know, we have about 20 people now working on Cloud9 and we are working night and day to make it great service and trying to innovate that as fast as possible and we wouldn’t really be able to do that if we were concentrating on providing scalable hosting infrastructure and everything that all the other guys do really well. CHUCK: Right. And maybe this is a topic for another time, but I’d really like to talk when you have a chance about the distributed development team and the nature of how you manage all of that. I think that’s another topic that we can spend another whole episode on. JAMISON: Can we talk about the client side just to JavaScript for the editor? Is that something that you are familiar with enough to talk about? MATT: Yeah, definitely. JAMISON: I mean, can you talk about how your code is organized and what tools that you guys use and I don’t know, some challenges and problems you’ve run into, maybe? MATT: Well, yeah. So our codebase, I’d like to pass this off to Tim after I just give a little introduction if he can talk about it at all because we use CommonJS formats and modules and things like that, which he has… [Crosstalk] JAMISON: In the browser you mean or just… MATT: Yeah. In the browser and on the backend, we created this framework called Architect, which is a really amazing… I mean I can say it’s amazing because I didn’t build it; someone else and some other people did it. [Chuckles] But it’s a really great way to encapsulate different pieces of functionality and all the existing uses that you have for Node.js, are still maintainable. So I’m actually working on an Architect demo that uses Express as the webserver component but that’s just one component of your application. It also has a database layer and a session layer and things like that. And Architect makes it really, really nice to build out your code base without… in kind of a modern workflow, without compromising functionality or wondering where you are going to put this piece of functionality or how you are going to interact with database and all these questions that seem to crop up when you start to build anything that’s worth anything. So that’s kind of the server side. Tim can go into that a little bit more. On the client side, I think we are running around… geez, I don’t know, two hundred to three hundred thousand lines of code at this point, and that’s a pretty large JavaScript code base. JAMISON: That’s like Gmail size pretty much, right? MATT: Yeah. JAMISON: Gmail is around four hundred thousand lines of code last time I heard. MATT: [Chuckles] Yeah, sounds great. JAMISON: That’s a huge codebase. MATT: Yeah and what’s cool about Cloud9 is that each component that you actually see in the editor is a plugin. So the file tree is a plugin, the editor, the tabs, console, etcetera, etcetera, and we built it that way so that each component is isolated; a developer can work at a similar component and build it up. And in each extension folder, there’s then a few basic files typically; there’s skins file, UI file is actually described as user interface components and then the primary JavaScript file. And then from there you can get for instance our language extension, which does language analysis and shows you where you have breaking code in your JavaScript or it provides code completion, that actually has about 10 accessory JavaScript files that are then loaded whenever you need them through Require.js and has workers and things like that. So actually, it’s not ideal; we are going to be changing it to use Architect on the client side as well. But actually if you look at the Cloud9 codebase you can look at how it’s designed on github.com/ajaxorg/cloud9 then you can see that on the client side at least, all the different extensions are in their own little folders and its pretty nice. I don’t know. Tim, do you wanna go into how Architect works? TIM: Sure. MATT: Yeah. Okay. TIM: So, Architect is a plugin system I wrote for Node, for Cloud9. It’s a very, very simple framework. Basically, the plugin is a Node module that can provide or consume surfaces. And so like, if you want a web app, you create a plugin that provides an HTTP service and then other plugins can consume the HTTP service. And using some API on that service, then can register raps. Architect itself is completely agnostic to all these. It’s just very basic what are your dependencies, what do they provide, what do you need — and hooks it all up. Every plugin has to accept the configuration. So, the way you build your app is you just write those big JSON file which is which plugins and which options to send. And so we’d refactor the backend of Cloud9 to use this. And so you can check out the code and basically build your own IDE, pick in the components you want and configure them how you want. And in the future, this is going to be useful for testing isolation and testing the other and all sorts of nice development task and QA things. MATT: So to give a brief example of you have for instance a database code that has basic operations like get record, insert record, delete, update and you have all these existing code that access your database layer, you can pop that into its own Architect plugin. And then you can use that, it’s completely reusable. You can even make it into an NPM package and publish it. And then you can tell Architect that you want to use that plugin as part of your application. And then so wherever you go, no matter what application you are using, you can run NPM install on your root directory and it will install that plugin to your Node modules folder and Architect will automatically detect that it’s there and load in its resources based on its configuration file. It will say, “I’m a database object, I wanna provide this interface,” and it will say (let’s say it’s a Redis for example), “I wanna provide Redis database.” And then any other plugin, can say, “I wanna use Redis database.” And so you have a user’s plugin and so you wanna say, “I wanna get all the users.” So just from your user’s plugin, you can access the Redis db object just by asking for it. And so, when you think about web application development, typically you are thinking about, “Okay, I have this web server. Behind the web server, there’s going to be users interacting with it. Behind that we want the database, and behind that we want log in and all these stuff.” You tend to think of things, if you can think like on the three dimensional plane, that’s like the z axis you are going through all of these different layers. But Architect, if you visualize an Architect, it’s more like an ecosystem. And so you have all of these different plugins that are able to grab whatever resources they need. And so you don’t have to think in terms of how the user is going to interact with it, rather which resources do you need in each plugin and it makes it really nice to just configure it that way. Did that make sense? [Chuckles] JAMISON: Yeah that did. You said something earlier when you are talking about the front end code. You said you use CommonJS for most of it, but you also require.js to dynamically load some stuff. I assume when people like open some widget that wasn’t used before, how does that work together? MATT: So in each plugin, we have the CommonJS module format and then I think inside of it, or maybe its outside of that initial call, (I can’t remember at the moment) we just use Require.js to pull in resources. So, you can for instance, if you have a CSS file or something, you can pull that in and Require.js is typically, you know of course used for JavaScript, but we modified it. I don’t know. Tim, do you know if we modified it or if Require.js allows you to prefix files with the text? TIM: I have no idea. JAMISON: There is some plugins I think that let you do that. MATT: So we just allow you to load in whatever resources you want and if it’s an XML file or CSS file, then we just prefix the file path with text and then exclamation point, and it will load it in as text. And then, you can for instance insert that stuff into the DOM or pass the XML to something else if you wanted. So Require is just used as a way to load in resources. And then each extension provides its own methods in an interface basically to use its functionality. And most of the extensions are actually self-contained. And if you want to, for instance pass off some data to another… tell everyone that something happened for instance, there’s a connection extension I think it’s called offline, that will tell you when the IDE has come online. And that’s even that’s broadcasted across the IDE objects. So there’s an IDE object that each plugin can load in and its part of the core library. And if they listen for the offline event or the online event then they can enable or disable functionality as part of that extension. And it’s not always the prettiest thing; for instance we have two different extensions for the tabs container for the editor and then we have the editor extension. And the editor might need to know when the tab’s extension has loaded and since these things are loaded asynchronously, you listen for the event that says that the tab’s extension has loaded and then the editor can do its thing. And it’s not always the cleanest interface; you have to plan for some contingencies and some weird cases, some weird edge cases, but generally speaking, it all works pretty well. And with our packaged version of our Cloud9, all of these works its magic and loads up in about fifteen hundred milliseconds, I think. So actually it all works pretty well together. CHUCK: So I’m wondering, do your developers use this for their own development? MATT: So Architect for instance just been out for just a couple months I think and its open source. I am starting to work on some demos; I’ve written the proverbial to-do application. Right now I’m working on something that uses GitHub’s oof and I just love it. As a developer, I’m just completely enamored with using this technique. On the client side, when we modify Architect for doing your client side code like this as well, I’m going to start using that, you know, it’s… I like the format, the Architecture of the client side libraries, that the client side Architect that we use for Cloud9, and it encapsulates things pretty nicely. But I think the broader issue on everyone’s mind is, “What kind of client side JavaScript libraries are out there that really allow me to quickly and easily develop nice interfaces and good applications for the web?” And that’s something that hasn’t really been decided yet. So that’s always something that’s on my mind. If I’m going to develop my own application, I’m settled on Archetype JS and Node on the backend pretty much exclusively, but on the client side, I’m waiting for Architect.js to be ported to that. But then the next step is what do we actually use to develop… or what rich client side libraries do we use to develop applications? And I think that’s still an open question. CHUCK: Okay. I’m also wondering if Cloud9 is the IDE of choice for your developers or do they all use something else like VIM? MATT: I won’t name names, but some people are still holding on to… JAMISON: [Laughs] MATT: …one or two hardcore guys who are… the reality is that up until a couple of weeks ago, we weren’t really able to use Cloud9. We had to close the loop on local and server side development and also enable workspaces to have VMs. And now, we are starting to move our process on to form. So, a lot of things that we are doing now are online. I know Tim, for instance has been a pretty hardcore Linux developer for a long Time and he is using c9.io for a lot his development now. At least he just might be proof of concept for him at this point but yeah, we’ve been talking about doing this for a long time. And it was actually possible for us to do things like compile Lua in the cloud. And so yeah, generally speaking, I think 99% of us are using Cloud9 develop Cloud9 and the local version and then once we start to upgrade the rest of the processes for online development, the rest of the Architecture then we’ll be able to all move on to the online environment. CHUCK: Yeah that’s really exciting for me just because it seems like if you’re building it but you are not using it, then it’s really hard for you to identify where it falls apart. And the other thing that’s nice about that is that as you develop it, you start finding areas where what’s there is passable, but it’s like, “Gee, it will be real nice to have short cut that would do x, y or z and just be able to put that in would be a nice thing as well.” I do wonder though a little bit. Is this extensible? So for example, if I’m doing straight up JavaScript development, it seems like you have a lot of nice tools, but let’s say I’m building a Ruby on Rails app in it, you know, can I build extensions so that it will run my rake tasks and migrate my database and do all of the nifty things that are built in to that? MATT: Yeah. So that’s something yo know, integrations and testing… are we are solving the Architectural foundation issues and then when we can move up from that, then we can solve those really specific work flow issues, rather. (Not workspace, workflow.) So that’s something that we are going to work on, but we think of it in terms of building a house; if you don’t have foundation, you really don’t have anything. So we are working from that point and moving upward and we we’ll tackle all those things in the next… before the end of the year, we are looking to have full PHP, Ruby, Python support, so that you get that advanced code analysis and code completion and integration testing and things like that, that really make you a happy developer. CHUCK: Cool. I have another question.(Sorry, Jamison I just jumped in again.) So you said that there’s a command line feature. I’m playing with it; I haven’t seen it. It may just because I’m on the free version. Is that sort of a custom command line version sort of the console that you see in maybe the Chrome web development tools or is this more along the lines of like mirroring a bash or something? MATT: So there’s two things; there’s… I actually we have a pending pull request from yours truly that shows the command line at the bottom by default. So there’s two interfaces; if you go to the view menu and you select the command line, it will show the one at the bottom, which is a customized version of a terminal that we developed. It has been in there since day 1. It allows you to type in commands like ls,  pwd, git commands to commit your code and push it and so on and so forth. And then we also introduced this terminal which is yeah, that’s a premium feature, but if you go to view terminals and then your terminal, it will give you direct connection to your VM. And then you can run commands. So, I think we probably should have talked before the show and upgraded your account. [Laughs] So that you could have seen this. JAMISON: Yeah, that’s what I thought. I was looking at this this morning and I’m like, “Man, I really should have asked.” CHUCK: Well, to be perfectly honest, we didn’t give you guys a whole lot of notice so you know, that’s understandable. But you know it’s seems extremely useful and it has a lot of the features that you want. The other thing is that… JAMISON: It has VI bindings. CHUCK: Yay! MATT: Not only does it have VI bindings… [Crosstalk] MATT: … you can go directly into VIM mode. CHUCK: Yeah I have to say this VIM bindings are usability feature at this point for me.  And by “usability feature”, I mean usability requirement. MATT: Our …day for our latest launch was when we announced initial VIM support for Cloud9. CHUCK: [Laughs] MATT: There were tens of thousands of people flocked to our site. We went, “Whoa! People really want VIM mode.” [Chuckles] CHUCK: Yeah. JAMISON: So, you said earlier, you talked about code completion and in playing with it that was another thing I was really impressed with. I’m a VIM guy, so I haven’t got code completion set up very well yet. There’s some stuff that just kind of looks at words that you use in the file, but it doesn’t really think about syntax or APIs or anything. And it seems like the code completion in Cloud9 does. What do you guys use to do that? MATT: We use a library that one of our developers… we have a couple of guys who did their PhDs in language stuff. I’m not even this smart to even describe what they do, but one of our guys built a library called treehugger, which is kind of a play on abstract syntax tree and it’s abstract enough to handle any language — as far as I know. And so, we used that to use language analysis and it’s what gives you this… if you define for instance a global variable without using the var, you just do just x=3, it will give you a warning; it will underline in yellow. It will give you a warning that says, “This variable hasn’t been defined before.” You’re basically introducing a global variable into the JavaScript you know. And then it will also show you other Interesting things like if you type  “array.lenght” instead of “th”, it will say, “Did you mean length?”. [Laughs] JAMISON: That’s sweet. If you do a GitHub search for “l-e-n-g-h-t” you’ll find tons and tons of results. MATT: [Laughs] I never thought about that. We should build our own bot that analyses that. JAMISON: This pull request? MATT: Yeah exactly. Or maybe GitHub should do that. I don’t know. Yeah, so we use treehugger to do the analysis and has its own language so that you can ask it questions like, “Show me all of the variables that have never been defined” or “Show me something about the keyword ‘this’ used in an anonymous function,” or something like that. It will actually tell you all those instances and give you the line numbers and characters, character numbers and things like that. And it’s incredibly useful and it’s really cool. I think if you look up Treehugger.js, the guy who wrote it, Zef Hemel — who is on our team — has a few demonstrations of it. And then I haven’t kept up… I haven’t been up to speed on what our latest developments are, but we hired another guy Lennart Kats, who is working on building that out so that it analyses the entire code base. And we’ll give you… so right now it will actually do code completion for Node.js, the core libraries. It also do code completion for all of your open files. And in the future it will do it for your entire project and Node modules so that you get the real kind of intelli-sense that people have expected from Visual Studio. CHUCK: All right. Cool. JAMISON: That sounds like a killer feature, that if I can’t figure out some way to bring that into VIM, that would be enough to make me consider switching. MATT: [Laughs] CHUCK: No! No VIM switchers here. [Laughter] All right. Well, is there anything else that you guys wanna talk about? We need to get into the picks pretty soon because I’m under some time constraints but we do have a few more minutes if there’s something you wanna go over. MATT: I think one of the most incredible features — and I just mentioned this briefly earlier — is this ability to do remote file system. And it’s not something that we heavily promoted in our release, but this idea that if you have your own development server… I think that there’s this dream of every developer having their own development server that has all these awesome power that exists entirely in the cloud so you can share your project with everyone. We have this ability to connect remotely over a Node utility that we built to your own sever and run your code and run your commands on your own server in Cloud9 basically access the interface for that. So I just wanted to promote that briefly because I think it’s a really cool feature. And on Cloud9, even free accounts get a free private project so that they can test this style it’s just when you create a new project on the dashboard, it gives you the option to use SSH, and you type in your SSH details, you just have to copy the key that we give you — the SSH key to the server — make sure you have Node installed and then we’ll connect to it and then you get your own server or your own Cloud9. JAMISON: That’s so awesome. CHUCK: So, could you effectively then be live editing code on your own server? MATT: Absolutely. And running all of your commands on your own server. So everything is piped to and from the file tree is abstracted, so we don’t have to worry about that; all of your files are loaded in. You can even drag and drop your files directly to the file tree and it will upload it directly to your server. CHUCK: Wow. TIM: This is my pet feature. MATT: Yeah. TIM: Because I have a bunch of sites that are on Linodes – on these Linux VPS boxes. CHUCK: Uh-huh. TIM: And one of the main reasons I use Linux is because Linux has a really good VFS built in; you can edit your files as if they are local. And so I made sure that this feature was added to Cloud9 because it’s a requirement for me. JAMISON: [Chuckles] CHUCK: Right. That makes sense. That’s really cool. MATT: Yeah. CHUCK: So the next time I get a rescue project from a client, where the developer didn’t use any sort of version control, I can just use something like this to connect to it and edit it on the fly. MATT: Yeah exactly. And  I used to do client work before starting with Cloud9 and I ported some of my old clients still contact me of course and ask for little updates and I ported all of the connection settings to Cloud9 FTP projects because we handle those, and then remote server project over SSH. And just the… you know, I used to used Coda, and having to manage connections from my laptop and my desktop even though it sounds so stupid, it’s not like this big deal but one set of credentials goes out of date and then you have to update it, getting the credentials from the other computer or even if I go to a client’s house, I connected it on their computer, so all these things that it just takes care of because it’s all on the web now and we tunnel the connection is really a crazy awesome feature. CHUCK: Nice. All right. Well, let’s get into the picks. Jamison, do you wanna kick us off with the picks? JAMISON: Sure. So, my first pick is a little OS X utility, it goes up in your menu bar, it’s called MenuMeters. And if you ever find yourself opening activity monitor on OS X all the time to check like if there is some crazy process running away or am I using in tons of bandwidth in my network or something, this just puts it all up in little widgets on your menu, it’s pretty sweet. You can customize how they look, so it’s fine. It’s free. It’s really nice. I refer to them often. My other one, I’ve been playing a lot with Go recently and at Google IO they had a great talk by Rob Pike — he’s one of the inventors of Go — and it’s called Go Concurrency Patterns. Concurrency in Go is one of the things that I thought was the coolest. It was one of the most unique parts of it to me. So he shows off how to do concurrency in Go and it’s really cool. Lots of other things in Go are really nice, but they are just like nice how you would expect them to be nice, it’s not like mind blowing — but this was pretty sweet. So those are my picks. CHUCK: Awesome. AJ said that he was going to come in; he was going to find a quiet space and actually join us for the picks. AJ, are you on? AJ: I’m here. You hear me? CHUCK: Yeah. JAMISON: You are lurking. AJ: Okay. Yeah, just lurking the day. So, two picks that I’ve got; one is SuperBetter. I was watching a TED talk… well first of all, a while ago I was just thinking about how sad it is there’s a lot of people that are just addicted to games. You know, they play World of Warcraft all day and that’s what they do and they lose their job and they drop out of school. I’ve actually had roommates where that’s what had happened because they just get addicted to online gaming. So I thought, wouldn’t it be cool if there’s was a game where in order to advance in the game, you have to do interactions in the real world that are actual real things that will make you really happy. And so, somebody who is a game designer was going… she had like concussion and that caused her to go through a period of depression because her brain was physically damaged. CHUCK: And she couldn’t play WOW anymore? AJ: Yeah she couldn’t play WOW anymore but she designed a game that is called SuperBetter and I’m not quite sure how it works yet because I’ve only done one day at it so far, but you basically put in things that you like to do and then you have to do them in order to get the points to advance in the game. And so it’s like a game to help you overcome challenges or to help motivate you to do something that you want to accomplish. So, that’s really cool. And then I discovered Adafruit, which is the website that’s really big for the Arduino people. And it’s just got all these cool sensors on it and everything. And I got my first Arduino a few weeks ago and so now I just bought some stuff off of Adafruit so that I’ll have a breadboard and wires and one of these breakout kits. And I also have my Raspberry Pi now too, so I got a few things off of there for that. And I’m excited to start getting more hands-on type tech work. CHUCK: So are you addicted to physical device gizmo playing stuff? AJ: Yes. I’m a little bit addicted to… JAMISON: That was eloquently put Chuck. CHUCK: [Laughs] I was trying to find the right words and those are the ones that came out. All right. Tim, do you have some picks for us? TIM: Yes. Quick note; I also have small electronic devices in my home. My bathroom nightlight is a Arduino Uno with a program that color cycles an LED. CHUCK: [Laughs] JAMISON: Sweet. CHUCK: The things that people do with their times sometimes. [Laughs] TIM: It only costs about $30 for one of these and you can make anything out of it. JAMISON: You know what my dream is? My dream is to build my own clap light with an Arduino. CHUCK: A what? JAMISON: My clap light. You know, you clap them on and off. CHUCK: Oh, right. TIM: So, I… JAMISON: [Unintelligible] CHUCK: [Laughs] I so wanna find one those videos that clap on, clap off some song. Anyway. TIM: So for my pick, I don’t know. Mike Pall has been posting some really cool stuff on the LuaJIT wiki lately; he’s the author behind the LuaJIT engine. He’s a really, really smart VM hacker. And so, he’s been writing these articles; like his most recent one is Allocation Sinking Optimizations; it’s a VM optimization he does in the engine, but he explains the scripts and what kind of scripts triggered the optimizations. And as a person who write scripts all day, I like understanding what kind of code is good for the engine and why. So it’s a really good read. There may be similar things for V8 in JavaScript engines, but I haven’t seen a lot of writings as clear as the stuff Mike is writing. CHUCK: Oh, cool. JAMISON: I’m always concerned with those VMs specific optimizations that they’ll go out of date. How do you make sure or are you just always trying to stay on top of what the newest stuff is for writing good code in the VM that you are on? TIM: Well, you don’t optimize for the VM; what you do is you understand the VM and then take that into account when you write your code. There’s a very subtle but important difference. I mean, ideally you write the code that is easiest for you and the VM author optimizes for your code. But I mean, certain patterns of code are simply easier to implement. If you know how a computer works at all the different levels, then you can be a lot more efficient in your decisions. CHUCK: Yeah. And I have to ask too, which code is more valuable? The code that runs faster on the VM or the code that’s less bug prone? TIM: Yeah, obviously it needs to be stable. I mean if it’s wrong, who cares how fast it is? So just be aware of what it does but write good code. CHUCK: Yeah. I think that’s the point. All right. Any other picks? We kind of derailed you for a minute. TIM: That’s all I got. CHUCK: Okay cool. So my first pick is Motor Oil. JAMISON: To drink? Come on, Chuck. CHUCK: I pointed this out on the Ruby Freelancers Show [Chuckles] if you get busy and neglect to change or put more oil into your car’s engine, bad things tend to happen. JAMISON: Oh no. CHUCK: For example, when you driving out to you in law’s house, and you get to about the furthest point from either end, the city on either end of the canyon, yeah… so I either broke a — or blow up a piston or something because I didn’t have enough oil in the car and I lost four days to replacing the engine of my car. So my pick is Motor Oil because it’s very handy thing to have in your car. JAMISON: It’s also not a drink. CHUCK: Not a drink. [Laughter] TIM: I once had an oil leak and shut a piston through my oil pan. CHUCK: Awesome! TIM: I pretty much destroyed the car. CHUCK: I can imagine. Yeah we went down to the junkyard and we bought a second hand engine and put it into the car. And yeah that just entails dropping the whole frontend out of the car and then taking the engine off and putting the new engine on and putting them back in. It sounds simple, except for the everything connects the engine. So, yeah. But it’s fixed now. It only cost me about 4 days, which I’m trying to decide still if it’s worth it. Anyway, my other pick is actually something that we talked about on the Ruby Freelancers Show today, this morning. We interviewed CJ Hayden, who is the author of Get Clients Now. And Get Clients Now is a book for service workers like freelance developers, and it basically gives you a 28-day process for increasing the amount or the number of clients that you are finding. And it is fairly comprehensive but it really helps you focus on the areas where your marketing pipeline needs help. And it’s just a super book, and so I’m going to go ahead and pick that on here just because I was so impressed and I was also really impressed with just all of the good stuff that she went over in the interview on the other podcast. So go check that out. I’ll put a link in the show notes to both the book and the episode on rubyfreelancers.com. Anyway those are my picks. Matt, what are your picks? MATT: So, I didn’t know that we were doing this. CHUCK: oh, who talked to you? MATT: [Chuckles] CHUCK: You can mention anything that’s cool. I mean, most of the time Jamison picks some kind of music or something. Sometimes we pick TV shows… just whatever. MATT: All right. Let me see if I can think of something. What’s something that I’ve been using lately… CHUCK: Yeah, something that puts you up on cloud 9. MATT: I got a good one. Can we post it in the show notes? CHUCK: Yes. We will put it on the show notes. MATT:  It’s a script. So my pick is the script that one of our developers created that you can put in your bookmarks toolbar. For people who are creating a lot of issues on GitHub, you can just click this link and it will automatically inject some predefined text that you wanna have appear. So if you have a certain structure for filing bug reports and like steps to reproduce or suggested assignee or you know, descriptions and things like that, this will automatically inject all of that template text into the issue body and then you can just fill up the details. CHUCK: That sounds really cool. Yeah I’ll go ahead… put it in the Skype chat and we’ll use it or if you wanna put it in to a gist and then put a link to the gist, that’s also… MATT: That’s probably a good idea. CHUCK: So yeah, sounds great. All right well, we’ll go ahead and wrap this up. Thanks Matt for coming on to the show again and… MATT: Thank you. CHUCK: You know, Tim is also an expert over there at Cloud9, so we’ll give him a thank you even though he was a regular. JAMISON: Yeah. That was really cool to listen to. TIM: Glad you liked it. Thanks. MATT: Awesome. CHUCK: Yeah. I’m looking forward to giving it a little bit more of a try. So, you can find the show in the iTunes store. You can also subscribe to the show if you are using something else just by going to javascriptjabber.com. If you do look us up in the iTunes store, don’t forget to leave us a review. We really appreciate it and it helps us kind of get up in the rankings where other people can find us. Also if you’ll recommend us on Twitter or anything, the twitter handle for the show is @jsjabber. And beyond that, we will just look forward to talking to you next week! MATT: All right. See you guys later. TIM: Thanks guys. AJ: Adios! JAMISON: See ya! CHUCK: Bye!

x