5 ms·
The author is very welcome to start a company that builds software according to these principles. In some domains (databases, network stacks, middleware), he c
by nostrademons 12y ago
The author is very welcome to start a company that builds software according to these principles. In some domains (databases, network stacks, middleware), he could probably make a killing. In other domains (say, social web applications), he'd get clobbered.
I think this is the problem with appeals to professional ethics. Software is not one profession, and not one industry. It's labeled as such because the software industry changes much more quickly than the job categorization industry does. Nowadays, there's a huge difference between people who write software that helps planes stay in the air vs. those who let you search the web vs. those who write critical storage infrastructure for other companies vs. those who write software that lets you throw sheep at your friends vs. those who let you order from the grocery store with your phone. The best practices and rules of thumb for one industry don't transfer over to another industry. And it's not fair to consumers to make them deal with blindingly fast software that doesn't actually do what they want when they're quite willing to put up with slow, bloated software that does.
- vezzy-fnord 12y agoAnd it's not fair to consumers to make them deal with blindingly fast software that doesn't actually do what they want when they're quite willing to put up with slow, bloated software that does. I'd dispute the "quite" part. Begrudgingly willing, certainly. I'm not sure of any consumers/end users who actually enjoy low performance and bloat, as those almost inevitably hinder getting the task in question done via wasted time and cognitive overload, respectively. Depending on use case, some people might prefer going through a few more hoops in a shoddier UI than gazing for long times as a slicker one, if total time spent is lesser, or even if merely the perception of total time spent is lesser (e.g. when individual context switches are shorter, even if there's more of them) If anything, it's programmers who are able to appreciate inefficiency far more, especially if it's their own doing that saves them some mental resources while having the trap of complacency with mediocrity at their side. That said, you are correct about software being hugely diverse. Software is the mechanism, not the end goal. Even still, I believe that no field employing software should value low performance as a virtue. Not social web applications, people actually spend lots of time on those.
- nostrademons 12y agoWhich is where the "Start a company to develop software along these principles" part comes in. In some industries, saying "It's just like [popular product you use] but much faster" is enough to make the sale. That's the value proposition behind uTorrent, Skylight.io, Apache Spark, Akamai, Cloudflare, and others. In other industries, people don't care. I suspect that if you created a messenger that's "Like WhatsApp, but faster", nobody would care - and making something like AirBnB or Thumbtack faster gives only a marginal improvement when most of the bottleneck is waiting for a human to respond. By focusing on what you can do to make a buck and exploit your technical advantages instead of what other people should do, you end up teasing out the parts in the industry where it matters. That benefits everybody, while a blanket pronouncement of what everyone should do doesn't.
- VLM 12y ago"Like WhatsApp, but faster" Machine cycles are time; they are also energy. "Like WhatsApp, but your battery lasts an extra day longer" That would be a killer app. It would probably be a lie unless someone knows some space alien technology I can't even imagine, but if it were possible it would be a killer app.
- Retric 12y agoThe general way to get code faster is to make it shorter which has huge benefits in both the short and long term. People seem to take the first version you get to sort of work, banging on it till it looks ok, and shipping that. However, your generally better of cleaning things a little in the first place. Lot's of code has both the original bug and then later one or more big fixes which not only tends to be brittle, but also waste CPU time. For(x = 1; x < 10; x++) v[x] = 0; (bug v[0] not initialized) For(x = 1; x < 10; x++) v[x-1] = 0; (bug v[9] not initialized) For(x = 1; x <= 10; x++) v[x-1] = 0; (bug fixed) For(x = 0; x < 10; x++) v[x] = 0; (cleaner)
- nostrademons 12y agoOr better yet, memset(v, 0, 10); A smart memset implementation will also vectorize that, setting memory a word at a time instead of a byte at a time. (Not all stdlib implementations are smart, but both Google and Facebook have custom replacements of the C stdlib that do this.)
- kazinator 12y ago... and screwed up by assuming v is an array of char, so the number elements is the size. What we want is: memset(v, 0, sizeof v); If this is intended to initialize v, this may be suitable: int v[10] = { 0 }; /* or whatever type */ By the way, all-zero-bit memory is not required to give us null pointers or floating-point values of 0.0; it's just de facto very portable.
- nostrademons 12y agosizeof(v) is dangerous - if v is passed in (as opposed to being a local), it'll be the size of a pointer, not the full array. ...which is what we get for debating C in a thread that started with an example that isn't even legal C code.
- amelius 12y agoShouldn't the compiler be able to figure out that such an optimization is possible?