Python 3 – there shall be just int

Trying to contribute to the Flask plugin flask-login I just added these lines: if isinstance(duration, (int, long)): duration = timedelta(seconds=duration) Looking quite plausible, isn’t it? But lo and behold: it doesn’t work under Python 3.x. Dang! The reason: Python 2 has two integer types: int and long. In Python 3 there is only int, which…

Lint your JavaScript with grunt and jshint

After I’ve introduced You to Yarn I will show You more client side tools in this post. Grunt is a task runner which comes in handy for a lot of setup and configuring work e.g. concatenating and minimizing JavaScript or CSS files To get started You can add grunt via yarn to your project yarn…

Node.js with PyCharm

PyCharm amazes me every time. Although it is first and foremost a python IDE you can do full stack web development with it, i. e. you have code completion for HTML, CSS, JavaScript and even TypeScript, CoffeeScript. I wanted to code some node.js stuff and Jetbrains already got a plugin for PyCharm. Before installation: https://www.jetbrains.com/help/pycharm/2017.1/node-js-and-npm.html…