Tuesday, February 21, 2012

The Digital Content Problems and Thoughts


Stumbled on the this article today:
http://conversation.which.co.uk/technology/digital-download-legal-rights-after-death-amazon-itunes-apple

"As it stands, the rights of iTunes and Amazon customers look pretty shaky when it comes to passing on downloads. If you buy a music track from a digital store, you’re essentially buying a license to play that track – a license granted to you only, which isn’t transferable upon death."

I guess that's why I still buy paper books and miss the old-style music media (CDs, tapes). The product that you can actually own, exchange and share freely with your friends and family.

The modern media distribution channels like iTunes or Kindle for example, in my humble option, promote somewhat egoistic thinking in many ways. Try to give your music collection or books that you have in one of your electronic DRM protected collections to your friends and family, good luck with that.
As this article points out you actually don't own what you buy, you can't transfer the ownership, such as give the book or the music album to anybody you want (it's not like giving the paper book).

In case of Kindle, Amazon controls you library and can delete any book at any time, as it did previously already. And if you die your relatives could not inherit what you have collected.

In many ways the content ownership and distribution got so much distorted by having so many "middle men" that the both ends of this system the content author and the content consumer are not getting the best deal they could.

Eventually I think, something has to change and one of possible ways the change might happen is with cutting off the "middle men" and by establishing the direct channels between the content authors and the content consumers.

I really hope it would be DRM-free, you own what you buy and you are free to use it however you
want with authors permission.

Monday, February 20, 2012

Android: "About those vector icons"

One of my friend, previously Windows programmer, started to do Android development recently and was confused with all the variations of screen densities and resolutions he has to deal with.
The first heated argument was about why Android can't use one-for-all image resource and scale it properly for different densities.
In fact Android actually does this for you, but the result kind of sucks most of the time.

The next argument was why can't they use the vector graphics for the images.
I remember I was looking into this myself long time ago and found an article with very detailed explanation, thanks to Kirill Grouchnikov. Posting it here so I don't forget the next time where it is:
http://www.pushing-pixels.org/2011/11/04/about-those-vector-icons.html

Friday, February 17, 2012

Anonymous Pro font

I tried Anonymous Pro font the terminal app and MacVim:
http://www.ms-studio.com/FontSales/anonymouspro.html

It looks good in size 14 bold with antialiasing on.
I like it so far, though this could and would change I'm sure :)

Thursday, February 16, 2012

Git-flow on Windows

I had to spend a day on Windows (OS) today.
Making bunch of open source tools (git  aka msysgit, ssh, cmake, nmake etc.) to work together on Windows is not that pretty.

I really like using git-flow that streamlines the development process with git very nicely.
Here is the useful link on how to get git flow playing nicely with msysgit:
http://blog.reichertconsulting.com/archive/2011/07/04/git-flow-installation-on-windows-using-msysgit.aspx

Basically you would have to get the missing getopt.exe with dependencies from http://gnuwin32.sourceforge.net/packages/util-linux-ng.htm.

Hope this saves you a bit of time.

Tuesday, February 14, 2012

Vim thoughts

One of the frustrations of getting used to Vim editor, is when you get back to the "real world" (browsers, editors, IDEs, etc.) the navigation with h,j,k,l buttons doesn't work, instead they all require you to use "arrow" buttons. IMHO the "h,j,k,l" navigation is so freaking awesome.


Update (02-14-2012):
Vlad, sent me the link to Vimium http://vimium.github.com/ - the Crome extension. Still, as I type this post I have to use arrow keys to move the cursor.
Also need to figure out how to do the same kind of thing for the terminal app, the mail app, etc. ....well, pretty much for every app that uses scrolling and navigation. I wish there was some global setting on Mac OS X to allow to do just that in one single change.

Random Act of Kindness

I went to the Fresh Fields grocery store today and while at the register I
realized that I forgot my wallet at home. I started to move my stuff back to
the basket explaining the situation to the cashier. She smiled and offered to
pay for everything, saying that I can bring money back later (it wasn't like
$20, the total was around $140).
The fact of receiving such trust from the person who doesn't know me at all was a really awesome
experience.
I found myself thinking, that with all the negative energy pouring out from the news, radio, TV,
magazines, sometimes we forget that there are a lot more nice people around.
I took the cachier's name and the phone number and of course
brought the cash back in an hour.
Trust, after all, is such a fragile thing, so when you get it, you really
don't want to ruin it.
... still thinking about what happened today ...

Saturday, February 11, 2012

Building MacVim on Mac OS X

Here are some instructions:
https://github.com/b4winckler/macvim/wiki/Building

The problem that I stumbled upon was the errors with libicon:
Undefined symbols for architecture x86_64:"_iconv", referenced from: ........

The libicon on the system is not compiled for 64bit by default.
To fix this you need to get the latest libiconv-1.14:
http://www.gnu.org/software/libiconv/#downloading

Configure it with:
CFLAGS='-arch i386 -arch x86_64' CCFLAGS='-arch i386 -arch x86_64' CXXFLAGS='-arch i386 -arch x86_64' ./configure
then >  make && make install

After that you can get the MacVim source code and build it fine, got 7.3.401 now.

Latest Vim for Mac OS X

The 7.3 version on Vim that comes with Mac OS X is getting old. It doesn't support some of the latest features and you would not be able to use some of the interpeters like ruby that is not supported out of the box.
One way to improve this is to install MacVim, another one is to recompile Vim from source code configuring some of the missing features. Here is how I configured it for myself for example:

* Get source code:
> hg clone https://vim.googlecode.com/hg/ vim

* Compile & Install:
> cd vim
> ./configure --enable-luainterp --enable-perlinterp --enable-pythoninterp --enable-tclinterp --enable-rubyinterp --enable-cscope
> make -j4
> make install

By default everything will be installed user /usr/local, so make sure that /user/local/bin is specified before /usr/bin in your PATH environment variable, or use a different prefix for ./configure  that already specified before /usr/bin path for example --prefix=/opt/local.

After these steps I got Vim 7.3.434 on my machine.

Wednesday, February 08, 2012

Chrome for Android - remote debugging

I finally got Galaxy Nexus phone,
and the same day stumbled upon the Chrome for Android beta announcement:
http://googleblog.blogspot.com/2012/02/introducing-chrome-for-android.html

Installed it, and, boy, it is fast and awesome :)

Here is just a bookmark for myself on how to debug web apps with Chrome on the phone:
http://code.google.com/chrome/mobile/docs/debugging.html

Saturday, February 04, 2012

Vim, some useful links

I started using vim more actively recently and really enjoying it.
Here is a good find:
http://code.google.com/p/vimcolorschemetest/
The page has links at the bottom with hundreds of colorschemes to preview.

