HNHacker News
TopNewBestAskShowJobs

njl

931 karma · joined November 23, 2008

I'm happy to chat with anybody about pretty much anything... njl at njl dot us.
submissionscomments
njl··on Ask HN: how do you backup your servers?
I have scripts (I use fabric, keep meaning to explore chef) that bring a fresh OS install up to a production server automatically, doing all installation and configuration. This is all in a DVCS system, so I have a local copy of my repository as well as a hosted copy of my repository on bitbucket/github. That takes care of code and configuration.

I have a cron job that dumps the databases into a directory with a time-stamped name. The last few regular nightly back-ups are kept, then weekly for a couple of weeks, then monthly for about a year. The parent directory is then backed up to S3 using duplicity. I've done other, cleverer things in the past with rotating through buckets based on the month, keeping every backup, doing them twice a day, that sort of thing.

I test recovery by spinning up another server, running the scripts to bring it up to production status, and running the script that uses duplicity to pull the data dump directory back out of S3, and then restores the database from the dump.

At $0.15 a gig to store data, and about $0.10 a gig to transfer it in, the cost of S3 is pretty much just noise. I've got on-disk dumps of my database if the database is corrupted on my machine, and I've got back-ups of those dumps if I need them.

Duplicity is pretty fantastic -- definitely check it out.

njl··on Teal and Orange - Hollywood, Please Stop the Madness
I should have been more clear. The rants are interesting because they highlight things that have been subtly bugging me, but I don't know why.

In this case, I scroll through and look at all of those pictures, and I know something is wrong. It takes someone with talent and experience to talk about the color balance. That gives me something concrete I can look for when I try to put together designs -- don't just go and get yourself complementary colors and then just go nuts with the contrast.

njl··on Teal and Orange - Hollywood, Please Stop the Madness
As part of trying to become better (through necessity) at web design, I've been discovering the best way to learn about design is to find pet-peeve rants by good designers.

This one is going to give me something to chew on.

njl··on Ask HN: Are you a single founder ?
1) About a week. Finally free of the previous failed startup, got my feet back with a quick project (co-founder finder, http://amb.itio.us).

2) Didn't try... I'd have tried for this round, but I didn't want to start any new work until I was completely clear of the previous gig. Lack of co-founders made it a real impossibility (partly inspiring me to write the co-founder finder).

3) I'm going to bootstrap, at least for the short term. Any course of action that leaves me in a position where I'm not substantially the master of my own destiny goes against the whole reason I'm pursuing this startup stuff.

4) http://localhost:8000/ and http://localhost:8001/ at the moment ;)

njl··on Ask HN: Dealing with abusive users
At some point, they will realize that this is happening, and there will be outrage when they communicate about it to their friends via an outside channel. Be prepared for a lot of splashback.
njl··on The government should decide the future of the Internet
Cuban's call for government control of bandwidth and subsequent designation of applications as "transformative" is mind-bogglingly ridiculous. It demonstrates that I guy I thought of as pretty smart doesn't really understand that what makes the internet so amazing is the end-to-end principle. Calling for the government to "set aside" bandwidth and declare winners is mind-bogglingly naive.

All that being said, please edit your title to remove your editorializing, and change it to Cuban's original "Don’t Waste the Internet on TV – Protect the Future of the Internet".

njl··on How to Win Friends and Influence People Summarized
If you do want to read "How to Win Friends and Influence People", try to get an older version of it. It has been rewritten over and over by Carnegie's successors, with more "relevant" but less interesting anecdotes. The original is filled with fun anecdotes about turn-of-the-century robber barons. Good stuff.
njl··on Abercrombie feels the sting of bad customer service
The "Amazing Service Guy" doesn't understand how A&F markets itself. When I taught, I had a student who worked at an A&F store for a couple weeks. He quit because he kept getting in trouble for being too friendly and talking to customers.

The people in the store aren't there to help customers. They are there for two things. Mundanely, they neaten up the store to meet the exacting vision of the maniacal CEO. More importantly, they serve as aloof aspirational models for customers.

Point being, this is a company that markets itself as the cool kid who doesn't really want to hang out with you. You're just not good enough. You then buy the merchandise in hopes that some of that snobby elite coolness will be bestowed upon you.

It doesn't surprise me that they'd be hostile to one of their customers. That's their shtick, man.

