HNHacker News
TopNewBestAskShowJobs

vkjv

792 karma · joined January 16, 2014

submissionscomments
vkjv··on Gotchas from Two Years with Node
> "...developers without a formal education..."

I think it's more about developers without experience. If you have experience doing something successfully, you are more likely to reach for the same tool set when doing it again. And someone who has done something successfully once is less likely to make naive mistakes when doing again.

I think most issues, like the ones in this article, are much more likely to be attributed to these two facts than to node.js as a language.

Contrived analogy: An experienced builder sets out to build a home. He grabs a Stanley hammer and successfully builds a home. Another person, who has never built anything, grabs a DeWalt hammer and fails miserably. Does this mean that only Stanley hammers are appropriate for building a house?

vkjv··on Gotchas from Two Years with Node
I've had some similar experiences as we've scaled from internal only applications a couple years ago, to handling thousands of requests a second at peak.

1. Event loop. Yep, always be careful not to block it. But, I think this is more of a tuning thing. If you're using Java, you figure out how many requests you can reasonably handle and make that your water mark. Do the same thing in node, if you take too many connections, start refusing them fast and not queuing them forever.

2. Exceptions. Honestly this has never been an issue. We've used Promises for async flow from the beginning. This means that there is nearly zero code that is not inside of a promise chain and hence inside of a try {} catch {}. We just don't have this problem and we don't crash.

3 / 4. Oddly enough, I found streams to be a solution to this problem and not a cause, if using back pressure properly. I highly recommend highland.js.

vkjv··on Npm Private Modules
This is indeed a great way to shim, but in case any readers aren't aware of the limitations:

* NPM is unable to keep track of the version. This means no semver and that `npm install` re-installs the module every time. * Git sub-modules do not work. This can sometimes be a deal breaker. * This requires either your username password or private key to install. This gets especially messy if you are trying to do some type of CI build (e.g., build a docker container) and don't want your keys to leak into the build artifact.

vkjv··on Do engineers really make better spouses?
While INTJ are most often associated with engineers, most engineers are not. INTJ is pretty rare, I think somewhere around 1%, which would make it only account for roughly 20% of engineers and scientists [citation needed].

Honestly, with money being one of the leading causes of divorce, I would say a reasonable assumption is just that engineers make more of it and are more likely to spend what they do have wisely.

vkjv··on How Beats by Dre played you like a fool
sigh $14 in components for a $100 product seems like a really tight margin and not exploitation to me. The tooling chain for these things (injection molding, etc.) is really expensive.

Not that these are a great product, but I don't see them outright ripping anyone off.