Here is a good article with useful links:
http://nvie.com/posts/how-i-boosted-my-vim/

Also, really liked Derek Wyatt's videos:
http://www.derekwyatt.org/vim/vim-tutorial-videos/

Wednesday, February 01, 2012

Ant macros for Git checkout

...just stumbled upon a couple of useful macros for git checkout here :
<macrodef name = "git">
    <attribute name = "command" />
    <attribute name = "dir" default = "" />
    <element name = "args" optional = "true" />
    <sequential>
        <echo message = "git @{command}" />
        <exec executable = "git" dir = "@{dir}">
            <arg value = "@{command}" />
            <args/>
        </exec>
    </sequential>
</macrodef>
<macrodef name = "git-clone-pull">
    <attribute name = "repository" />
    <attribute name = "dest" />
    <sequential>
        <git command = "clone">
            <args>
                <arg value = "@{repository}" />
                <arg value = "@{dest}" />
            </args>
        </git>
        <git command = "pull" dir = "@{dest}" />
    </sequential>
</macrodef>

Friday, January 27, 2012

Samsung Galaxy Tab 10.1 - Stuck on Boot (link to article)

My Samsung Tablet "has died" today. It got stuck on boot for some reason.
I hooked it up to the computer and checked the logcat (adb logcat). 
It was trying to open the account database on the device, that for some reason got corrupted and after the failing to do so (unable to open database file, db=/data/system/accounts.db) it rebooted over and over again. The database can be easily fixed on the rooted device, but mine was not rooted yet.

After a bit of googling I found this useful article that describes exactly the same problem on exactly the same device and provides the solution:

Essentially, the solution comes down to deleting all the user data (aka factory reset), here are the steps from the article:

"In case you are wondering how to hard-reset your tab, you can follow these steps:
1) Power off the device by holding the power key for about 8 seconds
2) Press the volume down key (the one to the left, as I always confuse them) and then the power key
3) Within a couple of seconds, you'll see two logos on the device, one for USB and another, that looks like a Android dude shoveling earth
4) Press the the volume down button to select the the USB icon, and then press the volume up button to make the actual selection
5) Your device is now in the "fastboot" mode
6) Finally, open up your terminal/shell and type fastboot -w, which will completely erase your userdata and cache partitions (took about 12.5 seconds for me). I got the fastboot by building it from source, but you can download pre-built binaries from various sources on the web
7) Restart your device
8) You should now be prompted to set it up... all over again"

Many thanks to the author of that article Aleksandar Gargenta. 

Javascript from command-line on Mac OS X

Here is a "trick" to get the javascript command-line tool "jsc" available on Mac OS X,  just add a link, for example like this:
sudo ln /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc ~/bin/jsc
then just run "jsc".

Friday, January 13, 2012

YAML parser for Android

I needed YAML parser for Android this week and after a bit of research I found that SnakeYAML might work: http://code.google.com/p/snakeyaml
The only problem was if you try to use the latest code the application would fail with exception that looks something like this in the logcat:

VFY: unable to resolve exception class 21 (Ljava/beans/IntrospectionException;)


This happens due to the dependency on java.bean package APIs that is used to parse getters/setters types of properties (methods). 
There is a prebuilt library already available in the download section for version 1.8 adjusted for Android: http://snakeyaml.googlecode.com/files/snakeyaml-android-1.8-SNAPSHOT.jar (thanks to Alexander Maslov), but I wanted to use the latest code. 
The adjustment for Android is quite straight forward:
* Remove all the imports of java.bean package components
* Remove the throws IntrospectionException from methods declarations in few files (grep, there are only 4 .java files to change 
* In the introspector/PropertyUtils.java adjust the getPropertiesMap method implementation, throw away the use of Introspector. Yep, the library will not support java getters/setters methods serialization after that, only fields, but that worked fine for me.
* Remove introspector/MethodProperty.java file
* If you want to save some time and don't care building and running tests (I know it's wrong, but still), then you can build the .jar library with mvn package -DskipTests=true command.
* Add the final .jar file into your Android project and enjoy YAML on Android