njl··on OK Go Leaves EMI, Starts Their Own Record Label
Their letter from January explaining why their record label won't let them embed videos is a fascinating explanation of exactly how overwhelming the sea change swamping the music industry is.

http://okgo.forumsunlimited.com/index.php?showtopic=4169

njl··on Thank You Heroku, or "How To Eliminate Sysadminning"
Well, some effort needs to go into some plugins for nginx and varnish. nginx needs to route incoming requests to the right varnish, and some custom cache invalidation stuff should happen on varnish as well.

Other than that? Lots and lots of python, of course ;) I'm only one guy, and there are three or four big moving parts that need to be written. Something to build eggs and push them, something to monitor and manage processes on individual servers, something to dispatch requests to the appropriate servers, and something to monitor and manage the database servers.

Even pulling back and looking at a minimum viable product, I'm still doing most of that work, just far simpler versions. Succinctly, it's too big for me to tackle on my own in the next six months.

njl··on Ask HN: What payment gateways do you use for your app?
If you're looking at doing subscription stuff, check out spreedly, http://spreedly.com/. They'll handle all of the subscription and billing stuff for you, and abstract away whomever you end up using as a gateway. They do support Paypal as a backend.
njl··on Thank You Heroku, or "How To Eliminate Sysadminning"
If you haven't had a chance to mull over Heroku's architecture, I'd suggest giving it a look. http://heroku.com/how/architecture

Basically, nginx fronts a bunch of Varnish caches, which are then in front of a "routing mesh", which queues up requests for individual "dynos". A dyno is a single-threaded instance of your application. When one dies or is migrated, another is deployed in its place. Multiple dynos are automatically spread across multiple machines. It's a very neat solution to automatically scaling hundreds or thousands of apps.

In other words, bundling the apps and pushing them out is just the beginning of a pretty fascinating architecture.

