Development

Installing iPhone OS 4.0 beta on the iPhone 3GS

The recent announcement of iPhone OS 4.0 beta brought some interested features for developers. I’m still pretty new to iPhone development and was trying to figure out how to update my phone. Below are the instructions once you’ve downloaded the IPSW file to update the firmware.

Installing iPhone 4.0 beta on the iPhone

  1. Make sure to have downloaded the iPhone 4.0 beta firmware that relates to your iPhone (e.g. 3GS).
  2. Extract the firmware IPSW to a folder.
  3. Connect the iPhone to your computer.
  4. Get the UDID registered on the iPhone Developer program. Provisioning Portal > Devices > Add Devices
  5. Open iTunes and click Restore while holding the Shift key (for Windows) or Option key (for Mac).
  6. Locate or browse to the firmware IPSW.
  7. Wait for iTunes to unpackage and install the firmware.

UDID can be view in 2 ways:

  1. In Xcode, navigate to the ‘Window’ drop down menu and select
    ‘Organizer’. The 40 hex character string in the Identifier field is your
    device’s UDID.
  2. OR In iTunes, select your device in the ‘Devices’ section and navigate to
    the Summary tab. Click on the Serial Number label to reveal the
    Identifier field and the 40 character UDID. Press Command+C to copy the
    UDID to your clipboard.
Standard
Development

Quick way to create patch files based on modified date with xcopy

Recent projects and deployment method made it difficult to simply publish changes to a web server. Had been doing it manually (check for modified files, copy and transfer) and thought it was wasting too much time each day when change requests occur. After some quick research, I realized that the simplest method would just be to use the good old “xcopy” command in windows. (this is why command prompt tools should be taught in schools). For a quick refresher on batch commands, read http://www.computerhope.com/batch.htm.

I realize that a proper source control (like Git or Subversion) would be nicer but in my case, a simple batch file is just easier to work with.

Copy and paste the following code in your deployment folder that will create a patch folder based on last modified dates of working files.

[START EVENT.BAT]

@echo off
REM – http://www.computerhope.com/batch.htm
ECHO Usage : events [patch-num] [m-d-y]

SET SRC=c:xampphtdocsevents
SET DEST=c:deploymentevents

IF (%1)==() GOTO END
IF (%2)==() GOTO TODAYDATE

ECHO Copying files modified on %2
xcopy %SRC% %DEST%%1 /D:%2 /S /C /I /Y
GOTO END

:TODAYDATE
FOR /F “tokens=1-5 delims=/ ” %%a in (“%date%”) DO SET year=%%c
FOR /F “tokens=1-5 delims=/ ” %%a in (“%date%”) DO SET month=%%b
FOR /F “tokens=1-5 delims=/ ” %%a in (“%date%”) DO SET day=%%a

SET TODAY=%month%-%day%-%year%
ECHO Copying files modified on %TODAY%

xcopy %SRC% %DEST%%1 /D:%TODAY% /S /C /I /Y

:END
@echo on

[END EVENT.BAT]

Standard
Development, Homepage Posts, Musings

Back to basics in Mobile Development

