サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
dailyjs.com
I've decided to stop writing DailyJS. It's part of my weekday ritual, and so it's a difficult decision to make, but it's time to move on to other things. I love writing regularly, but mistakes have started to creep in that mean it's difficult for me to publish articles with the level of confidence that I'd like. There's been a small community of contributors that have made DailyJS great and encour
Sindre Sorhus is the author of over 600 modules on npm. He recently wrote a long GitHub comment about why we should use small modules, and I asked for permission to reproduce the text on DailyJS. Read on to learn about why small modules make programming easier, and why it's not really about lines of code. People get way too easily caught up in the LOC (Lines Of Code) argument. LOC is pretty much
When io.js got started there were those that saw it as the "new Node", a more aggressively developed fork that quickly implemented features that were lacking from 0.11 and 0.12. And the lack of the mystical Node.js 1.0 in 2014 certainly encouraged that kind of attitude. We were waiting for an updated V8 with the ES6 features that we wanted and more mature core modules, but what we got was leadersh
JSX-TypeScript JSX-TypeScript (GitHub: fdecampredon/jsx-typescript, License: Apache 2.0, npm: jsx-typescript) by François de Campredon is a fork of TypeScript that allows you to use React’s JSX syntax. There’s a port of the TodoMVC that uses JSX-TypeScript that shows how it works. The app.ts file, for example, has fragments of JSX in a render method, just like a typical React application. Because
Vildan Softic wrote in to tell me about Aurelia, a new client-side framework. It got a lot of press recently, so I’ve been reading through the documentation and source to learn more about it. Aurelia was created by Rob Eisenberg and is the successor to an older framework called Durandal 2.x. It’s built from several libraries that provide the following features: Dependency injection Two-way data-bi
These days the terms VT100 and terminal are synonymous with either text-based interfaces or a shell. But there was a time when terminal referred to “computer terminal” – a machine that allows you to input commands into a computing system and view the results. This includes CRTs and teletype printers. The VT100 terminal was based on an Intel 8080, and if I remember my computer history correctly rep
The JavaScript Developer Survey has now closed. As always the results are available to the community for further analysis: Summary Raw spreadsheet data (gzipped CSV) Results for 2013 Results for 2012 97% of readers write client-side code, while 56% said they write server-side code. Last year server-side development was at 28%. I’d like to think that the interest and adoption of technologies like N
As someone who works professionally with Node and writes about it regularly, I’ve naturally been following the discussions about Node forks and the Node advisory board. I’ve been collecting articles in Instapaper and highlighting things like crazy to figure out what’s going on. On Wednesday TJ Fontaine posted an advisory board update on the official Node blog. The board has had three meetings so f
Here is the JavaScript Developer Survey for 2014! You have two weeks from now to complete the survey (the 15th of December). I asked for help with the questions last year, and collected pull requests and issues to improve the survey. You can view the survey repository at alexyoung/dailyjs-survey. Many thanks to everyone who has helped so far. Please fill out the survey and share it with your fello
StackHack StackHack by Philip Deschaine and from PubNub is a WebGL demo that uses PubNub to create a massively multiplayer interactive block stacking game. The technical details are discussed in StackHack: A Massively-Multiplayer Mashup of PubNub and Three.js. Let’s start with the server. I used Node.js with express to serve up our HTML, CSS, JavaScript. When a client connects, we generate a UUID,
Bluebird gets a lot of respect for its performance and API style, and reading Optimization killers on the Bluebird wiki reinforced my own inclination to use it over the dozens of other competent promise libraries. Dug up by diggan on Hacker News, this wiki page explores some ways seemingly innocent JavaScript can cause V8 to avoid optimisation. It contains a code sample that allows you to detect i
“PatrickJS” sent in PathGL (GitHub: adnan-wahab / pathgl, License: GPL, npm: pathgl) by Adnan Wahab. It’s a library for data visualisation with D3.js that allows you to do cool things with WebGL and particles. The particle physics example looks like this: var particles = pathgl.sim.particles(1e5); d3.select('canvas').selectAll('circle') .data(particles.unwrap()) .enter().append('circle') .attr('r'
If you’ve ever wanted to set up a private Bower repository, private-bower (GitHub: Hacklone/private-bower, License: MIT, npm: private-bower) by Barna Tóth might be what you’re looking for. You can install it with npm install -g private-bower, and then run it with private-bower. It accepts some command-line options to change what port it listens on, but all you really need to do is add some lines t
Konrad Dzwinel sent in a JavaScript OCR demo. It uses getUserMedia to get images from the camera, glfx.js and JCrop for user-driven image correction, and ocrad.js to handle the character recognition. The Ocrad.js demo managed to recognise the text in my sample image. I noticed it didn’t work with white on black text – it had to be inverted for the correct text to be recognised. Ocrad.js is an Emsc
If you’ve been won over by Gulp, the streaming build system, then you’ve probably been wondering about scaffolding. Slush (GitHub: klei / slush, npm: slush) takes Gulp’s streaming build concept and applies it to scaffolds, making it a Gulp-friendly Yeoman competitor. The author, Joakim Bengtson, notes that it may take a while for the registry of available generators to update, so until then you ca
Matter.js (GitHub: liabru / matter-js, License: MIT) by Liam Brummitt is a stable and flexible rigid body physics engine for browsers. The author describes it as an alpha project that came about as a result of learning game programming. If you’re interested in reading more about physics for game programming, Liam has collected some useful resources in Game physics for beginners. Matter.js uses tim
This post is by Matt Greer. You can find the original here: mattgreer.org/articles/promises-in-wicked-detail/ I’ve been using Promises in my JavaScript code for a while now. They can be a little brain bending at first. I now use them pretty effectively, but when it came down to it, I didn’t fully understand how they work. This article is my resolution to that. If you stick around until the end, yo
Client-side development has been shifting away from monolithic libraries. While jQuery is still hugely popular, building projects from smaller libraries is increasingly common. To make this easier to deal with, projects have appeared to manage dependencies. These tools may be simple package managers, or a combination of a build tool and a package manager. Recent History Client-side package manager
Error was originally a character in the hit video game, "Zelda". I like to define a lot of objects that inherit from Error. I find it helps me to track down issues – post-mortem – but also to clearly handle expected errors. Sometimes writing error handling code feels like a chore, but it shouldn’t be an afterthought. Well-designed and well-tested errors will help you maintain projects, but also he
Are you tired of callback wrangling for web middleware? Koa (GitHub: koajs / koa, License: MIT, npm: koa) is a new web framework by TJ Holowaychuk, Jonathan Ong, and Julian Gruber that embraces ES6 generators down to the core. Gone is the next parameter in Express, replaced by yield next which can be called in a synchronous style. With generators we can achieve “true” middleware. Contrasting Conne
The JavaScript Developer Survey has now closed. As always the results are available to the community for further analysis: Summary Raw spreadsheet data (zipped CSV) Results for 2012 51% of readers write client-side code, while 28% said they write server-side code. Last year client-side was at 98%, so I imagine this is partly due to a changing audience on DailyJS, but it’s interesting how strong se
npm is moving fast, so here are some features you might have missed since 1.3.7. Remove devDependencies We’ve noticed people running into situations where ./node_modules gathers cruft. For example, installing devDependencies during deployment due to various reasons. To clean up in npm 1.3.10 and above, just run: npm prune --production Repository Shorthands Use the shorthand "username/repo" for the
I do a lot of work with Mocha, because I like to write well-tested Node projects. Sometimes there are things I just can’t figure out non-interactively, and that’s when I reach for the debugger. It’s a lot better than repeatedly running tests with more and more console.log statements. Rather than using any extra Mocha extensions, I find Node’s standard debugger works great. With Mocha you access it
Part 1: Google, Twitter, and AngularJS Part 2: Let's Make a Feed Reader Part 3: Rendering Feeds Part 4: Managing Feeds Part 5: Tests Part 6: Adding Dependencies Part 7: Form Validation Part 8: Iterators and Data AngularJS has a rich expression-based system for filtering and ordering data based on predicates. The orderBy filter can be used with the ng-repeat directive: <ul> <li ng-repeat="item in s
On a philosophical level, Node developers love Unix. I like to think that’s why Node’s core modules are relatively lightweight compared to other standard libraries (is an FTP library really necessary?) – Node’s modules quietly get out of the way, allowing the community to provide solutions to higher-level problems. As someone who sits inside tmux/Vim/ssh all day, I’m preoccupied with command-line
Part 1: Google, Twitter, and AngularJS Part 2: Let's Make a Feed Reader Part 3: Rendering Feeds Part 4: Managing Feeds Part 5: Tests Previously In the last part we changed the app to support multiple feeds. This week you’ll learn how to write a short unit test to test the app’s main controller. This will involve mocking data. If you get stuck at any part of this tutorial, check out the full source
This is the first article in a three-part series on LevelDB and how it can be used in Node. This article will cover the LevelDB basics and internals to provide a foundation for the next two articles. The second and third articles will cover the core LevelDB Node libraries: LevelUP, LevelDOWN and the rest of the LevelDB ecosystem that’s appearing in Node-land. What is LevelDB? LevelDB is an open-so
My behemoth of a Backbone.js tutorial series has run its course, so I wanted to follow it up with some posts about AngularJS. One thing that intrigues me about AngularJS is the emerging relationship between Google and Twitter. Or between prominent Google and Twitter developers. I don’t think there’s a overarching plan at the management level to create an open source partnership, just a set of coin
Recently I started work on a Node project that was built using Sequelize with MySQL. It was chosen to ease the transition from an earlier version written with Ruby on Rails. The original’s ActiveRecord models mapped quite closely to their Sequelize equivalents, which got things started smoothly enough. Although Sequelize had some API quirks that didn’t feel very idiomatic alongside other Node code
次のページ
このページを最初にブックマークしてみませんか?
『DailyJS: A JavaScript Blog』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く