The IRS Targets Income Tricks - <AUTHOR> http://online.wsj.com/article/SB10001424052748703951704576092371207903438.html

<comment><USER2> Small businesses are somewhat notorious for aggressively interpreting the tax code in one's favor, largely because they have a variety of options for doing so not available to the W-2 employee. The game theory sort of incentivizes it, too: heads you save 100% of the taxes at issue, tails you have to pay the taxes at issue and (if you had any sort of a good faith case) only interest at a below-market rate on them... and the coin is known to flip tails only a few percentage points of the time, due to how infrequent audits are.

This is complicated by the fact that, if the tax code were a spec, it would have some requirements which were contradictory and very many interactions whose behavior was totally undefined.

For example, BCC has a fairly similar issue: if the profits are earned income received for the value of my services as an engineer/etc, then they're subject to a generous exclusion since I was physically in Japan when I earned them (foreign earned income exemption, form 2555). If they're unearned income -- that is, if the business is generating profits above the fair market value of the time I am investing -- then they are not subject to that exclusion and I owe the IRS a few thousand extra. On a separate axis, they may not be attributable to the business at all, but as a result of sale of real property, depending on whether the computer software counts as personal property or not, which apparently turns on the degree of support/customization I offer and the mood of the examining IRS clerk. If they aren't attributable to the business and are a sale of real property, then they are excludable, as long as the transaction is not sourced to the United States. Sales of real property are sourced where the transaction physically takes place... but the IRS literally has no opinion on where that is for sales of downloadable software. (I asked. They said "Write up your reasoning with your tax form. If we don't bill you, you're good.") If they are not real property, they may be a sale of computer licenses, which are arguably a source of royalties, which could be subject to a US/Japan tax treaty provision which overrides some of these rules but not others.

The above is not tax advice. Don't even ask about the Japanese side -- I have a few more weeks to figure that mind-meltingness yet.

<comment><USER3> i just realized the both of us need to start an american-expat-tech- entrepreneur-tax forum. a few other people are in the same boat and email me based on my profile from time to time. I find i know much more about IRS tax code regarding form 2555 than most US accountants because they just don't deal with it much, OR, the ones that have charge way more than I can afford to help me with my questions - but i haven't found a place to discuss these type of issues online. perhaps a google group?

<comment><USER4> I'd be willing to help with my experience with these tax issues. =)

I'm both licensed and experienced in the tax field.

</comment></comment></comment><comment><USER4> I'd like to clarify the issue. Personally, I think that the CPA in question in the article is an idiot for a number for reasons. (1) He's an accountant so he should've known that playing this game with the IRS as a CPA is begging the IRS to slam you. (2) Litigating a losing position like this so publicly is going to kill your reputation and put you on the IRS' top 10 favs list for life.

This is a very clear issue actually and I'm not sure why there is so much confusion and I'd disagree with calling this tax plan a "trick."

It is a legally sound tax plan with a justified theory. You are allowed to exempt a portion of your income from payroll taxes because they are "corporation distributions." Corporate distributions or dividends are not taxed as earned income because they are considered passive investment income. An S-Corp is a corporation that abides under a specific subset of rules within the IRC's Corporation Regulations, thus it is for all legal purposes a regular corporation with certain special rules.

A reasonable salary is a fairly straight forward question. The IRS won't nitpick with you on silly numbers as long as you fit within the range. Obviously, for every position there is a high and low salary range, so as long as you fit within that range the IRS will leave you alone.

The CPA is an idiot because he underpaid himself below market rates to the point where he couldn't justify his position under any reasonable defense.

If you were developer, then you would be paid anywhere from 40k to 250k+ depending on your company, position and experience. Thus, you could potentially pay yourself 40k in reasonable salaries if you owned an S-Corp and take the rest as a dividend. As long as you are able to provide "comps or comparable salaries" to positions with equitable responsibilities and experience in your local region.

The important thing to remember is to be reasonable.

I'm a full-time tax accountant, so this is coming from years of experience in the field with direct contact with auditors from the federal and state levels. They won't come knocking unless you were being a greedy idiot because like the article states it's expensive for the government to audit someone, so when they do audit you it has to be a profitable venture (thus, they usually audit the sure-thing losers).

<comment><USER5> Does any of this apply if you're not distributing the cash _at all_? Say, I am making money in my S-Corp, but I keep all of it in the bank (minus the expenses) and instead live off my savings. The plan is to save enough to expand the business, but for now the money is just sitting there, doing nothing.

<comment><USER4> No that is not going to work. Keeping money in the business is called "retained earnings." Only C corporations or regular corporations are allowed to retain earnings. Pass-through entities such as partnerships and S-corporations are required to pass any income to the owners regardless of whether cash or any other form of income is distributed.

If you want to reinvest into the company, then you'd have to pay taxes on the distributed income and then put the after tax money back into the business, which would increase your tax basis in the company. This would allow you to take net operating losses in the future as well as help you if you ever sell the company.

Hope that helps. Keeping money in the bank won't help you in this situation.

<comment><USER5> Thanks for your reply. Just to be sure I understand you correctly, which one (if any) is true:

If an S-Corp makes money, it is assumed that the earnings are distributed and thus both personal income tax (on the entire earnings amount) as well as payroll taxes (on the reasonable wage) have to be paid.

Or:

If an S-Corp makes money, it is assumed that the earnings are distributed and the personal income tax has to be paid (on the entire earnings amount), but payroll taxes don't need to be paid.

<comment><USER4> Option 1 sounds about right. All distributions are going to be tax on your personal income tax and exempt from payroll taxes.

Reasonable wages are NOT corporate distributions, they're simply wages paid by the corporation and deducted as an expense. The payroll taxes would be paid on the amount that you deem wages through the corporation. Please note, payroll taxes are also deductible. hope this helps

</comment></comment></comment></comment></comment><comment><USER6> See, this points out something I've never understood. If you own an s-corp, you have to be careful about paying yourself too little and taking out too much profit, presumably due to the reduction in FICA withholdings.

So how does someone like Steve Jobs get away with making a $1 annual salary without being charged with tax evasion? It seems like he's found a way to avoid paying into the social security and workmen's comp system.

What am I missing? Is it only legal to dodge withholdings in a c-corp?

<comment><USER7> A S-corp owner must take what the IRS deems to be a "reasonable salary" based on the overall profit of the company, and must pay self employment taxes (FICA, Medicare, etc.) on that amount.

The IRS does not give out much guidance on the definition of "reasonable salary" but has provided guidance on what is /not/ reasonable.

In this case the IRS evaluated the company's return and decided that his salary was less that reasonable and as such they went after him and got him to pay more tax.

This rule does not apply to C Corporations.

<comment><USER8> To be clear: the rule doesn't apply to C Corporations because they are taxed differently; it's not an oversight. It's the pass-through taxation structure of S Corporations that make this an issue.

</comment></comment></comment><comment><USER9> Aside (but relevant): some countries have as an explicit rule, that if you get a letter from the IRS on an issue, both you (as someone who has to comply with the law) and the IRS itself, is bound by the interpretation that is given.

In the USA, even if you get a private ruling, the IRS can decide to renege on their advice at any time, and investigate you and charge you, making you pay penalties and fines for following their own advice.

These ambiguities and "tricks" could be cleared up with simple guidelines backed up by such private rulings; however that would not be in the best interest of our "gotcha now!" system of taxation.

</comment><comment><USER10> There is so much "waste motion" expended in trying to game the tax code in so many situations... what could creative people achieve in that time if they didn't spend it that way. We need a vastly simplified income tax code... I'm talking throw it all out and start from scratch. Or replace it with a national sales tax, rebating some amount to make it less regressive.

<comment><USER8> This implies that if you simplified the tax code, people would stop gaming it. The opposite is probably true; the simpler you made the tax code, the more accessible tax games would be to average taxpayers.

<comment><USER11> I don't agree. In order to game, there has to be different rules to take advantage of. The fewer and simpler the rules, the less you can manipulate it. Take sales taxes, for example. You can't really game them. You can evade them, but not really game them, although I suppose mail ordering things from another state could qualify, but that's an issue of jurisdiction.

<comment><USER12> > I suppose mail ordering things from another state could qualify

You're supposed to pay "use tax" on those, which for some reason is always equal to the sales tax you think you avoided. So it's still evasion rather than gaming.

