KISS

Be Among the 20% of the Best!

iOS Developer Program Enrollment

| comments

I’ve been a software developer for mobile platforms. During my short career, I’ve developed for iOS, Bada, Symbian, and Android. The most interesting platform and developer tools for it is iOS so far. It provides a great language (Objective-C), SDK, tools, and documentation. Most of that is free, however to test your apps on a device you, as an Apple Developer, need to join the iOS Developer Program.

This is a small post about my recent enrollment into the program. Here are a few important points:

  1. Apple is very strict about your personal information. That is, your name in the account and on your paying debit/credit card must match, otherwise you’ll be required to provide an ID with your photo. It’s not always possible to change your name in the account, I had to email and call the support for that.

  2. If you pay with your card that has a limit for online purchases, you’ll need to call to the bank to lift the limit temporarily. NB: Apple doesn’t charge your card right away after you placed your order! In my case, the delays were about six and twenty hours the first time (two attempts for an order), and four hours (successfully) for the second order.

Great, I can now test apps on devices, publish them to the App Store, and attend the WWDC!

Automation: PDFs, Preview, and Vim

| comments

I sometimes need to extract certain pages from a big PDF document into a new one. Assuming I have a 150-page PDF, I can use such a command:

1
pdftk input.pdf cat 1 2 4-8 16-32 64 128 output output.pdf

pdftk is a great tool for this task. However, it takes a lot of time to go through the document, select the pages to extract, and write the numbers in the command line. Luckily, I’ve come up with a solution.

Wireshark: Setting Up Dissector for USB AOA Packets

| comments

I’ve had some experience recently writing a protocol dissector for Wireshark. The easy and faster way is to write in Lua, whereas for faster dissection you need to write in C. There are bits and pieces of information of how to write a dissector in Lua on the internet. However, there is much less information regarding USB support.

Do You Know What This Thing Is?

| comments

English is an interesting and international language. Non-native speakers probably never stop learning it.

I’ve stumbled upon a few odd words that describe an unnamed thing. Behold:

  • doohickey: a small object or gadget, esp. one whose name the speaker does not know or cannot recall: a garage filled with electronic parts and other valuable doohickeys.

  • whatchamacallit: used to refer to a person or thing whose name one cannot recall, does not know, or does not wish to specify: she wanted me to get the whatchamacallit from her bureau.

  • thingamajig: used to refer to or address a person or thing whose name one has forgotten, does not know, or does not wish to mention: one of those thingamajigs for keeping all the fireplace tools together.

Use these words sparingly. How do you like them?

Threads Synchronization by Logging

| comments

Hi! Today I’d like to write a small note/reminder about a subtle and unintended threads synchronization “feature” by using a shared object, for instance logger. The example will be in Java, and you can check it out with your favorite language (not to say that Java is mine).

About Partial Mocking

| comments

Automated software testing on mobile platforms (iOS and Android) is luckily becoming more and more prevalent. There is a number of frameworks on both platforms for unit testing, integration testing, BDD, and so on.

And here’s a topic I bumped into recently: partial mocks. In a nutshell, you can mock only certain methods of an object, whereas all the other ones are real.

Preview.app Can’t Open PDF Files

| comments

Update on 2014-02-16: I’ve found a fix for the issue. Run this command in the terminal: xattr -d com.apple.quarantine filename where filename is the path to and name of the problem file.

I’ve bumped into an interesting issue on my OS X. The Preview.app couldn’t open PDF files:

X.pdf is damaged and can’t be opened. You should move it to the Trash.

NDK Build in the Latest Gradle-android Plugin

| comments

As I have written in a recent post, I migrated an android project to gradle and had to add NDK build steps there. It worked well, until I upgraded the Android Studio to 0.4.0, which triggered an update to gradle 1.9, which triggered an update to 0.7.0. I had a few issues to resolve after that. Read on to know how to resolve them if you’re in the same situation.

Gradle: Auto Detect Android SDK and Build Tools Versions

| comments

Gradle is the new build system for android apps. In the build script you need to specify what SDK and build tools versions to use, and if a new developer or customer doesn’t have that exact version installed, when importing into Android Studio, they’ll hit an error message like failed to find target android-18. Or that’s the case when a bunch of developers have different versions installed. You probably don’t want to make changes in the build.gradle file all the time. So I wrote a couple of functions on Groovy to automagically select the latest versions available.