Example output, where |
is the cursor:
function () {
|
};
foo(function () {
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
namespace('test', function () { | |
desc('Run server tests'); | |
task('server', [], function () { | |
jake.exec('mocha spec', function () { | |
console.log('Server tests passed'); | |
complete(); | |
}); | |
}); | |
desc('Run client tests'); |
Example output, where |
is the cursor:
function () {
|
};
foo(function () {
// Needs a clever name like "debounce" or "throttle" (but it's not either of those.) | |
function doOperationButOnlyReactIfItWasntCalledAgainInBetween(promiseOperation) { | |
var latestOperation = null; | |
return function () { | |
var deferred = Q.defer(); | |
var operation = promiseOperation.apply(this, arguments); | |
latestOperation = operation; | |
operation.then( |
Because I've been so busy lately I haven't really had a chance to talk about anything I've built or been using, but i've been publishing so many new modules it's worth going back over.
Real quick, Getable is a mobile/desktop ordering and fullfillment application for commercial construction. Think mobile amazon/ebay for large construction jobsites.
First off, everything is realtime, using engine.io
with everything but long polling turned off. We tried leaving websockets on but there were some nasty bits that made the connection die and not come back on iPhone which we just couldn't debug in time so we turned it off.
Engine.io is a great module as it just provides a simple duplex stream-like (more on this later) interface that upgrades itself when available. This meant that in order to get some use out of it I had to write a few modules.
eiojson
sends JSON messages rather than strings bidirectiona
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
MDB is unlike most debuggers you've experienced.
It is not a source level debugger like gdb or lldb or even Node's builtin debugger
Generally used for postmortem analysis.
Postmortem is for Production and Development
We operate mostly on core files, though you can attach to running processes as well.
Skype | |
Min: 6 | |
Max: 32 | |
Can contain: a-z A-Z 0-9 . , _ - | |
Other: Must start with a letter | |
Min: 1 | |
Max: 15 | |
Can contain: a-z A-Z 0-9 _ |