1,135 karma · joined Mar 22, 2009 (17y ago) · 212 submissions
comment 14y ago · link · parent
comment 14y ago · link · parent
I was surprised to hear my relatively non-technical father ask me back in December if SOPA was as bad as he had heard. Discussion of this legislation seems to be making it out into the mainstream press in bits and pieces. NPR has done several segments on it that I know of for instance.
comment 14y ago · link · parent
Edit: turns out what I have in mind nearly already exists at http://eirikb.github.com/nipster
comment 14y ago · link · parent
Plus, on http://search.npmjs.org you can see how many people have starred a project. You can star a project yourself with `npm star`. For a lot of projects you can click the home page or github links from the project page too. These are really useful to get a quick glance of what the API is like. If a project doesn't have either of these then it probably isn't worth using.
comment 14y ago · link · parent
Without empirical studies with solid controls these are just stories. Evolutionary psychology theories are especially guilty of these kinds of story-making explanations that aren't held up to evidence.
comment 14y ago · link · parent
Oh goodness, yes.
How about an echo server. This one is from the twisted home page, so I am not knocking down a strawman.
from twisted.internet import protocol, reactor
class Echo(protocol.Protocol):
def dataReceived(self, data):
self.transport.write(data)
class EchoFactory(protocol.Factory):
def buildProtocol(self, addr):
return Echo()
reactor.listenTCP(1234, EchoFactory())
reactor.run()
Versus in node you can do: var net = require('net');
net.createServer(function (stream) {
stream.pipe(stream)
}).listen(5000)
This is what I mean by limited surface area. I shouldn't need to define 2 classes to write an echo server. An Echo class AND an EchoFactory? And on top of that I need to mess with a reactor? How does that pass for good API design?comment 14y ago · link · parent
comment 14y ago · link · parent
Concurrent versioning lets you do the "not change what don't need to" part really, really, well. Versions of packages that have been proven to work well with one another can continue to do so because if you need a newer version of some library then both the old and the new version can live harmoniously in the same codebase. You don't need to be paranoid about upgrading modules anymore because node and npm are already paranoid on your behalf.
103.
The node.js aesthetic(substack.net ↗)
136 points · by substack · 14y ago · 76 comments
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
I think one of the biggest benefits of testling right now is that you don't have to install anything outside of curl to start using it.
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
For instance, in C the * character is used both to declare a pointer and to dereference one and they can be stacked to dereference nested structures. Then & references a variable memory location but is also used in method signatures to change the semantics of calling a function into pass-by-reference. To complicate & further, & is often seen alongside const declarations, which are a whole other thing that people have to keep in their heads.
On top of all of this, * and & have their own operator precedences and associativities that you have to memorize, which is a whole discussion about binary versus unary operators and precedence tables. And I didn't even mention [].
I really don't think that people fail to comprehend pointers because their mental models need updating nearly as often as they just haven't fully internalized all the hoops that C makes you jump through to mess with pointers.
comment 15y ago · link · parent
117.
Bounce your http requests around with bouncy(substack.net ↗)
44 points · by substack · 15y ago · 18 comments
comment 15y ago · link · parent
comment 15y ago · link · parent