SitePoint Podcast #184: JSPro.com with Colin Ihrig

Episode 184 of The SitePoint Podcast is now available! This week our regular interview host Louis Simoneau (@rssaddict) interviews Colin Ihrig (@cjihrig) about the new website from Sitepoint called JSPro.com where Colin is the Managing Editor.

Listen in Your Browser

Play this episode directly in your browser — just click the orange “play” button below:

Download this Episode

You can download this episode as a standalone MP3 file. Here’s the link:

Subscribe to the Podcast

The SitePoint Podcast is on iTunes! Add the SitePoint Podcast to your iTunes player. Or, if you don’t use iTunes, you can subscribe to the feed directly.

Episode Summary

Louis and Colin talk about the launch of JSPro.com, what it’s aims are immediately, and how it aims to move forward.

Browse the full list of links referenced in the show at http://delicious.com/sitepointpodcast/184.

Interview Transcript

Louis: Hello, and welcome to another episode of the SitePoint Podcast. With me on the show today is the managing editor of SitePoint’s latest content site, which is JSPro.com, Colin Ihrig. Hi, Colin.

Colin: Hi, Louis.

Louis: Hi, and welcome to the show.

Colin: Thanks for having me.

Louis: Yeah, so we’ve just launched a new site, really, all about JavaScript. Do you want to talk a little bit about what JSPro is and how you came to be involved in it?

Colin: Okay, so JSPro is basically the SitePoint network’s new place for everything related to JavaScript. We’re going to be covering things like jQuery, Node.js, native JavaScript — plain old vanilla JavaScript — and just everything on the topic. The way I got involved was I was originally just a writer for SitePoint, and I asked Tom, the editor, “What could I do to be more involved?” And I was originally just planning on writing more articles, but he said, “Oh, well, we have this new site launching. How would you like to work with it?” I said, “Sure.”

Louis: Right. So I take it you’ve been working with JavaScript for some time?

Colin: I taught myself back in high school and, basically, every job I’ve had since then, I’ve been working with it.

Louis: Right. One of the things that was surprising to me when I found out that this new site was being launched, I thought, “Oh, yeah, that’s great — a good, new site by JavaScript — that makes sense.” And then I thought to myself, “Well, that’s funny. I don’t know any other sites that spring to mind as a place to go to find tutorials and information by JavaScript.” So there was nothing off the top of my head, but then even when I looked into it, I couldn’t really find anything. So I wonder if it’s maybe just sort of a sign of a new stage in JavaScript’s development that it’s the right time for a site focused on JavaScript? I was thinking things like CoffeeScript and Backbone.js and Node have only been around for a few years, so does it seem to you like now is a good time for this?

Colin: Well, I think it’s a combination of a few things. First, for a long time JavaScript had a bad reputation and it was just something that teenagers would put on their websites to make things blink. And second, there are a lot of blogs out there and random websites that have some content, but JavaScript has evolved to the point where there is so much with so many different libraries and everything — client-side, server-side
— that to get everything in one place is just really hard, and we need a site that is collective of real people, or working lists such as JSPro.

Louis: Yeah, I’m looking forward to seeing the kind of stuff you’ll be covering. Have you worked with Node.js, for example?

Colin: Yeah, I have worked with it personally and professionally.

Louis: Right. For anyone who’s listening who’s not familiar with Node and what role JavaScript can play on the server, what are the sort of situations you’d want to consider using Node for?

Colin: Well, Node.js is really great because a lot of people associate it with just servers, but you can do a lot of other stuff with it like run scripts, like shell scripts, instead of having to use DOS or Perl or something like that. But as far as server development is concerned, it’s really good for sites that need a lot of throughput, so something that needs to scale up to tens of thousands of requests per second, because Node.js has a fundamentally different engine under the hood than web servers like a Apache and Microsoft’s offering.

Louis: And for someone who’s coming from a client-side JavaScript background, is it a big shit to start playing with JavaScript on the server-
side. Are there a lot of the APIs that are very different?

Colin: Well, Node.js has a fairly small core but an awful lot of libraries, so you can go out onto GitHub and find an API guy to do just about anything. And it is still just regular old JavaScript, so you don’t have to learn new syntax or anything like that. And the programming model is all asynchronous and really reminds me of programming for the GUI on client-side. So he presses a button and something happens in the browser window. With Node.js, somebody connects to your server and then something happens, or you connect to a database and then you wait for something else to happen and enable your results to be returned from the query. So it’s a lot different than running VHD. But if you’re familiar with JavaScript on the client’s, not the output.

