Feb 05 2010

iPhone web frameworks & Pastrykit

Development of web based sites targeted at the iPhone/iPod Touch has increased allowing for faster to market paths and avoiding the esoteric niceties of the app store submission process. I suppose the trick in this development is to mimic the UI of the native applications to give the user a proper “no surprises” experience.

There have been a number of third party kits come onto the nmarket based aroun JavaScript, CSS and HTML.

QuickConnectiPhone, iWebkit, WebApp.net, iUi, jQtouch, Phonegap, monotouch as well as Apples Dashcode.

Well also from Apple and coming quietly onto the scene with Pastrykit. To see this in action navigate to iPhone User Guide on your iPhone/Pod or in Safari but change the user agent in the developer bar to iPhone.

There is no official release from apple so all that is in the wild at the moment is a lot of speculation and some reverse engineered assets of the CSS and JavaScript so i suppose we will need to wait and see if it gets released officially or just stays in the Apple internal ecosystem.

More information and most of the assets for pastrykit here.

From Wayne Pan.

Discussion, questions on stackoverflow.

Feb 05 2010

Fizz Buzz test

At a job interview the other day i came across the fizz buzz test in the wild for the first time. Simple little thing but seems to floor people.

In case you have not seen it you output the numbers 1 to 100 but replace those divisible by 3 with “Fizz” and those divisible by 5 with “Buzz”.

The real trick is less in the programming than in an easy way to determine the div by 3 & 5 and here the trick is to remember your modulo arithmetic.

So simply put i = 1 to 100

if i%3 == 0 print Fizz

if i%5 == 0 print Buzz

else print i

Jan 11 2010

Reversing MD5

Here is an interesting one from the not very leading edge. When you add a password to a site it is often encrypted with and MD5 hash this mean that a word like ‘leonie’ is converted into a string that looks like this ‘af58e0965b64b67028e1f40c69317bf1′.

Now he nice thing about this conversion is that it is only one way. i.e. from the hash ‘af58e0965b64b67028e1f40c69317bf1′ you cannot reverse the algorithm that created it

and get back to ‘leonie’. However some helpful people on the web have published the MD5’s of almost every word there is and put them on web sites, so by googleing for ‘af58e0965b64b67028e1f40c69317bf1′ you get ‘leonie’ and are able to crack the the security that this should give you.

There is no way round this, although i fully expect an American Senator or the EU to attempt to legislate against it, other than to make sure the string you use is unlikely to happen in real life and therefore less vulnerable to this type of dictionary attack.

So instead of ‘leonie’ ‘l30n13′ wher 3 = e and 1 – i and 0 = o helps to remember the password but make the attack less easy and even better would be ‘L30n13@’

Don’t say i didn’t tell you!

Jan 01 2010

…. and add one …….

…… on the First.

Dec 31 2009

Well …….

……. got to do a post on the last day of the year. Happy new year everyone.

Dec 26 2009

iPhone Development Frameworks

As might be expected a slew of frameworks are appearing that allow iPhone and other mobile platform development without necessarily needing to learn the very hardcore elements of programming these devices, or that allow cross platform development or that enables creating the application as a web based version that mimics the actions of the native application.

I shall be doing some more in depth looks at these apps over a series of posts but initially this post is to pull a number of the more mainstream  applications together.

The information about the frameworks is provided from the sites themselves so may me taken as is.

QuickConnect

Web Site

QuickConnect is a powerful, modular, simple to use, application development library available for many languages and platforms. QuickConnect is currently available for: iPhone, Android & Mac JavaScript apps, Erlang/Yaws, and PHP.

IWebkit

Web Site

Iwebkit is the revolutionnairy kit used to create high quality iPhone and iPod touch websites in a few minutes and is based on an LGPL license. In the first 4 months of it’s existance the pack has greatly evolved from a basic idea to a project that has reached worldwide fame!

PhoneGap

Web Site

PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript. If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android and Blackberry SDKs, PhoneGap is for you.

WebApp.Net

Web Site

WebApp.Net is a light weight, powerful javascript framework taking advantage of AJAX technology. It provides a full set of ready to use components to help you develop, quickly and easily, advanced mobile web applications.

Universal iPhone UI Kit

Web Site

If you are looking a CSS framework to develop iPhone web applications you may check this project.

The UiUIKit (Universal iPhone UI Kit) it’s a collection of HTML examples of what can be done with CSS3 and Safari’s Webkit. With this framework you can:

Fast prototype any web app with ease. Make you’re own app using diferent iPhone original interfaces.

The framework is based on 1 stylesheet and several HTML examples, also, it contains original artwork so you can edit them in Adobe Photoshop CS and adapt it to your projects. With this framework you can build:

