Malcolm-Soft
Malcolm-Soft

Posts

subscribe via RSS

UTF-16 Anywhere?
January 3, 2016 15:40

Another question about Unicode popped up not so long ago into the “attention magnet” list of questions on the StackExchange network. What’s interesting, even though the question itself is about the total characters possible using UTF-8, the discussion quickly jumped to the limitations of UTF-16 and how this standard needs to be phased out.

It probably all began from the StackOverflow question, Should UTF-16 be Considered Harmful, which has since been migrated to Programmers.SE. The author of the top voted post didn’t settle with his answer though, and now there’s a whole website promoting UTF-8: utf8everywhere.org. And I’ve been really curious about the effort he put into that.

How valid are the claims?

Automatic Android resource generation with Photoshop scripts
January 28, 2014 23:55

A little foreword would be proper, I guess. As it is known, when developing for Android, you have to keep in mind that you should create resources for all the pixel densities. Originally there were only three of them: ldpi, mdpi, and hdpi. However, the progress waits for no one: pixel densities have been growing to crazy numbers, and Google has been slyly adding the letter “x” and got to xxxhdpi by now, which means that now there are six major screen configurations. But even that’s not all, because some resources have several different states. Buttons on the action panel have two states, and that would be decent enough, but common buttons have much more of them.

There are several ways out of this situation: nag your artist, let multiple density support slide and hope that the system is going to somehow handle resource scaling on its own, or you could also do what programmers like to do the most: automation. There are various tools which can help with this. The most advanced one is probably Android Asset Studio. But the icons are, of course, drawn only for the common cases, and if you need to draw something custom, with unique styles, it is a poor helper. And that’s where we have something to rescue us: scripting support in a fairly well-known instrument, Adobe Photoshop. In order to simplify the whole process, your humble servant has written several scripts for myself just for the cases like this, and now I’m sharing them with the readers. This article is where I’m going to describe how they work and how they are used. All the sources can be grabbed on BitBucket, and here I will show major points of interest and also I will shed some light on various tricks of working with Photoshop scripts which could be not obvious for beginners.

How does it work?

About the blog, the site, and myself
January 23, 2014 21:43

Site logo So, here’s my website! Here you will find information about myself, my projects, and also a good share of my thoughts and different stuff I want to share (if you read the posts, that is). Most of my time is spent programming for mobile devices. Today this means that I write mostly for Android. It is certainly possible that it will change in some future because you never know what new developments in IT can surprise you with, but for now Android is my primary area of interest.

But that's not all...