Starting a tech startup with C++ - <AUTHOR> https://medium.com/@jamesperry/starting-a-tech-startup-with-c-6b5d5856e6de#.wv0nsmicb <comment><USER3> I would like to see one other aspect discussed though: quickness to market.

At my job, we are rewriting some pretty terrible vb5 code. It's easy to just WTF a lot, and complain that there are truly insane things inside of it. The flipside of that, is that this code was quickly built and quickly allowed for a revenue stream.

The author mentioned that thrown away python code provides no value, but I'm not convinced of that statement. The development time could have been significantly shortened, allowing for a revenue stream while the site was rebuilt in C++. While this may seem like wasted development, it could have created incoming money at three months rather than eight months, helping keep the lights on. Further, there are conceivably problems that would come about during development that would impact their design, which they would have to figure out. Solving these problems are irrespective of the language implementation, and using a dynamic but slower language could help them nail down theoretical issues in algorithms, api, and infrastructure, before coding in the c++ system.

A counter point to this though, is that often, there is no budget for a rewrite. I'm wondering if they would be constrained by the prototype becomes long lasting production like in our case.

<comment><USER4> Additionally, Python plays well with C, so perhaps some of the performance killing portions could have been replaced with C.

<comment><USER5> Not only that. A lot of the modules in the Python standard library are written in C; some may be thin wrappers over the corresponding C library. So when you call that code in your app, it runs at (nearly) the speed of C. Same could apply to other languages like Ruby too, that follow that model.

</comment></comment></comment><comment><USER6> > Manual memory management is the most popular misconception of C++. Since > C++11, it is now recommended to use std::shared_ptr or std::unique_ptr for > automatic memory management. There is a small computational cost to > maintaining referenced pointers but it's minuscule and the safety outweighs > this cost.

I think another misconception is that you need pointers at all. Smart pointers are still pointers. Its better to use value semantic all the way when you can. And you usually can. Why place something on the heap if it can live on the stack?

<comment><USER7> You mean C++ programmers allocate n object on the heap even when its lifetime is the same as the scope of the containing block ?

Unless its such a large huge object that stackoverflow is a possibility I cant imagine why would one do that.

<comment><USER8> I don't think C++ supports variable length arrays?

So, if you want to allocate N objects, where N is not known at compile time, (I think) you have to use heap allocation anyway. Normally I just use vector<>, and call reserve() if I feel like extra performance-y. Sure, it's much slower than C99-style variable length arrays, but 99% of the time it's still fast enough.

