Connect: behind the front-end experience
stripe.com
stripe.com
I do wonder whether sometimes the code here is using trendy tools just to be trendy, though. For example, is
const getDistance = (state, rotate) =>
["x", "y"].reduce((object, axis) => {
object[axis] = Math.abs(state[axis] + rotate[axis]);
return object;
}, {});
really an improvement on grandpa's version function getDistance(state, rotate) {
return {
x: Math.abs(state.x + rotate.x),
y: Math.abs(state.y + rotate.y)
};
}
? const getDistance = (state, rotate) => ({
x: Math.abs(state.x + rotate.x),
y: Math.abs(state.y + rotate.y),
})
TBH, this thread is pretty nitpicky, but I do agree with your assessment.Yes and no.
On the one hand, the much more interesting parts here are the new APIs they've been using (and also IMHO the intelligent way they're handling compatibility and polyfills). All credit to the Stripe team both for making these tools work and for sharing what they've learned in the process for the benefit of others.
On the other hand, I think there is a real cultural problem in the JS community where newer is equated with better, and those defending that position will not infrequently appeal to authority by saying that Facebook or Stripe or Google or whoever does it so it must be a best practice. Grandpa here is getting awfully bored of young whippersnappers telling him code using new ES6 tricks is better (or, just as bad, that there's something wrong with clear, working code that does things in some older way). A gentle challenge to that assumption in a discussion about how these high profile organisations are using the new technologies doesn't seem either impolite or unjustified.
I'm far less fussed about function vs lambda literal bound to a const. Usually that kind of decision comes down to tooling in debuggers - depending on the runtime, turning lambdas back into names may be difficult, if you have lambdas bound to event handlers and the like.
Paypal is far bigger Stripe, so it's not that.
Much of what they do supports that overall strategy, from making attractive things for developers to some of the high-profile hires and acquisitions they've been making recently. Apparently the strategy is a good one, because here we all are talking about them on a site full of entrepreneurial types, and today it's not because of the service they provide but just because of their landing pages. :-)
* CSS Grid "defines a two-dimensional grid-based layout system, optimized for user interface design."[1]
* Flexbox is "a CSS box model optimized for user interface design."[2]
It looks like CSS Grid is optimized for two-dimensional layouts, whereas Flexbox is oriented around a single axis.
Are there different use cases? Do they solve the same problem in different ways?
Grids are also more flexible in where they position things, where Flexbox goes strictly by order and hierarchy in the document.
These come up quite a bit. Look at Pinterest, it is all staggered/made of nonuniform cells.
I haven't dug into Pinterest's code but I imagine it's most likely a mix of Flexbox and Multi-column layouts: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Columns....
Edit: See this blog post on how to combine them to achieve the staggered effect: https://medium.com/@_jh3y/how-to-pure-css-masonry-layouts-a8....
I hate that the current trend amongst webdev'ers in that "no added visual effects!" Black text! White background!
I think it's because the guys that are hyper focused at the programming side of things don't want to think/care about design stuff because they aren't that good at it.
Makes me sad that CSS programmers make truckloads of money while other workers in the economy rot.
1. CSS isn't a programming language 2. If "workers in the economy rot" while "CSS 'programmers' make truckloads of money" then they aren't in the right industry.
HTML5 and CSS3 together can provide a Turing-complete environment, but on its own CSS is just absolutely not a programming language.
There are no "CSS programmers" and regardless I don't even know of any web developer who gets paid to only write CSS.
Just a healthy bit of advice, consider refraining from using absolutes when engaging in discussions where you could possibly be incorrect.
It places you in a position where you are unlikely to accept that you are wrong due to personal embarrassment.
That doesn't make it distinct from programming, you've just added more specificity.
CSS is not turing complete, is not a programming language, etc. It is a declarative, presentational language with no processing capabilities beyond extremely basic math.
There is no if, and, or but about it. Are you a web developer?
* edited to sound like less of an asshole
You need to do more editing.
A programming language doesn't need to be turing complete. But CSS is neither of the two.
But I very clearly did not conflate turing completeness as a requirement of a programming language. I just thought it was worth mentioning that CSS3 + HTML5 is Turing complete.
And you are still completely incorrect about CSS being a programming language. I think we are done here.
Nope.
The whole point is, nothing about CSS being a stylesheet or presentational language makes it fall outside of the definition of programming language.
How many people do you know that only work with CSS?
And why shouldn't artists and engineers who are good at what they do and create aesthetically pleasing functional designs get paid appropriately?
Salary is a simple function of supply and demand, if your employee can find better pay elsewhere, you either increase his salary or let him fly. If you want to retain talent, you have to pay what the market pays. There isn't some kind of secret conspiracy where employers are shortchanging people who work in a more saturated market.
I'm highly suspicious you have no idea what you're talking about given your use of the phrase "CSS programmers". You shouldn't get angry at things you don't grok.
I agree that there is too much window dressing on the web, an aesthetic defined by gratuitous graphic elements and distractions. The only purpose it serves is to project an image, it is marketing.
It used to be that pretty designs are seen as more trustworthy, but there has been a backlash. The superficial optimism of modern web design is becoming less and less effective, and it's taking more effort to pull it off.
Beautiful work nonetheless.
[0] https://github.com/senchalabs/connect [1] https://github.com/expressjs/express
Well, this isn't so convincing.
Certainly a lot better than some payment providers I've worked with
To give credit where it's due, they have improved since. Gone are the days when they were the small developer's payment service and you could expect to reach technical people straight away via their contact addresses, but they do at least seem to reply to messages eventually now.
IMHO they still have room for improvement. In particular, 24-48 hours for a first substantial response doesn't seem unusual, and that's far too long for a merchant who might have one of their own customers in limbo or some sort of ongoing dispute or fraud that they need to deal with quickly.
But at least Stripe seem to be moving in the right direction and genuinely trying to do better. Our experience of their support is still much better than you'll get from a lot of other payment services if you're only a small merchant.
Of course, in online forums you see the people who are (sometimes quite reasonably) very upset and shouting about it, but not all the things that worked just fine for every other merchant. There's no way to know whether those stories were the norm or isolated incidents. Importantly, there's also no way to know whether there was more to the stories than the people telling them were letting on, because we only see one side there.
As I said before, Stripe definitely still have room for improvement, and are still often very slow at dealing with things. And I'm sure if anything like some of those stories happened to me, I'd be very aggrieved and warning people off them as well. But I can only comment on my own experience, and so far I'm still inclined to give them the benefit of the doubt, because in several years of dealing with them, they generally have fixed any problems eventually and seemed to be genuinely trying to help.