Louis: Right. And you mentioned it is plain JavaScript. That sort of leads me into talking about CoffeeScript. Is CoffeeScript something that you’ve worked with?

Colin: I haven’t worked with it. I’ve read a few articles that we’ve been posting on JSPro. Personally, I don’t really care for the compounded JavaScript languages, but that’s a personal thing.

Louis: Yeah, I’ve sort of been the same. I always look at it and think, well, it’s sort of pretty, but JavaScript isn’t really that hard. I don’t find that typing those curly braces is really eating into my time that much.

Colin: For me it’s also a matter of, you write your CoffeeScript and then you’ll most likely compile it into JavaScript. And if there’s a bug and you need to debug the JavaScript somehow, you’re going to need the Node anyway, so.

Louis: Yeah.

Colin: And like you said, it’s not the toughest language to learn, at least not the basics.

Louis: Right. So you mentioned that there is already a fair bit of content up on JSPro. What are some of the pieces that you’ve liked the most or that you’ve had fun working with in your first little while as managing editor?

Colin: Right. So we’ve been up for, I think, around two weeks now, and I’ve been working with a couple of authors: one guy, James Edwards — he goes by “Brothercake”. He is doing some really good work on modular design and things like that, and in the next coming weeks we’re going to have a five-
part series from another author, Jeff Pereason… Sorry, I’m pronouncing his name wrong, but he’s going to be, basically, developing an HTML5 game with submarines and missiles and torpedoes — it’s really cool. So, you should be on the look out for that.

Louis: Right. I know there are quite a number of libraries that exist for HTML5 Canvas games. Is this something that’s he’s doing from scratch directly with the Canvas API, or is he working with some kind of library?

Colin: I believe he’s working with jQuery.

Louis: Right, but nothing game-specific?

Colin: I don’t think so, no.

Louis: Right. While I’m on the topic of frameworks or libraries, is there anything in terms of JavaScript frameworks or libraries that you’ve encountered recently and that you thought were pretty cool?

Colin: A lot of what I’ve been working with recently has been Cheerio, which I don’t believe is very new.

Louis: It’s new to me. It’s new to me.

Colin: Yeah, so if you’re not familiar with Cheerio, it’s basically jQuery for Node.js. So, say you’re doing web scraping and you’re going out and pulling in all these webpages into your server to parse them instead of trying to use regular expressions or whatever else you would try, you can build up the dorm and then query using the same selectors as you would on the client-side with jQuery.

Louis: All right. This is cool. I just pulled it up from the GitHub page. And it can also do, I think, in-place editing of the HTML, as well?

Colin: Yes.

Louis: So it does the same manipulation options as jQuery?

Colin: Yeah. So what I’ve found is that it’s not quite as robust as jQuery, but it’s pretty good and it’s not nearly as old, so I think it’s only going to get better.

Louis: Right. Is it HTML only or would it work with XML as well? Or is that maybe something that they’re planning?

Colin: I haven’t tried it with XML. I know that it doesn’t parse your JavaScript for you, so I’ve been doing a lot of web scraping lately, and when it comes time to actually parse JavaScript, you either kind of have to go towards another module called VM, which you can parse JavaScript in and execute it. It’s kind of like an eval function but nicer. And at the total opposite end of the spectrum is, I’ve been using headless browsers. It’s called PhantomJS and it’s basically a webkit, except without the GUI, so you can do just about anything with that.

Louis: Yeah, I’m familiar with PhantomJS. We use it for a few things, one of which is just running JavaScript tests in a headless mode.

Colin: I like it so far.

Louis: Yeah. I was on the Cheerio GitHub page, and it does mention that it can parse XML documents as well. So that’s definitely interesting. I’ll put a link to the GitHub page in the show notes. Cool. Another thing I wanted to talk to you a little about is one of the pieces that you wrote on JSPro, which was referring to, I think, a new JavaScript API that’s being added to some browsers, which is the navigation timing API.

Colin: Right, right. Originally, I wrote that article for SitePoint. This was back when I was just a writer. And we did content for JSPro for the national launch so we took that and published it on JSPro. The API itself is useful not as much for the webpage experience for the client, but for the developer to see what’s going on with page loads. Until those APIs came around, a lot of people were using date comparisons, which have a lot of drawbacks, for example: JavaScript timing is notoriously inaccurate, but also, we can only time so much of it because you only have from the point that JavaScript loads until the page finishes loading to really test your load times. You have no idea about what’s going on server requests and DNS lookups and things like that. So the navigation timing API is built directly into the browser and it gives you much more fine-grained control over timing numbers.

