Posts

Pitching tips

I watched this short video of tips for pitching your idea on youtube today. I took the key points and elaborated on them for my product PhysioTrack. Pitching notes: Start with the problem - patients don't do their exercises as prescribed by their physiotherapist Explain your solution - timed reminders from their phone controlled by the physio from the web Introduce the 'team' - 14 years IT experience, worked in a wide variety of private and public businesses

A tool to help you tidy up your JavaScript

More predeployment JS help here. This tool  http://jslint.com/  is a great help. It is very fussy - in the way Java is, not sloppy the way JS allows. I have not managed to iron out all of the issues it came up with, but knowing they are there is a big help and will make my next project that bit neater.

Optimising JavaScript before deployment

This is a great tool:  http://closure-compiler.appspot.com/home Shrinks and optimises your JS before you drop it onto production. Used by JQuery to produce their minified versions, so it has to be good.

Sending date and time information from Android to MySQL

Dates always seem to trip me up. The app that I am currently working on needs to send records from Android to a MySQL back end. The records contain date and time information. The records initially go into a SQLite db on the phone. From there they are read and sent to the back end one at a time and cancelled off the list when sending has been successful. So the problem comes down to putting a date and time into sqlite. Taking that date and time out and sending it across the network to be inserted into MySQL. Here is a synopsis of what I did to get this to work: Create a table on sqlite (column types are largely irrelevant here, so just leave them out). Create a table on mysql (the target) and specify a column type of timestamp for the date and time info. Create a java.util.Date object to get the current time. Using a SimpleDateFormatter format this for insertion into the sqlite db. Next read this row back. Send this value across the network. At the Mysql end use a prepared stateme...

CTRL-C does not work on updated Cygwin

I updated my cygwin (specifically my bash shell) to a 4.something version. CTRL-C did not work anymore. This was a pain as I kept having to kill the cygwin window with the close window x. Was not able to effectively use history and stuff. I 'updated' by cygwin by installing setup.exe again. I filtered the install down to bash so I could find the shell and then clicked on it a few times until is showed version 3.something. This now supports ctrl-c and has retained all my nice history stuff from before. The font is a bit small, but I am sure I can remedy that. Less important than ctrl-c to me.

Using a local MySQL instance for developing on Google Cloud SQL

This keeps giving me trouble, but I think I have it figured out now. Most of the cloud sql docs assume that you will be running your development on a cloud instance along with your production/test. This does not work for me due to the latency associated with the remote dbs, so I go for the local dev option. However in order to get this to work you have to put a copy of the mysql jdbc driver into this folder in your sdk: eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37\appengine-java-sdk-1.6.4\lib\impl (obviously your exact folder will vary depending on your sdk bundle version) Whenever you upgrade your SDK you will need to copy the mysql connector jar to the new impl directory. The latest upgrade to the SDK (1.65) appears to have been a bit panicked. It was released on the evening of the 1.64 release. Oops. There was no eclipse plugin for 1.65. I made the mistake of upgrading the standalone version of the SDK (which I don't in fact use) and copy...

Running emulator and phone simultaneously

When I am developing I often have the need to run something on the phone and the emulator. Due to the long startup time on the emulator I don't want to shut this down whenever I connect the phone. My preferred way to view logs is using a bash shell with the adb logcat command. This however will not produce the desired output when the 2 platforms are running together. Instead the -s for serial number switch must be provided. The format is adb -s emulator-5554 logcat I had previously tried adb logcat -s emulator-5554 which does not work. The adb program gets the logcat param before it sees the switch and you just get a normal log tail. This is a trivial post, but is very handy now that I have figured this out :) To get the list of devices (ie. your phone and emulator serial numbers in this case) enter adb devices at the command prompt.