More importantly, it plays nice with other C++ functionalities. For example, zero-copy construction using emplace_back() inside a for loop. (And if you throw an exception in the middle you're guaranteed that destructors are called exactly for those that are already constructed.)

<comment><USER9> You can still use alloca in C++

<comment><USER7> Yes and I have at times, but its living a little dangerously. Even if it returns a non-null pointer it does not mean you can write there safely.

</comment></comment></comment></comment></comment><comment><USER10> I wonder why the choice of language is framed as being between C++ and Ruby/Python? Yes, C++ is known for being fast while suffering from a shortage of easy libraries and being more verbose to write and intellectually challenging to write in, while the mainstream dynamic languages are known for being not so fast but having a vast array of handy, easy to integrate libraries and being fast to develop in. But I think there's a number of choices between the two that seem worth considering.

C#/.NET doesn't get a lot of love from the startup community, but it's mature, stable, fast, full of advanced features, and has good library support.

Java and other JVM languages have similar advantages and better compatibility with Unix-based OSes. Java itself is a little long in the tooth, but there is the option of alternate JVM languages.

I'd probably be most tempted to check out Go if I was working on something that absolutely had to wring the best possible performance out of my hardware. I don't honestly know that much about it, but it has a reputation for getting you most of the performance of C++ without the complexity.

But I will say that if the author has lots of experience in C++ and comfort with the ecosystem, and not much in any of those other languages, then by all means go with C++. Getting your product out there is more important than getting the perfect language.

<comment><USER11> > I'd probably be most tempted to check out Go if I was working on something > that absolutely had to wring the best possible performance out of my > hardware. I don't honestly know that much about it, but it has a reputation > for getting you most of the performance of C++ without the complexity.

Go isn't billed as a language that is designed to do that. It's faster than Ruby and Python, for sure, but it made many runtime performance sacrifices in the name of ease of use and compilation speed.

<comment><USER12> The GC has been drastically improved recently and going to get another improvement in the next release - Go 1.6. Either way, if Python was considered, Go isn't less fit to be considered.

<comment><USER11> > The GC has been drastically improved recently and going to get another > improvement in the next release - Go 1.6.

I wasn't just referring to the GC.

</comment></comment></comment></comment><comment><USER13> It's sad that you need to justify using one of the most established and longest serving languages/platforms ever.

<comment><USER14> Indeed, the given strawman alternative languages (Ruby and Python) are far, far worse for productivity. Python changes are totally unreviewable since one cannot in any way reason about the correctness of a function call without reading the definition of the function itself, and all the functions to which it passes the arguments, all the way down, which of course takes forever. At least with C++ you can reason that if a change compiles it has not made any dramatically stupid type errors. You still need to think about whether any unnecessary temporaries or copies were made, or questionable assignments, but you need only think about that one level deep. Is seems to me far more dangerous to suggest writing new code in Python.

<comment><USER15> Ummm, unit tests? The compiler offers a false sense of security. Type safety is not correctness.

<comment><USER16> Not to dredge up this debate for the umpteenth time, but the same can be said of unit tests: they are not a proof of correctness, and they often give you a false sense of security.

<comment><USER14> The Internet has, indeed, conducted this argument thousands of times. My point here is only about the difficulty of reviewing Python code. I find myself sometimes having to hold up a piece of paper to the screen to see if the indentation has been done right, in addition to the aforementioned function- body-reading chores. Of course my opinion is of no concern to people except those who work with me, from whom I refuse to review Python code. It's just not worth my time.

<comment><USER15> My point is that there are tools and techniques that will solve these problems in ways that are more valuable than the compiler's type system.

If you seriously "refuse to review Python code" because you feel you need to visually check indentation, I think you might want to take a step back and evaluate your methods.

</comment></comment></comment></comment></comment></comment><comment><USER17> I'm curious as to has this plays out at scale. If you can reduce the number of machines needed by a factor of 10, then apart from the hardware/power savings, there are staffing savings too. Managing 1000 machines is different from managing 10,000

</comment><comment><USER11> > There is a small computational cost to maintaining referenced pointers but > it's minuscule and the safety outweighs this cost.

Atomic reference counting does not have minuscule costs. See, for example, [http://www.hboehm.info/gc/nonmoving/html/slide_11.html](http://www.hboehm.info/gc/nonmoving/html/slide_11.html)

In particular, note that if you use shared_ptr everywhere you will be end up with much slower code than you would have if you had a good GC. In other words, you end up slower than Java, with less safety and more verbosity.

Browser engines have used custom non-thread-safe reference counted pointers where possible extensively for this reason.

Furthermore, I always have to say it: shared_ptr is not memory safe.

</comment><comment><USER18> I like these "You CAN do X with Y!" types of posts - especially when it's not the same drum being banged over and over.

I think there's a really big part of this case study that isn't mentioned (perhaps because there is currently no data): bringing on more engineers. It really seems as if the number of C++ developers ready to be a part of the startup ecosystem is small. That is the impression that sites like HN leaves me with at least.

</comment><comment><USER19> For databases, C/C++ is still the only reasonable choice. For OLAP cubes in particular, you want to keep as much data in memory as possible as efficiently as possible, and drop down to SSE intrinsics where needed. C++ lets you do just that. Frontend can be in any language you like.

<comment><USER11> There are several other languages that have "ability keep as much data in memory as possible as efficiently as possible" and "drop down to SSE intrinsics" as features. C and C++ by no means have a monopoly here.

<comment><USER19> How battle tested are those languages? How many outstanding bugs do they have in their compilers and libraries? How good is tooling support? How easy is it to find competent programmers? How well do they interoperate with existing high performance libraries? That's just a small sample of issues you need to consider when starting a serious project. I maintain that it's hard to compete with C/C++ on all of those criteria.

<comment><USER11> Moving the goalposts to "every single advantage C++ might possibly possess" isn't very interesting. The idea that using a new language can only be justified if the language surpasses C++ in every conceivable way is very 1995, pre-PL Renaissance thinking.

In reality, you can only choose programming languages by balancing all the factors in question, and C++ has plenty of disadvantages for databases: it's unsafe, it's difficult to learn, compile times are poor, there's no package manager, etc.

<comment><USER19> Says someone who has quite obviously never worked on database engines. Package manager? LOL. What language are you programming in, Ruby?

<comment><USER20> pcwalton works on a web browser engine, which I'd say is at least as "complicated" as a database engine. He's already stated the benefits Cargo brings to Servo's development (as compared to working on, say, Gecko) elsewhere. What makes you think a package manager wouldn't be useful for a database engine which may want to, just as an example, provide a web server for queries or administration? [1][2]

(Honestly, I'd rather call Cargo a "project manager" , because it does far more than manage packages -- it builds your project and its dependencies, too. Having a completely standard way to build applications and libraries is an _enormous_ win over C++. The discovery and management of a project's packaged dependencies is of secondary importance to me.)

[1]: [http://docs.basho.com/riak/latest/dev/references/http/](http://docs.basho.com/riak/latest/dev/references/http/) [2]: [https://www.rethinkdb.com/docs/administration- tools/](https://www.rethinkdb.com/docs/administration-tools/)

<comment><USER19> Compared to DBs browser code bases are lax and buggy beyond belief. Want to take a second and a gig of RAM opening a page? Go right ahead. Browser crashes? We're "sorry", wait for next release 2 weeks from now. No multitenancy. No having to deal with data of arbitrary size. No transactions. No writing anything complicated to disk. Etc, etc. You're comparing things that really require completely different levels of rigor, sophistication and engineering skill. Last I checked, BTW, all currently shipping browsers are written in C++.

<comment><USER11> Browsers certainly do have to deal with multitenancy (although we don't call it by that name), data of arbitrary size, transactions, and complicated on- disk data structures.

In any case, you now seem to be primarily interested in arguing that database programmers are smarter than all other programmers, which, needless to say, is about the most uninteresting conversation we could possibly be having.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER21> Not to mention the time saved in testing due to the compiler catching many errors only unit tests could catch in python.

<comment><USER22> I was glad when Python added type annotations, but the Python community is aggressive about preferring dynamic typing. Don't think the chances are that great to use them in a real project.

Perl 6's gradual type system seems interesting and one plus of Go is that it brought some well-deserved attention to concise static typing.

</comment></comment><comment><USER23> Sounds very inspiring.

Any other good places to start learning about C++ 11/14 for complete beginners with JS and other programming languages?

I'm very much interested to create proof-of-concept for high performance SaaS services and play with C++ as it might be useful to build Node.js extension later.

<comment><USER22> Programming - principles and practice using C++[1] should be appropriate for beginners. It's a long book at 1000+ pages, but it is designed for novices and explains subjects such as why one needs functions, how to handle errors, GUIs, testing, etc.

The C++ Programming language (4th ed)[2] is for experienced programmers. A tour of C++ is the short version of the former.[3]

[1]: [http://www.stroustrup.com/programming.html](http://www.stroustrup.com/programming.html)

[2]: [http://www.stroustrup.com/4th.html](http://www.stroustrup.com/4th.html)

[3]: [http://www.stroustrup.com/Tour.html](http://www.stroustrup.com/Tour.html)

<comment><USER23> Ohh... thnx! Nothing changed since I graduated in 2001 ... I recollect Stroustrup since then. It's still C++ bible.

<comment><USER24> In the language many things changed and you should look a the books which focus on C++11/14 no the old stuff.

</comment></comment></comment></comment><comment><USER25> I'm more curious as to the decision not to stick with Rust. Sounds like there was a prototype. I'm guessing there were some libraries missing.

Would be cool to know more about that.

<comment><USER26> Rust's ecosystem is super young, and up until May '15 the language had breaking changes occurring pretty frequently (daily? I wasn't using it back then so I'm not sure). I've been really enjoying using it, but I imagine that this startup began work before Rust hit 1.0, or very nearly afterward.

<comment><USER27> Sometimes more than once per day :)

Crates.io has 3700 crates in stock. That said, there are still gaps, like with any young ecosystem. It's really progressing nicely though. And given Rust's domain, there are packages for really interesting stuff, like OS dev...

</comment></comment></comment><comment><USER28> _Every word has its own place, every place has its own word_

Starting startup with language X depends on how that language were used in industry, starting hardware startup with Python/Ruby is strange, but for web startup its totally fine. Now think about creating web site in C++ with average C++ developer.

There is also cost of talent, if you own expert C++ developer than probably writing web site in C++ can make sense, because you have a talent who can manage and fix every bug/feature. Finding professional Python/Ruby web site developers are easier than finding C++ web site developer.

</comment><comment><USER29> Ah one of our core systems is in C++, though it is for video processing and needs to work with multiple platforms. I suppose nobody has questioned the C++ choice because its a more "typical" use-case

</comment><comment><USER30> Wondering how Swift will play in this arena now that is open sourced - <USER2> performance ? According to this ([http://www.primatelabs.com/blog/2014/12/swift- performance](http://www.primatelabs.com/blog/2014/12/swift-performance)) for some workloads does approach C++.

<comment><USER31> What's the state of Swift for web development? Are web frameworks starting to appear?

<comment><USER32> There's perfect.org that came out in Nov 2015.

</comment></comment></comment><comment><USER33> I think you hit the nail on the head early in the post. C++ is what you are most comfortable with. I believe that is the number one reasoning, at first at least (prototype, mvp stage), in deciding that language/stack to use. Use what you know the best as the tech lead, everything else will fall into place.

</comment><comment><USER34> I don't think that

       auto start = std::chrono::system_clock::now();
       // benchmark something here
       auto end = std::chrono::system_clock::now();

is concise. I think that

       start, end = benchmark do
       #  benchmark something here
       end

is concise.

</comment><comment><USER35> [https://www.techempower.com/benchmarks/](https://www.techempower.com/benchmarks/) also show the fastest HTTP servers are written in C++.

</comment><comment><USER36> No one doubs the performance of C++. What I would really like to see is arguments about speed of development, ease of testing, etc. This articles argues alot about language features or libraries, but what about the bigger picture? It is not enough for the HTTP server be fast. It also needs to do REST API, auth, etc. How does that compare to for example node/js.

<comment><USER37> One C++ advantage is, at 40X the horsepower, they _didn 't_ have to deal with scaling configuration right away. They can put that off, and deal with proving their product instead.

<comment><USER36> The argument is you do not need a load balancer because performance of one host is good enough. But that would become a single point of failure. And thats why AWS is so awesome. Start with an autoscaling group when you create your ec2 instance, you dont really need alot configuration.

</comment></comment></comment><comment><USER38> Aren't a lot of startups using dynamic languages because those are more popular? We use Javascript everywhere since that makes it a lot more easy to hire new people.

</comment><comment><USER39> The main problem I imagine is as the platform/codebase matures, there may be compatibility issues as the compiler changes, as the underlying hardware changes, etc. This is something that is well hidden by a language like Python. I remember having to support a cross-database and cross-platform C/C++ server back in the day, and the maintenance was a nightmare. Having the luxury of virtualizing your hardware makes this step a lot easier, that's for sure.

</comment><comment><USER40> I would find it hard to believe that c++ can be that much faster for many websites since the bottleneck would be the I/O subsystem. I don't understand how they are getting this 40x speed up. I wonder what the benchmark looks like.

<comment><USER36> Its more like, with 2gb ram and 2.0ghz cpu, how many requests can you handle? Its not surprising language like C++ would win.

<comment><USER41> Funny you say that given I'm dusting off an old laptop that has a 1.xGhz Core Duo CPU and 2GB of RAM. It's the next one to be used for performance and stress testing. The reason? Anything that can't run snappy on that box is just bloated or wasting resources. Lean, native code tends to do the job nicely. :)

Note: Also good to do it on cheap, throwaways because this sort of thing burns out the CPU's. Better that box than my main one.</comment></comment></comment>


Randomized response - <AUTHOR> https://www.dartmouth.edu/~chance/teaching_aids/RResponse/RResponse.html <comment><USER2> Another name for this is Differential Privacy: [https://en.wikipedia.org/wiki/Differential_privacy](https://en.wikipedia.org/wiki/Differential_privacy)

</comment><comment><USER3> Minor hiccup on your LaTeX translator... It outputs YES N0 (instead of YES NO)</comment>


Python: Save the interactive interpreter's state and reload it anywhere - <AUTHOR> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572213

<comment><USER2> Can this be used to implement continuations?</comment>


In sync: How to take control of your many body clocks - <AUTHOR> https://www.newscientist.com/article/mg23030690-300-in-sync-how-to-take-control-of-your-many-body-clocks/ <comment><USER2> Do you have a link to a version of this that's not behind a paywall?</comment>


3 Lessons you Mistakenly Inherited from your Parents - <AUTHOR> http://www.gobignetwork.com/wil/2007/5/24/3-lessons-you-mistakenly-inherited-from-your-parents/10159/view.aspx <comment><USER2> College and the Steady Job are still the safest path for the vast majority of people. Risk-taking is not in everyone's blood. Most want a sense of security. Artificial or not.</comment>


You are Brilliant. Have a Great Idea. Starting up in India? - <AUTHOR> http://www.thestartupcentre.com/resident/

<comment><USER3> the money is too low!

<comment><AUTHOR> The Model is slightly different. The process is split into two parts - <USER2> Resident where the focus is on customer validating your product, and the Accelerator Phase where teams are funded with $20,000 to a max of $50,000. The key metric against the Accelerator is also to enable the teams to get their first few anchor customers, so that they can get their "model" in place.

This is the pre-cursor to the programme. 8 months into the programme (since resident programme candidates will be first preference for the accelerator programme) the teams will be eligible for the investment.

Hope that helps.

<comment><USER3> Thanks for the reply. Does resident phase offers accommodation?? when does the accelerator phase starts??

p.s- we are a startup from coimbatore

<comment><AUTHOR> It doesnt include accomodation. But we can probably help. The resident programme runs for about 6 months. The accelerator programme starts in November.

<comment><USER3> please leave your email! we could chat, Thanks</comment></comment></comment></comment></comment>


Play Song ► Internet Programmer Heroes - <AUTHOR> http://www.pubnub.com/blog/internet-heroes-song-crockford-dahl-wall-torvalds-resig-souders

<comment><USER2> They mention Linus, but don't mention RMS?</comment>


Colors of the iOS7 App Store - <AUTHOR> http://blog.brandisty.com/brand-management-blog/colors-of-the-ios7-app-store/

<comment><USER2> This is super neat, but the top 5 icons is a very small sample to draw any conclusions from.

If you wrote a script to fetch the icons and do the subsequent analysis, it should be trivial to modify it to fetch a few hundred icons in each category instead, which should yield more accurate results. You may find out, for example, that a few colors are just as equally represented and that there is no real "dominant" color for a category.

But if you fetched the icons by hand, this would be problematic...

<comment><USER3> Yeah, the article quite a clear example of a blind application of statistical tools, the only useful thing being their idea to do quantitative design research. The top five is only a reasonable selection if the search is for patterns linking the top contenders per category. Trying to find indication of what positively influences a top ranking in a certain category without considering what those outside the top have done is astonishingly wrong.

<comment><USER4> +1 -- although their execution gets a 10/10\. Very prettily done, but the actual content is pretty useless. Sorry, :(

</comment></comment></comment><comment><USER5> Should this impact my icon design, or is it just a representation of the most popular apps. Is there a good way to separate the two?

<comment> k-mcgrady When looking at social blue is overwhelming. I would go with something other than blue as it would obviously stand out in the listings.

<comment><USER6> This xkcd came to mind: [http://xkcd.com/993/](http://xkcd.com/993/)

</comment></comment></comment><comment><USER7> I would have bet in a mild tone of blue (similar to the same App Store icon) would be one of the most common. Somehow, every time I swipe in multitasking most icons strike to me as blue-ish (Skype, Dropbox, App Store, Mail, Safari, Alien Blue, Tweetglass, Kindle, Textastic...) Probably just a too small sample, but a very interesting data check.

</comment><comment><USER8> Thanks for putting this together! It's very interesting to see the differences across various app categories.

</comment><comment><USER9> I wonder why Akinator and Pocket God are in Entertainment and not Games...

</comment><comment><USER10> isn't top 5 per category way too little? if you wanna know what colors are popular in a category, shouldn't you look at like a couple hundred icons?

</comment><comment><USER11> This is really interesting to see - nice work!</comment>


The myth of the ISIS encrypted messaging app - <AUTHOR> http://www.dailydot.com/politics/isis-alrawi-encryption-messaging-app/ <comment><USER2> "All of the media articles on the Alrawi app showed screenshots of a different app entirely, one that is a glorified RSS reader with a totally different name."

There was an article on the front page of HN recently about this "glorified RSS reader." This article actually described that functionality, and made no mention of any encrypted messaging. Despite that, it was submitted with a title that indicated it was an encrypted messaging app, and the comments were full of discussions about encrypted messaging and the eternal conflict between privacy and anti-terrorism efforts.

It really confused me. I guess this is an app that people really _want_ to exist.

<comment><USER3> Link to HN post? I can't find it searching for "Alrawi" or "ISIS encrypt".

<comment><USER2> Here: [https://news.ycombinator.com/item?id=10916731](https://news.ycombinator.com/item?id=10916731)

I believe the title was changed afterwards to better reflect the article's content. You can see lots of comments that think it's a chat app.

</comment></comment></comment><comment><USER4> Somewhat related: there's an online German opsec magazine aimed at mujahideen, named Kybernetiq.[0] It's pretty slick. The first issue[1] included a GPG tutorial and a review of a "jihadi" messaging app (they don't recommend it).

[0] [https://twitter.com/kybernetiq](https://twitter.com/kybernetiq)

[1] [https://archive.org/details/kybernetiq_magazin](https://archive.org/details/kybernetiq_magazin)

</comment><comment><USER5> Reminds me of the Nayirah testimony, in that stories have high risk to be manufactured if it plays perfectly into the narrative of an political interest.

<comment><USER6> Cause I have to much karma points I'll also mention this also happened during the Nuremberg trials.

Really ridiculous stories taken as fact at the time and people still believe even though historians now discount.

We keep getting played.

<comment><USER7> This never really stopped happening. If you want to read intelligence to support viewpoint X, you can always find someone willing to say X.

</comment></comment></comment><comment><USER8> Yeah, it's pretty believable that it's a myth, but do you ever get the feeling that people in the tech community want it to be a myth a little bit too much? Just like people on the other side really want it to exist.

The idea of it certainly poses an interesting dilemma, especially if you are invested in being for strong encryption and against Government surveillance. How well will those idea hold up if it ever turns out that evil terrorist armies really are using strong encryption to carry out mass murder and acts of War in the West?

<comment><USER9> I don't see the link between terrorist armies using strong encryption and government surveillance. Is there one, besides the fact that people like to use terrorism as an argument?

"Encryption" to "math" should be the next popular browser extension.

<comment><USER8> Terrorists need to communicate with each other to plan attacks. Governments need to gain intelligence on terrorist activity to thwart attacks. Much of that intelligence reportedly comes from electronic surveillance of communication. If terrorist groups were to start using strong encryption well, it would presumably make it significantly harder to gain information on their activities and thwart their attacks.

A lot of this necessarily happens in the dark, so we may not know for sure exactly what's happening until decades after the fact. You don't exactly want to advertise to the enemy that you can or cannot intercept their communications - that would tell them how to be more effective in attacking you.

Many national governments do indeed use strong encryption to protect their communications, and the outcome of many battles, and arguably of some entire wars, has hinged on the ability to crack that encryption, or lack thereof, and the ability to keep the fact that you have done so secret from the enemy.

<comment><USER10> It's convenient that they can justify the risk to democracy with information we aren't allowed to see. I guess we'll just have to take it on faith

</comment></comment></comment></comment><comment><USER11> Obviously they are using encryption, but it is a very ad-hoc movement so computer literacy will be very uneven. I think suggesting no one in ISIS uses encryption can only be wishful politicized thinking... being in ISIS doesn't automatically mean you are cow level stupid and you shouldn't think so.

</comment><comment><USER12> Don't know why, but I am not surprised by this at all. In fact, it kind of amuses me to see this myth debunked.

</comment><comment><USER13> BY the way, they don't talk about it now, but originally in 2001 the media reported that "al queda" was a code name used by the CIA for their database of mujahideen fighters. Somehow the narrative later morphed into "al queda" being a massive global conspiracy of "cells" with a leader, and all that, a big old boogeyman. But they forgot that for this to be the case, we have to believe that Osama Bin Laden -- Tom Cruise in Mission Impossible One style-- stealth his way into CIA headquarters and found this top secret code name they used for the Mujahideen fighters they were funding in the 1980s, and decided to name his secret, global, hidden, evil genius organization after it.

It's kinda nonsensical. But fortunately for the government, most people don't pay much attention.

At any rate, the propaganda/misinformation efforts are very real and ongoing.

<comment><USER14> [https://en.wikipedia.org/wiki/Al- Qaeda#Name](https://en.wikipedia.org/wiki/Al-Qaeda#Name)

<comment><USER15> Your link appears to tell a different and unclear story:

Bin Laden explained the origin of the term in a videotaped interview with Al Jazeera journalist Tayseer Alouni in October 2001:

The name 'al-Qaeda' was established a long time ago by mere chance. The late Abu Ebeida El-Banashiri established the training camps for our mujahedeen against Russia's terrorism. We used to call the training camp al-Qaeda. The name stayed.[83]

It has been argued that two documents seized from the Sarajevo office of the Benevolence International Foundation prove that the name was not simply adopted by the mujahid movement and that a group called al-Qaeda was established in August 1988. Both of these documents contain minutes of meetings held to establish a new military group, and contain the term "al- Qaeda".[84]

Former British Foreign Secretary Robin Cook wrote that the word al-Qaeda should be translated as "the database", and originally referred to the computer file of the thousands of mujahideen militants who were recruited and trained with CIA help to defeat the Russians.[85] In April 2002, the group assumed the name Qa'idat al-Jihad, which means "the base of Jihad". According to Diaa Rashwan, this was "apparently as a result of the merger of the overseas branch of Egypt's al-Jihad (Egyptian Islamist Jihad, or EIJ) group, led by Ayman al-Zawahiri, with the groups Bin Laden brought under his control after his return to Afghanistan in the mid-1990s."[86]

</comment></comment></comment><comment><USER11> Doesn't make sense to make such an obvious target of an app; you'd use stuff with a crowd of other uses and users to hide in. This could be a decent honey pot.</comment>


How the US Forced China to Quit Stealing–Using a Chinese Spy - <AUTHOR> https://www.wired.com/story/us-china-cybertheft-su-bin/ <comment><AUTHOR> You need insider to break the one. Hong Kong is your insider now that it is officially just another China city. Do not think China as one hegemony. Fight it as one, but not fight as one!</comment>


More Android phones than ever are covertly listening for inaudible sounds in ads - <AUTHOR> https://arstechnica.com/security/2017/05/theres-a-spike-in-android-apps-that-covertly-listen-for-inaudible-sounds-in-ads/ <comment><USER2> ArsTechnica unfortunately again misleads people due to limited expertise.

On modern Androids (6.0+) accessing the microphone requires an explicit permission granted by user (just like on iOS). Furthermore, due to Doze mode implemented in 6.0 and expanded in 7.0 running these kind of services without notifying the user cleary (with permanent notification) has become pretty much impossible and unreliable. To run in background when the phone isn't in active use the service needs to be marked "Foreground" which demands a permanent notification.

Having said that - Google is failing here in several ways. First, they STILL let apps be published that don't target Android 6.0. Apps that target older Androids get permissions granted at install time (those can be revoked, but user needs to go to settings for that). There's no reason to let people publish new apps that don't adhere to new permission model, but Google just doesn't care.

They also need to clearly mark use of system resources in the background - just like we have the GPS icon, we need a clear indication of active microphone, speaker and other hardware modules while running in the backgorund.

<comment><USER3> Nearly 2/3rds of Android phones that have accessed the Google Play store in the week leading up to May 2nd are not on Android 6 or later:

[https://developer.android.com/about/dashboards/index.html](https://developer.android.com/about/dashboards/index.html)

<comment><USER2> I'm not sure what you're comment is trying to say - TARGETING a new API doesn't meant you don't SUPPORT an older API. It just determines backwards compatiblity behaviour. We currently release a product that supports Android 4.1 while targeting Android 7.1.

Also this dashboard is hugely misleading for the HN audience - in western audiences (USA, Canada, EU, etc. - countries HN users are from) we're tracking ~10% devices that are running Android 4.x and more than 40% devices running on Android 6.0 with additional 15% on 7.x - meaning more than half of active western users are running decently modern Android.

<comment><USER3> What it's trying to say is that this can be a big problem even if it doesn't affect Android 6 and up. Your own statistics say it can affect up to 45% of Android users.

<comment><USER2> I completely agree. The Android upgrade situation is a huge and rather well known issue.

<comment><USER4> Not to Google, as they don't care.

Now with Android N reaching 7%,one year later, who do they think will even bother with Android O?

<comment><USER5> I work on a large Android app and we do bother with Android O.

As soon as the sdk will be final we will think about compiling against it and targeting it.

We are not in a huge hurry, it can skip a release or 2 (we release every 3 weeks). There are no big breaking changes though (unlike let's say Marshmallow) so as long as the support lib is stable (it needs to match with compile version) we are going to support it ASAP.

We also have some N features like shortcuts.

<comment><USER4> How many customers do you feel will have devices with Android O, given Android N is around 7% after one year?

<comment><USER5> It goes further than that.

First, that 7% figure is the whole Android (with play services) user base, numbers are pretty different on the dashboard of our general public app.

Secondly, we will start by compiling for O : the supports libraries are only tested for their corresponding compile version. That way we will be able to use new support lib features on all Android versions.

Then, we will target O (probably in the same release of the app). It should be pretty trivial : this is not marshmallow with the new permission system, system level changes in O are manageable.

For clarification, the build script of an android app separates compile version (= binary compatibility) and target version (= you handle the new behaviors of the system like granular permission in M)

By targeting O ASAP we :

\- are potentially able to ship some features based on this release, like shortcuts for N. Sure, we are not going to spend a lot of dev time on an O-only feature right now but there are some easy wins. And of course the install base does not stay small for very long.

-are able to detect potential problems before OEMs start launching flagships with that Android version and we get millions of crashes / day.

There is really no good reason to stay behind.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I've become totally superstitious (convinced, even) that phones are listening to more than just ultrasound. There have been too many uncanny situations where youtube or google have recommended results that were far too specific to the conversation happening moments before. For example, one time I was telling my girlfriend about fourier transformations, something she'd never heard of before. She typed "Fo" into her phone. "Fourier transormation" it suggested. Maybe this was due to the IP address we were connected through. That alone is creepy enough as it is. Sometimes I wonder if it isn't something more though.

Facebook messenger and google voice search are my number one suspects. But moreso, all it takes is a single person in a room full of phones to have installed an app that's using the microphone unethically, and suddenly everyone's conversation is being turned into marketing/spy data. Anybody who's connected somehow to that location is going to be statistically associated ("implicated") with this data.

<comment><USER7> No common friends, but college girlfriend recommended as potential friend on Facebook is my creepiest data mining moment ever.

<comment><USER8> I think that works based on location. A few years ago there were reports of people who shared a psychiatrist being recommended to each other, based on their frequent visits to the office.

</comment></comment></comment><comment><USER9> I'd like to be able to find an Android utility that shows me apps/processes that are auto-launching in the background and kill them, but my last attempt yielded two that I tried and blacklisted (a feature it has) some apps, yet after booting I was still able to force stop them, implying they still had launched on their own.

Is there any app that actually works for this, or is it somehow not possible?

<comment><USER10> Not sure if it's exactly what you're looking for, but greenify might do the trick. You might need root.

Also Android now has the doze feature that should hibernate apps by default when not used.

[0][https://play.google.com/store/apps/details?id=com.oasisfeng....](https://play.google.com/store/apps/details?id=com.oasisfeng.greenify)

[1][https://forum.xda-developers.com/apps/greenify](https://forum.xda- developers.com/apps/greenify)

<comment><USER11> that's quite amusing suggestion considering Greenify is closed sourced Chinese root app which optionally (only?) report data back to mainland China and dev worked for some companies producing shady apps, before according his LinkedIn profile

<comment><USER12> Could you back this up / substantiate your claim, please?

<comment><USER11> there is option to send some statistics data back to developer, it's opt-in

I am not saying he is actualy sending some other data without permission of user, but being closed sourced Chinese ROOT app is more than enough to stay away from it in days of Nougat/Marshmallow making this app pretty much useless anyway.

</comment></comment></comment></comment></comment><comment><USER13> This is the work of a library used by certain apps, not of Google (although it wouldn't surprise me if Google turned out to be doing the same, discreetly). I think Android should have way clearer notifications that your mic or camera are being used in the background, like iOS does, even if it may be cumbersome.

<comment><USER14> Yes there should be an icon when your mic is active. I tried to build a service in Android to do this but there's no API to get whether the mic is in use or not AFAIK. I ended up disabling mic access for almost all apps, but the Google App and Google Play Services complain when you do this.

<comment><USER15> I'd go even further and light the notification LED the entire time something is reading the camera/mic from the firmware (such that applications can't disable it via software). The indicator works well for the webcams on most laptops.

<comment><USER16> Notification LED? A majority of phones(in the US) don't come with this and the ones that do need root permission to access it.

<comment><USER17> you are correct, but this was mostly brought up for historical reasons: researchers discovered an osx malware that after disabling the camera LED on older macbooks could secretly record the owner.

</comment></comment></comment></comment></comment><comment><USER18> Between this and the recent research paper I read about using the front-facing camera on mobile phones to track where I'm looking on web pages, I just want to unplug.

</comment><comment><USER19> There's an app called D-Vasive (no affiliation) that alerts of mic and camera usage on your phone. I've been using it for years, but it's only alerted me in predictable situations so far. I don't download a whole lot of apps however. It's nice to have as a bit of peace of mind.

</comment><comment><USER20> Why does android trust developers so much? Just lock down the apps already, and make microphone usage obvious.

<comment><USER21> Android doesn't trust developers. It trusts users - everything has to be disclosed and users have to agree. It is a open platform, not walled garden.

We have [https://en.wikipedia.org/wiki/Dancing_pigs](https://en.wikipedia.org/wiki/Dancing_pigs) problem there.

<comment><USER20> Thanks for that, it seems to explain most of the problems security faces today. It's similar to how social engineering works, for example, even if someone was told that plugging in a dropped USB stick is dangerous, they may still do it because of the burning curiosity inside. ( I myself would take a peek, at least on a sandbox or VM )

</comment></comment></comment><comment><USER22> Is it possible to damage human hearing with sufficiently loud pulses above 20Khz?

Most search results point to a miniscule wattage delivered by typical ultrasonic noises, but controlling for wattage, I feel like it might be possible to overdrive a high-frequency pulse to deliver more wattage in the same range.

Also, relevant: [https://en.wikipedia.org/wiki/Cinavia](https://en.wikipedia.org/wiki/Cinavia)

<comment><USER23> I don't know but I would say that if the ear does not pick up the energy above 20khz, then it cannot be harmed either.

<comment><USER24> Your eyes are also unable to see infrared, or ultra-violet, yet either with sufficient power will blind you. In fact it's often much more dangerous than visible light, because the light won't trigger your blink reflex.

Sound is just vibration in the air, and if the pressure is high enough, you're going to suffer. High frequency ultrasound is used for various medical treatments, most of which involve localised killing of cells.

[https://en.wikipedia.org/wiki/High- intensity_focused_ultraso...](https://en.wikipedia.org/wiki/High- intensity_focused_ultrasound)

<comment><USER25> >> I would say that if the ear does not pick up the energy above 20khz, then it cannot be harmed either.

> Your eyes are also unable to see infrared, or ultra-violet, yet either with > sufficient power will blind you.

Sufficient power delivered by IR radiation can easily set you on fire, regardless of whether the part of you that's burning was sensitive to light or not. And UV can do much nastier things.

But it's hard for them to have any effect without depositing energy. It's absolutely correct that if an ear, or anything else, doesn't pick up energy from whatever you're throwing at it, it cannot be harmed.

Why worry about hearing specifically as a target for ultrasonic damage? As you yourself point out, sound can deposit energy regardless of the particular physical structure it's hitting. Delivering enough IR to the ear will destroy your hearing, but not because of any property of your hearing or your ears. Is there reason to believe that ears or hearing are more sensitive to ultrasound than, say, your nose is?

</comment></comment></comment></comment><comment><USER26> Is there any legitimate need for a phone mic to pick up sounds way outside the range of human speech and hearing? If this sort of thing should not be allowed, why not just add a software low-pass filter in the front of the audio input chain? What would the side effects of this be?

</comment><comment><USER27> I wonder what it would take to make an app that does this exact thing and listens in order to hook into whatever and prevent malicious apps from beaconing. Also seems useful in order to see if there are any such ads out in the wild yet.

</comment><comment><USER28> Found some more details on this technology.

[https://github.com/MAVProxyUser/SilverPushUnmasked](https://github.com/MAVProxyUser/SilverPushUnmasked)

</comment><comment><USER29> I wouldn't be surprised if Google, Apple or Amazon are doing (or going to do) something similar. It doesn't create much traffic at all, a couple of bytes is enough and they can be tacked on to the data stream without anyone noticing.

Someone should build an ultrasonic detector that can recognize these kind of packets and have a look how wide spread this technique already is. We could also need an ultrasonic jammer and ways to add low pass filters to our mics, like some special tape we can place over it to absorb the high frequencies... maybe normal duct tape is already enough.. hmmm

<comment><USER30> Apple would never do something like this. It's totally against their MO.

<comment><USER31> Apple is made of people. People who change, people who come and go. Maybe Apple today wouldn't, but tomorrow Apple will be a different company.

<comment><USER32> Apple's OS design philosophy makes this extremely difficult, even if someone wanted to sneak it in. The OS notifies of such activity (mic active) on a system level, and the permission model requires explicit permission at time of first access attempt, even for most of Apple's own apps.

<comment><USER33> How could you know this though? There's no source code to audit or anything.</comment></comment></comment></comment></comment>


Vibrant.js: Extract prominent colors from an image - <AUTHOR> https://jariz.github.io/vibrant.js/

<comment><USER2> Are you changing the code, or is it nondeterministic? I just reloaded and the last three pictures (cat, car, peacock) all had their vibrant color change.

Edit: Interestingly, it looks like it may sample the image at its visible size and not the full source image. If I resize my browser, triggering various media queries and thus image sizes, the dominant colors change after reloading.

<comment><USER3> Interesting, you're right! For me, the image of the bird (4th one) shows the most variation. The cat changes a bit too; the others seems relatively stable.

At first I thought it would be the same, since the percentage of each color should be roughly equivalent; but then again, the images themselves are being resampled on resize, so there may be individual pixel colors in one size image that aren't in another.

Still, though, the point of a proper resampling algorithm is to maintain the same general perceived appearance of the image at different sizes; assuming it is doing this well, you should expect to see the same dominant colors.

Of course, the algorithm also might just be sampling every nth pixel, which would mean a different sample group depending on the size.

</comment></comment><comment><USER4> Neat! This reminds me of my fiancée's project:

[http://steamy-screenshots.herokuapp.com/](http://steamy- screenshots.herokuapp.com/)

[https://github.com/moneypenny/steamy- screenshots](https://github.com/moneypenny/steamy-screenshots)

You can specify a steam username or game title and it will pull in screenshots and use the extracted colors to style the page.

I think she used a port of Panic's iTunes album art color algorithm. I am not sure if she had heard of Vibrant.js or not.

<comment><USER5> Reminds me of something similar I have done for a "machine vision" course using OpenCV (C++).[1]

The basic idea is to get the histogram and check for dominant colors.

(There are other implemented features as well, like texture, if you're interested)

[1][https://github.com/RaedsLab/Comparify](https://github.com/RaedsLab/Comparify)

</comment></comment><comment><USER6> I made it too based on a StackOverflow answer a few years ago, but this one is probably much better (I hadn't even put a package.json at the time). However, the SO thread is really interesting, I suggest you give it a look if you're interested in _how_ to solve this issue.

[1] [http://stackoverflow.com/questions/13637892/how-does-the- alg...](http://stackoverflow.com/questions/13637892/how-does-the-algorithm-to- color-the-song-list-in-itunes-11-work)

[2] [https://github.com/arcanis/colibri.js](https://github.com/arcanis/colibri.js)

</comment><comment><USER7> Great! Reminds me of color thief: [http://lokeshdhakar.com/projects/color- thief/](http://lokeshdhakar.com/projects/color-thief/)

<comment><USER8> Color thief is actually credited in the vibrant.js source: [https://github.com/jariz/vibrant.js/blob/master/src/Vibrant....](https://github.com/jariz/vibrant.js/blob/master/src/Vibrant.coffee#L9)

</comment></comment><comment><USER9> I just started a similar project a couple weeks ago. After getting the prominent colors, recoloring the original image makes a pretty neat effect.

[http://www.jaredharkins.com/posts/palette.html](http://www.jaredharkins.com/posts/palette.html)

<comment><USER10> I tackled the same problem. In fact, I utilized the same strategy you did. It is essentially the same, but allows for the user to input a gif and receive a reconstructed gif using only its "palette."

[https://github.com/salkj/palette](https://github.com/salkj/palette)

</comment></comment><comment><USER11> In the old days of NTSC video, we did this with a vectorscope: [https://en.wikipedia.org/wiki/Vectorscope#Video](https://en.wikipedia.org/wiki/Vectorscope#Video)

</comment><comment><USER12> What is the use cases for these palettes? I got this nice color palette, but have no idea what to do with it ...

<comment><USER13> The most prominent implementation is the album view of iTunes on the desktop: [http://stackoverflow.com/questions/13637892/how-does-the- alg...](http://stackoverflow.com/questions/13637892/how-does-the-algorithm-to- color-the-song-list-in-itunes-11-work)

</comment></comment><comment><USER14> How about the inverse: given a palette and a set of images, return only the images that "match" the palette.

Could be useful for web design. The other way around often does not work, because once you are stuck on a palette you need to find images that match it.

<comment><USER15> Here's a tineye project that does that with flickr photos: [http://labs.tineye.com/multicolr/](http://labs.tineye.com/multicolr/)

</comment></comment><comment><USER16> Pretty cool. Interestingly, it seems to me like it's getting the vibrant colors just slightly off. Like the red from the dress should be brighter, and the yellow from the car should be a bright yellow instead of a mustard color. Is my brain just perceiving that the text on the car is bright yellow, while the actual color in the image is much darker?

</comment><comment><USER17> Cool.

You can also use the "quantize" module on npm to get prominent colours. Example: [https://www.npmjs.com/package/get-rgba- palette](https://www.npmjs.com/package/get-rgba-palette)

</comment><comment><USER18> This is great! definitely going to use this in the future.

</comment><comment><USER19> Is there a js library for organising an array of colour swatches by hue (or other values)?</comment>


HabitRpg: A habit building app that treats your life like a game - <AUTHOR> https://habitrpg.com/static/front <comment><USER3> This interface paradigm has, I believe, become known as _gamification_ ; an example from another domain, language learning, would be Duolingo[0].

Engaging as such applications are with their stimulus of powerful primordial triggers, they all too often transport not just a game's gratifying aspects into the problem domain (todo lists, in this case), but also the gaming mindset, resulting in terribly linear interfaces and data structures.

I do believe that even a serious todo list application, or, as it were, language learning platform, would benefit from similiarly engaging elements, effective by virtue of our cerebral heritage.

Nevertheless, I have yet to see a successful marriage.

A gamified Emacs Org-mode[1], perhaps?

[0] An ingenious platform that ostensibly allows anyone to learn a language by doing bite-sized exercises and translating sentences, while effectively training the proprietary Duolingo translation engine. See [http://duolingo.com](http://duolingo.com)

[1] [http://orgmode.org/](http://orgmode.org/)

<comment><USER4> My first response to the article title was "I've already gamified my habits - I use org-mode". Trying to check off as many yellows (and reds!) every day as possible, not-breaking-the-chain by continuing the green line. It's sad, but it does give me a warm fuzzy feeling.

Of course, to each his own; many can't understand how anyone could stand to play nethack, which is about the level of "gamification" of org-mode currently.

<comment><USER5> [https://github.com/ryjm/habitrpg.el](https://github.com/ryjm/habitrpg.el)

</comment></comment></comment><comment><USER6> Looks like it's missing a bunch of retention hooks to bring users back to continually engage and check int. Whether it's email reminders, notifications etc. I created an account 2 weeks ago, only remembered about HabitRPG now after checking out HN.

</comment><comment><USER7> I'll second RazvanPanda, this has been lifechanging for me. I tend to have a lot of trouble with ADLs (activities of daily living) and this really helps me keep on top of them. Trivial example: I've been _consistently_ flossing nightly for a month and a half now.

</comment><comment><USER8> I highly recommend this, it changed my life, well, at least one of the three lives I still have left [http://i.imgur.com/XN6z8US.png](http://i.imgur.com/XN6z8US.png)

</comment><comment><USER9> It's also open source and available on github [https://github.com/HabitRPG](https://github.com/HabitRPG)

The girlfriend and I have been trying it out the last week or so, it's a pretty good way to keep the flat tidy it seems.

</comment><comment><USER10> I find the UX not quite there.

For example, it doesn't let me stay logged in (no remember me). So, every time I want to check off something I have to bring up the login modal and login (which for some reason doesn't always work with lastpass). Why not include a remember me?

Also, there is no way (I know of) to go back in time and check a box. I just started using it, and I forget at night to check that I did get my coding done. There's no way to go back to yesterday's date and check it. So, I keep missing points.

<comment><USER11> One thing you could do is have your day roll over at, say, noon; and then you can check in the next day instead (at the cost of having to remember what you did before noon today, until afternoon). I agree, it's not perfect.

Time travel is a tricky issue, because if you're in a party and taking part in a quest, your missed dailies hurt your party members. So if you go back and say "actually I did that thing", ideally it needs to restore health to them, after some of them might have died, etc.

</comment></comment><comment><USER12> Gamification of boring daily activities is the future in my opinion.

Check this out (ignore the ending and story, it's kind of dark) [https://www.youtube.com/watch?v=GJKwHAvR4uI](https://www.youtube.com/watch?v=GJKwHAvR4uI)

</comment><comment><USER13> It's like Pivotal Tracker except you get gold rather than points and you track your life rather than just projects. ;)

Ads are super annoying. Probably the wrong way to monetize something like this. Maybe even make a micro payment as part of the system. Lose X - <USER2> real money. Want to cheat to get your prize? Pay real money.

You could setup Trello to do something like this. Maybe tap into the API to create a report or something. More flexibility, less cuteness.

</comment><comment><USER14> The Android version is going to need a lot of polish. The menu is jittery and the wrong icons are used. Also the whole app lacks touch feed back so there is no way of telling if you are pressing a button or not until afterwards. Finally, a few idioms like long pressing to edit items and such remain unimplemented which atl east made me confused.

<comment><USER7> I have had zero luck with the android app, but the webapp is perfectly playable from chrome-on-android

</comment></comment><comment><USER15> I would go for this if the Dailies and Todos tied into my ticket systems and email somehow -- maybe make it a social button "Send task to HabitRPG"? Email could be sending it to an email (email@example.com?) like a lot of ticketing systems support.

And is there an app?

<comment><USER16> Yes there is an app, it is simple enough to allow you to tick off tasks, not much else.

There is an API, and I did see integrations with other to-do systems start to pop up.

[http://habitrpg.wikia.co/wiki/App_and_Extension_Integrations](http://habitrpg.wikia.co/wiki/App_and_Extension_Integrations)

I was quite excited to see a discussion about tying in with Trello.

Code is on guthub.

<comment><USER17> Correct link: [http://habitrpg.wikia.com/wiki/App_and_Extension_Integration...](http://habitrpg.wikia.com/wiki/App_and_Extension_Integrations)

</comment></comment></comment><comment><USER18> Chore Wars did this a long time ago.

[http://www.chorewars.com/](http://www.chorewars.com/)

[http://www.penny-arcade.com/comic/2007/07/20](http://www.penny- arcade.com/comic/2007/07/20)

</comment><comment><USER19> Looks interesting. I accidentally closed the tutorial. Is there any way to start it again?

<comment><USER16> Yes you can restart the tutorial.

Settings->Site->Show Tour

</comment></comment><comment><USER20> I started this last week, set up some stuff, and then promptly forgot about it :(

</comment><comment><USER21> I was looking for a todo app last week and stumbled on this one too.

Tried it for 2 days and the first problem I had was that using this at work kind of makes you feel stupid and since that is the main feature of the app I dropped it for which is my top contender for the moment Trello. (tried 2Do, Any.do, Asana, RTM, Wunderlist, Todoist, Toodledo, Todoist, Astrid and some others)

I am still not sure if Trello is what I am looking for but it's working OK so far with some added integration with Pipethru(they work good with Jira) and Zapier(Trello integration), tried IFTTT but they don't seen to like trello.

<comment><USER22> Workflowy

<comment><USER17> I use Workflowy everyday to take notes, organize thoughts etc. But I doubt it's a good enough contender for maintaining a to-do list.

</comment></comment></comment><comment><USER23> Defeat Ask has been around for a bit. Doesn't really look like it's catching on. [https://itunes.apple.com/us/app/defeat- task/id674002993?mt=8](https://itunes.apple.com/us/app/defeat- task/id674002993?mt=8)

By far my fav gasified task list is Carrot to do. Love the story, slick interface. Uber geeky yet awesome. [https://itunes.apple.com/us/app/carrot-to- do/id591840203?mt=...](https://itunes.apple.com/us/app/carrot-to- do/id591840203?mt=8)

</comment><comment><USER24> Amazing and Flawed. In it's current form it's psychologically flawed and broken but the main UI is elegant. There's no reason to purchase armor and swords and level up because there's no battle. There's no battle because there's no story. There's no game. There's no meaning. The mind immediately recognizes it all as a trick.

I'd personally keep the look and UI but get rid of the RPG elements and re- balance the game by using pure reward, punishment, and retention (punishment for not coming back daily).

</comment><comment><USER25> This is awesome, I'm really looking forward to digging into this. I have a similar app at [https://metamorf.us](https://metamorf.us), which gamifies social interactions to improve social skills. Metamorfus is wicked young and has a long way to go, but the goal is to have it as engaging and cool as HabitRPG.

<comment><USER26> I like the idea of metamorf.us a lot, but it seems to me to be solely focused on social anxiety. Do you have plans to expand out of that?

<comment><USER25> What other ideas did you have in mind?

The "do challenges to improve" concept is pretty widely applicable. So far social anxiety is our focus as the whole team that made metamorfus suffers from it.

We do have visions of making sister sites based on the metamorfus codebase for professional development, the honey badger movement, no more mr. nice guy movement, etc. That would be a long ways off (if ever), as metamorfus itself is at MVP quality at best right now and is just a side project for us.

<comment><USER26> I don't think social anxiety is a bad focus at all. I personally suffered from a lot of social anxiety 10 years ago.

My personal focus right now are more like social finesse, being slightly more fun at parties, handling difficult social situations (Calling in debts, interpersonal arguements, close relationships with difficult people, etc)

If you keep up with the social anxiety focus, I'd really like to see some kind of roadmap for success - Examples of what people using the service or similar approaches have accomplished. My understanding of social anxiety is that there's varying degrees of accomplishment for the same effort that people put in - some people are always going to feel awkward.

I haven't heard of those last two movements personally. Have you thought about how your site relates to the PUA movement? I've noticed some similarities. I don't mean that in the I'm currently raising pitchforks way. I think there was some concern within that community about how to help men with social anxiety that got drowned out with all of the fuzzy tophatted snake oil salesman and face-tattooed guys that want you to murder your step kids.

<comment><USER25> Thanks for the feedback!

Ah ok, in that case yes we do hope to expand into those areas you mentioned. Our overall goal with Metamorfus is to become a really good resource on getting better at socializing, regardless of your background or goals. We definitely recognize a website can only do so much and people will respond differently.

We are still building the core of the site and bootstrapping. But we hope to eventually team up with therapists and relationship/communication experts to help provide content and guidance for people. So if you decide to take on a "go to a party" challenge, we hope to also provide tips, advice, and steps you can take to help make going to a party more successful, and cater that advice to your needs and skill level. One member of the team is a therapist who specializes in anxiety, and so we already have a good start on that.

I think the PUA gets a bad rap. Yes it has its problems, but at its core it always felt like a positive thing to me. I don't mind getting compared to it. We will definitely strive to keep metamorfus gender neutral and not make anyone feel uncomfortable though.

Honey badger is the "don't give a f movement" ([http://www.reddit.com/r/howtonotgiveafuck/](http://www.reddit.com/r/howtonotgiveafuck/)), their overall goal is to flat out not care about anything at all. Which has its pros and cons, of course. But so far metamorfus has responded well with that community, many of metamorfus's current members joined from htngaf communities. And No More Mr Nice Guy is this book -- [http://www.amazon.com/No-More-Mr-Nice- Guy/dp/0762415339](http://www.amazon.com/No-More-Mr-Nice-Guy/dp/0762415339) \-- there are in person communities around the country that follow the book, and the book itself contains many challenges and exercises, so a Metamorfus- type site could potentially become an online NMMNG community.

 __and btw, if you come back to the site you should find it much faster now. It was embarrassing how slow it was, we found and fixed the bottleneck :)

</comment></comment></comment></comment></comment><comment><USER27> Around the ~20 minute mark below, video is a few years old but its upbeat and you can listen in the background. Relevant and a good laugh. [http://www.g4tv.com/videos/44277/dice-2010-design-outside- th...](http://www.g4tv.com/videos/44277/dice-2010-design-outside-the-box- presentation/)

</comment><comment><USER28> It's cool, but I'll be really glad when this retro-pixelation fad goes away. It makes me sad that we have great things like SVG accessible now but so many people seem fixated on making games with early '90s 16-bit graphics.

<comment><USER29> I don't think it's a fad. It's just an artistic style at this point. There are a lot of instances where I think it can look better than SVG, but to each his own.

<comment><USER30> Nostalgia isn't a fad. It's a human emotion.

</comment></comment></comment><comment><USER31> This is a really great web app and it helped me a lot on dealing with coping daily tasks and procrastination. Sadly, their android version was broken and unusuable, so I uninstalled it and just kept using the web version.

</comment><comment><USER32> Great idea, I'm not into games but it makes it more fun to make habits. thanks so much for creating this.

</comment><comment><USER30> I love what you're trying to do but find it confusing to learn how to use it.

</comment><comment><USER33> I'm not really sure how this game works. What prevents players from cheating by lying about their real-world activities to prevent loss of game progress?

<comment><USER34> Nothing, but then what is the purpose? You're only cheating yourself, and if you just want to play an RPG there are much better options...

</comment></comment><comment><USER35> You're 5 years too late. Gamification is old now.

<comment><USER36> And time invalidates this how? Databases are old, better stop using them? I've been in the gamification space since before we had that term. It went through a typical hype cycle a couple of years ago but it's just now starting to click with businesses and consumers.</comment></comment>


Docker announce that kubernetesio is now available on the DockerEE - <AUTHOR> https://twitter.com/DockerCon/status/920201037264207872 <comment><USER2> This looks really cool from the videos that they've got up on their Youtube channel.

I'll be very interested to see what choices they made for Kubernetes configuration as there's a lot of options there and they're pitching "it just runs"...

Also looking forward to Docker for Mac/Windows having this support too!</comment>


MacBook Air Mountain Lion Battery Life: 10.7.4 vs 10.8 vs 10.8.1 - <AUTHOR> http://www.macobserver.com/tmo/article/macbook_air_mountain_lion_battery_life_10.7.4_vs_10.8_vs_10.8.1/ <comment><USER2> I suspect something of huge impact happened in the graphics code. Maybe ML is offloading way more tasks to the GPU (it probably has to in order to optimize for Retina), maybe there are some hideous problems in the code - who knows. It's all based on anecdotal observations of course.

My Mac Pro's fan noise, while unnoticeable under Lion, has gotten so loud it's now uncomfortable to watch a movie with. It's only due to elevated temperatures in the "expansion" area where the graphics cards are (the fans on the cards are strangely quiet though). The underside of my 2011 MBP is about, say, 5-10°C hotter on ML.

<comment><USER3> That's funny, I'm noticing cooldowns across the board when using ML on my Mac Pro over Lion, although it's a Mac Pro 1,1. You might consider trying iStat Menus and using it to narrow down the problem, it gives you all the temps of the various locations in the Mac Pro. It will also let you adjust fan speed.

Make sure you reset the SMC too.

<comment><USER2> It's my fault for not being more precise. It's an early 2008 (3,1) Mac Pro with 3 Nvidia GT 120 cards. iStat _is_ the tool I used to determine _which_ areas/fans are running so high: it's the "Expansion Slots". Resetting the SMC was the first thing I tried, it did nothing (which is not unexpected since fan speed starts out normal after startup, then increasing to an uncomfortable 1600 RPM after about 20 minutes).

At this point I'm considering locating the temp sensor to stick a piece of gum on it or maybe disable it outright.

I'm a little ashamed to say that the other alternative is a downgrade to SL, which for the purposes of making peace with a once beloved OS I shall refer to as "The Good Old Times" from now on.

<comment><USER3> I would bet you anything it's those stupid GT120s. There is a reason you can't buy them from Apple anymore. They basically never made a decent Nvidia card. Or, wait for an ML graphics update. $20 says it will solve your problem.

The 4870/5870/6870 is a good choice if you're looking for something more compatible. The drivers for that series are steadily getting better and you can use the PC versions right out of the box with no modifications.

However if you have 3 GT120s for the reason I suspect, you need to power six displays or three dual DVI displays, then you're stuck.

<comment><USER2> Like I said it was fine on Lion and before. Fork over those 20 bucks ;)

I don't think there will be a graphics update for ML by the way. The MP (and whatever cards it uses) is an obsolete platform.

Thanks for suggesting alternative graphics, but I already upgraded from the previous gen ATI cards a few months ago and I'm not likely to buy more parts for this machine again. At this point I'm waiting what Apple does with the Pro and maybe buy a new one (or just leave Apple if they screw this product up too badly).

<comment><USER3> > Like I said it was fine on Lion and before. Fork over those 20 bucks ;)

Sorry I didn't mean there is a hardware problem with the cards, just that the hastily written ML GT120 drivers are most likely the culprit.

> I don't think there will be a graphics update for ML by the way.

Graphics updates are an expected part of an OS X release cycle at this point. We had one for SL, and Lion, and I would expect one for ML. Touchups across the board. What you're ignoring is that you already got a graphics update. By upgrading to ML, you're now on the 64-bit kernel and therefore are using the 64-bit kexts.

> The MP (and whatever cards it uses) is an obsolete platform.

Apple reaffirmed their commitment to the Pro line, so I wouldn't assume that so quickly. Also, behind the scenes evidence highly suggests that isn't the case. If Apple is planning to ditch the Mac Pro, they sure are steadily adding PC graphics card support for no explicable reason to OS X then.

Between 10.6.8 and 10.8.1 we've had support added for generic ATI cards and Nvidia cards of all stripes. Before 10.6.8, you simply couldn't boot a Mac Pro without an official card or card reflashed with EFI firmware.

Now, I haven't had an Apple official or reflashed card in my Mac Pro in a year and I use it every day, including right now. None of this has yet resulted in a product Apple actually sells. That bodes quite well for the future of the Pro line.

</comment></comment></comment></comment></comment></comment><comment><USER4> I'd really like to see Snow Leopard added to this, because absolutely all personal testing I've done has shown that we've been in a steady descent from that point if you care about things like battery life and performance. I simply don't have enough time to objectively measure this, unfortunately, but if you take the aggregate of various benchmarks and reviews, that seems to be the consensus anyway.

<comment><USER5> I posted a very similar reply to a post a couple of days ago linking to the same article (uh..see EDIT below, this is slightly different article), submitted by the same person, who also happens to be the the author of the story (<http://news.ycombinator.com/item?id=4425673>). It appears that post was either flagged or downvoted into oblivion, because it disappeared shortly thereafter (and after seeing this hit again 2 days later, I'm thinking it was pretty justifiable...)

EDIT: okay, so I missed a small detail, the other was about the MBP, this one is about the MBA. My bad..I guess.

Anyway, my experience has been largely the same as yours...I lost a significant amount of battery life when I upgraded to Lion, and apparently it seems like the problem is only getting worse.

The author replied in the other post that he would add Snow Leopard to the test, which should be interesting...I'm expecting that the difference between Snow Leopard and Mountain Lion will be _huge_.

<comment><AUTHOR> Hi toadkick,

Yep, I'm currently sitting here running 10.6.8 battery life tests as we speak. I'm going to make it as comprehensive as I can and run multiple tests on each build of OS X from 10.6.8 to 10.8.2 (prerelease). It will take a while; should be ready by the middle of this coming week.

<comment><USER6> ...and that is after 10.6 supposedly lowered battery life too:

[http://www.anandtech.com/show/2870/done-for-2009-the- holiday...](http://www.anandtech.com/show/2870/done-for-2009-the-holiday- macbook-pro-roundup/7)

I tried 10.5-10.8 on the same MacBook Pro and anecdotally, it really is a downward trend. Looking forward to your benchmarks.

<comment><USER4> Though 10.6 did improve overall benchmark performance from 10.5 which was arguably the first regression in OS X, which from its rough inception managed to get better by the point release. It's actually rather alarming that 10.8 is a continuation in decline rather than making up from 10.7's failings.

I switched from using OpenBSD on all my laptops at 10.3 and now I find it very difficult to continue justifying OS X with all of these performance regressions and how increasingly annoying it is to treat the OS as a solid desktop *nix, which is all I ever wanted. As much as I admire DragonflyBSD, I'm likely going to Linux next.

(What I really miss was how snappy and responsive IRIX was...)

<comment><USER6> The most frustrating thing is that both "the internet" (the blogosphere or whatever you'd call it) and sales numbers are absolutely in favor of Apple's strategy. Sometimes I need to open up the Mac App Store to look at all the grumpy one-star reviews for 10.8, just to know that humanity hasn't completely lost its mind.

</comment></comment></comment></comment></comment></comment><comment><USER7> Should have done a SMC and PRAM reset before performing the tests.

<comment><USER8> And of course, not forgetting repair permissions, a quick shake of the blessed ju-ju stick in an easterly direction, and the feeding of at least 2 manna cookies to the Jobs voodoo doll.

More seriously, has SMC/PRAM reset ever fixed anything for anyone?

<comment><USER9> kernel_task on my rMBP was hitting 100% CPU at seeming random times (about once a day), and it would stay there until I rebooted. SMC/PRAM reset seems to have stopped it happening.

</comment></comment></comment><comment><USER10> The OP (tanousjm) posted the same thing 2 days ago:

<http://news.ycombinator.com/item?id=4425673>

I'm relatively new to HN, but I believe the first comment on tanousjm's original submission is noteworthy (especially since tanousjm posted the same thing twice in as many days).

<comment><AUTHOR> These are different articles, Casseres. First one was MacBook Pro battery tests, this is a follow-up with MacBook Air tests.

</comment></comment><comment><USER11> The way I understand Gatekeeper, it must checksum an app on disk whenever it starts up (correct me if I am wrong)

If that is true, this test may not be representative of typical use; it contains way too many application launches.

I would like to see the effect of Gatekeeper settings on battery life.

<comment><USER12> Gatekeeper only runs the first time something is downloaded and has nothing to do with it.

Codesigning does verify programs each time they are run and this has not changed in many OSes.

<comment><USER11> I checked this, but only got more confused. I made a copy of TextEdit, did all kinds of things with it (append some text to the executable, edited Info.plist and version.plist, threw away a zillion localizations, threw away the _CodeSignature directory), and never got Mountain Lion to complain. The mangled either launched or, in one case (I tried renaming the executable and adjusting the .plists to match), did not launch at all.

The only way I could get a code signing warning is by adding the com.apple.quarantine extended attribute (using xattr)

So, it looks like Mountain Lion only does a signing test for just downloaded apps, and then, I guess, only for downloads by applications that cooperate and set that flag.

I do think Apple has considered/is considering/would like to add more testing, though. Otherwise, I cannot explain the -P flag for codesign:

      -P, --pagesize pagesize
          Indicates the granularity of code signing. Pagesize must be a power of two.
          Chunks of pagesize bytes are separately signed and can thus be independently
          verified as needed.  As a special case, a pagesize of zero indicates that the
          entire code should be signed and verified as a single, possibly gigantic
          page. This option only applies to the main executable and has no effect on
          the sealing of associated data, including resources.

<comment><USER13> This is all by design, and you're surely right about Apple doing more with code signing in the future. In the past, signatures have mostly only been checked in very specific circumstances (e.g., designated requirements for two programs to be considered equivalent by Keychain and the firewall), though the architecture is fairly general, so third parties have been free to cook up their own applications. Still are, though there is no alternative to Developer ID for the Gatekeeper checks, which seems sensible from a KISS perspective, so long as reasonable workarounds exist for developers unwilling or unable to sign with a Developer ID (certainly true today).

</comment></comment></comment></comment><comment><AUTHOR> 10.8.1 improved things a little bit, but running time is still short of where it was in Lion.

We only have one Mac in our test suite that can support it, but we're going to try to test the 2011 MBP with Snow Leopard and compare that to the results on the same machine for Lion and Mountain Lion.

<comment><USER14> How many tests do you run with each configuration? I'm wondering what sort of variation these test have, but it doesn't appear to be discussed.

<comment><AUTHOR> You're right; I'm sorry I missed discussing that. Our testing methodology is to run each test at least 2 times and if the second test is within 5 percent of the first, to average the two results. If there's a greater than 5 percent difference, we run multiple tests until we can determine which result was abnormal and why.

It's not THE most scientific methodology, but it's a decent balance between time and accuracy. In the case of our most recent round of tests, none of the second results were more than 4 percent off the first test.

<comment><USER14> I'm really pleased to hear that. Given the lack of discussion I had assumed the worst, but I'm glad to be wrong, and sorry to presume otherwise. Thanks a lot for following up.

</comment></comment></comment></comment><comment><USER15> I hope this makes some kind of a difference on my 2010 Air. 10.8 really destroyed the battery on this thing.

<comment><USER16> 10.8.1 seems to have improved my battery life on my MBA from 10.8. 10.8 really killed the battery life. But 10.8.1 I'm noticing improvement.</comment></comment>


Exploding Head Syndrome - <AUTHOR> https://en.wikipedia.org/wiki/Exploding_head_syndrome <comment><USER2> I find stuff like this really interesting, a large (double digit) percentage of the population has the condition, and may or may not assume it is normal. I don't have Exploding Head Syndrome, but I do have the Photic sneeze reflex [1], which affects ~20-30% of people. People with the reflex tend to sneeze when they see bright things such as the sun.

My father and I both have it, and it felt great when I told him about it. He was as surprised as I was that it didn't happen to everyone! In a weird way I'm grateful for it, as I'm sure the reflex urged me to stay inside and cultivate my love for computing :). It's too bad it made me dislike the beach as a kid though -- these days I make sure to bring sunglasses.

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

<comment><USER3> I have this, too - found out when I started doing astronomy and looking in the sky all the time. I also have a rarer one: the cough-ear reflex, which affects something like 2%. I involuntarily cough when I put in earplugs. The human body is weird!

<comment><USER4> That seems pretty reasonable/possibly explainable though. Putting eaebuds in deep I can feel a light gag reflex, ears and back of the throat are closely connected.

<comment><USER5> That's interesting if so, as I have some sensoneural hearing loss in inner ear, and had a period in past where I felt like was choking or some unexplained swallowing problems. Thought I was going bonkers when they couldn't find a problem.

</comment></comment></comment></comment><comment><USER6> When I have been stressed out for longer periods of time, I start to get weird problems with sleep. This has included hearing many indistinct voices when going to sleep, waking up to a sleep paralysis with the demon sitting on me / next to me, and sensation of falling immediately after falling asleep (which makes it impossible to sleep). In all of the cases, it seems like the unconsciousness is so occupied that it doesn't want me to rest. Every time, when I have talked about my worries hence processed them, the symptoms have gone away. So to at least to my anecdotal experience, the sleep disorders seem to be caused by held back emotions.

<comment><USER7> If you haven't already, you might want to get checked for sleep apnea. Many of those symptoms, especially sleep paralysis are symptoms of sleep paralysis. And sleep apnea is also known to get worse with stress and anxiety.

</comment></comment><comment><USER8> Another 'interesting' thing: [https://en.wikipedia.org/wiki/Sleep_paralysis](https://en.wikipedia.org/wiki/Sleep_paralysis)

( _Tell me, Mr. Anderson, what good is waking up if you are unable to move?_ )

It happened twice to me and still scared the heck out of me the second time. Been there, done that, can't recommend.

<comment><USER9> Got this three times yesterday. Not a fan. Probably had 4 or 500 incidents total in my life.

<comment><USER7> Might be sleep apnea.

</comment></comment></comment><comment><USER10> I have occasionally experienced this. I once woke up to what sounded like a very loud gunshot right outside of my bedroom window. I actually called the police, half in a fog, until I realized half way through the call that it may have been a hypnagogic hallucination of sorts.

</comment><comment><USER11> I experience this frequently. Right on the edge of loosing consciousness, I sometimes hear what reminds me of an old wooden screen-door slamming into a doorframe. If you know the sound it's unmistakable. It is preceeded by a woosh, like when your blood-pressure suddenly increases.

It usually jolts me awake for a brief moment. I rarely see flashes of light but it sometimes happens.

<comment> duncan-donuts Oh man a wooden screen-door spamming shut is a good descriptor. When this happens to me I'd say the sound is similar to that, but there's like a large cracking sound as well.

</comment></comment><comment><USER12> I've had this happen a few times!

It'll happen usually while falling asleep - a sudden very loud ("overwhelming" is probably a better word since its obviously not auditory) static rising rapidly, sometimes with the image per the page. I never found it frightening, possibly because its so brief. I can imagine it would be terrifying if it continued for longer than a second or too.

Having just read "Fall, or Dodge in Hell" (Neal Stephensons latest novel), this is what I expect he describes when Dodge first gains consciousness. Just... overwhelming random static.

</comment><comment><USER13> This happens to me from time to time! It really is bizarre. I'm hyper attuned to sound, particularly which direction sounds are coming from. When a sound seems to be emitted from within your own head, it creates a disorienting sensation that I experience as a sort of extreme vertigo. For me the sound is never really abrasive and usually manifests as a woman's voice calmly saying one or two words. The disturbing part is just how "clear" the sounds are, like every other sound I've ever heard seems distant in comparison.

</comment><comment><USER14> Weird - I just experienced one of these as I was waking up about 20 minutes ago!

I say "weird" b/c it's not a regular thing, but I have experienced this a few other times, along with similar sudden full-body "spasms" while drifting to sleep. It's not usually alarming, just a strange feeling.

<comment><USER15> One hypothesis for the sudden contraction of muscles is that your brain is losing feeling of the bed supporting your body when going to sleep: [https://en.wikipedia.org/wiki/Hypnic_jerk](https://en.wikipedia.org/wiki/Hypnic_jerk)

<comment><USER16> When this happens to me, it always feels like I'm about to fall forward. The best I can describe it is as the feeling that I just took a step forward but instead of my foot finding the ground, the surface I was walking on ended (as if I stepped off a ledge or something).

<comment><USER15> For me it's the opposite: it feels like someone pushing me out of a tree swing or a chair that has no backrest (I'm sleeping on my side).

</comment></comment></comment></comment><comment><USER17> There are also many other things that could happen when you are going to sleep, for example you can hear voice or see someone. It is called hypnagogic hallucinations.

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

<comment><USER18> I had one of the most incredible dreams ever last week. I was laying on the couch watching something, not feeling too great, and I fell asleep, I think. Thinking I was still awake, I began to see this city by the sea/ocean, and I remarked to myself how incredible it was that I was able to visualize this city so well because I've never hallucinated before. Then I wondered if I could manipulate it like a 3D level, and I could, so I spent some time moving my mental camera around this space, flying like superman kinda but at low speed. Then a Telsa rocketship took off from the city and crashed into the sea, but it didn't explode, it burrowed like a torpedo and turned back towards land. A woman was on a bench by the ocean and it should have hit and hurt/killed her but the rocket just disappeared. Then I realized this must be a dream and woke up. It was so bizarre, I thought I had been awake the whole time.

<comment><USER17> It looks like you enjoyed it which is great!

Mine are always triggered when life stress and anxiety build up and it makes me even more stressed.

<comment><USER18> Yeah very much so, it was like I was in a holodeck visualizing things with my mind. My dreams are always weirdest when I'm sick too.

</comment></comment></comment></comment><comment><USER19> I've had this before, combined with sleep paralysis. It sounds like a load rushing river combined with the sensation of falling, and I _can 't move_. Was pretty scary the first time. If you don't fight sleep paralysis though, it's mostly just like lucid dreaming.

<comment><USER20> The sound that happens during sleep paralysis is a different phenomenon to this, this sound is a very short "shock" sort of sound.

</comment></comment><comment><USER21> Have this one, usually it happens every few years; I've correlated it to stressful / extreme tiredness situations.

For me it's always: All black -> loud bang -> flash of light

A few times there were a heat sensation, tingling.

Once I hard punched a friend who was sitting beside me after "waking up":/

</comment><comment><USER22> Disorders of the waking-sleeping "interface" can be really weird.

Mine: occasionally, when I'm really really tired, as I fall asleep I experience a buzzing in my head that starts out soft and gets louder and louder. After a few moments it's accompanied by extreme panic, temporary whole-body paralysis, and an uncontrollable need to wake back up. This happens over and over and over again, until I finally get out of bed, eat something, wait half an hour, and try again.

I have never seen a medical authority acknowledge this particular disorder, but over the years I've seen individuals on reddit mention the same thing. I have to believe it's due to parts of the brain shutting down in the wrong order as it attempts to transition to sleep.

<comment><USER23> I often get what can only be described as lucid nightmares. I can feel every sensation in my body (down to sexual impulses) but when the nightmare kicks in I won't manage to wake up without screaming.

The thing is, I live alone so in my dream the screaming is muffled and almost useless. I have no idea if its actually loud in 'the real world'. I am almost certain its connected to past trauma given the subject matter in the dreams.

It's crazy what the mind can do when you try and get a good night's sleep.

</comment></comment><comment><USER24> Used to happen to me, somewhat frequently as a child, less and less with age (I probably haven't had it in the past ten years). As I was falling asleep I started to hear some soft rhythmic noise repeating over and over, slowly at the beginning, then faster and faster until it ended in a really loud "bang" after which for a second my head felt entirely empty. (However the bang didn't feel like a real noise, more like an explosion _inside my head_ ).

After I while I learned to recognise the pattern of speeding rhythmic sound and sometimes I would be able to stop it before the bang- lifting my head from the pillow was enough to break the sequence.

</comment><comment><USER25> Yep. I know someone that has this almost everyday of his life and he hears a gunshot or a cannon that doesn't exist. It maybe related to spinal cord compression from a genetic anatomical abnormality in the skull or cervical region between the skull and thorax.

Oddly enough, I accidentally induced this effect on myself by falling asleep laying my neck on the corner of a hard surface. It sounded like someone beating hard once on the wall, but as I woke up, I realized no one was around and no sound had actually happened (no echo).

</comment><comment><USER26> I used to get this quite frequently when I lived in the heart of downtown Toronto and had an extreme drinking (alcoholic) habit.

It scared me half to death the first few times it happened, then it was just annoying once I realized what it was.

Moved out of Toronto and stopped drinking heavily and I don't get them at all anymore.

I remember being woken up constantly at 2/3/4/5am to police/ambulence sirens and car horns. So psychological stress (as wikipedia suggests) was most definitely a factor in my having had this imho.

Just my 2 cents.

</comment><comment><USER27> Had no idea what it was called. Never thought it was abnormal. Once a month or so I am awaken with the loudest possible "bang bang bang bang". It puts me into a state of terror where I must carefully check every door and window for someone banging to get in. So much worse now that I have kids to protect.

I will also get a similar gunshot sound if I'm dozing off in the afternoon. Makes napping impossible.

I always just wrote it off as being caught in a semi dream state.

</comment><comment><USER28> I have this. Interesting note: I hear different types of loud noise, doors slamming, cars backfiring, banging on the front door etc. - they're nearly all believable, which is incredibly annoying as I often end up having to get out of bed to check whether it was a real noise or not. I sometimes get the bright flashes of light too, I like those as it's a good hint that the accompanying noise wasn't real.

</comment><comment><USER29> This happens to me very frequently. It's kind of freaky how accurate the description of the symptoms are in this Wikipedia article - even down to the gif depicting the flashes I see. Reassuring to know it's a known condition, especially one with such a dramatic name.

It comes and goes for me, but it's pretty frightening during the periods when it happens. The stress explanation sounds plausible.

<comment><USER30> Easy to miss but worth seeing: the first item under the Treatment in the quick facts box is "Reassurance." Quite a pleasant treatment and it's administered as easily as a link to Wikipedia!

</comment></comment><comment><USER31> Sometimes when I'm drifting off, before I start dreaming I get this weird vibrating sensation, accompanied by a sensation that things are progressively getting more intense. It usually causes me to jolt myself awake out of fear. When I can push through it and stay asleep I usually end up having a lucid dream. I wonder if this is the same thing?

</comment><comment><USER32> Oh wow, I didn't know the name for this but absolutely experience it. The most disturbing part for me personally is the gasping for air part, or as the article states, " sensation that feels as if they have stopped breathing and have to make a deliberate effort to breathe again."

</comment><comment><USER33> When I was very little, I used to have nightmares that consisted of this bang and flash, repeated, indefinitely. They didn't happen every night, thankfully, and eventually they stopped but I don't know why.

In the last twenty years, it's come back exactly once.

<comment><USER25> Ah. OTOH, EHS is "hearing" an extremely realistic-sounding loud "noise" that wakes you up, but then realizing the "noise" never happen. It's like your body is gaslighting yourself.

</comment></comment><comment><USER34> I had this a couple of times when having a nap. I call it the cracking of the sun.

</comment><comment><USER35> I experience this occasionally. It sounds like microphone feedback but with a sort of metallic ringing to it. I didn't realize there was a name for it. I also assumed most people experience it which I guess is wrong.

</comment><comment><USER36> Can happen to alcoholics during steep withdrawals.

Similar to a Hypnic Jerk. [https://en.m.wikipedia.org/wiki/Hypnic_jerk](https://en.m.wikipedia.org/wiki/Hypnic_jerk)

<comment><USER4> I've heard people have them when stepping down ssris as well.

</comment></comment><comment> rv-de I regularly experience during falling asleep a burst of static noise like sound that repeats in short variable intervals (let's say 20 seconds). It seems to last about a second or less.

</comment><comment><USER37> I had this when I used to be anxious . The slightest noise is amplified 100x . When I first had them I thought some one had dropped kicked my door . Didn't really mind it

</comment><comment><USER38> I've had this a few times and it was pretty jarring - almost sounds like listening to white noise as loud as you possibly could for about 1/10 of a second.

</comment><comment><USER39> I've been having those for quite some time and was never able to pinpoint the reasons that could cause it. It's kind of fun when you get used to it.

<comment><USER40> Is it something you can control in anyway? I've experienced sleep paralysis for years (it's pretty terrible) but I've seen a lot of people harness that to enable lucid dreaming. Curious if it's similar with this.

</comment></comment><comment><USER41> I had this for a few years. Was awful. Glad it went away.

</comment><comment><USER42> Interesting.

I had this a handful of times.

But I also had sleep paralysis and panic attacks a few times.

Never was a constant problem.

</comment><comment><USER43> Hmm. I think I get this on occasion. It sounds like a heavily distorted electronic crunchy buzz like if you touched a guitar jack to some random metal while hooked up to an amp.

I had previously thought these might be "brain zaps" that people describe after stopping anti depressants, even though I never started

<comment><USER22> I get both of those sometimes. In my experience they aren't the same.

</comment></comment><comment><USER44> Did not need to know about that one.

</comment><comment><USER45> This would happen to me when my monitor was right next to my bed. (I believe the flash part, while the exploding/popping sound is external).

I would use my computer an hour or more before going to bed, so the monitor would run warm (or even hot).

When I'd turn it off and go to bed, the monitor would cool down over the next, I don't know, between 15 minutes to an hour.

And at some point during the cool down, the plastic would make a popping sound (just once). This would be around the same time I'd be about to fall asleep. And that's when a flash would go off in my head.

This happened pretty much everyday. Now I don't have my monitor sitting next to my bed.</comment>