Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs

Dec 18, 2010 by

I wrote yesterday about my (mostly) negative experience working with these companies, but some of you might give it a try and maybe your results will be much better or maybe things have actually improved lately. In any case, the code here should get you up to speed covering most of the dirty work of working with these companies’ APIs.

I will post 4 classes here:

  • AdGrabber -  main abstract class to give all other specific grabbers structure and save some repeating code
  • MillenialAdGrabber - MillennialMedia specific grabber
  • NexAgeAdGrabber - right, NexAge specific grabber
  • SomaAdGrabber - the SMAATO ad grabber. Their ad platform is dubbed SOMA, hence the name

If you are using this code, please give an attribution when applicable with a link to this post.

Read the full story here

Android – Can’t find my ADB

Dec 6, 2010 by

Just installed the new Android SDK – 2.3 and wondering where’s “ADB”? Don’t worry it’s there.

In there recent release of the Android 2.3 codenamed “Gingerbread” the SDK’s directory was a little restructured. In particular the ADB (Android debug bridge) the tool that is used to communicate with the Android emulator instances and connected device has been moved. Previously you could find it in the

path_to_your_Android_SDK_installation/tools

folder.

But since the Android 2.3 (or API 9) the /tools folder was renamed to /platform-tools folder, so if you are wondering why suddenly your >adb command does not work – this is the reason and updating the PATH should fix it.

Windows Phone 7 – how to reset emulator

Oct 26, 2010 by

I needed recently to basically remove my app installation from the Windows Phone 7 emulator. I could not find how you can remove the app from the emulator, but I found a way to reset and force the Windows Phone 7 emulator to cold boot.

You can clear the windows phone emulator state, by deleting the saved state file in:

%ProgramData%\Microsoft\XDE\*.dess

You can just hit the windows key on your keyboard and paste this “%ProgramData%\Microsoft\XDE\” and you will be taken to the right location.

Delete the *.dess files. This will force the emulator to reset and run the cold boot sequence.

Too bad, it’s not possible to do simulator reset right from the development tools. Here’s hoping that Windows Phone Tools development team will improve that situation in the future releases.

Please share your thought in comments.

Load cod file to BlackBerry using JavaLoader

Sep 5, 2010 by

It is simple to load a BlackBerry application packaged as cod file to your device using JavaLoader.exe. With JavaLoader, you do not have to install the desktop manager if you just want to have an ability to quickly load applications to your blackberry

  1. Connect your BlackBerry to your computer through USB
  2. Open command prompt and navigate to the location of JavaLoader.exe
  3. Run “JavaLoader.exe -u=USB load path_to_your_cod_file” command and you should be all set

It is easier if you have the JavaLoader and the COD files in the same dir because then the command is simply

JavaLoader.exe -u=USB load path_to_your_cod_file

UPDATE: The JavaLoader command will not work if you don’t have the BlackBerry desktop manager installed. You will get an error that the port can not be open.

The future of GPU computing

Jul 23, 2010 by

It seems that GPU computing is becoming more and more ubiquitous. Tools are becoming better and better, the applications are becoming wider and wider and the hardware is becoming faster and faster too.

CPU are steadily gaining in productivity. It’s a steadily rising curve. Is it good news though? Depends how you look at it. It’s good that the speeds and efficiency are improving, but apparently CPUs  are improving much slower than GPUs. GPUs computational power for suitable problems (like number crunching) was apriory much higher to start with, but what’s really important is that GPUs are moving much faster i.e. the curve of the speedup is much sharper than that of CPUs.

For about $500 you can get the Nvidia GTX 480 right now with 400+ cores and super fast memory. GPUs in general also require much less space and power and thus are in general much more efficient for heavy number crunching computations than CPUs. Of course GPUs are quite limited in their capabilities and are really suitable for specific tasks, but there are more and more areas where people are starting to employ the power of highly parallel GPU computing with lightweight threads.

There is another caveat with GPU – it’s the slow bus connection. The bus is too slow for the speeds of GPU and there is nothing you can do about it at the moment. One thing that can be done since GPU has so much computing power in parallel, is to compress the data that is passed between the GPU and the rest of the system. 1 to 10 ratio is the standard compression ratio of text, so you can increase the throughput of the bus by a factor of 10 using compression. Of course there is still some overhead and you should make an experiment and see whether this is beneficial in your setup.

Overall though, it seems pretty exciting area at the moment and the true technoratis should definitely pay attention to that area.

Apache ant – fixing “can’t locate tools.jar” error

Jun 3, 2010 by

If you have “can’t locate tools.jar” error when trying to run “ant”, you’ve come to the right place. The fix is apparently very easy, you have to properly set up the “JAVA_HOME” environment variable to Java JDK. The tools.jar is found in the bin folder of the JDK but you only need to point the JAVA_HOME to your JAVA SDK installation and you should be all set!

Easy, right? Go get them!