Use the make tool to speed up development

I’m happy to have a new contributor to my project, who did some cleanup to Makefile (thanks, @buoto!). I thought it’s a good time to write a few words on how the make tool works.

Windows users: to check if you have make installed on your machine type in your command line: make --version. If you don’t, I suggest downloading Gow, which will equip your Windows with most useful Linux commands. Windows 10 users can use Windows Subsystem for Linux feature (how to enable).

What is make tool for?

Reading my tutorials, you could notice I compile many of my examples by hand, i.e. I run commands like this every time:

$ clang++ -std=c++14 timepoints.cpp -o timepoints.exe && ./timepoints.exe

It takes time, is repetitive, it’s easy to forget some option or make a typo somewhere. Another problem is, the set of commands working on one machine may not work on another because of e.g. different OS installed. Continue reading

Konstruisto: Week #5 – Free lots, transportation graph

To move forward I started working on zoning. There is a new type of object representing a lot. Buildings will grow on these later. Currently, there is no zoning by mouse, even though option appears in the menu. Regarding roads, I started road network graph. I think I will finish intersection rendering next week. Pushed 10 commits, total 131.

Continue reading

Konstruisto: Week #4 – Roads once more, buldozer tool

This week was pretty tough on me, so the update comes late. I made a bulldozer tool for buildings. All the buildings in selected area will get removed. I added the executable icon, which is also visible in the window title. There’s new menu to choose the tool, I have to create some decent icons since temporary ones are awful 🙂 Pushed 14 commits, total 121.

Continue reading

My thoughts on blogging after a month (a long read)

Today is the last day of March, a month since I started blogging. I wrote a few articles, some of them are tutorials, some are project updates.

I wanted to share a few observations I gathered as a starting tech blogger. I tried really hard to give them some chronology in the sense of writing the post (plan, write, publish, get feedback, analyze, etc.), but many areas intersect. Continue reading

How do I make a WordPress plugin?

I post progress summary for Konstruisto on Fridays, but not everybody knows what this project is. Every week I have to paste the same formula at the top. It shows in the RSS feed, it generates pingbacks to my articles and is unhandy in many other ways.

I thought I would make a WordPress plugin to solve these problems. It was a great opportunity to refresh my knowledge about the system – I hadn’t used WordPress for three years! Continue reading

Konstruisto: Week #3 – Fighting road textures

Honestly, this week was quite unproductive, speaking of new features. I managed to resolve most of the problems with textures (but it’s still WIP, there are some minor artifacts). I wrote needed geometry checks for the roads; standard intersections render correctly. The rest of the time went for some refactoring and code cleanup necessary to paint on ground tiles. Pushed 16 commits, total 107 (over 100, yay!).

Just like Manhattan, where’s Central Park? 🙂

Continue reading

How to draw in browser with Selenium

Selenium is a testing tool used in web development. It emulates user behavior inside a web browser, right in front of you. It can interact with links, move the mouse and so on. As an example, we will make a script that draws a simple shape in Sketchpad. Selenium has many integrations; I will use Python and Google Chrome driver. And everything under 60 lines of code!

Continue reading