How to hit the Hacker News front page (and what it's worth) - <AUTHOR> http://ryanwaggoner.com/2010/09/the-secret-to-hitting-the-hacker-news-front-page-and-what-its-worth/ <comment><USER2> Hmm, I should add protections against this phenomenon. Should be straightforward.

<comment><USER3> Why protection, isn't the fact that people are submitting the story actually a powerful indicator it is a good one?

<comment><USER4> But if you form a cabal to make front page of HN - whether your clique be Twitter followers or a "group of friends" on this site - it's gaming the system.

Essentially, that is what the article advocated (oh, and write interesting content - duh).

<comment><AUTHOR> A "cabal" typically refers to a group secretly united to promote their own interests. I'm not sure that tweeting a link to a blog post meets that criteria.

<comment><USER5> A cabal of voters could easily be setup on HN. That is problematic.

</comment></comment></comment></comment></comment><comment><USER6> "Several job offers with companies I respect"

This is a powerful outcome of writing frequently on the web. Have any other bloggers experienced this?

<comment><USER7> Yes, even though my blog is incredibly lame by HN standards (or any standards, really). I imagine that people who post actual content must have to beat off recruiters with a stick.

<comment><USER8> Not meaning to toot my own horn, but just to give a testimonial for blogging: At the client I'm working for right now initial contact was at C-level. (At a software company which you've heard of.) That isn't the first time that happened, either -- if people are really interested in what you have to say, recruiters, resumes, and the HR department are not merely bypassed, they're never even thought of.

<comment><USER9> True story!

This is obvious and old hat for the more experienced corporate drones here, but it's important for all the newbies to understand that [all, but especially HR] processes and policies are made to be broken, and they are often so dysfunctional in large corporations that if someone at an appropriate level wants something done, it will be done.

(My personal experience suggests that managers and below have 0 power, and only directors+ start being able to work the informal network.)

</comment></comment></comment></comment><comment><USER10> I think people need to be rewarded somehow for reading and voting on stories on the new page.

If everyone has to develop a cabal to get to the front page, then over time the size of the cabals will have to grow because of the increased competition - eventually squeezing out the little guy, no matter how good his content is.

With an active userbase on the new page cabals would be less likely to form.