Update (02-22-2012):
Alexander just landed the patches for Android (http://code.google.com/p/snakeyaml/source/list).
Now the latest source code can be easily built with one command: mvn package -Pandroid or to skip the tests mvn package -Pandroid -DskipTests=true. After the build,  just use snakeyaml-1.11-SNAPSHOT-android.jar.

PipedInputStream default size on Android

The PipedInputStream on Android is 1024 bytes by default.

protected static final int PIPE_SIZE = 1024;

In many cases this value is too small, so the constructor with the size parameter should be used instead.

Thursday, January 12, 2012

Android application signing with PKCS12 (.p12) certificate

Here are few useful commands to sign the Android application with PKCS12 certificate.

* Import PKCS12 cert into keystore file:
keytool -importkeystore -srckeystore mycert.p12 -destkeystore mycert.keystore -srcstoretype pkcs12

* Change the certificate alias in the keystore if you like:
keytool -changealias -keystore mycert.keystore -destalias new_cert_alias -alias original_cert_alias

* List the keystore certificates (-v for verbose)
keytool -list -v -keystore mycert.keystore

* Sign the Android APK
jarsigner -verbose -keystore mycert.keystore myapp.apk cert_alias

* Verify that the APK is signed
jarsigner -verify -verbose -certs myapp.apk



OAuth2 with Google C2DM (push)

I had to implement the server prototype for Google C2DM (push) the other day.
The easiest option to get the auth token is to use ClientLogin API: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html  that returns the auth token in one call. One of the problems with this approach was that I either had to store the credentials on the server in order to refresh the auth token if it expires or notify the system administrator to go ahead and re-authenticate through the dedicated web page on the server. 

The better approach is to use OAuth2 API instead: http://code.google.com/apis/accounts/docs/OAuth2WebServer.html
There are couple of things are not well documented:
* When you register the app on the https://code.google.com/apis/console/ there is no C2DM service API to choose. That's fine for now, though it might change later probably.
* One of the parameters "scope" for the https://accounts.google.com/o/oauth2/auth call needs to be set to 
scope=https%3A%2F%2Fandroid.apis.google.com%2Fc2dm (https://android.apis.google.com/c2dm url-encoded)
* Set parameter access_type=offline.This will provide you with the refresh_token in the authentication response, that you can use to renew the auth token when it expires. 

Hope this will save somebody few minutes. 

UPDATE (January 19, 2012):
If you stumble upon the MismatchSenderID error, make sure that when you start authentication (https://accounts.google.com/o/oauth2/auth) that you are not already signed in under your personal google account (hint: the browser cookies) . You should be signed under the google account that you created and that got approved for C2DM.



UPDATE (July 2, 2012):
As of the Google IO 2012 the C2DM API is officially deprecated and this article is not really that relevant anymore.
The new sign ups and the quota increase requests are not going to be processed anymore and Google highly recommends to migrate over to the Google Cloud Messaging (GCM), which is still free and has lots of improvements and additional features. I personally think GCM is awesome. 
Please refer to the official GCM page for more details:
http://developer.android.com/guide/google/gcm/index.html
I'm looking forward to change my code to work with GCM pretty soon and will try to write another post on the transition process. Enjoy!

Wednesday, January 04, 2012

Friday, December 30, 2011

Missing pthread_mutex_timedlock on Android

I stumbled upon a problem today that the pthread_mutex_timedlock function definition is missing on Android, though it's declared in the pthread.h.
The first thought was to implement it as a loop with a call to pthread_mutex_trylock and some sleep until we are able to get the lock or until the timeout happens, felt a bit awkward.

I took a look a the Mono for Android source code and that's exactly what they do there (./mono/io-layer/mono-mutex.c), so go figure, looks like this solution might not be that bad after all.


Here is how it's implemented in Mono for example:
int
pthread_mutex_timedlock (pthread_mutex_t *mutex, CONST_NEEDED struct timespec *timeout)
{
 struct timeval timenow;
 struct timespec sleepytime;
 int retcode;
 
 /* This is just to avoid a completely busy wait */
 sleepytime.tv_sec = 0;
 sleepytime.tv_nsec = 10000000; /* 10ms */
 
 while ((retcode = pthread_mutex_trylock (mutex)) == EBUSY) {
  gettimeofday (&timenow, NULL);
  
  if (timenow.tv_sec >= timeout->tv_sec &&
      (timenow.tv_usec * 1000) >= timeout->tv_nsec) {
   return ETIMEDOUT;
  }
  
  nanosleep (&sleepytime, NULL);
 }
 
 return retcode;
}

Wednesday, December 28, 2011

... из жизни


Сегодня на обеде видел одного папашу с маленьким ребёнком (меньше года). Дядька это болтал с двумя тётками которые сидели с ним за столом, пил большую банку Monster Energy Drink и тряс коленкой на которой сидел ребёнок ну наверное с частотой не меньше 300 ударов в минуту, так что казалось что у ребёнка либо голова отвалится, либо будет обширное сотрясение мозга.
"Энергетики" это вам не игрушка....



Nouns vs Verbs

Stumbled upon this post today,  it's almost 6 years old, but I haven't seen it before and enjoyed reading it quite a bit:

Execution in the Kingdom of Nouns

Hope you like it too.

Monday, December 26, 2011

Говорят дети


Саша просит поиграться на таблете:
- Хочу игру где убивают злых поросят ...

(Angry Birds)

Friday, December 23, 2011

How to setup Eclipse for debugging with Android NDK


Just wanted to bookmark couple of useful links on how to setup Eclipse IDE for debugging with NDK. Sometimes it might be more convenient than doing ndk-gdb from terminal, that I still didn't quite get used to yet. It took a bit of time and few tries to get things going. I had some problems with symbols loading and matching, and finally succeeded. Anyways if stuck check comments to these articles. 
  1. Setup your project to be a mixed Java, C, and C++ project:
  2. Setup your project to enable debugging:

Thursday, December 08, 2011

Хочу как у мусорщика


По дороге в детский садик, Саша позади в детском сиденье возится с кепкой.
Я: -Саша ты что там с кепкой делаешь.
Саша: -Хочу как у мусорщика.....

... и одевает кепку набок ...

... а ведь было же время когда завораживали мусорные машины с автоматическими подъёмниками, строительная техника и т.д. ... поменялись с возрастом интересы и приоритеты как-то ....

Friday, December 02, 2011

Android NDK logging

Just wanted to share the snipped that often used in the different Android native projects.
The following are some useful macros for logging with NDK.

#include<android/log.h>

#define LOGD(LOG_TAG, ...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGV(LOG_TAG, ...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
#define LOGE(LOG_TAG, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

You can define more as needed just take a look at the android/log.h header file for all available priority values.
Then I would usually define log TAG:
#define LOG_TAG "MyModule"

and use the macros like this:
LOGD(LOG_TAG, "my val: %s", val);


fopen with native library on Android

If you develop an Android application with some native C/C++ layer (NDK) and 
try to open the file from it by doing FILE *pFile = fopen ("myfile.txt" ,"w");
the fopen call will fail.

The reason is that the current working directory for you application is the root of file system '/' and naturally your application doesn't have access to it.

In order to fix this problem you have to pass the full path for the file to fopen call.
One way to do this is to pass the base path to your application data folder where your application has read/write permissions. For example you can use the Context API getFilesDir().getAbsolutePath()
and pass the result to the native function call.
This particular API resolves currently into something like: "/data/data/[app package]/files/"

In your native code then the fopen call should succeed with 
FILE *pFile = fopen ("/data/data/[app package]/files/myfile.txt" ,"w"); 

Hope this was helpful.

Friday, November 18, 2011

Improved Git development model

If you are just starting to utilize Git in your team I would highly recommend to take a look at the git-flow https://github.com/nvie/gitflow and read the following article:
http://nvie.com/posts/a-successful-git-branching-model/

Enjoy!

Thursday, November 17, 2011

More fun with Android NDK7

I tried to compile cURL library Android NDK7 for x86 architecture and it looks like though the bug was reported in NDK6b: http://code.google.com/p/android/issues/detail?id=19851, the libc is still missing few functions sigsetjmp and siglongjmp.
The easiest solution for me was to get the libc from the latest ICS source tree (built for x86 arch).
Looking forward to get this fixed in NDK8, hopefully before Christmas.


if you are using sem_timedwait on iOS or Mac OS X ....

While porting some C/C++ code to iOS found out that sem_timedwait is not implemented on iOS or Mac OS X and seems like on many BSD systems. Here is the discussion on the topic:
http://stackoverflow.com/questions/641126/posix-semaphores-on-mac-os-x-sem-timedwait-alternative
The discussion a bit old but it seems like it is still a valid one.

For now I conditionally compiled the code with the call sem_wait, will look into a better cross-platform solution later.

Wednesday, November 16, 2011

Native libraries porting to iOS

Recently I spent a bit of time working on porting (getting built) some native libraries with Android NDK and iOS. The port to Android NDK deserves it's own post, that I might write down later.

As for iOS, I primarily needed openssl, curl, zlib and found nice little script, that helps you with the build:
http://code.google.com/p/ios-static-libraries. Just comment out what you don't need and you should be good to go. It's quite easy to repurpose the script to pull the source from your local repos if needed.

One of the problem I had was that I have only iOS SDK 5.0 on the machine and the libcurl build for iPhone device was breaking because "cpp" compiler (export CXXCPP=${DEVROOT}/usr/bin/cpp
) was not found . Apple provided "cpp" compiler for the emulator, but conveniently left it out from the iPhone device toolchain. The easy fix for that is to create the symbolic link in the /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin directory:
ln -s llvm-cpp-4.2 cpp

Hope this saves you a bit of time.

Sunday, October 23, 2011

Android NDK no love for wchar_t

I had to port some existing C/C++ code to Android (NDK) recently.
The code was using wchar_t and wstring quite often.
After a bit of research found out that it might not be as easy as I initially thought.

Basically, the wchar_t support is broken and most of the w* functions are not implemented as far as I can tell.
The wchar_t was essentially defined as one byte char before Android Froyo (2.2) and only starting from 2.3 it is 4 bytes long.

Here is the quite entertaining comment from their wchar.h file:

/* IMPORTANT: Any code that relies on wide character support is essentially
 *            non-portable and/or broken. the only reason this header exist
 *            is because I'm really a nice guy. However, I'm not nice enough
 *            to provide you with a real implementation. instead wchar_t == char
 *            and all wc functions are stubs to their "normal" equivalent...
 */

Is seems like there are at least couple of possible ways to solve this problem:
1. Fix the existing code, and remove the dependency on wchar_t (wstring etc).
2. Try to use the CrystaX android development toolkit instead, that seems to have a better support for wchar_t and other w* APIs: http://www.crystax.net/en/android/ndk/6

Will continue digging into this tomorrow.

Wednesday, October 12, 2011

MIRcon 2011

I'm attending the MIRcon 2011 conference - the second annual conference on information security that my company organizes:

http://www.mandiant.com/news_events/article/mircon_event_page

The conference is open to everybody and it is free.

Here is the couple of thoughts after the first day:
1. It's amazing how much is going on in the area of cyber security, cyber attacks prevention and instant response. Some of the stories can really make you paranoid about security of your personal data and especially (oh so popular)  the cloud security.
2. Ditch Windows. I haven't been using Windows OS actively recently. I'm doing fine with Mac OS X as my primary development platform and different distros of Linux (Ubuntu, CentOS, etc.). Windows is not doing good against the cyber attacks in part because of the properties of OS itself and in part of how popular it is. The more I get familiar with different flavors of *nix (Linux, BSD, etc), the more I get impression that it's kind of more difficult to make some consistent low level type of malware or find some common security vulnerability that can be scaled well, because the *nix distros are different, with possibly different vulnerabilities and differently broken APIs.

Looking forward to the second day of the conference.

Saturday, October 08, 2011

printf ("Goodbye Dennis Ritchie");

Rest in peace Dennis Ritchie


Wednesday, October 05, 2011

Rest in Peace Steve Jobs

Steve Jobs, Apple co-founder and former CEO, has died at the age of 56. So sad :(

Rest in peace Steve ....
http://www.apple.com/stevejobs




Thursday, September 29, 2011

Android HttpURLConnection improvements

This is awesome news , the Android team is finally fixing and improving the HttpURLConnection.


"Apache HTTP client has fewer bugs on Eclair and Froyo. It is the best choice for these releases.
For Gingerbread and better, HttpURLConnection is the best choice. Its simple API and small size makes it great fit for Android. Transparent compression and response caching reduce network use, improve speed and save battery. New applications should use HttpURLConnection; it is where we will be spending our energy going forward."
http://android-developers.blogspot.com/2011/09/androids-http-clients.html?m=1

Wednesday, September 28, 2011

MacBook, the battery status check

Pick up this useful bit today. If you need to check the battery status on the MacBook you can use the command:
ioreg -w0 -l | grep -i capacity

On my MacBook I got:
    | |           "MaxCapacity" = 5936
    | |           "CurrentCapacity" = 1106
    | |           "LegacyBatteryInfo" = {"Amperage"=18446744073709549771,"Flags"=4,"Capacity"=5936,"Current"=1106,"Voltage"=10837,"Cycle Count"=356}
    | |           "DesignCapacity" = 6900

The 6900 is the designed capacity of the battery and 5936 is the max I can get at this point. This kind of gives some info how much the battery degraded over time.




Wednesday, September 14, 2011

Chrome on Mac OS X with Android User Agent

open /Applications/Google\ Chrome.app --args -user-agent="Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"

Wednesday, September 07, 2011

Michael Arrington interview with Arianna Huffington

I found this interview quite entertaining.


Saturday, July 02, 2011

Thursday, June 30, 2011

Ref: Android UI: Tips, Tricks, and Techniques

Just saving the pointer to this post here:
Android UI: Tips, Tricks, and Techniques

This presentation video is worth watching if you are looking for the few tips on the Android code optimization and UI optimization in particular from the couple of the "founding fathers" so to speak :)
The guys do not go deeper on the subject but give a pretty good overview on things to be aware of. The more detailed articles are available on android developers web site.

Android - libs-for-android

Couple of days ago I started to list few quite useful Android open source projects to learn from.

Here is another one I forgot to mention:

libs-for-android

Slightly different approach to ImageLoader implementation, with the public API that binds image view the the url. Also it uses http API from java.net instead of org.apache, that I would probably change, cause I remember having few issues with java.net connections before.

Enjoy!

Wednesday, June 29, 2011

Odd Day

Today one colleague of mine and just a very good guy, that I really enjoyed working with, had his last day at the company after 12.5 years of service.
It's kind of sad to go back to work tomorrow and not to see him again, but I'm glad to see him happy about the new opportunities for him.
12 years at the same company is a long time.....

....And the things get "better" when you find out that there is another great guy that I learned a lot from is most likely to leave in 3 months from now.

Certainly today was not the most productive day.
So, the plan for tomorrow: regroup and try to get my mojo back.

Monday, June 27, 2011

Chromebook - first impression

Just got Chromebook today that was sent to every Google IO attendee this year and wanted to share my first impression.

Pros:

1. The start up and shutdown time is pretty fast.

2. The battery time is very good so far

3. It doesn't get as hot as MacBook Pro


Cons:

1. The Chromebook device feels flimsy. It's all plastic and it gets kind of annoying when the screen vibrates when I type on the keyboard. Might need to get used to the keyboard, missing some keys when I type fast and navigation keys layout is a bit strange.

2. The Wifi is the "corner stone" of this device is very mediocre. In the house where I have full strengh Wifi reception on my MacBook laptop the Chromebook shows just a half (two bars). It shows 3 bars out of 4 when I sit in just 4 meters from the wifi router. It said on the box that the device comes with 100MB/month 3G data allowance, and this is very limiting for the device where network presence is everything.

3. Touchpad does not feel like too responsive, probably I just might need to get used to it.

4. I do't know if it's a quality of the screen or the fonts, but the text doesn't look that pleasant for reading , especially the small fonts. Some fonts seem to be off from the fonts I got used to see in the browser on Mac or Windows.

5. Gtalk feels more limited since I can not resize the chat window or I can't pop it out, cause there is nowhere to pop it out to.

6. I still kind doubt that the browser-only OS will be sufficient for me and that I would like to keep everything I do in the cloud.

It feels like Android OS at this point has some advantages, cause one can still run web applications on it as well as the native apps.

Finally, I understand that I got the Chromebook for free and really should thank Google for this instead, but I kind of hope that my feedback would help to make the next devices and Crome OS better.

I will keep playing with Chromebook some more and maybe, who knows, will change my opinion or even find some positive aspects of this device.

So far I'm not impressed.

Update: One thing the full screen browser experience kind of lack is ability to see both browser windows side by side, it pretty much invaluable in situation when our small kid wants to watch some cartoons on youtube and I would like to read emails or news at the same time.

Android - some best practices with source code

Android applications development although seems to be quite simple, has few things that can be described as a best application design practices. I personally learned many things from my own trials and mistakes, but nowadays you can make few shortcuts and learn from experts.

There are some good code samples that show some good practices shipped with Android SDK. You can always get the Android source code (expect the latest Honeycomb 3.0) and explore how everything is done there.

Also I'm going to list few projects that one can use as a reference for some good practices or inspiration:

1. The Google IO schedule application: http://code.google.com/p/iosched/
2. The Romain Guy's application that he created for Google IO 2011, that has some tips on animation and images handling (LruCache): http://code.google.com/p/xlarge-demos/
3. The application created by Reto Meier that shows some best practices for location aware applications: http://code.google.com/p/android-protips-location/. The post about this can be found here: http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html
4. The Droid-fu library that contains some useful ideas and patterns: https://github.com/kaeppler/droid-fu . I found ImageLoader to be pretty useful.

These are just few recent ones (except droid-fu) .... more is coming.

Thursday, June 23, 2011

Android devices stats

One of the projects I'm working here on is the framework of collecting applications metrics for Android, IOS and RIM applications. There is a bit of client code involved as well as the "big data" processing (Hadoop, Vertica) on the server side.

Recently I was asked if it's possible to get the applications usage report on Phone vs Tablet devices for the different platforms.
Don't ask me why, I don't know the answer to it, it's just needs to be done, period :)

The situation with IOS devices is pretty simple, cause you are pretty much limited to 3 devices:
iPod touch
iPhone
iPad


For android the situation is more complicated, especially since many early tablets are still running Android 2.1 and 2.2 and virtually indistinguishable from the phone with slightly bigger screen.

Currently we use Build.PRODUCT as the main device identifier, that, for example, has "htc_supersonic" value for HTC EVO phones. Now the problem is that we have more than 2000 different android "products" values reported, and every day the new devices are getting announced. So somebody would have to maintain manually the mapping between the device product name and some commercial product name and the type in order to get the kind of report we are being asked for, something like htc_supersonic <=> HTC EVO, Phone.

I wonder if there is such mapping is readily available and also it might be convenient if Google could open the API for that, since the kind of do the final certification for Android devices as far as understand.

Anyways, if you stumbled upon similar problem and have a solution to it, please share.

How to leave the running process on Linux after SSH session is disconnected

.... I had to use this pretty often recently, to kick off the script on the remote machine and exit SSH session while leaving the process running.

Here is how to start the process:
nohup ./myscript.sh > /dev/null 2>&1 &


This post is mostly for myself so I don't forget ....

Sunday, June 05, 2011

Richard Feynman: "Fun to Imagine"

Stumbled upon quite interesting and entertaining videos by Richard Feynman:
http://www.youtube.com/playlist?p=PLC351CC566C21C884

Friday, May 06, 2011

Google IO 2011, here I come!

Having early flight tomorrow morning to San Francisco, will stay in Palo Alto for the weekend, meet friends, drive around, visit few places (Napa Valley? ;) ).
Then off to the city for Google IO conference, can't wait. Should be very interesting :)

Tuesday, April 12, 2011

50 years of space exploration

It's been 50 years since the first human journey to outer space.

I can't say that I'm completely happy with the pace of the space exploration.
There is no doubt that a lot was done there, but it feels like there is more that could have been accomplished during these years.

It's amazing to remember how much enthusiasm towards the space we had when we were young. I pictured future to be a bit different back then after all the sci-fi books I've read after all the sci-fi movies I watched.

It's amazing that after 1972 we never visited the moon anymore or any other planet.

Nowadays it looks like the next generation of young people is more interested in all kind of gadgets/gizmos (iPods/iPads). They either want to be some kind of celebrity and/or own bunch of "stuff" or/and be rich.

I hope that I'm all wrong about this, we will see.

One more day till vacation ...

... looking forward to enjoy this weekend and the next week in Playa del Carmen, Mexico.
Just went through all my scuba gear, packed it all up and ready to go.
...one more day, yeah! :)

Friday, February 11, 2011

Running Man

About 5 month ago I started running.

Our company built one mile trail around the campus at that time and I had to try it. Also my daughter signed up for "Girls on the Run" 5K (km) marathon for December, so I really needed to get in shape in about three months.

I'm quite fit person, but never was a good runner. The most I even run before was when I was at school and we did 3km (a bit less than 2 miles) timed runs in the physical education classes. My work days are full of sitting behind the desk, working on the computer type of "activities", and this doesn't really promote healthy well-being.

My first run I barely made 1 mile, the pace was very moderate, but my heart was racing fast (165bpm+) and I felt really out of breath at the end of the run. This was quite motivating experience. After this, I was even more determined to run 5k marathon by December and I knew that I would have to push harder to reach that goal.

So I kept running about 3-4 times a week and slowly increase the distance. I started to notice that it becomes easier and easier to run once I find the rhythm. By December I reached 5 km (3.2 miles) distance. The first time I run 5K I was like, WOW(!!!), I did it, I never run more than 3K in my whole life and now I did it. There were few other positive changes that I noticed: my running heart rate dropped from (160bpm+) to 130bpm range, the stairs do not cause such a spike in the blood pressure anymore, I forgot when I had a headache last time and I started to feel better overall.

I've read many discussions online where people are complaining on all kinds of running injures they start getting once they start running more. Initially my knees started to bother me sometimes as well. Don't make it stop you from running. You have to listen to your body of course, and if your body starts to "complain" you are maybe pushing it a bit too hard, especially in the beginning, give it more time to heal and recover, but do not stop running, just push a bit less. Instead of increasing distance or time by a mile a week/month, try half a mile or quarter of a mile or maybe even less than that. Try to change the technique how you run to avoid unnecessary injures, try to land softer on the balls of your feet, right under your body center, open up your posture, relax more.

I've heard many people who run actually say how much they enjoy running. For me running is continuous struggle with myself and my laziness. But I found one interesting thing for myself: I really like the feeling after the good run (has something to do with natural biochemistry and metabolism), and the feeling of "victory" over myself (no matter how much I want to stop and rest on the last mile I just have to keep going).

This week I run four days so far, two of them were 4 miles (6.4km) run, the best time was around 32 minutes, maybe it's not that fast, but I'm pretty happy about this accomplishments. If I keep up the pace I hope to be able to run 10K marathon (10km ~ 6.2 miles) in around 50 minutes.

Hope this short post will spread some motivation around.

Keep running, keep pushing! :)

