Dependency injection is not a virtue - <AUTHOR> http://david.heinemeierhansson.com/2012/dependency-injection-is-not-a-virtue.html <comment><USER2> Am I the only one who finds this post confused and unnecessarily mean? Roughly, the post goes like this:

        1. DI is bad, mkay?
        2. Ruby offers the best alternative to DI.
        3. BTW, programmers *are* their languages.
        4. Hence Ruby programmers are the best. QED.

What is odd is that #3 is offered almost as an aside, with nothing more than a link to the wikipedia article on "linguistic relativity" for support, and yet it poisons this post and turns it into a mean-spirited rant. It makes the entire post a personal attack on anyone who dares to disagree with it's assertion.

This is not okay! I happen to dislike DI even more than the OP, but to _attack people_ on a personal level for liking it is just plain mean, and unnecessarily so.

When you assert the identification of self with technology preference, you reenforce a damaging idea that has no merit, which is indeed the very idea that ensures that such discussions often have more heat than light.

Shame on you, David, for using your position to promulgate an idea that is not only useless, but actively damaging to the community of programmers.

<comment><USER3> I'm not sure where you're getting #4 from. While dhh might actually believe Ruby programmers are the best, this post does not say or even imply that.

He's saying that sometimes a design pattern isn't universal to every language. You need to shape your thinking to the language you're using.

In general, I'd say that's a good thing to keep in mind (disregarding anything specific about DI from that post).

</comment></comment><comment><USER4> Testability isn't the only good thing about dependency injection. It's much easier to reason about OO code when objects only tend to interact with objects that they have been explicitly given. Too much willingness to introduce static dependencies increases the risk of creating classes with too many collaborators and/or responsibilities. This is a good example of how a testable design is often also a just plain good design.

Sure, the given examples of "Time.now" or "new Date" are innocuous and I agree that it's a good thing that Ruby allows us to write this type of code without creating a testability issue. But too many people abuse static dependencies for things like database connections which are:

1\. well-suited to being represented as proper objects that are passed around

2\. better off confined to a small area of the codebase

This is a complex issue and there's a delicate balance that needs to be struck. Otherwise you can end up with a codebase where a few classes are all up in everyone else's shit. That's when you find yourself in embarrassing situations such as some code not working without a database connection even though there's no real need for that beyond the tangled web of static dependencies chaining it to the database class.

</comment><comment><USER5> Calling out DI is a bit of a misdirection as most have come to know DI I think.

What he's really arguing against here is more basic: Composition.

Pragmatically the examples makes some sense. Why not stub out any global like this though? Because it breaks encapsulation and makes the program harder to understand.

Instead of lifting dependencies up to the level of method parameters with good composition, now you have to truly grok the entire method before you can have any confidence you even know what to stub out, and wether that's actually going to produce the expected results.

So while I fully endorse this specific, localized, easy to understand example, the poor composition of many Ruby libraries is what tends to make working with Ruby code so damn hard (IMO, see: Bundler). It's not enough to read method signatures. There are no explicit interfaces. Only implicit ones you devine by understanding the full breadth and scope of how parameter A is used in method B, all the way down the stack trace.

Fundamentally here DHH isn't talking about "Dependency Injection". He's talking about Composition and a pragmatic example of breaking Encapsulation. While sure there are 101 ways in which breaking Encapsulation can be a useful, pragmatic technique to employ for the seasoned code-slinger in the small, in the large it makes for more difficult to understand, and therefore less maintainable code.

I find many of these recent posts by DHH a bit ironic considering the subtext of a guy who read the PoEAA, then went off and wrote an MVC web-framework, packed with a nice Table Data Gateway, then proceeded to confuse Unit for Integration tests, and soap-box on the evils of Design Patterns in general.

[EDIT]

PS: The obvious example for making it easy to test, without breaking encapsulation, would simply be to avoid globals and use a default parameter.

      def publish!(current_time = Time::now)
        self.update published_at: current_time
      end

TA-DA. So trivial examples might show how a very shallow example of monkey- patching can be a nice convenience, you also have simple "fixes" that actually take _less_ code to implement.

You could easily come up with deeper stacks, presenting more difficult problems, but then you're not really making a great case for the beauty and simplicity of monkey patching if I have to have such a deep understanding of the side-effects in your code before I can even start making sense of your tests.

<comment><USER6> I don't like adding that parameter at all. When someone else comes across your method, will they know whether #publish! is meant to have a changeable time in real use? You don't want test-specific functionality leaking into real code.

<comment><USER7>
        def publish!(current_time_TEST_USE_ONLY = Time::now)
            self.update published_at: current_time_TEST_USE_ONLY
        end

Another way to do it (what I do) is simply run the test, and compare obj.published_at to Time::now. If they differ by more than 100ms, something has gone terribly wrong (if you use Ruby, maybe replace 100ms with 1s).

<comment><USER8> the perfect recipe for a flaky test!

<comment><USER9> If you have to do this, you could check that the published time was >= the time at which you started the test, and <= the time at which you are doing the check.

</comment></comment></comment></comment></comment><comment><USER10> I'm sure my opinion is in the minority here, but all the pages and pages of blog posts that we have collectively created to rail against various design patterns seem like we're just trying so hard to justify bad programming practices.

I don't know ruby so the example given wasn't exactly clear, but it seems like you're able to (temporarily I hope) override the method Time.now to return specifically what you want. While that certainly seems reasonable for testing purposes, I would hate to have that kind of stuff happen in production code. The fact that methods can be overridden at any point in such a manner is a detriment to predictability, on the level of the longjump statement itself. It's hard for me to believe that people actually advocate this stuff as a "good thing".

Yes its true that dependency injection is a substitute for missing language features, namely modifying private data or globally scoped objects at any point. This is a good thing! Dependency injection allows you to have the same power while still giving you the predictability that truly private scope brings. If the cost of this is a few extra lines of code and some indirection in the form of interfaces, I'd say it's well worth it.

<comment><USER11> _"Yes its true that dependency injection is a substitute for missing language features, namely modifying private data or globally scoped objects at any point. This is a good thing!"_

The very fact that there are globally scoped objects is an abysmal failure. That there are private data whose state can change "by magic" is also a major defect.

There are much more functional ways to deal with such issues and some people are starting to see the light.

And of course watching people argue over globally modifiying what a function does or modifying by injection what is basically a global var is a bit like watching a blind and a one-eyed argue over who can see better ; )

<comment><USER7> _That there are private data whose state can change "by magic" is also a major defect._

It's only a major defect if it changes "by magic" in a way that breaks things, i.e. if the magic stuff can actually affect the result of your tests.

Consider internal state like a cache - this is harmless. It might magically change, but that shouldn't affect your output.

</comment></comment></comment><comment><USER12> There is a camp in Ruby that thinks monkey-patching (extending or modifying behavior at run time) is a great feature and defining characteristic of the language that should be exploited.

There is also a camp that thinks it is powerful, but dangerous and makes it harder to reason through a program (since your objects can be changed out from under you).

If you put yourself into the mindset of the pro-monkey-patch camp, it is easy to see how DI comes across as an over-engineered solution to a non-problem.

One thing I am finding more and more important is to try to understand the perspective of the author of a given blog post. While it is more difficult to do (since no one puts a disclaimer stating their views at the top of the posts), it ultimately helps to improve my understanding of competing arguments and how they can align with the problems I face in my own projects.

It is okay to come to the conclusion that an argument is not right or wrong in the absolute sense, but right or wrong for me and my work at the given time.

<comment><USER13> Use monkey patching in tests, never in production.

Monkey patching _is_ fragile, but in tests, who cares? If it breaks, you see why and you fix it. Tests don't have to be held to the same level of reliability as production code.

<comment><USER12> "Tests don't have to be held to the same level of reliability as production code"

I personally take issue with that statement. If your tests are not reliable and robust, you will stop trusting them. At the point, why even have tests if you cannot trust them to verify correctness of your program (or at least increase your confidence that the program is not broken)?

<comment><USER14> _If your tests are not reliable and robust, you will stop trusting them._

This seems to be the paradox in much advocacy of strategies like TDD. We start with the premise that our code is likely to contain bugs. In order to detect those bugs, we write a lot of tests, perhaps doubling the size of our code base. Now, we can do whatever we like to the production half of our code base, as long as our tests in the other half all continue to pass when we run them, because magically that testing half of our code base is completely error-free.

<comment><USER15> That's not TDD. You define the expected behaviour first (which still can be wrong, now or in the future - they're based on your current assumptions/spec/other mutable thing), then ensure the code produces output that matches your expectations. Your output is now as correct as your understanding of the solution.

<comment><USER16> Your output is still only as correct as your specification of your initial assumptions.

For example, lets say you make a mistake in your test so you are checking (result = expected_result), which is always true, instead of (result == expected_result). Now when you write your code, you run the test and it passes.

In this case your code may or may not be correct, and the test, which contains a bug, does not catch it. But the bug is not a fundamental misunderstanding of the problem, rather a simple mistake in writing the test. Following strict TDD doesn't prevent this.

<comment><USER12> "Following strict TDD doesn't prevent this"

Actually, following strict TDD does prevent this.

You must see a test fail before you make it pass. It goes "Red -> Green -> Refactor" not just "Green -> Refactor". Even if a valid test case passes on the first time, one should modify the test (or the code) in a known way to cause an expected failure.

