In researching how to use Thrift from Python, a Google search turned up some sample Python code that spoke to Thrift using asynchronous abstractions. After gradual typing,
asyncio API, literal string interpolation like you have in ES6, and more!)
example.pyfile in my text editor, write Python code that uses
awaitand type annotations, switch to my terminal, and run
python example.pyto execute my code.
awaitand type annotations, switch to my terminal, run
node example.js, see it fail because it does not understand my type annotations, run
npm install -g babel-node, run
babel-node example.js, see it fail again because I don't have a
.babelrcthat declares the
babel-plugin-transform-flow-strip-typesplugin, rummage around on my machine and find a
.babelrcI used on another project, copy that
.babelrcto my current directory, run
babel-node example.jsagain, watch it fail because it doesn't know where to find
babel-plugin-transform-flow-strip-types, go back to the directory from which I took the
.babelrcfile and now copy its
package.jsonfile as well, remove the junk from
example.jsdoesn't need, run
npm install, get impatient, kill
npm install, run
yarn install, and run
babel-node example.jsto execute my code. For bonus points,
babel-node example.jsruns considerably slower than
node example.js(with the type annotations stripped) because it re-transpiles
example.jsevery time I run it.
As you can see, for many of these features, there are multiple third-party libraries that provide overlapping functionality. (For example, if you were looking for a JSON parser, would you choose
json-parser?) To make matters worse, npm module names are doled out on a first-come, first-serve basis. Much like domain names, this means that great names often go to undeserving projects. (For example, judging from its download count, the npm module named
It might be possible that Python's third-party ecosystem is just as bad as npm's. What is impressive is that I have no idea whether that is the case because it is so rare that I have to look to a third-party Python package to get the functionality that I need. I am aware that data scientists rely heavily on third-party packages like NumPy, but unlike the Node ecosystem, there is one NumPy package that everyone uses rather than a litany of competitors named
Additionally, the browser is not the only place where developers are building UI using web technologies. Two other prominent examples are Electron and React Native. Electron is attractive because it lets you write once for Windows, Mac, and Linux while React Native is attractive because it lets you write once for Android and iOS. Both are also empowering because the edit/refresh cycles using those tools is much faster than their native equivalents. From a hiring perspective, it seems like developers who know web technologies (1) are available in greater numbers than native developers, and (2) can support more platforms with smaller teams compared to native developers.
Overall, I am excited to see how things play out in both of these communities. You never know when someone will release a new technology that obsoletes your entire toolchain overnight. For all I know, we might wake up tomorrow and all decide that we should be writing OCaml. Better set your alarm clock.
This post originally appeared on bolinfest.com.
Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!
Create your free account to unlock your custom reading experience.