A year ago, I began working on my current biggest pet project — Virtual Megus, a generative music system. Music is my hobby, and programming is my job. Projects which combine both of my main passions were always my favorite. I had the idea to create a program that composes music for years but never did it. Last August, I was on vacation and had plenty of time, so I finally decided to give it a try.

Brian Eno, an ambient music pioneer, used the term “Generative music” to describe any music that is ever-different and changing, created by…


While working on the new Flutter app, I needed to make some screens appear in portrait mode only, others in landscape mode, and some should have supported both orientations. I had never done it before; all my previous apps were in portrait mode.

After quick googling, I’ve found the SystemChrome class and this question on StackOverflow. The mixins from StackOverflow answer work great until you begin to use Navigator. When you push new screens to the navigation stack, everything is fine, but when you pop, the orientation settings of the previous screen are not restored. There’s no lifecycle function like…


Last October, I made the first demoscene production after an almost two-decades-long break — a demo for PICO-8 fantasy console “PICOCHAK: Attack of Donuts.”

The moment I had learned that CAFe demoparty is going to be back in 2019, I decided to take part in it. In 1999, CAFe became the first party I had visited. I wasn’t creating PICOCHAK alone; other members of the PICOCHAK team are:

It was…


This is the third article in “Creativity through limitation” series. In case you missed the previous ones:

When I first learned about Shadertoy and browsed through some works there, my reaction was: “HOW???!!!” I already knew what shaders are because I’m interested in computer graphics and learned OpenGL basics. This knowledge only amplified my fascination.

Shadertoy is a place where anyone can share their experiments with realtime procedural computer graphics. It is created by Inigo Quilez (a demoscener and a former Pixar employee) and Pol Jeremias (currently working at Pixar). …


If you’ve ever tried to get a job in a big company or participated in a programming contest, you know what coding problems (or coding challenges) are. A typical example would be to “implement a queue using two stacks.” Many people hate them as a part of interviews because coding problems don’t demonstrate your ability to write good code.

Most coding problems are irrelevant to the daily job of a developer, and there’s no practical application for them. They’re just brain teasers or exercises. However, that is why I like them, and I would recommend programmers to solve them at…


It is the second article in “Creativity through limitation” series. Check out the first one: 8-bit demoscene. In this article, I’m going to tell you about the fantasy console PICO-8 and recreate two classic demoscene effects with it.

When was the last time you coded something just for fun? If you’re like me, then it hasn’t happened for years. However, about a year ago, I learned about PICO-8, bought it, and I have to say that these were probably the most worthy $15 I spent on myself last year!

What is PICO-8?

PICO-8 is a fantasy console for making, sharing and playing tiny…


Last month Wise Hedgehog Studio team took part in Ludum Dare 42 game jam. A game jam is an accelerated game development competition. Ludum Dare is the oldest and widely known online jam. It is held three times a year. You have two or three days to create a game that fits a given theme. This time participants submitted over three thousands games!

It’s our second time participating in Ludum Dare, and we loved the experience. Over the weekend we created a little puzzle game “No Space In My Stomach” about an extraterrestrial snail Stewart.

Play “No Space In…


Stellar Contour by PheeL/Antares

“Creativity through limitation” is an excellent approach to creative work. Sometimes you feel overwhelmed with possibilities and get stuck because of this. It may seem strange at first, but adding constraints and limits can boost your creativity. You can come up with artificial limitations or use a tool that limits you. It works in any area: music, art, etc. Programming is not an exception. This article is about demoscene on 8-bit computer platforms and the most common trick everybody used to overcome limited graphics possibilities of these platforms.

Demoscene is a computer art subculture; its roots are in software cracking…


To become a better programmer, you need to keep doing two things: practice and learn. Yes, it’s that simple and obvious. Finding what to learn may be difficult, and it’s great when there’s someone who can give good advice. I didn’t get much advice myself through my developer career, so I try to be a better leader and guide members of my teams. Here are several common recommendations I give to every junior developer.

Learn the basics of functional programming

I had a short Lisp course at the university, but I didn’t understand how can I use what I learned. For a long time, I ignored…


Hello, my name is Roman, and many people know me as Megus. I started to learn programming when I was six, and this year I’m celebrating thirty years of my programming experience (for the last sixteen years I’m getting paid for it). I learned a lot, and I believe it’s time to start to share my experience with the world. The first thing I want to share is my motto:

— Switch your brain on and never switch it off!

I first heard this phrase from the CTO at one of my previous jobs — Alexander Ionov. It sounds so…

Roman Petrov

Software developer and a music composer from Russia.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store