Sometimes when you need to examine the results of a JSON response, using your browser’s developer tools console just won’t cut the mustard. In such a case, a good alternative would be to copy the JSON object from the console and to view it in your text editor. It’s not quite as easy as ‘CMD + C’, ‘CMD + V’ though, so here’s a quick primer. Specifically, these instructions are for copy the response from Chrome’s Developer Tools console to Sublime text 2.
First, we need to copy the JSON object from the console:
// where res.data is the JSON object copy(JSON.stringify(res.data))
Now, if you don’t already have it, you’ll need to install the Sublime Text 2 package, ‘Pretty JSON’. I got it via Package Control. Read more about Package control and installing new packages here.
Once you have the package installed:
That’s it! You could also use the shortcut code for reformatting with Pretty JSON, which is ‘^ + CMD + J’
Is a new feature requiring weeks of time and thousands of lines of code? That’s your code telling you there’s probably a better way. Is there a simple way to code something in one hour instead of a complicated way that will take ten hours? Again, that’s your code guiding you. Listen.
Movement, change, and animation are a lot more than ways to delight users: they are a functional method for design.
I just had the pleasure of reading two enlightening articles from members of the BBC dev team about their approaches to responsive design. First, BBC News technical lead John Maslen shares his tips on “cutting the mustard" (in other words, progressive enhancement). In summary:
The second article from the responsive news team’s tech lead John Cleveley and lead designer Julian Kirby talk about the challenges of delivering content to multiple devices. There is some overlap with Maslen’s article, but they also go into more detail on common challenges such as images, grid system and testing with PhantomJS.