Saturday, December 11, 2010

Android "Gingerbread" SDK - first issues

I downloaded Android "Gingerbread" 2.3 SDK with the new tools the same day it came out, and started to get nuch of errors with the string resources that were using formatting flags: SDK 2.3: Get "Multiple substitutions specified in non-positional format" error.

So the issue was that with the latest SDK tools the absence of positional identifiers in the resource string ends up flagged as errors. Here is a little bit more discussion on this problem:
http://groups.google.com

The solution is to change the resource strings to look like this:
Hello, %1$s! You have %2$d new messages.

Wednesday, October 06, 2010

Friday, October 01, 2010

tips on working with disk images

Just wanted to share a useful tip for working with disk images on Mac OS X.
I had to work with custom android builds recently and as you might know it requires case-sensitive partition or disk image to be able to compile it.

The following couple of functions added to .bash_profile make the mounting and unmounting the disk images easier from the command line:

function mountFroyo { hdiutil attach ~/froyo.dmg -mountpoint /Volumes/froyo; }
function unmountFroyo { hdiutil detach /Volumes/froyo; }

Now you can just type mountFroyo or unmountFroyo, for example, to mount/unmount your custom disk image.

Wednesday, September 08, 2010

How to compile Android 2.2 (Froyo) on Mac OS X 10.6 (Snow Leopard).