</comment></comment></comment></comment><comment><USER13> I hope I don't get slammed for this, but the tax code is a large pile of stinking dung, and good luck trying to do the right thing.

S-Corps work under the general premise that it's just like you, if you were a corporation. So if you don't spend all the income in your business in the year, you owe income tax on what remains. If you have plenty of profits, you write yourself a regular W-2 paycheck. At the end of the year, whatever you don't spend as a legitimate business expense -- even if it's exclusively for business purposes -- is taxed at the same rate as if you had spent the money on whiskey and hookers.

Case in point: there is a _huge_ difference between a high-income wage earner who uses S-Corp status for maximum flexibility and the local beautician or mechanic who does the same thing. Lots of independents who are S-Corps have highly volatile income: if you get a client that writes you a check for 50K in January that might be the last income those guys see for that year. So those guys have to make a difficult business decision as to what to do with the money, and the most logical thing to do is to pay business expenses as needed and withdraw the rest as cash disbursements only as a last result. Writing yourself a W-2 paycheck when you're not sure of future income is basically taking away spending money from the business for no logical reason. As I understand it, the system is designed this way on purpose: tough times allow S-Corps to ride on profits and re-tool for the good times. Good times S-Corps work just like "regular" businesses.

So for small folks with highly-volatile income, being able to move funds around is the only thing sometimes that keeps them afloat. Unfortunately, there are a lot of guys making 400K a year or more who pay themselves a salary of $20K and take the rest as cash disbursements (thereby avoiding paying themselves as W-2 employees mostly altogether)

The reason the tax code is such a mess is that folks get mad at one bunch or another that they think are not acting fairly, so they punish them -- usually punishing many more than the original target. Or politicians want extra votes, so they make an exception for certain people -- usually providing exceptions to hidden interests and creating perverse incentives. 60 years of this and you have a complete disaster.

So yes, by all means make folks pay their share, just be aware that the guy you read about in the paper isn't necessarily the average guy. It's not an "income trick" if it helps the economy grow.

<comment><USER8> Respectfully --- I like you and your comments, even though our politics couldn't be more different --- you should get slammed for this analysis. You're muddying the waters and you know it.

The prevailing market wages for beauticians and mechanics are so low that that benefit of evading FICA is marginal. S-Corp owners are rarely audited _period_ , but here you ask us to consider that enforcement of the tax code might focus on them. Of course it doesn't.

Moreover, you've conjured up this issue of income flexibility, the idea that feast-or-famine will cause people to need irregular salaries. But that's not an issue at all. You can pay yourself an irregular salary. Just make sure your quarterly estimated tax payments treat most of it as payroll. The only time this S-Corp rule becomes an issue is when you _explicitly invoke it to avoid FICA_. Don't do that.

It is not difficult to avoid the problem this article talks about: unless your salary approaches the FICA cap (last year it was just shy of 100k), don't pay yourself a significant fraction of your total income in distros. What makes this a particularly easy rule of thumb to follow is that it's exactly what you would do anyways if you didn't know about the S-Corp loophole.

<comment><USER12> > What makes this a particularly easy rule of thumb to follow is that it's > exactly what you would do anyways if you didn't know about the S-Corp > loophole.

So if everyone is supposed to pretend it doesn't exist, why _does_ it exist?

<comment><USER8> The tax structure S-Corp owners are taking advantage of is the one that governs investment income. These people are deliberately reclassifying their compensation as return on the investment of having started a business.

<comment><USER14> Thanks, that clears it up. I was reading the article wondering since when these people don't have to pay SEP taxes.

</comment></comment></comment></comment></comment><comment><USER15> Can anyone comment on how personal income tax is handled in other countries? I don't mind paying tax but I hate the fact that I can take my paper work to several different tax preparation services and get different tax bills. In some cases I have heard of people owning the IRS thousands, going somewhere else and claiming a refund.

Is the US the only country in the world where 2 to 3 percent of our GDP goes into tax preparation?

<comment><USER16> In the UK personal taxes are generally automatically handled by the employer. You just get the post-tax income transferred into your bank every month, and a payslip showing the deductions that were made.

(Outsourced PAYE administration costs about £20 per month for a very small company.)

It gets more complicated when you can't do taxes through PAYE for any reason - unearned income, dividends, directorships etc.

My own taxes as a director of two firms subject partially to mandatory PAYE on some of my income are a US-level nightmare and once you are out of the 'simple system' getting back into it takes years.

<comment><USER15> I read a book by Jim Rogers, I think it was "Investment Biker" and he said that the US is the laughing stock of the developed world because of the way our incomes taxes work. He said that in Australia you have one form the size of a postcard that everybody mails in once a year.

<comment><USER17> While I agree with you, it's not entirely true that you have one form that you post in once a year. While your 'group certificate' is postcard size, I _think_ it's somewhat like a W2 (been a while since I received either), you still have to submit a personal tax return. For most people, it's just a case of reporting the information on the Group Certificate(s) (depending on how many jobs you had) and perhaps claiming on some deductions like uniforms or (new) secondary school expenses for dependent children.

That said, the government is talking about moving to a model whereby you don't have to submit a return unless you specifically want to claim some deductions. This is more like the UK model.

As for the US being the laughing stock - I don't know if I would choose those words, but I do think the IRS needs its wings clipped by foreign governments. The whole W8BEN form thing is ridiculous (so tempted to put F.YOU IRS as my contact details) as is the mind-boggling fact that the only way to not file a return in the USA is to renounce your citizenship (and good luck visiting your relatives after that!).

The myriad of local, state and federal taxes, forms, rulings and corporate structures - well, I do wonder how much GDP is lost in paper shuffling. It can't be insignificant.

Personally, I would have the tax laws in most countries scrapped and replaced with flat-banded taxes with zero exemptions. The tax rates would be lower to make up for the lost deductions, but in general, if you earnt X, you'd be up for taxes of Y. Corporations would be kept for their original purpose of limited liability rather than taxation structures. As noted above, it's all the special interests that get in, and, well, anyone who was tried to selectively reward children will know the impossobility of 'fair' once selective rewards and exemptions are introduced.

</comment></comment></comment></comment><comment><USER11> Seems like if we just had a large sales tax, rather than income taxes, none of these things would be so complicated, and we'd save so much money on the cost of compliance.

<comment><USER18> A large sales tax is an unfair tax on the poor. Why should people making $20,000 a year pay the same tax on their groceries as someone making $1,000,000 a year?

<comment><USER19> Don't tax groceries as is already the case in many states.

<comment><USER18> So all poor people are allowed to do is eat? That's worked really so far...

<comment><USER19> I'm not advocating replacement of income tax with higher sales tax; just answering your question.

I wouldn't consider myself the most knowledgeable on this issue but I think there's an argument for a system that doesn't tax certain basis necessities and offers compensation to the poor to allow for more than just an existence.

</comment></comment></comment></comment></comment><comment><USER18> Wow, a mandatory minimum wage for professionals. I estimate that this will last for about ten more minutes.

<comment><USER8> It's not a "mandatory minimum wage". Stop trolling. You can pay yourself $0.50/yr if you'd like; you just can't do it will paying yourself tens of thousands in distributions.

<comment><USER5> So if I am not distributing anything, I don't need to worry about the "reasonable wage" rule, right?

<comment><USER8> I think it's safe to say that if you don't know about the S-Corp FICA tax dodge, you're not going to run afoul of the IRS over it.

</comment></comment></comment></comment><comment><USER20> This is one of those few instances where I actually support the IRS and also support the law that's being contemplated.

S corps (and AFAIK LLCs) are supposed to have "pass through" taxation. I think it's fair that all income (whether salary or profit distributions) from S Corp is treated as regular W-2 income.

If you don't care about the simplicity that "pass through" offers, register a C-corp.

<comment><USER21> So then as a small Sub-S owner (wife and me), I would have to pay FICA and Medicare on the money spent on health care insurance, disability insurance, etc., which you as a W-2 employee do _not_ pay payroll taxes on.

In the end, the payroll tax savings are not that great for a small Sub-S. And as you get older, toward retirement, if you pay yourself too low, you take a big hit on SSA benefit payments (which are based on your latest 40 qtrs).

The biggest bang for the PIA effort is if to can write off a vehicle purchase through a Section 179 deduction, and various other hardware purchases.