</comment><comment><USER11> My take on this "secret", in fewer words: claim personal expertise and experience and make some emphatic claim (esp. w/ an emphatic title) about a topic where people will either agree with your point from their own experience, or have some existing opinion (who doesn't have an opinion about facebook?), then make sure you get it in front of a bunch of Hacker News readers (perhaps via some other mechanism, like twitter).

The facebook gripe post wasn't completely linkbait-y, since it provided a nice basis for a solid discussion, but by itself it was pretty light on substance. I'd personally much prefer to see gripes with more meat on them; "show, don't tell".

<comment><USER12> Max Klein applies your take as religion, trolling HN with emphatic claims of personal experience.

And he doesn't even exist: <http://news.ycombinator.com/item?id=1353050>

<comment><USER13> Dude totally exists, he sent me a free Xbox.

(shocking news alert -- rms is an alias I use on the internet sometimes. Nevertheless, I also exist.)

<comment><USER12> I know you exist, I've met you :)

He exists too, but his name isn't Max Klein, and 'parable' is the most charitable reading of most of what he posts under that persona.

</comment></comment></comment></comment><comment><USER14> This blog post is like an infomercial selling a book on how to make your own infomercial. Flag!

<comment><AUTHOR> Ouch. I'm not really selling anything, just thought people who write for this audience might be interested in what I had found out through the process. Why does the HN crowd have such an issue with people promoting themselves even slightly? If the content is good and people like it, they'll vote it up...I don't see the problem with trying to fit your product to the HN market.

Edit: in fairness, this blog post title was too sensational, so I've changed the HN post to be less so. Unintentional, but still, my apologies.

<comment><USER14> Sorry about the negativity. I actually didn't read your post that made it to the same page for the same reason (overly sensational title).

If you look at Digg or Reddit they are essentially just bit lists of overly sensational titles.

One thing I like about HN is that we manage to mostly avoid that... and titles are generally fairly informative.

I typically only downvote/flag stories that have overly sensational titles, b/c I view them as bait for the more cursory of readers, who don't generally make thoughtful comments b/c their attention span is calibrated toward sensational, dopamine trigger words.

I've found that if a post makes it to the HN front page it's generally quality reading, so a sensational title actually provides a signal not to read it.

<comment><AUTHOR> You found "Why I stopped building Facebook apps for clients" to be an overly sensational title? What would you have called it?

<comment><USER14> I'm not saying sensational titles aren't great for marketing.

I think something like "My Thoughts on Facebook's Apps platform API"

</comment></comment></comment></comment></comment><comment><USER15> I'm curious why you didn't include this tactic in your "BAD" list. There's really no difference between creating a bunch of accounts on your own to upvote a story and getting a bunch of other people to do it for you. You're still artificially generating a bunch of votes for a story right at the moment of submission, therefore gaming the system.

<comment><USER16> Sure there's a difference. If you create a bunch of your own accounts to upvote a story, then all those upvotes collectively convey the following information: "One person liked this". (Worse still, that one person is the person who wrote it; so, near enough zero information.)

If you instead write something that lots of people upvote, then all those upvotes convey the following information: "Lots of people liked this."

Now, it's still bad that they "liked" it only because they know who wrote it and think he's generally interesting. The outcome for HN is probably still that what's on the front page doesn't match what's most interesting as well as everyone would like. But the problem is low-quality real information, not fake information. It's not bad _in the same way_ at all.

</comment></comment><comment><USER17> I occasionally add HN links to something that I submit on Twitter, especially when I think it's something people would really like to see. I have to do this because of this exact effect, if it doesn't hit the front page, then it never takes off.

For example, yesterday, I tweeted this:

<http://twitter.com/steveklabnik/status/25811540605>

Which resulted in this: <http://news.ycombinator.com/item?id=1736805>

Which is cool, but it was on the home page for about 5 minutes total, because those votes came too slowly for it to hit the front page. That's all good and fine, but then today, I wake up and see this:

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

Which is just blogspam, but shows that this story is important, because it ended up getting lots of comments.

I'm not sure how to make this better, just providing a recent example.

<comment><USER18> I think two things need to be done:

1\. Encourage more people to monitor the "new" page, and

2\. Slow down the submission of crap to the "new" page.

For instance, why is there no karma threshold for submitting new links? I just had a quick look, and there's several new links from someone trying to sell holidays to Vietnam with an account that was created eighteen minutes ago.

<comment><USER19> > 1\. Encourage more people to monitor the "new" page, and

Even though I know what "new" does, I seem to interpret it as "create something new" instead of "view new submissions". Maybe I'm just an odd person but I think changing that to "newest" could make a difference if there are more people like me, especially for new users.

<comment><USER18> Good point. Really, looking at the list of the newest submissions _should_ be exciting, but most people seem to see it as a chore.

I'd do A/B testing by changing it to "Hot Fresh Exciting New Links!" and see how many people now click on it.

</comment></comment></comment></comment><comment><USER20> pg: what about allowing people to spend down their own karma to get an important post onto the front page? Sort of like Stackoverflow's bounty system. You could start with a 1:1 exchange rate and tweak it over time.

<comment><USER21> Ouch...points with no value already entice people to attempt to hoard and game the system to gain more. I don't want to think of what would happen if these points were suddenly given a tangible value.

</comment></comment><comment><USER22> The most surprising part of that was the ad revenue.

I wouldn't think the HN crowd are big ad clickers (if they see the ads in the first place).

<comment><AUTHOR> Well, the CPM was pretty abysmal: about $.40.</comment></comment>


Egyptian Activists Organize Against Government Plan to Spend $43M on Microsoft - <AUTHOR> http://arabcrunch.com/2012/12/egyptian-open-source-activist-organize-a-silent-demonstration-against-egypts-government-plan-to-spend-43-million-on-microsoft-products.html

<comment><AUTHOR> The deal value is Deal Valued at $40 Million activists want the gov. to use open source technologies instead of MS products

</comment><comment><USER2> is there any detail on the spending? disregarding the $$$ of the deal, it is not that weird for an organization to prefer Microsoft's product if it is mostly about Windows+Office stuff.

If it is about server/backend thingy/IT infrastructure, then yes, no reason to choose Microsoft over the free stuff.

<comment><AUTHOR> both, as for windows office their are free open source alternatives such as Libre Office and Ubuntu for Desktop</comment></comment>


Faraday Future unveils super fast electric car - <AUTHOR> http://www.bbc.com/news/technology-38503987 <comment><USER2> The car accelerates 0-60 in 2.5s, guys. Faster than Tesla. It's very important.

<comment><USER3> .. but does it have ludicrous mode?

<comment><USER4> that would be ridiculous.

<comment><USER5> it's all about the plaid now.

<comment><USER6> 2019 can't come soon enough. I can't wait to get the next Roadster with Maximum Plaid.

</comment></comment></comment></comment></comment><comment><USER7> Without disclosing the cost.

</comment><comment><USER8> Seems to me like they have, sadly, set themselves up for failure by adding too many gimmicks to the car that sound fancy but nobody really cares about. Facial recognition? On your first model? Really?

</comment><comment><USER9> The FF keynote was one of the worst I have ever seen. They barely even showed the car. They over-hyped and did not deliver on that hype.

</comment><comment><USER10> No charging network for long distance. It's currently Tesla's big differentiator over GM and any other electric company.

</comment><comment><USER11> Meanwhile, Rimac has been building 1088-HP electric cars for a long time, without the hype.</comment>


Witcher developer: Thieves want ransom for leaked Cyberpunk 2077 docs - <AUTHOR> https://arstechnica.com/gaming/2017/06/witcher-developer-thieves-want-ransom-for-leaked-cyberpunk-2077-docs/ <comment><USER2> _Cyberpunk 2077, an open-world role-playing game based on the 1990 PC title Cyberpunk 2020._

Kids today, completely forgotten that there was a time when role-playing games came in bound paper books rather than computers.</comment>


Analyzing Python Code with Python - <AUTHOR> https://rotemtam.com/2020/08/13/python-ast/ <comment><USER2> My pet peeve is with all static analysis articles like this is they demonstrate how to solve a particular problem, but never talk about the universal abstraction that allows one to write any static analysis tool: interpreters. Really, all you need to do is write an interpreter.

A standard interpreters for a language (like Python) evaluates the language to produce some value. If you want to do static analysis, make the values the property you are analyzing. In this blog post's example the value is a boolean denoting whether a file is a test file or not. Thus an interpreter would be recursive on individual AST nodes, doing the decisions shown here in the sample and returning the expected value from the analysis. This forms the core of a rich literature in abstract interpretation, where the program analyzer instead of producing the concrete results of evaluating a program produces a the value of a property that you want to analyze.

Even compilers are interpreters. Instead of writing ad-hoc methods that do some operations, compilers can often be structured as something that evaluates the a program in source language and instead of producing a value, produces another program in a different language.

Interpreters are underrated!

Edit: typos

<comment><USER3> Well... for me it seems a bit silly. Abstract interpretation as part of formal methods requires mathematical rigor (albeit some of it quite simple and intuitive) but interpretation I'd argue is up to the interpretator.

<comment><USER2> I agree with the mathematical rigor required for abstract interpretation. I am arguing that there is a lot of value in thinking about programs that operate on other programs as interpreters. Essentially interpreter doesn't have to be equivalent to the evaluation of a program.

</comment></comment></comment><comment><USER4> py.test has a different way of finding tests. It loads Python files starting with "test_" or ending in "_test.py" then uses reflection, to find functions starting with "test_" or classes starting with "Test", or functions marked with the attribute "__test__" (which is applied by the @nose.tools.istest decorator). See [https://github.com/pytest- dev/pytest/blob/d69abff2c7de8bc65b...](https://github.com/pytest- dev/pytest/blob/d69abff2c7de8bc65b7f1ef867dec5b5b9c564bd/src/_pytest/python.py#L360)

This mechanism of scanning the AST is a different approach and won't find the same set of tests. Scanning the AST can be useful and things like [https://macropy3.readthedocs.io/en/latest/](https://macropy3.readthedocs.io/en/latest/) are awesome though!</comment>


Open Calais API: entry point to Reuters' semantic web platform - <AUTHOR> http://www.readwriteweb.com/archives/reuters_calais.php

<comment><USER2> Did anyone else parse that as "Open Cialis API"?

I get too much spam.</comment>


JavaScript – Array Direct Assignment - <AUTHOR> http://suhairhassan.com/2013/06/02/real-world-javascript-part-3.html

<comment><USER2> See also this benchmark, which seems to have very different results from the scottlogic link: <http://jsperf.com/array-push-vs-array-length23333/2>

I just re-ran it on FF24 (nightly), and also saw results where .push beats this kludge.

So before everyone runs off and takes 'direct array assignment is fast' as a rule of thumb, please consider that it quite probably isn't.

<comment><USER3> Also faster in most versions of chrome

</comment></comment><comment><USER4> I prefer readable code to hacks. Unless you absolutely have a hot spot in your code that will benefit, readability should outweigh this. JavaScript engines will catch up.

</comment><comment><USER5> after reading the underscore source I remember wondering if direct array assignment was really significantly better than calling push. here's a quick link to the perf reference made in the article: [http://www.scottlogic.co.uk/2010/10/javascript-array- perform...](http://www.scottlogic.co.uk/2010/10/javascript-array- performance/), oddly interesting is that calling push was faster in chrome than in direct assignment. I wonder what the results would be like in newer browsers...

<comment><AUTHOR> Direct assignment without using the calculated length property performs way ahead than others, at least in chrome <http://jsperf.com/array-direct- assignment-vs-push/3>

<comment><USER6> Wow, direct assignment is an order of magnitude faster than push (in my test, chrome 27 on windows 7). Can anyone explain why?

<comment><USER7> Direct assignment is the only test in which the length of array doesn't change.</comment></comment></comment></comment>


.Mail is coming to your dock and we would love to have you on board. - <AUTHOR> http://dotmailapp.com/

<comment><AUTHOR> Here's an early prototype: [https://github.com/w0land/qmlail](https://github.com/w0land/qmlail)</comment>


Why, oh why, do those nutheads use vi? (2007) - <AUTHOR> http://www.viemu.com/a-why-vi-vim.html <comment><USER4> I basically started learning Vim because.. well it was a hipster thing. The first two years, I really did not know how to actually learn it. All I would do is enter insert mode, move around with arrows and ":wq". But then after 6 months, I started with basic commands, like "55gg" to move to the 55th line etc, "G" to the last line and "gg" to the first line. Then came buffers, I started opening multiple files and started using minibufexplorer(my entry point into plugins). This went on for another 6 months. Next came actions and boy oh boy, I became the hipster vim user in college. While editing CSV files(like deleting all instances of a particular row having text "abc"), I used Vim instead of awk/sed just because I wanted to learn more. Fast forward a year, I call myself a basic vimmer and superior to others at my workplace by just knowing search, moving around, actions, buffers, a cool autocomplete plugin and other plugins here and there.

Throughout the learning process one thing I observed was that, its just not enough to read about a cool article about Vim and leave it there. I would keep repeating the sequence of actions mentioned in the article atleast ten times every day and would find some usage for it during programming. I would intentionally force myself to use it, until at some point, the action I just learnt magically comes in as a replacement for a dumb action I was about to do. At that point I would know I've mastered it.

<comment><USER5> I'm still stuck in the first step because I have simply no interest in learning vim. I only know a small subset of commands. No I feel a bit like missing out.

<comment><USER6> I'm guessing a small subset of commands is about all that many productive Vim users know. You don't have to know everything to make good use of the tool.

</comment></comment></comment><comment><USER7> Frankly I find vim an hindrance to the type of projects I work on.

One of the most common things I use an IDE for is navigation (between files) and vim is not very good at it compared to IDEs, here's why:

* no tabs

* no project structure

* in my IDE (eclipse based or intellij based) I can ctrl-click a class/object/other to navigate into that object's definition

* in my IDE I can search for classnames, I can press ctrl-T to find who inherits from something, ctrl-alt-H to find who uses something etc...

when I find myself actually writing code, it's usually a line or two in each of several files (because modern programming paradigms tell us we should split code as much as possible), or modifying some copy pasted snippet I found on google - so navigation is extremely important even when editing.

beyond that, there are simply some things that help writing code that a text editor cannot do:

* auto-complete(with annotation to tell you what the function variables are)

* debug inside your IDE

* run code-lint, auto-build on typing to detect errors, etc...

* auto refactor (I.E. extract method, move variable, extract class etc...)

* format all your files according to your pre-specified project guideline.

* sharing you IDE configuration with other contributors

* showing when files are/aren't in version control and integrating version control so that you view history in your IDE.

There are probably projects out there where a full-featured text editor is a real game-changer and is worth the days/weeks it'll take to use it intuitively, but I never worked or know anyone who worked on such a project (even when I started projects from scratch);

<comment><USER8> Eh, half of this list actually IS possible with Vim, either through a plugin or simply out-of-the-box keyboard shortcuts. The other half are features that separate IDE's from text editors in general.

I do agree that I'm infinitely more productive in an IDE than I ever would be with any plain text editor (e.g. autocomplete-hints, refactoring support, etc etc). After discovering the JetBrains suite of IDE's some years ago, I can't imagine using anything else for application development.

However, the point of vi/Vim is not so much the editor application itself... but rather its keybindings and modal editing approach in the abstract. Those concepts are decoupled from the actual editor, because every major IDE has plugins which make them available in its environment as well. The "IdeaVim" plugin for JetBrains IDE's is amazing, letting you mix-and-match between Vim commands and normal JetBrains shortcuts in a very intuitive way (or at least intuitive if you're familiar with Vim).

If you're happy with your current working environment, then rock on. But if you're fluent with vi/Vim (and it _is_ a significant learning curve), then you can absolutely have the best of both worlds. To me, arguing about whether to use an IDE or an editor is pretty silly. But the question of whether or not to use modal editing and a suite of standard shortcut commands _within_ an IDE is a much more interesting matter.

<comment><USER9> My biggest problem with vim is that I can get it configured with all of the plugins to emulate a GUI IDE, but it does nothing to help if I can't remember the shortcuts. Off by one character? Whoops, you activated the RootNuker Plugin on Buffer 3. Discoverability is terrible, one of the few things that I feel is actually faster with a mouse.

<comment><USER10> There's no doubt, vim isn't big on making it easy to find your way around.

I don't think that matters so long as you're methodical in your approach to learning it. It's important to master the basics and then add new tools one at a time.

The amazing thing about vim is that each new command can be composed with your existing knowledge set, so just learning what, say, 's' does gives you a whole lot more power.

Also, while the discoverability might suck, the built in manual is just incredible.

<comment><USER9> This doesn't apply to plugins however, which constitute most of what would make Vim an IDE. Most of the core commands are pretty well thought out and I have a nice keyboard map printed out just in case.

</comment></comment></comment></comment></comment><comment><USER11> _Yes, there are definite reasons why the vi /vim editing model is just superior to any other out there_

Zealots trying to convert unbelievers is plain obnoxious. Your choice of editor isn't a religion so use what you use and I'll use what I use and you don't have to worry that what I'm using isn't what you are.

<comment><USER12> Probably it's just driven by the use cases: most vi users (probably) come from server side, where you don't have a mouse. Vi is particularly effective in those circumstances

<comment><USER13> If you're editing files live on the server, you're doing it wrong.

This argument ("Oh I use <insert console based editor> because I can use it on my laptop or via SSH on the server") is fucking stupid.

If you can learn how to use fucking vim or emacs, you can learn how to use configuration management - either through a "full blown" tool like puppet/chef/ansible/etc or through config packages (if you're on debian) or even through plain old shell scripts.

<comment><USER14> Yes, yes, conf. mgmt. Yes, yes.

Except when it's not really your call. And you have to poke around files so far down behind God's back through a shared desktop Enterprise VPN IE-only plugin-fest, that you don't even know which way is 127.0.0.1, then you're happy that you have vim on Dear Client's pointlessly supported RHEL boxes by default.

And othertimes, when you want to debug something that only happens on a live/production server.

Editing files on the server live is - in itself - not right or wrong. Doing it as a regular workflow is what's bad.

<comment><USER15> That's a long way from original claim that "the vi/vim editing model is just superior to any other out there", though. "You may need it in some crippled environments, so it's handy to know" is a considerably weaker claim...

</comment></comment></comment></comment></comment><comment><USER16> I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it. ;)

<comment><USER17> Isn't that one of the formative Unix moments for every newbie: some program throws you into vi and you have no idea how to get out.

It's like getting your head stuffed into a toilet bowl at a boys' boarding school. Afterwards, you feel like part of the gang.

<comment><USER18> Emacs is the same: when you don't know it you can't guess you have to type ^X^C to exit it.

<comment><USER19> Most people use the X client for Emacs, so you can just close the window in most cases.

</comment></comment></comment></comment><comment><USER20> For the article: If you try to argue for superiority, you should probably check the alternatives first and give an example where your preferred choice is obviously superior - the example of adding an empty body to each method is a great example where Sublime with multiple cursors beats vim (sure you can get them in vim to, but it doesn't show vim being superior).

For vim itself: I have seen friends trying to learn it. I have seen PhDs and postdocs use it. I have seen coworkers use it. The only people who I could see were editing text as fast as friends/PhDs/coworkers using Sublime were my tech leads. The smartest most proficient and effective programmers I have ever met. Everyone else was slower, at times wrestled with the editor (by this I mean that they executed commands and had to redo them because they didn't do what they wanted). I guess the conclusion is that people can learn to use vim as proficiently as Sublime, but most will fail or it will take them years (and I mean 5 or 10 years).

Actually, two of my tech leads, when I showed them some trick in Sublime were like: I should look into this. Maybe I'll just boldly argue that vim is inferior after all :).

<comment><USER21> I started with Textmate, liked it, but then the community lost interest. I followed them to Sublime. I never got comfortable with Sublime though it is hard to recollect why. I just kept getting frustrated with it.

Then people started talking about Sublime 3, Atom, and all that editor hotness. I wanted something stable, something I could learn once and be comfortable with it being around for a long time. I had tried Emacs years ago and found it unpleasant, to say the least.

I looked into Vim. It became very addictive but it does take a bit of time to learn. I love the action followed by motion idea. I found the built in tutorial decent as well as Painless Vim to be a decent starting point: [https://leanpub.com/painless_vim](https://leanpub.com/painless_vim)

About a year into my Vim conversion, I get around decently and love doing the editing stuff. But I do feel that I need to go over tricks and tips again.

</comment></comment><comment><USER22> I've been a vi user for 25 or so years, and I really only know a few commands - how to search/replace, repeat last operation, search for the thing under the cursor, yank/paste, #[cmd], block mode, set mouse=a, and so on. In that capacity I have supported myself as a software developer, productively, with much satisfaction in my selection of editing tool.

So I'm often quite delighted at learning new things with it, even still! And to be frank, I think this is one of the things I most like about vim - <USER2> though I've been using it for years, there are still undiscovered treats yet to be revealed to me, over and over. When I discovered cscope integration, some 10 years ago, it was like getting an OS upgrade .. in my editor! :)

</comment><comment><USER19> The vim commandline together with the power of regexs make it very convenient to convert text from one format to another. It works something like this([https://vimeo.com/15443936](https://vimeo.com/15443936)). I don't know how many hours I've saved on things like this due to vim.

<comment><USER23> It would be good if they used extended regexes, but oh well...

<comment><USER24> Use \v after the first slash to turn on extended regexes. ;)

</comment></comment></comment><comment><USER25> funny how people pay attention to how fast it is to change a piece of text in a editor. Most of my time programming is spent on a piece of paper or a whiteboard designing my data structures and algorithms. Actual typing , especially with an ide providing auto completion, is the thing that takes me the least amount of time, by far.

<comment><USER26> I don't believe that to be true, and I have never met a developer who thought that to be true. Sketches and diagrams can design a large system, but at the end of the day, unless you're a systems architect or something, you're going to have to get your hands dirty.

<comment><USER27> The best and lowest-maintenance pieces of code our team has written were carefully designed and thought out before a line of code was written. I'd say 20% of the actual work was coding, 30%/30% for design and testing and 10%/10% for requirements analysis and deployment.

However, often we know that we don't know how to properly design something and we start implementing too early. The end result is sth like: 50% coding, 30% testing and the rest is squeezed into testing, deployment and requirements analysis.

<comment><USER25> Starting on a paper instead of coding directly is really the key to the best quality software i've done.

Funilly i realized that very early at university, where i had to perform a code exercice while on holidays, but forgot to take my computer with my me. I did it on paper, then typed it when coming back home, and got the best grade.

</comment></comment></comment></comment><comment> Anthony-G As a long-time vi/Vim user, I thought this article provides an excellent explanation for non-vi/Vim users for the reasons why enthusiasts choose to use such an old and unusual (for those coming from a GUI background) editor.

In particular, the author emphasises that you leave Insert mode as soon as you've stopped typing. When I first started using Vim, I used to spend too much time in Insert mode while moving around using the arrow keys.

 __What I learned from the article: __If you 're not positioned on a parenthesis, the `%` command will "scan character by character to the right, until the first one is found, and then moving to the character matching that one". Until now, I'd always been using one of the `f`, `;`, `T` family of commands to move to a parenthesis or equivalent character. This will be a real time saver.

</comment><comment><USER28> I started using vi in the 90s and got very used to it. It's still my standard text editor (the nvi implementation, that is).

I've never grasped vim. It was too slow at the time and the extended command set consumed all the free keys I use to have available to do my own macros (eg: 'q' 'g').

I reckon vim grew to be much more than an editor, it is now an editing plataform, capable of so many things, and contains lots of shortcuts / builtins for common text-editing situations.

The article above contains many vim-only commands. For example 'di>' ("delete inner angle-block") doesn't exist on standard vi, neither the '>aB' ("indent a Block").

<comment><USER29> vim is _very_ slow; "classic" vi, and more reasonable clones like nvi are much faster _and that seems completely wrong to me_. It also has terrible defaults (like kindergarden-useless syntax highlighting which only make it slower!).

I have hopes that neovim will sort some of that out -- it makes a certain amount of sense that vim is slow because of some baggage it carries, but I'll admit they aren't very high hopes: I've been using emacs recently.

How funny is that? That I use emacs because vim is too slow!

<comment><USER30> Haha. When I first this, I thought your problems might be from editing large files with syntax highlighting switched on. Or doing PHP or JSP, which I've found to struggle in the past. But then I saw the username.

Indeed, if you're writing lots of code with hardly any newlines (like k lang), you will probably have performance issues with vim.

        > It also has terrible defaults

This can vary from distribution-to-distribution. Certainly the default debian setup comes with annoyingly intrusive defaults, some of them used to have an impact on speed. Three settings you probably want in your $HOME/.vimrc on debian:

        filetype indent off
        filetype plugin off
        filetype plugin indent off

[this might be obsolete - that config is more than a decade old]

</comment></comment></comment><comment><USER31> I once worked at a company where I had to use Visual Studio. Now I can't believe I cared that much about it, but I basically refused to write code without vi. ViEmu saved the day, it was absolute magic.

I also really wanted vi bindings for navigation in team chat (isn't it the most obvious thing ever?), so that's how we made it work in Kato ([https://kato.im/articles/en/power-users/keyboard- control](https://kato.im/articles/en/power-users/keyboard-control))

</comment><comment><USER32> Vi vs Emacs again?

 _" No, they are not dinosaurs who don't want to catch up with the times - <USER3> community of vi users just keeps growing: myself, I only got started 2 years ago"_

Using batch to write FORTRAN, the editor was a card punch. On the Deck-writers (teletype) and VT100 terminals, I used to write Pascal, Ed was the only choice. Early Linux use forced your hand, Ed (again? NO) or Vi. This is because Emacs is a 30Mb download and where space was a premium. [0] Try using anything but Vi or Ed with Busybox. [1]

So I stick to Vi(m). I _can_ use any cli editor but with much time and effort in Vi usage why change? I can but why?

[0] esr, _" A Tale of Five Editors"_, [http://catb.org/~esr/writings/taoup/html/ch13s02.html](http://catb.org/~esr/writings/taoup/html/ch13s02.html)

[1] grep "emacs" here ~ [http://www.busybox.net/downloads/BusyBox.html](http://www.busybox.net/downloads/BusyBox.html)

</comment><comment><USER33> Admittedly I haven't been using vim more than a few months, but I wonder why all the move commands are based on text structures, such as lines, spaces etc.

Wouldn't it be more useful to have commands for going to expressions, blocks, scopes and other code level structures?

I see vim people suggesting always leaving blank lines around functions, so you may use paragraph shortcuts to move them around. Why?

<comment> Anthony-G Some users also use Vim for editing plain English. I compose most of my emails in Vim and am currently (re-)acquainting myself with Mutt to avoid switching back and forth between GUI windows -- though maybe I just have a masochistic streak.

<comment><USER33> That makes somewhat sense, though it does feel like coding takes up 95% of vim usage demonstrated in blog posts.

</comment></comment></comment><comment><USER34> Embedded developer here. A lot of times I need to edit a file on the target and I can easily put vi on the target system through busybox. Having the same editor on both sides is a nice thing.

</comment><comment><USER35> I mainly use vi for working remotely on a server. It's just easier than using X or something.

But I use sublime or some other graphical editor when I am on my own computer.

<comment><USER36> You can use Sublime to do remote editing if you wish.

<comment><USER37> I'll bite. What's the best way of doing this?

<comment><USER36> Personally I use Sublime with rmate [https://github.com/textmate/rmate](https://github.com/textmate/rmate) (works with TextMate and Sublime), but there are alternatives like sftp [http://wbond.net/sublime_packages/sftp](http://wbond.net/sublime_packages/sftp)

</comment></comment></comment></comment><comment><USER38> For me, vim didn't have a steep learning curve. I've barely scratched the surface of its command set and basically know very little of it, but I didn't need it to be incredible, just better than TextMate.

</comment><comment><USER39> I love vim. vimscript on the other hand...

Also it's gimped without addons which you very much miss when using someone else's machine.

And if they happened to not have compiled with clipboard support, you're in a world of hurt.

<comment><USER40> And that's where neovim comes in. I makes me so excited. You can write plugins in any language. which is just plain awesome. I switched to the neovim alpha in archlinux last week. Wasn't the most painless process but it worked. pacaur hung installing it so I had to makepkg the package manually and get the dependencies manually. But hey it works. The dependencies seem to change quite often as well so sometimes you end up with dangling dependencies that you don't need anymore. But apart from that, once it's installed, You won't even notice you're not using vim. + The fact that it has a fully fledged terminal emulator built in is pretty slick.

<comment><USER41> Don't you worry, I'm going to pull neovim into Arch once there has been a stable release. This should make it much simpler to install.

</comment></comment></comment><comment><USER42> <esc>:q!

</comment><comment><USER43> I was exposed to vi 15 years ago but not until recently have I decided to get better at it. This article was great and helped a lot. It's a fun skill to improve.

</comment><comment><USER44> I wonder if you could bind mouse gestures to vim normal mode commands and use left hand for typing stuff and right hand to do magic.

</comment><comment><USER45> > Correct-conception #1: steep learning curve

I was fortunate to learn vi by rote, in a series of lectures where there was no computer in the room. Yep, copying the likes of ':wq' from the hand-written blackboard to A4 paper, along with all of the other 'handy' commands, some of which such as 'yank' I do not use to this day. This was a whole different way of learning with the notes referred to rather than things getting 'Googled'. Was this a better way to learn vi?

I don't meet so many 'vi' experts these days, if anything I feel embarrassed to be using 'vi' and associated command line tools like 'grep' when everyone else has some auto-completing high-speed IDE instead. I have to 'psr-fix' my code to make it sufficiently elegant. The problem for me is that I can do most things in 'vi' without having to hunt around for menus etc. Therefore, moving to the new is hard for me. In some ways I am like a secretary knowing 'Wordperfect' 25 years ago and unable to adapt to 'MS Word 2.0c' due to the same UI problem and convenience of known tools (Wordperfect, Vim).

I also do not feel that 'vi' works well in a team, people with Mac-gui- loveliness computers just can't edit things on your computer on an ad-hoc basis, some visual editor has to be found just for them.

If you are a vim person then these funny new-fangled 'gui' editors are really dangerous. It is far to easy for the document to end up with mystery 'j' characters added to the first line, ':wq!' added somewhere at the end, maybe with some randon 'ijk's' in the middle. If you are a vim person then every editor should have an 'insert' and 'normal' mode, not just 'insert'. The rest of the world doesn't see that though.

With people that do use 'vim' I have noticed that everyone does things differently. Some people will regularly use a feature that you never use, to make you wonder why you don't know that trick. Life without the correct, personalised '.vimrc' file is also quite hard, however, I have found some of these that others use to be overly 'souped up', for instance the search, I really do not like the search-as-you-type option, old-school is better, where you need to press enter.

So everyone finds their own dialect of 'vim'. Like car drivers, everyone thinks they are a good 'vim driver' apart from those that haven't learnt to drive. And they shouldn't. Amazing that vim is, it is a relic of former times, there are better tools with better 'UX paradigms'. In my field none of the 'programming gods' use 'vim' as they can't get to their productivity levels with it, so they use modern IDE's for their work, retaining enough 'vim' for any server side config file editing.

<comment><USER46> > If you are a vim person then these funny new-fangled 'gui' editors are > really dangerous. It is far to easy for the document to end up with mystery > 'j' characters added to the first line, ':wq!' added somewhere at the end, > maybe with some randon 'ijk's' in the middle. If you are a vim person then > every editor should have an 'insert' and 'normal' mode, not just 'insert'. > The rest of the world doesn't see that though.

Turns that many of these (including IDEs like Visual Studio or Eclipse) have add-ons or built-in modes which emulate a useful subset of vim's behaviour.

> Life without the correct, personalised '.vimrc' file is also quite hard

Is it? For server-side work, I have a "light" vimrc of a few lines with sensible settings (status bar, nohidden, expandtab, this kind of thing). It is trivial to recreate if I don't have a copy. I have a longer vimrc and quite a few add-ons, but it's for more specialized work, not really anything I need for editing a remote configuration file.

> In my field none of the 'programming gods' use 'vim' as they can't get to > their productivity levels with it, so they use modern IDE's for their work, > retaining enough 'vim' for any server side config file editing.

In a large part, it depends on the language you use. Nobody sensible would work on a mid-size Java project in vim.</comment></comment>


Physicists Just Generated a Particle That Acts as Its Own Antiparticle - happy-go-lucky https://www.sciencealert.com/physicists-made-a-particle-that-behaves-just-like-its-own-antiparticle <comment><AUTHOR> Ugh, science writing:

> Physicists Just Generated a Particle That Acts as Its Own Antiparticle

[...]

> Physicists now have the next best thing – a particle-like system that > behaves just like the kind of matter Majorana predicted

<comment><USER2> If you talk with someone that works in solid state physics, they act as if these kind of particles were real as elementary particles. The most usual are holes [1] and phonons [2]. So it's standard notation in that area, but it may be confusing for the general public.

At least they didn't call it an "angel" particle, like in the previous submissions.

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

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

<comment><USER3> The distinction between fundamental particles and composite particles is more a statement about the extent of human knowledge rather than anything physical about those particles. That is, saying "this is a fundamental particle" tells you that we haven't discovered any constituent parts to it, not that there aren't any. Protons used to be fundamental particles until we discovered they were made of quarks, and quarks may yet turn out to be composite particles built from preons.

So yes, if you were attracted to this article because you thought they found a new fundamental particle, then it was clickbait. But the real point is that it's a Majorana fermion (with well-defined momentum eigenstates, a scattering matrix, etc.).

It's possible in the future that we discover neutrinos are Majorana fermions

[https://en.wikipedia.org/wiki/Double_beta_decay#Neutrinoless...](https://en.wikipedia.org/wiki/Double_beta_decay#Neutrinoless_double_beta_decay)

at which time they will be "fundamental Majorana fermions"... and _then_ discover after that the neutrinos are just composite particles.

[https://arxiv.org/abs/1510.07988](https://arxiv.org/abs/1510.07988)

(There are some subtleties here. Some quasi-particles don't have all the properties we normally associate with fundamental particles. And there are weak theoretical arguments that some fundamental particles can't be composite unless their constituents have properties that are subjectively inelegant.)

<comment><USER2> The gyromagnetic ration of a truly elementary particle is g=2. With the current theories, a electron has a cloud of virtual particles, but no internal structure. With this assumptions the theoretical value is approximately g=2+2.alfa/2pi+...~=2+1/(137*pi). The experimental value of the g of the electron agree with the theoretical value up to 14 digits, so it's a very good hint that the electron is really an elementary particle.

Obviously there can be future theory were the electron has internal structure, but it will be a breakthrough, not a small fix.

The theoretical and experimental value of g for a muon almost agree, but only 10 digits. So there is a small chance of something interesting there. But IIRC most people think that it may be a new particle in the cloud of virtual particles, not an internal structure of muons.

Protons and neutrons have internal structure, a lot of internal structure, so the value of g is a difficult to calculate number that is not 2. In particular, g=+5.6 and g=-3.8.

<comment><USER3> This is just a way of saying that we have probed the electron for internal structure to a significantly more precise level than the level necessary to reveal the known internal structure of nucleons. But it's just an upper bound. For all we know, the next accelerator (if there is one) could reveal composite structure just below the bound.

</comment></comment></comment></comment></comment><comment><USER4> Well up above the tropostrata

There is a region stark and stellar

Where, on a streak of anti-matter

Lived Dr. Edward Anti-Teller.

Remote from Fusion's origin,

He lived unguessed and unawares

With all his antikith and kin,

And kept macassars on his chairs.

One morning, idling by the sea,

He spied a tin of monstrous girth

That bore three letters: A. E. C.

Out stepped a visitor from Earth.

Then, shouting gladly o'er the sands,

Met two who in their alien ways

Were like as lentils. Their right hands

Clasped, and the rest was gamma rays.

by Prof. Harold P. Furth (1930-2002)

</comment><comment><USER5> Most of the discussion is here in this submission, but there are also two comments here: [https://news.ycombinator.com/item?id=14817322](https://news.ycombinator.com/item?id=14817322)

And there's another comment here: [https://news.ycombinator.com/item?id=14818725](https://news.ycombinator.com/item?id=14818725)

There are also other submissions:

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

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

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

</comment><comment><USER6> I have personally been producing particles that are there own anti-particles since childhood. And, I continue to do so as I write this comment. Photons!

</comment><comment><USER4> I guess it would be tough to keep these around in any substantial quantity.

<comment><USER7> It's not usually a problem to have a large number of photons?

<comment><USER8> Which are different because the result of a particle/antiparticle collision is the emission of photons so the quantity of photons is not changed by collisions.

</comment></comment></comment><comment><USER9> > for every type of fundamental particle in the Universe there is the > equivalent of an evil twin complete with an opposing charge

Do they have goatees?

</comment><comment><USER10> So did I but I can't find it.....</comment>


Amazon Tells States: 'Drop Dead' Over Sales Tax - <AUTHOR> http://www.wired.com/epicenter/2011/06/amazon-conn-ark/

<comment><USER2> State sales tax is just one revenue stream a state can employ. There are several criteria for a good tax. One being it is not regressive. Another being it collects more than the burden it places on society to collect it.

Sales tax is arguably regressive, so it already has one hit against it. And in the internet age, when it is not enough to do business in your home state, sales tax is becoming a bigger burden to collect.

That said, Amazon is large enough it could collect sales tax no problem. I am just thinking in general, it may be time to look at another form of tax to fill the void for sinking sales tax revenue.

<comment><USER3> Sales tax is only regressive with regards to wealth and/or income. It's perfectly linear with the activity it's taxing.

Also, non-regressiveness is a far cry from an established benchmark for a "good tax".

<comment><USER4> Also, depending on what the sales tax applies to, it can be a fairly good thing. Some states exclude clothes, unprepared food, and medicine. People also understand sales taxes, unlike income taxes.

Given that, progressive taxes are just as foolish. A rate is a rate.

</comment></comment></comment><comment><USER5> _"We opposed this new tax law because it is unconstitutional and counterproductive," Amazon said in a letter to its Connecticut affiliates. "It was supported by big-box retailers, most of which are based outside Connecticut, that seek to harm the affiliate advertising programs of their competitors. Similar legislation in other states has led to job and income losses, and little, if any, new tax revenue."_

First, "drop dead" is not mentioned by Amazon anywhere. The article title looks a lot like linkbait. Not upvoted. It also looks to pander to a political viewpoint.

Second, as far as I can tell, if you wanted to find the real political story here (since this is a story with both tech and political overtones) is that the big box retailers are looking to put the squeeze on their competition, and using government to do so. Yes, states are in dire straits, and yes, there are good arguments on both sides of the issue. But -- follow the money. Who stands to gain from higher-priced internet goods? Who stands to lose? Remember that, as an internet user, I'm free to purchase offshore as well. The big box guys know that. They know that the states will not receive one-tenth the amount they dream of. They're just happy to be throwing rocks in Amazon's way -- and using the government to do so.

I remember many years back when Microsoft had to start paying for lobbyists in D.C. The big buzz in the tech community was confusion: why would a company that made computer programs need lobbyists?

Of course now the answer to that question is all too clear: just like every other industry, some players played fast and loose with the rules, government intervened, and suddenly everybody had their checkbooks out to keep from getting squashed (and to squash the other guys as much as possible.)

<comment><USER6> _Second, as far as I can tell, if you wanted to find the real political story here (since this is a story with both tech and political overtones) is that the big box retailers are looking to put the squeeze on their competition, and using government to do so._

I think this is a fascinating issue for many reasons, but specifically for this one -- the fact of the matter is that big box retailers like Target are at a huge competitive disadvantage when competing against internet-only retailers like Amazon because of state sales tax laws, so it makes perfect sense that the big box retailers would say to the government: "Hey, this company found a loophole in your rules that I can't exploit!"

Also interesting is the fact that the case that Amazon always leans on, _Quill v. North Dakota,_ took place in 1992 -- before the internet era even began. Yet another instance of the government not keeping up with this whole "internet" thing and changing laws to reflect that reality.

<comment><USER7> > Also interesting is the fact that the case that Amazon always leans on, > Quill v. North Dakota, took place in 1992 -- before the internet era even > began. Yet another instance of the government not keeping up with this whole > "internet" thing and changing laws to reflect that reality.

What essential differences do you see between Quill (a mail order company with a physical catalog) and Amazon? Suppose that Quill had distributed its catalog via CD - would that make a difference?

The only thing different between the "mail order age" and the internet age is the relative amount of commerce occuring via the latter. That doesn't come into play wrt whether states can "ask" for help collecting taxes from their residents.

Which reminds me - states that have no sales tax often have stores next to their border with states that do have sales tax. Residents of the states with sales tax will cross those borders to buy things at said stores, thus avoiding the tax.

Should those stores be obligated to collect tax for the sales tax states? If not, why doesn't the same rule apply to mail order and the internet?

Feel free to assume that said stores will mail goods post-sale that weren't in stock at time of purchase.

<comment><USER6> _The only thing different between the "mail order age" and the internet age is the relative amount of commerce occuring via the latter._

You're absolutely right that the main difference is the astronomical difference in scale, but you're ignoring the fact that internet sales are entirely on-demand, whereas mail order sales still require a physical catalog to order from. This may not sound like a significant difference, but the instant-on internet fundamentally altered the way the public buys the majority of its goods in a way that mail order businesses never could. This is what I meant when I said that the government didn't change its laws to reflect the reality of the internet, and it's why _Quill v. North Dakota_ isn't a great example of today's reality.

Personally, I think the problem is a simple one to solve by doing what Illinois (where I live) did this past year with its tax form -- basically, you had two options: you could either a) calculate what you actually paid in sales taxes via receipts and whatnot, or b) divide your income by some small percentage, and choose the higher of either that number or $50. (Or something like that.) The kicker was this instruction -- _Do not leave this blank._ (The irony, of course, is that Illinois passed an "Amazon tax" law of its own earlier this year.) Since no one wants to be audited, I'm sure the rate of compliance was pretty high.

<comment><USER7> > You're absolutely right that the main difference is the astronomical > difference in scale, but you're ignoring the fact that internet sales are > entirely on-demand,

Huh? How is ordering something from a catalog not "on-demand"?

> whereas mail order sales still require a physical catalog to order from. > This may not sound like a significant difference, but the instant-on > internet fundamentally altered the way the public buys the majority of its > goods in a way that mail order businesses never could.

I don't buy it. I grew up during the "catalog" days. Every house had several catalogs for various types of items, collectively covering pretty much everything that said household would buy.

During my time, almost all of these catalogs had 800 numbers so one could order instantly. That said, during earlier times, depending on where you lived, sending in an order form was no big deal because there often wasn't a local supplier.

Remote commerce is not all that new. Heck, folks even bought houses via mail- order.

In other news, boomers, hippies, yuppies, gen X etc did not invent any sex acts either.

</comment></comment></comment></comment></comment><comment><USER8> _For its part, Amazon supports the Streamlined Sales Tax project, which aims to harmonize and clarify states sales tax laws across the country._

I'm glad they're doing this. Given that the company sells a lot of different things, and given that different states, counties, and municipalities can all have different rules for how to categorize goods, which matter in terms of how much sales tax you pay for them. I sure wouldn't want to be the person who has to figure out whether Fig Newtons are cookies or are actually "Fruit and Cake" in every jurisdiction in the US where it matters.

</comment><comment><USER9> Hey Wired, what's up with using quotes around something no one said?

<comment><USER10> The same thing that's up with using single quotes outside of double quotes. They don't write well.

<comment><USER11> That's a question of style. Specifically, it's common in England.

</comment></comment></comment><comment><USER4> It is burdensome to track sales taxes in every part of the country. It is much harder than keeping track of 50 values. I actually wish that sales tax was determined by the origin of a package and not the destination.

<comment><USER12> It's not just 50.

Every locality in Washington state potentially has a different sales tax rate. And, Washington just changed their rules so that the sales tax for instate merchants is not based on where the merchant is located, but where the customer is. So, for every small business that does any business other than through a physical storefront, they need to go based on (at the very minimum) the zipcode. (<http://taxrates.dor.wa.gov>).

And that's just Washington State.

<comment><USER4> ick, I edited out a clause - I was trying to say their are more than 50 values because of all the different rules and localities - learn to proof I guess.

</comment></comment></comment><comment><USER13> The Wired title is highly biased and misleading. Amazon is not the one that passed a special windfall "amazon tax". The states are the ones that created the situation. A better title would be "States ruin innovation climate with targeted anti-business taxes".

</comment><comment><USER14> Maybe Amazon could ask Connecticut to build them a new road in the state which they currently reside. Connecticut would say: "Sorry, we won't service entities that are not physically inside Connecticut."

And that quote illustrates he hypocrisy. Connecticut wants to receive money from entities outside their state, but they will not service those same entities outside their state.

This is all about getting something for nothing. If a state wants to tax entities from outside the state, then it should bring on new responsibilities for that state. Connecticut should be servicing Amazon in some significant way, proportional to the amount of money extracted from it.

The best way for amazon to fight this is to insist on a fair and equitable trade of tax money for state government services.

<comment><USER15> the thing is, the tax is already being levied. And it's generally considered a tax on the customer doing the buying (who does live within that state) If the merchant is also within that state, the merchant is expected to collect the tax. If the merchant is out of state, the consumer is supposed to keep track of and pay 'use tax'

The argument here is not over if the tax should be paid or not, or even over who should pay the tax. the argument is over who should collect the tax; the states want the retailers to collect because that's likely to lead to increased compliance, and the retailers want the state to collect, 'cause that makes out of state goods look cheaper to people who plan to not report their use tax.

<comment><USER16> Moreover, Amazon is trying to avoid a circumstance where every state and county has different and potentially complex sales tax laws. Say, County X could have 100 different little tax levels depending on the type of product, time of day, phase of the moon etc. As is clear from the Amazon statement, they are _not_ against sales taxes in principle and would agree to pay one if it were uniform (i.e. hassle-free).

<comment><USER17> _As is clear from the Amazon statement, they are not against sales taxes in principle and would agree to pay one if it were uniform_

As lsc pointed out above, that's not the case at all. Amazon is refusing to _collect_ taxes on behalf of its customers, _not_ refusing to pay its own taxes.

By law, citizens are supposed to tally up what they bought from internet retailers over the course of the year and pay any remaining sales tax on April 15th. Shockingly, this isn't happening, and the sales taxes aren't being paid at all. So these states want Amazon to behave like a bricks and mortar retailer, and collect the tax at time of sale instead.

Amazon doesn't want to collect sales tax because not doing so makes their prices look lower than competitors like Barnes and Noble, which does collect sales tax. Nothing more, nothing less.

<comment><USER18> The law concerning use tax is un-Constitutional, that is the issue; and something that most people who do not file the use tax portion, are well aware of.

edit: what part of "No Tax or Duty shall be laid on Articles exported from any State." is unclear?

<comment><USER19> Doesn't that only prevent the federal government from levying that tax?

<comment><USER20> Actually it is the opposite it prevents states from monkeying with interstate trade and reserves that right for the federal government.

</comment></comment></comment></comment></comment></comment></comment><comment><USER21> Fake quotes like this strip any sort of credibility away from wired.</comment>


Ask HN: Can I get some help for a potential options financing product - <AUTHOR> I am looking into building a product that will finance options for startup employees in exchange for some of the profit during a liquidation event. You will not be expected to pay anything if the company goes under. You will only pay a cut of your profit if there is a liquidation event.
I am collecting data to validate my hypothesis that this will be a win-win situation (e.g. you will save a lot of money due to taxes if you exercise early) for both the company and the customers of the company. If you could fill out the form here: https://airtable.com/shrebenwVzaeFzols, I would really appreciate it.
Thank you for taking the time out of your day to fill this out. Any feedback is welcome. <comment><USER2> You're asking for a lot of sensitive data. It's pretty much all company confidential. Sorry, I can't help.</comment>


GoFap – A simple http video streamer and playlist generator - <AUTHOR>

<comment><USER2> I believe you forgot to insert the URL.

<comment><AUTHOR> Damn. Thanks for pointing that out. I've created a new corrected submission, but here it is - [https://github.com/orkaa/GoFap](https://github.com/orkaa/GoFap)

</comment></comment><comment><USER3> Best project name of the week.</comment>


Coronavirus diary: Ethically sourcing data for the fight against COVID19 - <AUTHOR> https://github.com/joshua-s/coronavirus-diary <comment><AUTHOR> My initial reaction as a pathologist bringing in COVID19 testing and talking to friends estimating the disaster that is about to land is this: I want this guy to get a lot of help. Now.

My second thought: are there others like this? I need people putting data in, but I also need the health system to have collective visibility on the stats and be able to reach out to individuals and say "how are you doing?" "Time to come into the hospital." "Your results are back, you're clear". Patient- Provider-Public Health.

Edit: the only other one I can find is the Korean app (link to the app in this article, but Korean, so I don't really know) [https://www.technologyreview.com/s/615329/coronavirus- south-...](https://www.technologyreview.com/s/615329/coronavirus-south-korea- smartphone-app-quarantine/)

</comment><comment><AUTHOR> An API: [https://news.ycombinator.com/item?id=22572400](https://news.ycombinator.com/item?id=22572400)</comment>


Syck vs Psych: Differences and Conversion - <AUTHOR> http://devblog.arnebrasseur.net/2014-02-yaml-syck-vs-psych An in depth post analyzing the differences between these two YAML implementations for Ruby based on a large real-world data set, with tips on how to convert your data from Syck to Psych. <comment><USER2> Great article, but I disagree with the conclusion. Hand-editing YAML is an absolute mine field. For non-developers editing it is a complete non-starter as they can and _will_ make mistakes. But even for developers it will make you pay for your relative ignorance of the spec. Pop quiz, can you tell me what's wrong with the following YAML snippet without running it through a YAML parser:

        FI: Finland
        NO: Norway
        SE: Sweden
        GB: United Kingdom

Personally I find YAML to be a powerful serialization format for _sanitized_ ruby data and that's it. Granted there can be major upgrade pains as demonstrated by this post (and believe me I've wrestled with severe pain from this upgrade), but I think these changes are likely to be few and far between. Bottom line is YAML _is_ well-defined even if that spec if impossible for a human being to comprehend and internalize its nuance, and it has a special status in Ruby that makes it particularly useful for automation.

But for human readable I say do yourself a favor and stick to TOML.</comment>


Learning resources for junior programmers - <AUTHOR> https://medium.com/techlabs-emag/learning-resources-for-junior-programmers-cf72c292feb2 <comment><USER2> PHP...</comment>


Does JavaScript need to be re-branded? - <AUTHOR> http://ajaxian.com/archives/javascript-rebranded-check As a JavaScript fanatic, I'm happy to see people's opinion of the language starting to change. JS is a really powerful and interesting language; I would even call it beautiful. Long gone are the days where VB.NET & ColdFusion drones were telling me that "my" language is a toy for graphic designers.<p>I'm all for any "rebranding" efforts. <comment><AUTHOR> As a JavaScript fanatic, I'm happy to see people's opinion of the language starting to change. JS is a really powerful and interesting language; I would even call it beautiful. Long gone are the days where VB.NET & ColdFusion drones were telling me that "my" language is a toy for graphic designers.

I'm all for any "rebranding" efforts.</comment>


The life and death of a laptop battery - <AUTHOR> http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html <comment><USER2> For some reason, despite the fact that keeping a Li-I battery near full charge and in high temperatures drastically decreases its capacity over time, most laptop (and phone) manufacturers don't bother to have battery management software (to limit state of charge). I only know of Windows drivers for Sony and Lenovo.

[http://superuser.com/a/664583/32370](http://superuser.com/a/664583/32370)

This is probably because of some sort of planned obsolescence - they want you to replace your device.

On the other hand, in electric cars (using the same battery chemistry), where it is in the company's best interest not to replace the battery, it is charged to a maximum of 70-80%, except when soaking up extra energy going downhill, and basically maintains its full capacity for much longer.

<comment><USER3> Well, people also complain (extremely loudly) that they paid for a 50Whr battery, and by golly, they mean to get 50Whr of power out of it! They're not going to let some slick talking corporate drone trick them into believing they should only use half of what they paid for.

Practically speaking, even assuming my battery did idle at 50% sitting on my desk, what happens when I decide to take it out to the coffee shop (or the airport!) and want it at 100%? I don't want to micromanage charging my battery and filling it up before I go out. I have enough fun discovering my car is only ever out of gas when I'm about to depart on a long drive.

<comment><USER4> So why not have it as an option so people like you who don't want to have to manage it can have it go to 100% and people like OP can stop st 80%?

</comment></comment></comment><comment><USER5> I end up punishing the batteries in my stuff with 100% -> 0% -> 100% cycles frequently and don't feel bad about it. The battery exists to conform to my needs, not the other way round! I'm not going to use my stuff in patterns I find inconvenient just to baby an inanimate object.

<comment><USER6> I do this too, but for me it works really well.

my 4 year old iphone 4 got 3 days on a single charge when I got rid of it.

My year old 6 still gets 2-2.5 days per charge.

</comment></comment><comment><USER7> Fantastic! I will be giving this a trial on my laptop. My laptop is running Debian and it usually sits connected to the power all the time.

When I disconnect the charger I have seen estimated battery remaining times of anything from 2 hours to 87 hours! However in reality it's more like 45 minutes :(

<comment><USER8> You do know that keeping your li-ion battery plugged 24/7 is best way to kill it, right?

Do a full battery cycle at least once a month and you won't prevent the catastrophe.

Source: [http://batteryuniversity.com/learn/article/how_to_prolong_li...](http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries)

Storing a battery at 40 degrees C at 100% charge will degrade it by 35% after a year. Drop that to 25 degrees C and it'll be degraded by only 20% after a year. If it was stored at 40% charge instead of 100% charge that drops to only 4% degradation after a year.

<comment><USER9> Why can't this problem be solved in software? OS knows that AC power is used 100%, right?

<comment><USER10> I believe a better question is: Why can't this problem be solved in hardware? So, it won't depend on the OS and if I shutdown my laptop and leave it on the charger it will still work.

My 3.5 year old Asus laptop has still similar battery life as it had when it was new. I always keep it on the charger when I can and sometimes I just shut it down and leave it on the charger overnight too (but this is rare). When I bought it, I have noticed that the battery was never above ~95%, but I have never studied how it works exactly (is it done by HW or by the driver). I have used it with Win7, Win8, Win8.1 and now Win10.

</comment></comment></comment></comment><comment><USER11> Wow down to 7% of original capacity? I've always had battery woes but that's exceptionally bad. If you started with 6 hours now you'll get 25 minutes of battery life!

Does anyone know of any good power management software for Linux? I am about to get my first Linux laptop and this is one of my primary concerns (since the laptop is designed for Windows 10).

<comment><USER12> If you have not purchased already I strongly recommend re-considering and buying a made for Linux laptop. Putting Linux on hardware intended by the OEM of Windows is not always a good idea. I've not tried them yet but my next laptop will come from System76 (unless I see something better before then).

<comment><USER13> Unfortunately, I can't recommend a System76 laptop. I use the Galago UltraPro as a work laptop, and it is not an enjoyable experience at all. The construction is flimsy, and the keyboard is _terrible_. I have never used a worse keyboard on a laptop. I wanted to love it, but I can't recommend it at all.

<comment><USER14> Wait, did you ever get the replacement keyboard the mailed out for free? I run an ultrapro as well, and they sent me the redesigned keyboard without me saying a thing.

<comment><USER13> This was after they replaced the keyboards. The keyboard is still terrible.

</comment></comment></comment></comment></comment><comment><USER15> My Lenovo's laptop (IdeaPad z410) battery is already dead, and I've had it for a year and a half. When it had Windows on it, I get about 2 hours of battery time. After I fully installed Ubuntu, I got 3 hours out of the same battery. Now it never charges, always stuck at around 1%, and it shows that it has a capacity of only 11.4%. Two of my previous laptops' batteries degraded after the second year. This is the first time I have a laptop whose battery dies in less than two years. We have a trend here (as it seems from skimming the other comments).

<comment><USER2> Usually when you install Linux on a laptop you can expect any software (non- firmware) battery management to go out the window.

<comment><USER15> And that's a shame. Battery management should be on the hardware level. I can't find any information whether detection of AC-charger presence is on the hardware level or not, which I also think should be on hardware level to stop charging once the battery is full and fully draw current from the charger. That will not waste the battery's cycle life. Both of these speak for the overall quality of the manufacturers' products.

<comment><USER16> "should"... doesn't buy you much. It's a shame there's no standard driver for this, however, since these Li-ion batteries are all pretty much the same in terms of charge management. It's a safe bet almost all users would be better off with a batter that defaulted to around 70% charge unless explicitly (and temporarily) told to prepare for a long trip.

</comment></comment></comment></comment><comment><USER17> How do most people manage their devices(iPhone / MacBook / etc.) if leaving them plugged in all the time is detrimental to the battery? I _could_ kill all the apps on my phone and put it in flight mode when I go to sleep, but I may not get the chance to charge it to full if I have to leave the house immediately upon waking up. Should I let my battery drain all the way?

<comment><USER18> Leaving laptops plugged in all the time doesn't seem to be particularly bad for the battery, as long as (1) the laptop doesn't get too hot, and (2) you actually keep them plugged in all the time, rather than switching frequently between plugged-in and battery-powered.

My Lenovo laptop has been plugged in for the last 3.5 years, only very occasionally (once a month?) going on battery power for short periods of time. Windows reports that I still have 91.7% of the design capacity. I'm not sure if I should trust that number or not... but the last time I unplugged it, the battery seemed to last at least 70% as long as it did when it was new, so it's not totally off, either.

</comment></comment><comment><USER19> Windows 8+ has a similar feature built in, to generate your battery report you just need to go enter powercfg /batteryreport in cmd

Windows 7 can also generate power reports (powercfg -energy) but it's a little less human friendly

Unfortunately for me it appears that installing windows 10 reset the stats, as my report only goes as far back as about a week after I installed windows 10.

</comment><comment><USER20> Very impressive. Concise, thorough, useful. I love seeing posts like this.

</comment><comment><USER21> 7% remaining capacity after 2 years seems insane to me. I replaced my 2012 MacBook Pro battery this year as it passed 1000 cycles (I'm bad at plugging in and end up charge cycling daily) and even that battery was still above 70% capacity...

</comment><comment><USER22> Interesting.

Did someone follow the link to the Macbook Air? It shows that the Mac battery lasts much longer than the Thinkpads. My impression is similar: my Thinkpads (back when IBM still labelled them) where down after 2 years. All Powerbook or Macbook batteries that I ever had still did well even after 3 years.

Shocking, on the other hand, is the amount of detail of the battery usage records that apple stores. Imagine apple had access to them.

<comment><USER23> One of the things Apple seems to be very good at is managing battery "overcharge": my 5 years old MBP reports ~90% battery capacity but a relatively low amount of cycles (~200) because it's almost always tethered. Other companies seem to handle that less well and have the battery health fall much faster.

<comment><USER24> Here's a link to my MBA performance: [http://imgur.com/2UVFmIU](http://imgur.com/2UVFmIU)

Bought Nov 2013, now has over 250 charge cycles and is still at 90% of original capacity.

<comment><USER25> How would I generate this graph for my MBA?

</comment></comment></comment></comment><comment><USER26> For each of my laptops, I use two batteries: a high-capacity one that I use when traveling and a regular one for daily use. When unused, I store the high- capacity battery (charged to about 40%) in the fridge, wrapped in a plastic bag. Thanks to this treatment, the 9-cell battery of my old spare laptop (Dell D430) is still good for 4-5 hours of use. It lasted for 6 hours when I bought in 2008.

</comment><comment><USER27> (I know this post is about linux.) My windows laptop batteries usually die after 2 years. I think Windows laptops have the problem of overcharging. To avoid it, I have to unplug the battery when I need to use a laptop as a desktop. We have to admit Apple does good job in battery management. My 2010 MacBook Pro 13-inch's battery is still in good condition (relatively).

<comment><USER28> > My 2010 MacBook Pro 13-inch's battery is still in good condition > (relatively).

My 2006 MacBook still holds about 30 minutes of charge in the original battery. Most of the time I left it plugged in all the time, what do people do that kills them so quickly?

</comment></comment><comment><USER29> My wife's Lenovo has a windows utility that allows you to default the charge max to 60%. My Dell has a similar option in the EFI settings.

After about a year, there has not been a noticable degradation in battery life (and I have noticed it in past laptops).

<comment><USER30> This should be the norm for all devices with built-in lithium battery charging. Default to a low attrition end voltage, and a simple hardware control to temporarily enable full capacity charging in anticipation of a particularly long off-grid phase.

But dead batteries are what keeps the economy spinning, so it must be in all our best interest that the self-optimizing algorithm of capitalism decidedly skips on this particular efficiency gain, right?

</comment></comment><comment><USER31> IBM Thinkpad actually has pretty good battery reporting tool that tells you condition, minutes-to-charge, cycle count, voltage, current, capacity Wh, temperature, mfr. name, mfr. date,design voltage, firmware, etc.

</comment><comment><USER32> Pro-tip: suspend is not zero power state and can hurt your battery. I used it on my first work laptop and ruined the battery (brand new) in 1 year. Use hibernation.

<comment><USER33> Tradeoff between killing your battery or killing your SSD then I guess (if you have an SSD of course). And wasting time when booting, my experience with hibernation is that it isn't _that_ much faster than a cold boot. Suspend is more or less instant.

<comment><USER34> I wouldn't worry too much about write endurance with modern SSDs - at least if you're not using them in a server or something. The Samsung 850 EVO (not even the PRO model) is rated for 150TB, and most tests got closer to double or triple that number before the drive failed.

If the full contents of a 16GB memory are written to disk for hibernation daily, with say another 50GB of work, that's over 6 years before you hit the lower limit. I probably wouldn't trust a hard disk that was used that heavily for that long either.

<comment><USER35> I've written 40TB so far to the 1TB 850 Evo in my workstation and it certainly has problems now that it didn't have before - it just hangs for a few seconds at a time, when copying or deleting large number of files. Not sure what it's doing.

<comment><USER36> If by chance it's an 840 (rather than the VNAND 850), there's been two firmware updates to improve performance over time - make sure to update the firmware.</comment></comment></comment></comment></comment>


Why it is in Microsoft's self-interest to have an OS that is prone to catching viruses. - <AUTHOR>

Without viruses, most people would just pirate their software, thus severely damaging the commercial software industry. <comment><USER2> I dont understand your logic.. How could being prone to virus attacks be desirable for Microsoft? From a brand image perspective it is very bad. This is one of the major selling points Apple has over Microsoft, that OSX is less virus prone.

<comment><AUTHOR> If you are a commercial software developer, you would like an operating system where security risks discourage users from pirating your software.

Yes, there's a limit to what users will tolerate. A system that is too insecure would not work. But the virus threat needs to be real to discourage piracy.

Ultimately, users do care about an OS with lots of software available. Many users will put up with some security threats to get that.

</comment></comment><comment><USER3> Hanlon's Razor applies here: "Never assume malice when stupidity will suffice."

<comment><AUTHOR> It doesn't matter what the reason for these security issues is. Microsoft could still benefit from the current situation regardless.</comment></comment>


Why could the last living Galapagos tortoise be disinterested in opposite-sex? - <AUTHOR> http://www.independent.ie/world-news/americas/lonesome-george-the-last-giant-galapagos-tortoise-of-his-kind-dies-3148002.html

<comment><AUTHOR> It's sad to see another specie go extinct even with all modern-day focus to prevent such an event. What's surprising is that the turtle had 40 years to mate, and I guess the team "in-charge" had 40 years chance to collect its sperm sample too.

So why didn't they try to force-save the specie even if the turtle felt no sexual urge?</comment>


As New Zealand Courts Tech Talent, Isolation Becomes a Draw - <AUTHOR> https://www.nytimes.com/2017/04/14/technology/new-zealand-tech-industry.html <comment><USER2> Already on the homepage.

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