Author Archives: Victor Laskin

Easy way to auto upload modifications to server under osX (live development)

Here is very simple way to setup immediate automatic upload of source code modifications to server via ssh. This gives you ability to perform live development and testing of your solutions. There are a lot of utilities to achieve this and you even can write some not-so-comlicated script doing recurrent compare of file modification times yourself – but there is very easy solution from Facebook, called watchman. To install it under OsX use Brew

Watchman will call upload script for each modified file – lets write this script and call it uploadauto.sh. It will be really short!

I assume you have ssh keys on server and don’t do manual password entry. Put this script into the folder you want to synchronise. And finally we need to say to watchman to look over this folder and call our script when something changes:

Replace here /Users/me/project1 with your folder name. upload is the name of the trigger. ‘*.*’ is the mask for files to be monitored. More information about trigger syntax can be found here.

And thats all!

Continue reading

Is 4K TV effective for software development?

Until recent time i thought that developer who tried 2x 24 inch fullhd monitors will stay with this setup as must have option for more productive work. (If you still below this setup you must be located at the beach, drink some cocktails and just cant bring monitors with you.) But now is the time to move further upgrading your workplace – now i use 4K 42-inch TV for development.

4K tv for software dev

Why now? In 2014 manufacturers released new cheap UHD devices in range between 39-42 inches. And by cheap i mean less than 1000 USD (I bought some LG 42UB820V model as it had IPS lcd and HDMI 2.0). Only 4K UHD resolution makes 72dpi and can be used as “normal” computer monitor when you sit close to it.

Continue reading

Small guide: how to support immersive mode under Android 4.4+

In Android 4.4 version we have new Immersive mode which allows to make system bars translucent and extend application area to fit all screen. This looks great as it gives more space to application in terms of usability and it creates more stylish look if application design is done accordingly.

Immersive mode for TripBudget

I added support of immersive mode to TripBudget. And there were some unexpected troubles on the way so i decided to write some kind of guide here.

Note: I talk here about immersive mode where bottom navigation bar is hidden – using SYSTEM_UI_FLAG_IMMERSIVE_STICKY flag. This guide is aimed to gather and solve all problems which prevent sticky mode to work properly.

Continue reading

Public localizator – web service for online localization of applications

Here i present small but powerful web instrument for public localization of applications and some more thoughts on software translations, which soon will be published as open-source after some tests in real projects.

Public localizator

Public localizator (beta) – is online web solution for fast translation of application strings to many languages by its users. Of course if you have money to invest in localization by paid services – it will be better solution, but if you have project which has wide range of users, which are interested in translation why not to create interface for them. As i had some positive experience of user translation i decided to create simple web tool. This approach is much better than sending some files/tools to your translators –  translation is easy, its continuous process and you can monitor progress at any time.

Continue reading

How to create parallax effect using accelerometer

This is short guide how to create parallax effect using accelerometer on mobile platforms. Some code is related to Android, but all concept is applicable to iOS, etc.

What is parallax effect? There are some more complex definitions but i would define as simple as the following – you move your phone/device in space and some objects inside your application are shifting accordingly to compensate this movement. This allows to create some strong feeling of 3d interface as well as nice interaction effect.

As good example you can check out my live wallpaper (link on market), which is using this effect while rendering particle system of moving objects. More information about this application can be found here.

To create parallax effect we need to grab data from accelerometer sensor (as i found out gyroscope is not present at majority of phones while accelerometer gives enough of data to be happy with it), convert sensor data to relative rotation angles and shift some parts of application interface accordingly. 3 steps:

Continue reading

Stackblur – C++ multi-threaded version of fast blur algorithm

I found nice algorithm for blurring images – Stackblur by Mario Klingemann. It could do the job relatively fast and gives decent quality. You can check it here – web demonstration. As you can see it can be usable even in web projects.

stackblursample

As i wanted to include it to my cross-platform engine i found two c++ implementations: 

First is SSE friendly, second contains some division optimization via static tables. However, both are not using all cpu cores. I took second one as foundation for my implementation, as i expected my code to work on mobile devices with no SSE support. Single-core processing of 1920×1200 rgba image with 100 px radius took only 219 ms (Intel Q9550, Windows 7).

I improved stackblur code to multi-threaded version – on my quad-core cpu speed results as expected showed 4x improvement – 63ms for the same task. You can download the part my lib below and use it as a foundation to your needs.

Download multi-threaded 32bit-color (RGBA) version of StackBlur:  stackblur.cpp

I believe algorithm can be optimized even further – any suggestions are welcome.

Compact lib for JSON parsing (cross-platform C++)

Recently i was in search of compact C++ source code for parsing  of JSON format. This is very simple minimalistic format and its very popular – but i was surprised when found a lot of complex parsers and no simple implementation inside one cpp-h pair. So i wrote one.

mvjsonlogo

Here it is – tiny C++ cross-platform solution for JSON decoding without any dependencies like boost or something: MVJSON.cpp MVJSON.h (version 1.0)

Continue reading

Alive Numbers 2 – android release of my minimalistic live wallpaper with embedded widgets

Brand new version of live wallpaper –  Alive Numbers 2 for Android devices. Enjoy smooth OpenGl ES 2.0 animation of minimalistic animated background in couple with customisable embedded widgets. New version has adjustable color schemes and ability to hand-tune widget layout. You can choose from set of base animations and play with a lot of options for every widget.

Alive Numbers 2

It can be found by name ‘Alive numbers 2′ or here: https://play.google.com/store/apps/details?id=com.calibvr.minimal

This topic contains screens and details…

Continue reading