69 karma · joined October 7, 2014
Techie based in Stockholm. I do machine learning, computational linguistics and anything else interesting. Currently, I'm working with fintech.
lundborg.io github.com/cortex wrapp.com
I don't expect experts to always be right, sometimes the best prediction turns out to be incorrect. This does not change the fact that it was the best prediction at the time it was made, given the available data.
I personally feel that this is exactly what Tegnell is doing in public discourse, he is very quick to point out when there are uncertainties and what the nature of it is, but is still able to present clear advise. He has also demonstrated willingness to change when new evidence is found. This is a far cry from what I see many politicians are doing, and I think this is the reason he is enjoying very high trust from the Swedish general population.
* Closing borders when we already have a pandemic in all countries. Swedish borders are still open.
* Closing schools when most evidence shows that it is not effective. Swedish schools are still open.
There is of course lots of debate about this in Sweden, some are worried that Sweden is not taking enough decisive action. There is however a wide-spread general support that the more measured approach in Sweden is a good one. Anders Tegnell has become a very popular public figure for his low-key bureaucratic but yet humoristic way of explaining the uncertainties involved and why Sweden is doing things this way.
I believe that the reasons these measures are taken in other countries is because it is a way to show strong political leadership in a time of crisis. I think this approach works less well in Sweden because people have very high trust in experts and (well-managed) authorities.
* Sweden decided early on that an evidence-based approach should be followed. Many policies that are implemented in other countries do not have a lot of evidence showing their effectiveness
* Policy is still primarily dictated by the experts at Folkhälsomyndigheten (where Anders Tegnell is from), and not by politicians. Most actions taken by the Swedish government has been pretexted by "as requested by FHM we have...". State epidemiologist Anders Tegnell is generally seen as "being in charge" of the actions taken, even though technically he has very little legal authority.
* Sweden has a very strong history of indepenent government bodies. In Sweden, there is specific legislation preventing government officials from intervening in specific cases if there is a government authority in charge of the issue. The legal term for this is "ministerstyre", "ministerial rule", and even if an action is not technically in violation of this legislation, it is often used if politicians try to intervene in cases without creating general legislation.
* Being a high-trust society some measures that have been implemented as strict laws in countries other than Sweden are instead communicated as recommendations with a very high compliance rate.
As all good things in life, and programming, this is a tradeoff. GraphQL is better when what you are requesting is best expressed as a tree (or a "graph", though only the DAG variety). This is not always the case, but it very often is when building API:s for production use.
Of course, you can express tree structures in table form, but it is not very convenient for clients to consume. In particular if your client is rendering nested component views, what you want is very often something hierarchical.
Another aspect of GraphQL that is better for us production people is that the performance is more predictable, exactly because the language is more restricted. You can't just join in all the things, or select billions of rows by accident. The schema dictates what is allowed.
Of course, again, it is possible to restrict this in SQL, just configure your schemas, limits etc appropriately, but SQL is anything-goes by default, whereas GraphQL is nothing is allowed by default. Whitelist vs Blacklist.
This said, as a language, SQL is clearly superior. It is the most (only?) successful 4GL (declarative) language. I wish more languages were this well-designed, and that there would be more language innovation in this direction.
The way I see it, GraphQL is a DSL for flexibly requesting hierarchical data from API:s in JSON format, optimized for complex evolving API:s. SQL is a full-fledged generic language for relational data transformation. They have different niches, but SQL has a much bigger one.
[1] https://twitter.com/joakimlundborg/status/125091692202945740...
A better example could be where a compiler picks an obscure but faster parallelization operation, or unrolled a loop appropriately in a way that is both faster and unlikely to be written by a competent human, or a complex memory management scenario etc etc.
I think this is not the point of the original article though. I think we all understand that abstractions can in theory bring great benefits, but we do need to scrutinize the cost they add. The hello world examples shows that even with the simplest program we can imagine, the result is extremely far from optimal in popular programming environments. If this is the case, why should we assume that these same compilers are doing an excellent job in situations that are actually hard?
* While you are waiting for code review, review someone else's code
* Aim for reviewing two CR:s per CR you submit.
This has helped us both keep on top of the CR queue and to have something that is not too distracting to do while waiting for review.
Hey, if it was so easy to design an API that is "thought through properly", show us the spec already - there are plenty of hackers around to build it. If it actually worked like that.
I think it is interesting to think about what the versioning scheme says about the development model and methodology of the project:
Linux currently uses even-odd versioning, but regardless tries to never break APIs or ABIs https://en.wikipedia.org/wiki/Linux_kernel#Version_numbering After much debate, Linux switched from a model where the major number never changed, which is kinda inline with semver. But since this seemed increasingly silly, to have a 3 there forever, they decided to just throw this overboard and start incrementing the version number more often. (This discussion was much more interesting in reality, read LKML for details).
Android uses an interesting brand-version and actually-useful-version scheme (API level) https://en.wikipedia.org/wiki/Android_version_history This very much reflects how versioning and releasing a new version has become a PR event. It is really funny how this distinction is even reflected in code.
And then of course there are the funky oddballs: https://en.wikipedia.org/wiki/TeX This asymptotically more precise number is suitable for a project that has the idea that it is approaching perfection without changing much. Not sure if every TeX user out there would agree, but it indeed says something about the author =).
There are plenty others, and of course it can be confusing if you think that semver is the only game in town. Perhaps the ideas expressed in the semver spec simple does not suit everyone.