Blog

>uAlertMe v1.1 has been released to the app-store. This important update provides support for push notifications.

In the near future, I’ll be updating iAlertU such that it will, if uAlertMe has previously connected to it, send out a push notification to that same iPhone each time the alarm is triggered.

This helps to get around the problems some people have experienced when their Mac is behind a firewall, or on a network where uAlertMe can’t see it. Soon, you will no longer need an active connection with your Mac for the Mac to let you know something is happening.

As part of the ongoing development of my current game project (using cocos2d-iphone), I recently found myself facing yet another clone of the code required to animate an object within a scene.

Whilst it’s so easy to just grab code, plonk it in and modify it to suit your purposes, it’s a good idea to stop yourself every now and then and assess the damage.

I was finding that the code was becoming untidy, and it was time to do some refactoring. So, having recognised that all of my animated sprites were essentially being created the same way, I set about creating my CCAnimatedSprite class which is a subclass of CCSprite.

What it does is provide an easy to use constructor (to borrow a Java term) that, given the “name” of the spritesheet that contains the images that make up the animation, sets up the sprite object , all ready to go. From there its very simple to request an action object that can be used on it’s own, or as a part of a more complicated suite of actions.

>As part of the ongoing development of my current game project (using cocos2d-iphone), I recently found myself facing yet another clone of the code required to animate an object within a scene.

Whilst it’s so easy to just grab code, plonk it in and modify it to suit your purposes, it’s a good idea to stop yourself every now and then and assess the damage.

I was finding that the code was becoming untidy, and it was time to do some refactoring. So, having recognised that all of my animated sprites were essentially being created the same way, I set about creating my CCAnimatedSprite class which is a subclass of CCSprite.

What it does is provide an easy to use constructor (to borrow a Java term) that, given the “name” of the spritesheet that contains the images that make up the animation, sets up the sprite object , all ready to go. From there its very simple to request an action object that can be used on it’s own, or as a part of a more complicated suite of actions.

As it turned out, I didn’t end up using the class in my project, but it’s handy to have it around. At the moment it only uses textual menu items, but there’s no reason why it couldn’t be adapted to use other menu item classes.

As it turned out, I didn’t end up using the class in my project, but it’s handy to have it around. At the moment it only uses textual menu items, but there’s no reason why it couldn’t be adapted to use other menu item classes.

So, uAlertMe has been on sale for just over week now. Where do we stand? What works, what doesn’t, and what needs improving?

The good:Overall, the feedback I’m getting is that it does what I intended. It works, and most people seem happy.

The bad:Well I haven’t really had any negative feedback so far that I would consider bad. There have been no crash reports sent through which is great. One user had trouble connecting to his Mac, but that sort of thing is problematic at best when you consider firewalls, and routers, etc.

The ugly:One user has commented that it’s a bit ugly to look at, and that it should be a free app with iAd integrated. Yes, my graphics are probably a bit rough, but I thought that for a utility app it looked OK.

There are people out there willing to create great graphics for me, but they cost, and given that I never expected to get rich off uAlertMe I thought that what I had done was reasonable.

What do you think? Please leave a comment here if there is something you’d like to see added, or changed. It’s early days yet, and I obviously have some marketing lessons to go through, but I’m keen to improve the app where I can.

One of the first things I did on the project was change the way it sent email. I didn’t like the dependence on the user having to use Apple Mail for their email. I guess I’m a Thunderbird user from way back.

A lot of people these days just use online email such as Gmail. I do, if for no other reason than their wonderful anti-spam filters.

So, in order to make iAlertU independant of any specific email client, I wrote what started out as a fairly simple client in Java. This started out as a snippet of example code from Sun, that was integrated into my PortaBill application, but over the past year or so, it has grown a bit in complexity in order to meet the needs of iAlertU and the growing community of Mac users out that that are installing it.

As users of iAlertU have pointed out weaknesses in the email client due to the many and varied email configurations, jsendmail has grown in features. It’s still only a single Java class, and it’s not a lot of code, but it represents many hours of searching and debugging to try and get a client that can do everything I need.

jsendmail is a simple console application. iAlertU runs it behind the scenes, passing arguments to tell it where to find the email body and any images that need to be sent. It can also be used independently.

The original command syntax was modelled on mini_sendmail, and similar linux client that I use occasionally.