<comment><USER8> The tax code already goes way, way out of its way to make it easy to pay for health insurance; get a high-deductable plan and build an HSA. It's what you should be doing anyways, even if you don't care about taxes.

The fact of the matter is, as a member of the workforce, you owe FICA on your compensation. This isn't a subject of dispute. The IRS says you do, the courts say you do, your accountants will say you do. This issue comes up on HN roughly once a year, and the story has never changed.

<comment><USER21> "...you owe FICA on your compensation". Exactly. I want to be taxed (and get the same breaks) as my corporate client employees. Business writes off all possibly related equipment, as do I. I try to write off everything a C-corp would for employees, but it is much more difficult for us (and very time- consuming even trying to be IRS-compliant).

Again, payroll tax savings (on the income/distribution differential) does not usually add up to that much money.</comment></comment></comment></comment>


Games Today Shut the Door to Tomorrow's Devs - <AUTHOR> https://medium.com/@trq__/games-today-shut-the-door-to-tomorrows-devs-53ddf88c86bf <comment><USER2> This is one of the perennial complaints about games. Every generation of games development has its version of "back in my day mods were easier to make" complaint.

Yet for every AAA development house that can't prioritize making public versions of their in house development tools, there are games like Minecraft that are almost nothing but modding tools pretending to be games, and getting all sorts of interesting fans doing interesting things.

Where most AAA game engines used to make modding easy but licensing to sell mods hard, there are now entire engines (Unity, Unreal) with fairly simple, linear (as opposed to exponential or worse) license systems that allow hobbyists to build with the same tools of AAA developers _and_ license their work for resale, growing organically with their audience size rather than being constrained to artificial limits of steep license curves.

It's one of those cases where it's both better than its ever been and worse than it ever was, and you can write clickbait articles for both sides of that, but overall, unclouded by nostalgia glasses the answer is probably just that it's the same as it ever was.

<comment><USER3> > Yet for every AAA development house that can't prioritize making public > versions of their in house development tools, there are games like Minecraft > that are almost nothing but modding tools pretending to be games, and > getting all sorts of interesting fans doing interesting things.

Minecraft doesn't have any significant modding support from the developer. Official 'mods' are mostly limited to textures / shaders. The real modding tools that exist for Minecraft were created by the community and largely exist because Java is comparatively easy to reverse engineer in addition to some 'off the record' style support of the mod lib authors by the game developers. The whole mod scene has gone through various phases of questionable legality and unknown future. The Minecraft mod scene exists largely in spite of the game developer, not due to it.

<comment><USER4> I don't think Mojang ever tried to actively stop the mod community like, say, Rockstar did. I would say Minecraft does have modding support in the sense that the installation files are an open book, inviting unlimited modding opportunities for anyone who wants to tinker.

<comment><USER5> They never tried to stop it but they never fostered it either. It was just coincidentally easy to reverse engineer the code and install mods. But the interfaces were VERY brittle, and mods had very specific version requirements.

Official mod support (with an installer and an API) was on the dev roadmap but never materialized.

</comment></comment></comment></comment><comment><USER6> The available tools for game development are better than ever and widely available. The problem is that users expect AAA title quality, and that's a big job.

If you want to develop inside an existing environment, there are the virtual worlds - Minecraft, SineSpace, High Fidelity, Sansar, and Second Life. Even 3DXchat, which is supposed to be porno but has enough building tools that people are using it for other things. SineSpace is very developer friendly right now. Few users, but nice tools.

<comment><AUTHOR> That's what was so great about editors like Warcraft 3, you get the AAA feel for free.

<comment><USER7> That also conflicts with people's expectations of games to be constantly updated and patched. Valve added a built-in custom game creator for Dota 2, but game designers still run into issues since any breaking changes in Dota 2 can potentially break their games, and Valve doesn't want to maintain two separate copies of the game to appease custom game creators.

</comment></comment></comment><comment><USER8> You dont want your users creating content IF that is your primary source of profit as a game studio. If your users can effectively create new items, new maps, DLC, new missions, new characters etc what do you sell to them after your initial release? The easier it is to create this new content (aka non expert) the more likely that the price of this content (even if there was a market) would basically be free. (discounting network and intellectual property effects)

<comment><USER9> You sell them quality. Mods are shit quality, across the board. They're full of broken English, half baked assets, and tons of bugs. Sure, fun can be had, but when it comes to my wallet, I want quality attached to fun.

<comment><USER10> You have to be sarcastic. Thats just a nonsensical generalization. Far from all mods are broken shit just as far from all DLCs are polished. You have stuff like Enderal when it comes to mods and I hopefully dont have explain to you, how unpolished and simply broken many games are, let alone dlcs. There is a giant list of games which are only playable after years and years of community patches, made surprise surprise mainly by the modding community. But thats if modding is possible. If not you are left with the shitnugget you preordered.

<comment><USER9> Yes, there are good quality mods out there. But they sit on top of mountains of shit. You can't point to the top of shit mountain and say "see, look at how good it is"

<comment><USER10> I can and i will if you say "across the board"

</comment></comment></comment></comment></comment><comment><USER11> There was massive internet backlash toward it but I still truly think Valve's "paid mods" idea is the way forward for this. Back in the day, when Unity/Unreal/Godot weren't freely available for anyone to use, people would put a lot of their own personal time into making mods, without any expectation of pay. Now, even if the mod tools were there for modern games, why would anyone make a "total conversion" mod instead of just making the game themselves using free modern tools?

Creating incentives for game developers to add mod tools to their games by creating the incentive for potential mod-makers to make _some_ money off their work seems like a solid strategy for me. (I think I heard a rumor somewhere that Valve is going to bring back the "paid mods" idea again soon, possibly in a retooled form.)

<comment><USER12> I disagree. As soon as free, small communities get monetized they soon become overrun by sharks and profiteering. They become hotspots for fraud, and troublemakers cause a nuisance to existing community-members. Sure there is some of that already, but not to the kind of scale that monetization inevitably brings.

Your other major problem is that much of the audience for mods are kids or teens who don't have a lot of money. Keeping modding free is what keeps content generation gated to those who intend to truly intend to better the community.

As an example, I now continually get fraud warnings on my Epic account, which I keep for UDK access, because Fortnite blew up. It's really annoying :(

<comment><USER13> Ahh, so that's what that is... I was wondering why I was getting so many 2fa alerts.

</comment></comment></comment><comment><USER14> I remember making a dota precursor game on Warcraft 3 after playing some tower defense games... I created waves of enemies spawning in opposite directions, but you had 2 teams trying to build towers. The problem I had was that once spawned, building lots of towers messed up the patching. I abandoned the game after only a couple if tests, but I think it has been original at the time.

</comment><comment><USER15> On the top of my head, I can list Minecraft, Elder scrolls, Fallout, Factorio, Cities Skylines as modern games that have a vibrant modding community. Minecraft really helped me get a better programmer.

I strongly disagree with the point this article is trying to make, it feels like some kinds of proxy-gatekeeping (our games were so much better)

<comment><AUTHOR> Bethesda (fallout, elder scrolls) is basically the only AAA studio that makes an effort.

I'm mostly saying that AAA games not having modding is just a big loss, especially given how this generation of games (Fortnite, Overwatch, League) are magnitudes bigger than anything before it.

</comment></comment><comment><USER16> Warcraft 3 modding is what got me interested in programming in the first place. I made a handful of somewhat popular custom maps, and having a forum where players could report bugs or suggestions gave me great insight into understanding the user perspective.

</comment><comment><USER17> I hear the argument of this article and how important it was (being able to mod/participate in mods) but computers are also fading for gamers with the next generation.

The Kids I interact with are on tablets/phones, not the PCs we had that we could modify and upgrade and tweak as we saw fit.

Currently I feel like we're in a period of very locked in devices that stifle creativity by default. Even PC games are always online so you can't get all the content of the game, it has to be server-side unlocked or bought.

</comment><comment><USER18> > Blizzard themself have no modding capabilities for World of Warcraft or > Overwatch. League of Legends, Fortnite and PubG have no mod framework > whatsoever, despite being originally inspired by a mod.

ugh. I think the key point the author is missing that those are all online- only studio-server games. I can't remember any of those ever being properly moddable.

