Thursday, May 1, 2014
Yet another reverse proxy
The general idea of reverse proxy is quite simple. Sometimes, one wants to designate a portion of a website to return a copy of another website.
Monday, April 28, 2014
Hash of a hash of a hash
Problem: there are two MySQL databases on two different websites that should be mostly identical, except for maybe a few tables. I would like to figure out quickly which tables don't match so that I can run a manual sync.
Monday, April 14, 2014
Reverse proxy needed
HTTP reverse proxies are a Useful Thing. Sometimes it's for exposing an endpoint from behind a firewall that you don't control, sometimes it's for moving a service from one public URL to another while not leaving legacy consumers in the dark.
Tuesday, April 1, 2014
Splitting GIF into frames on Android via giflib
PREAMBLE: the app where this technique originated is no longer using it. I've integrated GifFileDecoder by Google and never looked back. Had to patch it somewhat, though - my GIFs are small, makes more sense to read them into memory rather than display progressively.
UPDATE: it's now a Gist.
This is a followup to my answer at StackOverflow regarding animated GIFs on Android. Folks want code - I've got some. The general idea is - use giflib to get RGB(A) pixel data for each frame in a format that's compatible with Android's, feed the pixels to bitmaps, display the bitmaps.
UPDATE: it's now a Gist.
This is a followup to my answer at StackOverflow regarding animated GIFs on Android. Folks want code - I've got some. The general idea is - use giflib to get RGB(A) pixel data for each frame in a format that's compatible with Android's, feed the pixels to bitmaps, display the bitmaps.
Thursday, March 27, 2014
Inflating a bicycle tire with a potato
The inimitable Raymond Chen of Old New Thing fame once wrote a blog post about using inappropriate tools for the job. It came to my mind the other day when I needed to do a timestamp-based conditional in a batch file. The underlying cause was rather vanilla - file H is generated from file X, so if file X was modified later than H was, the batch needs to rebuild H.
Wednesday, March 26, 2014
SEH for fun and profit
PREAMBLE: this technique is no longer necessary. As of Visual Studio 2015 Update 2, one can mix C++ exceptions with SEH.
The built-in crash reporting of Windows Phone 8 sucks. It doesn't report registers, stack, what modules were loaded at crash time... Definitely not something you can debug from.
The built-in crash reporting of Windows Phone 8 sucks. It doesn't report registers, stack, what modules were loaded at crash time... Definitely not something you can debug from.
Friday, June 4, 2010
Not a real boy
Of all mobile software platforms, I have extensive development experience with three: Windows Mobile, BlackBerry and iPhone. For all three, there's a simulator for ease of debugging. And here's my expert opinion: the Microsoft Device Emulator is the best. The BB simulator does not support multiple debugging sessions in a row - if you change and recompile, you have to restart the simulator, and that takes a nontrivial amount of time. The iPhone simulator is not that bad, but it has considerable differences with the real device. Also, you cannot run arbitrary software on it - the simulator does not actually simulate the ARM CPU of a real iPhone, it runs compiled Intel code.
Microsoft Device Emulator, on the other hand, emulates ARM instruction set to a tee, supports debugger reconnection, and on top of that, approximates real device performance reasonably well. Hats off to MSFT. Apple Computer and RIM - you officially suck.
Microsoft Device Emulator, on the other hand, emulates ARM instruction set to a tee, supports debugger reconnection, and on top of that, approximates real device performance reasonably well. Hats off to MSFT. Apple Computer and RIM - you officially suck.
Subscribe to:
Posts (Atom)