The //* /*/ //*/ comment toggle trick - <AUTHOR> https://coderwall.com/p/zbc2zw

<comment><USER3> DON'T DO THIS!

When your code base grows you will end with dozens of places to change your code, all of them error prone. More things you need to keep control means more potential problems.

There are 2 alternatives to this. For languages that have macros (C#, C, C++) use the #ifdef construct, as others suggested here. For languages that don't have them (Java, Perl) use a less error prone alternative:

static boolean Test = false; // Only one place to change code

...

if(Test) doTest();

The difference in this last technique is that since you have just one place to change code there is less chance for errors and the change is easier to automate.

<comment><USER4> You should not have commented out code checked in. Period. Whether you are doing if(0), #ifdef 0, #if 0 it doesn't matter. It makes the code harder to read and debug (suddenly whoever comes after you can't read the whole function / context on the screen at once).

If you DO want to do this either:

a) delete the code. It'll be in version control anyway right? You do do version control right?

b) put it under a NAMED feature flag. Test is not a suitable name. Put it in a separate file which is conditionally compiled into the build with #ifdef SHINY_FEATURE shiny_feature(); #endif

<comment><USER5> Almost all of the time I agree. But sometimes code is the clearest and most understandable way to describe an algorithm, and sometimes you want to describe an algorithm for a reason other than that you want it to execute. For example, you might want to say "This would be simpler but it fails when x is denormalized," or you might want to say "This is how you could call this method," which is common in Python and elisp docstrings — and, I think, wholly defensible in that case.

<comment><USER6> Most days I don't write comments. Maybe once every 3 months. When I feel like someone might need a comment I rewrite the code until I feel like they don't need a comment.

The only time I write comments is when:

1\. Someone fucked up big and shipped an iPad app or something that relies on an error in the API or something. Can't force users to upgrade iPad apps, especially on older ones who are fearful of the app breaking or getting worse, so you end up with these massive comments fully explaining the problem, the hack that solves it, the conditions that need to be met in order for the hack to be solved (for example, "check google analytics to see if the number of people using version X of the iPad app or lower is less than 1%, if it is, replace the bellow hack with the following solution"), and possibly other hacks investigated and the reasons that they were declined. The reason you do this in the code rather than just in the commit message is that it protects the message from getting watered down as people change the code. I assume that someone is in a massive hurry when they are reading code and massive wtfs should be explained without further investigation.

2\. When the performance of the obvious solution is terrible and the efficient solution is complex. Especially when math is involved (for example, the core match method of a distributed recommendation engine).

</comment></comment></comment></comment><comment><USER7> "This trick below can be used to toggle between two sets of code, with one symbol in the code with no additional short-keys to learn, and no tool dependencies!"

So can #ifdef TEST / #ifndef TEST , which also has the advantage of not being horrific.

<comment><USER8> Cue in Java, Javascript and PHP, which don't have preprocessor directives.

<comment><USER9> Unless you run them through a preprocessor (which I recommend)

</comment></comment></comment><comment><USER10> Why are there so many angry comments on this thread?

I use this sort of trick all of the time when debugging, but I rarely commit any commented out code as a matter of principle.

Nobody was suggesting using this for "ghetto source control" or that this is an alternative to compiler directives.

Can't we just be polite and say "Cool hack, but obviously don't commit this type of code", instead of getting out the pitchforks?

<comment><USER11> You and I may know this should never be committed. Hundreds of students and junior developers will read this post and need to be warned that this is a VERY BAD IDEA.

I would rather make angry comments here than to have to explain why this is a terrible idea in a code review of an intern or a junior colleague.

</comment></comment><comment><USER12> Yikes. At least give the next coder that will maintain your code (and perhaps your future-self) a chance at understanding it. If the goal is to switch between prod and test code by flipping one char, then this works, too

       if (1)
         productionStuff();
       else
         testStuff();

<comment><USER13> Yes, and this way the inactive code is still checked for validity and does not leave -Wunused-* warnings. Use `#if 0` if you want to disable code that is intentionally invalid, then grep your codebase for `#if 0` and delete those dead code blocks with extreme prejudice.

</comment></comment><comment><USER14> This should not be used. I would reject the code review if this came by me and recommend using ifdefs.

Compilers are not uniform in their interpretation of nested comments.

<comment><USER15> I'm going slightly off-topic here, but I have to rant a bit on code reviews.

For the love of god, please, they are meant for checking each others code for mistakes and not for miniscule details like this. I have seen it time and time again in various companies where code review is used as some sort of tool to dictate style and preferences to each other. Wasting valuable development time and creating a unhealthy tension between developers.

<comment><USER16> Ironically, that's the exact opposite to the way it works in my company.

We use various automated techniques to pick up mistakes and use code review to ensure style is consistent.

Everyone in the company should be able to parse any piece of code without individual styles disrupting that.

The only tension occurs around the weighty question of line length - <USER2> standard says 76 chars max, I say that's what the IDE's for.

<comment><USER17> I think 76 characters is a good ideal to strive for because it means the code is legible _everywhere_ , including my phone. It also reduces variables named request_response_header_validating_auditor.

However, some things don't break well, so readability ought to trump.

</comment></comment></comment></comment><comment><USER18> Better way:

        /**
        testCode(); testCode();
        /**/

(...)

        /**/
        productionCode(); productionCode();
        /**/

I think this is better because it's much easier to see what you're supposed to do in order to switch the block on or off, and it's only a single character change per block. (though you can't switch from test to production in one character, but meh).

However, I tend to see commented code as ugly cruft. To me, comments are for explaining in natural language what you're doing, not for deactivating bits of code. If it's bad get rid of it, if it's good keep it. Why comment code?

The only time I comment out code is to warn developers away from doing something which is obvious but a bad idea, for example:

        /*
        // This was a neat idea but it makes it break if the user isn't logged in
        userPreference = getPrefFromUserSession();
        */

<comment><USER19> I think a better way of doing that is to create a test that fails in exactly that condition.

You can then put documentation in that test, as that's what the developer will look at first. You also get the bonus that, if someone finds a way to fix the function that causes that, then you can go back to possibly nicer code.

<comment><USER18> That assumes TDD, but yes that would be a nice way of doing it.

<comment><USER20> Reading tests is not TDD, it is basic due diligene when learning code. Eve still, skipping that, when the test fails, the rush coder will see the problem.

</comment></comment></comment></comment><comment><USER21> No, no, no, no, no! This is a terrible idea, and will end up causing you a massive headache in the long-run. If I see commented-out code like this, I will delete it because _that's what version control is for_.

If you _really_ need to turn code on/off in different environments, you should be using feature flags: <http://code.flickr.net/2009/12/02/flipping-out/> and at the very least you should be detecting the environment:

        if (ENV == 'dev')
            testStuff();
        else
            productionStuff();

This is much more meaningful to other developers (and to yourself in the future).

</comment><comment><USER22> This will compile to different things depending on whether you are using a C or a C++ compiler. Worse, it may compile to different things depending on which standard you compile to. If you don't want you colleagues to hate you, you should probably use:

        #ifdef DEBUG
        testCode();
        #else
        productionCode();
        #endif

Or, better yet, if it really is test code then write a test.

<comment><USER23> I don't understand why someone would do this nested comments thing. This is what macro block are for...

And tests need to be separated from the code. Hopefully using a test framework.

If your code changes depending on if it is in 'test mode' or not (which is what is proposed), then the test code is not the same as the production code, i.e. the production code is not tested. I'm not just talking about timing issues - extra variable names and objects will be in scope in 'test mode', and might logically change the behavior of the program.

<comment><USER24> * not all languages have macros * you don't use test frameworks for enabling and disabling code inline while you're developing

Please read the protip, understand my intention (keyword TRICK) and have a delightful cup of coffee. You've earned it.

<comment> B-Con Welcome to Hacker News. :-)

> understand my intention

We don't do that here. However, we do have an unparalleled menu of pedantic critique, edge case obsession, and a wonderful sauce made from insanely perfect standards.

</comment></comment></comment></comment><comment><USER25> Yikes at those extra slashes. I've always preferred this way:

       /**/
       block one
       /*/
       block two
       /**/

Simply add or remove the second slash to toggle.

<comment><USER26> I came up with this way when I started programming (and apparently had the gall to assume nobody else had done this...):

          /*/
          test
          /*/
          test
          //*/

Just add or remove the first asterisk.

</comment></comment><comment><USER27> Cool trick. But there is _no_ reason whatsoever to prefer this to a simple:

        git co branch

Sorry. I've been burned one too may times from source-control-by-commenting- out.

</comment><comment><USER28> I use this "trick" a lot, but I'll never ever dare committing it; just for small and quick checks (of the "what if I use this other implementation for the loop?"). If I'm going to commit, if (1) or #if (1) (plus a small comment explaining why I resort to that) are better options and immediately understandable for any other team member.

</comment><comment><USER29> Dijkstra is rolling in his grave right now

</comment><comment><USER24> I understand the criticism, it's not supposed to be _the_ way to toggle code in and out.

It's a TRICK, and that's all it will ever be.

