The 'cyber-attack' threat to London's Olympic ceremony - <AUTHOR> http://www.bbc.co.uk/news/uk-23195283

<comment><USER2> This is being portrayed as an exciting story but lets take a step back shall we?

A giant intelligence-industrial facility was set up for what is effectively a large sports-day type event. The opening ceremony was potentially at risk of having lights turned off due to an unspecified and as yet unqualified threat.

The intelligence-industrial complex went into action to qualify the threat and it's clear from the butterflies in stomach moment that they didn't realise it was a false alarm until afterwards.

This tells us a lot about the effectiveness of GCHQ's fibre-splicing 3 day archiving of all Internet traffic, and of the security services' abilities to monitor threats through other means in order to determine whether or not they exist.

In conclusion, it appears that the olympics were chasing their own tails, supported by a giant security state apparatus and couldn't determine whether or not the threat was real, let alone any details about the threat until after the event.

</comment><comment><USER3> I'm not a small-State supporter, but damn these stories could push me over the edge. First we paid for a massive sports event (the cost of which obviously ballooned shortly after winning the bid) which mainly benefited private corporations, then we spent god-knows-how-much to employ people to "defend" the event from a "cyber menace" that didn't even exist; and of course, we also had to put rocket launchers on houses in central London to defend from a "air menace" that also did not exist! And the day after, we woke up without NHS and schools "because we can't afford anything anymore", but god forbid we cut the military-spying complex -- in fact, the beast needs more money because it can "only" save three days of EVERYTHING. Moar data, MOAR!

Disgusting.

<comment><USER4> Or, the event provided thousands of people with jobs, including many builders, civil engineers, rail engineers, software engineers (BBC iPlayer), broadcast engineers and the area around the park now has high-speed internet access, new accomodation, TV studios (that BT have bought cheap for their sports coverage, thus breaking Sky's stangle-hold on some UK sports coverage) and commercial space some are touting as the next Shoreditch (TechHub are looking to set up shop).

As for the military presence, it's debatable about this. Do you deploy the defences and the Spies so you're able to react and protect, should anything occur? Or do you take a chance that something won't happen (like the Boston bombing, 9/11, 7/7, Munich Olympics, Manchester bombing occuring during Euro '96) but if anything does happen, accept that the damage is likely to be much higher (potential many people dying in the worlds spotlight)?

Personally, I'm happy to accept that the people making these decisions are (hopefully) privy to a lot more information than I am and, generally, I'm happy to trust them with my personal safety allowing me to enjoy the worlds greatest sporting event.

Also, general point regarding military spending; Military things are generally so expensive because of all the clever work that goes into designing, testing and building them. Again, think of how many people the 'military machine' employs, all that expertise on rocketry, nuclear physics, cyber skills, communications, etc. As an added bonus, Military organisations, especially spooks, employ a high percentage of natives, so you're effectively giving jobs and money to your direct neighbours, friends and relatives and not some foreign Chinese industrial Goliath.

<comment><USER3> The "spying as stimulus" argument is debatable, considering most of the "spying infrastructure" (and military as well, these days) is still bought from abroad; regardless, it's well known that military spending can be a net positive in economic terms, but do you really want to live in a country where everyone is directly or indirectly hired by the military? That's basically the XX-century Nazi/Soviet model, not exactly the happiest societies around.

Regarding actual infrastructure work: if the target was regeneration, surely it would have been cheaper to build it anyway and just give it away for free, which wouldn't have required a massive (and massively expensive) security effort, all the G4S-style jobs-for-cronies and so on?

Personally, I'd rather see the State undertake real infrastructure work on clear and honest terms, rather than having to wait for some international sport mafia rolling into town so that money can be spent.

<comment><USER4> >Personally, I'd rather see the State undertake real infrastructure work on clear and honest terms

Yes, I agree with this.

"Waste" is the misallocation of resources whereby you don't get as much benefit from choosing A and you would from choosing B. I would certainly rather see money and resources spent on civil engineering projects, like HS2, broadband rollout, CERN, new Motorways than old military technology.

However, tying to sell this to the public is where it gets hard, selling a sporting event seems a lot easier than selling a Nuclear power plant.

>but do you really want to live in a country where everyone is directly or indirectly hired by the military?

This hardly describes the UK, we have an average defence budget that is being cut more and more almost on a daily basis. It's tiny compared to the US.

>considering most of the "spying infrastructure" (and military as well, these days) is still bought from abroad

I'm assuming from your comment you're from the UK, in which case we are that 'abroad'. Defence and cyber engineering is one of our few exports, for better or worse.

<comment><USER3> Unless we manufacture hard drives, I'd say we still buy most stuff from abroad.

And yes, our defence budget is small compared to the US, but looking at how this budget is used in the States, I'd say keeping it small is a good choice: the less bombs we have, the less likely we are of dropping them on random countries (yes we went to Iraq and Afghanistan, but we also pulled out much earlier exactly because of budgetary constraints).

This is the problem with weapons, real or cyber: once you make them, you'll want to use them one way or another.

</comment></comment></comment></comment></comment><comment><USER5> > ... with close to a billion people watching, the impact would have been > enormous.

So what? A billion people might get bored for five minutes and go on a planet destroying rampage? More a reflection of the myopic TV world, where a black screen is a cardinal sin, than any real problem. There would have been no safety issue, since the stadium would certainly have had battery backed emergency lights and exit signs, so the people inside would not have been in pitch black.

It's worth noting that the moving cauldron got jammed for several minutes in Sydney's opening ceremony, in 2000, and the world didn't end. In fact, it was one of the best bits of the telecast, watching the guys underneath furiously belting it with sledge hammers, in an effort to get it moving.

<comment><USER6> Agreed, the idea that whole teams of people were employed to basically prevent the government being embarrassed, and that they view their role as critically important, suggests that the state has grown way to big in the last 100 years or so.

</comment></comment><comment><USER7> If it was possible to turn off the electricity at arbitrary places, then we'd have DDoS-like attacks happening on companies all the time, with foreign attackers demanding cash to keep the lights on.

We don't, so either: it's not that easy, or no one has worked out how to do it yet.

What it _doesn 't_ indicate is that spying on everyone helps at all. What GCHQ _should_ be doing is working with infrastructure providers to make sure all their security software is up to date, deploying things like SELinux (one good thing the NSA has done), doing free pen-testing, advising companies on how to architect critical networks and so on.

<comment><USER8> Not sure about the UK exactly, but in countries I'm familiar with there are specific government agencies and initiatives for assisting critical infrastructure providers. They're doing their best.

The threat isn't _entirely_ hype. Stuxnet basically proved that dropping a grid is do-able.

Not sure how you'd do individual companies, but the power grid as a whole is a lot more fragile than you might think.

The industry is taking things seriously, but there are a lot of problems to sort out. Fixing legacy network architectures takes time, and a lot of critical systems never get patched. That's before you factor in espionage or 0day.

<comment><USER9> "Stuxnet basically proved that dropping a grid is do-able."

Didn't Stuxnet target very specific Siemens SCADA systems, unless our grids all run the same controllers and the same software (which they might well do, I have no idea) - surely an attack like that would be difficult to scale?

<comment><USER4> Yeh, good job Siemens don't make anything to do with power grids.

