Greg Jopa

Thoughts about web development and music

Testing and Code Coverage With Node.js Apps

| Comments

Istanbul Code Coverage

Developing maintainable apps requires having good test coverage. The JavaScript community has created some awesome tools that make it easy to implement workflows for code linting, unit/integration testing, and measuring code coverage. This post focuses on how to develop tests with Mocha and Supertest and how to generate code coverage reports with Istanbul.

Render SVG Charts Server-side With D3.js

| Comments

D3 Bar Chart

It’s common to use d3.js to render svg charts on the client-side. With the d3 node module you can render svg charts on the server-side as well. The d3 node module uses jsdom to simulate the browser’s Document Object Model (DOM) which allows for d3 selectors to work on the server-side.

Running D3 on the server with Node.js is pretty easy. You can reuse most of your client-side d3 code on the server. The only tricky part is integrating d3 widgets into your server-side views.

JavaScript Interview Questions

| Comments

How well do you know JavaScript? Here are some JavaScript interview questions I was recently asked. After the interview I had to research some of these because I got┬ástumped… JavaScript is hard and hopefully this post helps you out on your next front-end web developer interview.

HTML5 Cloud Composer App

| Comments

HTML5 Cloud Composer App

Last week I attended Google’s HTML5 Web App Hackathon event in Chicago, IL. Over 100 developers attended this one day event and got to spend the day at Google’s Chicago office. At the beginning of the event we split up into groups and got to design and develop an app of our choosing using HTML5. My team designed the HTML5 Cloud Composer app which lets you do basic music composition in the browser.

Conditional Fixed Positioning With jQuery

| Comments

Conditional Fixed Positioning with jQuery

Many websites use CSS fixed positioning to pin elements to the top or bottom of a webpage so they never scroll out of view. This technique is commonly used for navigation elements on sites that require the user to scroll through many screenfuls of information on a single page.

I put together a demo that conditionally applies fixed positioning to a side navigation element when it scrolls to the top of the browser window.