However, it is the only way I know of that is not language specific for a particular dialect of C (#ifdef) that enables code to _not_ become a part of the compiled binary, or in JS terms - not available from the runtime.

Best regards -OP

</comment><comment><USER30> As a long-time C++ developer I wish people don't use any commenting tricks such as this, and I wish people don't use /* * / to comment their code, even if you develop in C. Instead, use // in modern C/C++.

The reason is that we often need to comment _OUT_ code during development. In C++, the 4 choices are: (1) #ifdef, (2) bool dothis = false; if (dothis) { ... }, (3) /* * /, (4) // ...

Among them, I would say the best and least-confusing way to comment out a block of code is /* * /. #ifdef's are very confusing especially if you have multiple of them; // needs to be applied to every line so only works in small scale; if (dothis) doesn't work across multiple functions, and at a glance it is harder to discern whether this is a "comment-out", or a legit condition.

However, by using /* * / in your comments, you eliminate the possibility of commenting out blocks of code that contains /* * / comments. The problem, of course, is due to how the opening and closing symbols are matched.

<comment><USER31> I've adopted:

#if 0 /* reason _/

lines of messy stuff ...

#endif /_ reason */

That short comment makes it easy for me to find the ends.

<comment><USER31> Ha, I thought I put in the asterix-esses. You know what I mean, but I bet cpp actually ignores e everything after #if 0 and #endif, don't do that please ;)

</comment></comment></comment><comment><USER32> This is a nice trick for quick comparison and thats it.

I actually use this a lot for performance comparison. This way it is easy to toggle between the olt d and the new implementation and see how long it takes to run the code 1000 time in javascript.

But I think anyone who check ins something likes this should be slaped.

<comment><USER24> This is exactly what this trick can be used for. Thank you for voicing your opinion. Happy coding!

</comment></comment><comment><USER33> This is a pretty cool trick, and I like that they shared it, but I don't think it's better than #ifdef!

</comment><comment><USER34> Slightly relevant.. in an introductory C ourse at my university, we had to write a program that would tell us which version of the standard was used by the compiler. I can't think of a solution now but I'm sure it was based on different comment syntax.

</comment><comment><USER35> This is ingenious but if used in a work environment should result in instant dismissal.

<comment><USER36> You know you can use something for debugging without committing, right?

</comment></comment><comment><USER37> I've been using this for a while in my JS projects. I'm about to start my first job as a web developer for a medium-sized company so I'm glad I came here and read all the backlash to this technique!

</comment><comment><USER38> This is terrifying!

<comment><USER39> Care to elucidate?

<comment><USER40> It's a fairly subtle way to dramatically change the behavior of your code. Frankly, it's a timebomb threatening to run testCode() in your production site.

The low cost makes it useful for quick development, sure, but for stability's and sanity's sake, please remove when you start promoting this above your own playground.

</comment></comment></comment><comment><USER41> Everyone with a syntax highlighting editor discovers this trick sooner or later. Why spoil the fun of the discovery and post the solution? :)

</comment><comment><USER42> Cute trick, and lovely addition to the Obfuscated C code contest. Not for code to be used by anyone else (or by yourself after a few months).

Reminds me of another trick for debugging C++ programs. This allows you to dump data structures easily:

        #define private public
        include <foo.h>

</comment><comment><USER43> If you actually commit this code to a repository I later encounter, I _will_ find you.

<comment><USER20> And since OP doesn't know how source control worms, he will never know how you found him.

<comment><USER24> You're the one not knowing how to read and comprehend. This is a trick, I hope you learn some some day. My god this is tiring...

</comment></comment></comment><comment><USER44> Why would you do this instead of #if 0/#if 1? Has exactly the same effect, is a one character toggle (sure, it's editing one character rather than inserting/removing one character), and is much easier to read and remember.

</comment><comment><USER45> This trick only works if there isn't a * / inside a string in commented out code (or there isn't a * / within the commented-out code itself in a language that allows such syntax, e.g. GrOOvy).

<comment><USER20> Sad that the completely obvious fatal flaw in the entire premise is so far down the page here.

</comment></comment><comment><USER46> Rather than relying on syntax tricks, I'm sure most editors allow for block commenting or comment inversion.

For example with NERD Commentor vim plugin, you can toggle block comments with `<leader>c<space>`. Inverting comments is `<leader>ci`.

<https://github.com/scrooloose/nerdcommenter>

</comment><comment><USER47> Fun related trick:

        $ cat test.c
        int compiler_supports_single_line_comments = 1 //*
        //*/ 2
        ;

        int main(void)
        {
            return compiler_supports_single_line_comments;
        }

        $ gcc test.c -o test && ./test ; echo $?
        1
        $ gcc -std=c89 test.c -o test && ./test ; echo $?
        0

</comment><comment><USER48> Why don't you use macros?

Additionally, source control tools make deleting code much more convenient, no?

<comment><USER39> During debugging, there's often the need to temporarily disable a few lines of code to see the effect it has. I'm certainly not going back-and-forth with source control for something so trivial.

That said, macros do make sense in this case- you can #define a single flag (e.g. FLAG) as a 0 or 1 and simply #if FLAG ... #endif, but it's certainly more typing to set up.

<comment><USER48> In that case I think I would prefer to use my editor's keyboard shortcut to comment out code, but that's a personal choice.

</comment></comment></comment><comment><USER49> A much more elegant solution is to use Commentary[1] in Vim (and I'm sure there's an emacs equivalent too). Just use visual mode to select your text, hit `gc`, and voilà.

1\. <https://github.com/tpope/vim-commentary>

</comment><comment><USER50> In Python:

      #'''
      some_code()
      '''
      some_other_code()
      #'''

... with one character toggled, becomes:

      '''
      some_code()
      '''
      some_other_code()
      #'''

If you work with anyone who says "Don't do this," don't do this.

</comment><comment><USER51> Dependency injection[1] would be preferable. Alter behavior based on defined environments (dev, test, staging, production), not whimsy.

[1] <http://en.wikipedia.org/wiki/Dependency_injection>

</comment><comment><USER15> In Eclipse you can hit CTRL+/ to comment and uncomment a block of code you have selected.

<comment><USER52> Or CTRL+SHIFT+C to comment and uncomment a selection using single line comments.

Or switch to block selection mode, make a multi-row zero-column selection and type //

I love Eclipse.

</comment></comment><comment><USER53> Let's not do this.

</comment><comment><USER54> for any vim users I would recommend having a look at NERDcommenter, from the author of the very popular NERDtree

<https://github.com/scrooloose/nerdcommenter>

</comment><comment><USER26> There's a slightly less-interesting Lua analog as well:

        --[[
          Code block one
        --[=[ Explanatory comment here ]]
          Code block too
        --]=]

</comment><comment><USER55> This seems . . . silly. I mean, honestly, do code editors besides Emacs not have something similar to comment-dwim?

</comment><comment><USER56> on non-gcc compilers this is valid

#define include_them 1 #if (include_them==1) #define hotcode /##/ #else #define hotcode #endif

void func (void) { hotcode printf("if included_them true, compile this line"); }

</comment><comment><USER57> Please just use if/else and a flag. It's much clearer and more maintainable.

</comment><comment><USER58> I never liked this kind of code practice, makes it very difficult to read!

</comment><comment><USER59> Or just select the text and hit CTRL + K, C

At least in my IDE anyway.

</comment><comment><USER60> Is it bad that I first saw this trick on NerdParadise.com?

</comment><comment><USER61> tldr: Don't do this.

</comment><comment><USER62> I like 'Code Opinion Blogs'. Interesting insight into what people prefer when coding!

</comment><comment><USER11> worse idea ever.

if you need to have branches in your code, learn how to use your source control environment. even cvs lets you branch your source tree.

<comment><USER24> This is not an attempt at branching, this is a trick.

The protip is not to use the trick, but to know about it. Read the tip, try to understand the intention - then criticize. Thank you kind sir.l</comment></comment>


Tuvalu Makes $4M a Year - <AUTHOR> https://factinator.com/tuvalu-island/ <comment><USER2> To complete the title: "Tuvalu Makes $4M/yr from the .tv Domain".

From a December 2019 Washington Post article[1], there are ~500,000 registered .tv domains. The math on that works out to license fees of ~$8/domain ($4M/500k).

Considering .com is around $10/yr and .tv is around $30/yr[2], I'm interested to know where the incremental $12 goes ($30 - $8 - $10).

