Running three hours of Ruby tests in under three minutes - <AUTHOR> https://stripe.com/blog/distributed-ruby-testing <comment><USER2> We're not nearly at Stripe's scale, but my startup (Spreemo) has achieved pretty amazing parallelism using the commercial SaaS CircleCI. We have 3907 expects across 372 RSpec and Cucumber files. Our tests complete in ~14 minutes when run across 8 containers.

One of the great strengths for CircleCI is that they auto-discover our test types, calculate how long each file takes to run, and then auto-allocate the files in future runs to try to equalize the run times across containers. The only effort we had to do was split up our slowest test file when we found that it was taking longer to complete than a combination of files on the other machines.

I also like that I can run pronto [https://github.com/mmozuras/pronto](https://github.com/mmozuras/pronto) to post Rubocop, Rails Best Practices, and Brakeman errors as comments on Github.

<comment><USER3> i like pronto's approach

we simply added the linters/code analysis to the CI itself

reasoning: we try to have as little as possible "code style" discussion in PRs

</comment></comment><comment><USER4> I'm super curious how Stripe approaches end-to-end testing (like Selenium/browser testing, but maybe something more bespoke too)

My understanding is that they have a large external dependency (my term: "the money system"), and running integration tests against it might be tricky or even undependable. Do they have a mock banking infrastructure they integrate against?

<comment><AUTHOR> This is a great question, and it's definitely a problem we have.

We don't have a single answer we use for every system we work on, but we employ a few common patterns, ranging from just keeping hard-coded strings containing the expected output, up to and including implementing our own fake versions of external infrastructure. We have, for example, our own faked ISO-8583 [1] authorization service, which some of our tests run against to get a degree of end-to-end testing.

Back-testing is also incredibly valuable: We have repositories of every conversation or transaction we've ever exchanged with the banking networks, and when making changes to parsers or interpreters, we can compare their output against the old version on all of that historical data.

[1] [https://en.wikipedia.org/wiki/ISO_8583](https://en.wikipedia.org/wiki/ISO_8583)

<comment><USER5> >Back-testing is also incredibly valuable: We have repositories of every conversation or transaction we've ever exchanged with the banking networks, and when making changes to parsers or interpreters, we can compare their output against the old version on all of that historical data.

Are you referring to test data or actual live transaction data? The latter would seem like a huge liability and target for hackers.

<comment><AUTHOR> Live data, but they're stored redacted, and/or with sensitive data (e.g. credit card numbers) replaced with opaque tokens that reference an encrypted store that's carefully access-controlled.

<comment><USER6> Do you have any policy or decision made on how long you plan on storing that data? What I'm wondering, are the transactions currently "stored indefinitely"? (I'm referring to both data stores. The tokenized and the encrypted one)

</comment></comment></comment></comment></comment><comment><USER7> I am tired of this technology having to be re-invented time and time again.

The best I ever saw was an internal tool at Microsoft. It could run tests on devices (Windows Mobile phones, but it really didn't care), had a nice reservation and pool system and a nice USB-->Ethernet-->USB system that let you route any device to any of the test benches.

This was great because it was a heterogeneous pool of devices, with different sets of tests that executed appropriately.

The test recovery was the best I've ever seen. The back end was wonky as anything, every single function returned a BOOL indicating if it had ran correctly or not, every function call was wrapped in an IF statement. That was silly, but the end result was that every layer of the app could be restarted independently, and after so many failures either a device would be auto removed from the pool and the tests reran on another device, or a host machine could be pulled out, and the test package sent down to another host machine.

The nice part was the simplicity of this. All similar tools I've used since have involved really stupid setup and configuration steps with some sort of crappy UI that was hard to use en-masse.

In comparison, this test system just tool a path to a set of source files on a machine, the compilation and execution command line, and then if the program returned 0 the test was marked as pass, if it returned anything else it was marked as fail.

All of this (except for copying the source files over) was done through an AJAX Web UI back in 2006 or so.

Everything I've used since than has either been watching people poorly reimplementing this system (frequently with not as good error recovery) or just downright inferior tools.

(For reference a full test pass was ~3 million tests over about 2 days, and there were opportunities for improvement, network bandwidth alone was a huge bottle neck)

All that said, the test system in the link sounds pretty sweet.

<comment><USER8> I agree. We already have projects like [http://test-load- balancer.github.io](http://test-load-balancer.github.io) but I have a feeling I will see five more posts on he in the next year about re-inventing this wheel and yet not see a single contribution to existing solutions like tlb.

It must be a little depressing to build a really useful product you know many people need, give it away only hoping people will use it and be happy, then find out everyone would rather build their own.

But we do like to build things, it is in our nature. Plus, what looks better on your resume: 1) I migrated my teams test suite to using test load balancer in two days, saving hours every test run. 2) I contributed improvements to the open source test load balancer project. 3) I designed and implemented my own distributed test load balancing tool!

<comment><USER7> > 3) I designed and implemented my own distributed test load balancing tool!

This, so many times over.

It doesn't help that when interviewing, I kinda-sorta want to know that the people I hire are capable of understanding systems from the ground up. The best way to demonstrate that is to go and build a system from the ground up...

TLB looks cool, nice to see that such a tool exists at least within one eco- system!

</comment></comment></comment><comment><USER9> If you want to implement this locally without using mini-test checkout test- queue by Aman Gupta at github.

