Sometimes You screw up your database design and you have redundancies i.e. your database is not normalized. If You want to correct that: Subqueries for the rescue! Continue reading “SQL-Basics – Subqueries: Update column with values from another column”
You can comment your queries with
-- This is a comment in SQL SELECT * FROM my_table -- WHERE id = 1
Keep it simple, stupid!
When we first released our tool to the end user, we proudly named it v1.0.0.
This is called semantic versioning – major.minor.patch
Makes sense for libraries where a minor change e.g. 1.0.0 to 1.1.0 means interface compatibility, just some new functions. A major change e.g. 1.0.0 to 2.0.0 means “Attention, I have to adapt interface changes” (renamed functions, added function parameter, different dynamic behavior )
But for a customer tool like a portal what does semver mean?
Is moving a button a major or minor change? What about renaming some menu items?
Ok, the next attempt was a bit more straight forward: we used the year and the calendar week like this 2017_cw16.
Not too shabby. But: Is a calendar week of any importance?
Versioning ala JetBrains
Sometimes You need that Eureka moment: staring at the splash screen of my PyCharm IDE:
Why don’t we use this sceme: YYYY.R (year.release e.g. 2017.2)?
What are the advantages?
Divide and Conquer: You can sort your backlog very roughly into the upcoming 4 releases.
Clarity about “What is the next release?” If 2017.1 is out, 2017.2 will be the next
We are running an experiment for multiple tools at the moment to see how it will work.
From time to time you have annoying things to do which you cannot avoid e.g. split names into surname and last name.
Here comes the flash fill feature:
Given you have the full names in column A
- Go to cell B1 and enter the last name
- Go to B2
- Go to tab “Data”
- Click Flash Fill (or Ctrl + E)
The rest of the B column should be filled with the last names
Repeat for first name in column C
Cheat Sheet for myself 🙂
|Ctrl + X/C/V||🙂|
|Win + Pause||Control Panel\System and Security\System|
|Win + L||Lock Computer|
|Ctrl + Alt + Del||Lock Off / Shutdown|
|Win + R||Open Run Dialog|
|Alt + Print||Copy screenshot of complete screen to clipboard|
|Alt Gr + Print||Copy screenshot of active window to clipboard|
|Ctrl + Shift + Esc||Open Windows Task Manager|
|Win + Arrow Left / Right||Arrange Windows|
In Windows 7 You can use Alt Gr + Print to take a screenshot of the currently active window and put it into the clipboard.
TL;DR: don’t use var anymore when You declare variables.
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 makes it necessary to distinguish between these two major versions. I’ve found a nice page which deals with this issue. Here is what You must do to make it work in both Python 2 and 3:
import sys if sys.version_info < (3,): integer_types = (int, long,) else: integer_types = (int,) isinstance(1, integer_types)
Fiddling around with the wire webapp which is available on GitHub I came across yarn. Yarn is a package manager like npm which accesses the same repositories. The design goals are reproducibility of builds, speed and security.
npm install -g yarn
or on macOS Continue reading “Yarn – A new package manager”
When You are writing a lot in web forms e.g. issue tracker You definitely want a spellchecker enabled.
In Firefox You can do this via a config value.
- Type “about:config” into navigation bar
- Accept the “I will be careful” reminder
- Search for “layout.spellcheckDefault”
- Double click on entry
- Set value to 2
This will enable the spellchecker for multi-line controls and single-line controls.