[1] [https://www.washingtonpost.com/video- games/2019/12/23/tuvalu...](https://www.washingtonpost.com/video- games/2019/12/23/tuvalu-is-tiny-island-nation-people-its-cashing-thanks- twitch/)

[2] Namecheap

<comment><USER3> > I'm interested to know where the incremental $12 goes

Uh everyone thats not the passive royalties holder? What answer do you really want?

<comment><USER2> Obviously. More to the point, what other incremental costs exist, if any, that would account for a $20 premium in price when cost appears to be going up by $8?

<comment><USER3> most likely all profit for incumbents supported by high barriers of entry for a small market.

</comment></comment></comment></comment><comment><USER4> Little recompense in the face of losing their nation to the carbon-emitting activities of large nations, who do not admit them as refugees.

[https://www.smithsonianmag.com/science-nature/will-tuvalu- di...](https://www.smithsonianmag.com/science-nature/will-tuvalu-disappear- beneath-the-sea-180940704/)

<comment><USER5> Why are you linking a 16 years old article that has been proven wrong? Tuvalu is not shrinking or sinking.

[https://www.abc.net.au/news/2018-12-19/fact-check-is-the- isl...](https://www.abc.net.au/news/2018-12-19/fact-check-is-the-island- nation-tuvalu-growing/10627318)

</comment></comment><comment><USER3> > Isn't it amazing that a country that's merely a speck in ocean ... controls > _something so crucial to the internet world?!_

I spit my tea out bahaha

But on a more "substantive" note, I think I did a case study 12 years ago about what an invasion of Tuvalu could look like - by private persons, and we mapped out their satellite and internet infrastructure for how to disable that. I had only ever heard of the country because of this TLD and looking it up.

</comment><comment><USER6> Somewhere in a paper file I have the faxes that I exchanged with the office of the Prime Minister of Tuvalu back in about 1995 trying to explain the value of their TLD and how my (little) company could help them monetize it. Embarrassingly, I just got busy with client projects and ghosted them... It's nice to see that they are seeing substantial revenue from the domain now, and stand to see more when their agreement with Verisign expires next year.

<comment><USER7> Just curious, what strategies were you going to take to help them build it out, and just how much "build out" were you planning to do?

And just to be clear, I don't mean this in a sarcastic cynical way. I am genuinely curious on how people built out such platforms and surrounding infrastructure during the initial build-up of the WWW.

</comment></comment><comment><USER8> This led me to look up whether the British Indian Ocean Territory (Chagos Islands), and therefore the British Government, received any money as a result of the .io domain.

It appears not. [1]

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

[1] [https://publications.parliament.uk/pa/ld/ldtoday/writtens/11...](https://publications.parliament.uk/pa/ld/ldtoday/writtens/11082014.htm#hdg- Internet)

<comment><USER9> The British shouldn't get money, but the Chagosians forcibly evicted by the British probably deserve it more than most: [https://en.wikipedia.org/wiki/Chagossians#Eviction](https://en.wikipedia.org/wiki/Chagossians#Eviction)

Sad that they aren't seeing a penny, apparently.

<comment><USER10> It's amazing to me that British seem to get the full PR whack of that attrocity when it was all under the auspices of the US who paid the Brits to kick them out.

Kind of like how we all collectively forget that the Allies dropped the bomb on Japan and not just the "Americans".

<comment><USER11> TIL that the Americans consulted with the British before dropping the bomb on Hiroshima (but declined their request for British participation in the mission). The Soviets were apparently not notified in advance (although I could be wrong about that) and the British had veto power over what would be revealed to the Soviets about the bombing.

</comment></comment></comment></comment><comment><USER12> [https://www.wired.com/1998/09/tuvalu/](https://www.wired.com/1998/09/tuvalu/)</comment>


Stephen Hawking says pollution and 'stupidity' still biggest threats to mankind - <AUTHOR> http://www.independent.co.uk/news/science/stephen-hawking-pollution-stupidity-artifical-intelligence-warfare-biggest-threats-mankind-a7106916.html <comment><USER2> > Professor Hawking said: "Six years ago, I was warning about pollution and > overcrowding, they have gotten worse since then. The population has grown by > half a billion since our last interview, with no end in sight.

When will the overpopulation argument die? It was wrong when the world was significantly less populated and poorer, and it's probably wrong now.

Wealth and prosperity are not natural resources that are harvested from nature. They are the results of human intellect and ingenuity.

<comment><USER3> Unfortunately wealth and prosperity usually coincides with polluting the environment.

The world's richest 10% produce half the Carbon pollution. [http://www.cnbc.com/2015/12/03/worlds-richest-10-produce- hal...](http://www.cnbc.com/2015/12/03/worlds-richest-10-produce-half-the- pollution-oxfam.html)

<comment><USER4> Higher population leads to large CO2 output because we design our economies that way. China and many countries subsidise coal and other fossil fuels. Nuclear power is not widely used</comment></comment></comment>


Facebook opens up Messenger to third-party apps - <AUTHOR> http://www.bbc.co.uk/news/technology-32036322

<comment><AUTHOR> Not a massive fan of the company (quite the opposite), but always keen to see how IM and messaging will evolve in the mainstream.</comment>


Rated at position #34 (after Scratch) is Scala really important? - <AUTHOR> http://www.tiobe.com/content/paperinfo/tpci/index.html

<comment><USER2> Interesting to see how popular languages really are outside the HN bubble. Scala has always been fairly niche (I believe Twitter was soley responsibly in bringing it the lime light) its also cool to see that Go which has been riding the hype train this month ranks below Dart, Coldfusion, and Visual FoxPro.

In the HN bubble one might ask "is Perl really important", which came in at #9.

<comment><USER3> TL;DR: TIOBE is a horrible way to decide if something is important.

TIOBE is a fun conversation generator, but hardly anything to be taken seriously. In 2004, when Google swapped an algorithm, a bunch of TIOBE "rankings" swung massively. Back then they only used Google (the rankings are generated from search engine results, more results == better). Now they use multiple engines, but the list of issues that make it crap persist.

\- Older languages like perl, have years of postings and pages to draw from ... even if many of them are wrong with current perl. \- Better documented languages generate less noise in terms of pages \- Languages with a higher base engineer level (lisp) tend to generate less pages of noise \- The system is very easily gamed by anyone with the motivation (not sure if anyone cares) \- Communities that rally around good answers rather than repeat themselves generate less noise

Noise == Google Results == Rank

</comment></comment><comment><USER4> IMO the [RedMonk ranking](1) which is a plot of Stackoverflow vs GitHub popularity is more relevant.

[1]: [http://redmonk.com/sogrady/2013/02/28/language- rankings-1-13...](http://redmonk.com/sogrady/2013/02/28/language- rankings-1-13/)

</comment><comment><AUTHOR> For those who don't know what Scratch is: "Scratch is designed especially for ages 8 to 16, but is used by people of all ages. Millions of people are creating Scratch projects in a wide variety of settings, including homes, schools, museums, libraries, and community centers."

</comment><comment><USER5> I would rather ask "is tiobe really important". To that question I would answer "No."

</comment><comment><USER6> Is Scratch being used at Twitter, LinkedIn, Tumblr, FourSquare, Simple, and many others?

</comment><comment><USER7> I want to offer a better metric: Scala is number 15 on GitHub.

Answering the question: Yes, it is.

\- Scala is bringing the best combination of functional and OO programming to the masses.

\- New languages out there are asked "how do you improve on Scala?", which is a huge change, considering that a few years ago Java was the main comparison target.

\- Languages like Java or C# are adopting improvements from Scala, which shows that Scala seems to have done a lot things right.

The explanation of the bad rating on Tiobe is the search string being used by Tiobe:

Tiobe searches for phrases like "$LANG programming", but in Scala (and Haskell) the phrase "programming in $LANG" is much more common. Therefore, both languages suffer from a bad rating. People at Tiobe are aware of it, but it seems as if they don't plan to fix it.

Some other language communities started to modify their websites to cheat the index. For example, the Delphi community went through all their documentation and blog and modified existing texts to read "Delphi programming" and gained a few positions afterwards.

Further info: [http://blog.timbunce.org/2009/05/17/tiobe-index-is-being- gam...](http://blog.timbunce.org/2009/05/17/tiobe-index-is-being-gamed/)

<comment><AUTHOR> Thanks, this deserves an submit on its own in HN :-)</comment></comment>


Famotidine study shows Covid-19 patients less likely to die - <AUTHOR> https://www.msn.com/en-us/health/medical/famotidine-study-shows-covid-19-patients-who-took-heartburn-drug-were-less-likely-to-die-but-researchers-caution-more-research-is-needed/ar-BB13QMCk <comment><AUTHOR> Note that this was not an RCT, and the researchers caution that we should wait for more information before prescribing to patients.

There is also no indication that famotidine prevents infection, just that it might reduce severity.</comment>


Former Fed. Housing Commissioner: USD 21 Trillion Missing from the DOD and HUD - <AUTHOR> https://solari.com/blog/dod-and-hud-missing-money-supporting-documentation/ <comment><AUTHOR> See interview here with Catherine Austin Fitts:

[https://www.youtube.com/watch?v=w-57aexDfLk](https://www.youtube.com/watch?v=w-57aexDfLk)

Austin Fitts Bio:

[https://en.wikipedia.org/wiki/Catherine_Austin_Fitts#Backgro...](https://en.wikipedia.org/wiki/Catherine_Austin_Fitts#Background)</comment>


Feds warn: China sending 'thousands' of spies to US colleges - <AUTHOR> https://www.washingtonexaminer.com/policy/defense-national-security/feds-warn-china-sending-thousands-of-spies-to-us-colleges <comment><USER2> I think this fear mongering in the US is a bad thing. Chinese students pay full tuition and help our universities financially. Tourists coming to the US help our economy.

With a well run immigration policy with reasonable and bi-partisan reform will help our economy, providing needed workers.

<comment><USER3> How the hell did this make it this far up News.yc? Why is it newsworthy that the "washington examiner" runs race baiting fake news, they do that every day... Please don't give this stuff more power by linking to it.</comment></comment>


REST APIs with Node.js? Develop,manage,scale with the new StrongLoop API Server - <AUTHOR> http://strongloop.com/strongblog/node-js-api-server-announcement/

<comment><USER2> Wait so this lets you create REST APIs in JS by just using Yeoman? Sweet...</comment>


Ask HN: Can someone explain to me why all languages don't try to have the same syntax? - <AUTHOR>

Why does every language need its own syntax? Why does PHP need to use crap like echo and all those dollar signs instead of something more universal?
Why can't all those projects come together and figure out a single universal standard for writing syntax? So that writing code would be exactly the same, no matter what technology you choose to use. At least for the simple stuff.
Why do programmers need to waste time remembering 20 different ways to write something as stupid as a Hello World application? <comment><USER2> In some important cases, languages already have common syntax (such as mathematical operators, regular expressions, and string interpolation such as "\n"). And in those cases, the simplest explanation seems to be: "there was no other sane way to do it".

Some differences really are arbitrary, and could theoretically be merged. Some are historical, e.g. someone worked on Unix for years and thinks in terms of verbs like "echo" because that's what shells used.

But usually, there are very good reasons for any differences.

One reason is the inherent complexity of a parser for a full programming language. It turns out that it's fairly easy to confuse a parser, because they're just not as good as human beings at correctly interpreting the "intent" of a statement. Most languages don't have a reason for being unless they introduce a bunch of unique constructs; and they're lucky if their own constructs can be parsed unambiguously, much less after adding support for extra "standard" constructs from other languages.

Yet another reason is that languages aren't as universal as you may think. For example, what would 'print "hello world"' mean in a makefile...when would the print-out occur? Would languages be allowed to ignore "standard" expressions that they can't logically use, or be forced to invent some interpretation of them?

A final reason is what would happen when languages are embedded in each other, which is even summed up by your example, PHP. If one language is embedded in another, it's a _plus_ that they have different syntax: it clearly separates one from the other. This reduces the risk that you'll have to (for instance) escape or namespace every single name used by the embedded code, to avoid collisions with the surrounding file.

<comment><USER3> > In some important cases, languages already have common syntax (such as > mathematical operators

Except that they don't. Almost everyone agrees about the relative precedence and associativity of the two argument forms of addition, subtraction, multiplication and division, but that's about it.

And then there are the folks who think that multiplication is denoted by a space. They call themselves mathematicians. Don't they know that space is concatenation or ignored?

> One reason is the inherent complexity of a parser for a full programming > language.

For some full programming languages maybe. Other languages are so easy to parse that they added support for roman numerals, turing-complete read macros, and other things.

> It turns out that it's fairly easy to confuse a parser, because they're just > not as good as human beings at correctly interpreting the "intent" of a > statement.

It turns out that people aren't all that good either - they're subject to a 7+/-2 rule. Plus, very few people can reliably remember 10 levels of operator precedence.

> Most languages don't have a reason for being unless they introduce a bunch > of unique constructs; and they're lucky if their own constructs can be > parsed unambiguously.

Huh? Apart from some nastiness involving << and >> when C++ templates were introduced, how many programming languages have ambiguous parsings? (Yes, many parse things in ways that some humans find "unintuitive", but that's different.)

</comment></comment><comment><USER4> A better question is why doesn't everyone in the world speak Esparanto.

<comment><AUTHOR> Because it has to complete with English which is already a world language(at least in the business world)

<comment><USER5> And Lojban is better anyway. ;-)

<http://en.wikipedia.org/wiki/Lojban>

[http://pinstack.blogspot.com/2008/02/top-7-reasons-to- learn-...](http://pinstack.blogspot.com/2008/02/top-7-reasons-to-learn- lojban.html)

[http://www.lojban.org/tiki/tiki- index.php?page=Lojban+Introd...](http://www.lojban.org/tiki/tiki- index.php?page=Lojban+Introductory+Brochure&bl=y)

</comment></comment></comment><comment><USER6> The problem with standardization is that you iron out all of the innovations. Certain language constructs are simply better for certain tasks. Lisp is built for recursion so it's great with lists. Object-oriented languages in theory are great for modularity and maintainability. Granted all these aspects have a lot to do with the coder in addition to the language.

If all languages required you to manage memory as in C I'd wager we'd have many fewer entry-level script hackers. Sure, every program would be lickety- split fast, but the App Store certainly wouldn't have 10,000+ apps.

And if every app were written in Java everything would be very portable but also quite slow. It's all about trade-offs and picking the right tool for the right job.

<comment><USER7> I don't mean to be pedantic, but the 'Java is slow' thing simply isn't true anymore. It certainly used to be slow back in the day, but it's actually pretty good these days.

From what I've heard, programmers at Google put it in the same ballpark as C++.

This brings me to another point.. the choice of programming language often has more to do with image and branding as opposed to actual technical merit.

That's why we keep hearing the same old mantras:

Java -> uncool and slow

C/C++ -> fast

PHP -> hack

Ruby -> cool but slow

Cobol -> for dinosaurs

.. even after the problems are fixed, the image remains. It's pretty hard to change people's perceptions.

<comment><USER8> JIT compiled languages are slow to load, because they have to compile each bit of code the first time they run it. That is why Java is known as a slow language, even though it does fine in benchmarks: because loading is the one operation that's slow enough for the user to notice.

<comment><USER9> Counter-example: LuaJIT (<http://luajit.org/luajit_performance.html>), largely because the compiler / optimizer themselves are extraordinarily small.

</comment></comment></comment></comment><comment><USER10> Because syntax is one of the features of a language.

<comment><USER11> and often times new syntax is created to support features in a language...

...and if you have the same syntax for all languages then what is the difference? All languages would just be extensions of the same basic language if the syntax is the same.

It is a good question though. Why have more than 3 or 4 programming languages at all?

<comment><USER12> We have programming languages because people make them. The only way to have only 3 or 4 is to eradicate all but those and stop people from making more. However if we did that, I have a feeling we would now choose 1 or 2 that wouldn't exist if someone had done the same thing a decade ago.

<comment><USER13> A professor of mine once quipped: "What's the definition of a 'gentleman computer scientist?' Someone who knows how to make a their own computer language, but doesn't."

<comment><USER12> What about someone who knows how to get people on eLance to bid to make them for $1,000, no matter how impossible, but doesn't?

<comment><USER13> If you strip down a language so far that there's not much to it at all, then $1000 for a new language isn't so far fetched. Just don't ask for support for libraries, a JIT VM, etc. Then again, you could implement it on top of a pre- existing VM, and get access to libraries.

What about a minimalist subset of Python with curly braces instead of indenting? I think I'd actually like that language. Add an easy mapping to Python libraries, and you're done. $1000 is still a bit on the low end for that, but $3000 would seem quite reasonable.

</comment></comment></comment></comment></comment></comment><comment><USER14> This question can not be fully answered in prose. It can only be answered with a challenge: Learn four or five diverse languages reasonably well, then try to create the single syntax that works well for all of them. You'll understand when you're done... or perhaps rather, when you find you'll never be done.

I will give one example of the tens upon tens of issues you will encounter: What's the one true syntax for a type declaration? Then, once you've answered that, how does that one true syntax manifest in Python/Perl/Javascript?

<comment><USER15> The one true syntax for type definitions is: don't have special syntax for them. Totally unnecessary. A good general syntax can handle them without a special case.

</comment></comment><comment><USER16> Because people have different syntactic preferences? Because some people hate c-style brackets while others hate python-style white-space? While it would make life easier in the short-run for those trying to learn a language who have pre-existing knowledge of the standardized syntax, it's quite possible that some other syntax would lead to wildly improved programmer productivity or, at the very least, much more readable/aesthetically pleasing code.

In general, there seem to be a plethora of values which can be considered in choosing the syntactic form of a language: aesthetics, productivity, tradition, etc. Having different syntax between languages allows different niches for languages within these values not to mention allowing the possibility of great innovations which could improve the experience of programming. Seems unlikely that any current language has the optimal syntax with respect to maximizing all these values and hence it seems foolish to cut off innovation.

<comment><USER17> Python-style _colon_ \+ whitespace.

</comment></comment><comment><USER18> _Why does PHP need to use crap like echo and all those dollar signs instead of something more universal?_

This strikes me as a bizarre statement. What's more universal than "echo" and "$", which are found in nearly every UNIX shell? UNIX has always been the backbone OS of the Internet, thus a language designed specifically for that purpose would naturally bring along some of those conventions common to administrators experience. (Technically, it probably happened this way in PHP because of the restraints of the way PHP began, but that's not to say $ and echo wouldn't have been natural choices, even if PHP had been more ambitious early on.)

There are many things to complain about in PHP, but these two conventions were not invented for or by the PHP developers.

I get your point, of course...but when you use examples like this, picking on what is very likely the most popular language in the world for developing web applications, it just makes me think you're really saying, "Why does PHP suck?"

Why doesn't Ruby use PHP syntax? After all, if we're going to agree on syntax, shouldn't the one that the largest number of people are already fluent in be the one we choose? Should we go back to earlier languages? Should Python have gone with C-like syntax, like Perl, since C syntax is far more common? Who decides what the _right_ syntax is for all languages to converge on?

I think I have to conclude your question is invalid.

</comment><comment><USER19> It's certainly not the only reason, but the same syntax with different semantics could get very confusing.

I think the different syntaxes help you (or at least me) switch contexts and remember what language I'm using.

</comment><comment><USER20> If every language had its own syntax, how would we make jokes about LISP programs which end with a page of right parentheses?

</comment><comment><USER21> Because the people who designed them didn't agree on what was the best solution for the problem. And the people who use the various languages don't agree, either. Do you really think that you could sit down with a Lisp fanatic and a Java fanatic and get them to decide on a single syntax that they'd each rather use than their own favourite? They'd each prefer to do it their own way.

</comment><comment><USER22> Let's say (however unlikely) that all current languages agreed on standard, and the next release of all these languages used this standard. There would inevitably be a group of people who don't agree with the standard and so they go and write a new language that uses their preferred syntax. Now we are back where we started.

</comment><comment><USER23> hard to market something that is the same as everything else

</comment><comment><USER24> I can live with differences in language syntax since in many cases there are semantic reasons behind them. The thing that really gets on my nerves are minor differences in the representations of common data structures (lists, tables, dictionaries, etc).

</comment><comment><USER25> Yes. I think all languages should be written with s-expressions.

</comment><comment><USER26> If they did have the same syntax, would they be different languages?

<comment><USER27> Different semantics

<comment><USER28> Same syntax, different semantics.. that does not sound easier to me. At all.

Also, why don't we all just use one operating system for everything, have one kind of coffee, and eat one perfectly balanced meal all the time?

<comment><USER27> It seems you're disagreeing with a statement I never made.

The question was "If they did have the same syntax, would they be different languages?"

I replied: "Yes, they would be different because their semantics would be different"

I never said it would be a good thing. And by stretching your analogy to the territory of food it only becomes weaker (with food diversity is a goal by itself). Also it can be argued that using the same operating system for the vast majority of tasks is desirable.

<comment><USER28> I don't think I disagreed with you.

I wanted to a) show how "one true syntax" would in itself be challenging and b) explain the utility that diversity has by analogy.

I agree that for most tasks, using a POSIX compliant unix-like system will suffice, but that's as much ground as I'm willing to concede on that point (for now ;)

</comment></comment></comment></comment></comment><comment><USER29> I think it is for the same reason that not all cars are shaped the same. Also, to crack wise about lisp.

</comment><comment><USER30> Because then they would all have the same syntax.

</comment><comment><USER15> It's because some people don't like s-expressions, so they've been making up a bunch of other stuff.

<comment><USER31> My theory: people who don't like s-expressions don't get programming;

Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer,

and people who suck at programming are left out.

<comment><USER32> I know many people who are counterexamples to your theory. Languages like Perl and Python have a strong advantage in libraries. If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

<comment><USER33> The (derisive) saying used to be "You can write FORTRAN in any language" but you can also write Lisp in any language.

Not that I completely agree with the GP's point.

<comment><USER34> _you can also write Lisp in any language_

No you can't. In fact, that's precisely what you can't do.

(Unless you're talking about writing a Lisp interpreter... but then your Lisp programs themselves would still be written in Lisp.)</comment></comment></comment></comment></comment>


'Siri I'm getting pulled over': New shortcut can automatically record the police - <AUTHOR> https://www.businessinsider.com/ios-12-shortcut-uses-iphone-to-record-police-during-traffic-stop-2018-10 <comment><USER2> I wonder what's the difference between countries that makes the police behave so differently as to citizens having to come up with video surveillance to back up their case?

In Scandinavia you'd have to be genuinely paranoid to not trust the police. The presence of police generally has an aura of safety: actually, with the reductions in force we've been quite unhappy to not see officers patrolling in the city centre in the evenings as much as before.

I'll have to assume that most cops in the US must be friendly and considerate but there seems to exist a minority (hopefully?) that seems to suggest it might be safer to hang out with criminals rather than be confronted by the police.

It's somehow mind-boggling but there must be a path of history and reason why the behaviour of the police forces have diverged so much between countries.

<comment><USER3> Very good observation & totally agreed.

In Germany, police is generally perceived as trustworthy, your "friend and helper" as the slogan goes.

I was surprised by the antagonism and belligerence in the US.

A few observations:

* guns certainly play a big role, and the risk of escalation.

* I wonder whether silly laws also play a role. For example: a 20 year old drinking alcohol, having a cold beer while watching a sunset on the beach, prostitution are all illegal if I'm not mistaken (or smoking a joint, depending on the state). So, in the US, the police might often be the killjoy. In Germany, those things are either officially legal, or in a gray area that the police ignores. So when the police comes on the scene, it's generally an actual crime or problem, and everyone is eager to help and cooperate and fix whatever real problem there is. In short, police have a relatively positive image.

* My experience with the police in the US was much worse when I was on a bike than when I was in a nice BMW. The issues of power differential, authority, lawyers, confrontation seem to loom much larger in the US than I've perceived them in Germany.

* With all these factors, employment with the police might seem a less attractive choice of work in the US than in northern Europe, so people with few other choices (or a penchant for exercising authority) might end up there more frequently than in other countries. This, in turn, could result in a downward cycle and a "besieged" mentality.

At any rate, I'd much rather interact with police in Europe or Asia than the US.

<comment><USER4> All of these are definitely part of it, but we need to look more deeply at the economic realities of policing in the US to understand some of this. Read this article: [https://harvardlawreview.org/2015/04/policing-and- profit/](https://harvardlawreview.org/2015/04/policing-and-profit/)

Police in many municipalities are not fully funded via taxes. Instead their revenues are maintained via tickets, fines, and property seizures. There are recent cases that have gone to the supreme court related to some of these issues: [https://newrepublic.com/article/148013/will-supreme-court- re...](https://newrepublic.com/article/148013/will-supreme-court-rein-civil- forfeiture), I don't believe this case has been heard yet.

The point is, the police in the US have an economic necessity to pay their own salaries by fighting "crime". This incentivizes them in seizing property, prior to any conviction in court. Often the property is seized from people without the means to fight to get it back, and/or it's not worth the fight. This tactic of ticketing, fining and seizing property to pay for the police force, IMO, is the root cause of the issues between minorities and low income people and the police. In effect, the police need crime and will find crime, because they need to in order to earn their salaries.

<comment><USER5> > Instead their revenues are maintained via tickets, fines, and property > seizures.

How can this be anything but a case of extreme moral hazard? They sound indistinguishable from the mob.

<comment><USER6> Americans hate to pay taxes. The "law abiding citizens" don't have to worry about these extra fines, as long as they go out of their way to avoid the police. Then they can convince themselves that it's only the "bad guys" that are being fined, and as a result they deserve the treatment.

<comment><USER7> I really don't understand why you're getting hit on this one.

There is a common perception in America that criminals are morally bad people who must be punished, instead of a perception that they're desperate or broken people who need assistance or reform of behavior. There is a private prison sector that is literally allowed to use prisoners for manual slave labor. We have one of the largest prison populations in the world even when adjusted for our large population.

There are a ton of factors that play into why there is a mistrust of the police (on both side of the political spectrum) but there is also a common air of ambivalence about how we treat people once they're marked criminals. You see it every time a large media stir comes up because of a high profile police shooting. "Well, he was no angel. That thug had a criminal record, so the cop probably..." as if it's impossible that the victim could have been a criminal AND the cop used unneeded lethal force.

Your point is a little blunt and lacks nuance, but it's sentiment seems in line with what many prison reform advocates perceive as being the prevailing culture in the US towards criminals and prisoners.

<comment><USER8> Going back to OP saying the police should be courteous and polite, I agree with him/her.

In Australia the police always niceley greeted you and generally polite, in US, it's the other way, I've rarely met a polite one, most are brash and treat you like a criminal from the get go.

The US police system for some reason I don't understand doesn't embrace politeness as a value (may be it makes the police look weak?) I don't know.

But yeah, you want to stay away from the US cops if you can.

<comment><USER7> I generally adopt an NWA mentality the second any cop comes into view. When they get their collective shit together I'll be more helpful.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> _it starts recording using the iPhone 's front-facing camera. Once you've stopped recording, it can text or email the video to a different predetermined contact and save it to Dropbox._

Too bad it seems to record locally first -- it'd be nice if it could stream the recording online, in case the phone is seized or powered off before it can save the recording.

Maybe it could have a checkpoint feature where it sends the current recording to the cloud while continuing to record, maybe triggered by a keyword or a cough or something.

<comment><USER10> There is an aclu app called mobile justice that does this. There appears to be a different one for each state. I was previously under the impression that it uploads the video if you shake your phone, but I found some articles that suggest it transmits while you're recording.

>The app features a large red "Record" button in the middle of the screen. When it's pressed, the video is recorded on the phone and a duplicate copy is transmitted simultaneously to the ACLU server.

<comment><USER11> Only available in the US. I am really surprised that such obvious use case is not covered by tens of apps already. I would certainly pay few bucks for such app if the servers were out of reach from corrupt poluce departments and governments.

<comment><USER12> Aside from the US, the kinds of places where you'd want and be able to use this aren't the kinds of places that have fast enough internet for it to be possible.

<comment><USER13> You'd be surprised how much of the world has fast mobile internet.

</comment></comment></comment></comment></comment><comment><USER14> Note that this shortcut was built by someone who is a lawyer and had only minor experience with "scripts for macOS in the past". It's great to see Apple building technologies for this audience on the iPhone like they have with Automator on macOS.

<comment><USER15> In the early days of personal computing, things like AppleScript, HyperCard, and Basic, were used by the typical computer user. Computer users were rather self-selected, had invested a lot of money to own a computer, and generally bought into the promise of computing as a "bicycle for the mind." The iPhone opened the floodgates, bringing TONS of people to computing for the first time, and it resulted in a shift from computing as a creation medium, to one of consumption. It's interesting to see it start to come full circle. It's taken about a decade, but something that used to be mainstream in computing (programming your machine to do something interesting interesting / useful) is on the cusp of becoming mainstream once more.

<comment><USER16> The iPhone is responsible for many things but "bringing tons of people to computing for the first time" is probably not one of them.

The vast majority of iPhone users have a computer, it was even more prevalent in 2007 when the first iPhone came out, and was a luxury gadget that was mostly purchased by technology minded and wealthy people - a group who were vastly more likely to own home computers.

<comment><USER17> I see plenty of young people with iPhones who aren't wealthy and because I work in education, I can tell you many of them don't have computers at home. If there's a computer at home, it may not have broadband. The iPhone is their computer.

If a kid needs a traditional computer after school lets out and they live in an urban area, they go to a library or to a community center.

I was surprised to see Mac Pros at the main branch of the Boston Public Library this summer for young people to use for media production, for example.

<comment><USER18> "Young poor people" buying 1000$ phones is a strictly American phenomenon.

<comment><USER19> I'm from Spain and I can 100% confirm it is not only in America.

</comment></comment></comment></comment></comment></comment><comment><USER20> More accountability for police can't hurt. In other private professions bad accountability results in loss of job, so I don't think many can complain about this.

A cool feature, maybe given attention due to the hot political climate around cop shootings. But useful nonetheless.

<comment><USER21> I think all police should wear body cameras. Police misconduct declines. Civilian misconduct declines. Cameras are a potential source of powerful evidence. Everyone wins.

<comment><USER22> Police DO wear body cameras! For example, there was a shooting in Albuquerque, with five police officers present, and all five officers were wearing cameras.

Unfortunately, all five cameras malfunctioned at exactly the same time and none of them captured footage of the shooting [1].

What a crazy, unlikely circumstance.

[1]: [https://www.techdirt.com/articles/20180624/18081640105/anoth...](https://www.techdirt.com/articles/20180624/18081640105/another- police-accountability-miracle-five-officers-zero-body-cam-footage-one-dead- body.shtml)

<comment><USER23> It seems only reasonable that in such cases not only are the police guilty by default of whatever they're accused of, they're also guilty of destroying evidence and should be charged accordingly.

<comment><USER24> Only if you can prove the malfeasance.

<comment><USER23> When all five body cameras "happened" to fail at the same time I don't think anyone can really doubt the malfeasance.

<comment><USER25> Yeah, but who did it? All five of them, one of them, another cop not at the scene but with access to the system? Contractors with system access? It's not enough to be sure that a crime happened. Which isn't to say there shouldn't be an investigation or measures taken to make it harder to happen.

And to be more careful, what's the failure rate on those cameras and how many incidents happen a year where it would look suspicious if all cameras fail? If the numbers are high enough we might just have selection bias.

<comment><USER26> The officers should be on the hook for their video feed.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER27> Genuine question: is getting pulled over in the US really that hazardous that people have to record it in case things go wrong?

<comment><USER28> I've been pulled over maybe 5 times over the years (headlight out, expired license plate sticker) and I have yet to have a bad experience with them. They have always been friendly and I've never actually gotten a ticket, even on a time where I didn't have up to date proof of insurance in my car.

People just don't usually write about the 99.9% of occurrences when nothing eventful happens. And many of the people who _do_ have issues with the police provoked them by intentionally being difficult and/or rude.

<comment><USER29> I'm sure the 99% of interactions are perfectly fine but the number of bad interactions in the US seems way way above any other western country.

There are numerous news stories about Australians gettting shot by police while traveling to America but virtually none from within Australia. Last police shooting I remember in Australia was when the person was running at the police with a knife.

<comment><USER30> I genuinely wonder if the US has more violent criminals or something. Perhaps worse mental health or drug rehab services. Unfortunately it's such a politicized issue I don't hope to get good answers in the near term.

<comment><USER31> The other thing that makes me wonder is the fact that police officers are rarely teamed up in the US. A lone cop is bound to be more nervous and ready to reach for a weapon than when he is covered by a partner standing 5m behind with a hand on his gun holster (which is e.g. German procedure).

<comment><USER30> This seems like an interesting prospect. I wish the U.S. kept better data so we could more easily see if there is a correlation.

</comment></comment></comment></comment></comment></comment><comment><USER32> I would like to introduce to you a really unique youtube channel called "PoliceActivity".

It currently has about 1.2 million subscribers, with about 600 videos.

The channel basically shows police bodycam footage from various US law enforcement agencies, mostly local police/sheriff departments. The videos are not edited, other than to show perspectives from different officers at the same scene, and etc. There are some footage taken by police cruiser dashcam and also cameras mounted on police helicopters. Most are 10 - 30 minutes long. After watching some on the channel, you might even think some of the videos are too boring. But you know both good/bad are included.

Some of the footage show police beating on already arrested suspect, letting loose K9 dog on handcuffed suspect, police (I believe Chicago PD) planting fake drug evidence, swatting, etc. BUT, such cases are rare among the nearly 600 videos uploaded onto the channel so far.

Many videos do include active shooting incidents (some justified, some not) and might be a bit intense. But this channel is a really unique window into what Police encounter everyday. I highly recommend it.

</comment><comment><USER33> I've never seen the horrors of post-modernity summed up so well in a single headline.

</comment><comment><USER34> Won't this be illegal in states that require both parties to consent to recording?

<comment><USER35> "...the First Amendment protects the right to record [police/gov't officials carrying out their duties in public places] regardless of whether the police/officials consent. This constitutional right would override any state or federal laws that would otherwise prohibit such recording."

[http://www.dmlp.org/legal-guide/recording-police-officers- an...](http://www.dmlp.org/legal-guide/recording-police-officers-and-public- officials)

<comment><USER36> if you're rich enough for appeals court

and that motivates me

</comment></comment></comment><comment><USER37> At least in the U.S. the fear with this type of thing is twofold:

* It instantly triggers an antagonistic mood for the entire encounter with police. It should not of course; police should always be under legal scrutiny considering how much power (and weaponry) they have access to...But police get aggravated when the laws are applied to them, so if they see something like this app, they tend to respond negatively and in a hostile manner (by hostile, not necessarily using force, merely that their biases begin to manifest). So, what might have started out as a mild case could be exacerbated by simply using this shortcut.

* Also, reaching for a phone, that police might "mistaken" for a gun, could almost instantly trigger a police officer to draw - and of course worse, set off - their firearm.

Don't get me wrong, I love the idea of this shortcut...but i don't think it is enough. In fact, I think car makers should just sell cameras and recording equipment in their cars for this purpose - as added features! i think built-in devices - to protect US! - would go a long way. Of course, what this says about society - that i would even consider offering a feature for a car that monitors our own police - is a saddening state of affairs.

</comment><comment><USER38> I've been waiting for smartphone to have similar facilities for situations like these.

\- police brutality \- mugging \- robbery

Basically evidence recording / storing / uploading and possibly pinging trustworthy people or nearby strangers to alert them.

</comment><comment><USER39> I've often thought about the use of Facebook Live video in this situation. If I have done nothing wrong it would only be minimally embarrassing to have friends and family see the encounter, on the other hand to have a silent witness with redundant friends, family and a preserved recording of it would be useful in the case of abuse of power or worse. Of course along with this thought, I've done mental exercises of how to address an officer with respect and how to not make sudden moves which would cause increased concern.

</comment><comment><USER40> I love Siri Shortcuts.

Apple gets criticized on HN quite a bit and some of it is warranted but Siri Shortcuts feels like the return of the old Apple.

One thing though about this Shortcut it does not automatically send anything to your recipients. It asks you got confirmation before it does.

</comment><comment><USER41> About 90% of my experience with police has been profesional and unremarkable.

The other times should've been recorded and discipline may have been appropriate even though I was not harmed.

<comment><USER42> > About 90% of my experience with police has been profesional and > unremarkable.

I chuckled when I realized how big your sample size must have been for you to come up with that number. I'm not one to talk, I think the number for me is 80% ;)

<comment><USER43> Where on Earth do you people live!? I've had numerous interactions with the British police over the years (even one in my misspent youth where I was undoubtedly on the wrong side of the law) and they've been nothing but polite and professional.

<comment><USER42> I live in the US. My worst encounter with the police:

> I'm 16.

> Two guys break into my house.

> I call the police, distraught, terrified while they are breaking into my > house.

> Guys get cold feet and run away.

> Several police officers arrive with K-9 unit and investigate the broken > glass window.

> Police see a nerf gun in the room.

> Police claim this isn't a case because I "probably shot the window with my > nerf gun and got scared that my parents would ground me for breaking the > window, so I called the police out of confusion".

This is America. Where idiots who don't know elementary physics are given guns in order to protect us. Where lawmakers who think Jesus exists and is looking down on us from the heavens decide what is and isn't legal. Welcome to my country. To be fair, most of the other encounters I've had with police have been professional. So, that's how I arrive at 80%.

</comment></comment></comment></comment><comment> man-and-laptop Off topic: If the article doesn't show even after you disable the adblocker, turn on the Reader mode.

</comment><comment><USER44> This is what Workflow changed to?

<comment><USER45> Yes, but it's way more powerful and integrated now.

<comment><USER46> Unfortunately it requires Siri to be enabled even if the shortcut itself doesn't use it (like when I want to trigger it with touch).

I've disabled Siri on my phone and watch because I never use it and there's a massive battery improvement when I disable it; the old Workflow app used to work without Siri, but Shourtcut requires it apparently :(

<comment><USER47> Interesting comment on the battery impact of Siri. Did you notice improvements when you turned off Siri entirely or just the "Hey Siri" functionality? I find it quite odd that Siri would take up battery even when not running (given that "Hey Siri" is disabled).

<comment><USER46> I haven't tried partially disabling Siri (always completed disabled it or fully enabled everything), but I thought the "Hey Siri" feature worked only when plugged in? Maybe I'm confusing it with a different feature.

<comment><USER26> That was an iOS9 limitation.

<comment><USER48> That was a phone limitation. The iPhone 7 had the hardware for always on listening.

<comment><USER49> My 6S+ supports this as well.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER50> Siri, I just landed in New Zealand.

      * changes passcode to a random 256 character alpha-numeric string, locking you out of the phone *

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

or maybe...

Siri, they're forcing me to use face unlock.

      * erases data and performs a factory reset *

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

<comment><USER51> That news about New Zealand and people's experiences in other "first world" countries... How is this still called the "Free World" anymore?

(Not an attempt at some Reddit'y snark. This is increasingly feeling dystopian.)

<comment><USER31> When I started to write this post, I had no intention of creating this rambling essay that might well come straight from a comspiracy nutjob. It is certainly not well supported by any facts that I have readily available. But I really need to vent, so here it is anyway:

I too get the perception (through media!) that the world is becoming more dystopian. But I think that there may be more to that than meets the eye.

I am seriously starting to wonder if social media and internet based media in general have a big part in that.

This is not a single issue IMO. There are several aspects to it: people get offer a much wider spectrum of sources of information and generally tend to prefer thise that have slants more in line with their own views. Also, bad news is more sensational and spreads wider and faster than good news. This lead to a bias in what is reported. Thirdly, and most damning, social media is not only supporting these bubbles that people build around themselves. They are being exploited by actors who post material that is designed to undermine our perception and our opinions. This is apparantly done in subtle ways. Some internet shitstorms are apparently engineered using bots to shape public views on certain topics. This seems to be done to subtly, slowly and purposefully undermine public opinion and steer it towards extreme views.

There was a recent study undertaken of s sample of Twitter messages to Rian Johnson about Star Wars VIII. A substantial fraction of the negative comments were apparently manufactured using bots. This activity appears to be linked to a political motivation, but I do not know how the study reaches that conclusion. But if it is true, it is quite disturbing.

When creating the world wide web, the idealists among us wanted to bring the world closer together and make it more connected and peaceful. I get the suspicion that these good intentions instead bring us closer to an age of renewed nationalism, intolerance and totalitarianism, which is created by maliciously exploring the very freedoms we wanted for everyone.

</comment></comment></comment><comment><USER52> Just get rid of the police or make them more corrupt so they can be bribed better.

</comment><comment><USER53> Can you imagine the s___storm if they had named this function "Siri I'm getting mugged"?

Wouldn't just "Siri start recording" make more sense?

<comment><USER54> Because of the nature of Siri Shortcuts, you actually get to decide what to say for this - it's not up to the app developer. I'm sure he chose it because it made for a good headline though.

<comment><USER55> I would call it "Siri pay attention"

<comment><USER56> "Siri, help help I'm being repressed"

<comment><USER55> Issuing voice commands to some trollop in the cloud should be no basis for a system of oligarchy...</comment></comment></comment></comment></comment>


UK and US say Russia fired a satellite weapon in space - <AUTHOR> https://www.bbc.co.uk/news/world-europe-53518238 <comment><USER2> Between the Air Force X-37B and the new Space Force, I find it a little hard to take pearl clutching about the "militarization of space" seriously.

Don't get me wrong, Russia aren't some good guy, but when you actively do a thing for tens of years and then the other guy does that thing, you have no moral high ground left to complain.

<comment><USER3> >Air Force X-37B

The Air Force X-37B is not a missile or weapon.

>Don't get me wrong, Russia aren't some good guy, but when you actively do a thing for tens of years and then the other guy does that thing, you have no moral high ground left to complain.

Russia tested a satellite-to-satellite weapon which is completely unprecedented militarization of space.

The US has tested ground-based anti-satellite weapons on satellites in decaying Low-Eart Orbits. The debris quickly burned up in the atmosphere.

China is the only country to have blown up a satellite beyond LEO. The debris from that will be in orbit for decades. That was an unprecedented militarization of space and not comparable with anything the US has done in the space.

You are pushing a narrative that the US is the warmonger in space and that Russia is only responding in kind. The truth is that Russia and China are far ahead of the US in weaponizing space. The US is playing catch-up.

<comment><USER4> > The Air Force X-37B is not a missile or weapon.

No, but that seems a little bit disingenuous. Aircraft carriers are neither missiles nor weapons either. We can recognize things as military assets that are neither missiles nor weapons.

The X-37B is a DOD asset, operated by the military, capable of deploying weapons systems. In that way, it is part of the military capability of the US.

<comment><USER5> It would be silly to use the X-37 as an anti-sat weapon: it's too expensive. Think of how cheaply SpaceX is putting up Starlink! A single Falcon 9 could probably put up a bunch (20? 30?) of antisat weapons that only ever raise or lower their orbits and fire .22s at their targets. The idea is to disable targets with as little debris as possible.

With larger anti-sat sats you could actually latch on to the target and de- orbit it for zero orbital debris destruction. This requires many more, much larger such devices because while it takes relatively little delta-v to raise or lower an orbit, it takes a lot more to match an arbitrary target's orbit (to which more fuel has to be added for de-orbiting).

<comment><USER4> Just having a theoretical conversation now, but

> antisat weapons that only ever raise or lower their orbits and fire .22s at > their targets.

raising your orbit is the hard and expensive part, it takes a lot of propellant, which generally rules out smaller vehicles, right?

And if you want to destroy a satellite, you need a lot of kinetic energy, which for a tiny projectile means lots of speed relative to the target... But since your absolute speed determines the height of your orbit, the only way to get more than ~1000 ft/s is to have your gun-sat in an opposite-direction orbit to the target, right? And isn't it the case that our satellites are all orbiting in more or less the same direction, since they launch from canaveral and have to head east to be over water?

<comment><USER6> What if you used an object in another orbit to fire a projectile? Wouldn't that make the differences in energies pretty significant?

<comment><USER4> I did suggest "have your gun-sat in an opposite-direction orbit to the target". Yes, that would dramatically increase the kinetic energy.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> If you want to learn more about Russia and China's militarization of space, The Shadow War by Jim Sciutto (Chief National Security Correspondent for CNN) is a good place to start. It could be a one-sided effort (I doubt he has access to RU and PLA national security insiders like he does in the US), but it definitely sounds like Russia and China have moved ahead of the US in this realm, in terms of actual satellite based shenanigans.

You'll also understand the at times seemingly random actions of those two countries a little more.

[https://www.amazon.com/Shadow-War-Russias-Operations- America...](https://www.amazon.com/Shadow-War-Russias-Operations- America/dp/0062853643)

<comment><USER8> The US military has a certain tension in its communications. On one hand they have to get money from the Congress, and the way to do this is "the gap between us and these other guys is shrinking, we can't continue to do our job with what money we have right now, hence, give us more money". On the other hand, they have to communicate to their allies that the gap between themselves and the Russians/Chinese is not actually shrinking, it's all good, and even expanding (which it should better be, considering their budget is equal to the defense budget of the next 20 nations combined).

I personally doubt Russia and China have moved ahead of the US in any realm, satellite, rockets, cyber, or anything. But if you want to get a book sold, you can do worse than arguing as such, and you certainly will have a lot of evidence from the available various Congressional hearings, and other official military communications, just because the Pentagon is not beyond crying wolf when it serves its interests.

Edit: the book you mentioned looks quite good, thanks for mentioning it. I just bought it.

</comment></comment><comment><USER9> Knocking out another countries satellites is what would be done in a first strike nuclear attack according to modern military theorists.

China has tested space to space satellite weapons.

Russia has now tested space to space satellite weapons.

The US has not tested any space to space military assets and doesn't have this functionality as far as what is currently known. (The rumor mill also currently says the US has no such functionality and requires ground take off).

The reason this is important is that any response to a direct satellite attack would potentially take greater than 30 minutes using ground based weapons. (Again rumor mill).

<comment><USER10> >The US has not tested any space to space military assets and doesn't have this functionality as far as what is currently known. (The rumor mill also currently says the US has no such functionality and requires ground take off).

Um, most recently in 2008 the USA shot down it's own dead satellite by a ASAT missile fired from a ship: [https://en.wikipedia.org/wiki/Operation_Burnt_Frost](https://en.wikipedia.org/wiki/Operation_Burnt_Frost)

While the story goes that the satellite was dangerous due to frozen ball of hydrazine fuel on board (as it failed soon after launch and still had full fuel load) it was also a perfect chance to test the existing ASAT capability.

Also in 2019 India tested their ASAT missile: [https://en.wikipedia.org/wiki/Mission_Shakti](https://en.wikipedia.org/wiki/Mission_Shakti)

<comment><USER11> Um, a ship is surface-based so that wasn't a space to space asset.

<comment><USER10> Isn't who owns the capability more important where it is based ?

</comment></comment></comment></comment><comment><USER12> Judging by the article the system in question simply was maneuvering near another Russian satellite and got really close to it. It didn't fire any projectiles to destroy it or anything like that. So I don't understand why it caused such fuss, apart from the routine nurturing of the Russian scarecrow.

Yes, such systems could be used for military purposes (e.g. for inspecting US spy sattelites or for interfering with their work), but also can be used for civilian as well (e.g. refueling, safe deorbiting, and even some day repairs). It's far easier and more reliable to destroy enemy satellites using ground based systems, after all you just need to create a field of ballistic debris which can be slower than first cosmic velocity, so it will be cheaper than satellite. So I highly doubt purpose of the system is satellite destruction.

<comment><USER13> I don't know why you've been downvoted, this is exactly what I thought.

<comment><USER14> "apart from the routine nurturing of the Russian scarecrow" \- here is why. Watch for this reply being downvoted as well

</comment></comment></comment><comment><USER15> The main US strategic advantage over Russia is the networked military platforms under the "Total Global Awareness" paradigm which are able to deploy smart precision weapons, and the satellites are at the core of it. In general, one has either to build its own capabilities up to the level similar to the opponent's, which isn't an option for Russia in this case, or to bring down the opponent's capabilities to the one's own level, and that is the only option that at least somewhat plausible for Russia here. So, it is pretty logical that the satellites are going to be the first priority target as much as it is possible for Russian capabilities.

</comment><comment><USER16> It's interesting that this seems a propaganda piece for Space Force.

America Really Does Have a Space Force. We Went Inside to See What It Does [https://time.com/5869987/spaceforce/](https://time.com/5869987/spaceforce/)

</comment><comment><USER17> "It is the first time the UK has made accusations about Russian test-firing in space"

Have there been previous cases of Russian test-firing in space? [edit grammer]

<comment><USER18> Yes, Salyut 3 had either a 23mm or 30mm cannon, which was apparently test fired: [https://en.wikipedia.org/wiki/Salyut_3#On- board_gun](https://en.wikipedia.org/wiki/Salyut_3#On-board_gun)

<comment><USER10> There were also plans for a manned Soyuz based satellite interceptor armed with cannons and/or missiles but it was never flown and nothing really built: [https://en.wikipedia.org/wiki/Military_Soyuz](https://en.wikipedia.org/wiki/Military_Soyuz)

</comment></comment></comment><comment><USER19> Kind of curious what this weapon is, said "projectile" so I guess it's not a laser, I was thinking of those "Gods rods" but that's for targeting the ground

</comment><comment><USER20> Highly recommend watching 007 Goldeneye for a fictional take on this situation. Fantastic movie.

</comment><comment><USER21> I'm actually surprised to see that India is in race of developing anti- satellite weapons.

</comment><comment><USER22> I just hope someone is building a Gundam.

<comment><USER23> Welp have I got a link for you!!

[https://www.popularmechanics.com/technology/robots/a33381411...](https://www.popularmechanics.com/technology/robots/a33381411/japan- giant-gundam-robot/)

</comment></comment><comment><USER24> "threaten the peaceful use of space" and what exact is the US space force for? Cleaning up after Elon's space junk? I don't think so. Kind of hypocritic to accuse others of militarizing space.

<comment><USER25> US military presence in space consists of spy satellites and military communications satellites. As far as we know the US hasn't put any space-based weapons up there. There's a difference.

<comment><USER26> Russia doesn't care about the technical difference and why would they? The USA uses satellite infrastructure to exert influence, including in regions that Russia is active in and considers critical. From a Russian perspective, it is important that they have some way to counteract these capabilities.

The USA and its allies finds it very useful to paint Russia as a hostile and even unethical actor here, but there is no fundamental difference between what Russia does and what the West does.

<comment><USER25> In terms of gaining influence, sure, maybe they're ethically on par. But saying it's reasonable they're weaponizing space because "they need to counteract US capabilities" is a flawed argument. They could counteract US capabilities by investing in the education and economic well-being of their populace, which, if enacted in 2000 when Putin came into power, would have given enormous dividends to technological and military capability by now. Instead they spend their human capital luring college graduates into troll farms in Siberia with the promise of bare minimum shelter and food.

Internally, Russia is a deeply shitty regime, run by mobsters and thugs and preying on its populace. The US has a lot of problems too (and even more so since 2017) but its fundamental framework still prioritizes individual rights and freedom of expression without fear of punishment (although, unlike its allies, it doesn't do much to provide healthcare or education). I would much rather have a world that's dominated by the US than one dominated by Russia or China.

</comment></comment></comment></comment><comment><USER27> What bothers me most is not "Russia has a Geo-political imperative that has as much a claim to legitimacy as US or China" but the timing ...

Russia has for years been laundering billions through the lax City of London, and days after reports alleging sitting Lords took bribes from Russians to stop Anti Money Laundering Acts, we see a show of strength.

Not for geo politics, but for rich russian elites worrying about the cash.

Once upon a time Putins manoeuvres made some twisted strategic sense. Now not so much.

<comment><USER28> Or, the simpler explanation, they could just be unconnected events.

<comment><USER27> It's possible - but then Russia was fairly foolish for conducting it anytime near the much heralded report. It seems far more likely the timing of the report was known and not avoided.

<comment><USER29> Why would they care about a report? That for the Brits to care about. Russia couldn't give a shit and they probably planned this launch years out.

<comment><USER27> The satellite has been up for years. The test firing is whenever they press a button.

And they give a shit because the UK is making serious noises about tightening up on money laundering - I mean FFS one of our own lawmakers has been implicated in taking russian cash for putting down amendments - that's basically Russian cash paying for UK laws - it's huge. And it will make it harder for Russian money to move in London.

<comment><USER29> The whole and only reason Brexit was pushed through was because they wanted to avoid tightening up on money laundering. It's literally the City of London's business model and the EU were making regulatory noises.

<comment><USER27> Err... They?

<comment><USER29> They are political establishment "Leavers" like ex-trader Farage in this context. There is a whole load of investment and banking money behind the Leave movement.

[https://www.insider.com/twenty-one-biggest-donors-to-the- lea...](https://www.insider.com/twenty-one-biggest-donors-to-the-leave-brexit- campaign-2017-5#2-peter-hargreaves-3200000-20)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER30> After saying that Russia was witnessed "launching a projectile with the characteristics of a weapon." the Air Vice Marshall said "Actions like this threaten the peaceful use of space and risk causing debris that could pose a threat to satellites and the space systems on which the world depends."

My understanding of these words are that it wasn't that Russia having weapons in space per se threatens the peaceful use of space but how they tested their weapons in this case. This is because it risked causing debris and a lot of damage. I don't see the basis for calling out the US for hypocrisy based on this article. I'm unaware of any anti-satellite projectile weapons being tested by the US like this over the past 12 years, I suppose you could call the US a hypocrite for previous tests but that's a bit of a stale accusation given how much more peaceful space activity there has been since then.

Edit: for clarity.

<comment><USER31> > _I 'm unaware of any anti-satellite projectile weapons being tested by the > US like this over the past 12 years._

It seems very arbitrary to draw the line at 12 years.

In 2008 the US tested and proved their anti-sat tech works [1]. Now they don't need to keep testing it, because everyone knows it works, and that's enough.

Now the Russians want only to do the same thing, and they're bad because of it.

[1] [https://science.howstuffworks.com/shoot-down- satellite.htm](https://science.howstuffworks.com/shoot-down-satellite.htm)

</comment></comment><comment><USER32> Why is Russia or China even trying to take out our satellites at this point? We have SpaceX, guys. We can put replacements up whenever we want to. How about the Russians start figuring out how to use a launch system that isn't worrying about whether or not its saved up enough for retirement?

<comment><USER33> I have no clue as to why Russia insists upon playing the neighborhood punk in international politics. I mean to what end?

They've got massive problems internally, most of their armed forces run on vapors, are they hoping to sell this to the highest bidder? Just a few last chest thumps before they become less relevant? They still have some good lead in some highly technical areas like weapons and rocketry and ancillary technology, but most everything else is being wasted and no one seems to care there. It's a slow degradation. So much potential just wasted.

They could work with Europe, even the US, if they just reset the way they play. Play your part—you're not the old USSR any more.

<comment><USER18> > I have no clue as to why Russia insists upon playing the neighborhood punk > in international politics.

This is why:

> They've got massive problems internally...

An external enemy to blame does wonders.

<comment><USER33> I don't think that's it. This is more for international audiences. For internal distraction they'll threaten some Caucasus republic or Ukraine.

<comment><USER18> Hard to blame economic woes on internal threats; "the Americans are sanctioning/interfering our exports" is a lot easier to sell.

Cuba and North Korea have done this for decades; it works well.</comment></comment></comment></comment></comment>


1/1 Scale F-16 Cockpit - <AUTHOR> http://www.arcair.com/Gal2/1801-1900/Gal1882-F-16cockpit-Sachs/00.shtm <comment><USER2> When I was a kid my brother (much older, getting his ME undergrad) built me a 1/5 or 1/6 scale biplane out of plywood and other lumber. It had working control surfaces and the wooden propeller (which he had "carved" by hand on a table saw) rotated freely. Needless to say I was in aviator heaven for a summer.

<comment><USER3> Thanks. You have now given me a great idea of what to make for my son who is 19 months old. I might even have it ready for when he's 5.

</comment></comment><comment><USER4> Is it weird that I just caught myself daydreaming about mapping every one of those keys to a vim, emacs, or Sublime command?

Imagine your first day at a new job, and the programmer next to you straps herself into a replica of an F-16 cockpit to get her work done.

<comment><USER5> Side note: what's with the over-the-top political correctness epidemic on HN? Every time somebody talks about a random programmer it's "her" or "herself". I am all for gender equality and more women in tech, but this sort of stuff just seems strange.

<comment><USER6> Sentence could have been made gender neutral pretty easily:

> Imagine your first day at a new job, and the programmer next to you straps > themselves into a replica of an F-16 cockpit to get their work done.

I do feel that using a gender does make it read better though.

You may just be falling for confirmation bias. Anyone out there want to take a random sampling of these types of sentences and see if there actually is a gender bias?

<comment><USER7> Except that technically "their work done" is improper grammar when your subject ("the programmer") is singular.

<comment><USER6> Are you sure? Because people use 'their' as a singular all the time when talking about someone of an unspecified gender, and the dictionary seems to agree with that:

"belonging to or associated with a person of unspecified sex: she heard someone blow their nose loudly"

[http://oxforddictionaries.com/definition/english/their?q=the...](http://oxforddictionaries.com/definition/english/their?q=their)

</comment></comment></comment></comment></comment><comment><USER8> My idea: 1\. Use Oculus Rift 2\. Surround cockpit with a green curtain 3\. put webcam in Oculus Rift (if it doesn't already have one) 4\. Project camera view with green-screen over virtual scenery

That way you might use your hand-eye coordination (minus stereo) with the cockpit and the rest is still "oculus rifted".

<comment><USER8> Sorry, someone else already had that idea and posted it. Apologies...

</comment></comment><comment><USER9> Where does the screen go? Does he throw a large LCD in front of the entire thing or mount several smaller screens in the gaps?

</comment><comment><USER10> Imagine:

1\. build a box to put this in

2\. paint that box a very distinct shade of something e.g. yellow

3\. get a very even lighting

4\. wear an Oculus Rift

5\. have software do chroma-keying of the outside of the cockpit

6\. dream about mounting it on some kind of hydrologic piston contraption..

<comment><USER11> Hydrolic flight simulator platforms start at about $1600 and go to about $14k (for something which can spin and roll 360°), and probably a lot less if you make them yourself.

<comment><USER12> I looked into pneumatic actuators for this a while ago, the parts are pretty reasonable, the real cost would be the time it takes to build and integrate your own motion platform.

</comment></comment></comment><comment><USER13> Early in my career I worked in the Sim lab at General Dynamics (before Lockheed bought the fighter business). Looks pretty similar to what I remember we had. This was early 80's. The working ones had screens around them to display imagery. We had a bunch for testing the computers. Never got to fly one though sadly.

</comment><comment><USER3> I wonderif it would be possible to somehow get all of the indicators working too? Perhaps something like a RasberryPi that grabs info from the game and feeds it to the altimeter, pitch/yaw indicator and so on. Shame games don't come with APIs like that.

<comment><USER14> X-Plane has a plugin interface that would make this very possible. I've used plugins that show various instruments in different camera angles, so that data is there and can be grabbed. And there is a lot of 3rd-party hardware that simulates and controls various components of the aircraft (like external GPS modules for training). Probably wouldn't be hard to get the data out of the process.

</comment></comment><comment><USER15> The Oculus Rift will make these kind of projects obsolete.

<comment><USER16> Short of inventing the holodeck out of Star Trek, I can't possible seeing that being entirely true as it's not quite the same as being physically immersed with more than one's eyes.

Oculus Rift would be useful in those situations when you want to switch between say a WW1 flight sim[1] and a modern day one. It would be a little jarring to be flying a Fokker Dr1 in from the confines of an F-16 cockpit (well unless you want to pretend you went back in time and suddenly your mach 2 jet fighter must obey the limitations of 1917 aviation). The cockpit + Oculus Rift would at least dampen the sense somewhat of being seated in a modern day cockpit without having to build two (though building a modular one that you can swap the cockpit part in and out might be an idea). Maybe add a programmable fan blowing in front of you that adjusts its RPMs based on velocity to simulate wind effects :)

[1] [http://store.steampowered.com/app/244050/?snr=1_5_9__205](http://store.steampowered.com/app/244050/?snr=1_5_9__205)</comment></comment>