What Doom, Quake, and WarCraft3 had in common that you a) had a singleplayer mode and b) more importantly could host your own (dedicated or not) server - so you weren't taking part in a persistent MMO world where you'd for example ruin the economy with your "unlimited gold" mod, but you were setting the rules in your game mode.

</comment><comment><USER19> Then don't play today's games. They probably are all overly complicated for the experimentation someone would want to do. Use the older games that have well-developed tooling and open source engines and assets.

The most popular games aren't cutting edge graphics games anyway. Gameplay is beating pretty graphics in lots of ways.

And those games that don't provide modding tools? They'll go quicker out the door and will be less famous.

</comment><comment><USER20> Nitpick: WoW allows add-ons which are user created in Lua.

<comment><AUTHOR> Fair but those are more for display/frontend purposes. They shutdown custom servers pretty hard.

</comment></comment><comment><USER21> > However, this seems like a particularly shortsighted form of gatekeeping > because it also cuts off a pipeline for young and inexperienced people to > get into game design and programming. Riot and Blizzard have hired many of > the Warcraft3 modders as full-time employees, but where will the next wave > come from?

Is this even a problem? Are there game developer shortages?

</comment><comment><USER22> It really does seem like the early to mid 2000s was the pinnacle of the mod scene.

<comment><USER23> I'd recommend checking out any game developed by Paradox. You haven't seen fantastic mods until you've seen what people can do with Paradox games

For that matter, some games that Paradox only publishes (e.g. _Cities: Skylines_ ) also have fantastic modding support, though that's hit-and-miss compared to the games they develop in house.

<comment><USER24> I love Paradox. I happily fork over $10-20 a few times a year for new EU4 and Stellaris DLC. I feel like (1) the longevity of those games, (2) the ability for the developer to majorly rework systems far past release (see EU4 Art of War), and (3) modding ability, are all related.

</comment></comment></comment><comment><USER25> Modding was my first introduction to programming. Specifically, starcraft 1 released in 1998. I was in elementary school at the time

Discovering the world of custom mods was amazing. It was basically the equivalent of google playstore + having your own mini android tools to build your own maps. There were so many unique genres birthed from that game. Tower defense originated as a starcraft 1 mod, and many other things such as temple runs (based off zergling runs). DoTA was based on the works of Aeon of Strife, which was considered the first MoBA. If you were to look at many of the indie games produced today, chances are there was a starcraft1 or warcraft3 map variant of it. These were the maps that became the most popular, the top 10%. The rest that didn't make it into mainstream modes are essentially the 90% of game apps that failed in the google playstore

Modding felt like programming. It was very much an object oriented programming paradigm. Units had attributes associated with them, to which you could modify globally. Things like their overall HP, armor, damage rating, etc. You could set observables, e.g. events, in designated areas in the map. Like if player X came to position Y, event Z happened.

I learned a lot by compiling my own modded versions of popular apps. I would install cheats inside of them, things like additional resources and units if you do a sequence of events (e.g. move unit to a special location). There wasn't really any validation in checking map authenticity, its very much like forking a git repo and publishing your own npm package.

Users who came to your map would have to download the latest version. Some would get skeptical in seeing new changes, wondering what promoted the new patch. This wouldn't work so well in popular maps, b/c the map publisher put a changelog on their website. But less popular ones it was much easier to get away with.

My modded map with the cheat installed would later get redistributed in the P2P network. People would play it. Sometimes if I promoted it enough by hosting the lobby, it would be the only seed available. Much like how torrenting works. Especially if that version added new features that people enjoyed.

Sometimes maps created get lost forever. Since everything was P2P, if no one had that map installed on their machine, and no one hosted that map anymore or played it, it was dead. Much like lost porn. This happened several times in which I wanted to find a map I played previously, but reinstalled my computer and could not find anymore lobbies to download the map anymore. Examples include some Lord of the Rings maps, Battle of Troy, Helms Deep, or things like Nexus Arenas

These days things are much different. Mirrors for hosting mods, either official (e.g. steam) or 3rdparty websites are widely available. There wasn't any youtube tutorials for making maps, you just had to read the help documents, and breakdown / understand other maps. Much like you do looking at opensource repos on github.

Modmaking was rewarding in its own right. You used the exact same AAA tools developers used, and when something finally clicked, you could build even cooler maps. Sometimes, you could install mods into your editor. Things like adding text colors to your units is one of many examples. Its kind of like if you installed a plugin extension with visualstudio code.

I don't know how this compares anymore to kids learning how to make mods in Roblox, GTA5 mods, minecraft, etc. Its probably not as complicated as it used to be, since youtube has so many tutorials out there. The real challenge back then was figuring everything out on your own and/or finding a reputable map mentor to help you out. IRC was a whole another thing I was introduced to in starcraft1 / warcraft3 days. The beauty of this back then was that it was the first of its kind, this custom modmaking scene for RTS based games.</comment>


Ask HN: I suck at technical interviews. How can I get better? - <AUTHOR> I go to a top-ranked school, I have a great GPA, but I always freeze up during programming interviews. How can I improve my technical interview skills? <comment><USER2> I went to the worse schools, I have no skills, really the interview is all I know, I've done it a million times. (hahaha)

One good trick is to take charge of the interview.

There are standard questions the interviewer must ask (every time he does an interview) Try to answer all of those before he gets to ask them. This renders him without things to say. Then you get to ask your own questions.

Change the discussion from "why do we want to hire you?" into "why do I want to be hired by you?" When will I get a raise? when will I get promotion? when will you get to sit where he is sitting? And where will he be at that point? How are ideas treated here? Is one supposes to show initiative or not?

Will you get locked away in an office or will there be other people on the floor? Who do you get to work with? Have him tell me something about your future coworkers.

My favorite one is to just bluntly ask why their product is better than the competitor. I ask that because when it is asked from me I want to be able to answer it precisely the way I'm suppose to.

Show an interest in the interviews, the guy is doing that all day long, is he having fun? Did he see many good candidates? How many interviews will they do for a single job opening? Does he enjoy his work? Don't allow him to just sit there pretending to be interested in your life. Show an interest in who he is, what he does and where he comes from (or she)

You can be empathic about it but working down your list like a robot is equally impressive.

Talk fast but not to fast, keep eye contact but don't gaze.

If their argument 'why you want to work there' is good enough and their product is good enough end the interview before he does, ask if he made up his mind already, when do I start? You don't want to pressure him but you have a lot of other interviews you would rather not have to go to.

You want him to have the impression that you are putting serious work into finding a job - but not to much.

Good luck!

:-)

<comment><USER3> Maybe this is good generic advice to some, but this is not how to "pass" a technical interview. In a technical interview, the interviewer needs to determine where your skills lie - would your skills fit within the team? Does what's listed on your resume match with your answers? Is your learning book- knowledge or from experience? How do you respond when shown a very difficult problem? You can't BS your way out of these by "taking charge" and trying to trick the interviewer to move on to soft skills questions.

Maybe your advice works in certain situations but, against a full on neck beard who cares only to see if you know data structures and OOP, your advice would guarantee that you do not pass the interview.

<comment><USER2> True, working fast is not an excuse to be sloppy. Your questions are just better than mine but one can still answer many of them before they are asked.

</comment></comment></comment><comment><USER4> The short answer is, practice. Literally, interview more. Apply to jobs you'd never accept an offer from to get the practice.

The long answer needs more information. Why do you think you suck at technical interviews? How do you know that? If the answer is "because I haven't gotten an offer," what makes you think it was the technical portion of the interview you failed? What parts are you not good at? When do you freeze up? Why do you freeze up?

</comment><comment><USER5> I have worked at Microsoft, Google and Facebook as a software engineer, going through the full interview process every time.

The thing to realize is that being good at technical interviews (as done by the above companies) is a skill unto itself but it is a skill an intelligent person with a comp sci background has the ability to get significantly good at after a 1 to 2 months of disciplined preparation. - I went to a top ranked school myself and had a comp sci degree but was very intimidated by technical interviews until I realized that this was no different than all the other other intellectual hurdles/gauntlets I had successfully navigated up to that point by giving myself time to thoroughly prepare.

Get "Elements of Programming Interviews" and give yourself 2 months to prepare. Start to with "1-month" plan in the book spending at least an hour a day at the very minimum. (I have worked through both Elements of Programming Interviews and Cracking the Coding Interview in their entirety and while both are good, in my experience Elements of Programming Interviews was clearly the better preparation in terms of technical depth, breadth of exposure to the kinds of questions I faced in the full-day interviews, and succinctness of coding solutions)