I’ve been holding off starting iPhone development for some time. The recent iPad announcement coupled with the lack of progress in the Windows Mobile world has lead me to making a decision to try out a new platform (finally). With the purchase of the MacBook Pro, it’s time to dive right in and start from basics again. I first started in Palm development (horrors of C++), moved on to .Net (C#) and now with Objective-C, it seems “C” is the common thread linking my mobile development path.

Time to dust off the great “C – How to Program” and gettting started with the first book “iPhone SDK Development“!

Standard
Development, Musings

Day 2 with Google Wave

Impressions after more partipants have gotten their invites. Wave is a huge mess once everyone tries to talk (not unlike a real life meeting). You can also hijack a person’s message if you want to so that can be rather distracting. Still not sure how it’s going to work unless we work on a project using only Wave (I wonder if Sales could be convinced to use this though).

Performance-wise, its rather bad once a huge wave or even an ongoing one with 2 people starts to load, cpu utilization goes up and it definitely feels laggy. KC mentioned that he had shown me a similar XMPP style code collaboration tool in Eclipse so real-time messaging isn’t something new.

On the plus side, I really liked SAP and Salesforce demos especially the customer support bot.  Check it out here.  Can’t wait to see what gadgets are being developed!

Some things I’ve found out to make it a better experience if you’re starting out the first time

To add a wave to the public timeline, do this

  • Add contact “public@a.gwave.com” , force add it even if the submit button remains disabled.
  • Add “public@a.gwave.com” as a participant in the Wave.

More waves are appearing locally and here’s an effort to organize them
Making a Singapore Google Wave List

Actual Waves (about Singapore) , you can search by doing this “with:public singapore” or whichever keyword you want to look up. You’ll need wave access for following links.

Tweety, add tweety-wave@appspot.com to your wave and once you authorize in the pop-up (lower right bottom corner of Chrome), you’ll be able to post to Twitter and read status updates within Wave itself.

Most importanly, treat this as a new experience and forget about Outlook and Notes (I try everyday to forget I’m using it). Wave is messy, its gory but what’s not to like about a mash of IRC, ICQ, Forums, Search, Widgets(or Gadgets) and Google way!

Standard
Development, Musings

Day 1 with Google Wave

Managed to get Google Wave access yesterday and have been testing out the various features. An area of interest to me is how to best reduce the UI clutter of various windows and incoming streams as I keep up to date with news and try to work at the same time.

The concept of waves to mash up all the various streams into conversation threads seems like a great idea but definitely requires more polish to succeed.  I can see myself using it if gmail was tied directly in today. The idea of “wiki” style collaboration on documents in real time could really improve how things work in most places. However the barrier would be resistance to change (happens in any product that dramatically changes how people work). Google’s idea of pushing their brand and products to schools (great work on signing up MOE) is definitely the right step to get young minds hooked and warm up to the idea of new ways to work and collaborate.

Some gadgets I’ve tried

While waiting for the invite (took 2 weeks!) I  came across some good reads and discussion on this very early dev release (thanks Google for the invite, hopefully more will be able to experience a more polished product soon).

Lastly, here’s an embedded wave just to test out the interaction

[wave id=”googlewave.com!w+3ZQOxMf0E”]

Standard
Musings

Useful applications to make life easier in web design and development

Just put up this list to share with others in the team so thought I might as well post it here since it could be useful to folks starting out in web development. Do feel free to add on to the list if there’s something useful for us to use.

Mind Mapping
XMind http://www.xmind.net/ (Thanks to @David_Shen for introducing this .. much nicer than Freemind! I use this for meeting notes, to-do lists and jotting down ideas)

Color Palette
ColorSuckr http://colorsuckr.com/
Color Palette Generator http://www.degraeve.com/color-palette/

On Screen Rulers
JR Screen Ruler http://www.spadixbd.com/freetools/jruler.htm
Pixus http://code.google.com/p/pixus/

Screen Capture
MWSnap http://www.mirekw.com/winfreeware/mwsnap.html

Hard Core Editing (i.e. know your markup)
Notepad++ http://notepad-plus.sourceforge.net/uk/site.htm

Firefox Addons
Web Developer Toolbar https://addons.mozilla.org/en-US/firefox/addon/60
Screengrab! http://www.screengrab.org/
User Agent Switcher https://addons.mozilla.org/en-US/firefox/addon/59
Firebug http://getfirebug.com/
Pagespeed http://code.google.com/speed/page-speed/

FTP
Filezilla http://filezilla-project.org/
Fireftp http://fireftp.mozdev.org/

IE Tools
IE 6 and 7 Internet Explorer Toolbar http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en
IE 8 has built-in developer toolbar

IDE
Eclipse http://www.eclipse.org/
Adobe Dreamweaver CS4 (it really does its job well, have tried hard to replace it without much success)

Wireframes/Design
Adobe Fireworks CS4 (started using Fireworks since Macromedia days and its my favorite program when a mock or design is needed)
Balsamiq http://www.balsamiq.com/ (Just started using this recently to improve my pen n paper process and its working out nicely)

Great reading for design/dev ideas
Web Resources Depot http://www.webresourcesdepot.com/
Smashing Magazine http://www.smashingmagazine.com/

Hope this helps you in your daily work. Happy coding!

Standard
Musings

Getting Dreamweaver CS4 to code highlight .phtml files

I’m currently working on a Magento project which requires some custom template work and with Dreamweaver, it doesn’t color code the syntax for .phtml files even though they are just php files in disguise. A simple solution would have been to allow different extensions to be specified in the preferences but of course, hiding it away in a obscure config file is more fun.

The file to look for : (check your installation path)

C:Program FilesAdobeAdobe Dreamweaver CS4configurationDocumentTypesMMDocumentTypes.xml

Search for this code snippet :

<documenttype id=”PHP_MySQL” servermodel=”PHP MySQL” internaltype=”Dynamic” winfileextension=”php,php3,php4,php5″ macfileextension=”php,php3,php4,php5″ file=”Default.php” writebyteordermark=”false”>

and change it to :

<documenttype id=”PHP_MySQL” servermodel=”PHP MySQL” internaltype=”Dynamic” winfileextension=”php,php3,php4,php5,phtml” macfileextension=”php,php3,php4,php5,phtml” file=”Default.php” writebyteordermark=”false”>

Restart Dreamweaver and say goodbye to the wall of black text! This will also work for any other syntax that needs to be highlighted and isn’t represented by the usual file extension, you’ll just need to find the correct documenttype id.

Standard