Louis: Right. So does that give you access to a lot of the same information you would normally get by looking at the network tab, like the developer tools in Chrome, for example?

Colin: Yeah, pretty much, except this lets you play with it programmatically, and it’s not going to be Chrome-specific.

Louis: Right. I’m just having a look down at the list of events which are available — it’s pretty extensive. How fine-grained is it, for example?
Can I look at load times for each of the images that are requested as part of the page load, or is it more for the page as a whole?

Colin: It’s more for the page as a whole.

Louis: Right. And so in practice, I guess, what you might use is… Rather than doing all of your debug locally and saying, “Well, it looks fast from where I’m sitting,” you could, for example, include some code using this API for some of your users and then report back to the server to see what the performance is like for your site in the wild?

Colin: Yeah, exactly, because when you’re testing your own page, you’re usually near the server or behind the corporate network. When things go into the wild, any number of things can happen. So this allows you to get a lot more reporting just from somebody on the other side of the world running your site in Firefox as opposed to you running it locally in Chrome.

Louis: Right. What is the browser support like for this API at the moment?

Colin: Oh, I wrote that article a few months ago, so I’d have to look it up on caniuse.com, right now.

Louis: Right. Here we are. Just pulled it up. Looks like IE from 9, all the modern Firefox and Chrome, Android from 4, Blackberry 10, and Chrome and Firefox for Android. So it’s missing in Opera and Safari and iOS Safari at the moment. I guess IE 8 as well, but IE 8 doesn’t count.

Colin: I think that’s pretty good support. I mean, any time you can get Internet Explorer working, that’s always a plus.

Louis: So I see there’s more content being published on JSPro, pretty much daily? What’s the current schedule looking like?

Colin: The current schedule is Monday, Wednesday, Friday, and Saturday.

Louis: Right. And I also understand you’re still on the lookout for authors, as well?

Colin: Yeah, definitely. We’re always looking for more content and more authors. Just go to JSPro.com, scroll down to the bottom of the page and click on the “Become an Author” link, and it will have all the instructions you need for, basically, getting in touch with me, and we’ll go from there. If we think you’re a good enough writer, then we send over an article and if you’re accepted, then welcome to the team.

Louis: Right. And is there anything in particularly you’re looking for? Is it pretty much anything to do with JavaScript as go?

Colin: Yeah. Obviously, it has to be related to JavaScript, but there’s a side menu on our page: jQuery, APIs, Tools and Libraries, Engines, Node.js — we’re looking for all that stuff and more. In particular, right now, personally, I would like an introduction to jQuery article. I have a couple of people sending me articles covering how to write games and how to write plug-ins but nothing on how to get started, so that would be great. I have a couple of people sending me requests for Node.js but, like I said earlier, there’s a ton of different libraries out there, so definitely looking for more stuff on Node.js. And just anything I haven’t covered, we’re still looking for it.

Louis: All right. Yeah, so again, anyone who wants to check that out, the address is JSPro.com. And like you said, the link to become an author is at the bottom of the page. I might put a link to that in the show nuts as well.

Colin: Just one last thing. If you’re interested, if you’re a reader, on the right side of the page is a box for you to subscribe to our newsletter that’s going to start within the next couple of weeks, so sign up.

Louis: All right. Well, thanks a lot, Colin, for taking the time to talk to me this week. If any of the listeners want to keep up with you, do you have your own blog or Twitter, or are you exclusively on JSPro.com at the moment?

Colin: I have my own blog. It’s www.cjihrig.com. And I’m also on Twitter:
cjihrig. My author link on JSPro should have all that information if you’re interested in following me.

Louis: All right. Well, thanks again, Colin.

Colin: Thanks for having me.

Louis: And thanks for listening to this week’s episode of the SitePoint Podcast. I’d love to hear what you thought about today’s show, so if you have any thoughts or suggestions just go to sitepoint.com/podcast and you can leave a comment on today’s episode, you can also get any of our previous episodes to download or subscribe to get the show automatically. You can follow SitePoint on Twitter @sitepointdotcom, that’s sitepoint d-o-t-c-o-m, and you can follow me on Twitter @rssaddict.
The show this week was produced by Karn Broad, and I’m Louis Simoneau, thanks for listening and bye for now.

Audio Transcription by SpeechPad.

Theme music by Mike Mella.

Thanks for listening! Feel free to let us know how we’re doing, or to continue the discussion, using the comments field below.

Win an Annual Membership to Learnable,

SitePoint's Learning Platform

No Reader comments

Comments on this post are closed.