Your premise (tests are only as correct as the spec of initial assumptions) is correct, but your supporting example is not.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> This article is just so biased and full of odd opinions.

"If your Java code has Date date = new Date(); buried in its guts, how do you set it to a known value you can then compare against in your tests? Well, you don't. So what you do instead is pass in the date as part of the parameters to your method. You inject the dependency on Date. Yay, testable code!"

Seriously? I've never seen things done in this way, ever. The correct way is to have a TimeSource interface and forego the direct use of Date. Simple. At this point it feels like the author's premise of the article has been invalidated.

I don't like using the terms DI or IoC. I prefer to talk about "composition" and "componentisation". Because those are the real goals. Testing is almost a secondary concern in this regard, it is just a nice side affect and bonus of writing well designed software. The primary reason for designing your software in the style of composition and componentisation is for the separation of concerns and the achievement of all the SOLID principles. But let me guess, Ruby hipsters think those are bad too huh?

As an interesting note, I once went to a Hacker News meetup in London and not a single one of the Ruby developers I spoke to even knew what DI or IoC were. Most didn't even know what static typing was either. Or even type inference. This is not really a good sign of a healthy community.

</comment><comment><USER18> His recommended solution prevents parallelizing your unit tests. Dependency injection is not just testable globals. It's about declaratively defining what global-ish things your class depends on.

You also don't need to provide the date as a parameter to your methods. You can make the class depend on a clock. A clock is a natural thing for a service to depend on, and clearly indicates to outside users that the class needs to know about time.

If it isn't a service, and you're updating some sort of entity, then why should the entity figure out the current time itself? The model should just record that I updated such and such field at such and such time. If it's the current time, that's someone else's responsibility.

<comment><USER19> > His recommended solution prevents parallelizing your unit tests.

How so?

<comment><USER20> Because monkeypatching is global. It shouldn't require more than a moment of thought to realize this...

<comment><USER19> Eh, Ruby doesn't do well with parallelism anyway. If you're running your tests in parallel, you're usually running them in different processes. Or on different machines entirely. Either way, monkey patching one of those processes won't affect other ones.

Besides, if there is a testing library that runs multiple tests in parallel in the same processes (which maybe there is and I'm just not aware of it), making your mocking library smart enough to handle that, isn't difficult. Stubbing only for a particular thread, for instance.

<comment><USER18> Yeah, ruby doesn't do well with parallelism, and if you want parallel tests, you're probably doing it in separate processes, because the ruby community chooses to completely ignore everything that's known about how to write code that behaves well in parallel because "eh, I don't do it, so it must not be important".

</comment></comment></comment></comment></comment><comment><USER21> Dependency injection subjugates readability and simplicity of data flow for a narrowly defined notion of testability. Even in languages like Java, it's possible to substitute class definitions for mocked ones without having to thread a weird sort of test monad through code that otherwise serves a purpose.

I pretty fundamentally disagree with making production code more complex to make unit tests easier to write. Make the tests more complex instead and think about the natural units for testing. Maybe the natural unit for testing isn't exactly one class.

This is counter to the conclusion of the article: it's true one shouldn't force Java idioms on Ruby but also if the Java idiom doesn't translate well, maybe it's a bad programming idiom in general.

<comment><USER22> Fair, except that DI in Ruby is pretty dang simple.

        def some_method(dependency = SomeClass.new)
          dependency.do_something
        end

I'd argue that injecting the dependency gives you even more expressiveness and improves readability since you now can name the dependency whatever you want (assuming you give your variables meaningful names and think it's a good thing).