How to compile Android 2.2 (Froyo) on Mac OS X 10.6 (Snow Leopard).

Once upon a time I needed to do a custom build of Android OS with some changes to the core components for some custom devices.
The instructions how do get the source and do the build can be found on the Android Developers web site:
http://source.android.com/source/download.html
Everything went smooth, I took the latest code and compiled just fine, but.....
.... later I found out that I needed to have my build done based on Android 2.2 (Froyo) branch instead.

The "Froyo" build is not officially supported on the Snow Leopard and it didn't work right out of the box.
So, I had to spend a little bit of time to figure out how to make it work.

Here are the steps I had to go through:
* Follow the steps on http://source.android.com/source/download.html to get the source code and setup your build environment.
* Make sure you have XCode installed with support for Mac OS X 10.4(!) development.
* Install Java 1.5. This one a little bit tricky, since Java for Mac OS maintained by Apple and the older versions are pretty much not available to download. You have to download Java for Mac OS X 10.5 Update 7 http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_7. Then use for example something like unpgk tool (http://www.timdoug.com/unpkg/) to exract the Java 1.5 from there. Replace the 1.5 and 1.5.0 symbolic links in
/System/Library/Frameworks/JavaVM.framework/Versions with the Java 1.5 from the package.
* I checked the Application->Utilities->Java Preferences as well to make sure the Java 1.5 is the first one in the list, although I'm not sure if it is necessarily. It worked and I didn't bother to try different settings.
* In order to start the build you would go to the root folder of the android source code tree and call "make".
* The first problem I stumbled upon was the problem with /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h file it could not be found, while it existed in that directory. I found the solution that worked here: http://code.google.com/p/android/issues/detail?id=5000
Basically just coping the file : cp /Developer/usr/lib/gcc/i686-apple-darwin10/4.0.1/include/stdarg.h /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h
allowed me to proceed further.

* The next problem was a error during compilation of google V8 javascript engine. I went ahead deleted the external/v8 folder and took the latest stable version from google repository: "svn checkout http://v8.googlecode.com/svn/trunk/ v8". As long as V8 compiled and run I was fine with this change in my tree.

* The next error that you would get is
host C++: libacc <= system/core/libacc/acc.cpp
system/core/libacc/acc.cpp: In member function ‘bool acc::Compiler::acceptStringLiteral()’:
system/core/libacc/acc.cpp:4611: error: cast from ‘char*’ to ‘int’ loses precision
system/core/libacc/acc.cpp: In member function ‘void acc::Compiler::unary()’:
system/core/libacc/acc.cpp:4691: error: cast from ‘char*’ to ‘int’ loses precision
system/core/libacc/acc.cpp:4697: error: cast from ‘char*’ to ‘int’ loses precision
system/core/libacc/acc.cpp:4785: error: cast from ‘void*’ to ‘int’ loses precision
system/core/libacc/acc.cpp: In member function ‘void acc::Compiler::globalDeclarations()’:
system/core/libacc/acc.cpp:5904: error: cast from ‘void*’ to ‘int’ loses precision
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libacc_intermediates/acc.o] Error 1

