Dev Log


Tech blog by Rok Povšič

How to upgrade Postgres on Ubuntu 16.04

This is a guide on how to upgrade Postgres. The commands below will install a new Postgres 9.6 instance, migrate all the data, and afterwards uninstall the old Postgres 9.5 instance.

Continue reading

A list of useful Git commands

Here's a list of Git commands that solve specific problems I encounter sometimes. I find these commands very useful, although I may not use them every day, which means I will tend to forget them and have to re-find them again and again. I'm storing them here for easy access. Maybe somebody's going to find them useful too.

Continue reading

A continuous integration guide for .NET with GitLab CI

Here, I describe the process of setting up continuous integration (CI) for a C# project that is hosted on GitLab.

Continue reading

Which language to use with TWS API (Interactive Brokers API)?

Interactive Brokers has an API called TWS API which you can use to programmatically execute trades, poll current/historical market data, get account info, open positions, etc. Official bindings for several programming languages exist, namely: C#, Java, C++, VB, and Python. All the TWS API functionality is supported in all of those programming languages. Which language should you choose for your trading program?

Continue reading

What is the chance of losing money in the stock market?

The first step of achieving good returns in the stock market is not losing money. What is the percentage chance of losing money in the stock market?

Continue reading

A short guide for new VIM users

VIM is a text editor that makes writing code MUCH more enjoyable. After using it for a long time it's almost hard to believe how people can write code without it. It's like driving a new BMW opposed to an old Peugeot. Everything is just smooth and fast. And unlike BMW, it's free! Watching another programmer write code without using VIM is almost like watching someone type using two fingers (one with each hand). You just want to say: give me the keyboard, I'll do it for you.

Continue reading

Keyboard tricks to write code faster

Using any keyboard layout other than English may be less optimal for programming, at least that was my experience when compared to using ...

Continue reading

Using PyCharm without a mouse

I've been always fan of minimizing mouse/touchpad usage when programming. There is a certain kind of satisfaction when you are able to do everything with the keyboard. You get the feeling of being agile, swift. It's a sign of mastery. There's no unnecessary movement and unnecessary time and muscle power spent. Watching another programmer use their keyboard solely and be fast doing it makes you respect them more. Watching them grab the mouse a lot and wait for them to find the mouse cursor is sometimes even a little painful.

Continue reading

How to fix mouse offset bug in VMWare Workstation under Windows 8.1 host

There’s a bug in mouse behavior that happened to me in VMWare Workstation under Windows 8.1 host with Ubuntu 14.04 as client. When hovering mouse over something and/or selecting something by dragging, the mouse moved it’s position by some offset.

Continue reading

[C#] Why it’s better to have short-lived DataContext

When you work with SQL databases in your C# application, one way is to use LINQ to SQL framework. The way to use LINQ to SQL is to create an instance of DataContext for your specific database and use it to retrieve, insert, update and delete data.

Continue reading