023 JSJ Phantom.js with Ariya Hidayat

Download MP3





ARIYA: Good morning, Tim. TIM: Good morning. ARIYA: How’s it going? TIM: Good. I haven’t talked to you in a while. ARIYA: Indeed. CHUCK: Geez, Tim knows everybody. ARIYA: Of course. TIM: It’s because I have a new job every six months. CHUCK: Oh, Okay. ARIYA: More like, “everybody knows Tim.” [Laughter] [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net.]  [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.] CHUCK: Hey everybody and welcome to episode 23 of the JavaScript Jabber show. This week on our panel, we have Tim Caswell. TIM: Hello! CHUCK: We also have Joe Eames. JOE: Howdy. CHUCK: And I'm Charles Max Wood from devchat.tv. We also have a special guest and that is Ariya Hidayat. Is that how you say it? ARIYA: Yes. That’s me. Hi, everybody! CHUCK: Do you wanna introduce yourself for us since you haven't been on the show before? ARIYA: Yes. So my name is Ariya, I work at Sencha and I also create some open source project, and one of them is PhantomJS. CHUCK: Awesome. So do you wanna explain a little bit about what PhantomJS is for the people that aren’t familiar with it? ARIYA: Sure. So PhantomJS is essentially an implementation of Webkit, but it’s sort of ‘headless’, which means nothing goes to the screen; so you drive it completely from the command line, and it has an API the you can control through either JavaScript or CoffeeScript. So one of the typical example is you create a webpage and then you load a certain URL and then you render as an image and you can do that with like 6 lines of code and writing a script and then running it with PhantomJS. CHUCK: Awesome. So what goes in to building something like this? I know Webkit is open source. ARIYA: There are several components that is being used by PhantomJS; first Webkit itself, like the name says; it’s a kit, so it has all these abstraction about network stack, graphics stack and then everything else. What I use for PhantomJS is something called, Qt Webkit -- it is officially called Qt -- this is the application framework from Nokia. And the reason I used that is because I'm biased. In the past I used for Nokia so I know that framework a little bit. And one of the nice thing about Qt Webkit is we can totally run it in a headless mode because it has these some sort of window abstraction implementation to the where everything goes to the memory buffer instead of the actual screen on your monitor; so that’s why I choose that. So, most of the code in Webkit is pretty much platform independent and we just have to specify implementation for network cycles; the way you do network request on Linux is different from Windows and slightly different as well on Mac; so that’s one of example where the implementation differs for platform. CHUCK: Huh. That’s interesting. So, before we get into how people are using this maybe to test their applications, are people using it for things other than testing? ARIYA: Most of the use case is about testing. There are cases where people want to use PhantomJS to get information off websites -- or web pages to be more precise -- because it handles JavaScript well. So if you create a completely Ajax-based apps, then you can just use a simple HTTP client such as --- because then it will get all the dynamic stuff, which is executed by JavaScript or you really can use an emulation implementation like jsdom because that is not the… it emulates it to a certain extent, but in some cases, it may... CHUCK: Right. So AJ just joined the call. Just give him a chance to say hello. AJ: Hello. CHUCK: All right. So, with testing, you can use this with Jasmine or with QUnit, did you design it with one of those in mind or did you just put it out there so that people could pick it up and implement it in their test suites? ARIYA: So those two are just the examples. I am aware right now almost every JavaScript testing frameworks has some sort of support for PhantomJS; either officially or not. So the way it happens is because basically, you pretend there is a browser, so if you  the framework, usually there's a URL or a script file that you load in the browser and it tells you everything about how the script runs and you just implement that in PhantomJS very easily; because you just instantiate the web page and then go to that URL and then you just sort of try to figure out the outcome of the testing. So the last part is usually the slightly more difficult part because every test framework has different ways to report the result of the test. CHUCK: Right. ARIYA: Sometimes it’s a matter of figuring out the selector that’s being used to display the text and then you extract it and then you get the inner text or the inner HTML of the elements. TIM: So you basically have an access to the JavaScript context directly? ARIYA: Yes and no; because you need to sort of evaluate a string in the … context. TIM: Okay. ARIYA: Yeah, but you can totally pass an argument or get the result and then go back to the main context. TIM: That’s cool. ARIYA: It’s done that way because of security; because then any web page will never either know that it’s actually running inside PhantomJS. TIM: Right. That’s a good idea. One use case that I had, the company I worked at before I was at Sencha, we were constantly needing to make screen shots of web pages. Can you get access to the frame buffer as well in PhantomJS? ARIYA: Yes. You can capture the web page; you can even specify the zoom factor or the regions and you can save it as a file or produce the version of the image and some website actually used as a way to generate automatic screenshots; for example, media queries, use PhantomJS because basically the goal of the site is to capture your web page in different screen resolution solution; so something that is small, which resembles probably mobile web browser or something that is quite big for the desktop. So it will show you how your page behaves if you have responsive design, obviously things looks okay; otherwise, things can get really messed up there. CHUCK: So, that’s interesting; with responsive design, is there a way to set the resolution or the resolution that it perceives that it has? ARIYA: Yes. You can play with different view and of course, when you capture the entire page, you can choose to capture the whole page as opposed to the visible window. So if you have a web browser, this is different between the view that you see in the window and the actual webpage. So if your page is extremely long and you see it on a mobile browser, what you see is only portion of the page; so you can choose to capture either that only or the entire page. TIM: Does it also output vector format or just the bitmap in the frame buffer? ARIYA: The supported vectors format is PDF. TIM: Okay. So you can make a PDF in a web page as well? ARIYA: Yes. There's a commercial service like URL to PNG and the way it works is basically the same; so you can totally build a webpage screenshot using PhantomJS. In fact, there are a list for examples of doing that with many different frameworks from Node.js to Play Framework, because you need some frontend code that drives Phantom to load the page and create the screenshots; as well as, you know, bookkeeping stuff in case the page loads forever or it doesn’t work. TIM: Cool. So you started this when you were in Sencha, right? ARIYA: I started a long time ago when I was with Nokia. TIM: Okay. ARIYA: Yes. But I never got the time to clean it up and publish it. So, one of the use case I have in mind was back when I was still very active working on Webkit; I want to test different functionalities, but I don’t want to create a C++ program that I need to compile every single time and then play with it; so then I just take the important classes like web page abstraction and then provide an API so that I can control it from my script and that was the early prototype of PhantomJS. TIM: Okay. So you weren’t testing web pages, you were testing Webkit itself? ARIYA: Yeah. I wanted to play with different… what if I the image loading; what if script loading, what happens and things like that. CHUCK: Oh, interesting. I think we can all appreciate where it’s gone from there. So, do you have to have a webserver up in running in order to test things with PhantomJS? ARIYA: No. you can work from file system and if you disable web security, you can still have access, our cross site access and that should work well. CHUCK: Okay. TIM: How much of HTML5 does this support? I mean it’s basically just light as Qt Webkit? ARIYA: Pretty much. So, it’s probably not up to Safari 6 or Chrome 21 yet, but that is something that is in our to-do to you know, try to catch up with … Webkit. TIM: So, do you find yourself contributing back to Qt Webkit a lot? ARIYA: These days, not anymore because we just use whatever is implemented there. TIM: Okay. ARIYA: So, one of the challenging part is that we don’t support for example CSS 3D, because that requires implementation of compositing and performance implication of compositing in software makes me think that I’d rather not support it than having CSS 3D that performs extremely slow; because we are completely headless; so we don’t have we the luxury using say OpenGL on Mac or Direct 3D on Windows. TIM: So, you can’t do off screen GL to a frame buffer; it has to be to the screen? ARIYA: Yes. There is a work around for that. We can use for example mesa, but that’s a huge effort and that’s not something that I want to... TIM: Okay. CHUCK: Right. So, is PhantomJS all written in C++ then? ARIYA: It’s written in C++ with some of the… for example, the model system is implemented from JavaScript. So, one of the nice features in the next upcoming version is you can use pretty standard CommonJS/NodeJS model in your script. So yeah, it gets more and more like Node.js. CHUCK: So, did you have to implement your own JavaScript engine? Or using parts and pieces from Webkit and then just bolting on the API that you want? ARIYA: Right. So Webkit has already a built in JavaScript engine or JavaScriptCore, and we just use that and then we hook additional API. CHUCK: That sounds really, really handy. ARIYA: As I told you before, this works out because I started as a way to as various bits and pieces of Webkit. So the nice thing about PhantomJS is that it is really easy to install on Mac and Windows; it’s just one executable; you don’t need to do anything else. And on Linux, for the next, we will also have a static build features. So, it’s almost zero dependency. CHUCK: So you are just distributing binaries, you are not compiling on the system? ARIYA: The problem with compiling is because it has thousand of Webkit files, usually takes 30 minutes; even for parallel jobs and that's something that not everyone is eager to do. CHUCK: Okay. TIM: So if wanted to like, add headless testing to my Node app that have heavy Ajax, I could just depend on some nmp module that has a binary Phantom in it? ARIYA: There’s already a Phantom Node which basically bridge Node.js with PhantomJS, so you can control PhantomJS from your Node script. TIM: Okay. JOE: So I'm wondering, is there anybody… to go back to an alternate use case, is there anybody that you are aware of that is using… like it seems like if you ever needed a case where you wanted to capture HTML that was produced and stored for offline use, that PhantomJS will be perfect for that if the HTML is being produced by JavaScript. ARIYA: So there was already somebody doing that and the reason is because sometimes you want to serve those HTML to source engines because otherwise, those source engine can’t really to know what you display in your website; if you are completely Ajax-based. CHUCK: Right. Yeah that's always been an issue if you are doing SEO; that you have to have everything you want the SEO bought to see in your static HTML, otherwise it didn’t happen. ARIYA: And you don't want to have two different codes for doing that. CHUCK: Yeah, that's just a hassle to write a bunch of code that nobody is going to see except for this. ARIYA: Exactly. CHUCK: In fact, it think most of the search engines would probably penalize you for it if they found out that that’s what you are doing; even if the information was accurate, they want to see what the user is going to see. JOE: So, how tough as a Webkit comes out with new versions, for you guys to adopt PhantomJS to those newer versions? ARIYA: It will be not trivial, but I will not call it quite difficult as well. So the challenge is just compiling it takes ages; so if I screw up something, then I'll know it in like 30 minutes as opposed to just 5 minutes. TIM: [Chuckles] That’s tough. So, have you guys updated to… is Webkit revved very much recently? Have you guys had to go through that process? ARIYA: We plan to do that for the next version, which is by the way scheduled for September. I am in the process of doing that and it doesn’t seem to be quite difficult. The challenge besides the long compile time is also testing, because it is very complicated. Webkit itself has around 20,000 layout tests and of course it’s documented over almost 10 years; so it’s huge. And right now, we just want to have volunteers to do a lot of edge cases testing. CHUCK: Right. So if somebody wanted to get involved in PhantomJS, what kind of programmer are you looking for? ARIYA: Well, any type. So, if you know C++ then you can definitely help from the implementations sites; if you are a web developer, you can help testing it, especially on Windows because we have a lot of Windows users but very few people tests our Windows binaries and that’s just sometimes not good. CHUCK: Do you have a test suite around PhantomJS or you count on people using it and then reporting bugs? ARIYA: Both. We have unit tests, but it doesn’t really tests a lot of stuff; so it’s merely testing the PhantomJS interface or API, but if I want to know where the every SVG out there is rendered correctly, that’s hard to do. CHUCK: Right. That makes sense. JOE: So one of the problems that I've run into recently with PhantomJS, I was testing using Jasmine and wanted to use the jQuery Jasmine plugin in order to get fixtures in my project; and I was running the page just (this in on Windows) just off the hard drive, right? And so the security context is different; we were running in Chrome and as we load this HTML page and then go out and try to grab the jQuery Jasmine fixtures off the drive, I was getting a cross site security exception and I had to go in to Chrome and set something specifically in there in order for that to work. I had to go change the setting inside of Chrome – one of Chrome settings. Well, in Phantom I couldn’t figure out; I couldn’t discover any way to make this same change so that the security would work in Phantom, so that when I was running under CI that it would work. Does that make any sense and is there a solution for that? ARIYA: There is a web security … as well as the webpage settings; usually that solves the problem, but there’s a general file access where you would probably go to something that is not under your directory; so you can go deep down, but you cannot go up further. JOE: Right. Right. ARIYA: So you can totally pull from the network if you enable the web security or something in your sub directory. JOE: So if I'm trying to solve that problem, is it easier for me if I just start to organize my files that they are in my fixtures that are in sub directories rather than sister directories? ARIYA: Exactly. JOE: Okay. That’s good to know. CHUCK: So, in this case, it seems to me that this kind of handles things from the full view of your web application as opposed to things like unit tests and stuff? ARIYA: Yes. That’s true. Unit test can be used with PhantomJS as well. For example, I have this example where I create a git pre-commit that launched PhantomJS with test and this serve as quick smoke test, so that I know I don’t screw up things. And because it’s really fast and it doesn’t show anything on the screen, it’s really not disrupting my workflow. So when I do a Git commit, it’s just doing something behind my back for two seconds and then if something is wrong, then my commit is completely blocked. So, combining fast smoke testing with git pre-commit is something that I highly recommend. CHUCK: Do you have an example of that somewhere in the GitHub gist or something? ARIYA: I think I showed it in some conference but I haven’t made any raw post or documentation about that. I can do that. CHUCK: Yeah. That would be really cool. Just to see it and maybe be able to steal it instead of try and write it myself. ARIYA: Right. Another thing is when you use TravisCI which is pretty cool; it has in PhantomJS so you can totally run your tests every time you push to the origin or your repository. So if you have a GitHub product and you have web application there, you already have Jasmine or QUnit or whatever, you can use a simple Travis interface to automatically test your application every time you push your GitHub… CHUCK: Yeah, TravisCI is really cool. It’s free for open source projects and I think they are working on a commercial version. I don’t know if they released it yet. They spoke at RailsConf in Austin this year and their whole infrastructure is really kind of interesting but yeah, its cool to know that they have that built-in so that you can test things from top to bottom. ARIYA: Right. Some projects already take advantage of that; for example Modernizr and EmberJS, so it has some hooks to run PhantomJS with the unit test. CHUCK: Yes. TIM: So, you say it’s fast, but I mean, you … the whole Webkit; what is the CPU wait time and the memory use of the Phantom instance? ARIYA: So the “fast” here refers to versus if you are about to emulate everything from DOM, JavaScript and CSS. TIM: So it’s faster CPU-wise than going through jsdom, for example? ARIYA: Yes. And it’s more … because real DOM parser, real DOM implementation, real CSS implementation. TIM: Okay. And like, if I just have very simple test that just run my page and close, what's the overhead of PhantomJS? Like two seconds, maybe on a modern machine? ARIYA: Oh, it’s way faster than that. TIM:   Okay, so it’s really, really fast. ARIYA: Yes. TIM:   Awesome. CHUCK: So conceivably, I could add this in with the test suite for my unit test for my front end to my back end and then just have this run alongside it and do all of the integration tests for me and it wouldn’t add that much time to my test suite running? ARIYA: Yes. JOE: Yeah. I used it a lot and it seems like it has no overhead; unit tests take way longer to run; any difference between the time of the tests suite running all by itself actually it’s a lot longer to run my test suites in a real life browser than the PhantomJS. ARIYA: So there's a slight overhead like a couple of hundred milliseconds, but that's because on the Windows and Mac, we compress the executable with the UPX, which is the self-compress execution and just to reduce the size. And that’s at hundred milliseconds, which is pretty much negligible. So that’s the trick why PhantomJS is very small; in Windows it’s just like 7MB, 10Megs tops. JOE: How big will that be without that compression? ARIYA: Three times, so that's why it was really worth doing it. That’s why if you do brew install PhantomJS, you will be done in like less than 5 minutes. JOE: So I had a couple of situations where… like when I was putting together my runner page with Jasmine, I had to go and grab my runner page out of your sample, but I know there are tons of unit testing frameworks out there, and they are popping up all the time; and so, I'm sure these ones are hard to find; somebody else has already written one or maybe if you need some changes, easy to get like actual support like say on the support ticket, “Hey, I'm having some trouble getting PhantomJS to run with this particular unit testing framework or under this circumstances,” and get some support. ARIYA: Well to be honest, I haven’t heard of someone requested that yet, so that’s probably a good thing. JOE: [Chuckles] Well I know that it took me more than a couple of minutes to get Jasmine hooked up; a lot of it was finding just the right Jasmine unit runner. ARIYA: Right. I do realize that we have problem with documentation; mainly because there's not enough people who wants to volunteer to webdocs, so one of the items in my already long to-do list is to write, “If you have this new test framework, this is how you create the runner for that.” CHUCK: Right. And I just want to point out that there's a fellow out there and I'm trying to remember his name and I'll probably remember here in a minute, but he does a lot of talking about like mentorship and stuff and one of the good ways of getting in on mentorship… so if you wanted to work with Ariya, good way of getting them in doing that is what he calls, ‘sweeping the dojo’ which is you are not qualified to actually maybe write a ton of code and you just kind of want to get your foot in the door and get familiar with project and things; then things like writing the documentation and maintaining the wiki and helping verify bug reports and things like that,  that aren’t the heavy lifting things are also really helpful for projects donors like Ariya and a good way to get involved. ARIYA: Yes. That’s good to know. CHUCK: It’s Dave Hoover over at… I think he is on Groupon now. JOE: Yeah. Is there anybody that is actually on the PhantomJS project watching Stackoverflow questions that are tagged with PhantomJS? ARIYA: Well, I do that from time to time and since that before I try to answer it, somebody already answered some of those question, so that’s good. TIM: The beauty of Stack Overflow. CHUCK: Yeah. ARIYA: Indeed. Well that’s the …, right? CHUCK: Yeah. Lots of people have the answer. Sometimes they have the wrong one. JOE: Well, the great thing about PhantomJS is once you get it hooked up, then you just never have to touch it again; once you get it configured, then it’s just there working and then your CI just goes on. CHUCK: Yeah. So what testing framework do you prefer for JavaScript, Ariya? ARIYA: For PhantomJS we use Jasmine; it’s just because somebody that implemented the first unit test, he was familiar with Jasmine. So the way it works on PhantomJS is very typical like in open source project, if you want something then make it happen and it’s up to you how to make it happen. So it was the first, then yeah, it was Jasmine. But I use QUnit as well and I like it; and ….  Has been my favorite lately, just because just like JavaScript-test-driver and Yeti you can just connect your webserver and then it captures all the web browsers; works well with PhantomJS. CHUCK: Nice. So are there any features upcoming in future versions of PhantomJS that you want to talk about? ARIYA: So the next one is 1.7; it has a model system and… CHUCK: Model system, you mean… ARIYA: Yeah, CommonJS, Node.js models, so you can require something and… I can’t remember; there are some features necessary for the implementation of the web driver, so that’s a sister project of ghost driver, which is basically web browser implementation using PhantomJS and it requires some additional feature such as able to open a window and then access it and then switch from one frame to another and that kind of features.  And the static build for Linux so hopefully, you can have just 10 MB executable file that you can drop into your CI box and hopefully it… and we should be able to have a much modern… CHUCK: Cool. ARIYA: So another typical thing of PhantomJS is that it has a time-based releases, so four times a year, which are seasonal release schedule because we do this every season; last one was for the summer, so the next one will be for the fall. CHUCK: Oh, that's interesting. It seems like a lot of open source projects, they either follow a schedule like that, or they just release when they have whatever features that they want. Is there a reason you went that way instead of… ARIYA: So that is something that I have wanted to do for a long time and then on PhantomJS, I saw the opportunity to make it happen and everyone seems to like it. CHUCK: Nice. ARIYA: And the code name for the release is always after flowers. CHUCK: Oh. ARIYA: So if it’s released in summer, then it’s it has summer flower name. CHUCK: Interesting. TIM: And here I thought two flowers from the movie. CHUCK: [Laughs] ARIYA: So if you have suggestions for the code name for the next release, then I’ll appreciate that. CHUCK: We'll find some foul smelling flower or something. JOE: [Laughs] ARIYA: It has to be good! JOE: Sego Lily, my suggestion. CHUCK: Oh, there you go. ARIYA: That’s a nice name. CHUCK: Yeah. Isn’t it the state flower for the state of Utah? JOE: Yeah. ARIYA: Okay. CHUCK: All right. I'm trying to think of more questions but I don't know if I have any. JOE: Can I just say that PhantomJS is awesome? ARIYA: Yes you can and… JOE: You know what's really crazy about it is I know there's Buster and TesterJS that the allow capture for the other browsers, which is a very viable thing, obviously; but my experience has been that testing in multiple browsers is really not necessary. If I find problems in other browsers with my code, it’s really not stuff that was unit test related; it’s more typically visually related. I know that there are differences in implementations in the JavaScript engines but things that work in Webkit work in other browsers. So it just seems to me like this is such a significantly important piece of bringing test driven development and unit testing into the JavaScript world that it’s without PhantomJS, we’d be years behind where we are at right now. ARIYA: Well to be fair, web … these days already know how to write cross browser code so it’s different than three years ago. So there's the last chance that you make a browser specific problems, and therefore as long as you can test it quickly and then you are good. …testing as multiple layers of tests, so you need to have a quick test first and then you need to have a 20 browser coverage test and we can see that as we do coding itself, the first test is usually test the code even as jasmine or any other linter. So that’s sort of early test and then you try to execute it and does it make sense? Is it valid? And then it goes on and on. So assumably, layers of onions. CHUCK: Yeah, that makes sense. Joe, do you wanna explain your approach using PhantomJS? JOE: Well, so again like I said before the beauty of things about PhantomJS is once it gets hooked up once, it is done. So, in every case where I've used PhantomJS, I've used it both with QUnit and with jasmine; in both cases it works, like I did mention the one problem I had with using jasmine jQuery, but all I do was I get my tests running in the browser locally and once my tests are running, I go over to CI, I have to go… PhantomJS is included with the two files that are necessary for both qunit and for jasmine in order to run and they have… I think I've gotten the documentation online that basically just says, you know,  you are going to wanna call PhantomJS the executable and then the first parameter, (correct me if I'm wrong here I'm going from memory) is the unit runner or the test runner file that comes included with PhantomJS and then the second parameter is the HTML file that you wanna and all I have to do is figure out my CI how to make that call with tell it what the … is and what the command line parameters are. And then the  last piece of the puzzle that you have to figure out is in your HTML file, usually you have to include another file that will listen to all the events from the unit testing framework; so in QUnit, qunit comes with this file; with jasmine, I had to look it up online. And anyway, what it does is it listens to all the events and then it can output to the console (using just console.log typically) a message formatted specific to your CI. And then PhantomJS output goes the CI is reading all the console output from PhantomJS and it sees those massages in those certain formats and it tells your CI system whether or not your tests pass; how many of them they were and then the new CI system can include it in the other test runners that you might have; so you have server side test runners like if you are using JUnit for Java, it’ll merge the two together and it will just give you one big report and say you had a thousand Java tests and you had a hundred JavaScript tests and tell you, you had 1,100 tests and they all pass and these ones failed. And so it is a little bit of work; just finding people that have setup example files and getting their files and putting them into right place. And so, with the qunit and jasmine, because it’s so popular, it’s very easy to go out and find those files that will get the output correct. CHUCK: And which CI are you using? JOE : I've always used TeamCity; it’s great product. I know the process is identical to Jenkins. CHUCK: Yeah I was going to say you can execute from the command line on Jenkins too. JOE : Yeah. I can imagine there's a CI system out there that doesn’t support that model. Some of the unit test runners don't already have runners that are integrated within the CI system. TeamCity does have test drivers specific to .NET and I think it has JUnit and things like that. So it don't need the command line versions of those, but they all support them as far as I know; any CI system would.  It’s one of those things you only do when you setup your CI so that the next time you go and you set up your CI, you are just like, “Okay, where did I find this file and how did I get it?” and stuff. I think one nice thing would be is if there will be any easy place like somebody set up a website that try to collect the files that are necessary and keep them up to date; because if you happen to have an older version of Phantom and then you got to marry the version of the qunit that you are using and grab the files out of there, and that would be nice if somebody put that information together kind of feel a little bit like a detective; get online and go find the right qunit file that adjusts the output. But once you find those three things and put them together, it just all works and it’s great. ARIYA : Sounds like a great idea for a boiler plate project. JOE: Absolutely. ARIYA : Like Phantom, Jasmine, TeamCity boilerplate. JOE: Exactly. ARIYA : From client side not from CI, at least there’s already, for example … that we'll have support for PhantomJS, so you don't need to do extra stuff, which is nice. JOE: Yeah. CHUCK: Cool. All right, well if we don't have anything else to talk about, let’s go ahead and do the picks. Did we warn you about picks Ariya? ARIYA: Yes. I read your email. CHUCK: Oh, good. Yeah. I used to forget, so now I always ask the guest, “Did I tell you about ‘picks’?” and they are like, “I'll come up with something real fast.” All right, cool. AJ, why don't you start us off? AJ: So, my pick is people that take learning into their own hands. I think I picked that once, but there's this guy, I think he's a BYU student, I'm not sure. He sent us his resume once and so I've got this thing that post from the show notes. His name is Sterling DeMille and he created a thumbnail viewer with PhantomJS and  I thought that that was way cool and I just love it when people have little projects that do and they show off to the world how cool they are. And another pick, I've picked this before too, but I'm going to pick it again which is theTransistor data and just south of center street Provo. And I'm actually doing a class on NodeJS this Saturday and there's a bunch of cool guys down there; they are mostly hardware guys so they work with like Arduino, Raspberry Pi and that kind of building stuff. CHUCK: Yeah. They are kind of a co-working space for that kind of thing. AJ: Yeah, that too because it’s like $40/month and you can stay there all day if you want. I think most of the guys have normal day jobs, but then in the evening, they come and work on their projects together. CHUCK: Yeah. Cool. Joe, what are your picks? JOE: So, my first pick is not available for most people until tomorrow and that would be the new movie Total Recall coming out; I'm super excited for that one. CHUCK: Joe, I hate to break it to you, but that movie was released in the 80s. [Laughter] JOE: Really? Oh my gosh! I've been missing it all these time. CHUCK: They’re scamming you, man. JOE: ‘See you at the party, Richter!’ Do you recognize that? CHUCK: I haven’t actually seen it. JOE: Oh, you haven’t? Oh, that’s a classic Arnold Schwarzenegger line. All right, so that’s my first pick is Total Recall. My second pick is a classic, old ancient book called “Test Driven Development by Example” by Kent Beck. Really the original bible on doing test driven development. And if you haven’t gotten that book and read through it, it’s fantastic. My one complaint is he makes some kind of funny justifications for cleaning up code by calling them duplicated, but I didn’t necessarily agree with. If I were to rewrite the book, I would just say I'm cleaning up code to make it better, just to remove duplication; but it is an amazing book and a great way to learn test-driven development if you are interested with test driven development, it’s a great book. CHUCK: All right. Cool. Tim, have we heard your books? TIM: So, I’d been really having fun with the smith library at work, so I'm going to pick that. It’s an RPC system that I built for external use, but it turns out to be generally very useful. And I'm going to add Travis and Phantom unit test to it if possible and to make sure that the HTML engine in Phantom is new enough. CHUCK: Okay. TIM: But I’ve really enjoyed using the library and I think it’s fun. CHUCK: Okay. Cool. So, I should have some picks. I've spent the last couple of days working on some releases for some clients and by ‘releases’, I mean ‘betas’ and kind of wound up rushing to get stuff so I'm trying to remember what the I've worked with so that I could pick it. One pick and we talked about it before and it’s just something that I've really found handy for a lot of things, especially in the case where I'm doing a lot of evented stuff that I want in my webpage where I wanted to do some ajax work or do some updating based on some data that I have stored somewhere. I used BackboneJS and it has made my life immensely easier than just going with the vanilla jQuery stuff so, really, really enjoy that. I don't really think I have any other picks at this moment; so Ariya, what are your picks? ARIYA: My first is Mockingjay. I try to finish the entire hunger games books and it’s been fantastic so far. I like reading books. And the second one is the programing language from Google, it’s called Dart. I'm sure everyone heard about it. I think it’s a fantastic language and I think in many cases, people will get it right with respect to the dx, so a lot of people talk about eux, but we need to emphasize more on the dux; the entire SDK, the editor, it has all the fancy autocomplete and integrated docs and so on. It’s just fantastic; it’s very nice. CHUCK: Okay. ARIYA: All right. Those are my picks. JOE: Chuck, since you only took one pick, can I have your second pick? CHUCK: Go ahead. JOE: I also wanna pick the Olympics. CHUCK: Oh. I was sitting down at lunch the other day and they had fencing on, oh man; so boring. JOE: [Laughs] CHUCK: But I've really been enjoying the swimming and stuff. JOE: I thought the table tennis is surprisingly interesting as is the badminton. CHUCK: Oh, really? JOE: Yeah. Those are surprisingly interesting, but by far the best part of the Olympics, (at least for me) is the watching the US women’s soccer team just kick everybody else’s butt. And I heard somewhere that if the US ever wanted to get back to all those countries that really hate us, what we should do is get really good at soccer and beat them at the only thing they care about. CHUCK: [Laughs] JOE: And our women are only doing just exactly that. CHUCK: Nice. All right. Well, we'll get links to all of the picks that we had in the show notes. Looks like Tim has one more question. We'll let him ask it on the air and then we'll wrap up. Okay, I'll ask it for him. He just typed it in the chat; he says, “Does Phantom support data view and the web sockets with array buffer messages?” ARIYA: So web sockets is yes, I don't know about other few array buffers since that’s too bleeding edge from PhantomJS right now, so you might want to wait like a couple of months. CHUCK: Okay. Cool. All right. Well let’s wrap this up. I just wanna remind everybody that you can go and check out Jamison’s what is it… it’s a group reading the papers on programing and we'll have a link to that in the show notes. And I also wanna just thank Ariya for coming on to the show. ARIYA: Thank you for inviting me. I’m glad to be here. CHUCK: Yeah, it’s really interesting. I'm definitely going to have to go dig in to the Phantom and figure out how to get it into my CI set up for my clients. ARIYA: If you have any feedback in how to improve Phantom get better, then let me know. CHUCK: All right. Well, we'll wrap the show; we'll catch you all next week! ARIYA: Thank you. JOE: Adios. TIM: Thanks guys.

Sign up for the Newsletter

Join our newsletter and get updates in your inbox. We won’t spam you and we respect your privacy.