jQTouch

Web Site
A jQuery plugin for mobile web development, optimized for the iPhone and iPod touch
Dec 20 2009

The chimes at midnight

I live approximately three miles from the centre of Nottingham and usually cannot hear the bell chiming the hour in the town hall in the centre of the city. However today, with it being clar cold and frosty it is easy to hear. I suppose also the ambient noise is lees as it’s sunday and the factories and traffic are less.

Usually the only other time this occurs is in the summer, in late evenings when it the air is clear and still.

Dec 18 2009

Version Control Systems

Introduction

Just some overview notes on the subject.

Which VCS?

There are many vcs’s around both free and paid for. The type of VCS while important is not as important as actually using. From the single developer up to big teams there is no way you should be coding without a VCS.

There are centralised systems such as Subversion where the project is held on a central server and developers check out and in and deployments are made from this central repository.

Then there are distributed systems, DVCS’s, such as Mercurial and GIT. With these the developer has a local repository, does all the development, checking in and out locally and when appropriate will push changes to another remote repository to be merged.

See the end of this post for various links

Some of the points to be kept in mind when using VCS’s

  • A VCS does not replace communication between members of a team
  • Clear processes and guidelines on how to use the system need to be in place, especially when, as you inevitably will, break them to help recover gracefully.
  • Read the book. SVN, GIT and Mercurial have books online that are free to read or download. They don’t have to be read from cover to cover and can be skimmed to get a feel for which is the right one for you.
  • Before doing anything moderately complex take a backup of the repository. That way you can blow it away and start again without shafting your repository.

Branching Merging and Tagging

In SVN the practice is to have three directories, Trunk, Tags and Branch. For DVCS’s the conventions are somewhat different but I am going with the SVN nomenclature to simplify things.

  • The trunk is always the version that you would go live with.
  • Tags are one off snapshots of the trunk and are not used for further development.
  • Branches are for development work.  A copy of the repo is taken and worked on. During the life of the branch updates can be made from the Trunk if say bugs are fixed on the Trunk to keep the version in sync.
  • At some point the Branch will be merged back into the Trunk, which will be fraught with pain and angst but at least you will have the tools and the ability to see what you are doing roll back.
  • Once this is done the branch is left but not used again and a new Branch made for the next level of development.

For DVCS’s the picture is similar as a process but different in execution. Here the repositories can be cloned in total and worked on as a branch and then merged locally and then again merged with the remote/master repository

Deployment

Development is done on local machines, checked out, worked on checked in or merged and then the deployed to the test environment (you do have a test environment don’t you?) and if it passes then deployed to the production server. Ok that’s a simplified version but something along those lines.

  • Rule 1 Do not deploy directly from the repository
  • Rule 2 Do not deploy directly from the repository
  • Rule 3 well you get the idea.

Deploy to a staging area and then to move to the test server or the live server by using shell scripting that will consolidate, add, edit, alter the files and then deploy them automatically.

rsync is a highly effective way of moving files from one server to another and has a plethora of options such as –delete which will remove files from the target server that have been deleted in the repository, therefore keeping the server uncluttered.

exclude which can be pointed to a file will allow you to exclude file, say config files which differ between test and development

it is also possible that all the assets are not in the repository. Storing assets such as images do not scale well in version control systems because these files are already binary, so a minor change can mean the whole file is altered and then stored in the VCS. This can add significantly to the repository size which will reduce its effective transfer speed.

The other major advantages of scripting the build is the speed of deployment, the fact that you will make far less mistakes especially when you need to deploy under pressure. It allows you build unit tests in and it opens the route to continuous integration in the future.

GIT Manual

SVN Book

Mercurial Book

Nov 28 2009

PHP 5.3 – Snow Leopard

Snow Leopard updated me to PHP 5.3 ok but it didn’t leave me with a working php.ini. Just the php.ini.default.

The main upshot of this was broken date and thus broken header errors all over the shop. Rename the deafult to just php.ini (in /private/etc/ usually) and got into it uncomment the date.timezone =  and set it to your timezone. Will look something like this

[Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone

date.timezone = Europe/London

then remember to restart the web server, go to system preference/sharing and uncheck and then check Web Sharing
Nov 08 2009

Apple Downloads – Aranaio is number one

I was commissioned to produce a Mac Dashboard Currency Converter Widget for World First (excellent company) which i duly did and at the moment (early November) it is not only the featured download but is also number one download. Talk about chuffed.

Aranaio number 1 download.

Aranaio number 1 download.

Aranaio is my company i use for development and working under. But i kept the blog name as howitt, my name.

Alibi3col theme by Themocracy