Google's new program to track shoppers sparks a federal privacy complaint - <AUTHOR> https://www.washingtonpost.com/news/the-switch/wp/2017/07/30/googles-new-program-to-track-shoppers-sparks-a-federal-privacy-complaint/ <comment><USER2> Unfortunately, credit card companies/banks/etc have been selling purchasing histories, to pretty much all comers, for years.

It'd be really nice if we could stop _that_ instead of caring about the particular people they sell it to.

IE It's not "better" when they sell it to someone who isn't Google, and I honestly could't give a crap about the complaint, which mostly deals with antitrust.

<comment><USER3> Visa is working to prevent people from using cash in stores [0]. Currently, they are merely giving merchants an incentive to change, but in the future they may use their immense lobbying power to get preferential legislation enacted.

Once cash is gone:

1\. your purchases will be available to any company willing to pay for it, and

2\. Visa will get a de facto "tax" on all transactions (through 1-2% merchant fees)

[0] [https://www.wsj.com/articles/visa-takes-war-on-cash-to- resta...](https://www.wsj.com/articles/visa-takes-war-on-cash-to- restaurants-1499853601)

<comment><USER4> NB that handling cash isn't free either. You have to pay someone to count it, secure it, and steal it (you are arguably not intentionally paying people to steal cash, but shrinkage is certainly a cost of doing business in cash).

I've seen estimates that the cost of handling cash is actually higher than the interchange fees that Visa charges. This generally counts things like armored truck services, time spent counting cash (probably multiple times), time spent delivering cash, dealing with registers, etc.

<comment><USER5> Well, there is a third even better option, don't charge insane fees to finance ridiculous gimmick programs that for the vast majority of people never have >=1 RoI.

Interchange fees for CC are capped at 0.3% and 0.2% for debit in the EU. No 20 cards in every wallet, black pink yellow variations, no "yes VISA but not MasterCard" sillyness. Honestly even the cap of 0.3% is still far too high.

<comment><USER6> > no "yes VISA but not MasterCard" sillyness.

Is there anywhere that is actually a thing? Very rarely I see a place that won't take Amex, but no visa or mc?

<comment><USER7> > I see a place that won't take Amex, but no visa or mc?

Lots of places won't take AmEx or Discover (some of the highest fees in the business.)

CostCo currently only takes Visa (no MC.) Sam's used to only take Discover. It's rare, but it happens. In this case it's also only for "credit" purchases, "debit" is ok for any card, but the fees are way less for "debit" than "credit".

<comment><USER8> I've only run into one place in 2 years of having a Discover card that wouldn't take it, seeing Amex not accepted is rather common.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> > Google called its advertising approach "common"

Tragedy of the commons. At this point in time, any and all forms of data collection have become common. When I visit a website, I expect them to collect everything about me - my IP, my mouse movements, what I clicked, how long I took to click it. Just a matter of time, that they start tracking audio and visual cues as well. It's unthinkable today but we will get there. It will enter slowly in the form of alexa and google home. then a browser plugin. Then a browser integration. Then a web api. And to cap it all, everyone will claim how it's made their life better.

<comment><USER10> I wonder if you're using the term as a poetic device, but as far as I know that's not what Tragedy of the Commons means.

Commons are properties without private owners. The tragedy is that because no one individual owns it, the people that use it use it without care to its maintenance believing that it is not their responsibility.

<comment><USER11> This is still sort of the same thing. The blame can't be pinned on one single entity because it is so common.

</comment></comment></comment><comment><USER12> Try as I might, I just can't be bothered to care if someone wants to know what I've been buying so they can show me advertisements relevant to my interests.

But I'm weird, I don't think advertising is inherently evil or annoying.

<comment><USER13> Do you want it to be sold to your insurance company? We see that you're a regular coffee drinker which is correlated with increased risk of heart problems -- here's a rate increase.

<comment><USER14> Maybe we'll get universal healthcare at some point and people will stop rolling out this tired argument.

<comment><USER13> Okay, how would you like your purchase histories to be used to determine your wealth and companies charge you more for goods and services because they know you can afford to.

"I'm sorry sir, our system says your wealth rating is 600, our discounts only apply to people with 400 or lower."

<comment><USER15> We already see this with how airlines alter the pricing depending on when the ticket is bought and whatsnot (because if it is bought for a middle of the week trip etc, it is likely to be a business trip).

<comment><USER16> But the key difference is that applies to everyone who wishes to make that purchase, not just particular people.

</comment></comment></comment></comment></comment></comment><comment><USER17> It's kind of ironic that a news paper owned by Amazon's CEO is publishing articles about Google violating customers privacy

Not that it's not a valid complaint, just interesting

</comment><comment><USER18> Credit card companies and retailers have sold anonymized purchasing data for years to help companies analyze online ad clicks to offline spend.

Auto companies have used Polk vehicle registration data and data aggregators to match a vehicle purchase to the user's online ad clicks. They compare how showing ads for certain models influences your car purchase (ex. Honda CRV) from your initial search (best family sedan) and demographic info (FB data indicates you are an avid runner, 2 kids, 1 dog, etc..). Retailers employ a similar model for basket size.

There are partners like Oracle Data Cloud, Nielsen Catalina Solutions, Neustar and LiveRamp (ex. IdentityLink [http://identity.liveramp.com](http://identity.liveramp.com)) that provide similar data for O2O measurement.

</comment><comment><USER19> I actually also filed a complaint with the FTC about this program. Nobody wrote an article about me though. :( (In fairness, this appears to be an actual legal case, not just a 'complaint'.) I was particularly perturbed that Google made it clear they had access to my credit and debit card data even if I do not grant them permission to have it.

My guess is somehow I have given the credit card companies permission to sell it, but it feels like my entire purchase history attached to my personally- identifiable info enough to tie it to a Google account really shouldn't be legal to sell.

As a note, filing privacy complaints with the Federal Trade Commission is surprisingly intuitive, and I highly recommend people familiarize themselves with the system and use it liberally.

<comment><USER20> Has the FTC contacted you to follow up on your complaint? Just curious what process is like.

<comment><USER19> Not as of yet. (Filed on May 23rd, got a generic "we received it" email on that date.) It is possible that filing a complaint is akin to screaming into the void, but it made me feel better that I filed it. Presumably if a lot of people file complaints on the same topic, they might notice.

</comment></comment></comment><comment><USER21> I see ads on facebook related to purchases I make with a specific credit card. I have no indication which party is supplying this info to whom and how they made the connection to my facebook account.

</comment><comment><USER22> Previous discussion on this topic: [https://news.ycombinator.com/item?id=14406583](https://news.ycombinator.com/item?id=14406583)

Opt-out (I believe) happens at the credit-card level, per [0][1].

[0] [https://www.engadget.com/2017/05/23/google-track-shopping- tr...](https://www.engadget.com/2017/05/23/google-track-shopping-trips-ads/)

[1] [https://www.consumer.ftc.gov/articles/0222-privacy- choices-y...](https://www.consumer.ftc.gov/articles/0222-privacy-choices-your- personal-financial-information)

</comment><comment><USER23> WaPo has the same power: they know what customers buy. They're owned by Bezos which owns Amazon. How are they different ? Why would Google's data be more prone to hacking than Amazon's ? This article is pretty hypocritical.

<comment><USER24> Bezos owns the Washington Post, but as far as I know there's no connection to Amazon or integration with Amazon. He owns it as an individual.

Publishers in general have very little visibility into user behavior, since they rely on third-party tracking tools and third-party ad engines.

<comment><USER25> For about 8 months (Dec 2015 to the end of July 2016) I got daily emails from Amazon with free articles from the Washington Post. Information on this is sparse, so I don't know why it started or stopped.

Prime members also get a free six-month trial period, followed by a discount on a subscription -- $3.99 / month [0], as opposed to the standard $10 / 4 weeks (or $99/year) [1].

[0] [https://www.amazon.com/dp/B072MHQFJ1](https://www.amazon.com/dp/B072MHQFJ1) [1] [https://subscribe.washingtonpost.com/](https://subscribe.washingtonpost.com/)

</comment></comment></comment><comment><USER26> One philosophical question I have been wondering recently is whether this problem could not be addressed by removing "real life" identity from the equation.

I don't think personalized ads would be nearly as obnoxious if I knew that the ad matches my browsing history but has nothing to do what name shows up on my passport.

Most of what people seem to take issue with is their personal identity in addition to the tracking.

The tracking for the purposes of relevant ads would be identical from the perspective of the advertiser (efficient/profitable) but much more private for the user.

</comment><comment><USER27> > To do this, Google said it had obtained access to the credit and debit card > records of 70 percent of U.S. consumers.

After reading the initial article in May, I called American Express and they swore up and own they don't sell my purchased data. I don't see how you get above 70% without data from American Express.

So who's lying?

<comment><USER28> American Express has a pretty small market share (7.5%)

[https://wallethub.com/edu/market-share-by-credit-card- networ...](https://wallethub.com/edu/market-share-by-credit-card- network/25531/)

<comment><USER27> Am I reading it wrong? The chart makes it look like Amex has 23%.

<comment><USER28> I'm referring to the cards in circulation number. The original claim was about a percentage of consumers, not a percentage of transactions so to me that is the more relevant number.

Either way, 100% - 23% = 77% which is > than 70% so the point stands. Visa + Mastercard alone are over 70% using the purchase volume numbers

<comment><USER19> Yeah, when Google said "over 70%", I basically just figured "Okay, so they have Mastercard and Visa." Amex and Discover are both tiny comparatively.

</comment></comment></comment></comment></comment><comment><USER29> Good, but it would be better if they ask what kind of data is sold to any party

</comment><comment><USER30> Privacy centric Cryptocurrencies is the solution rearing it's head. Zcash. Btc.</comment>


Escaping the SPA rabbit hole with modern Rails - <AUTHOR> https://medium.com/@jmanrubia/escaping-the-spa-rabbit-hole-with-turbolinks-903f942bf52c <comment><USER2> I have nothing against SPAs for complex UI interactions. It's sort of like taking anti-biotics; there should be a moment of reflection when you should justify your true need, lest the cure be worse than the disease. Most developers of a certain age have come up when it's SPA by default, and can't truly defend why they need it.

In this thread, there are several claims that it's impossible to write well- organized jQuery. That sounds an awful lot like dogma to me. Also, your inability to write well-organized code says more about your coding and team- management skills than it does about any one approach. Any tech is only as good as the team using it.

A few years ago, Sam Stephenson (who originally wrote the Prototype library, before jQuery was a thing) gave an excellent talk on Turbolinks at RailsConf. I recommend the whole talk (turn it up to 1.5x speed, of course) but at 4:12 he does an amazing job of showing how the SPA path leads to insanity.

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

Here's a mental exercise for you: the next time you start a new project, instead of deciding which SPA framework to use, start with an assumption that an SPA is wild overkill for the first iteration of your application - especially if few people on your team have working expertise with the SPA in question. Then see if you can argue FOR the tech. It's much harder to justify something you don't need if you start with an honest conversation about how you probably don't need it. (This works for throwing out CDs, too: start with the assumption that they are all garbage, they all go. Then force yourself to make logic-based arguments for each one you keep. Your outcome will be night and day from if you start with everything in a keep pile.)

<comment><USER3> As a user my main beef against SPA is that most of the time they break basic browser functionalities, like the ability to open links in a new tab, or using the back button. When the UI doesn't simply break with part of the content off-screen.

<comment><USER4> Having built some SPA's, I'd argue that at least those two things that you mentioned are the fault of whoever built bad SPA's, rather than issues with SPA's as a whole. It's possible to build an SPA that works well with the browser controls because modern browsers expose a lot of their functionality to JavaScript (like it or not). You can use <a> tags for buttons and links in an SPA (and keep the link functionality) -- you can just intercept the clicks when the link is being opened in the current tab, and you can always hook onto pushState/popState to make the back/forward button work.

<comment><USER5> Would you say Youtube works better now as it is fully SPA?

<comment><USER6> There's an army working on YouTube, and it has the traffic levels to justify the investment. They can actually put in the required effort to ensure the application functions seamlessly and meets accessability standards.

</comment></comment></comment></comment></comment><comment><USER7> To the author of the article- Kudos! Well written, well reasoned, with minimal hyperbole or unnecessary "X is dead" style declarations. Hope we see more writing like this bubble up to the top on HN.

I'm not swayed by the argument, but that's personal bias. I'm the technical cofounder / solo coder of a venture backed startup, and I built our platform on rails 5. I migrated our front end to Vue over the winter and couldn't be happier.

When we started (my cofounder and I) our company in early 2017, it had been a few years since I coded daily, and I've never been a front end programmer. I'm not well skilled in JS, so I punted on using any front end frameworks for the first six months. Our entire MVP was rails 5 server side rendered pages, with a dusting of jQuery when needed. It definitely got me as far as I needed it to, but I felt a lot of pain once I began to try to mix in a lot more interactivity in the app. For me, migrating to Vue made a lot of sense and continues to pay dividends. For others, the author's arguments are probably far more applicable.

One area where I deeply agree with the author is around how in JS I often don't know exactly where I should write certain parts of my code. For a long time, I had a lot of model logic in my Vue components, but that quickly became a nightmare and I've abandoned that. Now I use ES6 classes to wrap a bunch of my logic, but even then I still find stuff bleeding places that seem wrong.

One thing I also avoided so far was using any state management (a la Vuex). In some rare examples I use a message bus to send information around, but even then that usually triggers a component to go refetch information from the source of truth (the API endpoint). So far this pattern helps to restrict me from making certain lazy choices which will feel good in the moment but become maddening in the future. My app, as such, is not as maximally performant as it could be, but the trade off for the rare update has so far felt worth it.

So, to sum it up, as a veteran coder who spends 12 hours a day writing code, but knew rails really well and not any SPA frameworks, I'm sympathetic to the article but respectfully have a different experience.

<comment><USER8> > I felt a lot of pain once I began to try to mix in a lot more interactivity > in the app

I don't think you're actually disagreeing at all. You're using the right tool for the job. You started with one job and the right tool, and when the job changed you switched tools. That's as it should be!

Use Rails until you can't. That's what you did and I can't see the author disagreeing.

You can generalise this to most technology. I know someone who has gotten it into his head that he needs to write his entire new web app using golang and microservices. I'd suggest that when he actually outgrows Rails enough to require that then he can suggest it to his 50-person-plus engineering team, but in truth I don't think he'll ever actually finish it.

<comment><USER9> Another plus to this "ramping up" of tools as necessary is when you get to a certain point where your entire UI is sophisticated enough you can cut the views out of your rails app and basically transform it just a REST API with another service responsible for serving the UI layer.

Rails makes a fantastic REST framework, especially if you build your app that way right from the start.

<comment><USER7> Good point, and this is exactly what I did. I actually was running the SPA + the rails app side by side. Took me about 6 months, but I cut over every page / app one by one till I was done.

And, to the parent commenter, good point. I do think the gist of the author is to use the right tool for the job, and they are not dogmatic about "never write an SPA". Thanks for keeping me honest.

<comment><USER10> I'm curious, what was the change in the UI which required the move away from Rails?

What are you accomplishing with Vue which was impossible before?

Would love to get a glimpse of the app.

<comment><USER9> I'm not the OP, but here's how my Rails app is growing after several years:

The first "complex" UI design that we came up with was creating a list view that came with all the trinkets you'd want from a sophisticated list view (pagination, sorting, filters, searching). This view needed to be able to apply easily to all the key data structures our app uses (list of users, list of things user has, list of things users do, etc) which meant due to the scale of some of the data sets most of the operation work needed to be on the backend.

Originally, it was built as a completely normal Rails view requiring a full page refresh (form submit) to perform any given operation. This certainly was "doable" but not a great experience as someone administrating lists of things in our app.

We then wrote a React component that manages all the visual state itself based on the data returned from the backend and replaced the existing Rails view with this React component. By pushing responsibility of view state to the client our Rails codebase get simplified. React fully manages visual state, but where we really benefit is the fact that it forces you to design components in such a simple way that UI abstractions become more naturally fitting. The conventions are easy to understand and result in a codebase that can have a lot of cooks in the kitchen without too many problems.

Could this be written in jQuery? Sure. If it's like most large jQuery projects I've seen with multiple hands on it, it will be hard to keep it from being too brittle.

The implementation is really part of a longer term plan to begin building out new user interfaces in React. We find that react delivers on the promise of UI reusability much better than any backend MVC frameworks view or partial system. A front-end codebase is starting to emerge with it's own developer conventions and processes that are more geared towards frontend requirements. Meanwhile, our backend is simplified to only deal with tasks related directly to data management. The split feels very natural as the codebase grows larger. There is no obvious downside to writing in React besides the minified library code payload.

As a summary: our users expect interactions with complex interfaces to respond quickly. React is designed to build interfaces that fulfill that expectation, and the implementation of React in our codebase allows to slide into a more microservices looking architecture in an organic way as the scale and complexity of our app increases.

</comment></comment></comment></comment></comment></comment><comment><USER11> Are you building a website? The practices espoused by the author will be ideal.

Are you building a web app? Will you have a mobile client alongside your web app? Using a javascript framework for your client(s) and decoupling your data from it's presentation will be a fruitful investment. All of these frameworks and their associated happened for reasons, and they didn't involve traditional MVC being good enough for everything.

As an aside, I find this viewpoint prevalent in the Rails community and the Rails job I had (so, caveat, I'm coloured by my personal experience). It also lead to a culture of staunch refusal to learn or do anything new in that job, and the quality of the product suffered. It consequently led to me leaving the job, and being much happier for it.

<comment><USER12> > It also lead to a culture of staunch refusal to learn or do anything new in > that job

I find one of the most difficult aspects of software is the very powerful "local minima" of effective (but not optimal) techniques combined with entrenched knowledge. People are so incredibly biased towards what they know well, and that bias is backed by objective evidence: when they do it X-way they are objectively faster AND better, and what's more, X-way has many objective benefits. This is the local minima in a vast multidimensional space of the benefits and tradeoffs of different possible technical approaches. The multidimensional problem of overall comparing X-way with Y-way is nearly impossible to accomplish, so we nearly always fall back to our intuition (aka bias) which nearly always leads us back to what we already know. And consequently most organisations are stuck in some version of a local minima that is very hard to escape, but ultimately represents a big disadvantage over time. But the question of when is the right time to move out of that minima - and incur the expense of navigating the hills between where you are now and the better minima - is really hard to solve.

<comment><USER8> I totally agree, but I thought it was funny that you invoked the concept of local _minima_ \- I have only ever heard that concept in terms of local _maxima_ , ie locally-but-perhaps-not-globally maximal productivity, comfort zone, etc. I assume you are referring to a locally/globally minimal resistance, time taken, or some such?

Anyway I just thought it interesting that you might make valid reference to a very useful concept I've heard and used many times, and yet in your expression the "polarity", as such, is totally inverted! And yet I understood you anyway. A computer would be totally confused.

<comment><USER13> Local minima come from optimization problems as you encounter for example in Machine Learning. You usually want to minimize some error function (e.g. misclassified objects). Unless you take great care these functions are riddled with local minima where naive optimization gets stuck.

<comment><USER8> Ah I see - of course. Should have thought of that.

For comparison, I believe my usage arises from evolutionary fitness, where one might discuss local maxima on a fitness landscape. The challenge is perhaps much the same as in ML, with one strategy being to introduce random mutations in order to escape the same kind of trap.

</comment></comment></comment></comment></comment><comment><USER12> I have to admit, I do not know Turbolinks well, but I feel like the author misses something fundamental about the benefits of modern frameworks. It's not just about building a giant SPA - component-based design is a huge value proposition.

The problem I see at the moment is that client side "apps" \- however they are rendered - hit a wall in complexity that is really hard to overcome without a a sane and sensible way to break them down into pieces. Just like every sane regular programming language has concepts of classes or modules or some kind of system for divide-and-conquering problems into pieces, your front end needs that too once it gets complex. And that's what these React/VueJS frameworks are doing for me. What I like is that they make the _right_ solution - breaking a piece of logic or code into its own component - the _easiest_ solution. So I tend to _do the right thing_ , not because it's "the right thing" but because it happens to be the _easiest thing to do_.

I know this is a bit of a parallel argument with respect to whether you build a SPA or not (especially Vue can live in either world just fine). But I feel like the author is throwing out the component-baby with the SPA bathwater.

<comment><USER14> Components aren't a well defined thing. Most people mean "React class" when they say component. React apps are much more than components. Some components have their own state, some don't, some touch global state, routing and data fetching are often not components.

"Component" web apps are by no means simple.

</comment></comment><comment><USER15> > For your SPA logic, you will want a rich model of objects that represent > your domain and its rules. And you still need the same for your server > logic. And this recipe is just a duplication waiting to happen.

Great article overall but one premise I question is: how often do you really need a non-jQuery JS framework at all in the client?

It seems to me that most apps are simple CRUD apps and server-side rendering is sufficient. Sprinkle in jQuery for simple client functions. Use jQueryMobile for the SPA framework which improves performance by making an AJAX request for any navigation and replacing the page body (instead of doing a full page reload).

I recommend only moving to a full non-jQuery based framework if the design or functions require it (and question that) or the app evolves to require it. As fast as computers, phones, and the internet are today, doing server-side rendering seems good enough for most apps.

<comment><USER16> In jquery programming there's a huge difference between how the stuff that shows up when loaded is programmed (on the backend) and how the changes you make after it's loaded are programmed. This leads to a lot of weird inconsistency if you're doing anything more than showing and hiding existing content. Also, with jquery everything involves a lot of imperative programming and stashing state in random places in the DOM. If you're doing anything more complex than drop downs and modal windows, use a frontend framework or your code will devolve into a huge pile of spaghetti.

<comment><USER17> It's not necessarily the case that jQuery code devolves into a huge pile of spaghetti. It's very possible to stay organized without a framework, even for fairly sizable JavaScript apps. It takes a bit of foresight and thinking ahead and discipline, (usually resulting from having written piles of spaghetti in the past). But most large jQuery in the wild is indeed spaghetti, with that I will concur.

<comment><USER16> Yea, you can write your own framework to avoid it becoming spaghetti. But most developers are going to mess it up. I've seen a lot of bad jquery apps and a lot of bad react apps. The bad react apps, they might be hard to understand, but at least they behave consistently.

</comment></comment></comment></comment><comment><USER18> Without any input from me and several other js devs in our org, it was decided that we'll do a complete rewrite of our Ember.js app in React. The primary reason stated was hiring and the secondary was build times. The first should have been performance but they've been pretending like performance doesn't matter and that it's good enough. It's not.

Since it's easier to develop, our backend admin system is built in .NET's MVC framework and it's lightning fast compared to our frontend. Like ridiculously fast. I'm not currently a backend dev but I have extensive experience with Rails and I've seen the same with Rails. It's fast.

Despite the fact that I'm a front-end dev and it's not in my best interest, my un-requested recommendation was to do the rewrite in MVC, thus delivering everything from the server side. Here are my stated reasons:

• The site will load and responds incredibly fast

• The "build time" problem disappears

• The "hiring a lot of specialized javascript developers" problem disappears

• Backend devs suddenly become full-stack devs

• Deploying is easier

• Testing, both automated and manual, is easier

• SEO is easier

• You can now hire junior developers who are productive and don't create a mess in a new js framework

• It's going to be supported for a long time, unlike the latest javascript- framework-of-the-day

• Our website is a website full of mostly content and CRUD forms, not an app.

We actually have very little "highly interactive" parts of our site and those that we do have can be a light-weight framework or simply a sprinkling of javascript. It should have never been an app in the first place.

If everything had been build in Rails from the beginning, instead of .NET and Ember, we would have been twice as productive with half as many developers and wouldn't need QA at all if we wrote tests.

This opinion was basically scoffed at with no valid counter-arguments given. They will move forward with a complete rewrite in React, which will solve none of their problems, except MAYBE hiring, and likely create more. They'll also probably do it without me. I'm not against SPAs or React when used for the correct reasons, especially considering I've been focused on front-end for the last 5 years, but I am vehemently opposed to bad decision making.

<comment><USER19> I think if the conversion is led by a very experienced React developer this could be a good decision. We decided to write all our sites in React a long time ago and couldn't be happier. It doesn't have to be a SPA because it's React, we have static sites too.

Judging by how your org made the decision without the devs input though, I'm not too confident it won't be disaster. It's depressing but I've been offered too many contracting opportunities to rescue a project after a similar conversion that is a total dumpster fire.

<comment><USER18> No one on the team has ever used React.

</comment></comment></comment><comment><USER20> I was initially skeptical, but this article nails the issues 100%. His experience mirrors my own and I don't think I even had a single place where I disagreed with him.

All I would add is that rails can be made to work wonderfully with SPAs if you're willing to do some metamagical programming to auto-follow standards like JSON API.

</comment><comment><USER21> Replacing the entire body with every request seems a bit overkill. If you want SPA interactivity without moving control to the client side, try intercooler.js

[http://intercoolerjs.org](http://intercoolerjs.org)

</comment><comment><USER22> A very well thought out and articulated article.

I love Rails and the power it offers in development productivity and quality. It's code is very maintainable and actually enjoyable to develop in; even when it's someone elses codebase.

Oddly enough, I finally came upon a use case in a project where an SPA frontend (Vue) / ruby backend make more sense given the platform nature and operational needs (runs on a pi, no "models")

9/10 Rails is the way to go though for developing something.

</comment><comment><USER23> Has anyone used jquery mobile?

It was an amazing project that let you write normal css/html/js without modifications THEN rendered the html+js into a SPA. It was fast, preloaded pages, clean, easy to write and really well documented - and maintained the root dom element. BUT! The project is mainly(opinion) dead. Instead people want to write in a new language (react,vue,etc) then deal with adding a massive layer of complexity.

<comment><USER24> I dunno, my experience was that JQuery mobile was slow, bloated, and glitchy.

Perhaps it was simply ahead of its time, and 2011-era browsers couldn't keep up with it, but either way I much prefer using its successors.

<comment><USER25> This is the first time I've ever heard of jquery mobile described as fast, and I used to work for a medium sized consultancy / agency (as in upwards of 50 front-end devs) that did a lot of projects with it.

In fact, I don't really recall anyone speaking positively at all; at best it was a necessary evil.

</comment></comment></comment><comment><USER26> I wonder how the argument changes if you know you need an API for your mobile application that's almost identical in features to the web page.

If you go the "Rails/Django way" with server side rendered templates and, say, a bit of jQuery for fancy stuff -- you'll end up duplicating lots of code for the API (validation, routing, maybe even business logic).

Anyone got experience with swapping your models/controllers for an API while keeping the rest of Django's/Rails' niceties? (authentication/sessions, Django's forms system, CSRF, etc.)

OTOH having Django/Rails merely as a template system you probably could also go for very simple, self-contained client-rendered JS pages (e.g. .vue files). Not much difference there I guess?

<comment><USER27> I think it should still be possible to seperate view from the service at the backend, even if that means defining more routes. I am talking from the hiccup(clj) point of view though

</comment></comment><comment><USER28> Rails is a deeply flawed framework, and we need to stop using Basecamp as the example of a well designed monolith. Basecamp is terrible software, and the crappiness of the user interface appears to be a direct result of not being able to build rich interfaces as its coupled to legacy Rails designs like this article suggests. Basecamp being fast while getting a trickle of traffic and working with very little data is not a selling point against SPAs (I'm not pro or con SPA).

<comment><USER29> What are the deep flaws in Rails? What's crappy about Basecamp UI?

</comment></comment><comment><USER30> I feel like seeing more and more post about criticisms for workflow or framework that it is becoming unhealthy with the developer community.

There is always short comings on every tool and library, and part of responsibility of a good developer is discerning trade-offs.

</comment><comment><USER31> The main problems addressed in my opinion:

\- Code duplication between server and client side

\- Added complication threw data transmission between server and client (REST/json)

I think, both problems can be addressed by:

\- having (a single) code that works both on server and client-side

\- having transparent transport mechanisms for information between client and server.

I am sure, I could implement such a thing for Python/Django, using the already existing tools. But I am not sure, if such a thing would be appreciated by the community.

What do you think?

</comment><comment><USER32> Using a framework like the F#-to-JavaScript transpiler Fable, along with an application framework like Elmish, provides a really good solution to some of the pitfalls cited in the article (prescriptive architecture, front + back-end code sharing) and gives you some moderately strong type safety to boot.

However, the article author's list of SPA pitfalls is really good, and are probably not all surmountable by a framework/platform.

</comment><comment><USER33> Anyone have good experiences with an SPA architecture?

<comment><USER34> Elm + Scala works for me. I'm using the same elm source with minor variations for both web & mobile (wrapped with cordova). So far, it's been working wonderfully.

<comment><USER35> That's an odd choice given Scala.js, any reason you're not all-in on Scala?

<comment><USER34> The elm architecture removes the need to make decisions when it comes to structuring the app. The tooling is first class. While I'm not sure, I think elm has a larger community.

</comment></comment></comment></comment><comment><USER36> Like others comments , Kudos to the authors.

I'm an SPA Lover ( Angular , Vue ) , but still most of the points raised here a coherent from a back end perspective.

That said , a lot of the arguments are basically summed up as :

"I don't like Front End Dev. because it's not as mature as Back End".

I will not lie on this point , JS is a fast evolving ecosystem that sometimes has issues to stabilize. Hence , there is a lot of marketing and self promotion mixed with frameworks sometimes ( Growth Hacking ) pushing for unnecessary tech that dies a few days after they have leaved the Github Trending page.

For beginners , when a framework reach a certain threshold ( Github Stars most of the time) they feel like they should hurry and use the framework to stay relevant while most of the time they don't need to and the tech is just fluff.

My point here is very simple, you are ROR or Django or ASP.NET dev and you love what you do ? As long as you find jobs keep doing this , don't bother with Full Stack Fluff.

Now that said , I can only encourage the author to do the Angular or Vue tutorial to discover something different. Rails is great ( it's empowering a lot of website Github , Airbnb etc... ) but SPA are different and when used properly it's hard to go back , the experience is delightful.

Most importantly we are getting closer to the serverless era where backend will be completly different from what it is compared as now, and SPA and SSR will likely be the standard in the future.

<comment><USER8> I think you've missed the article's point:

> I don't like Front End Dev. because it's not as mature as Back End

No, he says don't do FE _and_ BE when the tools for back end-only (well, Rails is full stack, actually) are so useful and productive. And in the rest of your comment you seem to forget that a front end is completely useless without a back end.

> you are ROR or Django or ASP.NET dev and you love what you do ? As long as > you find jobs keep doing this , don't bother with Full Stack Fluff.

Rails _is_ the "Full Stack Fluff".

> SPA and SSR will likely be the standard in the future

How, exactly? What serves your SPA? And who is using "serverless" for anything other than querying other backends (eg Slack bots) or accessing AWS services? I mean, sure, it's nice to not have to stand up a server to resize images coming from S3 but it's hardly going to replace, well, servers. You couldn't implement even the simplest CRUD app.

<comment><USER37> Uh, you can definitely implement a standard CRUD app with one of the serverless platforms. You can even throw an entire expressjs application into a lambda function with minimal modification if you want.

<comment><USER36> > You can even throw an entire expressjs application into a lambda function

This is the first general misconception with serverless.

Serverless is not lambda . If you think serverless == lambda, it's like saying cloud == ec2 . You're missing the point of it.

<comment><USER38> than please define serverless for us.

using lambda and its equivalent is - in my understanding - the definition of serverless. You might not be able to utilize the biggest advantages of serverless infrastructure if you combine it with a standard ACID database backend, but it should still be a serverless deployment.

</comment></comment></comment></comment></comment><comment><USER39> I had this same experience. SPAs, especially for small teams and solo developers, hurt more than they help.

</comment><comment><USER40> Turbolinks to the rescue. Slay the Javascript overlords!

</comment><comment><USER41> There was probably a few valid points, but the article was too long with too many flimsy, "try-hard to convince" arguments.

</comment><comment><USER42> Speaking of code duplication in a traditional web app every page is an example of code duplication. How about that?</comment>


Designing a standard sewage network for refugee camps - <AUTHOR> https://monacivilengineering.blogspot.com/2020/09/standard-sewage-network-for-refugee.html <comment><USER2> There seem to be 'standards' as to how to build out refugee camps and SOP for various things:

* [https://emergency.unhcr.org/entry/45581](https://emergency.unhcr.org/entry/45581)

* [https://emergency.unhcr.org/about](https://emergency.unhcr.org/about)

* [https://spherestandards.org/handbook/](https://spherestandards.org/handbook/)

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

Even the humble tarp that meets these standards is more 'advanced' than it appears:

* [https://www.wired.com/2016/01/tarpaulin/](https://www.wired.com/2016/01/tarpaulin/)

<comment><USER3> We used these camps standards to design the sewage system and of course to draw and design the standard camps.

</comment></comment><comment><USER4> For how the US Army does this, see Field Manual 3-34-471, "Plumbing, Pipe Fitting, and Sewerage", especially the sections on "Field Expedient Systems."[1] The Army has been building camps for a while.

[1] [https://www.constructionknowledge.net/public_domain_document...](https://www.constructionknowledge.net/public_domain_documents/Div_15_Mechanical/Plumbing/Plumbing_Army_FM3-34-471.pdf)

<comment><USER3> Good information... But Our project is based on a sewage network for a standard camp.

</comment></comment><comment><USER5> If I read the pipe maps correctly, it seems that the focus of the camp layout is on the sewage treatment facility, which is literally the center of the camp.

In my opinion, the center of the camp has prominence of place, and should be rather a social center of some kind: gathering place, daycare, school, workshops, communal kitchen, sports facilities, something like that.

A camp that elevate sewage treatment above all other concerns could be a grim place indeed. I imagine it should be possible to have an efficient, standardized sewage system that locates the physical plant off in a more discreet place

<comment><USER3> Intelligent comment, the layout 2 has the problem that you are talking about as the sewage is located in the center of the camp, but the layout 1 has a better design as it is half a circle and the sewage could be treated away from the tents accommodation and other activities.

<comment><USER5> Yes... except that with the semi circular layout, the sewage treatment is still in the only prominent place in the camp. All roads lead to the plant. If the city were an auditorium, the plant is squarely on stage. That should still be the place where people gather socially

</comment></comment></comment><comment><USER6> I just recorded a voice memo this morning with an inspired idea related to this. Water in a box, pee into the box, poop into compost bags, collect and restock weekly. I've done manual labor digging trenches, working with construction, all that. Also been homeless for 2 yrs in SF/SV for what it's worth, doing said work (do not have resources for coding interviews, trying to save). With compostable or washable containers, I have no idea why one would make a sewage system in a camp. Being a (former) engineer as well, I can appreciate the thought put into it.

</comment><comment><USER7> For this kind of application, I'm a big fan of this idea [1] (there is a more recent example of something similar out of the UK but I can't find it now). It uses a mechanical "flush" mechanism that basically just individually bags the waste and stashes it below the toilet. When full, the bags are pulled out (themselves in a bigger bag) and just taken to the dump. A great alternative to building custom sewer and treatment infrastructure. There are examples of this kind of tech being used in places (e.g Antananarivo that has slaves that flood regularly) that don't have or cannot easily get sewers installed.

[1] [https://www.bizjournals.com/triangle/blog/2013/12/entreprene...](https://www.bizjournals.com/triangle/blog/2013/12/entrepreneur- to-launch-waterless.html)

<comment><USER8> From the article, it costs $1 per use. And ends with plastic bags full of (maybe sterilized) human waste being thrown in the trash. This is a solution to what exactly? A lack of Toilet as a Service products?

<comment><USER7> > A lack of Toilet as a Service products?

Exactly! What do you think a sewer system is? It it literally a subscription to having your poo taken away, by a method requiring huge capital costs, major maintenance, a monopoly operator, etc. It is a concept with lots of room for exploring alternatives.

</comment></comment></comment><comment><USER9> Why not an elevated latrine over a wheeled removable storage tank that hooks to a pickup truck?

</comment><comment><USER10> Thanks for sharing this! I enjoyed reading about the different types of campes.

I wonder how self-suistainble wrt to cost can it be? Similar to water recycling in ths ISS

<comment><USER3> In the camp, we can add a UDDT to reduce the amount of sewage and to help the recycling process. This will not have a big cost. other recycling methods could also be used.

</comment></comment><comment><USER11> It seems outhouses every block would be a much more simple and economical design. They just require vertical excavation, which can be done by hand if space is constrained but labor is available. When the camp is dismantled (hopefully everyone is resettled quickly) then you just fill it in with dirt.

<comment><USER12> The durability of the infrastructure should be informed by how long the camps tend to exist. My first result is a world bank[1] blog that says it's about 17 years. So a more automated system like plumbing would probably save resources over the long term, but who ever thinks about long term costs of infrastructure for refugees?

[1] [https://blogs.worldbank.org/dev4peace/2019-update-how- long-d...](https://blogs.worldbank.org/dev4peace/2019-update-how-long-do- refugees-stay-exile-find-out-beware-averages)

<comment><USER11> 17 years is much longer than I would have expected. Long term thinking is a good point.

</comment></comment></comment><comment><USER13> > In the design, the slopes of the drainage pipes and the velocity constraints > are selected in a way to have minimum excavation depths, and to have the > flow velocity within its design ranges.

I guess that the goal is to make it cost effective. To dig deeper that the strictly necessary would add durability that a temporary camp does not need and a lot of extra cost.

It would have been nice to know the advantages and disadvantages of each camp design. But, I guess that it was not inside the scope of designing the sewage.

<comment><USER3> Yes of course! It is found out that the circular design layout would be more economic than the hexagon design layout. Although, the circular design has less accommodation area than the latter one. On the other hand, if there is enough land to set up these camps, it would be better to choose the Hexagon design layout as it is more spacious and allow the use of more service facilities.

</comment></comment><comment><USER14> Nice documentation of your use of standards and industry tools. In that way you're ready for professional practice.

Collection design appears appropriate, however an outfall location was not selected?

Collection system design is dependent on topography, do you have elevation data for proposed camp sites? Topography can inform your treatment site and outfall selection.

<comment><USER3> We have chosen the outfall to be in the middle of the circle and hexagonal sewage network. Yes of course, the topography should be first of all determined, this is what we did in the Zaatari camp design. We used Global Mapper to find the elevations, then we determined the outlet (lowest point).

</comment></comment><comment><USER15> One might think that the UNHCR should have experts on hand who have ready made designs for sewage, water and electricity in refugee camps, but then one looks at the horrors of Moria and the other "camps" in Greece.

It is utterly shameful that people in need depend on volunteers taking care of such basic needs. Thanks, OP.

<comment><USER16> The UNHCR wants to move the refugees to destination countries and the local (and national) politicians want the camps gone. The inhabitants of these camps don't want to be there either. None of these groups want the camps to be permanent, so you can see that this type of solution is not wanted or desired. There is a perverse incentive to make the camps "bad" but not "too bad."

<comment><USER3> Original author here: Yes of course, no one wants that the refugee camps be permanent, but as we can see, the camps are used at least for 5 to 10 years, and this is a long period so the sewage network is one of the most important needs to have in these camps that the people could have a safe life there.

In addition, this project could be also used for any type of camp.

</comment></comment></comment><comment><USER17> Who knows more about the tent design shown in figure 15. This looks super versatile, but also hard to repair, build in a factory setting and maybe also unintuitive to set up. I hope this is more useful than it looks. Then it would be great to have such a tent with built in AC and water management.

</comment><comment><USER18> Very interesting.

I wonder if it then makes sense to run additional services such as power and drinking water parallel to those pipes for similar efficiency?

I wonder if camping festivals and conferences such as CCC camp would benefit from this at all?

<comment><USER3> Original author here: yes of course, this project should be improved and many other additional services wil be added. I will also study a camp with UDDT to have a less amount of sewage. The camps in my project contain free areas for agriculture, in addition to a school , a police station, and markets so the camp could be 90% independent.

This project could be applied for any camp. It is basically studied to be applied for refugees camps as they most need it, but it could be used for any camp that has a big amount of sewage.

<comment><USER18> You should see if you can reach out to the Chaos Computer Club for their Camp conference (in theory, running next in 2023). The distribution of utilities throughout their campsite is quite a logistical challenge. I think your work also assumes a nice flat wide open space that you can work with, whereas in that specific scenario there's other obstacles in the way.

Anyway, really cool. Thanks! :)

<comment><USER19> CCC Camp infrastructure is special, and fun, and definitely a great source of real-world experience. The various infra teams now have a decades of experience scaling it up - water, power, waste, internet, each coming with its own set of challenges. The event is full of engineers, such that the level of overengineering increases year by year - last camp, one team even brought and manned industrial dishwashers as a public service! Same goes for similar non- profit events that build their own infra rather than contracting it out to an expensive events company.

Constraints are very different, obviously - the ground can't be dug up, public toilets and washing stations are sufficient, there's some existing infrastructure to partially rely on, and it only has to work for at most ~2 weeks or so. Still, many of the "lessons learned" could be applicable elsewhere and I wish there was time to document more of it.

</comment></comment></comment></comment><comment><USER20> Very Nice project and a very smart engineer, good luck!

<comment><USER3> Thank you dear Aya :).</comment></comment>


GitHub: Issues Dashboard for Organizations - <AUTHOR> https://github.com/blog/959-issues-dashboard-for-organizations

<comment><USER2> Any idea when this will trickle down to github:fi?</comment>


Can bcrypt's computational expense be reduced on the server side? - <AUTHOR> http://www.hashcollisions.com/2011/06/can-bcrypts-computational-expense-be-reduced-on-the-server-side/

<comment><USER2> (as I commented on the site)

        > Account Log-in
        > 6 The browser submits Turing's username and bcrypted hash to SecureR.
        > 7 SecureR directly compares the hash submitted by Turing with the one stored in his user record. If they match, account access is granted.

So, suppose I've stolen the password database of SecureR. Unfortunately, I can't recover the password of the user. However, I only need the hash of it (which is stored in the database) to log in, so I don't need to recover the password anyway.

This does protect against exposing the user's password, so it's not a total waste. An additional wrinkle:

You could store the hash of the bcrypted password in the database. The browser would submit the bcrypted password in 6, and the server would hash it in 7 before checking it. This makes recovering the password infeasible but logging in is cheap for the server, and the input to the hash function has high entropy, so it will still be hard to crack. At this point though, you need a security expert to evaluate it.

<comment><AUTHOR> Robin,

Yes, if an attacker obtained the password database, they could use the password hashes to log in with any particular user's account. They wouldn't need to know that user's plaintext password.

Like you, I'd also thought about storing a second-level hash (a hash of the bcrypt hash). However, I didn't mention it because I don't currently understand the complexity of hash functions well enough. There are at least two issues that come to mind regarding the complexity of the second-level hash function:

1) If we used MD5 or SHA-1, would this cause the same problem Coda Hale warned against? A bcrypt hash would likely be longer and more complex than a typical user-defined 6 character password. Could a cracker feasibly produce the MD5 hashes for all the strings as long as a bcrypt hash? (I don't know how much slower MD5 gets with each additional input character, or how much slower it gets to produce MD5 hashes for all the strings of a given length.)

2) If we used bcrypt itself as a 2nd-level hash, wouldn't that cause the same problem I was trying to avoid (running bcrypt at log-in time)? Maybe this 2nd- level bcrypt hash could be configured to be less computationally expensive that the 1st-level hash (the one used on a user's plaintext password). Thus it'd be moderately inexpensive to verify a user's password, but more expensive to crack it (since the input string the password cracker is trying to find is a bcrypt hash, not a traditional, weak user-selected password). Like you said, I need a security expert (or several) to look into this.

Thank you for your feedback.

</comment></comment><comment><USER3> Not in this way. The bcrypted hash effectively becomes your plain text password, nulling the purpose of a hash in the first place.

<comment><AUTHOR> lzm,

You're absolutely right! The bcrypted hash effectively become a plaintext password. This is obviously a problem. However, it also creates an interesting opportunity...

SecureR could be designed so that every so often it rehashes a user's plaintext password and creates a new bcrypt hash. This could happen every month, every week, every N successful user log-ins, etc. Now, users hate having to frequently change their passwords (and rightly so). However, with this system, each user could keep the same plaintext password, and the system could transparently generate a new bcrypt hash for it periodically. By cycling through bcrypt hashes, attackers would have a narrower window in which to steal a password table and use the stolen hashes. Maybe a 2nd-level hash could be used (as discussed in my reply to Robin_Message), so that the 1st-level hashes aren't completely exposed, and attackers need to not only steal a database but also crack it (all within a short time frame).

Unfortunately, after this adjustment, bcrypt wouldn't be invoked only on account-creation or password-resets. The bcrypt bill would be higher than in my original proposal. However, at least bcrypt wouldn't be invoked every single time a user logs in.

Maybe the cost of bcrypt can't be fully shifted from the log-in system to the account-creation and password-reset systems. Maybe it needs to be paid somewhere in between both areas, where you get as much secure encryption for passwords and denial-of-service protection as possible. (Both goals seem to be in conflict with each other.)

Ah, tradeoffs!</comment></comment>


Ask HN: Shall I buy an 'ultrabook' or a MB Air? - <AUTHOR>

What I really want to know is are there any ultrabooks that can compete with the MacBook Air on the key features:<p>- size/weight - battery life - quick on (since Lion, instant on is a thing of the past) - SSD (how is this not standard in the feature spec...) - backlit keyboard (incredibly important)<p>Any suggestions of ones that people have tried/reviewed? <comment><USER3> <http://en.wikipedia.org/wiki/Ultrabook>

That should answer most of the questions you asked. You can find about the ultrabooks with backlit keyboards by doing a simple Google search (yes, 'ultrabook backlit keyboard').

<comment><AUTHOR> Seriously? A wikipedia entry? I was asking for specific experiences and models...

<comment><USER3> Neither of which I have. ;) And because you asked for information on size/weight and battery life without specifying a specific model, this was the best I could do.

</comment></comment></comment><comment><USER4> I have a 13" MBA 2011 w/ lion,just got it after years on a dell Inspiron 1545. It is amazing. Incredibly light, With really really good battery life. So need for an iPad, I have no qualms about carrying it with me, it doesn't weigh that much more than large book. It can power down, restart and be back on my desktop in 15 seconds. Backlit keyboard is great, don't underestimate it for late night projects. Also, I now have nothing on my desktop, Osx file systems are muchore intuitive and multi task orientated. Get an MBA, it's more money but better value than anything else on the market.

<comment><USER4> *no need for iPad & much more

Stupid iPhone keyboard.

</comment></comment><comment><USER5> Keep in mind that the screen illuminates the keyboard in the dark, so a backlit keyboard may be more for aesthetics than functionality. I never use it on my MBA.

Something I don't like about the MacBook Air (13"): Dedicated audio in/out -- there's a "hybrid" jack which annoys me. I thought lack of firewire would be limiting for older drives and external interfaces, but I don't miss it. I do run Windows when I need it for (minor) updates to files in solid modeling programs such as SolidWorks and animation such as Maya while traveling with a VM. Works great.

<comment><AUTHOR> I have a very beautiful HP ProBook 5310m but find I have to tilt the screen down every now and then to see the keys (while trying not to disturb my wife watching soaps on the TV...)

How do you find the performance of Windows 7 on the MBA? Does it boot into Windows or do you use Parallels?

<comment><USER6> I do OSX + Win and OSX + Linux on Parallels most of the time, the only drawback with the Air is there's not enough ram and perhaps not quite enough cpu to do it all at once. A single VM runs fine though.

<comment><AUTHOR> Yes, the lack of upgrade-ability is always an Apple Mac fault, BUT the new ultrabooks will likely suffer the same limitations considering they are based on (slightly inferior) Apple-led Intel re-architecting of the PC innards.

</comment></comment></comment></comment><comment><USER6> If you don't need OS X then the Sony Vaio Z looks pretty awesome. Biggest differences:

\- faster processor

\- higher resolution

\- their lightpeak or w/e port actually has a kickass accessory that justifies it, there is still nothing interesting available using Thunderbolt

\- up to twice the ram

\- internal + external battery

[http://www.notebookcheck.net/Ultra-mobile-Vaio-Z-with- Power-...](http://www.notebookcheck.net/Ultra-mobile-Vaio-Z-with-Power-Media- Dock-now-official.56625.0.html)

<comment><AUTHOR> I would LOVE a Vaio Z - so beautiful, so powerful AND that 1080p resolution screen is to die for...

OK, I'm going to start a kickstarter page for people to sponsor my purchase of a £2000 Vaio Z...

<comment><USER7> If you're going to be in the US any time soon I just priced up a Vaio Z top of the line and it came to £1400 quid, did the same on the UK site and it was £2400 quid

<comment><AUTHOR> Is that including Sales Tax?

It does hurt a lot when you have such dichotomies...

<comment><USER7> Nope but even when you add 10-15% it's a pretty good deal.

I recognise your name, are you on the opencoffee mailing list?

<comment><AUTHOR> Yup, I've posted more often recently. Mostly because I am running Flagons Den so am using the OC list to keep in touch with those who want to get pitch practice through Flagons Den. Are you coming on the 7th?

</comment></comment></comment></comment></comment></comment><comment><USER8> I've struggled with this question myself, and while ultrabooks offer a few hundred dollars of savings, a Macbook Air makes more sense for me(personally) in the long run.

Reasons:

I've started to develop iOS apps, and I need an iOS device and the MBA solves 2 of my problems in a single go. (need for an ultraportable device, a Mac for iOS dev)

<comment><AUTHOR> Just noticed that you offer Office Hours to YC companies for UX and design - might you be interested in doing an Open Office Hours for the London hacker community? We keep some events going just to help the community get out and mingle. Some examples here: <http://london.flagonsden.com>

Let me know if this is something you would be interested in.

Thanks

<comment><USER8> I'd be happy to help. But currently i'm building a product which is to be launched by Q2 of this year.

Do drop me a mail at ameen.in at google's electronic mail service, I'll get in touch with you if & when I'm free.

</comment></comment></comment><comment><USER9> If you're going to be installing Linux on it, don't buy the MacBook Air for the hardware. The lack of PageUp/PageDown keys seals the deal. If you are going to install Linux on it, then the MBA shouldn't be a consideration and you should get an ultrabook in your spec/price range. If you want OS X then the MBA would be your best bet.

</comment><comment><USER10> I think it depends if you want/need Mac OS X or if you can live happily with the alternatives.

Personally, I think that Mac OS X Snow Leopard is better than Lion but that is just opinion so until Lion grows on me, I will not upgrade to a new machine.

<comment><AUTHOR> That's another conundrum - I was in lust with the MacBook Air and it's instant on that I could whip out on UK commuter trains and use as if it was as versatile as an iPad. But Lion makes this less possible... seconds on UK trains seem like much longer...

<comment><USER11> I'm using a 2011 Macbook Air that came with Lion and from opening the lid to login prompt takes about a second.

I'd never shut it down fully because the battery life is so good I don't need to!

<comment><AUTHOR> That's interesting. This is what I really want to delve into - can an Ultrabook perform a similar miracle? And if so, which one?

<comment><USER11> So long as you have an SSD and enough memory the startup speed really comes down to how the OS handles sleep/hibernation - it's a software problem.

<comment><AUTHOR> I wish it was just down to software. I have seen some Windows 7 machines, like the Vaio Z, boot up like a demon. And others that are hamstrung.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> Now we're talking! Check out this laptop [http://www.techradar.com/news/mobile- computing/laptops/hands...](http://www.techradar.com/news/mobile- computing/laptops/hands-on-samsung-9-series-review-1054050)

</comment><comment><USER12> I'm tossing up the same thing. I think it pretty much comes down to if you want to use windows or OSX + budget. Specs aren't much different.

<comment><AUTHOR> Well this is actually my conundrum.. on paper the specs are not different, but practically it seems they are. I saw three ultrabooks in PC World and only one had an SSD (£900 vs £1100 for MBA).

And the battery life of all of them was claimed as less than that of a MBA.

I REALLY need to replace my laptop, but am in two minds about labouring with it until Windows 8 comes out...

No need to use OS X - there is no software on there that works better with the exception of iTunes (which is possibly the worst well used software ever - <USER2> Mac Fanboys complain about Windows, I just need to say iTunes...)

</comment></comment><comment><AUTHOR> So any model recommendations for an ultrabook? Anyone?

<comment><USER11> I absolutely love my MacBook Air. I run it exclusively in Lion but have virtual machines for Ubuntu and Windows when I need it.

The build is amazing, the battery life very good for its size, and I really like the keyboard and screen (though that's probably a personal taste choice).

For £1099 (including taxes) I haven't seen anything else that I'd want to swap to.

<comment><AUTHOR> What about this Toshiba?

[http://reviews.cnet.co.uk/laptops/toshiba- portege-z830-ultra...](http://reviews.cnet.co.uk/laptops/toshiba- portege-z830-ultrabook-review-50004981/)

<comment><USER13> I checked this out in store, very cheap feeling.

</comment></comment></comment></comment><comment><USER14> I would say go with the Air, build quality is top notch and even if you don't use it everyday having a rock stable UNIX core can come in handy at times.

You might want to wait a bit though the new "Air" Macbook Pros are coming out soon and it's rumored they will have "Retina Displays" - God I hate that term</comment>


Show HN: Bookmarklet that sends highlighted text to your phone - <AUTHOR> http://www.andy-jiang.com/textme

<comment><USER2> Very cool. Which service are you using to send out the sms?

<comment><AUTHOR> Twilio :)</comment></comment>


Encyclopedia dramatica: Ruby on rails - MUAHA :) - <AUTHOR> http://encyclopediadramatica.com/Ruby_on_Rails

<comment><USER2> LOL , a friend of mine is pushing me really hard to learn ruby/ror. I should send him a link to this.

<comment><AUTHOR> it's sooo funny. dont miss the articles on javascript and java...</comment></comment>


Show HN: Docs+ – integrate browser extensions with the Google Docs Kix editor - <AUTHOR> https://github.com/matthewsot/docs-plus <comment><AUTHOR> Hello!

I wrote the code behind this a year or two ago with two friends to power Action ([https://meetaction.com/](https://meetaction.com/)), but only recently got around to open-sourcing it.

Docs+ is a set of Javascript functions that you can use in browser extensions or userscripts to directly interact with a Google Doc (think adding or reading text from the editor, adding your own "Docs Button" next to the "Comment" and "Share" buttons, right-click menus, etc.).

Hoping someone can find a creative use for it! If you're looking for a demo, there's code for a time-to-speak counter using Docs+ here: [https://github.com/matthewsot/speechless](https://github.com/matthewsot/speechless)</comment>


Ask HN: Examples of successful serial-entrepreneurs? - <AUTHOR> I was in the subway last week with someone worked for the creator of Visicalc. Visical was the first spreadsheet program. His new business was mildly successful - maybe a dozen employees. Nothing close to his first work.<p>What entrepreneurs have started very multiple successful businesses? <comment><USER2> Joel Spolsky comes to mind. Fog Creek, StackExchange and Trello.

I'd be interested in this list, too. Seems like a lot of adoration is heaped on people who have one big score and then can't (or don't try to) replicate it. To me, the real geniuses are the ones who can do it over and over again, proving the first wasn't a fluke.

</comment><comment><USER3> Here:

1) [http://www.forbes.com/sites/jjcolao/2012/10/29/the-ten- best-...](http://www.forbes.com/sites/jjcolao/2012/10/29/the-ten-best-serial- entrepreneurs-youve-never-heard-of/)

2) [http://www.inc.com/ss/12-historic-serial- entrepreneurs](http://www.inc.com/ss/12-historic-serial-entrepreneurs)

There's quite a bit of info on them. A lot of serial entrepreneurs are celebrated, but in the US many are overlooked because they're foreigners (like the Forbes article states).

What is particularly enjoyable is serial entrepreneurs who have started non- tech companies. Some are in slow-moving industries and they've achieved huge success in them.

</comment><comment><USER4> There's a couple of examples in [http://en.wikipedia.org/wiki/PayPal_Mafia](http://en.wikipedia.org/wiki/PayPal_Mafia)

</comment><comment><USER5> -Peter Thiel -Elon Musk -Jack Dorsey -Paul Graham</comment>


Macros: the Plan for Scala 3 - <AUTHOR> https://www.scala-lang.org/blog/2018/04/30/in-a-nutshell.html <comment><USER2> Disclaimer : I'm just some moron on the Internet

Unpopular opinion: I hate meta programming. We have composition, why do you need to mess with the nature of things? A long time ago, I was freelancing Rails. I can't accurately describe the deflating feeling of tracing your problem back to some class that one person (a ruby guru warrior, no doubt) wrote, with a few dozen dynamic deeds or to_methods. It's the most demotivating thing I've come across in real life code.

It's worse somehow than complicated numeric code, because with the numbers, at least I know this shit works by the end of it. If I start writing good var names, I'll probably even figure out how it works in an hour or two

That being said, I'm tentatively excited about Tasty. What a witty name by the way!

Having the extra type information should allow for much smarter transforms at the language level and I hope macros in scala 3 aren't so much a mess.

Also, let's just get rid of implicits, whaddaya say? ;-)

Anyways, proud of the scala 3 team this far. Even though they haven't killed sbt yet, they're putting their work in admirably to a difficult problem. I'd love to have that much meaning and purpose in my own work.

I didn't have time to actually read spec, will do later, so if I said something inaccurate, let me know gently

Edit: macros will conform to black box and be constrained to their types, runs after type checking.

That's awesome

<comment><USER3> > Unpopular opinion: I hate meta programming.

As papaf asked, is it _metaprogramming_ you hate, or _bad metaprogramming_? Metaprogramming is just another tool in the toolbox, and hating syntactic abstraction (macros) makes as much sense to me as hating procedural abstraction (functions). Yes, it's easy to write bad syntactic abstractions, but it's also very easy to write hilariously bad procedural abstractions, too.

cbzbc states that metaprogramming is often harder to get write than functions. I'm not certain that's true; might it just not be the case that most programmers just don't get very much experience with metaprogramming, since they're typically using languages with very underdeveloped facilities for it?

> A long time ago, I was freelancing Rails. I can't accurately describe the > deflating feeling of tracing your problem back to some class that one person > (a ruby guru warrior, no doubt) wrote, with a few dozen dynamic deeds or > to_methods. It's the most demotivating thing I've come across in real life > code.

My own experience is that for some reason Ruby tends to attract programmers who enjoy doing things because they _can_ be done, not because they _should_ be. It's so bad that my general rule is not to use systems programmed in Ruby, because I've been burnt so many times before. That's not entirely fair (obviously there are some great systems written in Ruby — e.g. I believe that both GitHub & GitLab are), but it reflects my experience.

<comment><USER4> > hating syntactic abstraction (macros) makes as much sense to me as hating > procedural abstraction (functions).

This is a bit pedantic, but...

Many people's experiences with macros are through C. C macros are not syntactic abstraction, but some sort of lexical expansion that introduced syntactic confusion.

I get this is not the case in many languages now but for most popular languages macros are "throw appended strings into eval/C preprocessors"

<comment><USER2> Yes, but this thread has enough context, tasty is a big deal in scala 3 proposals.

You're right though, thanks!

<comment><USER4> Totes, Tasty is a really interesting technology. Excited to see where we'll end up in the future with it

</comment></comment></comment></comment></comment><comment><USER5> This post, as far as I can see, does not mention scala-meta-based macros (project called scalamacros I think) at all. What happened with this direction of macros development? Was it abandoned? Or is the new approach built on it?

<comment> pale-hands It seems that scala-meta is alive ([http://scalameta.org](http://scalameta.org)), but is now about developer tools (e.g. code formatting plugin used by IntelliJ). The macro part of scala- meta was spun off to [https://github.com/scalacenter/macros](https://github.com/scalacenter/macros), which is archived and points to Dotty macros as the way forward.

I'll be watching Dotty macros with keen interest, as I have found the current scala macro system very useful despite it remaining experimental. One thing I couldn't do with current macros was provide any kind of generic wrapper around macro methods in the same library, due to the separate compilation pass requirement. I hope this is what staging will address.

</comment></comment><comment><USER6> Hopefully this will simplify Scala for newcomers and especially speed up onboarding when handing over codebases written by expert developers.</comment>


You don't get what you don't ask for - <AUTHOR> http://jasondoesstuff.com/ask

<comment><USER2> This is so very true. Which is why I ask for EVERYTHING.</comment>


The making of Supreme Commander - <AUTHOR> https://www.eurogamer.net/articles/2018-01-07-the-making-of-supreme-commander <comment><USER3> I really enjoyed Supreme Commander. There are a number of features (scale, strategic zoom, automation controls) that I wish were more popular in RTS's. Planetary annihilation tried to extend the concept in a novel way, but the execution stumbled a little bit and the micro transactions were aggravating.

That being said, I think SupCom had a critical error that really hampered the longevity of the gameplay. SupCom (and Total Annihilation) follows the "Upgrade is Upgrade" model of game progression. This is a really common model in a lot of mediocre RTS's. Basically it means that in the early part of the game, you build a selection of robots, tanks, artillery, and planes. At some point you "upgrade" your economy and build a new selection robots, tanks, artillery and planes that are almost identical to the first batch but are bigger and better. And then this happens again and you build a 3rd set of units that are almost identical to the first and second sets of units, except they're even bigger and better. If that sounds repetitious and tedious, that's because it is. Basically you repeat the same game 3 times before you start getting to end game units that start offering you new and different strategic options.

This is contrasted by Warcraft and Starcraft's "Upgrade is Sidegrade" model. In these games, every unit represents a new and unique set of options. You upgrade your economy in order to create an army that moves faster, or in the air, or has better artillery option. Economic progression is used to drive new tactics and strategy, or is used to counter your opponent's new units. In this model, the play changes as you move through the different stages of the game. This is much more interesting to play and watch as the game is constantly evolving as players produce new types of units.

If someone could combine Planetary Annihilation's concept, with SupCom's execution of scale, and Starcraft's polish and upgrade model, I think we'd have an RTS for the ages.

<comment><USER4> You are on to something, but as a counterpoint:

The T2 navy gives a lot of options not present in T1 - largely due to longer ranges. T1 subs and frigates mostly only interact with other naval units. But T2 get cruisers and destroyers anywhere near a coastline and they put large areas under thread

A lot of T2 & T3 units have weird special powers (e.g. the destroyer that can sprout legs and walk on land, the T3 Loyalist has built-in TMD). These are somewhat sparsely distributed though

The experimental units obviously have a lot of character

Depending on circumstances, T1 units remain viable throughout the game. I've seen tons of matches where a T3-heavy naval invasion is pushed back by overwhelming numbers of amphibious T1 units (Zthuees)

Making the switch from T1 to T2 and then to T3 is a huge part of the strategy of the game. It is true that the higher tier units are more efficient per unit of resource, but there are real costs (both in resources and in time) to upgrading your force and the decision of when to upgrade is never easy

<comment><USER5> I also found it very effective even in late game to mix in t1 artillery units with mostly t2/t3 unit armies because they tend to spread their damage around so effectively.

</comment></comment></comment><comment><USER6> My one and only problem with SupCom is that it slows down to a crawl when you have many AI-controlled players on a large map. This is still true today - <USER2> tried playing SupCom on a high-end laptop from 2017, and maps larger than 10x10 with multiple AI opponents are still unplayable. There are AI mods which supposedly improve this, but in my testing, the difference was minor to non- existent. Which is a damn shame, because even the hardest, cheating AI is very easy to defeat if you're somewhat experienced, so I mostly resorted to playing against 3+ allied AIs, which is simply impossible on larger maps.

That being said, SupCom is easily the best RTS I ever played - it was basically Total Annihilation, only bigger, better and prettier. And TA was already an exceptional RTS, one that people still played and enjoyed as long as a decade after release.

I think TA and SupCom ruined the whole RTS genre for me. I was trying to play some newer RTSes, but they are all lacking in features which the two taught me to rely on and enjoy. Strategic zoom, queues of commands in factories and building units, waypoints, unit formations, ferry routes, terrain obstructing visibility, radars, and getting in the way of bullets/missiles, an economy where you have to balance income and spending, gradual construction of structures and units, massive amounts of units on the map and massive units themselves (experimentals), very well-balanced factions with each still being quite distinct and so on - there are games with some of these features, but I couldn't find a game which would have all or even most of them. SupCom2 was a disaster and I refuse to consider it SupCom at all, so I'm basically still waiting for the sequel.

Or maybe I just missed a game like that - suggestions on the titles to try would be very welcome!

<comment><USER4> You might like Sins of a Solar Empire. The scale is even larger than SupCom, so a full game can run several hours to complete. You can play on smaller maps as well, but the game shines best with several different solar systems.

It's got large fleets, a decent amount of automation (very little micro needed as I recall), a huge range of scale in terms of the units themselves, strategic zoom every bit as good as SC.

Layer on top of that a research tree, neutral factions (pirates) you can influence, 'hero' units in the form of capital ships that you can level up and customize.

I haven't played since the very first release, so maybe it's gotten overcomplicated since then - but I think it's worth a look

<comment><USER7> It's still pretty good. :)

I sometimes wish there were more micro, but I'm really not that good at micro so it's probably for the best. Haha I always feel like I have things to do, macro-wise.

Haven't played much recently due to the game lengths, but it's always fun.

(Go Vasari!)

</comment></comment></comment><comment><USER8> SupCom still survives today with Forged Alliance Forever[0], a fan made client, server, and community chock full of features, bug fixes, mods, and rebalances that make the game very polished.

If you want a taste of Supreme Commander to truly understand the beauty of the game, check out Gyle[1] who is a truly underrated caster of the game on youtube.

[0]:[https://github.com/FAForever](https://github.com/FAForever) [1]:[https://www.youtube.com/user/felixlighta/videos](https://www.youtube.com/user/felixlighta/videos)

<comment><USER9> Gyle! Agreed - a roommate and I slowly made our way through the backlog. You really grow to love Gyle - he's so enthusiastic and a fantastic commentator, if a bit obsessed with zooming in on reclaim while a battle is happening.

</comment></comment><comment><USER10> I still think Total Annhilation had one of the best soundtracks of any video game ever recorded, including The Elder Scrolls. It was Jeremy Soule's magnum opus. [https://youtu.be/o2jS4ZaVOWA](https://youtu.be/o2jS4ZaVOWA) [https://youtu.be/lA-iag83kQc](https://youtu.be/lA-iag83kQc) [https://youtu.be/r_9QO_76l_I](https://youtu.be/r_9QO_76l_I) [https://youtu.be/1mOG3Q8CSoY](https://youtu.be/1mOG3Q8CSoY)

<comment><USER11> It's quite cool that you could insert the game cd into an ordinary music player and have the background music play. Shows how proud they must have been of it.

<comment> qu4z-2 That was a moderately common thing in those days. In particular, iirc, there used to be a cable between the CD-ROM and the sound card that let you play audio off the CD without having the (limited) CPU needing to get involved, deal with audio encodings, etc. The CD would have a data track followed by a bunch of audio tracks, then the game can just say "Play track 5" and carry on with its business.

At least, that's my understanding. I was pretty young in those days and some of this is reconstructed "Oh, right, that would make sense".

The downside is that if you find a dump of only the data track/files it's hard to reconstruct the full experience of abandonware games. FireFight just isn't the same without the background music.

</comment></comment></comment><comment><USER12> I'm a big fan of Chris Taylor and his games, the modding community around TA led 14-15 year old me to learn how to program so I could make my own mods. I think one of the most underrated things about the best of Chris' games is the interface. The TA, Dungeon Seige, and SupCom interfaces never get in the way of play, and are very, very fluid. GPG's two games that were less successful, DemiGod and Space Seige, added layers of complexity onto interfaces that made the games feel more technical, managerial, and less fun than needed to be.

As I developer, I really strive to think about how the interfaces I design and implement are used by my users to quickly do repetitive or important tasks, traits I associate to Ctrl-grouping, shift clicking to build 5 units at a time in TA, and of course, strategic zoom.

By the way, Camtarn, still like Guanine? :) I lurked the Cavedog WSB in the early years.

<comment><AUTHOR> Holy crap! Yes, that's me :D What a blast from the past.

</comment></comment><comment><USER13> Total Annihilation was one of the best examples of rock solid software that I had seen up to that point. My friend and I played it across the country on dialup modems, with 500 units each. It would slow down to a crawl, but it never crashed. We would optimize by giving each other 30 mins to build a fort and then we could attack at will. It was truly a thing of beauty.

<comment><USER14> I never really played online, but as a kid I was fascinated by the near- automation that TA allowed for with its unit queuing options. I'd happily pay full price for a game that had TA-era graphics, but the AI improvements of today. Though it seems improvements in single-player AI has stagnated with the growing ubiquity of multiplayer [0].

[0] [https://aigamedev.com/open/interviews/stalker- alife/](https://aigamedev.com/open/interviews/stalker-alife/)

</comment></comment><comment><USER15> Slightly offtopic but I'm now reminded of it -- I was a huge fan of TA as a kid, skipped Supreme Commander, and supported the Kickstarter for Planetary Annihilation based on the awesome pre-rendered gameplay trailer (as I'm sure many others did).

I was really disappointed with the final game and put maybe 2 hours tops into it before never playing it again. It just wasn't fun to play.

Despite that, I still felt satisfied that the game was finished and came out at all. The engine is really impressive IMO, and I enjoyed their engineering updates and videos.

This is probably the only time I ever supported a project and didn't care at all for the final product, but still didn't feel burned because I could appreciate the enormous undertaking that it was, from engineering and development standpoints.

</comment><comment><USER16> Imho, this is probably the best RTS ever created. Huge maps, huge number of units easy to control with a great UI, amazing music (the first game that had a background music that was aligned to what you were doing in the game? i.e. a mass attack triggered the appropriate bgm).

<comment><USER17> I'm sure that the Elder Scrolls 3 had situational music, and that was a few years prior. TES 4 did for sure, and that was a year before. I'm a big fan of Jeremy Soule (composer of SupCom, Elder Scrolls 3,4,5).

<comment><USER18> I don't know if it was the first but there was iMUSE at Lucasfilm Games [https://en.wikipedia.org/wiki/IMUSE](https://en.wikipedia.org/wiki/IMUSE)

</comment></comment></comment><comment><USER14> Great to hear that Chris Taylor is working on a new RTS, but I wonder how it'll be received given that the RTS genre has seemingly been eviscerated, particularly by MOBAs. Even Starcraft 2 seems to be a niche title, even overshadowed by its predecessor -- which Blizzard opted to remaster. The only other RTS I've recently paid attention to is also a remaster: AOE2 HD.

From my narrow personal perspective, it's easy for me to understand why RTSes aren't popular -- I'm too old to have the time to master them. But I wonder why the genre has stagnated for the rest of the world -- is it because it's too complex? Or because the mechanics of other similar genres, like MOBAs, are inherently superior? With instant-gratification being the default mindset nowadays, the thought of spending 30 minutes building out a base only for it to be wiped out in 2 minutes of action does seem antiquated.

<comment><USER19> I wouldn't say the RTS genre has been destroyed per se. We have Stelaris for example and Hearts of Iron 4 some time ago. There is also RimWorld and Wargame. Banished, comes to mind. Oh and of course They Are Billions, great game combining Starcraft and age of empires.

Anyway, I think the genre is alive and kicking — mainly driven by smaller developers. It's a shame that EA killed off C&C but they only have themselves to blame.

<comment><USER20> Paradox grand strategy games are real-time, but it's bending the definitions of the genre to a ridiculous, meaningless level to consider them RTS games.

<comment><USER19> My point more generally was that hard core strategy games are still coming out and are beloved

</comment></comment></comment></comment><comment><USER21> For fans looking for a fix:

Spring [1] is an RTS framework that started off rebuilding TA's engine. It has since branched off with mods creating new RTS's entirely... but still with that TA/SupCom feel.

FA Forever [2] is a mod for Supreme Commander: Forged Alliance (the expansion), that gives access to community servers to download maps, mods, and find matches. It replaces Gas Powered Games' own shutdown servers.

[1] [https://springrts.com/](https://springrts.com/)

[2] [https://www.faforever.com/](https://www.faforever.com/)

</comment><comment><USER22> As a RTS Sup Com was pretty cool, even if the scale of the maps was a little daunting. On the other hand, during the campaign missions, the maps extended as objectives were reached, which was a good way to avoid being overwhelmed right at the start.

A few other cool features: chaining move or build orders, having worker helping factories, flying unit doing crash damage on death and being able to set repeating build tasks in factories.

<comment><USER23> Believe it or not, Supreme Commander is a spiritual successor to Total Annihilation - a game which actually had all of these mechanics back in 1997!

TA can be had on Good Old Games for $6 and works perfectly on modern Windows or Wine.

<comment><USER24> TA used to crash at launch on GOG for Win 10 for me, but I rechecked after this and between updates to the GOG setup and/or Windows, it works now. Thanks!

</comment></comment></comment><comment><USER5> For anyone wanting to pick up a copy on the cheap, Supreme Commander bundles are currently on sale for 80% off on Steam.

<comment><USER25> I think it's not a coincidence...

</comment></comment><comment><USER26> Previous related discussion Supreme Commander – Graphics Study [https://news.ycombinator.com/item?id=9770020](https://news.ycombinator.com/item?id=9770020)

</comment><comment><USER27> If you like this, you'd probably appreciate [https://www.reddit.com/r/TheMakingOfGames/](https://www.reddit.com/r/TheMakingOfGames/)

</comment><comment><USER28> I want my dual panes back, isn't this a file commander? Who cares about games</comment>