321 karma · joined February 17, 2016
Does this mean that it is unacceptable to run a service which requires consent to share data? That seems overly restrictive - where does that leave services in which sharing data is the whole point of the service?
The article goes on to say: "Grindr made use of the app conditional on consenting to data sharing or to paying a subscription fee."
Is this the unacceptable part? I.e. Grindr is creating a financial penalty for users who exercise their data privacy rights?
Would it be acceptable under GDPR to run an app where the choice is "consent to sharing data or do not use this app at all"?
The user-defined context is the only route into the application state and can be as wide or narrow as you need. So you can share persistent state deliberately, e.g. by having that context contain a pointer to a db conn, but this is always a conscious, opt-in choice, and errors like accidental reuse should be impossible unless you're doing something inadvisable like using global variables.
That being said, I would still prefer a monolithic application for a small blog with comments because I think it's easier to manage, deploy, encapsulate, test etc.
Of course there are solutions in PHP-land, e.g. "run a job server" or "use Redis", but I find the overall cost of introducing more programs/services/components to be very high, in terms of learning curve, portability, maintenance and debugging.
I've spent the last few years replacing a crumbly, brittle, temperamental PHP/nodejs/Gearman/Redis/Nginx/Supervisor stack with a Go monolith so I'm sure that influences my opinion :-)
The old-school style, where routes map to scripts or parts of scripts and a separate web server like Apache or Nginx sits in front of the app, feels harder to reason about (does this thing persist across requests?), harder to debug (where did that error message end up?) more brittle (did this fail because of my script or my web server config or something else?) and more dependent on configuration magic (i.e. various text files lying around governing the behaviour of things).
So although some of these changes look cool, I don't think it's the language itself that most needs improving.
Whether you consider that "good" or not is a matter of taste - personally I quite like it because it is very explicit and non-magical and I think NULL semantics cause more problems than they solve.
True apologies (e.g. what passes between people who care about each other when one of them transgresses in some way) are conversations in which someone expresses concern for the injured party and makes it clear that they're unhappy about what they've done. They aren't structured or formulaic and might not even contain the word "sorry".
The kind of "apology" that parents force uncomprehending children into ("Say you're sorry!") is a totally different thing. We all remember going through it. It has nothing to do with genuinely understanding your duty and responsibility towards others, it's just a Pavlovian training device. Child misbehaves, parent humiliates child, child learns not to misbehave.
The social media public "apology" is even further removed from the real thing because it usually relates not to personal relationships and authentic emotional responses, but to making insincere sacrifices to the political correctness gods in order to limit damage to career/reputation/revenue/share price. There's no point critiquing them, except perhaps to evaluate them as some kind of dubious art form.
In a court of law, presumably video will now be subject to the same scrutiny as photos. IANAL but I imagine photos do not "stand alone" - the side that uses them has to make a convincing argument that they are trustworthy.
That being said, movements like the anti-vaxxers and the flat-Earthers are testament to people's ability to believe whatever the hell they want.
Everyone knows that a still image can be altered to (convincingly) depict something that never happened. So, a still image is not considered good evidence of anything unless it has a verifiable provenance, chain of custody etc. Presumably that wasn't always the case, but now that photo editing tech is universally accessible, we all know we can't trust a still image unless its authenticity can be corroborated somehow.
The deepfake tech merely puts video into the same category of (un)trustworthiness. The potential for abuse depends on people's trust that video is always authentic. So the "solution" is simply to make it as widely-known as possible that video is now easy to fake.
Stuff:
1. Advice like "Use consistent and descriptive identifiers and names" - is general programming advice, not SQL style advice, and is so bland as to go without saying (would anyone seriously recommend being inconsistent or non-descriptive?)
2. Preferring standard SQL to vendor-specific SQL just isn't practical for nontrivial use cases.
3. "Use /.../-style comments where possible" - why? This makes commenting out large blocks of code really fiddly. Using double-dash comments, even for multiple-line comments, leaves /.../ usable for knocking out big blocks of code.
4. The advice on table naming - if a table contains one row per xyz, then calling the table xyzs and calling its id xyz_id is sound practice, arguably even if this does violence to the natural language in which xyz is a word. This reduces cognitive load on devs and makes the naming more predictable, especially bearing in mind that not everyone speaks the same first language.
5. No idea why "cars_mechanics" is worse than "services". "services" could mean practically anything.
6. There's a lot more to be said about table aliasing. Personally I prefer a, b, c... and then in derived tables, different groups of letters such as x, y... or p, q... . Stuff which requires an alias which will never be used (e.g. a derived table which is simply selected from) is aliased by _.
7. The guide says Hungarian prefixes are to be avoided, but a _num suffix denotes a number? Doesn't seem consistent.
8. All the advice on portability is unnecessarily opinionated. Portability is a concern that varies from completely unimportant to completely necessary, depending on what you're trying to achieve.
9. Indentation and layout - there isn't a "one size fits all" rule - it just comes down to judgement and taste. The given examples also look weird:
SELECT r.last_name
FROM riders AS r
INNER JOIN bikes AS b
ON r.bike_vin_num = b.vin_num
AND b.engines > 2
(a) Tables "riders" and "bikes" are siblings in this join so why are they indented to different levels?
(b) The AND isn't symmetric with respect to its operands.IMHO this is better:
SELECT
r.last_name
FROM
riders AS r
INNER JOIN
bikes AS b
ON
r.bike_vin_num = b.vin_num
AND
b.engines > 2
Arguably, "b.engines > 2" should be in a WHERE clause instead of the ON clause, because it doesn't refer to table r. The query result is the same and the query planner probably produces an identical plan (depends on engine, of course), so this is genuinely just a style/semantics point.10. "Avoid UNION" - why??
11. Avoid vendor-specific data types - this just isn't practical real-world advice. Sometimes you commit to a certain DB because you need to use its specific feature set. That's OK.
12. "Prefer NUMERIC and DECIMAL to REAL and FLOAT because rounding errors are annoying". This is completely determined by your specific requirements! Essentially this advice is saying "always prefer arbitrary-precision arithmetic". 32-bit and 64-bit floats are much faster and more compact than arbitrary-precision and are accurate enough for a very wide class of use cases. IMO this advice should be turned on its head: "use floating-point unless you know you need higher precision and you understand the performance/storage implications" - which would be the default approach in most programming scenarios.
13. "Avoid table partitioning" - this is a design/performance concern, not a style concern, and it depends entirely on use case.
14. "Avoid EAV, use a different product" - not real-world advice. Most devs don't have the luxury of just introducing different products when they run into an awkward scenario, and even if they did, introducing a whole new DB engine carries major overhead. Sometimes you just suck it up and have a small EAV wart in your design.
From a formal mathematical standpoint, you define things in certain ways and then work with the definitions. It's not like there is a "correct" value for 0^0 out there that we can mount a search for.
It's roughly the same with discussion of 0.999... - people still debate whether it's less than or equal to 1. You just have to use the definitions. In this case, 0.999... is shorthand for an infinite sum. An infinite sum is the limit of the sequence of its partial sums (where such exists). In this case the limit is provably one. So that's the value of 0.999... . If you look at a series like 1 - 1 + 1 - 1 + ..., its sequence of partial sums is divergent, so it doesn't have a value and that's that - although that doesn't mean we can't apply all sorts of alternative definitions to try to work with such a series, and some of them do in fact assign it a value. Such alternative definitions can produce really weird-looking results - one of the most striking is the result that (subject to certain definitions) 1 + 2 + 3 + 4 + ... is -1/12.
I think this isn't a question of ints being a mistake and UUIDs being better, it's about using the most appropriate type based on requirements.
There are plenty of good alternatives out there. The price you pay for getting to use computer systems which don't betray you is the cost of learning to use Linux or BSD (these days, nothing like as painful as it used to be) and going without some "conveniences" like magical available-everywhere cloud-synced everything. In my book that's a tiny cost for the ability to keep proper control and ownership of my own shit.
In the case of drugs, it is clear that people will use them regardless. So the question for policymakers can't be "how do we stop people using drugs?", it has to be "given that people will use drugs, how do we minimise the harm caused?"
The other interesting parallel is ashtrays in aeroplane toilets. Supposedly they're there because sometimes, despite the warnings and no-smoking signs, people light up in the loo anyway. It's better for them to have an ashtray to put the cigarette out in than to try to improvise and possibly start a fire. In a situation where a planeload of passenger's lives could be at stake, there's no room for moral grandstanding - they've done the pragmatic thing and realised that when total prohibition cannot be enforced, you simply do what you can to minimise the damage.
Maybe I'm abusing the term "package management". I'm talking about go get, the way imports function, the cute private/public lowercase/uppercase mechanism, the recently-added vendoring support etc.
1. Go's strict, statically typed, thou-shalt-check-thy-errors approach is a breath of fresh air. The compiler does a whole load of checking which can (and therefore should) be automated, which in many other languages is left to the developer. Go code tends to have the property that if it compiles, it probably works as designed. I love this.
2. IMHO it makes more sense to think of a web app as a server application one of whose functions is to listen for and respond to HTTP requests. So, the question I'd ask is "is this a good language for server programming, and how easily can I make it speak HTTP?" In Go's case I've found the answers to be "hell yes" and "very".
3. The tooling is really nice. go fmt takes a whole load of pain away from everyone (no more effort required to format code properly, the tab/space and where-to-put-the-{ debates are solved decisively, reading other people's code is made easier), the package management is lovely, statically-linked executables are easy to move around and go doc encourages proper commenting.
4. Really good performance.
5. The biggest drawback I've seen with Go is verbosity - although a lot of the time it turns out that my verbose Go code is checking errors properly and my compact PHP code wasn't.