njl··on Thank You Heroku, or "How To Eliminate Sysadminning"
Hah! Well, I extracted myself from my previous commitments about two weeks ago, then spent a week building a co-founder-finder (http://amb.itio.us/). I've been spending this week doing mock-ups and filling out the rough architecture of the app I'm building. Give me a month or two.
njl··on Thank You Heroku, or "How To Eliminate Sysadminning"
A couple of months ago I explored building a Django-friendly Heroku clone. I white-boarded out the architecture, estimated how much work would be needed for all the pieces, and built a spreadsheet revenue model. It's an interesting and attractive business, but I'm only one man and my C skills are rusty (really, really rusty). I couldn't get myself to a point where I could deliver a product for at least a year, and I want to be ramen profitable before that.

My current focus is to look at the plethora of excellent SaaS applications that help provide the whole Rails ecosystem, then turn around and do the same for Django, with an eye towards expanding to handle other Python frameworks, and then into the Java space.

njl··on The Internet is nominated for this year's Nobel Peace Prize.
This feels more like the Time Magazine "Man of the Year" than it does a serious attempt to highlight those who have provided the "greatest benefit on mankind".

The Nobel Peace Prize can serve a very real purpose; it can highlight someone working peacefully to overthrow an authoritarian regime. It can give those advocating for an improvement of the human condition a voice, international standing, a modicum of protection from government violence, and resources.

Using the Peace Prize (and the Economics Prize, for that matter) as a way to deliver short-sited political digs or kudos to one group or another is farcical. It should go to people who are on the ground, working right now, to make the world a better place.

njl··on MongoDB 1.3.3 (just released) has basic support for geospatial indexes
A fair point. My datasets have been relatively small, topping out at less than a gigabyte. I didn't have any crashes in production, and I had a small enough database that I could export the whole thing to the file system every six hours. Dumping and restoring from that dump was fast.

10gen has delivered, time and again. They're looking at ways to be smarter about replication, and I am confident that by the time I need that level of durability, they will have brought the product up to where I need it to be.

The additional productivity I feel I get from MongoDB is, of course, balanced by the knowledge that I am working on a platform that is a bit of a moving target. It's been a wild eight or nine months in some ways, but I've been thrilled with both the product and the relentless drive from 10gen to improve an already kick-ass tool.

njl··on MongoDB 1.3.3 (just released) has basic support for geospatial indexes
For those of you who haven't tried it, MongoDB offers a pretty amazing balance of features and usability. The user community is friendly, and the developers are incredibly responsive. I just built my co-founder finder (http://amb.itio.us/) with MongoDB as a backend, my second project with the DB. My only regret was the lack of this exact feature.
njl··on Ask HN: What are you working on tonight?
Putting the finishing touches on the app I wrote this week, a co-founder finder.

I also got a Droid this afternoon, so I've been having a hard time avoiding the distracting shiny, shiny new toy.

njl··on Ask HN: How to avoid sore wrists
Don't screw around. Carpal tunnel surgery seriously sucks. I got both of my wrists fixed a couple of days before my 21st birthday.

Things that have helped me... Make yourself aware of your posture and wrist location. Don't type with your wrist bent at funny angles. Run something like workrave or xwrits and force yourself to take breaks. Exercise. I switched from emacs to vim because I couldn't train myself to use opposite hands for the ctrl key and the letter key. Stretch. Try out different keyboards. Try out different keyboard heights.

njl··on Prohibition: A Cautionary Tale
Health care.

He points out that prohibition destroyed the seventh largest industry in the country at the time it was passed, and did nothing but breed criminality and disrespect for law. He then implies that the coming massive government intervention in health care will wreak cataclysmic and unexpected levels of havoc with the 15% of our economy that the health care industry represents.

His argument is best when cast as a pointed reminder that the government is made of fallible human beings who can't be trusted to understand all the implications of the incredibly complicated system they are attempting to administer, and less when cast as some sort of direct analogy.

njl··on The Climate Science Isn't Settled
If anything, we should be more skeptical than most. Lorenz pretty much founded modern chaos theory when he learned how ridiculously hard it was to simulate (and therefor predict) weather. The whole butterfly flapping in China thing isn't a cute little metaphor, it is a very real statement about how complicated weather truly is.

We might be able to make some observations about trends in the weather, but we don't have long enough baselines to really be able to tell what is going on.

I'm not saying that I think the whole anthropomorphic global warming thing is completely false, I'm just saying scientists who point to what is essentially noise in our woefully short record don't do a good job of convincing me.

I'm a fan of sustainability, and mining economies make me edgy. For that reason, I think a move away from fossil fuels is the obvious choice.

I'm also a fan of not screwing up the environment, but most of the green movement ends up as barely disguised anti-corporatism, with a fair amount of dead-horse beating.

njl··on MongoDB Aggregation I: Counting and Grouping
In CouchDB, Map/Reduce is the primary way that you access the database. The first time you access a "view", it will do a Map/Reduce on the entire database. On subsequent access, it will redo the Map on new records. To make this work, the action of the Map function needs to be immutable with respect to the record; this is intellectually pleasing but incredibly annoying in practice.

I haven't really used the Map/Reduce functionality of Mongo yet, but I have poked at it a little. Basically, with MongoDB, you do a one-time transform from one "collection" of records to another. It doesn't automatically update the way CouchDB does, but I can do things like joins that I couldn't do with CouchDB.

Once again, Mongo's practicality makes me happy, while Couch gives me reason to admire but avoid.

njl··on Ask HN: How do you handle server security/intrusion monitoring?
sudo apt-get install rkhunter chkrootkit logcheck monit

rkhunter and chkrootkit will both look for insecure configuration, permissions, and known root kits. rkhunter will also maintain a database of the signatures of your system binaries. I assume there are overlaps between the two. I don't really care, I run both.

logcheck will watch your logs and email you when something shows up in a log that doesn't match a configurable set of regular expressions. When I add a new piece of software to a system, logcheck goes berserk. I go through the emails I receive and add in new regex's to ignore the harmless notifications until they finally taper out and disappear, only leaving me with the true exceptions.

Look over the documentation for all three of these, and make sure that they're actually running. Personally, I don't want an email unless something is wrong. If I get an email every day, I'll start to ignore it. I don't think I'd notice if an email I was ignoring didn't show up, so I optimize for no output unless it's something I should read. I chase down the cause of every exception in my logs. No excuses. If it isn't an exception, I add a regex to logcheck.

I run monit because it is pretty easy to set up, and it sends me an email when a server process gets changed or restarted. It lets me enforce limits on a server process, so I can potentially get warning of an attack as it happening. I suspect monit is nowhere near the most sophisticated tool for this purpose, but it meets my needs very well.

As for other basic security stuff... Don't use port 22 for ssh, use something much higher so that you won't get the continuous pounding on the front door that an ssh server on port 22 receives. Disable root login, as well as password login. Use certificates to log in to your machine. Configure servers to listen to 127.0.0.1 whenever you can. Install a software firewall to only allow access to http and ssh anyway.

Unless you've done something stupid with your web app, you've made it incredibly difficult to impossible for script kiddies. If you piss off an elite black-hat, it's probably safe to assume they can own you, and you likely won't know it. So make good backups, with regular offline backups that can't get destroyed by a hacker with a particularly malicious bent.

njl··on Ask HN: Has anyone used machine learning to trade?
Practice some with historical data, get a job with a firm that does this, and eventually strike out on your own. If you prove yourself, people will hand you millions to manage. Starting with your own money seems like a bit of a fools game.
njl··on Experiment: No Comment Scores
I really, really like the basis of this idea.

But the more I ponder what you're trying to solve, the more I think you should provide scores weighted within the discussion. Perhaps, the quintile a comment is in. Use a bar that adds segments and shifts from one non-judgmental color to another. I wouldn't bother showing anything below a threshold of ten comments on a single link.

Otherwise, your piling-on problem returns, just with a little less fidelity.

njl··on Experiment: No Comment Scores
This change might improve voting, but it decreases the value of that voting.

I'll stipulate that the voting might be more "fair", if that is a goal. I'm not sure it should be. It might make the "game" of getting high karma more fair, but I'm not bothering with or bothered by that game anyway.

On the other hand, I can no longer use the results of this voting to help me skim a conversation. I want to know what everyone else found most valuable, without having to read through every comment on my own. I can't do that anymore. This completely breaks how I use HN.

njl··on Farewell America
Best guess on the street is that it's actually a collective of about 40 people.
njl··on Ask HN: How do I sell my expensive niche software w/ no sales background?
My partner and I built a product, and we're currently selling to higher ed. He's been selling to higher ed for seven or eight years now, and I've been peripherally involved in selling to higher ed for four or five. I'd love a chance to chat about it, and my email is in my profile.

Without knowing more details, your price feels reasonable. You need to put together a solid, total package, and don't forget 18%/year in maintenance. If your clients are getting funding from an outside source on this, you need to grease the skids. There are people who do nothing but set up and administer grants. If you can hook up with one of them, you're golden.

The best way to learn to sell is to do it. Try to find yourself a mentor you can talk to about it, and just go for it. If you can learn how to effectively cold call, you can rule the world.

There are lots of crappy sales books, but there are many good ones. I like SPIN Selling by Rackham; it's researched, reasonable, and most other solution selling books that came out afterward just repackage Rackham's results. I like Jeffrey Gitomer's Little Red Book of Selling. It's mostly about maintaining a positive attitude while people are telling you no. This is necessary, because selling is a goddamn emotional roller coaster. Watch out for books aimed at the hard sell. You can't hard sell a university.

Good luck!

njl··on Comparing Mongo DB and Couch DB
"Generally, we find MongoDB to be a very good fit for building web infrastructure."

I strongly agree. I just went through a painful transition of our product from CouchDB onto MongoDB. It was a week or two of pain, but I had things isolated enough that it didn't hurt as badly as it could have.

Fundamentally, Couch was a pretty amazing piece of technology, and Damien Katz is coder's coder. But they want to make something that would act like a Lotus Notes client. I wanted a piece of web infrastructure.

njl··on The Mandelbrot Set by A. K. Dewdney (1985 Scientific American article)
My father read the article in 1985, and promptly wrote a program that used the fancy-pants dedicated hardware of the computer vision systems he worked on at the time. I remember going into the office with him when he had to work on a weekend; he showed me how he was using something like $100k worth of parallel processing hardware to make a little gray-scale Mandelbrot set.

His first response to any new system is still to write a Mandelbrot generator. When he semi-retired from his position doing system-level C stuff a few years ago, he decided to give Java a try. He occasionally emails me video explorations of the Mandelbrot sets he has generated. I have a photographic print he made hanging up on my wall right now.

First time he tried to get them to print out one of his images, the person at the one-hour photo at Wal-Mart told him the picture was unprintable, despite multiple tries. The multiple 8x10s were retrieved from the waste basket, and my father got three for the price of one.

← PreviousPage 4 of 5Next →