replace cast from int to size_t in these lines


* After all these steps I was able to built the whole tree fine.

The fix for the last problem I found on:
http://wisevishvesh.wordpress.com/2010/04/12/building-eclair-on-snow-leopard/

* And here is some more of useful information I found on that blog:
Creating and Extracting files from System Image
There are two executable that are needed for creating system image and for extracting the files from the system image. mkyaffs2image is for creating and unyaffs is for extracting files. mkyaffs2image is created when Android is built, We have to build unyaffs separately.
The source unyaffs for is available here
Compile the file
gcc -o unyaffs unyaffs.c”


Hope you find this post helpful.

Good Luck!

Thursday, August 19, 2010

Monday, March 22, 2010

Wednesday, March 03, 2010

2-3 USA-Canada hockey final at Vancouver Olympics 2010

Last Sunday I was watching the hockey final game of Olympics between US and Canada. It was pretty emotional. When the US team scored a goal on the last minute of the 3rd period making the score 2-2, I yelled: "Goooaaal !!!".
The funniest part was when my little boy, seeing all this excitement around, yelled after me: "Goooaaal!"

Sunday, February 14, 2010

Intersting TED talk: Dan Gilbert asks, Why are we happy?

Stumbled upon interesting TED talk:
http://www.ted.com/talks/dan_gilbert_asks_why_are_we_happy.html

"...natural happiness is what we get when we get what we wanted
and the synthetic happiness is what we make when we don't get what we wanted