[https://github.com/tmm1/test-queue](https://github.com/tmm1/test-queue)

One thing that really sped up our test suite was by creating an NGINX proxy that served up all the static files instead of making rails do it. This saved us about 10 minutes off our 30 minute tests.

<comment><USER10> test-queue supports minitest too, and follows the same basic design outlined in this article: a central queue sorted by slowest tests first, with test runners forked off either locally or on other machines to consume off the queue.

We use test-queue in a dozen different projects at GitHub and most CI runs finish in ~30s. The largest suite is for the github/github rails app which runs 30 minutes of tests in 90s.

<comment><USER9> Thanks for the awesome work you have done on test-queue. We have really appreciated it at SchoolKeep.

</comment></comment></comment><comment><USER11> Very cool stuff. For reference at GitLab we use a less impressive and simpler solution. We split the jobs off in [https://gitlab.com/gitlab-org/gitlab- ce/blob/master/.gitlab-...](https://gitlab.com/gitlab-org/gitlab- ce/blob/master/.gitlab-ci.yml) These jobs will be done by separate runners, this brought our time down from 1+ hours to 23 minutes [https://ci.gitlab.com/projects/1/refs/respect_filters/commit...](https://ci.gitlab.com/projects/1/refs/respect_filters/commits/e58e75aa8860c4c1530ebe7ad1e4bf557fa1e848)

</comment><comment><USER12> How much cheaper (in time, code, effort, complexity) would it be if:

\- Their language runtime supported thread-based concurrency, which would drastically reduce implementation complexity _and_ actual per-task overhead, thus improving machine usage efficiency AND eliminating the concerns about managing process trees that introduces a requirement for things like Docker.

\- Their language runtime was AOT or JIT compiled, simply making _everything_ faster to a degree that test execution could be reasonably performed on _one_ (potentially large) machine.

\- They used a language with a decent type system, significantly reducing the number of tests that had to be both written and run?

<comment><USER13> Only if the early engineers could write in a language that they were as productive in as Ruby. Getting Stripe launched was the key thing Stripe needed to accomplish. Everything else follows from that.

<comment><USER12> There are certainly enough languages to choose from.

<comment><USER13> Sure there are tons of languages, with different strengths and weaknesses. The part that is important is that the early engineers need to be productive in the language.

Choose boring (to you) technology.

<comment><USER12> If the technology that's boring to "early engineers" has significantly more weaknesses than the alternatives, then, simply: the wrong people were hired.

<comment><USER13> Stripe is worth $5 billion. I don't think they hired the wrong people.

<comment><USER12> Ex post facto justification of complex interdependent decisions and consequences by virtue of market valuation?

That's just dumb survival bias endemic to the YC camp.

It's not something you should actually base business and technical decisions on.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> One thing I've noticed since coding with immutable data structures & functions (rather than mutable OOP programs) is how tests run really fast, and are easy to run in parallell.

I/O only happens in a few functions, and most other code just takes data in -> transforms -> returns data out. This means I only have few functions that need to 'wait' on something outside of itself to finish, and much lesser delays in the code.

This is coding in Clojure for me, but you can do that in any language that has functions (preferable with efficient persistent data structures. Like the tree-based PersistentVector in Clojure).

<comment><USER15> Immutable data structures give you easy parallelism, however there's a hidden runtime cost: you have to allocate way more objects. For example, I was able to save a ton of object allocations here: [https://github.com/mime-types/ruby- mime-types/pull/93](https://github.com/mime-types/ruby-mime-types/pull/93) mostly by mutating. For tasks that are not easily parallelizable it may be slower to use immutable structures.

I mostly only ever hear about how fast FP languages are, so maybe they use some tricks to avoid allocations somehow. I would be interested in hearing more about it.

<comment><USER14> Yes, mutating something at one place in memory is more efficient, because you don't need to allocate new memories.

I don't know all to much about other functional languages, as I learned perl -> ruby -> javascript -> little bit C & Java & Go -> now doing Clojure. But I find Clojures collection data structures interesting. The vector (collection like lists or array) type look immutable, but under the hood are trees. When you append to a vector, you seem get a new vector returned.

In reality, you added the new element as a node in a tree. Then just modified pointers to that the new and old version share almost all of the pointers & allocations. With simple arrays or lists, you would allocate every element anew.

Idk if I can properly explain. Found this blog post very interesting and easier to follow: [http://hypirion.com/musings/understanding-persistent- vector-...](http://hypirion.com/musings/understanding-persistent-vector-pt-1)

Personally, most things in business I find easily parallelisable. You mostly decouple the I/O parts of something with the logic parts of it. But yeah I still have much to learn. Thanks for the link! Interesting :)

<comment><USER15> That's cool, In Ruby Hash merges are really expensive. I played around with a non-mutating data structure that uses references two two hashes and behaves as if it had been merged instead of allocating. It was a fun thought experiment but wasn't 100% API backwards compatible, as mutations got ugly. Thanks for the link.

</comment></comment></comment></comment><comment><USER16> Love this. Sometimes testing can be a huge pain in the ass. I know more than one project I work on where getting them to run is a lot of effort in itself.

There is something to be said about code quality and having tests run in under a few seconds. The ideal situation is when you can have a barrage of tests run as fast as you are making changes to code. If we ever got to the point of instant feedback that didn't suck I'd think we'd change a lot about how we think about tests.

</comment><comment><USER17> _We opted for an alternate, dynamic approach, which allocates work in real- time using a work queue. We manage all coordination between workers using an nsqd instance... In order to get maximum parallel performance out of our build servers, we run tests in separate processes, allowing each process to make maximum use of the machine 's CPU and I/O capability. (We run builds on Amazon's c4.8xlarge instances, which give us 36 cores each.)_

This made me long for a unit test framework as simple as:

        $ make -j36 test

Where you've got something like the following:

        $ find tests/

          tests/bin/A
          tests/bin/B
          ...
          tests/input/A
          tests/input/B
          ...
          tests/expected/A
          tests/expected/B
          ...
          tests/output/

        $ cat Makefile

          test : $(shell find tests/bin -type f | sed -e 's@/bin/@/output/@')

          tests/output/% : tests/bin/% tests/input/% tests/expected/%
                  @ printf "testing [%s] ... " $@
                  @ sh -c 'exec $$0 < $$1' $^ > $@
                  @ # ...runs tests/bin/% < tests/input/% > tests/output/%
                  @ sh -c 'exec cmp -s $$3 $$0' $@ $^ && echo pass || echo fail
                  @ # ...runs cmp -s tests/expected/% tests/output/%

          clean :
                  rm -f tests/output/*

You get test parallelism and efficient use of compute resources "for free" (well, from make -j, because it already has a job queue implementation internally). This setup closely resembles the "rts" unit test approach you'll find in a number of djb-derivative projects.

The defining obstacle for Stripe seems like Ruby interpreter startup time though. I'm not sure how to elegantly handle preforked execution in a Makefile-based approach. Drop me a line if you have ideas or have tackled this in the past, I've got a couple projects stalled out on it.

</comment><comment><USER18> On a previous project, I had built a shell script that essentially created n mysql databases and just distributed the test files under n rails processes.

We were able to run tests that took an hour in about 3 minutes. It was good enough for us. Nothing sophisticated for evenly balancing the test files, but it was pretty good for 1-2 days of work.

</comment><comment><USER19> "This second round of forking provides a layer of isolation between tests: If a test makes changes to global state, running the test inside a throwaway process will clean everything up once that process exits."

But, then how do you catch bugs where shared mutable state is not compatible with multiple changes?

<comment><USER20> You write tests specifically for testing multiple changes. You shouldn't be testing changes to global state by seeing how multiple supposedly independent tests interact.

<comment><USER21> Is there any value in designing tests in such a way that they test multiple things at once while still being able to isolate which specific thing is responsible for breaking? I'm thinking of something like JMP.

</comment></comment></comment><comment><USER22> Congratulations on what look a very challenging task. I'm assuming a part of those tests hit a database. How have you dealt with it? I assume that a single instance, even on a powerful bare server could be a road blocker in this situation. A few insights on the Docker/Containerization part of it would also be nice!

<comment><AUTHOR> Our testing running infrastructure spins up a pool of database instances on each worker machine, one for each worker process. The test spinup and teardown code handles schema management, hooking into our DB access layer to create and clean up database tables only if they're used by a given test.

</comment></comment><comment> Ono-Sendai This is an interesting and possibly overlooked problem with using slow languages like Ruby - your unit tests take forever to run. (unless you spend a lot of engineering effort on making them run faster, in which case they may run somewhat acceptably fast)

<comment><USER23> This isn't just a problem with Ruby. Our ObjC test suite for a project I work on takes about 10 min to run, too.

<comment> Ono-Sendai Our main product has approximately 5400 unit tests, over ~150 files. The test suite runs on a single computer in about 14s. This is one of the advantages of using a fast language (C++) with multithreading :)

<comment><USER24> Not exactly a fair comparison, because you have to compile the changed files first and link which I'm sure takes longer than 14s.

On the other hand, using ruby I can have it continuously run the tests for the specific feature I'm working on without the long building step.

<comment> Ono-Sendai Compiling a changed file and linking takes about 5s.

<comment><USER25> Is that the best case for changing a single cpp file, or the worst case for changing a header file shared across many translation units?

<comment> Ono-Sendai That's changing a cpp file. Changing a widely used header file could take 1-2 mins for a full or nearly full rebuild.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> I guess a lot of problems come from the stupidly brain dead way people usually write tests (because it's the "recommended TDD way")

Things like using the same setup function for every test and setting up/tearing down for every test regardless of dependencies

Also tests like

        def test1():
          do_a()
          check_condition_X()

then

        def test2():
          do_a()
          check_condition_Y()

Or

        def test1():
          do_a()
          check_condition_X()

        def test2():
          do_a()
          do_b()
          check_condition_Y()

When it could have been consolidated into 1 test

Then people wonder why it takes so much time?

Also helpful is if you can shutdown database setup for tests that don't need it

<comment><USER24> The time it saves me when I see 'test2' failed instead of 'test_enormous:137' failed is worth more than the marginal computation required.

These are embarrassingly parallel problems, we just need better tools to fully saturate every core on every node in the test cluster.

<comment><USER27> My last project had a mean run time of <9ms per test. We were not at all worried about parallelization. Nobody even mentioned it until we hit 1100 (eleven hundred) tests, and we ended up optimizing the build phase to reduce the code/build/test cycle time instead.

</comment></comment></comment><comment><USER28> Oh hey, we have the same sort of system here. It's 60,000 Python tests which take ~28 hours if run serially, but we keep it around 30-40 minutes. We wrote a UI & scheduler & artifact distribution system (which we're probably going to replace with S3). We run selenium & unit tests as well as the integration tests.

We've noticed that starting and stopping a ton of docker containers in rapid succession really hoses dockerd, also that Jenkins' API is a lot slower than we expected for mostly-read-only operations.

Have you considered mesos?

<comment><USER29> Have you considered another containerization solution like LXD. I feel like testing like this fits the "container hyper-visor" use case and this is what LXD is designed to do.

<comment><USER28> We tried docker, then had to drop back to running the tests outside of a container (some old technical decisions in the project under test made it hard to run in a container). It's been improved since then, and we're close to running in containers again.

Each executor gets a non-shared prod-like environment thanks to a handful of docker containers. The same setup is used for dev, so switching the testing environment to LXC would mean switching devs as well.

</comment></comment></comment><comment><USER30> Not sure if this has already been answered, but would Stripe's methods only work with unit tests where tests are not dependent on each other?

How would one go about building a similar distributed testing setup for end- to-end tests where a sequence of tests have to be run in particular order. Finding the optimal ordering / distribution of tests between workloads would certainly be more complicated. Maybe they could be calculated with directed graph algorithms?

<comment><USER31> _How would one go about building a similar distributed testing setup for end- to-end tests where a sequence of tests have to be run in particular order._

I reckon that would be solving the wrong problem. End-to-end tests should be independent of each other, and tests should never be dependent on the order in which they are run. End-to-end tests might be longer as a result, but managing the complexity of test dependencies will quickly cripple any system that uses this approach, I imagine.

</comment></comment><comment><USER27> _needle scratching on record_

They have an average of 9 assertions per test case. I think I may see part of their problem.

<comment><USER32> I'm not sure if you are talking from a performance perspective or a conceptual perspective, but this provides a useful discussion on multiple assertions:

[http://programmers.stackexchange.com/questions/7823/is-it- ok...](http://programmers.stackexchange.com/questions/7823/is-it-ok-to-have- multiple-asserts-in-a-single-unit-test)

My 2 cents is that multiple assertions are legitimate, as long as they prove a singluar assumption. Hence (as per the test on that page), this is a valid use of multiple assertions:

      [Test]
      public void ValueIsInRange()
      {
        int value = GetValueToTest();

        Assert.That(value, Is.GreaterThan(10), "value is too small");
        Assert.That(value, Is.LessThan(100), "value is too large");
      }

<comment><USER27> [Edit] Thanks for the link. I have a whole bunch of comments in there to upvote. Guess my evening is planned :) [Edit]

I would also like to point out that ranges, like the one in your example, are almost always a symptom of an unstable test to begin with. I'd want to know why you're providing a range. Does the test blow up if another server is running tests at the same time? Let's fix that so the tests actually fail when there is a failure.

Now, there are lots of matchers that misbehave for corner case inputs, and an assert like "Make sure there's text, that it's a number, and that the number equals 10" may be necessary in order to prove that "10" appears, especially when you invert the test an say "Make sure the number isn't 10". And in this case I would say "write us a better matcher so that everyone can benefit from you figuring out how to do this".

This should go without saying, but I feel I have to repeat it every time there's an audience:

Green is not the end goal of testing. Red when there is an actual problem is the end goal of testing. Anything else is a very expensive way to consume resources.

</comment></comment></comment><comment><USER33> Any reason why a financial infrastructure provider like Stripe would run CI tests on someone elses infrastructure? Isn't that a no go from a security point of view? Or - how do you trust the hosted CI company not to look at your code?

<comment><USER34> _how do you trust the hosted CI company not to look at your code?_

Contracts, not firewalls, make the world go round.

<comment><USER35> To be fair a contract does not guarantee the security framework of the company you are contracting, which means your code is only as safe as _their_ weakest link.

<comment><USER36> Which is why contracts include things like right-to-audit, so you can verify for yourself.

</comment></comment></comment></comment><comment><USER37> I wrote a rubygem called cloudspeq ([http://github.com/meesterdude/cloudspeq](http://github.com/meesterdude/cloudspeq)) that distributes rails rspec spec's across a bunch of digital ocean machines to reduce test execution time for slow test suits in dev.

one of the things I did that may be of interest is to break up spec files themselves to help reduce hotspots (or dedicate a machine to it specifically)

Not as complex or as robust as what they did, but it works!

</comment><comment><USER38> It's interesting to imagine, for a test suite that would take three hours, how much of the execution time is state management vs algorithm execution.

<comment><USER39> No, they aren't going to switch to a pure functional language.

</comment></comment><comment><USER40> [http://engineering.imvu.com/2011/01/19/buildbot-and- intermit...](http://engineering.imvu.com/2011/01/19/buildbot-and-intermittent- tests/)

<comment><USER40> Also, since 2011, we have added features and platforms under test, yet deceased test run time to < 4 minutes. So, yay progress!

</comment></comment><comment><USER41> Does this mean each process has its own database or are you able to use transactions with the selenium/capybara tests?

</comment><comment><USER42> Pull-based load balancing is a generally underrated technique.

</comment><comment><USER43> > Initially, we experimented with using Ruby's threads instead of multiple > processes

Why, to be cool? Tests are a classic case of things that should be run in isolation - you don't want tests interfering with earth other or crashing the whole test suite. Using separate processes would have been the sensible approach to start with.

</comment><comment><USER44> Was anyone else expecting the article to be about replacing Ruby with a compiled language?

<comment><USER45> No.</comment></comment>


Forbes: What is the most valuable programming language to know for the future? - <AUTHOR> http://www.forbes.com/sites/quora/2014/07/14/what-is-the-most-valuable-programming-language-to-know-for-the-future-and-why/

<comment><USER2> I can't help but focus on the failings of the reasoning of the answer given here. I keep getting flashbacks to the late 1990s when you got that answer, but swap "Javascript" for "Java".

I am failing to find sound reasoning behind the answer, which is essentially "Just learn Javascript, ok?".

<comment><USER3> If you learned Java in the late 1990s you did _very_ well. Java remained the gateway into many corporate jobs well into the 2000s; all sorts of dot-coms, consulting, enterprise rewrites, and even startups and open-source projects were open to you. It wasn't until 2005 that Ruby/Python/JS started getting hot; before then people used PHP for webapps and Perl for scripting, but they were still nowhere near as general-purpose as Java.

An 8-year run is pretty darn good for a technology in our industry. Pretty much the only thing that's bested it is C's impressive 30+ year run. And C was really only the hot, commercially successful language to learn during the late microcomputer era of 1985-1991, before which the hot language was assembly (for microcomputers) or Lisp (for enterprise), and after which C++ took over the microcomputer market.

<comment><USER4> Not to mention Java is still the #2 language used, and #1 on the enterprise.

</comment></comment></comment><comment><USER5> Question was originally on Quara, and there are a lot of other compelling answers there.

[http://www.quora.com/Computer-Science/What-is-the-most- valua...](http://www.quora.com/Computer-Science/What-is-the-most-valuable- programming-language-to-know-for-the-future-and-why)

</comment><comment><USER6> go (golang, google language) is pretty cool too. They are pulling a lot of good things together from other languages (c++, java) but leave out the useless/once fashionable/error prone stuff. It even has pointers (which I like because they are fast).

Best of all it has super duper easy concurrency baked in (compared to java threads), which really allows a lot more programmers to really use all those cores, even on their notebooks (I love seeing top at 400% on my notebook (4 cores):-)

Also it has garbage collection and is compiled to native machine instructions so it is really fast. And you'd be surprised how much the 1.3 release has matured already even with still lacking libs.

Apart from an as-yet sparse eco-system, what is not to like.

<comment><USER7> lack of generics is one of the complaints I have heard quite a bit.

<comment><USER6> That's probably more a matter of taste. Go has a reflect package which allows the programmer to determine type at runtime, making generics unnecessary. It may not be as convenient and familiar as generics. Here is an example [http://play.golang.org/p/a18VESulWS](http://play.golang.org/p/a18VESulWS)

<comment><USER4> > _That 's probably more a matter of taste. Go has a reflect package which > allows the programmer to determine type at runtime, making generics > unnecessary._

That's not "making generics unnecessary". That's "using an ugly hack that throws typesafety away instead of a proper solution".

And it's more familiar than generics, that's what Java had before they understood that they had to have generics.

<comment><USER6> Well, you are right it reminded me of method overloading. Otherwise I think time will tell. In the end generics are just types with parameters, for creating typed permutations _at_compile_time_ of functions/maps etc.. And as you said, java worked quite a while without them.

</comment></comment></comment></comment></comment><comment><AUTHOR> I posted the quick story of how this happened. [http://kevinsuttle.com/posts/quora-javascript- forbes/](http://kevinsuttle.com/posts/quora-javascript-forbes/)

</comment><comment><USER8> Nowadays one language isn't enough. But the java syntax styled langues like java, c#, javascript and swift will get you anywhere. With some additional html, css, and maybe xaml for the styling.

</comment><comment><USER9> Actually thats "What is the most valuable runtime to target for the future?", right?

</comment><comment><USER10> A: Depends on the value of the things you are building with that programming language.

</comment><comment><USER11> Atwood's Law: JavaScript

<comment><USER12> unfortunately I have to agree.</comment></comment>


AWS Cost Optimization for ML Infrastructure – EC2 Spend - <AUTHOR> https://blog.floydhub.com/aws-cost-optimization-for-ml-infra-ec2/ <comment><USER2> Author here. We have been building ML infra for FloydHub for over 3 years now and learned a ton. It is not easy as we thought it was! We are open sourcing our learning in a blog series - hoping it will be useful for companies who build their own ML infrastructure.

This article focuses on how to use EC2 effectively and save overall cost for ML infra. There are a lot of low-hanging-fruit opportunities that most companies we work with don't adopt. Anything else I missed?</comment>


The Size of iPhone's Top Apps Has Increased by 1,000% in Four Years - <AUTHOR> https://sensortower.com/blog/ios-app-size-growth <comment><USER2> What's also really irritating is the need to update every 2 weeks. I feel like my phone is wasting non-trivial battery and cycles because of shitty software development practices. Why does Facebook (Google, Uber et al are all guilty as well) update every 2 weeks? Your shitty development practices shouldn't be reducing the lifespan of my device.

I mean I thought the interview torture would have some effect on code quality, but jeez all I get is a battery hog that needs a new version every 2 weeks

/rant

</comment><comment><USER3> Celluar connection download limits have increased over the years allowing developers to increase their app size without requiring users to download their apps on a wifi connection.

<comment><USER4> I'd actually say it has more to do with more penetration of wifi access. I hardly use any mobile data anymore. I am almost ALWAYS connected to wifi.

Whatever the cause; it is unacceptable.

</comment></comment><comment><USER5> Will AFS have compression?

<comment><USER6> Do you mean APFS? If so it probably will have compression as HFS+ already supports compression.</comment></comment>


Integrating Source Control Tools with Mantis Bug Tracker - <AUTHOR> http://leetcode.net/blog/2009/03/integrating-source-control-with-mantisbt/ <comment><USER2> Sorry, but the company I just left used Mantis. After coming from Fogbugz(a GREAT bug tracking system), Mantis was extremely inefficient to use. I cannot recommend it to anyone.

<comment><AUTHOR> I would like to ask a) what version of MantisBT was your company using, and b) what did you find about it that you didn't like?

MantisBT has made a lot of strides in both features and usability recently, both in the current 1.1.x releases and especially with the upcoming 1.2.x plugin system. It's gained a lot of potential that other free/open issue trackers lack.

But I'm most likely biased, and I would like to hear others' opinions of the matter...

<comment><USER2> You have a good point. I'm honestly not sure what version it was. The company always used old software(5 year old Vignette cms). That probably has unfairly influenced my views of Mantis. I still recommend Fogbugz but try Mantis too</comment></comment></comment>


Android Users Aren't Cheap (but cheap users use Android) - <AUTHOR> http://blog.stewtopia.com/2013/05/30/android-users-arent-cheap-but-cheap-users-use-android/

<comment><AUTHOR> As I see it, Android is the low-cost, mass-market provider. To me, it's perfectly analogous to desktops: Microsoft was the low-cost mass-market provider and Apple was the high-end, premium provider. With mobile, Android has simply replaced Microsoft.

<comment><USER2> Actually the analogy is a bit off. Most people aren't buying Android phones they are buying Samsung phones.

With the PC market Microsoft tightly controlled the Windows experience so it looked and worked the same regardless of the hardware. With the Android platform this isn't the case. HTC phones looks and behave quite differently from a Samsung or a stock Android. Each company is trying to differentiate the experience as much as possible.

And the low-end/high-end split isn't playing out the same this time around. Samsung is very much in the high end and Apple is tipped to be releasing a low-cost iPhone shortly. And if Apple manages to gain low end traction like they did with the iPod then that could change the game a bit as well.

</comment></comment><comment><USER3> This is spot on. Really important to recognize that a large swath of the population still makes phone calls, cares about voice communication and doesn't care about data as much. This probably also speaks to the rising popularity of some of the voice and video apps - a segment of the app universe that might be able to pull these customers into the data world over time.

</comment><comment><USER4> +1 for Scott, Agreed, Android replaced MS.</comment>


Send packages via social networks (without disclosing recipient address) - <AUTHOR> http://www.sendsocial.com/

<comment><USER2> Google Chrome gives false alarm:

"This is probably not the site you are looking for!

You attempted to reach sendsocial.com, but instead you actually reached a server identifying itself as a248.e.akamai.net. This may be caused by a misconfiguration on the server or by something more serious. An attacker on your network could be trying to get you to visit a fake (and potentially harmful) version of sendsocial.com. You should not proceed."

</comment><comment><USER3> I'm not in the target market, but <https://sendsocial.com/how_it_works> doesn't really say explicitly that the _sender_ address cannot be read from the barcode. Obviously, most humans cannot read barcodes, but that's not very good security.

This does require a bit of thought to solve, since you most likely don't want to discard the return address. A bit of crypto can solve this, but that puts quite a bit of work on the delivery service.

(On an unrelated note, what's with forcing every page to https? It doesn't hurt, but it's a bit wasteful.)

<comment><AUTHOR> Just confirmed this one with one of the founders...

"that puts quite a bit of work on the delivery service."

This is exactly what has been done - the barcode translates to a consignment number that is useless without access to myHermes' database. This is in virtue of them having recently incorporated new barcode scanners that link them into this system.

[EDIT: dunno about the https overkill, though]

<comment><USER3> Hmm. That's cool; the numbers would need to be per-package, not per-sender, and not sequential, but I assume those have been taken care of.

Cool.

</comment></comment></comment><comment><USER4> Sounds like it will work great until you send a GPS tracker along.

</comment><comment><USER5> This is brilliant. I've been wanting UPS to add something like this themselves.

They've focused on the social aspect, which is great, and would be a perfect fit for reddit's current secret santa project. However, I think the applications in traditional e-commerce have more widespread potential.

For instance, I frequently purchase parts from dubious vendors on pricewatch.com, and I would love to give them a SendSocial address instead of my real address. If its easy enough, I'd use that address for everything I bought online from Amazon to eBay.

Design is very nice too BTW. I like the subtle 4chan reference in the main graphic too, fits the target audience.

Edit: Just noticed its only available in the UK. That's too bad, I hope it comes to the US soon.

Edit 2: Just noticed the nav links have no anchor text. If you're using Firefox, goto View -> Page Style -> No Style, and you'll find the page isn't very usable.

<comment><AUTHOR> yes they are working on US launch about Feb

[EDIT: great idea about reddit and secret santa btw, anyone know who would be a good contact?]

<comment><USER6> What courier company are they going with in the states? Any word on other countries? Canada?

<comment><AUTHOR> Can't say at the moment, ongoing negotiations and the like ;)

</comment></comment></comment></comment><comment><USER7> Kinda scratching my head. It's definitely a well done site and app. Problem is, there is no problem here. I'm not going to ship you a package to your @twittername address. The few times a year I send someone something via mail, I'm going to want it to be over and done with. I don't want to have to wait for you to respond to a tweet (which 90% of the people I know don't regularly use or ever will).

<comment><USER8> I agree with you. This sounds rather cumbersome to my head versus just asking for an address and sending the package.

To the other reply saying this isn't solving a problem but making something more convenient, I disagree. If it did make something more significantly convenient to me, it would be solving a problem. This one isn't.

</comment></comment><comment><USER9> Gotta give them credit for not copying anyone else.

I can think of all sorts of uses, and the ones involving disreputable commerce (i.e. porn delivery) should provide enough revenue in the short term so that the clean ones can take root.

</comment><comment><USER10> The tagline is "Send anything Anywhere". Yet, from the pricing page I get the impression this is only valid for limited values of "everywhere"... (The FAQ doesn't contain info on coverage).

</comment><comment><AUTHOR> Any comments and suggestions I can pass on to the founders would be greatly appreciated.

<comment><USER11> Anything that can remove the requirement to be home at the time of pick up/delivery would be awesome. Also being able to give out a virtual address. Something like a short-lived virtual PO Box. Think prepaid credit cards.

<comment><USER12> Virtual address would be great - kind of like Google Voice for your mailing address. If my mail typically went to a PO box, it would be nice to check online/receive alerts when I receive mail and who it's from.

<comment><AUTHOR> I'm not so sure I understand what you mean here, guys. If I'm right, using PO boxes or temporary virtual addresses is kind of redundant in this situation as it obsfucates the addresses anyway.

<comment><USER5> Think PayPal for shipping addresses.</comment></comment></comment></comment></comment>


Porn Stars Want to Know: Why Did Facebook Delete Me? - <AUTHOR> http://www.thedailybeast.com/articles/2014/08/02/porn-stars-want-to-know-why-did-facebook-delete-me.html

<comment><USER2> Somebody has just realized that it sucks not to have control over their own content. Facebook (or Google for that matter) provides _free_ service, so they have pretty much total control over whom to refuse or withdraw the service.</comment>


Thoughts On The Scheme Standardization Effort - <AUTHOR> http://benjisimon.blogspot.com/2009/08/3-thoughts-on-scheme-standardization.html

<comment><USER2> "The emphasis being, of course, that even a complete implementation of Scheme should remain as compact as possible."

I don't know. I like that fact that Scheme forces me to create everything. (R5RS) The end result is that I end up thinking long and hard before I write my first parenthesis. This is radically different from my Ruby approach which has a tendency to be "jot down as many functions and then find some way to organise them into a class".

My Ruby approach is probably not "best practices" but sometimes, as I learned in screenwriting class, you have to actually put something on the screen to start, otherwise you end up with...a blank screen.

Seriously, if I wanted modules or a larger ecosystem for my code I would have options to select such as PLT or Kawa.

I guess I'm still muddled about this whole agenda on a "Big" vs "small" Scheme.</comment>


Vine is a sleeping giant - <AUTHOR> http://qz.com/473399/vine-is-a-sleeping-giant-while-everyone-is-focused-on-snapchat/

<comment><USER2> Didn't know vine is still relevant. Used to watch the compilation videos on youtube but now it's just the same jokes recycled over and over again with bad acting by the Vine "celebrities"</comment>


Elite's crazy tokenized string routine - <AUTHOR> http://xania.org/201406/elites-crazy-string-format <comment><USER2> Memory used to be precious. Last year I ported some text adventures games from the TRS-80 machines of the early 1980s to Android. While working on one of the games (Bedlam), I went through a process very similar to the article. Looked for strings that I knew had to be there in some form, ended up having to use a step debugger (the one in MESS) to trace through the code and discover the print routines and then the magic behind them.

It turned out Bedlam packed strings into contiguous bytes of ram, but using 5 bits per character. Byte 1 had all of character 1 in the lower 5 bits and the first 3 bits of character 2 in the upper 3 bits, and so on. Of course with only 32 values the character set was a bit odd. As I recall you had most letters but not Z or Q,the numbers 0,1, and 3, a period, comma, and space. Something like that. The routine to unpack the characters was quite small, just used shifts to build an offset into a table containing the ASCII values.

The games also ran in a somewhat ingenious "virtual machine", with all the game logic being expressed through sets of very tightly encoded high level rules rather than implemented directly in assembly. In the Android port, I literally load the original ROM into an array and then just process these same rules verbatim using a java implementation of the VM. Kind of amazing to me how portable yet efficient the design is.

<comment><USER3> Using a VM was common for text adventures of the time; check out the Z-Machine used by Infocom games: [http://inform- fiction.org/zmachine/standards/](http://inform- fiction.org/zmachine/standards/)

Like this game you describe here, the Z-Machine also stored characters in less than one byte, packing three characters (plus an extra control bit) into two bytes ([http://inform- fiction.org/zmachine/standards/z1point1/sect03...](http://inform- fiction.org/zmachine/standards/z1point1/sect03.html))

</comment></comment><comment><USER4> Directly related to the planet name generation routine, if you look closely - the same tokens are used there (although that's not all of it). Part of this legacy carries over to the sequels, even the recently-released _Elite: Dangerous_ , although the "old worlds" are patched in by hand along with a bunch of discovered stars.

A small side-effect, however: Bell & Braben had to try several galaxy seeds in _Elite_ before they happened upon one that _didn 't_ generate the planet Arse!

Lots of things of the era did things like this, of course. 8-bit BASICs would often tokenise on input to reduce memory consumption and the amount of lexing needed during the interpreting.

Even as late as the PlayStation, similar things were still very common practice: take a look at the English translations of Final Fantasy 7 through 9, or Chrono Cross, for excellent examples of the type of thing, which (if I recall correctly? It's been a few years!) don't use ASCII (but map to offsets in the tilesets), use control characters to handle colours and the like, sometimes have digraphs and in the case of Chrono Cross, due to a lack of disc space (caused by English text being bigger than Japanese text of an equivalent meaning), the localisation team got highly creative and made an accent engine for the 44 or so different characters so that quite a lot of the lines could be reused and changed on-the-fly (as the 'developer ending' documents).

</comment><comment><USER5> This link was worth it just to find out jsbeeb exists.

It always surprises me when you see such extreme space saving efforts, especially on machines where you would expect the processing overhead to be high. I've noticed that as the tech improved this concept remains important because I/O bandwidth is so often the real limiting factor. Things like piping input/output through gzip can actually speed batch processes up dramatically.

<comment><USER6> Yeah, even in-memory processes can be sped up by compression/decompression. When you're not running entirely in cache, which many old games can be done.

Doom 1+2 (including all the data) can be entirely loaded into modern high end CPU cache.

</comment></comment><comment><USER7> Weird seeing this here, have been playing a lot of Elite: Dangerous lately, if you are a fan of the original Elite it is a true successor: [https://www.elitedangerous.com/](https://www.elitedangerous.com/)

Here is a video with interviews of the orginal developers that discuss the extreme need for byte savings: [https://www.youtube.com/watch?v=Rapa3VfUWfs](https://www.youtube.com/watch?v=Rapa3VfUWfs)

Of course you guys know David Braben is one of principle founders of the Raspberry Pi foundation.

</comment><comment><USER8> It isn't that crazy when you realize that, on those old systems, every byte counted. If he could save 50-100 bytes with that weird method, it was worth it.

<comment><USER9> The entire universe was procedurally generated because you couldn't hold all the data in the memory of an early microcomputer.

I have a write up on how it worked here: [http://blog.rabidgremlin.com/2015/01/14/procedural- content-g...](http://blog.rabidgremlin.com/2015/01/14/procedural-content- generation-creating-a-universe/)

</comment></comment><comment><USER10> My first computer was a BBC B Microcomputer when I was about 7 or 8 years old. I played Elite with my brother for about one and a half years. Great memories.

Anyone other Acorners remember Repton? Also a cool game. You had to wait 10 minutes for the game to load off a cassestte though!

<comment><USER11> Repton (without the 10 minute wait :) [http://bbc.godbolt.org/?disc=sth%3ASuperior%2FRepton.zip&aut...](http://bbc.godbolt.org/?disc=sth%3ASuperior%2FRepton.zip&autoboot#)

<comment><USER10> That's awesome. Thanks for sharing!

</comment></comment></comment><comment><USER12> The C64 did not use ASCII. It has upper and lower exchanged.

My operating system uses LZW compression.

[http://www.templeos.org/Wb/Kernel/Compress.html](http://www.templeos.org/Wb/Kernel/Compress.html)</comment>


Ask HN: How are you treating your child's internet addiction? - <AUTHOR> My son is 5yrs old.
His mom and I made a terrible mistake when he was around 2 to allow him to watch YT & YTkids videos (which have a vicious algo of horrible content [1]). My wife and I are in tech, but we try our best to not use devices around him and promote 'quality family time'.
But nothing helps.. His addiction grows, even though we forbid all phone use and their games ( which i was hesitant to do..as they were at least challenging him).
These days, all he asks for is to watch his netflix shows. Over and over.. like a crack addict..he simply can't control his desires for the eye-cocaine.
We've tried setting strict time limits and rules for when he can watch them.. but it's not helping. The only thing left to do is purely ban it. But the cat is out of the bag and he took a huge dump.
Recently I discovered tech solutions like DNSlearning [2] which I feel is just starting to constructively attempt at finding a balance - I wish there was more being done.
Honestly I'm starting to get REALLY worried for him and society in general.
Everywhere I look, social quality, focus, reflection, empathy, and critical thinking - is exponentially dropping.
How do we as digital leaders/parents/inventors take on this challenge?!?
I've asked this on other parent forums[3]--no luck.
Are children are expecting responsible loving guidance.
Daddies, Mommas, what has worked for you??
[1] https://news.ycombinator.com/item?id=14910125
[2] https://dnslearning.org
[3] https://parenting.stackexchange.com/questions/30073/5yr-old-addicted-to-mobile-devices-need-advice <comment><USER2> Not to be (too) flippant, but this is your first child I assume?

I have no particularly good advice for you other than it'll work itself out, and it's probably just a phase. When kids go to school, a lot of things change.

Also, it is often a point of pride for parents to talk about restricting screen time, how much their child reads, plays piano, is a star athlete, etc.

Parents often exaggerate to score points. :). This says more about parents and less about children.

Personally, I don't think devices are either good or bad. Perhaps your child actually loves some show and it gives them comfort. One thing to do is sit there and watch with them, and try to engage in their world. Ask them about what they like in the shows, etc.

Childhood is so fleeting and you will miss it before it's gone!

</comment><comment><USER3> > Over and over.. like a crack addict..he simply can't control his desires for > the eye-cocaine.

Dude, he's 5. He's not some addict. Relatively few 5-year-olds can control their desires in a consistent way. I mean "kid with his hand in the cookie jar" is a saying for a reason.

Be a parent, limit his use (or remove it altogether), and do other stuff with him. Take him to the zoo, maybe karate lessons or something, to the park, etc. I'm sure he'll be fine, as long as you don't continue to do stuff like denigrating him in public as some kind of "internet addict" in the throes of his addiction to "vicious" content (a kid's show, I presume) when he's only 5.

Maybe talk to him about how doctors say kids should limit their TV/YouTube usage to keep healthy. When my kids weren't getting enough veggies and fruits at that age, it deeply impressed them when I took them to the doctor and he talked about how important that was, and they then competed to see which sibling could reach 5 fruits and veggies a day first. The APA (American Pediatric Association) has released guidelines on this stuff (media consumption), if I'm not mistaken.

</comment><comment><USER4> Hes 5....take it away from him, and teach him other things, remove tv all together (even for yourself).

<comment><AUTHOR> It's looking like the only option at this point to salvage his budding neurons. But for how long should this 'hardcore' ban last? +5yrs? 10?

<comment><USER4> As the other guy said, be the parent. Take your kid to the zoo, go to a museum, show him how to play catch, both of you should learn to build a bird house, do ANYTHING else besides letting your kid veg out in front of a tv, wtf are you doing... Be there for your child.

</comment></comment></comment><comment><USER5> > We've tried setting strict time limits and rules for when he can watch > them.. but it's not helping. The only thing left to do is purely ban it. But > the cat is out of the bag and he took a huge dump.

How are you setting limits? Verbally?

Just enforce the time constraints through the router. Tell the kid you can only watch youtbe/netflix for 40 minutes or whatever at a specific time. Set the mac address filtering and rules on the router, and ta-da!

<comment><USER6> YT Kids has a built in timer that you can password protect. I am not sure about netflix

</comment></comment><comment><USER7> Is your son doing physical activities? Does he like drawing, music, art? Are you playing with him enough?

<comment><AUTHOR> yes - my son has a healthy amount of activities outside of his half-day at Montesorri. Could i spend more time with him? i sure wish i could have half- days too but reality is i get home and have just ~1hr to make dinner, bath and play with him.

next week i will experiment with a 50% reduction of screen time (currently @30min/day) and substitute it with a plethora of strategy games and legos.

hopefully this will do the trick.

ive twlked to a ton of friends with kids and they all deeply wrestle with this.

i honestly feel this will be our generation's greatest challenge. thanks guys for your support.

<comment><USER8> When I was a kid the psychiatrist prescribed me Ritalin and on an average 22-hour day I probably spent it watching cartoons for hours on end, playing Neopets ferociously, xbox, along with some time outside with the other kids riding my scooter and shouting conversation over the backyard fence with the older kids on the other side.

This was probably tolerated in part because I was a pretty darn misbehaved child sometimes and watching TV wasn't as hard to deal with as explaining to me that no you can't tape a kitchen knife to your toy assault rifle as a bayonet.[0]

I like to think I turned out fine, so freaking out over 30 minutes a day seems a bit hysterical. That in mind here's my advice to get him away from the TV:

\- Try taking him to the park. A lot of when I got out and really exerted myself as a kid was when I went to the park. It lets you interact with other kids, climb on stuff, go running around, and play pretend games that are good for the imagination.

\- Get toys that encourage him to get up and play pretend. I was always a huge fan of toy guns, action figures, stuff with _interesting_ mechanics (if you're on HN I'm sure you have the requisite taste to find such things). My rooms floor was always strewn with action figures and the like. A lot of the time I'd pit them against each other, sometimes in epic battle royales that may as well have been the Ultimate Showdown Of Ultimate Destiny. [1] Important tip: Kids are generally not snobby, if it were me instead of buying expensive new toys I'd go down to value village and just pull twenty dollars of grab bags with interesting looking stuff off the wall, with the occasional new toy for flavor. When you're that age playtime is half imagination for _everything_ anyway, and you won't get mad when he breaks them. Even when I'd play video games I'd make up my own story for what was happening with narration of the villain growing more despondent as I got closer to the stage end. Do be mindful of the choking risk though!

\- Get him some real friends, especially neighbors kids. A lot of what would get me to go outside, was seeing someone else outside in the cul-de-sac and wanting to be with them. Even in those famous studies with rats and the cocaine water they found that when you introduced social opportunities and other recreation the cocaine water became much less compelling.

Overall though, your son is probably fine. As one comment in this thread suggested perhaps you could set a good example and pack up the TV yourself. After all are you _really satisfied_ with the time you spend watching?

[0]: It needed a bayonet! Cmon I was like 9.

[1]: [https://www.youtube.com/watch?v=4WgT9gy4zQA](https://www.youtube.com/watch?v=4WgT9gy4zQA)

<comment><AUTHOR> Thanks Unimpressive.. great tips!

</comment></comment></comment></comment><comment><USER6> Wait, 30 min a day is addiction?</comment>


Debugging Node.js in Docker Using Node Inspector - <AUTHOR> https://keylocation.sg/our-tech/debugging-nodejs-in-docker-using-node-inspector <comment><AUTHOR> Nice to see a way to do this without needing to install node inspector in the same container...</comment>


10 Scientific Expeditions That Were Doomed From the Start - <AUTHOR> http://brainz.org/10-scientific-expeditions-were-doomed-start/

<comment><USER2> The story of the expedition of Burke and Wills is also part of the History of the camels in Australia - a story which is really something special.

In the year 1860 the ship Chinsurah arrived from Karachi in India at Melbourne. It brought 24 dromedaries (one-humped Arabian camels) to Australia and also some camel herders, called "Afghans". The camels were supposed to be part of the expedition of Burke and Wills, which was financially supported by the Royal Society of Victoria and aimed at crossing the australian continent from south to north.

Two years earlier the Victorian Exploration Committee employed Mr. George James Landells to buy camels for £3000 and recruit also some camel herders.

Six further camels were bought by the Victorian Exploration Committee, imported to Australia on the ship Malta by Mr. White & Co.

On Mr. Landells explicit wishes, 60 gallons of rum were added to the supplies of the expedition - not for himself, but for the camels! Mr. Landells had convinced the Committee, that rum would prevent scurvy and improve the survival of the camels in the desert.

On the 20th of August 1860 the expedition started with much public attention from Melbourne with 26 camels, four camels stayed at home, because they were ill.

</comment><comment><USER3> Drop the '10' in the title. Makes the submission sound like supermarket tabloid linkbait. As common and effective on peoples' ape subroutines as it is, it's not a writing style one should strive to emulate.

<http://ycombinator.com/newsguidelines.html>

 _If the original title begins with a number or number + gratuitous adjective, we'd appreciate it if you'd crop it. E.g. translate "10 Ways To Do X" to "How To Do X," and "14 Amazing Ys" to "Ys." Exception: when the number is meaningful, e.g. "The 5 Platonic Solids."_

</comment><comment><USER4> Fergus Fleming has written an excellent book on some of the more daring/crazy British expeditions of the 19th century:

"Barrow's Boys: A Stirring Story of Daring, Fortitude, and Outright Lunacy"

[http://www.amazon.com/Barrows-Boys-Stirring-Fortitude- Outrig...](http://www.amazon.com/Barrows-Boys-Stirring-Fortitude- Outright/dp/0802137946/ref=sr_1_1?ie=UTF8&qid=1317996925&sr=8-1)

To my amazement after reading this book I discovered that one of the few bodies recovered from the Franklin expedition is buried a couple of hundred meters from my home in Edinburgh.

<http://en.wikipedia.org/wiki/Franklin%27s_lost_expedition>

[http://hidden-tracks-book.blogspot.com/2010/05/lt-irving- mem...](http://hidden-tracks-book.blogspot.com/2010/05/lt-irving- memorial.html)</comment>


Google 101: The Ultimate List of Google's Services and Products - <AUTHOR> http://siteboat.com/google-101-the-ultimate-list-of-googles-services-and-products/

<comment><USER2> I'm amazed at how many of them I had forgotten about.

I'm even more amazed that I had heard of all of them.. either I spend too much time on the internet, or Google are good at promotion... maybe both?

</comment><comment><USER3> Since there is Google US Puzzle Championship, there should be Google Code Jam: <http://code.google.com/codejam/>

</comment><comment><AUTHOR> It took much time to prepare the list but i think it's the most detailed list about Google's services.</comment>


TheFacebook.com's darker side (2004) - <AUTHOR> http://web.archive.org/web/20041101143311/http://www.stanforddaily.com/tempo?page=content&id=13497&repository=0001_article <comment><USER2> Jesus christ. It's so hard to believe that's only from 2004.

I feel like that era transpired 40 years ago. The period of time before smartphones feels like it happened in the 1970's to me.

The difference between 2000 and 2015 is so absurdly radical it begs disbelief.

<comment><USER3> > It's so hard to believe that's only from 2004.

It's surprising Holt could still get away with writing "Cornell girls are hideous" as late as 2004!

<comment><USER4> I assumed there is some sort of rivalry between Stanford and Cornell - I'm not in US so I wouldn't know. But you would not see this kind of statement in a paper nowadays, that's for sure.

<comment><USER5> Cornell had of a rivalry with Harvard (who can't play hockey).

Stanford really wasn't a concern, they're on the other coast. Though, this was from afew years after my time.

</comment></comment></comment></comment><comment><USER6> In the distant future, when they discover the endless jars of eggs and sperm in Mark Zuckerberg's basement, somewhere, Chris Holt will be saying "I told you so."

<comment><USER7> I mean, no one in their right mind REALLY believed that Facebook needs all that server farms, right? :)

<comment><USER8> They did when they ran PHP. Now they compile their PHP to C++ so it'll run faster and with less CPU and cooling requirements.

Also, writing PHP is easier than C++ so it's beneficial in that they get a wider pool of developers to use, and they can pay less.

Genius really.

So, now their server farms must be a cover-up, or they're using an old version of MySQL that kept a lot of its clustering data in RAM and are afraid it'll bomb out :-)

<comment><USER9> So they can pay less? Do you have any idea how much FB pays?

<comment><USER8> No but I know that PHP developers get paid less than C++, typically. That's particularly the case here in the UK.

I would wager than employing an army of C++ devs would be costlier than employing an army of PHP devs.

</comment></comment></comment></comment></comment><comment><USER10> Though satire, the fake Moskovitz quote was interesting: "I don't want to elaborate too much on our end goal / purpose, but I will say we are not without a plan."

I wonder at what point it became clear to Facebook that they were sitting on a targeted advertising goldmine? Surely it was not on the minds of Zuckerberg and Moskovitz (or anyone else!) in the company's early years.

</comment><comment><USER11> This is not what I expected it to be.

<comment><USER12> College satire is always so cringey, Ivy League especially so.

<comment><USER13> Stanford is not in the Ivy League.

<comment><USER12> Ivy Plus.

</comment></comment></comment></comment><comment><USER14> > _Many people have told me that they are surprised that a computer science > major from Harvard designed this people-meeting service._

Can Facebook still be considered a "people-meeting service"?

<comment><USER15> I don't know that Zuckerberg ever considered it a "people-meeting" service.

<comment><USER16> That's exactly the purpose a literal face book served before Facebook implemented a digital equivalent. Granted, it's not been the sole purpose of the site for quite a while, but originally that was the value proposition for users.

</comment></comment></comment><comment><USER17> Not sure why the author is so perplexed about thefacebook.com. Friendster and Myspace were already in existence and popular. Facebook was just another competitor with slightly different features (or lack there of (no customizations))

<comment><USER18> Not forgetting Hi5 and Bebo

<comment><USER19> Or Orkut, still possibly the worst-named product Google has put out.

<comment><USER20> They bought it

</comment></comment></comment></comment><comment><USER21> > Al Capone used something similar in the 1930s called "themugshot.com" and > more recently, Martha Stewart used "itsagoodthing.com" to form her "Living" > cadre. It's practically the oldest trick in the book.

I don't quite really understand this 'oldest trick in the book.'. Can anyone explain what this so called scheme is? Thank you!

<comment><USER22> It's a joke. Facebook was new and shiny in 2004, which is why accusing Zuck of copying (non-existent) Mafia websites from the 1930s is funny.

</comment></comment><comment><USER23> I remember being able to look up who was in your class. Facebook was so much more enjoyable when it was just university students, it was more fun, playful, and I guess innocent.

Since facebook expanded outside of universities its become more generic, and corporate and lost its "joie de vivre"

<comment><USER24> Here's a trick that used to work in 2005:

You could search for people with a favorite movie, then filter by dorm. You'd write on their wall, invariably the person who listed the movie would own it on DVD, you'd walk over and borrow it.

It was such a tight-knit community you could go "I saw you on facebook, can I have your stuff? Don't worry I'm on facebook too and will give it back"

<comment><USER23> I also remember not wanting to join facebook because it used your real name. I was so use to using nicknames/handles/avatars etc that the thought of using your real name was uncomfortable to me.

I must have been one of the last people on campus to sign up

</comment></comment></comment><comment><USER25> Wow, what a hysterical compendium of excellence. You know, it's optional that people use such services, and I think that once cooler shaz comes out people will drop it like it's hot, to quote a contemporary philosopher.

</comment><comment><USER26> LMAO, someone bought the URL: womenwhowanttosleepwithchrisholt.com

And who ever bought it, isn't Chris Holt!

</comment><comment> King-Aaron > Perhaps "acne-ridden dork magazine" would have worked better. I kid — sort > of. Cornell girls are hideous.

Yeah wow.

<comment><USER27> sounds like typical college rivalry.

<comment><USER28> Is there Stanford vs. Cornell shade? Ivy Leaguers get touchy when Stanford people call themselves an Ivy (hell they get touchy that Penn is an Ivy) but is there actual direct beef?

</comment></comment></comment><comment><USER29> So what ever came of Chris Holt?

<comment><USER30> He's a senior editor at Super Evil Megacorp, the mobile-games site, according to his LinkedIn profile.

To my astonishment, [http://womenwhowanttosleepwithchrisholt.com/](http://womenwhowanttosleepwithchrisholt.com/) is an unclaimed domain name. At least that's true as of 4:14 p.m. Pacific time.

<comment><USER31> Not true anymore...

<comment><USER30> This domain could be the current-day equivalent of the famous Red Paperclip of a decade ago. The opportunities for "value creation" are the stuff of movies. I'll watch with interest what happens to it. [https://en.wikipedia.org/wiki/One_red_paperclip](https://en.wikipedia.org/wiki/One_red_paperclip)

</comment></comment></comment></comment><comment><USER32> I'd rather they take an organ than what they take from us today :-)

</comment><comment><USER33> Is that why I keep getting those Asian egg donor ads on Facebook ?

</comment><comment> ezequiel-garzon Also available here [1], with a PDF version of the printed issue. It's interesting that the archive is separate from the Stanford Daily website.

[1] [http://stanforddailyarchive.com/cgi- bin/stanford?a=d&d=stanf...](http://stanforddailyarchive.com/cgi- bin/stanford?a=d&d=stanford20040310-01.2.22)

</comment><comment><USER34> What was CS235? I graduated 2016 and I don't remember a course with that number ever being offered

<comment><USER35> CS 235: Applied Robot Design for Non-Robot-Designers: How to Fix, Modify, Design, and Build

Circa 2012-2013

<comment><USER36> I remember it used to be an advanced OS class about a decade ago. I'm not sure why it would be considered that challenging as opposed to any other graduate- level class (especially the theory ones)...

</comment></comment></comment><comment><USER37> I'll just comment on the stanforddaily website how clean it looked and loaded fast even without any crap like AMP. Just compare it to the current site.

<comment><USER38> Pure HTML y'all. No megabytes of css, no bootstrap, no webpack with plethora of dependencies to load, parse and execute.

We went the other route.

<comment><USER39> Why the drive-by attacks on good tools? This kind of stuff is tiring and just adds to the noise.

> No megabytes of css

Why would there ever be megabytes of CSS for such a site, apart from for ads, which is the main problem with modern 'content sites'.

> no bootstrap

Bootstrap can be tiny, and a big win in productivity/quality, so 'no Bootstrap' likely cost the devs in its lack of availabilty at the time. It looks far worse and is less usable on mobile particularly (but on desktop too) than it would be if built with Bootstrap.

> No webpack with plethora of dependencies to load, parse and execute.

Why is that even relevant? Who exactly is advocating for 'webpack with plethora of dependencies' for that kind of website?

<comment><USER38> > Why would there ever be megabytes of CSS for such a site

Bootstrap, a theme for it, app css, a couple of 3rd party vendors, and we are over a megabyte.

> a big win in productivity/quality

Only if you are doing an SPA which mimics desktop applications. Which journalism sites are usually not

>Why is that relevant for such a site? Who exactly is advocating for a 'plethora of dependencies' for that kind of website?

Well no one, but sites still do this in the wild, while being driven by business decisions rather than technical concerns, which is understable surely, but look how nostalgic people are getting.

<comment><USER39> >> Bootstrap, a theme for it, app css, a couple of 3rd party vendors, and we are over a megabyte.

Who's doing that? And if they are adding dependencies without consideration of page-speed, they're to blame, and they'll never understand performance.

Bootstrap is not the problem. Hypothetical bad devs would have been making similar mistakes with flash prior to that, or whatever alternative CSS libs were available, and were being cobbled together piecemeal prior to Bootstrap.

> a big win in productivity/quality

>> Only if you are doing an SPA which mimics desktop applications. Which journalism sites are usually not

That is false. Bootstrap's primary use-case is as a CSS framework, not something solely for SPAs. From the early days it solved cross browser issues even for supposedly simple things like 'forms' for which there were no well- established conventions beforehand. Go trawl through the BS1 & 2 issue threads around form elements, and see all the things they fixed.

> Why is that relevant for such a site? Who exactly is advocating for a > 'plethora of dependencies' for that kind of website?

>> Well no one, but sites still do this in the wild [...]

So those tools don't deserve the abuse/noise.

<comment><USER40> Nobody's picking on Bootstrap anyways.

> Who's doing that?

You either don't use the web since 2008 or something or are lying: nearly all websites start with this setup.</comment></comment></comment></comment></comment></comment>


Removing Haze from Color Image Using the Near Infrared with Wolfram Language - <AUTHOR> http://blog.wolfram.com/2014/11/21/removing-haze-from-a-color-image-using-the-near-infrared-with-the-wolfram-language/

<comment><USER2> Very neat, I love applying math to photography; but for this problem, it's way easier to just assume "haze = constant gray cast" and therefore simply increase contrast and saturation.

This will look just fine for for 99% of amateur photographs (I know it does for mine), and professionals just use polarizing filters anyway.

</comment><comment><USER3> This just supports my observation that every image filter that works invariably contains morphological operations.

<comment><USER4> What do you mean by morphological operations?</comment></comment>


Amazon Echo - <AUTHOR>

I received my amazon echo today, after peeling back the rubber on the foot I discovered 2 Debug Ports labeled B and C,
B [1] [2] [3] [4] [5]

  [6] [7]     [8] [9]
 C [1] [2]     [3] [4]

  [5] [6] [7] [8] [9]

 Grounds: B-1, B-6, B-8, C-3
I am going to make a connector and hook up my logic analyzer later on. But it is positive for hacking, my suspicion is that one goes to the Texas Instruments DM3725CUS100 Digital Media Processor and one goes to the SanDisk SDIN7DP2-4G 4 GB iNAND Ultra Flash Memory and they use this to program and test it. <comment><USER2> A little blog post with some photos would probably garner more attention than a HN text post, but great find!

</comment><comment><USER3> Could you take photos of the device and of these ports? I'd love to see what you could do with it.</comment>


What is good code? A scientific definition - <AUTHOR> http://engineering.intenthq.com/2015/03/what-is-good-code-a-scientific-definition/ <comment><USER2> I feel like this just replaces one vague word "good" with a bunch of other vague words like "readable" and "maintainable".

Like of course, maintainable is good. But what makes code maintainable? When we're teaching new developers, what do we tell them to do to make their code maintainable? How do we distinguish between code that is maintainable, and code that is not maintainable? That's really the important thing; just knowing it should be "maintainable" doesn't particularly help.

And "readable" is even more complicated. Sure, there are some syntactic things that help readability—consistent indentation and spacing, good variable names, organized files, shorter lines. But beyond that it kinda breaks down. What makes a method readable? Well, probably a small number of lines, few branches, single purpose. That's good. But when you extend that to a codebase, you end up with code that you need to jump between a dozen methods to follow what happens in any given call. Is that readable? Or if you look at it from a class level, having a few methods where the whole chain of logic is in a single place is readable—but then you end up with giant god methods that do way too much. Is that readable? Presumably the balance is somewhere in the middle, but how do we recognize it? Just saying code should be "readable" doesn't really help.

Or "covered by automated tests"—definitely tests are helpful. Except for bad tests, which are harmful, and make fixing bugs or refactoring a painful process. So "covered by tests" can be good, or it can be bad, and adding the wrong tests can make your codebase worse. How do we distinguish between good tests and bad tests?

So I agree that the things mentioned are true about good code, but way too vague to help write better code.

<comment><USER3> But, see, "good" is just this word. It's hard to test.

"Readable", though, I can test _simply by trying to read it._ That is, I can test _someone else 's_ code by trying to read it. I can't test my own that way; as the author, I'm not qualified to read it for understandability, because I already understand it.

So in practice, this boils down to "Read each other's code. If you can't read it, say so. If they tell you they can't read your code, fix it." That is actually fairly simple to put into practice. It doesn't help you get it right the first time, but it shows you where you got it wrong, and tells you how to know when you've fixed it. That's a big step forward from "good".

<comment><USER2> What that means, though, is you can only determine if code is readable after it's written, and read by other people. And I agree with you. But that also means that, while you're writing code, or thinking about the code you're going to write, or trying to decide between two possibilities, 'readability' doesn't mean anything. So you can't use it to guide you towards more readable code; instead it can merely be used to decide which code should be replaced / refactored / rewritten. And you can't use it to teach new developers how to write better code.

<comment><USER3> > And you can't use it to teach new developers how to write better code.

Yes, you can. New dev writes code. It gets code reviewed. New dev gets told: "That's ugly/too complicated/hard to understand. Here's some suggestions for how to re-write it." Over a few years, new dev learns what not to do (which is about the same as developing a sense of taste, or learning a style).

It's not something that can be put into a one-hour training class, though...

</comment></comment></comment></comment><comment><USER4> I'm always surprised that "It works." is not #1 on these lists.

I get that as developers, it really matters quite a lot whether the code is good. But on a higher business level, software development is a tool, and the most important thing to the business is that it works. Working well and making it better and more efficient are incremental improvements to the business... but code that doesn't work is a deal breaker.

Beautiful readable, testable, maintainable code that fails to meet the business need is still a failure.

<comment><USER5> It's easier to make Beautiful readable, testable, maintainable code that fails to meet the business need into working code than it is to turn ugly, unreadable, untested, unmaintainable (but working) code to a state where it's not a tragedy waiting to happen.

Edit, in a less snarky tone:

If beautiful, readable, testable maintainable code is buggy, I'd bet money on the project being structurally sound, but the developer having failed to understand something about the business requirements. It'll likely take a little while to get familiarised with the structure of the code, and then some more time to identify (and fix) the parts of the business logic that are not working as expected.

Ugly, unreadable, untested, unmaintainable code that "works" usually doesn't actually work, not really anyhow. It works fine for the cases that make the bulk of day-to-day work, but is almost certainly going to fail horribly when you hit an unusual corner case, and fixing that corner case is going to be a pain, because the lack of structure and testing is going to make it really easy to accidentally break something, and really hard to identify that this has happened (and why).

<comment><USER6> You are conflating "ugly/unreadable" with "untested" and with "unreliable". There's plenty of horrible but reliable code out there, and vice versa.

<comment><USER5> I'm conflating them because, in my experience, they're not independent. There are, of course, plenty of exceptions, but those characteristics tend to go hand-in-hand.

It's also often the case that what superficially looks like "ugly reliable code" actually means code that was, at one point, very simple and tidy but has been battle-hardened by years of maintenance. It's ugly because code that implements a lot of complexity tends to look scary as hell.

Finally, it's ultimately a truism: truly unreadable code is also code that's hard to modify, and very few systems will go through their lifetime without changes. Even if it works fine today, it'll not meet business requirements tomorrow, and its unmaintainability is a liability.

</comment></comment></comment></comment><comment><USER7> My definition is another: "Great code contains maximum entropy towards to its purpose while being easily understandable and maintainable."

Each part is interconnected to ensure quality and efficiency:

1\. Maximum entropy means that your codebase should contain as much concentrated "information" as possible in relation to its size. Free of copy & paste code and repetitions that can be reused in libraries, methods and classes. This ensures less code to maintain , easier to spot bugs and easier to spot patterns.

2\. Understandability (that includes readable): That means no blob classes or methods with an infinite number of purposes. Each layer of abstraction simple enough to keep in mind in its entirety.

3\. Maintainable: It should be bug resistant, making it hard to do the wrong things and easy to do the right (for example putting required parameters into constructors rather than fields or properties). You should be able to replace and/or modify individual parts without side effects. Having as little code as possible also helps with this.

I think "covered by automated" tests are nice ... in some cases. It is far from a rule that they're a panacea for every kind of project, code and/or situation nor are all kinds of code wort the effort (models & algorithms: yes, UI: usually no). It also depends on the team and methodology.

That good code does what its suppose to do and should be bug free should be a given :)

<comment><USER8> I think I get what you're saying with "maximum entropy", but it's the wrong term for what you're trying to express. Really unreadable, terse code is highly entropic, but it's not good code. If you use descriptive variable names, that decreases from the entropy of the code.

<comment><USER7> yes maximum entropy = high information density. When you compress a file it usually leds to higher entropy. I agree that being terse in itself isn't the primarily goal, that's why I said _" while being"_ ie has to reach the understandability and maintainability criteria as well

If you think I'm using the term wrong I'd appreciate a reference, thanks

</comment></comment></comment><comment><USER9> There is this paper [1] by John McCarthy on what he calls Elaboration Tolerance:

 _Elaboration tolerance is the ability to accept changes to a person's or a computer program's representation of facts about a subject without having to start all over._

This could make a good definition of what is 'good code'.

[1] [http://jmc.stanford.edu/articles/elaboration/elaboration.pdf](http://jmc.stanford.edu/articles/elaboration/elaboration.pdf)

</comment><comment><USER10> "Second, because if you write good code chances are that the product you are building will be much better."

If "better" means anything related to user experience, adoption or commercial success I think that correlation is about zero. Even the dumbest idea can be implemented by good code.

<comment><USER11> I would have expected better to mean, in this circumstance, less likelihood of there being issues that impact the user - something that almost certainly has a correlation! No amount of "good practice" will protect again an idea being rubbish.

</comment></comment><comment><USER12> I'm not surprised readable is so highly ranked, nor do I disagree that it should be. I am however somewhat surprised that SOLID doesn't have a higher representation. I find that in general, as long as you keep code clarity and readability sacred, you can write testable code by following the SOLID principles. Seems to me it provides the basis of 'good code'.

</comment><comment><USER13> Does that company even care?

Their team page at [https://www.intenthq.com/about- intent/](https://www.intenthq.com/about-intent/) looks like a classic British social class structure; the people-people, so-called "movers and shakers" at the top, the mere techies all scurrying around on the bottom rungs, and QA almost falling off them. Even the office admin is presented above all the technical people.

Anyway, negative, small-minded and snide observations aside, here's my totally unscientific summary of their completely scientific survey:

      Readable

      Simple (as in not entwined)

      Functional/Verifiable

      Maleable/Maintainable

      Composable/Reusable

      Efficient

But of course all of these aspects are also very subjective.

</comment><comment><USER14> Great code is mostly pure, dense, defines clean interfaces, and favors composition and reuse. Maintenance, testability , readability etc. are just side effects of well written code.

<comment><USER2> What do you mean by dense?

<comment><USER15> Would guess "concise" or "efficient".

</comment></comment></comment><comment><USER16> The only metric that matters: there is a user, using the software.

<comment><USER17> That is a very good point. Surprisingly, it didn't even made in top 50. But, I guess the intent here was to capture what developers think is a good code aesthetic, apparently the sample set of the survey do not feel a happy user is one of it.

<comment><USER16> I think that is the most telling aspect of this article: developers are cult unto themselves. The user is, seemingly, secondary to the purpose of writing code in many cases ..

</comment></comment></comment><comment><USER18> Well is it scientific or pseudo-scientific? In all seriousness, I assume when you ask someone what makes good code, they will assume the code is correct already.

<comment><AUTHOR> I don't think the post wants to be scientific and stands at the beginning to be pseudo-scientific (actually, aren't all investigations based on methods like surveys or questionnaires pseudo-scientific by definition?).

On the other hand it also says: _" To be fair, it's also true that some of the developers had given that for granted (or at least that's what they said when asked) but it can be symptom of some underlying problem."_

So it's true that most of the developers asked assumed that the code was correct already but, in my experience, I've also seen in some cases (too many) that some developers believe that they are above everything and they don't worry enough about the value that the code should delivere.

I think it's the same symptom as the "throw over the wall" problem. Some developers tend not to worry about anything that is not coding.

</comment></comment><comment><USER19> OT: I need a css style editor that is point-and-click (or copy-and-click) simple. (I currently use Stylish.) I need something that lets me select a paragraph, adjust a style, and it automagically adjusts the class/id style for the page. This light text stuff blows- and unfortunately it kind of biases me against his ability to determine "readabilty" even though that is completely unfair.

</comment><comment><USER20> I would define good as Fit for purpose, Maintainable, and id judge this primarily by SOLID Tested, prefferably TDD aor BDD and finally not iver commented, good code should convey what it does without the need for comments, and as code evolves, comments rarely are updated.

</comment><comment><USER21> Good code looks like Carmack's code.

[http://www.codergears.com/Blog/?p=1313](http://www.codergears.com/Blog/?p=1313)

<comment><USER22> John Carmack comments at the bottom of that article: "I had almost nothing to do with the PC Oculus SDK — Michael Antanov was the primary architect."

</comment></comment><comment><USER11> _Good code is written so that is readable, understandable, covered by automated tests, not over complicated and does well what is intended to do._

Couldn't agree more.</comment>


Why the Military Can't Quit Windows XP - <AUTHOR> https://slate.com/technology/2018/06/why-the-military-cant-quit-windows-xp.html <comment><USER2> "The Pentagon's recent push to upgrade to Windows 10" is a terrible scourge that came too fast with no testing and broke too many things. It's awful.

</comment><comment><USER3> Any link for the Europeans? The page just asks to agree and then doesn't redirect anywhere.

<comment><USER4> [http://archive.today/kZize](http://archive.today/kZize)</comment></comment>


Hunting and Hallucinogens: psychoactive plants for dog hunting [pdf] - <AUTHOR> https://www.dropbox.com/s/32ulhvew5hxsqnb/2015-bennett.pdf

<comment><USER2> Wow, all Brugmansia are very dangerous to manipulate; Anthurium and Caladium having micro-needles and corrosive poisons (to put this it in the nose of the poor dog is the same as filling the nose of the dog with a mix of powder of broken glasses and vinager); Euphorbiaceae cause blisters in the skin by contact (they are bathing the dog with Croton!), Cyperus have micro-spines of silica and cuts like a razor blade, and Aristolochia causes cancer by contact!.

Most of the plants in the table have in common that they are very dangerous and cause a hell of pain when aplied to skin and mucosae.

This is not 'improving methods', is just a cruel animal punishing to turn the dog crazy and vicious. Please don't try this at home. Is plain and simply nauseating dog torture and also very dangerous for the owner (a human can easily be killed if parts of those plants are reduced to dust and accidentally inhaled for example).

</comment><comment><USER3> Direct link:

[https://www.dropbox.com/s/32ulhvew5hxsqnb/2015-bennett.pdf?d...](https://www.dropbox.com/s/32ulhvew5hxsqnb/2015-bennett.pdf?dl=1)</comment>


The Apple Watch pays for itself if you make more than $23,500/year - <AUTHOR> http://rogueleaderr.com/post/113241632623/if-you-earn-23-500-year-the-apple-watch-pays-for

<comment><USER2> Well, I guess I have some work to do then :(</comment>


Making Sure the Next Zuckerberg or Gates Stays Put at Harvard - <AUTHOR> http://allthingsd.com/20120127/making-sure-the-next-zuckerberg-or-gates-stays-put-at-harvard/

<comment> steve-howard > The irony of the pair of legendary entrepreneurs dropping out — decades > apart — of the even more legendary university to start two of tech most > significant companies, Facebook and Microsoft.

Not only do I not spot irony, I have no idea what that sentence fragment was meant to convey. Somehow I doubt, too, that the reason some wildly successful entrepreneurs dropped out is because they wanted to move to the West Coast.

<comment><USER2> Did you go to Harvard? If you did, you would find it ironic, since Harvard students and alums believe it is the best and smartest place on earth.

I generalize, but only a little.

</comment></comment><comment><USER2> This article misses the interesting commentary, at least on Zuckerberg. The reality is that the capital dynamics in Boston for companies like Facebook were just nothing like those in SV when Zuck moved. They are now arguably worse, I'd say, (although I'm a bit removed, having moved west a few years ago).

It's doubtful Facebook would exist in its current form without Silicon Valley; it was and is something special in the startup eco-system; a small angel fund at Harvard won't change that, even a little bit.

</comment><comment><AUTHOR> This seems like a great idea on the surface but I really wonder if companies like Facebook or Microsoft would have become what they are, if they'd stuck around.

I'm not convinced they would but it'd be nice to be proved wrong.

</comment><comment><USER3> So is the idea here that the next Zuckerberg or Gates would contribute heavily to the Harvard Endowment Fund if they had graduated instead of dropping out?

<comment><USER4> Either that or that they wouldn't have to go through life burdened by the stigma of never having graduated college.</comment></comment>


No Glasses 3D TV from Toshiba - <AUTHOR> http://www.besttechnology.org/2011/09/02/no-glasses-3d-t-v-toshiba/

<comment><USER2> If this is true, it will represent a major development in the 3D world TV battle between Sony and Toshiba. I would like that to be true.</comment>


Notes on Programming in C (1989) - <AUTHOR> http://www.lysator.liu.se/c/pikestyle.html <comment><USER2> > Simple rule: include files should never include include files. If instead > they state (in comments or implicitly) what files they need to have included > first, the problem of deciding which files to include is pushed to the user > (programmer) but in a way that's easy to handle and that, by construction, > avoids multiple inclusions. Multiple inclusions are a bane of systems > programming. It's not rare to have files included five or more times to > compile a single C source file. The Unix /usr/include/sys stuff is terrible > this way.

> There's a little dance involving #ifdef's that can prevent a file being read > twice, but it's usually done wrong in practice - the #ifdef's are in the > file itself, not the file that includes it. The result is often thousands of > needless lines of code passing through the lexical analyzer, which is (in > good compilers) the most expensive phase.

> Just follow the simple rule.

This is a ridiculous stance, in my opinion.

Part of the appeal of libraries is _abstracting_ away implementation details. I want to be able to have foo.h #include a hash table, or a binary search tree, depending on #ifdef's or its internal implementation. The user of foo.h shouldn't even have to know about it.

Compilers can easily memoize the position and parsed content of preprocessor directives, and do a very quick skip of an #include file, as a much better way to resolve the problem.

Rob's resolution is an instance of worse-is-better: Instead of slightly complicating the lower-level tool (in this case, the preprocessor), let's complicate all user code in existence.

<comment><USER3> All Plan9 C programs are written in this way. Paradoxically the number of includes in your code is minimal compared with the usual POSIX aproach. All C programs begin with two includes: u.h and libc.h and usually libio.h and it is often all you need for the startdard library.

The man pages of the libraries describe the libraries you need to include.

Example:

Plan9 cat: [http://plan9.bell- labs.com/sources/plan9/sys/src/cmd/cat.c](http://plan9.bell- labs.com/sources/plan9/sys/src/cmd/cat.c)

GNU cat: [http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f...](http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/chcon.c;h=32d4b0f8b7aa98830ec6404c83801c5115f29854;hb=HEAD)

Plan9 du: [http://plan9.bell- labs.com/sources/plan9/sys/src/cmd/du.c](http://plan9.bell- labs.com/sources/plan9/sys/src/cmd/du.c)

GNU du: [http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f...](http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/du.c;h=890edb64c31a41fdd0bf9a3f24607369c436928f;hb=HEAD)

<comment><USER4> Why do all the P9 files use `void main` instead of `int main`?

<comment><USER3> Yes. Instead of returning an integer you use the function exits [1] and the value appears in the shell variable status.

[1] [http://plan9.bell-labs.com/magic/man2html/2/exits](http://plan9.bell- labs.com/magic/man2html/2/exits)

This is an introduction to programming in Plan9 C:

[http://doc.cat-v.org/plan_9/programming/c_programming_in_pla...](http://doc.cat-v.org/plan_9/programming/c_programming_in_plan_9)

</comment></comment></comment></comment><comment><USER5> It's interesting to see how some of these opinions are reflected in Go, because Rob Pike helped design Go about 20 years after writing this essay:

Typography: Automatic formatting is part of the standard Go tooling and culture.

Function pointers / Protocols: This section seems to be decsribing a technique similar to Go's interfaces.

Include Files: Rob Pike talked about this in his presentation at SPLASH [1,8:00-12:30]. He mentioned that Plan 9 had fast compile times in part due to following this discipline. He contrasted that with one of Google's C++ code bases in which the compiler had to read 2000 bytes for every byte of source. That was largely because of includes, and was a problem for compile times. A little later he talks about Go's method of importing dependencies, and presents them as a big improvement to the situation.

[1][http://www.infoq.com/presentations/Go- Google](http://www.infoq.com/presentations/Go-Google)

</comment><comment><USER6> Nice list of books they have in their library: [http://www.lysator.liu.se/lib/boklista.txt](http://www.lysator.liu.se/lib/boklista.txt)

</comment><comment><USER7> " Procedure names should reflect what they do; function names should reflect what they return." \- Never thought about naming this way, but is what I do (:</comment>


How to Use (and Create) Open Source Libraries in XCode 4 - <AUTHOR> http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

<comment><USER2> Compiling libs in XCode (for iOS) is an exercise in tediousness. Far easier is just to write a few lines of Make. <https://gist.github.com/895945> (will also lipo together cross-builds)

Also here's something that will set up configure for an autotoolized project. <https://gist.github.com/895946></comment>