Oh no... [http://www.energy.siemens.com/hq/en/power- transmission/](http://www.energy.siemens.com/hq/en/power-transmission/) [http://www.energy.siemens.com/hq/en/fossil-power- generation/](http://www.energy.siemens.com/hq/en/fossil-power-generation/) [http://www.siemens.co.uk/en/news_press/index/news_archive/20...](http://www.siemens.co.uk/en/news_press/index/news_archive/2013/siemens- and-bam-awarded-major-transmission-network-framework.htm)

<comment><USER9> Yes, I am rather familiar with Siemens as a company.

What I meant was, how diverse are the control systems for national grids. If they are highly diverse then they are going to be more difficult to target, if they are all the same generation kit from the same vendor then the threat will be higher.

Which one is it?

<comment><USER8> In my limited experience (n = 6) I've not seen the same control system twice. I believe this is because the systems I looked at were built at quite different times. This probably varies a lot between countries.

So your point is valid, but diversity doesn't help if the overall resilience of the grid is so low that attacking a few carefully chosen targets could cause a massive blackout.

</comment></comment></comment></comment></comment></comment><comment><USER10> I heard this non-story puff piece on the radio this morning.

IMHO the Pirate party UK are completely right in thier 140 char summary: "GCHQ tries to win over public detailing how something didn't happen: [http://ow.ly/mKqxw](http://ow.ly/mKqxw) #Olympics plan basically turn it off + on again"

[https://twitter.com/PiratePartyUK/status/354209267877822465](https://twitter.com/PiratePartyUK/status/354209267877822465)

</comment><comment><USER11> It's like something out of an awful techno-thriller, 'evil hackers are going to switch off the power!'. It's a ridiculous, self-promoting fantasy to give the security services something to do, a waste of time and money. If hackers _could_ switch the power off and disrupt this massive ceremony they'd be switching the national grid off at will for fun and profit on a significantly more regular basis. Unless GCHQ just keeps _those_ incidents quiet.

</comment><comment><USER12> GCHQ trying to get ahead of the backlash there.

<comment><USER13> It's pretty funny really, if this is the best PR story they could come up with. The awful threat to national security that GCHQ is saving us from? The lights going off at the Olympics.

<comment><USER14> Makes you wonder whether they can tell who the real enemy is. Dr. No or Dr. Evil ?

<comment><USER2> Neither, it was Dr. Pepper!

</comment></comment></comment></comment><comment><USER15> So don't put the lights on the internet?

I really hope some general has not ordered nuclear missiles to be on the internet.

<comment><USER16> I think they're talking about the power itself, rather than the lighting systems. Although modern lighting systems all run over ethernet I've _never_ come across an installation that wasn't closed-loop (before moving into software engineering I used to work on lighting at live events).

There's a lot of exaggeration in the story. It makes it sound as if the stadium would have been plunged into darkness, when in fact there's significant contingency planning at these type of events around power loss, and there is in nearly all cases a mechanical (rather than computerised) failover.

A far more interesting (I think, anyway) would be an attack on the actual lighting control systems themselves. Like I said, they're running over ethernet on a variety of proprietary and not-so proprietary protocols that haven't had much attention on the security side of things. And yes, they're not connected to the internet, but it wouldn't be too difficult to compromise a lighting unit itself before it was shipped from the rental shop to the stadium.

</comment></comment><comment><USER17> Didn't this happen during the last Superbowl ? Not sure whether they were able to find what caused the power to shut down.

</comment><comment><USER18> I'm not sure I fully understood this article. Was there a threat? And if there ways, they did nothing about it?

</comment><comment><USER19> > "And the first reaction to that is, 'Goodness, you know, let's make a strong > cup of coffee.'"

It was either that or tea.

<comment><USER20> The same stood out to me. Perhaps to the overburdeningly belaboured English aristocracy, who are of course dynastically engaged in ineffectually flippant finger-twiddling, promoting _any_ potential dalliance of discourse toward a careful coffee from the everpresent 'English' tea is their way of implying the _... goodness!_ ... gravity of the situation.

</comment></comment><comment><USER21> Relevant post:

[http://www.theglobeandmail.com/commentary/cyberspace-is- not-...](http://www.theglobeandmail.com/commentary/cyberspace-is-not-a-combat- zone/article13035562/)</comment>


Jeff Dean's Setup - <AUTHOR> https://usesthis.com/interviews/jeff.dean/ <comment><USER2> That photo needs updating.

And I have to remind myself to get a Z620 workstation, perhaps two of them. So compact, so cool.

</comment><comment><USER3> Wish he mentioned his monitor's model.

</comment><comment><USER2> What!!?? No one seems to have head about Jeff. I have.</comment>


Coding On The Web - <AUTHOR>

Hello everyone, I work as a consultant in Savings Investments. I have a high school math education and a Degree in the Humanities. I am quite comfortable with HTML,CSS(which I use for SEO at work) as well as Dreamweaver. Ideally I would like to gradually move my career towards web development. I've been told to get into Javascript. Silly question(one of those with many possible answers),but are there any other key coding skills or languages one should be familiar with,to get started at entry level in the web development industry? Many thanks to Paul Graham and his team for maintaining my favourite site on the Net and to  anyone with a good tip, Regards, Brad. <comment><USER2> There's loads of languages to choose from. Python, PHP, Perl, Ruby, etc. Typically, any language can be used if your server has CGI support, which extremely common, or if it has a module for your desired language.

Hell, from reading his essays, Paul Graham says you can use anything you want, like he and the Viaweb team used Lisp, providing you run your own server.</comment>


Tips for Intermediate Git Users - <AUTHOR> http://andyjeffries.co.uk/articles/25-tips-for-intermediate-git-users

<comment><USER2> Maybe I really am just _that good_ , but only a few of these "tips" strike me as targetted at intermediate users. Most of them seem to me like beginner information...

<comment><USER3> Agreed, though it's still nice to find the odd command or two that slipped through the cracks. I didn't know about these:

$ git log --grep="Something in the message"

$ git log -S "TODO: Check for admin status"

</comment></comment><comment><USER4> "1 Way To Go Against HN Guidelines"

It's a mixture of basic and interesting tips, I'd much rather the interesting tips be separated out; feels like the author was padding the article out for the sake of a title.

<comment><USER5> Was the headline edited after this comment? It seems fine to me now?

</comment></comment><comment><USER6> Tip 12 looks suspicious, at least for the use case given. I'm not wild about storing passwords on a production machine, but if you're going to do it, don't kid yourself that gaining much by hiding it inside git's db.

Still, tip 12 was new to me, so I'd be interested in seeing a better use case.

<comment><USER7> The other thing to keep in mind is that `git gc` may prune loose objects that are created without any references.

"git gc tries very hard to be safe about the garbage it collects. In particular, it will keep not only objects referenced by your current set of branches and tags, but also objects referenced by the index, remote-tracking branches, refs saved by git filter-branch in refs/original/, or reflogs (which may reference commits in branches that were later amended or rewound)." -- <http://www.kernel.org/pub/software/scm/git/docs/git-gc.html>

<comment><USER8> Note that he does add a tag to the object he creates, presumably so it doesn't get collected.

</comment></comment></comment><comment><USER9> Bad name: 25 Tips for Intermediate Git Users

Good name: Tips for Intermediate Git Users

<comment><USER10> Better name: Tips for Beginners to Git

</comment></comment><comment><USER11> Great tips.

Git is arguably one of the best pieces of software created in the past decade.

Its learning curve is definitely steep, but it's exactly tips like these which give a perspective of Git's true power.

<comment><USER12> I didn't find the learning curve to be steep.

The core of git is really simple. If you understand objects, hashes, blobs, trees, commits, then you pretty much know the basic vocabulary and you'll be able to learn more as you go.

This is a really good explanation for these basics: <http://ftp.newartisans.com/pub/git.from.bottom.up.pdf>

<comment><USER13> I think the learning curve tends to be steeper if you have to "unlearn" some of your preconceived notions from using a centralized VCS.

</comment></comment></comment><comment><USER14> How about just trying to unlock all of the git achievements. Do that and you will discover a lot about git.</comment>


"Game Programming Patterns" is now finished - <AUTHOR> http://gameprogrammingpatterns.com/?completed <comment><USER3> Congratulations, Bob!

He had some interesting comments on his writing process in a previous thread entitled, "Write Code Every Day." [1]

He also graciously answered some questions I had regarding his writing workflow, as well as his plans to self-publish a print version of the book. [2]

[1] [https://news.ycombinator.com/item?id=7569108](https://news.ycombinator.com/item?id=7569108)

[2] [https://news.ycombinator.com/item?id=7569660](https://news.ycombinator.com/item?id=7569660)

<comment><USER4> > Congratulations, Bob!

Thanks!

> He also graciously answered some questions I had regarding his writing > workflow

I've got a long blog post about the whole writing process I'll put up soon.

<comment><USER5> this is really cool. thanks for putting this up! design is hard :'(

<comment><USER4> It is, but, like everything, it just takes practice and iteration. Every design I do gets a little better than the last.

</comment></comment></comment></comment><comment><USER6> I remember seeing one of Bob's posts earlier about how he struggled to finish this. Congratulations to him, I know how difficult it is to complete big projects (they say there's the first 90%, then when the finish line is in sight, there's the second 90%). His perseverance is inspiring!

<comment><USER7> True, always the last 10% consume as much effort as the 90%

<comment><USER8> _" Baseball is 90 percent mental. The other half is physical."_

       -- Yogi Berra

Same math applies to software and book-writing

<comment><USER9> Writing software is 60% understanding the problem, 25% understanding the tools, 20% understainding requirements, and -5% hacking the solution to make it fit requirements.

</comment></comment></comment></comment><comment><USER10> Looks great! I think it would add greatly if you have a chapter that illustrates the development of a simple game where many of these ideas are illustrated.

I teach coding to high-school kids. When I tell them that "We'll be building a game" attention increases exponentially; unfortunately I know nothing about how to program anything beyond simple board games, e.g. tictactoe. I can totally use ideas from your book in my course.

Also, many of the students are also in the school's FIRST Robotics Team. I noticed that programming the robot and game programming are quite a similar (at a high level). So this might help with that, too.

Thanks a lot once again, I entered my email and will definitely be following along.

<comment> bun-neh You might be interested in StoneSoup, a project a friend of mine developed for teaching his week long Intro to Video Game Programming for middle school and high school students. Most of the students have little to no prior programming experience, and by the end of the week they have several games in Processing which they can call their own.

[https://github.com/JohnEarnest/StoneSoup](https://github.com/JohnEarnest/StoneSoup)

</comment></comment><comment><USER11> Why doesn't the section on double buffering mention triple buffering? Double buffering is useful but it has a very important limitation: if the consumer is slower than the producer then the producer can stall while the consumer is still working, and then the consumer gets stale data for its next iteration. The extra memory cost of triple buffering is _always_ worth it for gaming, because none of the ephemeral state data is all that large, and _latency matters_.

</comment><comment><USER12> Bob, if you're lurking this thread:

Congrats. Any idea when I'll be able to buy it?

Like the other free-online-first books I've read, I've gotten enough value from it that I'd like to thank you by paying for it.

<comment><USER4> > Any idea when I'll be able to buy it?

As soon as possible!

Unfortunately, I don't know how long that will be. I'm going to be typesetting it myself with lots of love using InDesign. I hope the final result will be a really nice book, but it could take me a while.

Still, I plan to work on it every single day, so maybe it will go quickly.

> I've gotten enough value from it that I'd like to thank you by paying for > it.

Just a thanks is more than enough, but buying a copy of the print book will be the best way to throw money at me (short of showing up at my house and making it rain, I suppose).

<comment><USER13> this is where marketplaces like fiverr.com really prove their value - <USER2> could pay a couple of people 20 bucks each to do a 90% job of typesetting and you could finish it up later.

YMMV - but you dont have a lot to lose. You could be surprised by the time you save.

</comment></comment></comment><comment><USER14> Thanks so much for all of this. It's extremely well put together.

I'm still trying to figure out the optimal way to organize every part of a Dwarf Fortress-style simulation (but multi-threaded of course), and I feel like I'm reinventing the wheel somewhat poorly. Component-based design is an important part of that, but there are still so many hairy problems to solve.

These are problems which most games don't encounter because they're not complex simulations. And the agent-based simulation literature isn't much of a help either.

<comment><USER15> That's an ambitious project you're undertaking. Can you share more?

<comment><USER14> As I said, on a technical level think Dwarf Fortress - but with a bit less detail and a much larger world (potentially distributed across multiple servers). I'd like to be able to truly simulate a medieval/fantasy RPG world, so a player can see logical consequences from their actions.

The same underlying simulation could conceivably be used for a peaceful economic sim, or a highly strategic military game, or just an RPG with a ton of depth.

<comment><USER16> This is something I have been thinking would be great, Mount and Blade has been the only game that has come close in my opinion.

Don't really understand how you would stop players just slaying all your NPC's? Which I think isn't a problem in the whole if it was offline single player but after playing many online games I just can't see it actually working online.

Also recreating DF with a lot less detail in real time across multiple servers seems like a insane technical challenge good luck!

</comment></comment></comment></comment><comment><USER17> Thank you so much for writing this! As someone working to transition from webdev and enterprisey CRUD app development to something that, if not gamedev itself, deals more with simulation and modeling worlds, it's been difficult to deal with the true change in mindset that's needed. Over the past few weeks I've had "read a chapter of Game Programming Patterns" as a recurring to-do item, and it's opened my eyes greatly.

</comment><comment><USER18> I had to force myself to close the window to get back to work. Great job on the content. I was pleased to see a reference to entity-component systems on the component page, too.

<comment><USER19> I'm not a game programmer, but the movement around ECS is very interesting to me.

</comment></comment><comment><USER20> Congratulations Mr Nystrom! I've been reading through each chapter as you posted them, and I've found your writing style throughly enjoyable and your ability to describe complex code patterns with ease.

It's really hard to get the motivation to finish such a project, serious kudos to you; I shall be buying that e-book!

<comment><USER4> You and everyone else who ever posted something nice about the book were the ones who provided the motivation. I absolutely would not have finished without that.

</comment></comment><comment><USER21> Does anyone know about such a book/list with game-play patterns?

Most of the time I work with game engines, which already use the patterns mentioned here. I struggle with stuff like moving entities in specific directions, collision detection, physics, gravity, etc.

<comment><USER22> Game Mechanic Explorer[0] covers some of these, with examples and source code.

[0] [http://gamemechanicexplorer.com/](http://gamemechanicexplorer.com/)

</comment></comment><comment><USER23> This is a great read. It goes into detail about the practical application of design patterns- when to use them, when not to use them, and some gotchas that are not mentioned in other books. I'd pay for a downloadable PDF version of this!

</comment><comment><USER24> Good choice of font. I can't stand reading long online material with sans- serif.

<comment><USER4> Yes, it drives me crazy when people use sans serif fonts for body copy. You need the serifs to help tie the line together!

There are sadly few serif fonts on Google Web Fonts that have consistent letterforms, good metrics, a nice middle-of-the-road x-height, and good bold and italics, but Merriweather is quite nice.

</comment></comment><comment><USER25> Congrats to Bob! He's been working on this forever, in public.

<comment><USER4> Over four years!

<comment><USER26> You are a legend. Seriously.

</comment></comment></comment><comment><USER27> I've really enjoyed reading your book since I last came across it on HN! Thanks for writing this! I'd be glad to donate a bit, if you add a donation option.

</comment><comment><USER28> I'll gladly purchase an epub for this, looks wonderful.

</comment><comment><USER29> Great work, and thank you from the community.

</comment><comment><USER30> I've been looking for something like this for a long time, game development still seems like something of a dark art and a lot of the resources I've found online are either too high-level or too focussed.

Does anyone have a script to package this into an ebook format? I'd love to be able to read it on my Kindle.

</comment><comment><USER31> Thank you Bob! I've been reading through your book and applying the patterns to both work (web applications) and my hobby game projects. The way you describe the patterns, especially the component pattern, made it clear exactly how to apply it to my projects. This is an awesome resource.

</comment><comment><USER32> Exciting to see this finished. I remember his comments in Write Code Every Day - [https://news.ycombinator.com/item?id=7569108](https://news.ycombinator.com/item?id=7569108)

Super excited to see that his writing strategy worked and it is released. Nice work Bob.

</comment><comment><USER33> love the way this stuff is written. no overloaded jargon. the Command pattern chapter was amazingly straight-forward and everything else learned was immediately applicable to a game project I'm refactoring. hard to say that about many similar books on the subject. bravo! :)

</comment><comment><USER34> Thank you very much for this book! As a beginning game developer this was just what I was looking for. After learning how to do rendering, physics, AI and so on I was missing how to put it all together in a proper way. This is a great resource! :)

</comment><comment><USER35> This looks awesome - I have been wishing for a resource exactly like this for a while now. With my first game under my belt I learned the hard way how difficult game programming can be. I need some high level advice and this looks perfect.

Thanks!

</comment><comment><USER36> This is a valuable resource, and congrats on completing it! Although I don't know if it 100% complete... please provide source for the lurchIneffectively() method mentioned in the Command patter chapter :D .

<comment><USER4> Left as an exercise for the reader!

</comment></comment><comment><USER26> Wow, great work! I'm reading through this - it seems to apply to other programming fields other than just games programming. Really, really appreciate this hard work and making it free!

</comment><comment><USER37> This is a marvel, I can't thank you enough. I'm a mobile application developer, and I really wants to make game someday. The introduction is one of the best I've read.

</comment><comment><USER38> This is pure gold. Well written and informative. Thank you!

</comment><comment><USER39> Congratulations! That's a great achievement, and you finished it much faster than I thought. As soon as I get it, it's next on my to-read list :)

<comment><USER4> It didn't feel fast to me!

</comment></comment><comment><USER40> I don't often login and comment, but i just have to say thanks to Bob. yYou thought me one or two new ways to think about things :)

</comment><comment><USER41> I was hoping it would be about patterns of games, not patterns of programming. These patterns are not specific to games.

</comment><comment><USER42> The drawings are cute and immensely helpful. I will pay money for this once it's in print!

</comment><comment><USER43> Has game development got a target singularity? What would it be? Simulated Worlds like Matrix?

<comment><USER44> Nope. Games are widely varied in their scope and delivery. I am fairly confident there is no single target.

</comment></comment><comment><USER45> This is great, congrats. I've been wanting to get more into game development.

</comment><comment><USER46> Cool!Start reading now.

</comment><comment><USER47> Great work!

Looking forward to ponder on it.

</comment><comment><USER48> Congratulations!

</comment><comment><USER49> Congrats!</comment>


71% of Americans Oppose Civil Asset Forfeiture - <AUTHOR> https://today.yougov.com/news/2015/08/28/poll-results-civil-asset-forfeiture/ <comment><USER2> 58% would follow the drugs, 30% would follow the money? Following the drugs would catch smaller fish at each step.

Also 72% of people were unfamiliar with the term.

Serious question, does being unfamiliar with the term for which the survey is named taint the significance of the answers given?

<comment><USER3> The person leaving with the money is not leaving with the necessary evidence that a crime has occurred. It is not illegal to carry money (most of the time).

You follow the guy with the drugs, so that you can seize the drugs and place them into evidence. That, combined with the LEO witness of the transaction, provides probable cause to get a warrant for the person who left with the money. You presumably also have the guy who left with the drugs in custody, and the prosecutor might be able to convince him to testify against the other party.

If you follow the guy with the money, the only evidence you have is the LEO witness testimony. As we have been repeatedly reminded in the smartphone age, that sometimes contradicts the objective evidence. (That is a polite way of saying that some cops lie in order to achieve a desired enforcement outcome.) The jury couldn't know for sure whether the cop saw a drug deal and decided to go after the "bigger fish", or whether he just saw a guy with a lot of cash and came up with a plausible pretext for taking it.

Cops should chase the hard evidence necessary to secure a conviction, not the potential forfeiture targets that pay for all those cop toys.

(Of course, there was no third option that might satisfy someone who opposes the continuation of the "war on drugs".)

<comment><USER2> Very good point. I suppose the question is a false choice in the first place. The officer should just write down both tag numbers with a "worst drug deal ever" note...

</comment></comment></comment><comment><USER4> 30% would be okay with permanently seizing money as long as they "suspect" it might be connected with a crime.

Put a different way, 30% of those interviewed are perfectly fine with the "Arrest the black guy driving a nice car" routine.

<comment><USER5> It says: "To the best of your knowledge", not SHOULD. The should one is after that, which says:

"Law enforcement should be able to permanently seize money or other property if they suspect it's connected to criminal activity, even if no charges have been filed . . . . . 7%"

So 7% are ok with that routine.

</comment></comment><comment><USER6> The interesting part is that 72% never heard of the term. That typically show how people are deeply involved... Ok they disagree, but, do they do anything about it? No! They were not even aware of it in the first place. That's the problem here in my opinion. People need to know what kind of fucked up things the government is doing, maybe then we'd have enough engagement to change anything.

<comment><USER7> _They were not even aware of it in the first place._

I just asked two people around me if they knew what Civil Asset Forfeiture was. Both said no. I then asked them if they had heard about the police confiscating the money from the guy who was driving back from Las Vegas after he won a jackpot. They both said yes.

Sometimes it's not a lack of awareness of the issue, it's a lack of awareness of what the the technical or legal term is.

</comment></comment><comment><USER8> Wait, you mean that policing shouldn't be a revenue generating activity? What a radical concept!

<comment><USER9> I don't even see it in those terms. In some contexts policing clearly can be a revenue generating activity (e.g. private security guards). Civil asset forfeiture is awful regardless of whether the policing is generating revenue.

</comment></comment><comment><USER10> Ah, but that doesn't matter, does it? Because the program's defenders get to point to big piles of drug money and cigarette boats and say "hey, you don't want drug dealers to keep their ill-gotten gains, do you?" And the issue is clouded enough that nothing has to change. It's enough to make you sick.

</comment><comment><USER11> Assert Forfeiture as it exists today is farcical:

[https://en.wikipedia.org/wiki/United_States_v._$124,700_in_U...](https://en.wikipedia.org/wiki/United_States_v._$124,700_in_U.S._Currency)

<comment> vezzy-fnord The practice does lead to inane case names ( _in rem_ cases do, in general), but by far this is the greatest: [https://en.wikisource.org/wiki/I_Am_The_Beast_etc._v._Michig...](https://en.wikisource.org/wiki/I_Am_The_Beast_etc._v._Michigan_State_Police)

</comment></comment><comment><USER12> Presumably this has to do with most Americans having at least some understanding that Amendment IV exists, as well as likely believing that any judicial arguments in favor of civil forfeiture are unconstitutional bullshit.

</comment><comment><USER13> Even the Magna Charta did contain a passage saying, that the ruler can not deprive a free man from his property without proper trial.

When this is now changed by law trickery of modern governments, we fall back into times of non-liberty.

It is the same as with the "war against terror" \-- in the "war against criminals" we sacrifice basic freedoms and thus the basis of our societies. Even worse, we make out of those who shall persecute criminals, criminals themselves (because there are already plenty of cases documented, where the policemen use this to get advantages for themselves from innocent victims).

</comment><comment><USER14> The other 29% are cops and government employees

<comment><USER15> No, they aren't, which is even worse.

</comment></comment><comment><USER16> and I bet 90%+ of people are against police committing crimes

but that's not going to change anything

<comment><USER17> Government officials breaking laws or abusing their office should be held to a much higher standard, and I would like to think most people agree here.

> I bet 90% of people are against police comitting crimes

Survey Question: Would you agree or disagree with a police officer or federal agent holding a suspected terrorist longer than 24 hours without charging them with a crime?

This is the sort of question that I think more than 10% might agree with. Then, police have endorsement to commit crimes which trend up proportionately to what they can get away with. Substitute terrorist for paedo or rapist, etc. However, this question negates the fact that the implementation and scope may be larger than how it is framed.

I hope 90% of people would uphold AT MINIMUM, the US constitutional laws in the bill of rights. But you and I might be disappointed

</comment></comment><comment><USER18> Here's a good article about Civil Forfeiture written by Pennsylvania State Rep Jim Cox:

[http://www.philly.com/philly/blogs/thinktank/Pa-must- reform-...](http://www.philly.com/philly/blogs/thinktank/Pa-must-reform-civil- forfeiture-laws.html)

</comment><comment><USER19> It says "These are the topline results of a YouGov/Huffington Post survey of 1000 US adults interviewed August 25-27, 2015 on Joe Biden."

What does Joe Biden have to do with this? The string "Biden" does not appear in the full results PDF...

</comment><comment><USER20> Are civil penalties against corporations (e.g. SEC/CFTC fines, mortgage crisis fines) examples of civil asset forfeiture?

<comment><USER21> No, fines and civil forfeiture are completely different.

Forfeiture would be more like the EPA confiscating (and then auctioning off) a factory because it might have been polluting too much maybe, with the onus on the company to prove that they weren't polluting. Or the SEC confiscating all the money you made on an insider trade, and then demanding you prove that you didn't insider trade before getting the money back.

<comment><USER20> Just to be clear, the order to show cause process of a civil case involving the SEC is this: pay up or prove to the agency beyond some standard of proof that you didn't do what we said you did.

The differences are that they don't take the money in advance and offer you the option of fighting the case.

<comment><USER21> Thanks for the clarification.

(Perhaps the most important difference is that if you're being fined by the SEC, you've probably got lawyers who are ready to defend you. One of the most egregious things about civil forfeiture is the way it preys on poor people.)

</comment></comment></comment></comment><comment><USER22> 100℅ of police departments support it.

</comment><comment><USER23> Seized assets should be sold and put into social security.. not into new toys for pigs.</comment>


Ask HN: Do you believe in free help? - <AUTHOR>

Would you rather take help from someone who's doing it for free or someone who's charging you for it? Is it a common (and proved?) notion that free has no quality? So let's say me being an android developer want to help someone in my spare time but don't want to go through the pain of freelance websites and registrations. Would you believe such a person and ask help or just think that he/she must not be good enough. <comment><USER2> There's risk of lawsuits if you accept help like that. Best thing in your case may be to contribute to free (as in speech) software Android apps (perhaps Firefox needs more hands?).

<comment><AUTHOR> Lawsuits from people seeking help? Yes, open source is always an option, but there are a lot of people out there who need help on small things, specially startups. Where do they usually go?

<comment><USER2> Lawsuits _for_ people seeking help. Someone could take help and later be sued for not having compensated the creator for the work and thus not carrying the right to use such work (usually no contract is valid if it says something like "I just give this to you and get nothing in return".

No sane company will want to take on such risk.</comment></comment></comment>


Why Women Pretended to Be Rocks and Trees in NYC Parks During WWI - <AUTHOR> http://www.atlasobscura.com/articles/why-women-pretended-to-be-creepy-rocks-and-trees-in-nyc-parks-during-wwi <comment><USER2> I was flabbergasted by one of the image titles. "Women apply dazzle camouflage to a ship in Union Square, New York City." Mostly because Union Square is deep inside the city, far from the harbors. Turns out the ship was a wooden mockup, used as a recruitment tool [1]. The more you know!

1: [https://en.wikipedia.org/wiki/USS_Recruit_(1917)](https://en.wikipedia.org/wiki/USS_Recruit_\(1917\))

<comment><USER3> Yeah, there was another one [1] built with the same name later. It's a 2/3 scale model of a battleship which is still on display in Point Loma (in San Diego). I used to work around there and it seemed like they were refurbishing it recently.

1: [https://en.wikipedia.org/wiki/USS_Recruit_(TDE-1)](https://en.wikipedia.org/wiki/USS_Recruit_\(TDE-1\))

</comment></comment><comment><USER4> "Private Smith, I didn't see you in camouflage training this morning."

"Thank you, Sir."

<comment><USER5> It wont save you

[https://www.youtube.com/watch?v=ifmRgQX82O4](https://www.youtube.com/watch?v=ifmRgQX82O4)

</comment></comment><comment><USER6> Camouflage design is a fascinating area. And what's most amazing is that, two world wars (and countless small ones) later, they're still discovering new things. E.g. when these experiments took place, it was assumed, on common sense grounds, that the way to camouflage a human silhouette is to break up the shape. It wasn't until the 80s that several strands of research in biology have converged to deliver a conclusion that what actually matters is axial symmetry, and effective camouflage is largely about disrupting that (but patterns that disrupt shape well also tend to disrupt symmetry, so they were effective - just not in a way their authors anticipated).

<comment><USER7> Do you have a link for that? I'm really interested in this area.

<comment><USER6> It might be a bit of a weird choice, but I would suggest reading the "Description of prior art" section of the US Patent on MARPAT (USMC camouflage). It's rather condensed, but it covers the major milestones, differences between types of camo for various purposes (e.g. hunting vs military), and has plenty of references to actual studies.

It also has a lot of numbers pertaining to this particular design (which is considered one of the most efficient modern camo pattern families - note that the family itself is much bigger than MARPAT, and includes e.g. US Army UCP, Canadian CADPAT, Russian SURPAT, and many other digital designs), explaining exactly how and why it works.

[https://www.google.com/patents/US6805957](https://www.google.com/patents/US6805957)

<comment><USER7> Wow, that's as good a history of camouflage as I've read.

</comment></comment></comment></comment><comment><USER8> I once heard an interesting story from an older lady - during WWII, she and a group of other women were enlisted to take shifts standing up in a watchtower (in Des Moines, IA, of all places), scanning the horizon for invading airplanes. Apparently, this was common all over the country.

<comment><USER9> And on the West Coast, massively powerful searchlights were scanning for Japanese planes[1].

The pre-radar location and tracking methods are fascinating to me.

This guy[1] restored one and uses it as an advertising searchlight. I got to talk to him at length a few years ago - fascinating. It has a _800 million candle power_ beam.

[0] [http://www.skylighters.org/howalightworks/](http://www.skylighters.org/howalightworks/)

[1] [http://www.victorysearchlights.com/](http://www.victorysearchlights.com/)

<comment><USER10> Those two sites were one reason I built my own carbon arc spotlight. =)

<comment><USER9> Neat! Did you write up your project?

<comment><USER10> We were written up as project 10 (HackSignal) in this book: Hack This: 24 Incredible Hackerspace Projects from the DIY Movement by John Baichtal [http://www.amazon.com/dp/B00602MH08/ref=cm_sw_r_cp_udp_api_4...](http://www.amazon.com/dp/B00602MH08/ref=cm_sw_r_cp_udp_api_4nM.xbW4Y3XHA)

We never finished our write up. :/ Half done here: [http://www.hackpittsburgh.org/wiki/index.php?title=HackSigna...](http://www.hackpittsburgh.org/wiki/index.php?title=HackSignal)

</comment></comment></comment></comment></comment><comment><USER11> So I learned a new word, "camoufleur".

Not sure how I'm going to steer the water cooler conversation tomorrow so I can drop that one in...

<comment><USER12> Very carefully...

<comment><USER13> "I think you'll find that vertical integration in this context isn't just warranted, legal, and prudent... it's camoufleur. Why... why are you all looking at me like that?"

</comment></comment></comment><comment><USER14> The article glosses over the interesting rationale behind the dazzle camouflage on ships. It's not intended, as the article suggests, to make ships at sea harder to see. That's not really possible since they make a distinct bump on a flat horizon, but the wild paint jobs make it harder for sailors looking through binoculars or scopes to make out the type of ship, its size, or its true heading by breaking up the lines.

There isn't that much evidence that dazzle camouflage worked all that well, but there'e an interesting hypothesis that cubism, an art movement that was ascendant in the early 20th century, was an influence on the technique. And it looks like dazzle camouflage feel out of favor at the same time cubism did.

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

There's a great 99% invisible podcast on the topic: [http://99percentinvisible.org/episode/episode-65-razzle- dazz...](http://99percentinvisible.org/episode/episode-65-razzle-dazzle/)

</comment><comment><USER15> ... Yoga was a thing in WWI.

</comment><comment><USER16> why isn't Hollywood making this?

</comment><comment><USER17> tl;dr: They were helping the war effort by designing better camouflage.

<comment><USER18> Does it really need a separate TL;DR when the article's subtitle says the same thing? That's not a TL, it's just a DR.

<comment><USER19> no it doesn't. I clicked, and scrolled, and skimmed. I read the title and subtitle - again after your comment. No, neither the title nor the subtitle nor any subsection heading or caption make it as obvious as the above tl;dr (which is why the cousin comment by hackaflocka thanked them). It's a good tl;dr - another thanks from me.

<comment><USER18> If you can't tell that TL;DR from the title + subtitle, you _really_ need to work on your analytical skills, which means avoiding TL;DRs like the plague. How much spoon-feeding do you need!?

<comment><USER20> For me, I often can't articles (and subtitles) because my company Web proxy filters the actual article. I can see the discussion in HN. This title is of the highly annoying "why this and that, click me" variety which is generally a turn-off.

Therefore I really appreciate the above TL;DR because it gives me the hint that the actual article is interesting and I should read it when I get to another computer that does not have this filtering proxy.</comment></comment></comment></comment></comment>


Brian Kernighan remembers the origins of 'grep' - <AUTHOR> https://thenewstack.io/brian-kernighan-remembers-the-origins-of-grep/ <comment><USER2> [https://news.ycombinator.com/item?id=17478260](https://news.ycombinator.com/item?id=17478260)

</comment><comment><USER3> "When Computerphile's interviewer had asked if the pipe operator is also still being used today...".</comment>


AJAX best practices? - <AUTHOR>

I'm new to the AJAX business and am trying to find a resource outlining the basics.  In particular, I'm very concerned with handling out of order asynchronous requests, but can't seem to find a very solid recommendation on how to handle them.  As of now I'm going to implement a queuing system for dynamic requests but would rather not re-invent the wheel...
<comment><USER2> What's the specific problem? Why do you need the results to be ordered? If you really do need to order the results, just attach a sequential ID to each request, then hold a priority queue of results sorted by request ID. Pseudo- code follows:

      next_request_id = 0;
      next_response_id = 0;

      // the following code assumes there's a PriorityQueue class implementing a
      // priority queue with push(object, priority) and pop() operations
      response_queue = new PriorityQueue();

      function send_request(request) {
          request.request_id = next_request_id;
          next_request_id++;
          ajax_send(request);
      }

      function receive_response(response) {
          response_queue.push(response, response.request_id);

          while(!response_queue.empty()
                  && response_queue.top().request_id == next_response_id) {
              handle_response(response_queue.pop());
              next_response_id++;
          }
      }

The above code isn't very robust as it doesn't deal with requests that die in transit and never return a response, etc.

<comment><AUTHOR> Right - this is what I'm about to try to implement (and I think I'd trash the entire queue if a response isn't returned within some timeout limit and display a subsequent error message). I don't know if this is the best practice though and as this seems like a pretty generic AJAX problem, it feels like there should be a pretty generic solution...

<comment><USER2> I doubt most AJAX applications are that reliant on request/response ordering. However, a priority queue _is_ the generic solution. :-)

</comment></comment></comment><comment><USER3> One way to handle it is to design your system so that it doesn't matter if the requests come back out of order. Could you give an example of where order matters, so we can work on designing it so that order doesn't matter?

<comment><AUTHOR> I'd like to implement a note-taking system, with an auto-save feature (say, set by a timer). If the requests that go out to the server are received out of order, the wrong state will be auto-saved.

<comment><USER3> Don't save again until the first save has been registered. If it times out, try again.

<comment><AUTHOR> Right - so this would amount to creating queue? Nevermind, I see what you're saying... This is a very specific instance of something pretty general though. Lets say the user edits a note and then deletes it. Do I have the delete action wait for any saves that went out complete first? As the system gets more and more complex it would be something of a pain to try to work out dependencies every time I want to add a new feature.

<comment><USER2> Yes, queue up the deltas, then only send the full set of deltas every time the timer fires. This will also prevent you from hammering your server with a stream of requests backing up.

<comment><AUTHOR> Now, lets say I want to stay away from auto-save... The app I'm working on will actually be a widget on the side of the main site and so I'm not confident the user will pay enough attention to know if his/her info has been saved before they navigate to another page. In this case, can I still avoid a queue? I'd want every action a user takes (adding a note, editing it, deleting it) to result in a server request and some spinny wheel notification that the request is being processed. By the way, thank you both for your help!

<comment><USER3> You don't need a queue.. Just issue the commands as the user makes them. Each command should be separate from every other command, so that order doesn't matter.

<comment><AUTHOR> I think order does matter - lets say a user types in 'hello' and then saves the note, then quickly changes his/her mind and types in 'hello world' and saves the note. Now the backend will save the version of the note which it receives last, which could be 'hello' depending on network lag.

<comment><USER3> In that instance, you'd abort the previous request, create a new XmlHTTPRequest object (important step), then re-issue the request.

<comment><AUTHOR> How does one abort the previous request unless a queue is being kept track of? Also, there could have been a few other requests made between the first save and the second save. Its definitely possible I'm just not understanding how XMLHTTPRequest objects work - please do explain if you think that is the case.

Also - I'm not necessarily using XMLHTTPRequest, I'm leaning towards dynamic scripting as my site will need this widget to run across several different subdomains - dynamic scripting doesn't have a lot of the nice status functionality that XMLHTTPRequest does...

<comment><USER3> Okay, here's an alternate method.

     When a user needs to save their note
      If the note is already saving
       Set note.saveAgain = true
      else
       Start the process of saving the note

     When the note has saved
      If note.saveAgain == true
       Set note.saveAgain = false
       Start the process of saving the note again

That doesn't require a queue. It also only saves the most up to date version.

<comment><AUTHOR> Cool.

Thanks again.

<comment><USER3> I can has karma now?

 _Edit:_ How dare I ask to be compensated for my time. I should be ashamed of myself.

<comment><USER3> Thanks!

If you have any more questions, feel free to ask.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Accessibility Upgrade: EPUB, Libraries, and Ebook Accessibility - <AUTHOR> http://lj.libraryjournal.com/2013/04/technology/ebook-accessbility/

<comment><USER2> As a blind individual the iPhone with epub has been a great improvement for me when it comes to reading. I can now get new books as soon as there released instead of waiting for them to be available in audio format, or looking for pirated versions on torrent sites. The problem I have with this article is that Braille was not mentioned once. I started reading Braille books when I was young which gave me basic literacy. I no longer read Braille unless I'm coding but in spite of that reading Braille books when I was young gave me the basic foundation to understand grammar well enough to type this post. I don't know what blind people will miss out on if they use text to speech their entire lives without having to actually interpret text word by word but I'm guessing it is quite a bit.

<comment><AUTHOR> Though I have reasonably good vision under some conditions, I deal with one of the mild variations of ocular albinism. I can see pretty good but I can't handle some things very well like bright lights, flickering, or some areas of the spectrum, such as older florescent lights. Most of the web where black text is put on a white background is painful for me to read, but luckily I know how to configure my browser to override the default display colors.

Over the years, I've set up many computer systems for people with various types of vision limitations, including text-to-speech, special magnification, color pallets within visual range, alternate fonts, and Braille display systems. Sadly, I can't read Braille by touch, and when I check systems to make sure they're working right, I do it visually.

Text-to-speech is helpful, but there are many textual clues which are never vocalized. For example, on a UNIX mailing list one user was having trouble understanding some of the emails due to the fact that the convention for indicating a manual page is to put the name of the manual page followed by a left parenthesis, then the number of the manual section, followed by a right parenthesis. His screen reader just sort of skipped over the parenthesis, so he never realized he was being directed to the text based manuals.

The major problem with Braille displays is their cost. Most of them are heavily protected by patents, insanely expensive, and extremely limited. Braille is tough to do well on most modern computer systems. Most modern graphical user interfaces are just not designed to give an alternate way of interacting with the system.

I've always wondered if it would be feasible to create a pin display?

The idea would be basically replacing the pixels of visual displays with pins to create a tactile display. Graphical elements, even pictures, could be represented with raised or lowered pins. The text could be translated to Braille, or rendered as raised pins in a touch-readable font.

It would not solve the issue of Braille illiteracy exactly, but from my ignorant view as a sighted person, I believe it could help in a lot of ways, including literacy.</comment></comment>


Part of your brain may keep the world from disappearing when you blink - <AUTHOR> https://qz.com/1401565/part-of-your-brain-may-keep-the-world-from-disappearing-when-you-blink/ <comment><USER2> Maybe this is bad, but the world DOES disappear when I blink.</comment>


CASE STUDY: How I doubled my email list through guest posting - <AUTHOR> https://growthhackers.com/articles/case-study-how-i-doubled-my-email-list-through-guest-blogging <comment><USER2> Nice work Jeremy!</comment>


Why the actual characters that make up your job title are so important - <AUTHOR> https://dochub.com/perlcareers/5YQM8e/short-job-title?dt=nh0x29hzkh9z1ntv <comment><USER2> This rings true to me and I like it a lot.

It's important for employees (especially the skilled, self confident kind) to remember that outside of their current job, boss and co-workers, no one knows who they are, what they've done, what they can do. The default opinion is that they are average until proven otherwise.

Anything you can do to prove otherwise (that you're not average or mediocre) is a win. Anything at all.</comment>


The Internet Never Forgets: What Happens to Your Data When You Die? - <AUTHOR> https://www.sherbit.io/right-to-be-forgotten/

<comment><USER2> My father died of brain caner in 2010, his email still works and I figured out his password to log in. He got 11,000+ messages since 9/1/2010 mostly junk but I noticed a few people were still sending him updates about Telephone Pioneers that got sick or died. He used to work for AT&T so I linked to his obituary and told them that he passed away.

He had a Yahoo email but it got deleted for not being accessed in a long time. He used it to play Java based games like Pool and other stuff at Yahoo Games.

He never got into social networks, but I could read invites from people trying to invite him after he passed away, not understanding that he is dead.

He had first initial middle initial last name for his email at sbcglobal.net so some other people with the same initials accidentally entered his email into websites and email lists.

My mother doesn't get the Internet anymore and stopped using an IBM Windows XP PC long ago. So I got permission to read her email on my PC and get my dad's email as soon as I figured out what his password was.

There are so many things that require an Internet connection these days, and since she doesn't have Internet I have to sign her online using my PC.

I had a friend who killed himself in 1999, had two different Yahoo accounts and I guessed the questions to reset his passwords, it asked what his mother's original middle name was. I gave access to the accounts to his widow to see if she could contact the people he talked to about his death. Some of them didn't want to believe her, she gave the address of the cemetery where his grave was. I am sure over time those email accounts were deleted due to inactivity by Yahoo as well. I tried to get him a job, and he got recruiter emails and he didn't read any of them, just stuffed them into a jobs folder.</comment>


SoftLayer decreased  Bandwidth quota 20,000 GB to 500 GB on new server - <AUTHOR>

<comment><USER2> OTOH, they made some pretty significant cuts to what they charge for extra RAM and SSDs. They used to have ludicrously expensive surcharges if you wanted to have an SSD instead of a HDD, or if you wanted to increase RAM to something even fairly small like 8GB. Now their servers seem to be priced pretty competitively. And bandwidth in excess of the 500GB is $0.09/GB (I believe, but I'm too lazy to double-check), comparable to EC2 (which also charges from the first GB, i.e., has _no_ free allotment).</comment>


The Political Philosophy of Toy Story 3 (spoiler included) - <AUTHOR> http://www.aaronsw.com/weblog/toystory3pol <comment><USER2> With all respect to Mr. Swartz, I find it hard to fit the world of Toy Story, broadly speaking, into a widely-stretched political framework, although it is a thoughtful and fun read. Here's how I differ in my read of TS3.

Swartz starts by connecting the dynamic between Andy and Woody & company to feudalism, which is tempting at first glance (because loyalty is at play), but upon closer scrutiny there is no economic exchange or significant obligations to the "loyalty" apart from merely being present as a toy. Instead of the toy- master arrangement being one of servitude, indentured labor, or military obligation, the duty of the toy is in fact inverted from any such duty: they simply have to "be," which doesn't require any work. The toys' purpose is pure: to love and to be loved. The relationship forces us to ponder how we relate to the non-human things around us: our iPods, the planet, animals--how we form relationships with objects, and what consequences arise, both within our minds and out in the physical world, from our regard (or disregard) for those objects. That there is an unconditional dominance of the toys by humans is granted, and, in the conceit of the films (with the exception of the moment with Cid in TS1), immutable.

Sunnyside Daycare, however, IS rife with political undercurrent (as it relates a power dynamic unto itself among the toys), but I disagree that it is being presented as a "libertarian paradise" (if such a thing can even be said to be possible). The reason, of course, is that there is a thinly veiled communitarian, possibly communist sense of mutual obligation: that is, the massage and sewing shops are exactly presented as examples of the ways in which the toys in this community are meant to "help" each other--self interest is ostensibly not at play, not among the toys anyway. In any event, we see the system quickly unveil itself as a totalitarian police state, with Lotso at the top, and we see quickly how his oppression becomes untenable for Woody & company after they attempt to exercise their option to leave. What ensues is a classic depiction of imprisonment (creatively, in my opinion, the movie's low), along with an interesting interlude that comically reexamines the sexual power inversion that Barbie enacts over Ken to trump his military authority.

Bonnie's house doesn't in any substantive way represent a "mixed economy" but instead represents a reincarnation of purpose for the toys once they've exhausted their use to Andy. Bonnie is, simply put, a younger Andy, and along with that represents a new abundance of love and time that will reinvigorate the toys with a sense of purpose and belonging. The moment at the end of the movie is the very profound recognition, via the transference of toys, that youth, and with that life, is fleeting. Andy recognizes that the joyous youth within himself hasn't died, but has merely been passed on to the very capable Bonnie. With that there is a third layer of meaning, that many have picked up on, that relates to the paternalistic relationships present both within the movie and its audience.

With the advent (some would say inevitable advent) of consumerism, we have become a more materialistic society, and we imbue meaning to more objects in our lives than ever before. Toy Story forces us to examine how we distribute our own sense of self worth, and, in many ways, pieces of our own identity among the various artifacts strewn about our houses. Perhaps there is even a subtle critique of this materialistic culture hidden somewhere in the Toy Story franchise--do we think twice before we swap in our iPhones anymore for a new model? Has society forced us to discard our regard of what we own in hopes that we constantly sell on eBay, REown, and repeat? There's rife economic and sociological commentary here: we all feel it. The political interlude, in my opinion, while funny, isn't nearly as interesting as its relentless focusing and refocusing on what we consider garbage, and why.

<comment><USER3> "We do not see the world as it is. We see the world as we are."

— The Talmud

</comment></comment><comment><USER4> Having just come out of this movie a few hours ago, I feel confident in saying that this is the most completely stupid, half-ass analysis Toy Story 3 you're likely to read.

While you could reasonable make some political and economic analogies about the conditions at Sunnydale, Andy's toys relationship to Andy isn't a feudal master slave relationship, it's a _family_ relationship. The most WTF part is claiming that Bonnies house is a "mixed economy". It's not. It's another family. A _new_ version of what the toys had years ago with Andy.

<comment><USER5> _Andy's toys relationship to Andy isn't a feudal master slave relationship, it's a family relationship._

Of course that's exactly what a feudalist would say, now isn't it! Ever read a defense of feudalism before? Check out Sir Robert Filmer's Patriacha from 1680: <http://www.constitution.org/eng/patriarcha.htm> According to a feudalist, the feudal relationship is an extension of the family relationship.

</comment></comment><comment><USER6> Surely he means "Woody" in the first sentence, and not "Andy" - took me a moment to parse his meaning until I decided it was a typo.

<comment><USER7> He had a similar Molly/Bonny mistake near the end of the article. It makes for an odd mix of thoughtful and sloppy.

</comment></comment><comment><USER8> "Libertarian dictatorship?" Hunh?

<comment><USER9> Looks like he may have fixed it, that phrase no longer appears.

</comment></comment><comment><USER10> if this interpretation is true it seems that disney is now making movies in the style of -animal farm-

<comment><USER11> I think it may be Pixars influence... Up! and Wall-e were both pretty adult intellectual movies (yawn).

Hopefully Toy Story 3 has something for the kids as well (Haven't seen it yet).

<comment><USER12> It's somewhat of a kids' movie, but it's quite dark and might be scary for younger kids. (Kind of like _The Lion King_ , which was also dark and scary.)</comment></comment></comment>


A CAPTCHA that filters out humans and only lets programs pass - damjan-ski http://www.humansnotinvited.com/ <comment><AUTHOR> For kicks I took a wild guess and apparently I'm a robot.

The "reward" for being a robot is the following text:

"Welcome! You are not a human and the first here."

<comment> damjan-ski Ha - we've just updated the algorithm. Thanks for the heads up.</comment></comment>


Ask HN: Should HN have polling feature? - <AUTHOR> To know the best voted item for question like https://news.ycombinator.com/item?id=21302412 <comment><USER2> From the FAQ: [https://news.ycombinator.com/newsfaq.html](https://news.ycombinator.com/newsfaq.html)

> _How do I submit a poll?_

> _.[http://news.ycombinator.com/newpoll](http://news.ycombinator.com/newpoll) > ._

You need 200 karma to use it.

<comment><AUTHOR> Ohh thanks. I didn't know that . Thanks</comment></comment>


Dead Code Elimination for Beginners - <AUTHOR> http://blog.mozilla.com/rob-sayre/2010/11/17/dead-code-elimination-for-beginners/

<comment><USER4> I highly recommend reading this article.

Although it does point out one reason that JS is a poor language to be the foundation for client-side web computing: It's extremely difficult to optimize a language this dynamic. I honestly think we could be leaving 50% perf improvement on the floor due to the dynamic nature of the language.

And this is on top of the fact that you already have to reduce the amount of time spent optimizing since you don't compile the code ahead of time (most optimistically using a JIT of some sort).

Can we please move away from JS and move to a nice IL?

<comment><USER5> > JS is a poor language to be the foundation for client-side web computing

> I honestly think we could be leaving 50% perf improvement on the floor

Unfortunately, humans have not got significantly faster (or smarter) in the last couple thousand years, as opposed to computers, that get twice as fast every 18 months or so.

Dynamic languages, by placing the burden of optimization on the compiler/runtime are making the right bet. Static-typing is little more than a human doing the machine's work, often at the expense of introducing subtler bugs (the compiler catches the obvious mistakes and that may leave programmers with a false sensation of security).

> Can we please move away from JS and move to a nice IL?

As for moving to precompiled, possibly obfuscated scripts, I would much rather concede a little less dynamism on the language and move the compiler into the browser. You could, conceivably, declare the type of arguments and return values and rather easily, in that case, perform some optimization as the code is parsed.

I have no love for JavaScript. It's a little tortured language that I am sure passed through a lot more marketing specialists than needed before taking its current form and bears the scars from that process. It has, however, some good parts that are very good.

<comment><USER6> > Static-typing is little more than a human doing the machine's work

Interesting. I look at (good: e.g. ML or Haskell) static typing as the machine doing the work that a human would have to do in a dynamic language. Especially type inference.

<comment><USER5> There are cases when it makes sense to use static typing or, at least, to stick to certain types for input and output.

In my experience however, those cases are not many and doing it when you don't have to creates unneeded complexity.

<comment><USER6> There are cases when it makes sense to use dynamic typing (e.g. dealing with XML and friends).

In my experience however, those cases are not many and doing it when you don't have to creates an unneeded burden on the programmer.

(sorry -- this is probably not to HN's taste, but I just wanted to show how an entirely different perspective can also be valid)

<comment><USER5> Unless you intend to strictly enforce types (rather than validity) on your dynamic code, there is no burden on the developer.

Now I am curious: what do you do? I do mostly server-side web stuff, but I have done embedded/driver and can see situations where you really need a 3-byte unsigned integer to stay a 3-byte unsigned integer. But, apart from that, I can't imagine other cases.

<comment><USER6> _Unless you intend to strictly enforce types (rather than validity) on your dynamic code, there is no burden on the developer._

Of course there is. I program more in dynamic languages (particularly JS) than in statically-typed ones, and I always keep worrying about passing representation A of some data rather than representation B. I find myself having to look at the source code of callees far more than I think I should be.

On the other hand, my academic life revolves around statically-typed languages (Haskell). The way Haskell's type system is designed means that there are entire programming paradigms that are not just available but _production- ready_ in Haskell, but are virtually impossible in any other popular language. For a concrete example, see software transactional memory.

I'm also a huge fan of pushing as much lower-level drudgery as possible to machines to free up human minds for higher-level thinking, and a good type system combined with good type inference goes a long way.

<comment><USER7> I don't understand why you need monads to get STM. orElse is neat, but there are other ways to do the same thing in imperative languages.

<comment><USER8> I quote Simon Peyton-Jones: "STM requires runtime logging of every memory read and write. In an imperative language (such as C#), in which the very fabric of computation involves reads and writes, STM is bound to be expensive. [Lots of work has been done to omit redundant logging based on program analysis, but it's still expensive.] When do you need readTVar/writeTVar? Answer, precisely when you are manipulating state shared between threads."

[http://www.0x61.com/forum/programming-haskell- cafe-f245/is-t...](http://www.0x61.com/forum/programming-haskell-cafe-f245/is- there-any-experience-using-software-transactional-memory-in-substantial- applications-t1289646.html)

It looks like STM works better for functional languages and you _have_ to mark shared data somehow. And then you have to mark the code that manipulates shared data somehow (so it won't prematurely launch missiles). Then you're reinvented monad.

I reserve right to be wrong so I'd like to see what are the ways for imperative languages.

<comment><USER6> Oh, tons of work has been done in trying to bring STM to imperative languages, most notably with STM.NET (which is what SPJ's referring to there).

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Follow up on : <http://news.ycombinator.com/item?id=1913102>

</comment><comment><USER10> this is pretty damning for ie9 js performance isn't it? they are going to have to rework their static code analysis and it sounds like they don't have the js knowhow - what else might they incorrectly be optimizing?

<comment><USER5> > this is pretty damning for ie9 js performance isn't it?

I think the whole point of the post is to poke fun at how Microsoft is cheating the benchmark and how it was caught. The part on the definition of Angles and that the "optimizer" should throw an exception it doesn't (most probably because it's not optimizing anything) is hilarious.

<comment><USER6> _The part on the definition of Angles and that the "optimizer" should throw an exception it doesn't (most probably because it's not optimizing anything) is hilarious._

What are you talking about? That code _is_ getting optimized away into a no-op when it shouldn't be, which is why no exception is thrown. This means that

a. the optimization is _definitely_ happening

b. it is unsound

<comment><USER5> Unsound in a _very_ specific and suspicious way - yesterday it was pointed out adding a single, do-nothing, line to the middle of the function makes the "optimizer" fail.

I also think the "for beginners" in the title is somewhat directed towards whoever implemented the "optimizer".

<comment><USER6> _Unsound in a very specific and suspicious way - yesterday it was pointed out adding a single, do-nothing, line to the middle of the function makes the "optimizer" fail._

That isn't unsoundness, that's incompleteness. An optimization being incomplete means that something that _could_ be optimized isn't -- one being unsound means that something that _shouldn't_ be optimized is. These terms come from mathematical logic.

<comment><USER5> Sorry. I am an engineer. I got it as "not solid", "wrong", "flaky". I appears all three apply perfectly to the optimizer at hand. Being it _both_ unsound (as it optimizes too much of a benchmark) _and_ incomplete (as it doesn't recognize the invalidity of the code being optimized - the Angles thing - <USER2> fails to optimize too much when a no-op is added) we could just be more concise and settle for "broken".

<comment><USER11> I think you're still mixing up what "unsound" means. If I say that applying an optimization is unsound, it means that if I apply that optimization, I can no longer guarantee that the resulting code is semantically equivalent to the original code.

Being incomplete means the code you generate is not as fast as possible. Being unsound means the code you generate may be _wrong_. We don't normally call an optimizer "broken" if it does not optimize something even though we can recognize the optimization could be applied - no optimizer does every conceivable thing. But generated code that is not semantically equivalent to what was given violates correctness.

<comment><USER5> I think the "Angles" removal demonstrates the optimization is unsound. The "optimized" code gives out a result when a correctly optimized one would give a ReferenceError. This optimizer ignores invalid code (that references a non- existent thing) and happily short-circuits it.

The only reason to trust this code to do other optimizations well is all the evidence it's targeted at one specific benchmark.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> What are the real benefits of dead code elimination on actual production code in real applications? Seems to me that only synthetic tests contain dead code (by intend) whereas dead code in production code is by definition unnecessary and, by most coding standards, a bug.

<comment><USER13> It's important to be able to delete dead code even if your developers never write any, because earlier compiler optimization passes can create dead code. For example, consider this simple function written in a hypothetical dynamic language:

      function add(a,b) { return a + b }

Our hypothetical compiler turns this function into some IL that looks like this:

      function add1(a,b)
      {
        if(is_null(a)) throw ArgumentNullException()
        if(is_null(b)) throw ArgumentNullException()
        low_level_generic_add(a,b)
      }

...where low_level_generic_add sums a and b if they're integers, or looks for a suitable overloaded operator+ and invokes it if they're not.

Suppose further that our hypothetical language has a tracing JIT, and that most of the time when a and b are called, they're both integers. In that case, the compiler might perform the following transformation:

      function add2(a,b)
      {
        if(is_integer(a) && is_integer(b)) return add_integers(a,b)
        else return add_generic(a,b)
      }

...where add_generic is just a copy of add1 above, and add_integers is a copy of add1 with low_level_generic_add() replaced by the less-expensive perform_integer_addition()

      function add_integers(a,b)
      {
        if(is_null(a)) throw ArgumentNullException()
        if(is_null(b)) throw ArgumentNullException()
        perform_integer_addition(a,b)
      }

But suppose one more thing: let's say integers in this language are value types; that is, that is_null(some_integer) is never true. Then you can get another performance win in add_integers by removing the two null checks - <USER3> you can only find out about that if you have a dead code detector.

This has been your woefully incomplete dynamic compilation moment.</comment></comment>


Intents – Get linked with people that see what you see - <AUTHOR> Hi everyone, I'm working on a new paradigm of a social network, that uses visual searches to link groups of people who are interested, inspired and connected to what they're looking at. I mean, you just take a picture and Intents show you communities of people (I would love to call them "Tribes"), who've taken a correlated picture. And of course you can interact with them.
Here the link http://www.intents.me
My vision is to connect people with the same intents, now with a simple picture (analysed with AI/CV algorithms) and in the future, I would add a JS framework (chrome extension?) that also connect online people who are browsing websites correlated with the images.
Example: Online shoppers looking for a cool Nike sneaker connected with influencers and people who've taken a picture of those shoes.
Does this make sense? What do you think about it?
I'm looking forward to hearing your feedback.
Best,
Matteo <comment><USER2> Interesting idea. Might get more interest if you post this as a Show HN.

<comment><AUTHOR> Thanks for this, I'll do it!</comment></comment>


Weird Shell – Structural Regular Expressions Unix Shell Made in Rust - <AUTHOR> https://git.sr.ht/~tudor/rwsh <comment><USER2> Having recently played around with sam, I could see some interesting possibilities based on the title of this post, But from the link, it doesn't seem like there are any examples of what this is meant to look like.

<comment><USER3> [https://git.sr.ht/~tudor/rwsh/tree/master/examples](https://git.sr.ht/~tudor/rwsh/tree/master/examples)

</comment></comment><comment><USER4> I'm not sure, but having eval on the RHS using $1, $2 vars as in Perl seems to be easier to use and remember. You can represent all se commands this way naturally: x a i d c

Structural regular expressions seem to be to me more like dynamic pattern matchers and parsers, such as in raku (perl6).

</comment><comment><USER5> SourceHut itself looks interesting for self-hosting on-prem repositories in a private company

<comment><USER6> Yeah, it does doesn't it. I've seen a couple of projects using it but nothing more.

</comment></comment><comment><USER7> Linux vi like text editor using Structural Regular Expressions too [https://github.com/martanne/vis](https://github.com/martanne/vis)</comment>


Pinocode is a code development playground for front end development - <AUTHOR> Pinocode is a code development playground for frontend development.
It will provide you a cool environment to practice frontend development using HTML, CSS and JavaScript... With support for variants and external libraries inclusion.. For beginners and experts.
Its free too.
It is an Offline Frontend Playground right in your browser
Lives completely in your browser. There is no network involved, so it opens and shows previews instantly, with preprocessor support plus external libraries too.
This extension provides you with a very easy accessible and offline playground for your lovely web experiments. Perfect for developers who want to experiment or practice in HTML/CSS/JS quickly, even without Internet connectivity.
Features:
* Works offline * Supports preprocessors: HTML (jade, markdown), CSS (SCSS, LESS, Atomic CSS, Stylus) & JavaScript (ES6, CoffeeScript, TypeScript) * Inbuilt Console * Save and load your creations with Auto-save * Fork any creation * Multi-monitor support with detached preview * Import & Export all creations anytime, anywhere * Configurable settings * Code autocompletion * Very easily accessible. Simply open a new tab in Chrome! (configurable setting). * Multiple layouts with saved collapsed states * Save as HTML file * Edit in CodePen * Preview screenshot capture
Lets create!
Help & Support <comment></comment><comment>--- Twitter - https://twitter.com/pinocode Website - http://pinocode.io
Visit http://pinocode.io
to install on your PC, MAC or Laptop </comment><comment><USER2> Was this ever under a different name? I think I remember seeing an offline codepen somewhere else before.</comment>