In our society we have a strong believe that a synthetic happiness is one of the inferior kind... why do we have that belief?....well it is very simple
.... what kind of economic engine would keep turning
if we believed that not getting what we want could make us
just as happy as getting it ....
a shopping mall full of zen monks is not going to be particularly
profitable because they don't want stuff enough to make it profitable ...."

"...our longings and our worries are both to some degree overblown because we
have within us the capacity to manufacture the very commodity (happiness) we are
constantly chasing when we choose experience"


"Happiness is not a state to arrive at, but a manner of traveling."
~Margaret Lee Runbeck

Saturday, January 09, 2010

Enjoyed being at the meeting with Saul Hansell

He recently came over from NYT to work for our company.
I really enjoyed the energy and passion that he has as well as the vision for the future of our product. Hope he will not get burned out too soon and will have enough leverage to implement his vision.

Following him now here http://saulhansell.blogspot.com.

Thursday, November 26, 2009

Florida Trip - passing Georgia

On a way to Florida while driving through Georgia there are some places where the sulfur smell from swamps is quite strong. My daughter quickly learned this and on the way back, after 6+ hours driving through Florida, she started to ask me if we are in Georgia now or not. I answered, No.
While driving around Jacksonville, FL we hit the spot on the road where the sulfur smell from the swamps got pretty strong and I hear her voice from the back: "I told you, this is Georgia".

I was LOL :)

Friday, November 06, 2009

Android fun :)

Today was playing with all kinds of UI controls customizations. One thing I needed to do is to be able to draw the background shape around image where only right top and bottom corners are rounded.
After some research and trying different things (because that part of APIs pretty much missing any documentation), I found out that it looks like the left and right is messed up in the API. Here is what works :

<corners android:bottomRightRadius="0.1dp" android:topRightRadius="8dp"
android:bottomLeftRadius="8dp"
android:topLeftRadius="0.1dp" />

As you can see I had to use the bottom left radius to make the right corner round and for the rest of the corners I had to use 0.1dp , because 0dp just didn't work and made all corners not rounded.

Good luck ! :)

Wednesday, November 04, 2009

Busybox

Busybox is pretty useful set of tools for Android development as well:
http://www.busybox.net

Running Android tools on Windows 7 x64

Here is a link how to make it happen
http://code.google.com/p/android/issues/detail?id=3917

Friday, October 30, 2009

Simple Things

Today I went to Halloween swim meet with my daughter. She participated in three different kinds of competitions. It was her first time of any kind of the "competitive" swimming.

The funny thing was that I was worrying, how she would do, and that she might get disappointed with results. etc., while she was just having fun swimming with her friends and not caring too much about results. She was excited and smiling after every race, no matter how she did.

I saw the happy human being today.


Happy weekend ! :)

Saturday, October 17, 2009

Firefox strikes back



no comments :)

Wednesday, October 14, 2009

Tuesday, October 13, 2009

Microsoft SQL Server Database Publishing Wizard

Recently I needed to migrate the database from MS SQL 2005 to MS SQL 2005. By the way, it's not as straight forward as it might look like.

After a little be of searching for solution I stumbled upon the
Microsoft SQL Server Database Publishing Wizard

This tool is pretty good at scripting the whole database structure with data. The name of the tool is not really intuitive. So, I'm saving this link for myself as well on this blog.

How to get the list of installed Android root certificates ?

Today, needed to get the list of trusted root certificates on Android phone to verify which ones are available out of the box.

Here are the easy steps how to do this :

1. get the certificates file
adb pull /system/etc/security/cacerts.bks cacerts.bks

2. download http://bouncycastle.org/download/bcprov-jdk16-141.jar and place it on $JAVA_HOME/jre/lib/ext/

3. run the keytool utility
keytool -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass -keystore cacerts.bks -list -v

Enjoy !

Friday, September 18, 2009

Incredible, amazing, awesome Apple

After watching the original Apple presentation I was left with the same feeling of audience being programmed with constant repetition of thee words : "Incredible, amazing, awesome" ....
Today I found this video:



Enjoy !

Wednesday, September 16, 2009

Gourse

Stubled upon:

Gource
software version control visualization



Pretty cool stuff :)

Tuesday, September 15, 2009

Snoop - WPF Spy

Today found pretty useful utility for the WPF development:
Snoop - the WPF Spy.

The best part that it comes with the source code.

Enjoy !

Friday, August 28, 2009

Nokia N900 on Maemo Linux

Nokia announced their new N900 smart phone that run Maemo Linux. The specs are pretty good. Looks like more mobile devices run the different flavors on Unix/Linux : iPhone, Android, Nokia ....

Here is a link to developers pages for Maemo platform :
http://www.forum.nokia.com/Technology_Topics/Device_Platforms/Maemo.xhtml

Saturday, August 01, 2009

Wedding & Divorce :)

Wedding :)



... and 6 months later

Friday, July 24, 2009

Social Networks



The text under picture says:
"Social Networks
We all are so different here"

North Carolina Buoys - Weather

Stumbled upon the pretty useful web site, that shows all the date from buoys in the water off the North Carolina shore:

http://www.pdfamily.com/weather/buoy/SEbuoy.php

and the one I'm interested in particular the Oregon Inlet Buoy:
http://www.ndbc.noaa.gov/station_page.php?station=ORIN7&unit=E

Currently it shows:
Air Temperature (ATMP): 80.1 °F
Water Temperature (WTMP): 77.4 °F

Thursday, July 23, 2009

Memory leak detection for WinCE

Good write up on the Memory leak detection for WinCE:
http://www.codeproject.com/KB/mobile/ce_crtdbg.aspx

Since the standard crtdbg.h is not available on the Windows Mobile, the author provided his implementation of _CrtSetDbgFlag to track the memory leaks.

Tuesday, June 30, 2009

Stumbled upon BMW video

BMW definitely knows how to get customers to become emotionally attached to their products.

Tuesday, June 23, 2009

Тенис и Бильярд

Сегодня играл немного в тенис и собирая мячики поймал себя на чёткой визуальной ассоциации между катящимся по зеленому покрытию корта тенисным шариком и билярдным шаром на зелёном покрытии стола. Наверное переиграл в бильярд.

Saturday, June 13, 2009

No Vegas for You ...

Today we played Las Vegas Qualifiers 8-ball pool matches and our team lost.
So, no Las Vegas this year.

Monday, June 01, 2009

Lewis Carroll once said

"Begin at the beginning and go on till you come to the end; then stop."

"Now, here, you see, it takes all the running you can do, to stay in the same place. If you want to get somewhere else, you must run at least twice as fast as that!"

Sunday, May 31, 2009

Pool/Billiard Spring 2009 Season