So, with the gentle prompting of an iAlertU user, I decided to post the code here. If there’s enough interest, I’ll put it on sourceforge.

private static void printUsage(String reason) { System.out.println("JSendmail: " + reason); System.out.println(""); System.out.println("JSendmail usage:"); System.out.println(""); System.out.println(""); System.out.println(" JSendmail [-f filename] [-s \"str\"] [-c ccaddress] [-a attachment]"); System.out.println(" [-from fromaddress] [-u username] [-p password]"); System.out.println(" [-sp port] [-ssl] toaddress viaserver \"text\""); System.out.println(""); System.out.println(" -f filename - Specifies that the text of the message be read from the file \"filename\" instead"); System.out.println(" of standard input."); System.out.println(" -s \"str\" - Specifies the subject of the email to be sent."); System.out.println(" -c ccaddress - The email address of some to add to the CC list."); System.out.println(" -a attachment - The path of an attachment to add to the email."); System.out.println(" toaddress - The email address to which the email will be sent."); System.out.println(" viaserver - The hostname of the mail server via which the email will be sent."); System.out.println(" -u username - the username with which to authenticate, defaults to currently logged in username."); System.out.println(" -p password - the password with which to authenticate."); System.out.println(" -sp port - the port number to connect with."); System.out.println(" -ssl - Instructs jsendmail to use SSL when connecting to the SMTP server."); System.out.println(" -ct type - the content type of the email, defaults to \"text/plain\""); System.out.println(""); System.out.println(" \"text\" - the actual text of the message as read from standard input."); System.out.println(""); System.out.println("Note that if no -fromaddress option is specified, then the currently logged in username is used"); System.out.println("in the form @viaserver."); System.out.println(""); System.exit(1); }

One of the first things I did on the project was change the way it sent email. I didn’t like the dependence on the user having to use Apple Mail for their email. I guess I’m a Thunderbird user from way back.

A lot of people these days just use online email such as Gmail. I do, if for no other reason than their wonderful anti-spam filters.

So, in order to make iAlertU independant of any specific email client, I wrote what started out as a fairly simple client in Java. This started out as a snippet of example code from Sun, that was integrated into my PortaBill application, but over the past year or so, it has grown a bit in complexity in order to meet the needs of iAlertU and the growing community of Mac users out that that are installing it.

As users of iAlertU have pointed out weaknesses in the email client due to the many and varied email configurations, jsendmail has grown in features. It’s still only a single Java class, and it’s not a lot of code, but it represents many hours of searching and debugging to try and get a client that can do everything I need.

jsendmail is a simple console application. iAlertU runs it behind the scenes, passing arguments to tell it where to find the email body and any images that need to be sent. It can also be used independently.

The original command syntax was modelled on mini_sendmail, and similar linux client that I use occasionally.

So, with the gentle prompting of an iAlertU user, I decided to post the code here. If there’s enough interest, I’ll put it on sourceforge.

private static void printUsage(String reason) { System.out.println("JSendmail: " + reason); System.out.println(""); System.out.println("JSendmail usage:"); System.out.println(""); System.out.println(""); System.out.println(" JSendmail [-f filename] [-s \"str\"] [-c ccaddress] [-a attachment]"); System.out.println(" [-from fromaddress] [-u username] [-p password]"); System.out.println(" [-sp port] [-ssl] toaddress viaserver \"text\""); System.out.println(""); System.out.println(" -f filename - Specifies that the text of the message be read from the file \"filename\" instead"); System.out.println(" of standard input."); System.out.println(" -s \"str\" - Specifies the subject of the email to be sent."); System.out.println(" -c ccaddress - The email address of some to add to the CC list."); System.out.println(" -a attachment - The path of an attachment to add to the email."); System.out.println(" toaddress - The email address to which the email will be sent."); System.out.println(" viaserver - The hostname of the mail server via which the email will be sent."); System.out.println(" -u username - the username with which to authenticate, defaults to currently logged in username."); System.out.println(" -p password - the password with which to authenticate."); System.out.println(" -sp port - the port number to connect with."); System.out.println(" -ssl - Instructs jsendmail to use SSL when connecting to the SMTP server."); System.out.println(" -ct type - the content type of the email, defaults to \"text/plain\""); System.out.println(""); System.out.println(" \"text\" - the actual text of the message as read from standard input."); System.out.println(""); System.out.println("Note that if no -fromaddress option is specified, then the currently logged in username is used"); System.out.println("in the form @viaserver."); System.out.println(""); System.exit(1); }