Sandi Metz really does the topic justice in her talks on SOLID design: [http://www.confreaks.com/videos/240-goruco2009-solid- object-...](http://www.confreaks.com/videos/240-goruco2009-solid-object- oriented-design)

</comment></comment><comment><USER23> "In languages less open than Ruby, [...]."... It's better to not use a metric so vague and ambiguous as "open" to introduce your opinion post.

</comment><comment><USER13> Amen. Same goes for Objective-C: dependency injection simply isn't needed when you can swizzle out any method (including +alloc) in tests.

</comment><comment><USER24> "Design patterns are missing language features."

<comment><USER25> Yes, I wonder what language features monads as a pattern to solve certain problems are a replacement for.

</comment></comment><comment><USER26> Languages shape the way that you think:

And so this is just killer to my mind. Time.now is an impure effect and should be isolated so that testing can occur easily in the pure code.

</comment><comment><USER27> I'm not as familar with Java, but in C# you can use "shims" to accomplish this same result, without DI.

[http://www.peterprovost.org/blog/2012/04/25/visual- studio-11...](http://www.peterprovost.org/blog/2012/04/25/visual- studio-11-fakes-part-2/)

<http://msdn.microsoft.com/en-us/library/hh549176.aspx>

<comment><USER28> The View Model has a dependency on a repository that is injected in via constructor injection. I don't think you understand what DI means.

<comment><USER27> Shims do not require DI, ViewModels, or Repositories. The second link from MSDN explains this in more detail.

The first one just uses those things in their test examples, but they are not required to use shims.

Here's an example:

        // Make DateTime.Now always return midnight Jan 1, 2012
        ShimDateTime.NowGet = () => new DateTime(2012, 1, 1);

</comment></comment></comment><comment><USER29> The thing is, unit tests are another "use case" for a given piece of code. Many people here are saying, "I wouldn't do monkey patching in production, but it's not really a problem for stubbing in test code." And what happens when you want to make different use of that code in production? Sure, "YAGNI, rewrite as necessary" and so on, but ruthlessly applying YAGNI leads to code so inflexible that you need to rewrite a whole component to make a change in one class (or start playing with monkey patching in production code, but I have not seen anyone advocate doing that liberally).

</comment><comment><USER30> Adding function parameters solely for testing purposes is bad. However, poorly-designed functions are often difficult to unit test.

I don't know the entire backstory, but it appears someone wrote a _publish!_ method that took a _publish_time_ argument that was only intended to be used in testing. The problem is that the original code didn't properly support some _publish_time_ values.

This is a good example of the library vs. framework distinction. Frameworks favor opinion over composition.

</comment><comment><USER31> "Dependency Injection" Considered Harmful: <http://www.natpryce.com/articles/000783.html>

</comment><comment><USER32> "If your Java code has Date date = new Date(); buried in its guts, how do you set it to a known value you can then compare against in your tests? Well, you don't."

You don't if you aren't testing your code properly. If you are, one option is PowerMock.

whenNew(Date.class).withNoArguments().thenReturn(someDateWeKnowAbout);

</comment><comment><USER33> When looking at code, I like to separate design-time concerns from runtime ones. Tests are a design-time affair, and if you are substantially altering the run-time composition of your application to accommodate such things, the approach is likely wrong.

</comment><comment><USER34> I can't be bothered talking about DI much, because it's a non-issue. Use it if it's appropriate. You use ruby? Big deal. You're not special; if there's a situation where DI is helpful, use it. If not don't. This isn't a complicated idea.

I was mildly interested in the idea that 'language shapes the way we think'.

My initial response was: WAT? O_o

After all, there are some pretty detailed criticisms of the idea ([http://www.quora.com/What-are-the-main-criticisms-of- Whorfs-...](http://www.quora.com/What-are-the-main-criticisms-of-Whorfs- theory-of-linguistic-determinism-and-relativity)), and that's just with actual languages that we think and talk in, not programming languages.

After thinking about it for a bit, there's some basis for this idea, perhaps.

You see, the central idea of whorfianism is basically:

\- Your language affects the type of mental constructs you use.

\- People with different mental constructs behave differently.

So for example (classic example), if you have a language with no concept of sub-day time units, you'll end up with a society that isn't fussed about punctuality. "Turn up in the afternoon"; ok, I'll do that. No need to ask "what time?" because your virtual model doesn't break your calendar up into hour sized blocks; just into day sized ones.

It's a believable theory. There's a great book about this topic (<http://en.wikipedia.org/wiki/A_Man_Without_Words>) which broadly speaking supports the idea that language is basically a set of representative symbols we use to model concepts.

The issues up for debate is really, to what extent does language influence behaviour, compared to, for example, other factors. That's a _much_ harder question to answer (and as yet unresolved I believe).

 _Now_

The idea that a programming language can do that?

Well.... it's not totally rubbish. I mean, software doesn't exist in the real world; to work on it at all, we have to create a mental model of it.

So it's conceivable that our language provides us with symbols to conceptualise the code we work on, and so we'll behave in a different way if we have different models.

For example, if you have a deep understanding of assembly and lower level programming languages, your model will have more _stuff_ in it, compared to the model of someone who only knows a high level language, whose model will drop down to 'black box' components when it gets down to a certain level.

...and I can totally believe that makes a difference to how you write code.

This applies, however, only to _concepts_ (aka. words, aka. representative mental symbols) and _not to programming languages_.

See, this is the issue; your _domain knowledge_ helps inform how you generalize and problem solve. That's what ruby is. It's a knowledge domain.

I'm extremely dubious that it provides _novel concepts_ that you don't get from any other programming language. Perhaps in that its a dynamic language it gives a few different ones, to say, that a C++ programmer might have, but broadly speaking:

 _You are not a unique and special snowflake because you use ruby_

...or python. or C++. Or scala. Or C. Using a different programming language _DOES NOT_ change the way you think.

Learning new words and concepts in your existing language (ie. the one you _speak_ ) does that. And sure, using a language with new concepts will teach you those new concepts. Like DI for example, that's a _concept_.

...but "I'm a ruby programmer"?

Just go away. You're an idiot.

</comment><comment><USER35> At the risk of being offensive, I've always felt that this "design patterns" cargo cult is Revenge of the Not-Nerds. The people who couldn't hack the harder CS classes because of all the math are striking back with something designed to be as incomprehensible to us as mathematics was to them.

Take the Visitor pattern. I mean, really? I already know how to work with trees. Lisp is all about trees. Ocaml lets us build tagged-union types and pattern match to our hearts' content. Do we really need to dickshit the program with _Visitor_? WTF does that even _mean_? Who is visiting and why? Is this the French meaning, where to "visit" someone is patronize a prostitute? (In French, you "pay a visit to" someone, or _rendre visite à quelqu'un_. You don't "visit" your sister.)

The design patterns cargo cult is horrible. It has such a "how the other half programs" smell about it that I cannot shake the belief that it was designed to make us Smart People pay for something. Anyway, how can it be "best practices" if I can't REPL the code and make function calls and see how the fucking thing works? If you can't interact with the damn thing, you can't really start to understand it, because it's almost impossible to understand code until you know what you're looking at. IDEs just give people a false sense of security about that.

Personally, I like functional programming because it has _two_ design patterns: Noun and Verb. Nouns are immutable data. Verbs are referentially transparent functions. Want side effects? You can have them. Those are a separate class of Verbs: Scheme denotes them with a bang (e.g. set!) and Haskell has them in the IO monad. Real-world functional programming isn't about intolerantly eschewing mutable state, but about _managing_ it.

Now, I'll admit that mature codebases will often benefit from some solution to the Adjective problem, which is what object-orientation (locally interpreted methods instead of globally-defined functions) tries to solve. OO, at its roots, isn't a bad thing. Nor is it incompatible with FP. The Alan Kay vision was: _when complexity is necessary_ , encapsulate it behind a simpler interface. That's good stuff. He was not saying, "Go out and build gigantic, ill-defined God objects written by 39 commodity programmers, and use OO jargon to convince yourselves that you're not making a hash of the whole thing." No, he was not.

<comment><USER36> The real use case for the visitor pattern is to simulate multiple dispatch in a language that only has single dispatch. In a language like Java, if you want to traverse a tree where each node can be a different type, you don't really want to use a series of if-statements for every single type, so the visitor pattern is used in this case. The visitor pattern allows you to use method overloading instead for each different type instead.

<comment><USER35> Why do you need all this complexity in order to do that?

I feel like one of Java's problems is that these design patterns have taken it away from the language's intended design. It wasn't intended to be a dynamic language. Most of Java's ugliness is an extremely incompetent Greenspun's Tenth Rule: solving of problems where the solution is "use a different language, like Clojure or Scala".

There are occasions where Java and C++ are the right languages to use, but most of the time when people are using these over-complex frameworky solutions, it'd be much more elegant to use a different language, and the code would be more legible.

<comment><USER37> Mentally rewriting the beginning of your last paragraph to "Sometimes Java or C++ is the right language to use, but most..." made it make considerably more sense to me.

As it stands, I think the double-aren't is colloquial or a mistake; I honestly couldn't follow the meaning of the overall triple-negative. :) Not trying to be a jerk - I love reading your stuff, but I spent more than a minute thinking about that sentence before just guessing it from the rest of what you said.

<comment><USER35> Good catch. It was a mistake. Two or four negations would have been semantically correct (if ugly). Three is wrong.

</comment></comment></comment></comment></comment><comment><USER11> It's an anti-pattern. It's a workaround for a serious language defect.

I've written my own DI back in the days (way before Guice existed) but...

Using DI is just a glorified way to have "globals".

One better solution in TFA's example is to pass a high-order function whose "functionality" is to provide the time.

Wanna _unit_ test? Pass in a modified function giving back the time you want.

That's just one way to do it.

DI is a fugly beast disguised as "good practice" but it really ain't. It complicates the code and is basically a hack allowing to more or less be able to test non-functional code. Really sad.

\-- _"Patterns means 'I've run out of language"_

<comment><USER38> But passing in a function providing the time is a form of "dependency injection". It is a shitty name for the practice, but that's at least one way I saw the term "dependency injection" used.

<comment><USER39> This may be completely left field, but are you the same Peaker from #programmers on DALnet years ago?

<comment><USER38> Yeah, many years ago...

<comment><USER39> Ah cool, I was foozy... Hit me up with an email by picking any word at my username .org :)</comment></comment></comment></comment></comment>


Ubuntu Font By Daltoon Maag Is Out - <AUTHOR> http://www.omgubuntu.co.uk/2010/09/new-ubuntu-font-lands-in-maverick-for-all-users/

<comment><USER2> I extracted the TTFs from the package, if you want to try them on other platforms: [https://docs.google.com/leaf?id=0B4NmQa1UbwBCOGMzN2U3ZjItOTI...](https://docs.google.com/leaf?id=0B4NmQa1UbwBCOGMzN2U3ZjItOTIwYy00ZmYyLTg1NzItZGZkNzQzYjZlNGQ2&hl=en)

</comment><comment><USER3> Package for download:

<http://packages.ubuntu.com/maverick/ttf-ubuntu-font-family>

<comment><USER4> I came here for this, thank you.

</comment></comment><comment><USER5> Screenshot of the font used as body text on Wikipedia: <http://imgur.com/912V0>

<comment><USER6> I like it, nice and clean.

<comment><USER7> I'm not sure how I feel about the lower-case f, but I love how the l, i, and j are all easily distinguished from one another, and the font looks generally pretty darn pleasant.

</comment></comment></comment><comment><USER8> I'm studying Japanese now, and I wish it got the same love. One high quality sans-serif libre font would be enough. I guess most non-Latin character sets suffer as well.

<comment><USER9> It's a work in progress. As far as I know they are planning to extend it to support more scripts.

I am also very much looking forward to a monospace version.

<comment><USER10> Another vote for seeing a monospace version.

</comment></comment></comment><comment><USER11> Kind of weird that font.ubuntu.com doesn't just offer .ttf files or other easy downloads.

<comment><USER7> Apparently they're still polishing up the font, so the Ubuntu guys offer it as a package for easy upgrading. That's my guess at their reasoning, anyway.

<comment><USER9> That's correct. They even considered delaying a release like this because it's not 100% finished and they didn't want too many versions of the font in the wild.

</comment></comment></comment><comment><USER12> What is the license for this font?

<comment><USER5> "UBUNTU FONT LICENSE Version 1.0": <http://gist.github.com/601425>

<comment><USER12> Thank you! Was that listed somewhere on the linked font.ubuntu.com site?

<comment><USER5> Not that I saw. It's in the .tar.gz available on the package linked by zeemonkee.

</comment></comment></comment></comment><comment><USER13> Totally Awesome!</comment>


Mixing many USB web cams on the cheap for a robot drum machine - <AUTHOR> https://github.com/Sonicrobots/madcam/

<comment><USER2> some things that made me sad when reading this github:

> One USB Host can theoretically take up to 127 client, but we found out only > 1-2 Cameras per host controller work without glitches and missing frames.

and you didnt realize what is the real reason (not the limit of 7 bits address field in USB protocol)? No one bothered to do a simple calculation 640x480x2x30 per camera? :( btw USB 2.0 in reality is able to sustain ~40MB/s, hence 2 cameras at 30Hz max per controller = ~37MB/s.

>PCI can process less data then PCIExpress, so it is best to build your system on PCIe cards

PCI is ~130MB/s, plenty for 6 cameras, again no numbers

Of course you could simply find cheap cameras with building mjpeg compression and avoid adding external usb controller cards - Great source for cheap camera modules is laptop service parts. For the last 10 years USB webcams have been standard in laptops. Example ebay auction

[http://www.ebay.com/itm/Macbook-iSight-Camera-replacement- fo...](http://www.ebay.com/itm/Macbook-iSight-Camera-replacement- for-A1342-/381214713303)

ISight supports:

MJPEG 640×480 @ up to 60fps

MJPEG 720×480 @ up to 60fps

MJPEG 800×600 @ up to 30fps

MJPEG 1024×576 @ up to 30fps

etc ...

and all of a sudden we have <3MB/s per $3 camera.

</comment><comment><USER3> I recently tried researching how to mix/record not so cheap cameras on a PC/Laptop/RasPi analogue. Remarkably tricky, because of the data rates involved. So far I have not seen a single affordable, open source compatible solution for "just" taking hdmi signals in. At least not for 1080p.

I have modest hopes that such controllers might show up in the next years, maybe using USB 3 technology. There is also a Raspberry Pi module "in the works", which may be capable of at least streaming compressed 1080p from HDMI, but I'm not holding my breath.

<comment><USER4> Was this the module you were looking at?

[http://www.auvidea.com/index.php/theme- styles/2013-06-22-21-...](http://www.auvidea.com/index.php/theme- styles/2013-06-22-21-23-34/raspberry-pi-hdmi-in)

I'd heard the GPU was getting better docs, and I wondered if it would help handle this.

<comment><USER3> According to the site the board is already in production, but there is no further indication on when or where to buy. I don't think GPU docs will help enough. And then there's the issue of a completely new RPi2 SoC to consider...

<comment><USER2> Gpu docs wont, but videocore docs would, sadly Broadcom is hostile and will most likely never release low level stuff, same goes for mipi dsi LCD interface.

Pee2 uses same videocore, only difference is CPU IP.

</comment></comment></comment></comment><comment><USER5> This reminds me of the wonderful (but overly complex) Microsoft DirectX DirectShow framework. I suspect similar functionality exists there out-of-the box:

[https://msdn.microsoft.com/en- us/library/windows/desktop/bb9...](https://msdn.microsoft.com/en- us/library/windows/desktop/bb970394%28v=vs.85%29.aspx)

</comment><comment><USER6> "The bottleneck here is the USB Host controller. One USB Host can theoretically take up to 127 client, but we found out only 1-2 Cameras per host controller (PCI / PICe card) work without glitches and missing frames."

Ouch. That's disappointing, but I suppose unsurprising. I wonder if USB 3 fares any better here than USB 2.

<comment><USER7> The bottleneck is probably just the 480 Mbps of the bus itself. Each camera requires (30 fps) * 640 * 480 * (1 byte/pixel in bayer mode) * (8 bits/byte), about 72 Mbps. With various overheads, you shouldn't expect to get more than 2 working on a 480 Mbps bus.

There almost no buffering on the camera. Standard cheap USB cameras have only 1 or 2 scan lines of memory onboard, so they need to deliver a scan line every 70 uS or it gets lost.

<comment><USER6> 2 x 72 Mbps leaves a theoretical 336 Mbps of bandwidth lost to overhead, which seems pretty bad, even for USB. But I realize that dealing with multiple simultaneous streams is a harder problem than just raw bandwith.

Your point about the scan lines is interesting. I wonder if the drivers for your typical webcam can deliver partial frames, or if they need to capture a full set of scanlines in order to not drop the frame.

<comment><USER7> I just looked at a driver I wrote several years ago. Each pixel is actually 2 bytes, luma and chroma. So it's 144 Mbps per camera. The scan line packets don't have any indication of which scan line they're from, so if you miss one you'll have the rest of the frame shifted up. I imagine reasonable drivers might drop the whole frame rather than show such an ugly artifact.

There is indeed a lot of overhead on USB. Each packet has to be requested by the host which polls each source round-robin.

<comment><USER8> couldn't USB use a GSM-like model instead? with specific timeslots?

<comment><USER7> USB does have a reserved bandwidth mechanism, called isochronous pipes. However, it's complicated and implementations tend to be buggy so it's not popular except for audio devices.

In any case, it won't help trying to stream more bandwidth than the bus supports.

</comment></comment></comment></comment></comment></comment><comment><USER9> It's nice to see some real-world IPv6 web hosting beyond the usual Google and CloudFlare:

[http://bgp.he.net/dns/sonicrobots.com#_ipinfo](http://bgp.he.net/dns/sonicrobots.com#_ipinfo)</comment>


Obama Promises Disappear from Web - <AUTHOR> http://sunlightfoundation.com/blog/2013/07/25/obama-promises-disappear-from-web/ <comment><USER2> I see this as largely coincidental, and nothing nefarious. If you follow the link from the page to the archived version [1], look among the dozens of subjects, click on Ethics, scroll down to near the bottom of the page, you'll see the single paragraph he's referring to. It makes up for about 0.1% of the total content. It's unlikely the administration took down an entire website just to hide Obama's whistleblower promises.

What's more likely is that that, since Hope/Change was the old slogan and "Forward" has replaced it as the new slogan, it's time to take down the old site because it's simply outdated.

C'mon guys let's show a little critical thought and stop looking for conspiracies where they don't exist. It's bad for our credibility. Things are bad enough as it is with the stuff the NSA is _actually_ doing.

[1] [http://web.archive.org/web/20130515024407/http://change.gov/...](http://web.archive.org/web/20130515024407/http://change.gov/agenda/)

<comment><USER3> I have a fool-proof way to test your retarded theory: (and I call it retarded only because its the best word in the modern human lexicon to discuss such topics of self-delusion)

Why don't we make a non-stop replaying channel of all the ridiculous bullshit propaganda campaign promises that Obama (and all other campaigning politicians) tells us, for everyone to see. Make it time-stamped, tagged, listed, searchable and correlated to their current actions - let people vote comment and review all things said.

After all - are we not for open-source code, which allows us to review for bugs and malicious code?

We need open-source politics that allows for the same.

<comment><USER4> What do you think the wayback machine is? As for calling other posters retarded (and a poster who is generally on the same side as you on these issues, at that) - don't.

<comment><USER5> > _What do you think the wayback machine is?_

A generic, difficult to navigate, seriously lacking in content, website?

Nothing at all like what he said, except the "archives old webpages" part.

</comment></comment></comment></comment><comment><USER6> This is a simple discovery, but an important one. Change.gov was the President's official transition website, and included a vision for his presidency. It's a central piece of the historical record of the US, and they yanked it from the Internet.

It doesn't matter whether or not the Administration was trying to remove something specific: taking down the content at Change.gov is un-American and un-Internet.

<comment><USER7> I'm curious. What's un-American about it?

I can see the whole "un-internet" aspect, becuase after all "cool urls don't change", but un-American?

<comment><USER8> In theory, the shared narrative of America is rooted in Enlightenment values, including a respect for reason, education and history. The lack of a proactive attempt to preserve that history, let alone to erase it intentionally, goes against the principles of the Age of Reason.

In practice, obviously, this story is at best an ideal we strive for, and that we only achieve partially or intermittently.

<comment><USER7> Ah I see what you mean, though the argument could be made that people treat the internet like casual verbal communication. There's nothing to preserve because its supposed to be ephemeral.

</comment></comment></comment></comment><comment><USER9> I wrote about this 31 days ago: [https://news.ycombinator.com/item?id=5933806](https://news.ycombinator.com/item?id=5933806)

But is this news surprise to you??

We needs to focus on jobs and middle class and stop wasting time on phony scandals!!

[1] [http://dailycaller.com/2013/07/24/obama-repeats-carneys- phon...](http://dailycaller.com/2013/07/24/obama-repeats-carneys-phony- scandals-line-in-economy-speech/)

This comes after:

\- IRS scrutinizing and unconstitutionally profiling people while spending $5MM on "trainings", shutting down operators due to gov cuts while giving contractors 80MM in bonues? phony scandal!!

\- 4 US Officials dead in Benghazi almost 1 years ago, no answers, no credibility (people in charge promoted) phony scandal!!

\- 1 US Official dead, hundreds of people dead mostly on Mexico soil after DOJ's Fast And Furious mismanage? phony scandal!!

\- DOJ spending time on possible civil lawsuit against Zimmerman, while since the tragedy at least 600 murders done by one race on another in Chicago alone. phony scandal!!

\- NSA spying on all americans and foreginers intercepting all possible traffic illegally unlawfully and unconstitutionally? phony scandal!!

\- Salandra: hundreds of millions given without proper checks to Presidents friends? phony scandal!!

</comment><comment><USER10> I think this is sensational, but it got me looking around the archive[1], and it's a pretty good read.

\--

Improve Intelligence Capacity and Protect Civil Liberties

* Improve Information Sharing and Analysis: Improve our intelligence system by creating a senior position to coordinate domestic intelligence gathering, establishing a grant program to support thousands more state and local level intelligence analysts, and increasing our capacity to share intelligence across all levels of government.

* Give Real Authority to the Privacy and Civil Liberties Board: Support efforts to strengthen the Privacy and Civil Liberties Board with subpoena powers and reporting responsibilities. Give the Board a robust mandate designed to protect American civil liberties and demand transparency from the Board to ensure accountability.

* Strengthen Institutions to Fight Terrorism: Establish a Shared Security Partnership Program overseas to invest $5 billion over three years to improve cooperation between U.S. and foreign intelligence and law enforcement agencies.

\--

He f'ing nailed 2 of those.

[1] [http://web.archive.org/web/20130425003939/http://change.gov/...](http://web.archive.org/web/20130425003939/http://change.gov/agenda/homeland_security_agenda/)

<comment><USER11> Don't forget this one:

* New Capabilities to Aggressively Defeat Terrorists: Improve the American intelligence apparatus by investing in its capacity to collect and analyze information, share information with other agencies and carry out operations to disrupt terrorist networks.

<comment><USER12> This is what blows my mind about some of these people. They act as though Obama said he was going to legalize weed, stop all wars, and turn America into an orgyistic utopia. When in fact he basically did what he said he was going to do: be a hawk on foreign policy in a more intelligent way. Rather than getting involved in long, drawn out ground wars he resorts to drones and things like stuxnet.

</comment></comment></comment><comment><USER13> One man's terrorist is another man's freedom fighter.

Whistleblowers are frequently viewed by people who disagree with them as whiners, complainers, disgruntled people with axes to grind, and frequently they are all those things, often with nothing more than circumstantial or spurious claims.

Not everyone's a Snowden.

<comment><USER14> > One man's terrorist is another man's freedom fighter.

That quote also means that the man is still a terrorist.

<comment><USER15> only as a function of the observer

</comment></comment></comment><comment><USER16> So just to be clear, President Obama's staff took down a transition website that was primarily a link to whitehouse.gov, and this is somehow a scandal because of one of many campaign promises included on the site?

Sure, I guess it could be some sort of conspiracy, but it's equally possible his staff wanted to consolidate web presence. The title on the other hand, implies some direct connection to the whistleblower segment, which has no supporting evidence.

<comment><USER17> Well, it _did_ happen two days after the first Snowden revelations. What support for "web consolidation" have you found to continue to correlate them as "equally possible" in light of that timing?

</comment></comment><comment><USER18> "When one knew that any document was due for destruction... it was an automatic action to lift the flap of the nearest memory hole and drop it in, whereupon it would be whirled away..."

</comment><comment><USER19> You know, ending the mass surveilling would be a huge achievement on its own (probably by repealing the Patriot Act and the FISA Amendments Act) - but what I'd really like is to get so much support from the people and the Congress, to eventually impeach him. Now _that_ would remain in history, and would teach future presidents a lesson about overextending themselves with the spying. Obviously people like Alexander, Clapper and Holder would be gone in the next second, too, and the FISA Court disbanded.

<comment><USER20> Alexander is an extremely powerful, dangerous man. His removal should first priority.

<comment><USER8> While I agree, is there any reason to expect different behavior from a replacement?

Even scarier than a single corrupt tyrant, or even a cabal of "shadow government" figures, is the possibility that these institutions have taken on a life of their own, independent from any one actor.

[http://omniorthogonal.blogspot.com/2013/02/hostile-ai- youre-...](http://omniorthogonal.blogspot.com/2013/02/hostile-ai-youre- soaking-in-it.html)

</comment></comment></comment><comment> mkr-hn Regular civics reminder: the Executive is supposed to be the weakest of the three branches of government when it comes to domestic issues. If you want a president who's decent at his/her job (foreign affairs, proposing policy), but don't want him/her meddling with domestic affairs, elect a better congress.

This means actually going out to vote in primaries and main elections at the city, county, state, and federal level. All of these determine how much influence and power the federal government has, and whether or not they're doing a good job.

It's true that finding useful information on most candidates is impossible at the moment, but that's solvable.

</comment><comment><USER21> So his supporters are right. He does keep his promises.

...

By slowly removing the ones he hasn't kept from the list.

<comment><USER22> Too bad people save pages offline. That does not go unnoticed nowadays.

</comment></comment><comment><USER23> We have always been at war with whistleblowers.

<comment><USER24> What about the "change we can believe in"?

<comment><USER25> I dunno.

Pretty sure we've always been at war with Eastasia.

[http://en.wikipedia.org/wiki/Nineteen_Eighty- Four](http://en.wikipedia.org/wiki/Nineteen_Eighty-Four)

<comment><USER26> I think we're passed the point where someone on the internet needs to clarify they made a _1984_ reference.

</comment></comment></comment></comment><comment><USER27> How likely is it that the pre-pres Obama was as-advertised, but he's now operating with top-level knowledge about the US's place in the power struggles of the world? And that knowledge pushes him to act against some of the friendlier statements he's made in the past?

Could the strength of the US WRT China (for example) be on a knife-edge that warrants the back-pedalling we're seeing?

<comment><USER12> No no no, you see. He should spend 100% of his time caring about the issues _I_ care about! Forget foreign policy, the economy, a woman's right to choose, equal pay for women, gay rights, gun control, medicare, social security, and immigration. These issues don't concern little old _me_. I can't be bothered to judge him on multiple issues to come up with a nuanced view of the job he is doing. Removed his transition election website? Corporate fascist political shill!

</comment></comment><comment><USER28> I agree with the first commenter on the link. This is quite a reach. It's unlikely that the order to take down an old, unmaintained site would have come from someone who's in on some sinister agenda to revise history.

<comment><USER29> It's not really a reach when you realize how things like this really occur:

It got emailed around or something, and someone who was close enough to a WH staffer or DNC person saw it, and send it along.

They asked their boss what to do, and the answer was "just change the website".

It's not like there was some ordered plan of "first we'll change this, then we'll change the transition site". It's clearly a reactive move to someone noticing, and they didn't expect it to blow up.

The reason it blew up is equally simple. Somewhere in the forward chain, someone was close to sunlight, and sent it to them. The original story was going to be "obama promises things about whistleblowers, breaks his promise", but once it got removed from the website, the much juicier story of "obama revises historical promises" came along.

This is how a lot of things in DC get noticed. There are hundreds of staffers and DNC people and what have you. They also likely have a fairly low degree of separation to someone who would notice this, ...

</comment></comment><comment><USER30> This section of the site has been removed and "revised" before, notably in 2008: [http://thecaucus.blogs.nytimes.com/2008/11/18/changes-at- cha...](http://thecaucus.blogs.nytimes.com/2008/11/18/changes-at-changegov- return-of-the-agenda/?_r=0)

</comment><comment><USER31> All animals are equal, but some animals are more equal than others.

</comment><comment><USER32> Change I'm forced to believe in.

<comment><USER33> Nobody forces you to believe in it. Some people must bear the consequences of too many people choosing to believe in it, though.

</comment></comment><comment><USER34> Throughout the years of my life I have learned of certain inalienable truths. The fact that politicians are not trust-worthy is one of them.

<comment><USER35> And yet we continue to give them more authority to control our lives as though they were our "better angels".

Politicians are no better than we are. Often, they are worse since a strong desire to control others is often what puts them on the political track.

Obama said the other day, "The government is us, and we're doing things right"

HUH?!

If the government is us, then why are we spying on ourselves? Why can't we get any answers about the NSA spying, the IRS scandal, Benghazi, or even the Fast and Furious gun running scandal?

If we are the government, then we're kind of masochistic.

</comment></comment><comment><USER36> Can't someone just file a FOIA request to get a copy of the entire website?

(Just in case archive.org or other archivers missed some of it)

<comment><USER9> Watching US Government since Obama took over, I would rather imagine US gov going after archive.org, first nicely sending C&D, then with help of IRS thoroughly auditing all archive.org employees' files, then if that doesn't help, ask DHS and take over their site and plaster it with nice eagle logo with "DHS seizure" notice on it.

Edit: oh yes we are still in country of freedom and democracy. Archive.org would be welcomed to sue the government; you guys just prepare yourself for couple years of tough fight and make sure you got couple mil in bank for legal fees; oh and of course you cannot operate your site until you get the judgment that you were right and we were wrong, but even then we will appeal and after another couple years, IF and IF supreme court decides on case against us, then we will still put the file under internal "review" (read: put it on hold for couple more years) and then what are you going to do?? Its not like Eric Holder will prosecute... Enric Holder to release your domain back to you.

</comment></comment><comment><USER37> Well? He promised "change," didn't he? It changed.

</comment><comment><USER38> About this time there occurred a strange incident which hardly anyone was able to understand. One night at about twelve o'clock there was a loud crash in the yard, and the animals rushed out of their stalls. It was a moonlit night. At the foot of the end wall of the big barn, where the Seven Commandments were written, there lay a ladder broken in two pieces. Squealer, temporarily stunned, was sprawling beside it, and near at hand there lay a lantern, a paint-brush, and an overturned pot of white paint. The dogs immediately made a ring round Squealer, and escorted him back to the farmhouse as soon as he was able to walk. None of the animals could form any idea as to what this meant, except old Benjamin, who nodded his muzzle with a knowing air, and seemed to understand, but would say nothing.

\-- George Orwell, Animal Farm

</comment><comment><USER39> There's something seriously wrong with the entire political system when every single person here is like 'well yeah, he's a politician'.

"Those who seek power are not worthy of that power."

</comment><comment><USER40> From NSA to prosecuting reporters for...well...reporting, it is quite clear that one Obama ran for office and a different one actually took office. They are trying to get rid of all the evidence of the many misrepresentations he made in order to get elected, probably so that the next round of Democrats running for office aren't also seen as liars and hypocrites.

</comment><comment><USER41> Just because you deleted your promise from the web, it does not annul it. A man who does not keep his word (regardless of price) is no man, but a [insert the C word here].

</comment><comment><USER42> In France we have a saying about politicians' promises: "Les promesses n'engagent que ceux qui les écoutent.", ie. " Promises are binding only to those who listen to them.". It must be a good thing they try to erase them from the web.

LOL

</comment><comment><USER43> All animals are equal, but some animals are more equal than others.

</comment><comment><USER44> We've always been at war with whistleblowers

</comment><comment><USER45> And that is why you fail.

</comment><comment><USER46> ~Protect Whistleblowers: Often the best source of information about waste, fraud, and abuse in government is an existing government employee committed to public integrity and willing to speak out. Such acts of courage and patriotism, which can sometimes save lives and often save taxpayer dollars, should be encouraged rather than stifled. We need to empower federal employees as watchdogs of wrongdoing and partners in performance. Barack Obama will strengthen whistleblower laws to protect federal workers who expose waste, fraud, and abuse of authority in government. Obama will ensure that federal agencies expedite the process for reviewing whistleblower claims and whistleblowers have full access to courts and due process.~

Ouch.

<comment><USER47> A classic psychopathic behaviour. Blind your victim with carefully spun web of lies. Distort the reality and then when the time comes, abuse them.

Psychopaths are so good at lying that they self-deceive themselves. They believe their own lies. That's why it's so easy to fall for what they say.

They always fly to the top - be it at corporations, governments, crime organizations. The more psychopathic they are, the higher they get.

<comment><USER48> The fact that psychopaths and Obama share certain characteristics does not prove that Obama is a psychopath. Yet people continue to suggest that he is, citing the incongruent logic that overlapping characteristics imply equality.

The fundamental problem is not people's flawed logic, but the psychological diagnostic tests. Psychologists broadly categorize most disorders because they cannot find a reliable symptom that also acts as evidence of a disorder. That is, there is no symptom that definitively allows psychologists to say "Patient exhibits Symptom X. Therefore, patient has Disorder Y."

Contrast this to "biological" diseases like viruses or cancers. They exhibit _physical_ evidence as symptoms. Doctors can detect the physical presence of a virus or a cancer. The evidence they find serves both as a symptom and evidence of their diagnosis. Thus, medical doctors can precisely define diseases by their symptoms.

Unfortunately, psychologists are not afforded such luxury. Yet many of them act as though they are. This is how we end up with severe misdiagnoses. We need to be aware as a society of how this affects us.

<comment><USER49> ITT: Armchair psychologists confuse "psychopathy" and "sociopathy".

The tops of government and business exhibit the signs of sociopathy, not psychopathy.

Psychopaths _generally_ exhibit many behaviors that makes them fundamentally unsuited for public life, such as poor behavior control.

Sociopaths, on the other hand, have just the right mix of anti-social tendencies to turn their empathy on for the crowd, and off while making decisions that affect millions negatively.

<comment><USER50> If you're really a trained psychologist; in what diagnostic system do these categories even exist? Surely not ICD or DSM?

<comment><USER51> Outside the public consciousness, the term's only real professional use is limited mainly to some forensic psychologists because of the criminal justice system's rather peculiar requirements of psychology. Given the hoops it requires they bend through, I wouldn't look towards FP for diagnostic guidance. Robert Hare as well, but personally I tend to think of his work is sophomoric at the best of times and idiotic at the worst . He's also (in my opinion) a world-class prick, having used legal action to prevent the publishing of a critical paper that had already made it through peer review:

[http://www.scientificamerican.com/article.cfm?id=critique- of...](http://www.scientificamerican.com/article.cfm?id=critique-of-forensic- psychopathy-scale-delayed-by-lawsuit)

But that's neither here nor there.

Anyhow, setting aside the lack of any diagnostic definition for either term, _sociopathy_ has never been anything more than a synonym preferred by certain individuals. But if we're looking for some point of differentiation, one of the main reasons to prefer one synonym over another was to try and emphasize causation by social factors. Certainly not some sort of empathy switch.

Generally speaking, that confusion is part of the problem with both terms. They carry a lot of baggage and pop-psych definitions, but sorting through the muck and deriving some sort of diagnostic criteria is an exercise in futility.

</comment></comment></comment></comment></comment></comment><comment><USER52> If this surprises you well then, you are as dumb as they come

</comment><comment><USER53> Shocking!</comment>


Agloe, New York - <AUTHOR> https://en.wikipedia.org/wiki/Agloe,_New_York <comment><USER2> John Green, the author mentioned in this wikipedia article, has a TED talk that talks about Agloe: [https://www.ted.com/talks/john_green_the_nerd_s_guide_to_lea...](https://www.ted.com/talks/john_green_the_nerd_s_guide_to_learning_everything_online?language=en)

</comment><comment><USER3> One quick FYI: the OP links to the Agloe's entry in the U.S. Geographic Names Information System database. The database is available as a bulk download here:

[http://geonames.usgs.gov/domestic/download_data.htm](http://geonames.usgs.gov/domestic/download_data.htm)

It's a fairly large (2.2M rows) and handy data file that can be used to extract geo-coordinates and metadata for U.S. geographical features, i.e. cities, states, counties, parks, even cemeteries, in lieu of hitting up a geocoder.

<comment><USER4> Also note that it is messy (duplicates and rough locations) and contains many historical features that have not yet been marked as such.

</comment></comment><comment><USER5> For fans of Jorge Luis Borges, he has a short story that covers similar thematic ground: [https://en.wikipedia.org/wiki/Tl%C3%B6n,_Uqbar,_Orbis_Tertiu...](https://en.wikipedia.org/wiki/Tl%C3%B6n,_Uqbar,_Orbis_Tertius).

</comment><comment><USER6> Sleepy Hollow, NY didn't exist until after the Headless Horseman was written.

<comment><USER7> The modern Village of Sleepy Hollow only got its name in 1996 - before then it was called North Tarrytown. But it is certainly the place that Washington Irving was writing about and the Old Dutch Church still stands there.

</comment></comment><comment><USER8> Recently I found this non-place on Google Maps: Lake Fail, Texas.

[https://email@example.com,-97.7345006,17z](https://firstname.lastname@example.com,-97.7345006,17z)

<comment><USER9> What do you mean? I went on Street View and there is clearly a body of water there..

[https://firstname.lastname@example.com,-97.7351451,3a,75y,10...](https://email@example.com,-97.7351451,3a,75y,104.97h,86.08t/data=!3m7!1e1!3m5!1sdtnWQVOj3EbLEWTRho_Xgw!2e0!6s%2F%2Fgeo1.ggpht.com%2Fcbk%3Fpanoid%3DdtnWQVOj3EbLEWTRho_Xgw%26output%3Dthumbnail%26cb_client%3Dmaps_sv.tactile.gps%26thumb%3D2%26w%3D203%26h%3D100%26yaw%3D33.038887%26pitch%3D0!7i13312!8i6656)

<comment><USER8> Sure, but do you really think it's called "Lake Fail"? It just looks like a drainage pond.

</comment></comment></comment><comment><USER10> Happy birthday, this topic: [https://news.ycombinator.com/item?id=8500217](https://news.ycombinator.com/item?id=8500217)

</comment><comment><USER11> ...In that Empire, the Art of Cartography attained such Perfection that the map of a single Province occupied the entirety of a City, and the map of the Empire, the entirety of a Province. In time, those Unconscionable Maps no longer satisfied, and the Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and which coincided point for point with it. The following Generations, who were not so fond of the Study of Cartography as their Forebears had been, saw that that vast map was Useless, and not without some Pitilessness was it, that they delivered it up to the Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is no other Relic of the Disciplines of Geography.

</comment><comment><USER12> "In Alexandria Drafting Co. v. Andrew H. Amsterdam dba Franklin Maps,[6] the court ruled that "fictitious names may not be copyrighted" and "the existence, or non-existence, of a road is a non-copyrightable fact".[7]"

== side note to this story

</comment><comment><USER13> This reminds me of the story of the Brazilian aardvark [http://www.newyorker.com/tech/elements/how-a-raccoon- became-...](http://www.newyorker.com/tech/elements/how-a-raccoon-became-an- aardvark)

It is a nice reminder that the things we think of as "official" were once made up by someone. Indeed, that is all language and culture is! We just happen to agree upon them.

</comment><comment><USER14> I first learned about Agloe via this beautiful little record (CC BY-NC-SA). No affiliation but I figured I'd plug it here.

[http://jkirkpearson.com/album/the-curious-appearance-of- aglo...](http://jkirkpearson.com/album/the-curious-appearance-of-agloe-ny)

</comment><comment><USER15> The map is not the territory...

[https://en.wikipedia.org/wiki/Map%E2%80%93territory_relation...](https://en.wikipedia.org/wiki/Map%E2%80%93territory_relation#.22The_map_is_not_the_territory.22)

</comment><comment><USER16> doesn't look like it's on OSM - should that be fixed? :) [http://osm.org/go/Zc3OxgB0-](http://osm.org/go/Zc3OxgB0-)</comment>


Swift imports fixed-size C arrays as tuples - <AUTHOR> https://oleb.net/blog/2017/12/swift-imports-fixed-size-c-arrays-as-tuples/ <comment><USER2> Another example of stupidity around the term "tuple": it was not supposed to have a _sequence_ , it was supposed to have a _structure_. The previous such dumb thing was (and still is) in Python.</comment>


Modern media is often wrong, vapid, and easy to manipulate - <AUTHOR> http://thenextweb.com/video/2013/05/11/american-apparels-ryan-holiday-rails-against-the-media-says-its-broken-and-about-page-views/?fromcat=all

<comment><USER3> PR gaming aside, I'm always a bit horrified when I read a general media story about something that I know a lot about (like, say, computer programming) because the articles are often a very superficial treatment of the subject while trying to not seem so superficial, and in a lot of cases they are either so simplified that the information they present is misleading or in some cases they are just spouting completely incorrect nonsense in a soothingly authoritative tone.

The reason I am horrified is not because I'm offended that they don't understand computers, but because I realize that the articles that they write in fields I'm _not_ intimately familiar with are almost certainly equally stupid sounding to people who are, and thus I'm likely woefully misinformed on a great many things.

<comment><USER4> From [http://www.goodreads.com/quotes/65213-briefly-stated-the- gel...](http://www.goodreads.com/quotes/65213-briefly-stated-the-gell-mann- amnesia-effect-is-as-follows-you), a quote by Michael Crichton:

" _Briefly stated, the Gell-Mann Amnesia effect is as follows. You open the newspaper to an article on some subject you know well. In Murray's case, physics. In mine, show business. You read the article and see the journalist has absolutely no understanding of either the facts or the issues. Often, the article is so wrong it actually presents the story backward—reversing cause and effect. I call these the "wet streets cause rain" stories. Paper's full of them.

In any case, you read with exasperation or amusement the multiple errors in a story, and then turn the page to national or international affairs, and read as if the rest of the newspaper was somehow more accurate about Palestine than the baloney you just read. You turn the page, and forget what you know._"

Nowadays I only follow the conventional media to know what they think is important, since that drives a lot of important things.

</comment></comment><comment><USER5> The main problem is not that it's easy to dupe an individual journalist. This can never be completely avoided, and making it less easy is a solvable problem.

The big red warning sign is the lack of corrections. This shows how little the media actually cares.

It's like a web service being hacked and having their plain-text passwords exposed, and openly and blatantly refusing to improve their security practices.

And unlike most other industries, there's no force to correct them. Democracies are understandably reluctant to regulate media strongly, and exposing this problem is traditionally the role of... the media.

Other than the business model falling apart because people are no longer willing to pay for media, they are untouchable.

<comment><USER6> What's more, should any power try to correct this, it's in the hand of the media to demonize this power in the public eye. We are currently living such a situation in Argentina, where the greatest agglutinant of the opposition to the current government is Clarin, the greatest media group of the country.

</comment></comment><comment><USER7> My own experience shows this on both sides of the issue. I have been involved in some local government issues and it's easy to get coverage in local media by just sending a press release out to a few dozen contacts. They rarely (if ever) do any fact checking. That's not to say that I make things up. In fact, that's the other side of the issue. I pride myself in researching local government issues through the use of the Freedom of Information Act, and then compiling that information into something the media would be interested in.

The flip side of the coin is that if I release some FOIA data and then the reporter goes to the government entity for a comment, the government representative will often times make things up or just lie about the facts. The local reporter just takes that person at his or her word, despite the fact that I have produced documentation directly from that government agency which contradicts its talking head.

It's become clear that local reporters (for the most part) don't do any independent research. They regurgitate AP reports or whatever they're told. Most reporters have no expertise or clue about what they're reporting on.

One sign of this degradation in local (and national) media quality to watch out for: online articles that are composed entirely of paragraphs that are one or two sentences each. Here's one randomly chosen example: [http://www.cnn.com/2013/05/11/justice/texas-explosion- probe/...](http://www.cnn.com/2013/05/11/justice/texas-explosion- probe/?hpt=hp_t2)

<comment><USER8> Part of the problem is the internet has taken a lot of the money out of local news. They don't check things because they don't have time. Where I live all the local papers, which were going bankrupt, were bought by a conglomerate and 90% of the staff was laid off. They're more like stenographers than reporters, and it's not their fault, either. They simply do not have the time to do anything buy bounce from one story to the next, getting the facts mostly right. Nothing that's the slightest bit complex or subtle gets the treatment it would have a decade ago.

</comment></comment><comment> UVB-76 It's all about incentives. Most major news organisations are private, for- profit entities. Profit is the primary incentive.

What turns a profit? High-brow commentary written by proper journalists, that only a small subset of your readership will fully understand and appreciate, or photos of the latest Hollywood B-list celebrity doing something embarrassing, churned out en masse by pseudo-journalists whose only qualification is being able to plagiarise content without being detected, generating far more page views and ad revenue?

<comment><USER9> In Denmark we have "denmarks Radio" which is basically a state owned tv, web and radio media outlet whose purpose it is to educate the populace. This changes the incentives, because the income is from the state whose goal is to have educated and smart voters, not to make money on headlines. I believe the BBC works in a similar fashion, and it shows in their news coverage.

<comment><USER10> In Croatia we have national tv and radio. If you own a TV set or radio you are obliged by law to pay a monthly fee. This in theory means that they should be objective and impartial. However, the top heads there are appointed through political connections. So they're mostly a propaganda machine for the political parties in power. Since the politicians here are only puppets in the service of big money and foreign power, their agenda is mostly to serve their interests. Except for some small independent web sites (such as advance.hr), all other private newspapers and sites sell cheap infotainment, often poorly translated articles from english and american yellow-press.

</comment></comment></comment><comment><USER11> Ok, you can spoof media. But the real manipulation happens in the selection of topics that become newsworthy. Only the - for the target audience - <USER2> sensational happenings are 'reported'. This sensational funnel is inherent to the system and much more manipulative than any individual and deliberate forgery. BTW, Hacker News also works this way. By giving readers the ability to immediately respond it creates at least some counter balance to the sensational funnel.

</comment><comment><USER12> Modern media? This is at least as old as 1928. Take Edward Bernays (the "father of modern PR" <http://en.wikipedia.org/wiki/Ed_Bernays>), whose book "Propaganda" said things like: "There are invisible rulers who control the destinies of millions. It is not generally realized to what extent the words and actions of our most influential public men are dictated by shrewd persons operating behind the scenes. Nor, what is still more important, the extent to which our thoughts and habits are modified by authorities."

And: "For this reason there is an increasing tendency to concentrate the functions of propaganda in the hands of the propaganda specialist. This specialist is more and more assuming a distinct place and function in our national life."

Does awareness immunize you? "Undoubtedly the public is becoming aware of the methods which are being used to mold its opinions and habits. If the public is better informed about the processes of its own life, it will be so much the more receptive to reasonable appeals to its own interests. No matter how sophisticated, how cynical the public may become about publicity methods, it must respond to the basic appeals, because it will always need food, crave amusement, long for beauty, respond to leadership.

"If the public becomes more intelligent in its commercial demands, commercial firms will meet the new standards. If it becomes weary of the old methods used to persuade it to accept a given idea or commodity, its leaders will present their appeals more intelligently."

A terribly amusing read, from a pre-computing programmer of people. (<http://www.whale.to/b/bernays.pdf>) When guys like Ryan Holiday talk about the "modern media", they're stirring nostalgia for lost days of yore — which didn't exist. At least not in the timeframe they seem to imply.

 _[Disclaimer: I'm only halfway through the video before writing this. I'll be embarrassed if he delves into the 20th century history in the latter half. And keep in mind that "Propaganda" had a more neutral connotation then. Later, it got associated with the Nazis, who were actually inspired by the success of US propaganda.]_

<comment><USER13> Actually, in the book I go much earlier. Upton Sinclair wrote a book of media criticism in 1912 that was the genesis for my theories. Yellow journalism predates Bernays by more than a few decades.

<comment><USER12> Thanks, I'll get a copy of your book. BTW, you might be interested in the work of media historian Bob McChesney (<http://en.wikipedia.org/wiki/Robert_W._McChesney>), if you haven't checked it out already.

One thing he argued is that before professional journalism, the media was much like today's blogs; everyone knew their content reflected the owner's biases. Then with the consolidation of newspapers (due to economic reasons), to the point where a city might have only a couple dailies, overt bias "stank like old fish", so professional journalism arose. (And journalism schools along with it.) With it came a neutral-sounding objective tone, which hid a number of biases (like what's covered — and what's not, reliance on "official sources" who are elites, and so on). But of course, the content reflects the owners and advertisers' general interests, as we'd expect from media corporations which like staying in business.

Given that, I'd wonder if good, carefully-researched professional journalism is more insidous than yellow journalism. I'll look more closely at your (and Sinclair's) work.

<comment><USER13> He wrote the intro to the republished edition of The Brass Check believe it or not.

(But to address your other point, it may be. Chomsky's media criticism focusing heavily on this)

<comment><USER14> In a recent interview, Chomsky expressed ambivalence about the propaganda model that became so successful with _Manufacturing Consent_. It seems that he disagrees somewhat with the analysis of media content as a function of corporate interests, but is uncomfortable saying so too bluntly because it was largely the work of his friend Ed Herman. Chomsky's real opinion is that economic interests alone can't explain why intellectuals overwhelmingly serve power, since many intellectuals hold safe positions (e.g. in academia) that aren't subject to corporate bosses. I got the impression that Chomsky sees media propaganda as a special case of this more general pattern which he considers more fundamental. Don't have the link handy but can dig it up if anyone cares.

<comment><USER12> Do you have this in mind? ([http://www.youtube.com/watch?v=O0D0E42AA4I&t=22m18s](http://www.youtube.com/watch?v=O0D0E42AA4I&t=22m18s))

Some context: ([http://www.youtube.com/watch?v=O0D0E42AA4I&t=16m30s](http://www.youtube.com/watch?v=O0D0E42AA4I&t=16m30s))

<comment><USER14> Yes! Thanks.

The whole interview is worth listening to if one can tolerate the (at times considerable) douchiness of the interviewer.

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> This trend has a significant impact on Wikipedia, which relies on press coverage to determine what articles are suitable for inclusion, and what "facts" can be used for Wikipedia articles.

Press coverage tends toward the sensational, visual, beautiful, controversial, current, language-specific, and easily explained. If a topic doesn't meet those criteria, it probably won't be covered by the press -- unless the topic in question has some well-connected PR firm or publicist pushing for it.

<comment><USER13> It goes the other way around too. Most reporters and bloggers get their basic facts from Wikipedia. So it's a feedback loop. Wikipedia frames reporting which can then be used to "support" or cite that very same framing.

Almost every public figure has seen some inaccuracy from their Wikipedia page come up in a news story or an interview at one time or another.

<comment><USER16> XKCD explains this effect quite nicely, I think: <http://xkcd.com/978/>

</comment></comment></comment><comment><USER17> Does anyone else find it strange that the page containing this video also has a "send anonymous tip" link, which claims "we don't track anything, not even your ip address."

And of course the headline "modern media is often wrong, vapid, and easy to manipulate" is a little more sensational (and click generating) than, say, "Ryan Holiday claims some media outlets have biased incentives"

Which leads me to the amusing possibility that Ryan Holiday did not actually do those things, but is manipulating the media into thinking he did, which of course would prove his point.

</comment><comment><USER18> These days there's also less time to verify facts.

</comment><comment><USER19> Extremely interesting, thanks!</comment>


Spotiwhy? : Are Subscription Music Services a Sustainable Business Model? - <AUTHOR> http://www.musicthinktank.com/blog/spotiwhy-are-subscription-music-services-a-sustainable-busin.html <comment><USER2> So the author says they are, up to a point, and assuming they get significant penetration. But it's based on an average listening rate of 2.5 hours a day, which is apparently what an average american teenager listens to. I'd have thought the average american teenager probably has the highest music listening rate of any demographic. I know my own usage would be closer to an hour on the days I queue up music, but that would be only every other day at best.

If that is closer to the average listening habits, then the royalty per stream calculations end up over 5x more profitable and above the magical 1 penny/play mark.

<comment><USER3> Not necessarily. I'm a programmer (not a teenager anymore), and I listen to music almost all the time while working, which is definitely more than 2.5h per day. Of course I might be an outlier, but as streaming gets more popular and easier to use, more people would listen to it in the background, like radio.

<comment><USER4> Thats what I thought of, but then I looked up average radio listening hours, and they seemed to be about 0.2 hours per person (UK figures). So I think you may still be an outlier.

<comment><USER5> Yes, but, _radio_ listening hours? Probably the under-30 demographic only listens to the radio under duress. My knowledge of this is anecdotal only, but other than w/r/t exceptional cases (NPR, highly curated college stations), there's perceived generally to be near zero incentive to listen to the radio by everyone in my peer group or behind my peer group in generational terms (I'm thirty). On the other hand, those same people seem more or less wedded to other forms of consumption (digital music players, pandora, etc). Listening when exercising, listening in the car, listening when appropriate at work, listening while cooking dinner, listening during coitus, etc. etc.

</comment></comment></comment></comment><comment><USER6> Very nice breakdown and analysis of the business model.

I too agree that assuming 2.5 hours per day on average is a stretch. I generally listen to more than that, but i'm fortunate enough to have a job where I listen to music while working. Most people don't get to do that very much.

</comment><comment><USER7> Subscription music services are my preferred way of consuming music. I had a Zune subscription for over two years (eventually cancelled when I lost my Zune and just started using my iPhone... Zune's big weakness was its hardware exclusivity), and I signed up for Spotify premium as soon as I could. I like sub models because I am paying for music, I can get whatever music I want (almost... bands like Arcade FIre don't license their music to these services I've found) whenever I want, and the actual data is well-manicured in terms of metadata.

<comment><USER8> Rdio has Arcade Fire. Strange that Spotify doesn't....

But yeah, I agree, subscription music services are the future. The holdouts (Beatles, Metallica, AC/DC, etc.) will eventually license their stuff, otherwise their fan base will erode. I already think that their tardiness to the digital download party has hurt them already.

</comment></comment><comment><USER9> Subscription music services are as sustainable as the content owners want them to be. Just look at Netflix. The content owners take advantage of the tech and foothold providers have, then eventually squeeze the providers until their own distribution system comes online.

If you don't consider it that way yet, it's coming. The bright side is that eventually "content owners" stop being the major labels and become the actual musicians. This industry is ripe for a wide open distribution market.

<comment><USER10> "The bright side is that eventually "content owners" stop being the major labels and become the actual musicians."

I keep hearing this, but I still don't buy it. Record labels do actually provide a service to artists- generating publicity, scheduling live performances, etc. Don't get me wrong, a lot of them _are_ evil, but an artist is still at a distinct disadvantage if they are labelless. There's a reason why only bands like Radiohead made a splash when they went without.

<comment><USER11> I don't think the argument lies with whether or not record labels provide a valuable service to their artists, they do, but more if the value of their services will remain above their cost. When they were the only distribution game in town, it was a no-brainer as you either distributed through them or you didn't distribute on any meaningful level at all. Now that there are more and more tools and services available to artists that replace some, and possibly soon all of the labels' functionality, the question becomes at what point does their cost outweigh their value?

</comment></comment></comment><comment><USER12> Cost of goods sold for an artist are fixed whether their song is streamed 100 times or 100 millions times. After that cost is recouped, it shouldn't matter much what the rate paid to the artist per stream is. Why are we still clinging to this expectation that artists must be multimillionaires to be satisfied with their careers?

</comment><comment><USER13> I was a Rhapsody user from its inception, maintained an account even when I bought a Zune and got a Zune Pass and now switched the Rdio + Spotify and bought an iPod touch. For me, I consume a lot of music and I want the easiest way to sync my collection to the devices I use -- office, home, portable -- and so, I'll happily pay for that. The alternative before was simply to download it and pay nothing. Physical music is nice but it takes up space, is prone to being lost (I once lost 200+ CDs on a transcontinental flight in my late teens...it sucked. A lot) and I'd prefer the cost of 2 albums a month to hear whatever I want over the cost of buying the media. I'd consume a lot less the other way.

The fact these services have finally hit the mainstream is no accident.

</comment><comment><USER14> Ok, but spotify is available in the following countries as well: Sweden, Norway, Finland, the UK, the US, France, Spain and the Netherlands.

Why not use those as well to calculate the possible yearly revenue?

<comment><USER4> You can do the numbers... The article is about how to model this. Expandi g to the whole world does not change the argument much as you get a bigger pool of artists too. He was comparing off US revenues on eg CD sales. There are still huge national differences in music preferences.

</comment></comment><comment><USER15> I've seen a few discussions of Spotify revenue models, but they all miss the most obvious (to me, at least) comparison: That with radio, which seems to be the closest match. What's the revenue per play per listener there? I'd expect Spotify to compare rather favourably with those.

<comment><USER16> Radio doesn't kill the necessity of owning music the same way as a subscription service. You can't listen to your favorite 10 love songs over and over after a break up on radio. Or the band that your peer group has elevated to exaltation. Radio can plant a song in your brain and you then want to hear it more often thus making you more likely to buy your favorites.

</comment></comment><comment><USER17> A related infographic from last year by David McCandless, "How much do music artists earn online?": [http://www.informationisbeautiful.net/2010/how-much- do-music...](http://www.informationisbeautiful.net/2010/how-much-do-music- artists-earn-online/)

</comment><comment><USER18> The author makes three errors, one of which he stipulates (the he doesn't know the revenue split). The other two are:

1\. Streaming is basically a perpetual source of revenue. If 1 download is equivalent to 200 streams then ask yourself how many times on average does someone listen to a purchased song?

2\. The comparison you should be making isn't to digital music purchasing but to radio royalties. The formulae for this are complicated (flat fees to BMI, ASCAP, etc and then a complex formula after that for distribution to writers but currently not performers, except for Internet "radio").

Of course streaming (renting) earns you less than a purchase.

The recording industry likes to paint this as the artists are getting screwed. And they _are_ getting screwed but not by streaming services. They're getting screwed by the recording industry [1].

Fact is, very few artists can survive on CD sales and digital downloads alone. Most artists survive by performing and even that's being eroded by the recording industry who uses fall guys like Ticketmaster to charge "fees" that fall outside of the revenue split with the artist on ticket sales. The public hates Ticketmaster. Artists hate Ticketmaster. The industry loves Ticketmaster.

[1]: <http://www.techdirt.com/articles/20100712/23482610186.shtml>

<comment><USER19> > _The recording industry likes to paint this as the artists are getting > screwed. And they are getting screwed but not by streaming services. They're > getting screwed by the recording industry [1]._

This isn't an or proposition. Artists are being screwed by both. Yes, the industry takes the lion's share of revenue from artists. That doesn't mean that on-demand streaming services aren't a joke in terms of compensating artists.

And you're wrong about your #2. The comparison should not be made to radio royalties because radio play has been shown to increase sales, since if you want to hear a specific song you heard on the radio, you still have to buy it or sit around waiting for it to come on. People compare Spotify revenue to purchasing because, if your music is on Spotify, there is no reason for anyone to buy it anymore. If it replaces purchasing for most people, the revenue needs to stack up by comparison.

<comment><USER18> That doesn't invalidate my point because curation, which you can argue radio is, and promotion (radio stations are paid to pay particular songs) is still possible with streaming. Just look at Pandora, last.fm, etc.

Also there are different definitions of streaming. The purest definition is where you have to have an Internet connection to listen. There will be various levels of caching involved here. For example, the service might cache the entire song--possibly several songs--to avoid stuttering and service interruptions.

Another model might better be called "cloud management" of music where you have a cloud-like iTunes interface (or even a non-sucky interface) that would sync that playlist to your device for offline listening, something I think iCloud will either be or quickly become.

Bandwidth and service issues are going to make local storage of music a superior solution for some time to come (IMHO).

<comment><USER19> I wasn't arguing for or against the article or your overall argument. I was simply pointing out some issues with two of the things you said.</comment></comment></comment></comment>


The Future of U.S. Military Doctrine Will Be Decided by Technology - <AUTHOR> https://nationalinterest.org/feature/future-us-military-doctrine-will-be-decided-technology-81306 <comment><USER2> Like the German military in WW2, the US military is over-dependent on technology.

It does not matter if your weapons have a kill ratio of 100:1 if the enemy can throw 101 of his crappier weapons at you. In WW2, both the Soviets and the US made huge numbers of 'good-enough' weapons that swamped the small numbers of super-duper technology that the Germans used.

Modern warfare is as much, if not more, dependent on a country's manufacturing capacity than its weaponry. The US does not have the manufacturing capacity in 2019 that it had in 1942. The country with the manufacturing capacity in today's world is China.</comment>