Tuesday, January 11, 2011

ant build file for android

a. create a build.xml file
go to root of your project and run
> android update project --path .

create secure.properties file and add to it
key.store=keystore
key.alias=aliasname
key.store.password=password
key.alias.password=password

add to build.xml


create signed package:
> ant release

Friday, January 7, 2011

how to woo bloggers to write about you

http://groups.google.com/group/lean-startup-circle/msg/b2f209aa0483849a

Excerpts:

The Pitch
1) Be Honest about why you're approaching the blogger - ie, we just created
this new xp tracking gizmo and wanted your thoughts about it since you blog
about xp/financial topics. I'd like to give you a free permanent account to
review in your own time.
2) Clearly state your offer - We're in the alpha/beta stage and looking for
feedback so if you'd like to share with your readers we would really
appreciate it. .
3) Try to Establish an ongoing relationship - We definitely appreciate your
time and would like to keep you updated on our progress, if that's ok with
you.

Metrics Tracking
1) Try to use at least 3 different pitch variants to a small sample of
different bloggers (say 24).
2) Track each variant a,b,c
3) Based on which has the most success response, optimize to that variant
and expand the target size.

Friday, May 7, 2010

stop php deprecated warnings in browser

I just installed newest version of wamp server on a new windows 7 machine. When I installed the web app, I got a bunch of following printouts in the browser at the top of every webpage:
Deprecated: Assigning the return value of new by reference is deprecated in [...]\cake\libs\inflector.php on line xxx

After spending an hour looking, here is what worked:

1. in cake/lib/object.php: add following in next line after <&ques;php
error_reporting(E_ALL ^ E_DEPRECATED);


2. in cake/libs/configure.php replace
error_reporting(E_ALL);
with
error_reporting(E_ALL ^ E_DEPRECATED);


3. in your php.ini, search for error_reporting and replace the entire line with
error_reporting = E_ALL & ~E_DEPRECATED

Monday, April 12, 2010

svn webdav - view previous revisions

So, if you want to see the previous revision for path
https://svn.company.com/platform/trunk/app/webroot/images/welcome/

Use this URL:
https://svn.company.com/platform/!svn/bc/2615/trunk/app/webroot/images/welcome/

Where 2615 is the revision number I want to see.

Thursday, January 28, 2010

160043 "Could not open the requested SVN filesystem"

After about a year since we set up subversion server, I needed to create a new project. So I ran
>svnadmin create myproject
We have svn hooked with apache - that is, https protocol.
When I tested the new url in a browser, I got the following error:
160043 "Could not open the requested SVN filesystem"

I found a lot of posts on the web that discussed this error message, but none suggested a solution other than upgrading svn and apache builds.
Since existing projects were working fine, I didn't see the need to upset my stable environment.

When I looked at apache logs, I saw the message:
Expected FS format between '1' and '3'; found format '4'

So that give me the hint - what search results for error 160043 were saying was correct, the version of apache's svn mod and svn server doesn't match. What they didn't tell me (or I missed the search result that did mention it) was that the easier fix is to create the project as follows:
>svnadmin create myproject --pre-1.5-compatible

This solved the problem for me.

Sunday, November 1, 2009

Cakephp slow on Windows Vista

I use Vista for development. I find that cakephp development on Vista is painfully slow. Some of my coworkers use mac. I, being a (relatively) poor entrepreneur cannot afford a mac (yet), so I have no option but to keep waiting for page to load for sometimes upto 60 seconds.

I tried various ways to handle the problem - apc and xcache both didn't work with my version of php and apache on windows. Then one day it occurred to me - apc is just an elaborate in-memory cache, so why dont I put my cakephp cache files in memory?
So started search for a (free) RAM Disk. After trying few, I found Dataram RAM Disk was the only one that didn't crash on Vista. Those folks have done a good job with their product. I just need a 10M disk, so their free option works well for my dev server.

Next updated the core.php with:

      Cache::config('_cake_core_', array(
'engine' => 'File',
'path'=> 'E:/',
));
First few times were still painfully slow, but as cache filled up, the website now loads blazing fast. I can now again develop on Vista!

Monday, September 28, 2009

Android - detect device on Vista 64 bit

I spent few hours trying to get it to work. Here are the instructions that helped:

I got these from the following link:
http://forum.xda-developers.com/showthread.php?t=502010&page=21

First set up environment variable:
  1. In VISTA hit WindowKey + Pause\Break to bring up the system properties
  2. Click Advanced System Settings
  3. Under The Advanced Tab click Environment Variables
  4. Click the New button below the System Variables panel.
  5. In the New System Variable dialog box, type devmgr_show_nonpresent_devices in the Variable Name text box and 1 in the Variable Value box.
  6. Click OK, then OK again to close that Window
Now device manager:
  1. Now go to the device manager and go to View > Show Hidden Devices
  2. Look under Hard Drives and delete the HTC Android Phone USB Device
    ** This may show up as Generic Mass Storage **
    Note: When trying to delete the USB controller for the phone, have the phone plugged in first and see how many usb devices are actually conected. Once you disconnect the phone, you will obviously have 1 less connected device. Plug the phone in 1 more time and see which one is now connected and delete just that one. This will help avoid having to reinstall a bunch of usb devices.
  3. Look Under Portable Devices and delete the Android Phone
  4. Look Under Universal Serial Bus Controllers and Delete ANY USB Mass Storage Devices with a greyed out icon ... one if these is for your phone....
  5. Now with the device manager still open ... unplug and plug your phone in. When the window pops up, choose the android 1.6r1 usb driver directory for the device driver dialog.