vkjv··on Robber Barons Would Have Loved Facebook’s Employee Housing
I completely agree with this. It is often said that, "constraint drives creativity." Therefore, if everyone is bound by the same set of constraints, you limit the possible set of creativity.
vkjv··on The state and rate of HTTP/2 adoption
I am looking forward to wide-scale HTTP/2 adoption. It means you can take something simple like gRPC (http://www.grpc.io/) and suddenly scale it with commodity things like an HTTP load balancer.
vkjv··on 10X Programmer and Other Software Engineering Myths
I think like a lot of myths, there is a kernel of truth in the 10x programmer myth.

The fact is, some problems are hard. Some problems are beyond the grasp of some developers. Even given unlimited time an individual may not ever accomplish the goal. I can certainly think of problem sets where that is true of myself.

In those specific circumstances, that person can be considered a "10x programmer" when compared with another.

vkjv··on It’s Comcastic, Or: I Accidentally Bought a House Without Cable
This. Most people, unsurprisingly, are quite nice. I think a lot of people would be willing to do this if they get high-speed service for free.
vkjv··on Viking Code School
At risk of admitting tl;dr... how long do you have to find a job? For example, if I find a job programming 10 years after graduating from an accredited university, do I need to pay them?
vkjv··on JavaScript's world domination
I would far prefer a language that has parts that I need to avoid than one that is completely missing parts I really want.
vkjv··on JavaScript's world domination
Lots of indented function calls is just poor design. You get the same thing in Scala when you start dealing with lots of Futures inappropriately.

Just choose a decent abstraction for callbacks. I prefer promises, but async.js does a good job as well.

The `flatMap` function on a Future in scala might be built into the language, but it is implemented and scala and not significantly different (in my mind), to Bluebird being implemented in javascript.

vkjv··on JavaScript's world domination
This. A thousand times, this. It's a really good model for something that is I/O bound because it is easy to reason about. This makes the model perfect for events in the browser (both DOM events and XHR).

It's not that Javascript is especially suited to this model, but thanks to the browser, it was already the most used implementation of this model.

vkjv··on Sublime Text 3 Build 3080
I see lots of comments from people saying that after years of usage they just recently bought a license.

I'm curious what most people are using it for, since the license clearly states that you need to buy a copy for professional use.

vkjv··on Getting an A+ on the SSL Labs test in Node.js and Io.js
While node.js is great at non-blocking IO, it's not great at the blocking kind. E.g., shuffling bytes.

While you are correct that node.js is happily not blocking the main thread while reading from disk, once that returns it still needs to serialize that data from I/O to the request and that is both blocking and slow.

I highly advise that you don't use node.js to service static content outside of a development environment. And if you are already using nginx in front of node, you might as well use it for SSL.

As a bonus, nginx does a great job proxying multiple node.js processes. You could also use the cluster module, but last time I checked, that was still marked as experimental.

vkjv··on How not to advertise for a job in London
Out of curiosity, are these discrimination laws hard and fast in in the UK? At least, in the U.S., most of these laws explicitly only affect a company above a certain number of employees.
vkjv··on SQLite developer must have received a lot of phone calls
You can also type `gmail` and hit `ctrl+enter` which will auto add `www` and `.com`.
vkjv··on I have moved to naming global singletons with a The* prefix
IMHO, like most patterns, the pattern is appropriate in some situations and not always an anti-pattern. It only becomes an anti-pattern when it is abused in situations where it is not appropriate.

For example, how would you go about implementing a connection pool without a singleton? Even if you pass it around everywhere, it's still a singleton, just explicit instead of implicit.

vkjv··on The day I was DoSed by Google
Could you maybe start serving 503 to googlebot after hitting a threshold?
vkjv··on A website that deletes itself once indexed by Google
Authentication should happen server side, but authentication need not happen at the time of delete. When deleting, you should be authorizing and validating, which can safely be done client side... but, if you are doing something server-side (e.g., a delete) you should also be doing it server side.
vkjv··on Turning the database inside-out with Apache Samza
You can do similar "magic" cache invalidation with Elasticsearch and the percolate feature. Each time you do a query and cache some transformation of the result, put that query in a percolate index. Then when you change a document, run the document against the percolate index and, voila, you get the queries that would have returned it and can then invalidate your cache.

This method of cache invalidation fails in a very key place though (just like in the article). What happens if you change a very core thing that invalidates a large percentage of the cache?

vkjv··on How a half-million dollar Kickstarter project can crash and burn
I saw similar red flags in other places.

"Internally we expected that at worst 20% of people who had signed up to the newsletter would pre-order, and at best 50% of people on the list would convert into sales."

I work for a brand whose customers are fairly passionate about it and those expectations are insane. A little market research would have shown that the 1.5% that they got was right in line with the standard.

vkjv··on Show HN: Discover your ranking on GitHub
This appears to be improperly including the stars from repositories that you forked.
vkjv··on Ask HN: Is it safe to use Facebook's open source projects?
"You could develop a library in-house in a clean room and it could still infringe someone else's patent."

IANAL, but, it is my understanding that if that's the case the patent wouldn't hold up to the novel requirement.

vkjv··on Show me the salary!
He asks for his salary to be re-aligned with industry standards and in many cases they will oblige.

In most cases, businesses are reasonable. They aren't going to volunteer to pay you more out of the goodness of their heart, but (most) of the time it doesn't hurt to ask. Just don't go threatening to leave if they don't.

vkjv··on Ask HN: Switching from OS X to Linux
I use Mint 17 Mate Edition--Mate is the fork of Gnome 2. It just works and gives me a familiar interface.

You might want to check out guake as a terminal and gnome do as a quicksilver replacement.

vkjv··on Hotel Wi-Fi – Relatively cheap free publicity
A more "lo-fi" attack vector: Many verify the user (for both free and premium) by last name and room number. Make a dictionary of a few common surnames and it's pretty easy to brute force combinations.
vkjv··on Japan Has More Car Chargers Than Gas Stations
Peak utilization is more important than average.
vkjv··on Ask HN: What is “full stack” actually?
I echo this sentiment. Full-stack means that you can support all aspects of the stack, and here's the key, that need to be supported by a dedicated person.

For example, most people "out source" their network / system administration to a company like Rackspace or Amazon. I would still consider someone utilizing their services to deliver a product "full-stack".

vkjv··on Better SQL strings in io.js
I know it's a hack, but I always wrote multi-line strings as a function with a comment. Super simple case:

var multiline = (function() {/*

I am

a multi-

line string.

*/}).toString().slice(16, -4);

Couple this with a proper parser for the syntax and a template library and it has served me well enough.

← PreviousPage 9 of 12Next →