About a month ago, I put together the website for pkclsoft.com. Before I started however, I hunted around for a tool I could use on my Macbook that was free, and would do what I wanted.

There are tools around, and no matter which one you choose, they all have their pros and cons. In any case, I ended up choosing to stick with iWeb. It’s there, and it works.

That said, I set about writing and laying out the website, importing my old Google pages site I had for PortaBill, and getting it online.

Whilst it’s a fairly simple website, it does the trick for now, but there has been one very annoying quirk; the images are all saved within the site in a folder for the respective page.

I did a bit of hunting to see if I could find some way to tell iWeb not to do this. I couldn’t.

You see, iWeb pages, by their very nature are graphic rich, have lovely backgrounds, and look nice (with very little effort mind you).

The problem is that every image, including the background images in every page of your site, is saved on a per page basis. So, if you have 20 pages in your site, there will be 20 copies of every image included in the page templates you use from iWeb.

Back when I first hit this problem, I found a forum (here) post discussing the problem and a possible solution, but no-one seemed to have done anything about it.

Well, now that uAlertMe is up and selling I thought it was time to write the tool myself, and as a result, we now have iWebIO (iWebImageOptimizer). This relatively simple, free tool will allow you to tell it the name of a folder on your Mac that contains the root level index.html for your iWeb website.

That done, it checks all of the PNG, TIFF, JPEG and GIF files for duplicates (by using md5). All images that have duplicates are then listed, and you can then click on one to see what pages are using it.

Finally, clicking on “Optimize” will, after a cautionary prompt, traverse your site, moving one copy of each duplicated image to a new “images” folder in the root folder of the site. All other duplicates are deleted, and all .html files are updated to refer to the images/xxxx files.

It’s simple, and may have some issues with older versions of iWeb pages, or templates that I haven’t used.

It makes the following assumptions:

There must be an index.html in the root folder.

If an image is found in the folder “xxx_files”, then there will be an html file called “xxx.html” that will need to be updated.

You have made a backup of your site. iWebIO overwrites and deletes files in the folder tree you specify. It does warn you, but only once.

>About a month ago, I put together the website for pkclsoft.com. Before I started however, I hunted around for a tool I could use on my Macbook that was free, and would do what I wanted.

There are tools around, and no matter which one you choose, they all have their pros and cons. In any case, I ended up choosing to stick with iWeb. It’s there, and it works.

That said, I set about writing and laying out the website, importing my old Google pages site I had for PortaBill, and getting it online.

Whilst it’s a fairly simple website, it does the trick for now, but there has been one very annoying quirk; the images are all saved within the site in a folder for the respective page.

I did a bit of hunting to see if I could find some way to tell iWeb not to do this. I couldn’t.

You see, iWeb pages, by their very nature are graphic rich, have lovely backgrounds, and look nice (with very little effort mind you).

The problem is that every image, including the background images in every page of your site, is saved on a per page basis. So, if you have 20 pages in your site, there will be 20 copies of every image included in the page templates you use from iWeb.

Back when I first hit this problem, I found a forum (here) post discussing the problem and a possible solution, but no-one seemed to have done anything about it.

Well, now that uAlertMe is up and selling I thought it was time to write the tool myself, and as a result, we now have iWebIO (iWebImageOptimizer). This relatively simple, free tool will allow you to tell it the name of a folder on your Mac that contains the root level index.html for your iWeb website.

That done, it checks all of the PNG, TIFF, JPEG and GIF files for duplicates (by using md5). All images that have duplicates are then listed, and you can then click on one to see what pages are using it.

Finally, clicking on “Optimize” will, after a cautionary prompt, traverse your site, moving one copy of each duplicated image to a new “images” folder in the root folder of the site. All other duplicates are deleted, and all .html files are updated to refer to the images/xxxx files.

It’s simple, and may have some issues with older versions of iWeb pages, or templates that I haven’t used.

It makes the following assumptions:

There must be an index.html in the root folder.

If an image is found in the folder “xxx_files”, then there will be an html file called “xxx.html” that will need to be updated.

You have made a backup of your site. iWebIO overwrites and deletes files in the folder tree you specify. It does warn you, but only once.