News for hackers. Stuff that matters.
Re:Node.js - A giant step backwards? by MatthewPhillips on Wednesday January 25, 2012 @01:47PM (#3511073)
Use recursion. Fixed:

  asynchronousCache.get("id:3244", function doThing(err, myThing) {
    if (myThing === null) {
      asynchronousDB.query("SELECT * from something WHERE id = 3244", function(err, myThing) {
  		// We now have a thing from DB, do something with result
  		doThing(err, myThing);
      });

      return;
    } else if(err !== null) {
  	// Handle error.
  	return;
    }

  // We have a thing.
  });
Re:Node.js - A giant step backwards? by CoffeeDregs on Wednesday January 25, 2012 @01:54PM (#3511109)
Were you implying that your solution was simpler?