The Spring 2009 season ended with pretty good results for our team. We won first place in 9-ball and the second place in 8-ball in our league and going to play 9-ball Tri-annuals matches next weekend for the right to play in LVQ (Las Vegas Qualifiers) matches.
I got MVP (most valuable player) recognition in 8-ball among SL1-SL4 levels in our league and will play MVP matches in July.

Today I played the 9-ball singles qualifiers match and won, thus I will get another chance to go to Las Vegas in the singles competitions category after I win regionals in October.

Play pool, have fun :)

Friday, May 29, 2009

Google I/O

I didn't get a chance to attend Google I/O conference ... I sure tried .....

It was nice to be able to watch the
Google I/O 2009 Keynote on youtube:



I like the introduction video and music :)

The other amazing thing was Google Wave, here is the Google Wave Developer Preview at Google I/O 2009:



Couple of my friends went to Google I/O, got free unlocked Android phone, the dev access to the Google Wave and lots of positive excitement :)

Thursday, May 28, 2009

Всегда побеждает тот волк, которого ты кормишь.

Когда-то давно старый индеец рассказал своему внуку одну жизненную
истину.
- Внутри каждого человека идет борьба, очень похожая на борьбу двух
волков. Один волк представляет зло – зависть, ревность, сожаление,
эгоизм, амбиции, ложь… Другой волк представляет добро – мир, любовь,
надежду, любезность, истину, доброту, верность…
Маленький индеец, тронутый до глубины души словами деда, на несколько
мгновений задумался, а потом спросил:
- А какой волк в конце побеждает?
Лицо старого индейца тронула едва заметная улыбка и он ответил:
- Всегда побеждает тот волк, которого ты кормишь.

Monday, May 25, 2009

Drysuit scuba certificaton

This long Memorial Day weekend I spent with Sterling Silver Scuba friends at the Dutch Springs, PA.
I finished my drysuit certification and did some fun dives after that. Total of 7 dives in two days, 37 logged dives total.

Really appreciate the drysuit now. The water was 48F (~9C) at the 30ft (~10m) depth and I felt pretty comfortable and warm. Many thanks to my instructor Kevin Davenport, I highly recommend him as instructor and as a dive buddy.

Next step is Rescue Diver: more safety awareness and being able to help other divers in emergency situations. Looking forward to dive on Independence Day weekend of 4th of July.

Saturday, May 16, 2009

Underwater clean up, SUDS fundraiser.


Today I did couple of dives with Sterling Silver Scuba as a part of Project AWARE beach and underwater clean up and a Soldiers Undertaking Scuba Diving (www.SUDSdiving.org) fundraiser. We did underwater clean up in the Mountclair lake and all the proceeds from the dive were donated to SUDS.

I was diving in the dry suit and was very comfortable temperature wise.

The first dive was quite a surprise, the new experience for me. The visibility was 1 feet (~30) at most, I could barely see my hands, and once I got to the bottom at around 15 feet (~5m) it became completely dark and murky, could not see anything. It was like trying to find things in the dark closet.

I tried to use the underwater light but it didn't help much and after about 20 minutes of frustration and not being able to find anything I surfaced, gave up the light and talked to our instructor Kevin. He said that in such conditions the only way to find anything was just to sink to the bottom, pick direction and sweep the bottom with hands. You can not see anything, but at least you can recognize things by touch.
It was fun, like the game where you pick up stuff from bag without looking inside, first you have to recognize thing before taking it from the bag.
Kevin's advice helped tremendously, I found a watch, a lighter, swimming goggles, couple of masks and bunch of other stuff that was not as interesting as these items.
Kevin was bringing bag after bag from the bottom: at least 5 pairs of swimming goggles, bunch of sun glasses, another watch and many more.

Overall it was great experience, diving in practically zero visibility, trying to navigate, keep the direction and recover things that people lost or left at the bottom of the lake.

Happy Diving!

Tuesday, May 12, 2009

Понаприходила молодежь ... :)

- Понаприходила молодежь со своих институтов, ни черта не умеют
- Да уж, раньше специалисты поматерее были
- Ага, Николай Палыч, например. Играл в тетрис на 9 скорости, пользовался клавишой "вниз", и постоянно орал "падай реще уже"

Friday, May 08, 2009

Google Chromium experience


I was researching the Google Chromium project (the source code for the Google Chrome browser).
I checked out the latest source code from Google's repository. It was packaged nicely with Visual Studio solution file with 173(!) projects under it. The build took around 1.5 hours, lots of stuff, lots of 3rd party libraries source code including WebKit.
The thing that I was pleasantly surprised with, that it just built right out of the box, I didn't have to do any configuration, I didn't have to figure out dependencies and etc, everything that is needed for the project under one source tree. Think about it, when was the last time you checkout out the open source projects as complex as this one and didn't have to spend some time first to figure out how to build it and then fight all the build and dependency errors down the road ?

The source code is all lovely familiar C/C++ with STL/ATL/WTL, love it. Now I'm running the debug build of Chrome on my machine, and with full access to source code I can change it as much as I like and even contribute my changes to Chrome project.

Google Chrome rocks! :)

Thursday, May 07, 2009

Chromium Tech Talks

Interesting Google talks videos on Chromium and WebKit browser engines here:
http://blog.chromium.org/2009/04/chromium-tech-talks.html

Tuesday, May 05, 2009

Would you eat a stack of 16 sugar cubes?

A label can tell you there are 39 grams of sugar in your soda, but what does that much sugar look like?
http://sugarstacks.com

Ultimate iPhone App

"The Perfect Drug" :)

Saturday, May 02, 2009

The mind tricks

The Teller, one of the guys from "Penn & Teller: Bullshit" show delivers quite interesting presentation. It's quite a lesson on awareness.

Monday, April 27, 2009

Интересная закономерность:

тот же самый отрезок пути проезжаю за меньшее количество времени, если времени много и никуда спешить не надо. А когда же времени в обрез, то как правило, либо пробка которую приходится объезжать по мелким дорожкам, либо во все красные светофоры попадаешь, либо какое-то чудило перед тобой плетётся 25 миль/час, там где лимит 35 а все едут как правило 45. В результе время из точки А в точку В уходит раза в полтора больше и если не делать поправку на подобные "неожиданности" то непременно можно опоздать.

Friday, April 24, 2009

What would it cost to heat Dutch Springs ? :)


The Dutch Springs, PA is the closest local quarry where we dive, with pretty good visibility (usually 50ft+). The only down side there is the pretty cold water, especially in the beginning of the season, and if you really want to "get wet" early in the season prepare the double layered wetsuit insulation or the dry suit if you have one.

Here is a quite interesting post on what would it cost to heat the Dutch Springs:

http://www.scubaboard.com/forums/dive-ny/281104-new-plan-heat-dutch-springs.html

Enjoy ! :)