Get dry-erase paper/notebook or a white-board and work through the problems by hand including the coding (important!). For the first week or two give yourself an honest focused couple of hours to wrestle with a problem before looking at the solution. it is not enough to settle for "I think I know how to solve this" \- Actually code up the solution by hand and step through it with some simple cases. This is important and it allows you to develop confidence in your ability to think methodically through a problem as well as giving you an opportunity to develop mental heuristics for how to tackle and test unfamiliar problems. Developing confidence in your ability to think through interview-style problems is every bit as important as exposing yourself to interview-style problems. As you progress, you will be working towards being able to deconstruct a problem and be ready to start coding up a high confidence solution in 15 - 20 minutes.

"Talk to yourself" as you try to solve a problem to simulate explaining your thought process to someone as you go along.

When going through the solutions in the book, do not gloss over a detail you do not understand. Go online and find alternative explanations/references if you don't understand some detail of the solution provided.

After a few weeks of this kind of daily disciplined prep, you should start feeling pretty good and your confidence should start building nicely. Lots of interview questions are variants of each other and once you have enough breadth, you start quickly being able to key into the "type" of question and possible solution approaches almost as soon as you hear it.

Last thing is when you feel ready to start doing interviews, do not interview with your "top choice" first. If you can find someone that has done interviews to give you a mock interview, great! If not, schedule interviews whose outcome you are not as attached to (relatively speaking) first.

Hope that helped.

<comment><AUTHOR> Thank you for this advice. I was always under the impression that it should come naturally, so when I didn't do so well during the interviews as some of my friends, I started worrying that I shouldn't be pursuing programming as a career after graduation.

<comment><USER6> Nah man, just like the SAT. Prepare.

</comment></comment></comment><comment><USER7> [https://www.interviewcake.com/](https://www.interviewcake.com/) should help you with the typical fizz buzz tests.

</comment><comment><USER8> Practice and convince yourself before the interview -- whether it is true or not -- that you do not need the job. Take the pressure off the outcome and you will go into it with a different mindset. I've even gone so far as to repeat over and over to myself on my way to an interview that "I don't need this job" and my mindset really changed! Doesn't hurt to try :) And good luck!

</comment><comment><USER9> 1.) Read up on the routine where you're going to be interviewing. If it's a better-known company there will be plenty available.

2.) Work through one of the popular coding interview books [1][2].

3.) Practice off-keyboard things like white-boarding and public speaking. Get up in front of your white board and work through a problem like you're teaching a class on the subject.

I recognize that 1 and 2 might feel like gaming the system a bit - they are, but as long as companies continue to practice contrived interviews targeted preparation will naturally follow.

As stated, you don't lack the ability to perform in general, just within the artificial confines of an interview.

1: [http://www.amazon.com/dp/098478280X](http://www.amazon.com/dp/098478280X)

2: [http://www.amazon.com/dp/1479274836](http://www.amazon.com/dp/1479274836)

</comment><comment><USER10> Keep in mind, many interviewers are purposefully giving you ridiculous questions to try and trip you up. Calming your nerves is a very common problem, and can be challenging to overcome. It sounds like your problem is not a matter of knowledge, but a matter of delivery. Here are a few immediate things to try:

\- Practice makes perfect: find someone to give you a mock interview. Do this as often as necessary until you conquer your problem. \- Caffeine, adderall, etc, can make you much more anxious. You need to be calm. \- Don't feel pressure/rushed, and _don 't panic_. Slow down. If your mind races under pressure, that's completely normal, but it can be controlled. \- Its ok to not entirely know the answer. Start by responding with what you do know. Once you begin speaking, the ideas will start flowing. Many technical questions are "loaded". To actually solve the problem in the best way possible, you need _way_ more information than they give you. This will cause your mind to race. Try to qualify your response with your thought process, "if this or this, I'd do this. If something or another, I'd probably do this." \- Practice speaking with confidence. Take a deep breath, all the way down into your belly, and then use that air pressure to make your vocal chords "sing". Having a strong vocal tonality will resonate confidence inside your head, and inside theirs. Also, don't be monotone/boring. Find/express energy and enthusiasm without sounding fake or cheesy.

Being nervous for an interview is normal. I've interviewed a lot, and I always get nervous. Its just something you have to deal with. Public speakers and pick up artists (approaching women to ask them out) are two areas that you can find a _ton_ of advice for calming your nerves.

Introverts can have a hard time finding their inner personality. Practice makes perfect. Try to start as many conversations as you can each day. Don't force it, become natural at engaging conversations with other people. This will help all areas of your life, including interviews.

<comment><USER10> Why can't I update this comment. I keep trying to reformat and click "update" and it doesn't work.

</comment></comment><comment><USER11> Programming interviews are a game. It is not a reflection on your GPA or your school or how intelligent you are. It is simply a collection of parlor tricks because we as an industry have no fucking idea how to evaluate someone who is relatively new or has no social reputation.

So dissociate yourself and detach yourself from the process. Others have given you tons of advice on this process. The secret really is to practice. It is hard. But it is doable. Good luck, mate.

</comment><comment><USER12> You can never be completely prepared for programming interviews. How well you do in a particular programming interview depends on whether you have had any experience working on similar questions/problems in the past. So, bottom line - program as often as you can.

</comment><comment><USER13> Same as you improve anything, practice. In this case that means do more technical interviews, apply for the jobs, even the ones you can't do/don't want to do. It's all experience and interview technique depends on that.

</comment><comment><USER14> Just found this handy resource on GH [https://github.com/andreis/interview](https://github.com/andreis/interview)</comment>


Show HN: JS library to make your website instant - <AUTHOR> http://instantclick.io/
It seems the internet architecture won't bring us instant websites anytime soon. So here is a hack.
I released this JS library last month (today is version 2.0 release, fixing v1.0's rough edges), it makes use of HTML5's pushState and preloading to make a website instant.
It works like this: before clicking on a link, you'll hover over it. And there's a delay of 200-300 ms between these two events. InstantClick uses this delay to preload a page, when you click on a link it will display instantly in most case. (You can test on the website.)
That's similar to pjax and Turbolinks, for it uses HTML5's pushState and Ajax. And preloading is thrown into the mix.
In case preloading all the links that a user hover over is too much work for the server, there's also an option to set a delay before preloading kicks in, or to preload on "mousedown". Mousedown is when you press your mouse button (a click is when you release it). This way you still get a slight "magical" speed advantage, and pjax's benefits (notably, no recalculation of scripts/styles on every page change).
For mobile it preloads on touchstart, so you get 400 ms to preload. This is different from FastClick: with InstantClick a user can still double tap to zoom without triggering a link.
As said in the first sentence, the internet architecture can't bring us instant websites today or tomorrow. So I think this — InstantClick — could be a pretty big thing to improve the situation at scale.
The main challenge I see is that existing JS scripts may not work with it out of the box. I don't do much web development nowadays though, so I don't know how big of a problem that is, and I don't know if there isn't any other major barrier in the way to make this mainstream.
That's why I'm awaiting your opinion, smart folks of HN. <comment><USER3> Another idea: take into account the movement of the mouse to define a directional cone in the general direction of the movement, which would enable you to preload your pages even before the hover state occurs.

<comment><USER4> Amazon have done this to improve the performance of dropdown menu. [http://bjk5.com/post/44698559168/breaking-down-amazons- mega-...](http://bjk5.com/post/44698559168/breaking-down-amazons-mega- dropdown)

<comment><USER5> That article says nothing about preloading pages. The speed gains are purely a UI thing -- if you're clever about keeping submenus open even when the mouse leaves the submenu's entry in the main menu, you don't need to provide a delay for menu opening/closing.

<comment><USER6> I think the Amazon example was being used as an example of the "directional cone", not preloading.

</comment></comment></comment></comment><comment><USER7> After looking at the source, one thought I have is that since you are dealing with such small timescales you should use the high resolution window.performance.now function (or the Date.now function for higher compatibility) as a timer instead of using the Date object as you do.

<comment><AUTHOR> Thanks, I'll look into it.

</comment></comment><comment><USER8> I wish there was an instantclick link to this website..

OK, here it is: [http://instantclick.io](http://instantclick.io)

</comment><comment><USER9> Realy Cool, Only real problem with this is if the clicking has side effects like: [http://example.com/?action=logout](http://example.com/?action=logout) as brought up on page.

And probably a ton of other application bugs as style and script stuff wont load. like they normally would

<comment><USER10> Modifying session state should be a POST, not a GET.

<comment><USER11> It ought to be a PUT since it's idempotent but still modifies state.

It definitely should not be a GET, since good practice says that GET is idempotent ([http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html))

Nobody ever follows this since we all want stuff like www.example.com/articles/latest to respond to GET and also have different content depending on time. The distinction is at the core of the REST abstraction and it's an art.

<comment><USER12> Oh, are we talking HATEOAS session support?

        # if you don't have a session token yet
        POST /session-tokens # Accept: application/json
          => 200 {"token": "someuuid"}

        # no cookies set!
        # stuff the session token in localStorage instead

        # now use it
        PUT /sessions/someuuid # with your login details
          => 201

        GET /sessions/someuuid/inbox # Accept: application/json
          => 200 {...}

        GET /sessions/someuuid/inbox # again
          => 304 # wow much cached

        # meanwhile
        GET /sessions/otheruuid/inbox
          => 200 {...} # other user: other memcached prefix!

        # pages that won't change per-user...
        GET /home
          => 304 # can be cached globally
                 # (use JS client-side, not edge-side, includes)

        # and finally...
        DELETE /sessions/someuuid
          => 301 /home # log out!

Basically, a session is just another _resource_ that you create and then manipulate using its sub-resources. This makes all sorts of things easier: creating session tokens and attaching sessions to them (by logging in, or as a guest) are separate steps, so you can throttle logins at the just by throttling access to the token generator. No cookies and no ESI means caching (reverse-)proxies can actually cache. (Note that I'm presuming TLS and hygienic CORS here, so "session stealing" isn't a valid complaint. Or rather, without those things, it's just as valid a complaint for a cookie-based approach.)

Oh, but as a postscript, one little HATEOAS bonus tweak:

        POST /session-tokens
          => 200 {"token": "/sessions/someuuid"} # no constructing URIs!

<comment><USER13> Don't do this in real life. Putting session IDs in URLs is not a good security practice. (Session fixation. Users might try to share links containing session IDs. Session IDs leak out via URL history and referrers; URLs show up in the darndest places.)

Roy Fielding thinks that server-side sessions violate the REST constraint. [https://groups.yahoo.com/neo/groups/rest- discuss/conversatio...](https://groups.yahoo.com/neo/groups/rest- discuss/conversations/topics/3583)

Some people (maybe you) think he's wrong; why can't sessions just be a resource? (And this just goes to show that nobody knows what "REST" really means, and that this question doesn't matter.)

But if you're willing to treat sessions as resources, there are good security reasons to use cookies to refer to them, ideally in addition to a separate non-cookie ID parameter, to prevent CSRF attacks.

Cookies have some performance benefits, too: they can save you round trips to the server. If I want to display fresh personalized session-specific content on my /home page, why should I force the client to download a generic /home page, then download my JS, then run an AJAX request, when she could just send a cookie in the initial request for /home and get back an (uncacheable) personalized response?

<comment><USER12> > If I want to display fresh personalized session-specific content on my /home > page, why should I force the client to download a generic /home page, then > download my JS, then run an AJAX request, when she could just send a cookie > in the initial request for /home and get back an (uncacheable) personalized > response?

Your server shouldn't have to do O(N) units of work to serve a static page to N people. The entire _point_ of GET-idempotency is that you can reduce serving your home page to O(1) units of work _for you_ : you render the page, once, and it gets cached by a CDN, like Cloudflare. This necessitates customization either on the client-side, or not at all. Doing anything other than these is breaking the web[1].

(Besides, you don't necessarily have to do an AJAX request for every previously-would-have-been-customized page. Edge-side-include type stuff (e.g. username+id, viewing preferences) is, literally, what localStorage was created to store. You only have to get that type of stuff once.)

> Session fixation. Users might try to share links containing session IDs. > Session IDs leak out via URL history and referrers; URLs show up in the > darndest places.

As I said, proper TLS and CORS (where things like adding "noreferrer" to all external links is as much a requirement for proper CORS as not loading external images) generally takes care of this.

But you're right, there is a use for cookies. It's not to hold your session token, though. Instead, it's to hold a _client fingerprint token_ , given to the client the first time they speak to you.

A client fingerprint is anything that _authenticates_ a session token. If you say "give me /sessions/foo/..." and you don't send foo's associated fingerprint, the server 403s you at the load-balancer level.

Session fingerprints are already a common concept: some people use the user's IP address, or their browser UA string, or something, as a fingerprint. These have a pretty horrible UX, though, because these things can change unintentionally (e.g. a mobile connection switching cells.) But users expect that clearing their cookies will log them out of things, so the cookie store is a pretty good place to put these. Then, leaking a URL with the session token does nothing, because it doesn't share session secret (the fingerprint), just the identifier.

How is this different from just putting the session token in the cookie store? Mainly in that the client fingerprint doesn't represent _you_ , it represents _your machine._ The point of it is to pair your browser to the server. You can log in and out as many times as you like, but it'll all happen under the same "client."

Note that if browsers actually chose to start emitting a unique, persistent, per-site client fingerprint as a header (like the iOS "Vendor/Advertising ID"), this would supplant the _client fingerprint token_ \-- but do nothing to replace the session token. They're separate things.

Note also that while the session token is part of the URL (and thus part of determining cacheability), the client fingerprint isn't. This should be obvious, but its implication isn't, necessarily: past your load balancer (which authenticates sessions against client fingerprints) _cookies_ cease to exist; they should not be passed to your backend servers. The client, and your backend, operate on pure resources; the client fingerprint becomes a transparent part of the HTTP protocol, invisible to both sides. Gives a much stronger meaning to "HTTPOnly."

\---

[1] And it's not that it's bad to break the web, really; you're not hurting anyone else's site than your own when you do this. It's just that HATEOAS gives you some really great guarantees, and pretty much everyone who throws these guarantees away finds themselves re-building the web on top of itself to try to get these guarantees _back._

Matryosha caching middleware, for instance, is what you're forced to deal with when you're trying to build up a complex view within the scope of a single web request. If you instead just use a service-oriented architecture, where each service that needs information from sub-resources makes requests through the public API of the web server (the same one you want clients to use), you'll get caching automatically, because all the sub-resources you're requesting are inherently cacheable, and thus automatically cached.

<comment><USER13> TLS doesn't address session fixation. (And certainly neither does CORS or the same-origin policy generally.)

Client fingerprinting (with cookies) does address session fixation. But but but didn't you just get through saying how wonderful your solution is because it doesn't use cookies?

If you're happy to use cookies and link them with server-side sessions, then just do that. (Just don't tell Roy.)

And when you need maximum performance, don't force the client to do multiple round trips.

> You only have to get that type of stuff once.

Most visits to public-facing web pages have a cold cache. Maximizing for warm- cache performance at the expense of multiple round trips for cold-cache performance is probably the wrong thing, but only A/B testing and RUM will tell you for sure.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> Awesome work! I just installed this in my own new experimental (read: very low traffic) web app: [http://www.penngems.com/](http://www.penngems.com/)

I set the preload to occur on mousedown rather than mousover, as per the docs, but even with this I noticed near-instantaneous page loading.

<comment><AUTHOR> Thanks for the feedback.

<comment><USER15> Just testing that site (thanks to maxucho for providing the example :) ). Interestingly, even if I hold my mouse button down for a second or two before releasing it, there's still a perceptible loading time of maybe 500ms - 1s.

Not sure if that's expected as part of the design?

<comment><AUTHOR> Definitely not. May you tell me how old is your computer, and which browser/OS combination you use please? Either here or on GitHub: [https://github.com/dieulot/instantclick/issues](https://github.com/dieulot/instantclick/issues)

Also please test how it goes when you press for like 5 seconds.

</comment></comment></comment></comment><comment><USER16> One way I see to move this forward in websites at scale is to run a test where you find out the percentage of hovers that result in a click. Suppose its 90% - that means that 10% of those hovers result in fruitless busy-work for your server. Multiply bandwidth + server cost by 10%, and compare that amount to the amount you'd be willing to pay for near-instant load times.

For many companies (Facebook, Twitter, etc) the desire for instant user gratification is paramount, so the push toward instant browsing experience is a very real possibility. One problem is that most people wouldn't really notice, because these websites load pretty quickly as it is.

One interesting direction is if there was some kind of AI in the background that knows what pages you're likely to visit and preloads them - <USER2> stalking victims would become an instantclick away.

<comment><AUTHOR> Yep, I'd like to get statistics on the additionnal load.

For answering your second paragraph, note that even small gains in speed have a direct effect on user engagement. Google and Amazon have noticed so: [http://www.uiandus.com/blog/2009/2/4/amazon-milliseconds- mea...](http://www.uiandus.com/blog/2009/2/4/amazon-milliseconds-means- money.html)

</comment></comment><comment><USER17> By the way, if you don't want to listen to mouseover, merely listening to mousedown takes 50-70ms off loads [1]. Not ignorable.

[1] [https://github.com/rails/turbolinks/pull/253#issuecomment-21...](https://github.com/rails/turbolinks/pull/253#issuecomment-21247888)

<comment><AUTHOR> You're right. And InstantClick does that too. ;)

</comment></comment><comment><USER18> Really awesome. I was working on something like this myself, but using Jquery ajax combined with history.pushState for partial page loads. This is much better!

There are a couple things that I had on my TODO list that could be handy though:

1) Caching - if you hover back and forth over two links, it will keep loading them every time. Dunno whether this can be alleviated or not.

2) Greater customisability. It'd be great if I could customise whether it was a hover or mousedown preload, on a per link basis. Some links benefit from hover, others it might be overkill.

3) Lastly, it would be cool if it could link up with custom actions other than just links. For example, jquery ajax loading a fragment of html to update a page. This is probably lower down on my priority list though, as the full page prefetch works remarkably fast.

Keep up the great work!

<comment><AUTHOR> Thanks.

Caching can be done server-side, this is not something I plan to implement.

The last two seems like things that wouldn't be needed very often, so they probably won't make the cut either.

<comment><USER18> Yeah, I didn't know whether it was worth it on the caching, I'd already turned on a 5 second cache-control just to eliminate this kind of quick back-and- forth mouseover on a list ;)

</comment></comment></comment><comment><USER19> While interesting, I think this kind of functionality should be implemented only by browser developers and should be turned off by default. Really, I can wait 1 second until the site loads. What I don't want is some library accessing sites without my permission. I usually place mouse over links to see what URL it points to and I sometimes do not wish to click.

<comment><AUTHOR> It works only with links from the website you're on. When the domain or protocol is different InstantClick don't (and can't) preload it.

<comment><USER20> I don't get the "can't" part. Surely you can load it as an image or iframe?

<comment><AUTHOR> Sure, I meant "preload" in the InstantClick sense: getting it ready to replace the DOM.

</comment></comment></comment></comment><comment><USER21> I have an even better hack. Since most blog posts / articles are nothing more than a bunch of text, I simply download all articles in a single fetch when the initial page loads. I do this using a CouchDB view that returns all blog posts in chronological order. All successive link clicks don't hit my server (unless there's an image in the article that needs to be loaded). Check it out: [http://pokstad.com](http://pokstad.com)

<comment><USER22> FYI [http://pokstad.com/db/75253f5cc6fda4538c5f9116407d0b4c/index...](http://pokstad.com/db/75253f5cc6fda4538c5f9116407d0b4c/index.html) is broken. [Object object]

<comment><USER21> It's still under active development ;)

</comment></comment></comment><comment><USER23> Prefetching really shouldn't be blindly applied to everything as users may have bandwidth limited. Even though your implementation is better than browser prefetch on users it does take the choice away from the user unless individual sites make it easy for users to opt out.

<comment><AUTHOR> I think that if you stop hovering fast enough and the request is cancelled, you'll end up only sending headers, thus not affecting bandwidth that much. Not sure though.

If not the case, note that it's just HTML we're wasting. In the grand scheme of things it seems to me it would not have that much of an impact on bandwidth usage.

<comment><USER24> I think it may impact on the bandwidth usage on mobile significantly.

<comment><USER25> On mobile you don't have a hover state so surely this would be less of an issue.

<comment><USER23> Mobile as in PC over cell network you do.

</comment></comment></comment></comment></comment><comment><USER26> Doesn't Chrome already do something like this?

<comment><AUTHOR> You may be talking about this: [https://developers.google.com/chrome/whitepapers/prerender](https://developers.google.com/chrome/whitepapers/prerender) Or this: [https://developer.mozilla.org/en- US/docs/Link_prefetching_FA...](https://developer.mozilla.org/en- US/docs/Link_prefetching_FAQ)

The main differences are that InstantClick preloads just before you need a page, so you can be more liberal in what you preload. Also pages are more recent, useful if you're serving dynamic content.

</comment></comment><comment><USER27> This is very cool!

One interesting reaction I had: things loaded so fast that I didn't notice one of the page changes and thought it was stuck. For sites like this one where different pages look very similar, maybe it could be worth experimenting with some sort of brief flashing animation (to make it look like a real page load)?

<comment><AUTHOR> Yes, I was thinking about something in the like of NProgress: [http://ricostacruz.com/nprogress/](http://ricostacruz.com/nprogress/) If the page is displayed instantly, show a complete bar that disappears. (I'm not sure if that would solve the problem, I may explore different solutions.)

</comment></comment><comment><USER28> Note that the author, Alexandre Dieulot, opted generously to release this under the MIT license (thanks buddy).

[https://github.com/dieulot/instantclick/blob/master/LICENSE](https://github.com/dieulot/instantclick/blob/master/LICENSE)

</comment><comment><USER29> i still don't understand why in 2014 it's not possible to have an entire website with all it's files zipped and shipped as it is on the first request. how wasteful is it to have 50 requests for a server just for images and resources? have your root domain be a zip file of everything you need to view it, and then include some additional popular pages along with it. it can't get any faster than that

<comment><USER30> Well, why not? You can inline everything (including images with data:// URIs) and zip it up. Apache can serve the static zip file to browsers that support it [http://stackoverflow.com/questions/75482/how-can-i-pre- compr...](http://stackoverflow.com/questions/75482/how-can-i-pre-compress- files-with-mod-deflate-in-apache-2-x)

</comment></comment><comment><USER31> I'm not sure it's working for me, I don't see any special network activities in Firebug while using the website.

Also, you should take into account the focus event of links, I tried and it seems you doesn't when trying on the "click test" page to tab tab tab on the test link and then hitting enter.

<comment><AUTHOR> Focus isn't used a lot, so it's not worth the extra complexity in code.

<comment><USER31> I don't know how instantClick is implemented, but to me attaching some callback to a second event is not added complexity, it's just a few duplicated lines of "administrative" code.

</comment></comment></comment><comment><USER32> Nice! I used pjax for a Chinese-English dictionary project, and it was nice, very very fast.

As you mention with JS scripts not working, I had to do things like rebind functions when pjax finished, or load new JS snippets along with each HTML (page) snippet. Not too huge a compromise.

</comment><comment><USER33> Isn't this what link rel="prerender" does? [https://developers.google.com/chrome/whitepapers/prerender](https://developers.google.com/chrome/whitepapers/prerender)

<comment><AUTHOR> Nope, see my comment below: [https://news.ycombinator.com/item?id=7201537](https://news.ycombinator.com/item?id=7201537)

</comment></comment><comment><USER34> I would be hesitant to rely on mouse input, or even touch input. Think about things like screen readers and accessibility and you'll quickly learn there are many ways people browse the internet.

<comment><AUTHOR> It should degrade. No mouse/touch: just pjax, without preloading. No JavaScript or no pushState: standard hypertext behavior.

</comment></comment><comment><USER35> The tricky thing with all of these (pjax &c.) is that by loading with JavaScript, you lose progressive rendering, so while reducing latency you may actually lose perceived speed.

<comment><AUTHOR> Correct, this can actually be detrimental for low-bandwidth users, or if the website have enormous pages.

</comment></comment><comment><USER36> So this is like a fork of TurboLinks? I've made this thing myself for website I use in couple of minutes. I would probably not rely my whole website on this plugin.

</comment><comment><USER37> Is there a demo page? I want to see what it feels like.

<comment><AUTHOR> The website it is.

<comment><USER38> Good stuff, but I don't think this website is big enough to demo the benefits, maybe a heavier website is needed. A properly configured web server as well as the right HTTP headers will give you the same speed, _perceptually_.

Also you might want add some kind of tracking to avoid making repeat requests (probably within a timeframe). For e.g. hovering one link, then changing your mind, then going to another link. The browser will smartly pull it from its cache but this lib is still making the requests.

<comment><USER39> I just added it to my database driven website that is run off shared hosting: [http://coloradocsas.info/](http://coloradocsas.info/)

It doesn't _feel_ that much faster, but I'd love a way to verify speed changes with data.

<comment><USER40> I'm watching via the dev console and don't see any requests being sent out on hover. Are you sure it's working?

<comment><USER39> I took another look and I wasn't doing the init(). I am now, but it still doesn't appear to be working. Not sure why.

<comment><AUTHOR> You'll need to enable blacklisting, see [http://instantclick.io/start.html#whitelist_blacklist](http://instantclick.io/start.html#whitelist_blacklist)

Sorry, my copy was previously unclear about that point.

</comment></comment></comment></comment></comment></comment></comment><comment><USER41> > before clicking on a link, you'll hover over it.

unless you use vimperator or similar. the demo handles this though, giving a hover time of infinity.

</comment><comment><USER42> Does it work with SPA, particularly using AngularJS? (Essentially what's needed is the "prefetch on hover")

<comment><AUTHOR> I haven't tested, but I don't think so. Creeping in the standard browser behavior is easy enough, but an SPA may likely need to reimplement InstantClick's logic specifically for it.

<comment><USER43> Yeah, just tried it. Does not work with angular SPA.

</comment></comment></comment><comment><USER44> Wonder what happens for website with zillion of visitors per day. Could all this preload impact on servers?

<comment><USER45> Predictive prefetching (similar to the work here, but more aggressive) did impact the servers on a zillion-visitors mobile commerce site at first, but it's fine now. Tuning helps.

More than scaling, the larger headaches come from migrating all your existing logging to account for preloading versus impression hits.

<comment><USER24> Oh, good point. CPC is based on the user clicks, i.e., fetching.

</comment></comment></comment><comment><USER46> Am I correct in assuming that touch interfaces can't benefit from this kind of architecture?

<comment><AUTHOR> You are. Preloading on touchstart is something that I plan to work on soon though.

<comment><USER47> It's not really a hardware limitation. The Galaxy S4 can detect an almost touch but there's no browser event for it.

</comment></comment></comment><comment><USER48> Wouldn't this ruin usage stats?

<comment><USER49> Careful. Usage trumps usage stats. If the user experience is better, the stats will adapt.

<comment><USER50> It doesn't trump the ability to record stats. When it comes to business there are certain things you can't do without, for most sites (that are big enough to matter) stats are absolutely required, no improvement on usage would be worth losing stats for.

(Not talking about this project in specific as it seems stats can be made to work with it, just replying to the idea in your comment.)

</comment></comment></comment><comment><USER51> I have problem understand "instant website",

can you provide some specific definitions? thank you

</comment><comment><USER52> Have you considered preloading all of the links while the person is reading the page?

<comment><AUTHOR> For sure. But you get way less bang for your buck that way.

</comment></comment><comment><USER53> Any demo? I mean, a implementation in a real web, like a blog or something like that?

<comment><AUTHOR> Unfortunately none that I know of.

</comment></comment><comment><USER54> Very nice. It would be great if the JQuery Mobile folks would integrate this.

<comment><USER55> Good idea. Pre-Loading a page when you hover a link with your finger.

</comment></comment><comment><USER56> Does this require server components? Or does it also work with a static site?

<comment><AUTHOR> It just requires the 1.6kb JS file. :) So yes, it works on static websites (instantclick.io is hosted on GitHub Pages).

</comment></comment><comment><USER57> In theory you could write a chrome extension and use it for any site, right?

<comment><AUTHOR> Sort of, see my comment below: [https://news.ycombinator.com/item?id=7201725](https://news.ycombinator.com/item?id=7201725)

<comment><USER57> Cool, and it only works on GET responses right? So I don't have to worry about hitting "Delete" or "Save" on a web app by hovering.

<comment><AUTHOR> Right. If the "delete" or "save" button isn't a link it won't get preloaded.

</comment></comment></comment></comment><comment><USER58> Is it possible to make it a Chrome extension and use it on all sites?

<comment><AUTHOR> I think it is possible for a subset of websites (because you can't preload all links by default, some trigger an action such as a logout), that's an idea I had in mind.

<comment><USER58> I pasted the js code into a userscript.

Works great! I hope I won't have too many accidents with it.

I remember using 10 years ago a similar Windows program that preloaded all links.

</comment></comment></comment><comment><USER59> Awesome ! I can't believe I hadn't thought of this before.

</comment><comment><USER60> Does it support /#!/ (hashbangs) or just pushState ?

<comment><AUTHOR> Just pushState.

</comment></comment><comment><USER61> I couldn't manage to see anything special.

</comment><comment><USER62> This is really cool! I'll try it out.

Thanks for sharing :)

</comment><comment><USER63> This is fantastic - will definitely use this!

</comment><comment><USER64> Love it! Will it only work on html5 sites?

<comment><AUTHOR> It works with every websites.

<comment><USER65> Flash?

<comment><USER66> Flash in 2014?

</comment></comment></comment></comment><comment><USER67> Extra kudos for not using jQuery!

</comment><comment><USER68> >Click − Hover = ∞

>Click − Mousedown = 2 ms

>Click − Touchstart = ∞

I win!

</comment><comment><USER69> umm like 40% of traffic is already touch, seems too late

<comment><AUTHOR> Preloading on touchstart is planned.

Also note that percentages like that don't tell the whole picture; non-touch traffic hasn't decreased by "like 40%".

</comment></comment><comment><USER70> Is there a demo?

<comment><AUTHOR> The website it is.</comment></comment>


The Big Banks - <AUTHOR> https://www.simple.com/blog/Banking/the-big-banks/ <comment><USER2> I like how I got to the site, get a 1/2 second flash of the article which is then covered up by a full screen popup telling me to enable javascript (I use noscript). I just wanted to read the goddamn article!

<comment><USER3> I came to the comments just to bemoan this as well.

I see this pretty often and I have a tip for developers who really want to insist on JS without infuriating their visitors: Don't let me see the site work before intentionally breaking it to try and force me to be tracked by your marketing code.

</comment></comment><comment><USER4> Is anyone sort of thinking that Bank Simple is sort of like Diaspora in some essence? They certainly have a presence and are vocal about their plans, but seeing any actual product from them seems to get pushed out further and further?

I was one of the first to request an invite. I needed/wanted to switch banks. It has been a really long time and nothing with Bank Simple saying "coming soon".

I think these delays are narrowing their potential customer base. People dont wait forever to switch banks because one bank is saying they will be better. They switch immediately because usually it is urgent, feed up, etc. They dont tend to switch on a whim, IMO. They decide that their bank is good enough and avoid the headache of switching institutions, changing direct deposit, auto payments, etc.

Reading these periodic blog posts seems a way to keep up hype in the absence of really letting people see the product and be eager to switch.

</comment><comment><USER5> _failures of large banks can be most devastating in small communities where all other banks have been subsumed_

Citation needed. Isn't the FDIC's insurance enough to cover most of these people? The risk is not in the bank failing; it's in the bank succeeding. If a bank is the only bank in the market, customers have no recourse when the bank lowers their interest rates on savings accounts or adds random $5 debit card use fees. That's the risk in one bank becoming too big.

</comment><comment><USER6> _Between 1980-1998, almost 8,000 small banks were acquired by larger institutions in the US._

Incredible.

<comment><USER7> How is ~420 acquisitions a year in a large industry amazing? Google, Facebook, Microsoft, Amazon and Cisco probably average over 100 a year between them and they are unlikely to be 25% of the tech industry total. Simple's blog post, at least, doesn't say how many small banks existed in 1980 or 1998 so we have no idea how this changed the small bank landscape. Oddly it does say that the number of large banks declined by 50% but I bet a lot of that was taking over failing banks.</comment></comment>