Archive for the ‘Macintosh’ Category

Big changes to Mac Developer Program

Friday, March 5th, 2010

Apple have rearranged their Mac developer program so that it now costs only $99 and seems to have only one paid variant rather than the three previously available. (Student, Select, Premier). The online only variant is still available and still free of charge.

It appears that this is possibly influenced by the amazing success of the iPhone developer program, which is also $99.

Anything that makes it easier and cheaper for developers to develop applications is probably a good thing. Although obviously you only need this developer program if you need access to pre-releases of Mac OS X and the other benefits it provides. It isn’t now and never has been a required purchase.

They’re still upgrading the sites as I write this, so I haven’t seen all of the details yet, but definitely looking good.

[edited to correct information about the free online program]

SQLEditor 1.6 final

Wednesday, January 6th, 2010

So, if you’ve seen SQLEditor recently, you’ll hopefully have seen that there is a new version out: version 1.6. This got released just at the beginning of December 2009

1.6 is something that I’ve been working on now for a long time, it is essentially (the unreleased) version 1.5 with improvements and updates. In particular it contains a SQL parser that was written using ANTLR and a new JNI based system for using JDBC drivers with support for Java 6 JDBC drivers.

It’s also the first release version of SQLEditor that is compatible with Snow Leopard. SQLEditor 1.4.7 and earlier had an unusual architecture. When I originally started writing SQLEditor, it was a Java application with a Swing user interface. After some development it seemed clear that java swing was proving limited in some ways. I rewrote the user interface layer in Cocoa, leaving the model layer in Java and using Cocoa Java to connect the two parts together. The application development continued and new versions were released. Eventually though, Apple decided that Cocoa Java was not the future and decided to deprecate it.

Work began immediately on rewriting the crucial components of SQLEditor, although there were some issues.

The first was the model code. Every object in an SQLEditor document is represented by an object and all of the code for these objects was written in Java. All of the object code was rewritten and tested against the earlier versions to check that it still worked. It was very important that files from previous versions continued to work (and as far as I know all of them so far do). New code was written to read and write the SQLEditor document xml format.

The second major issue was that the database interface used JDBC drivers, which are written in Java. Native code would use ODBC drivers. Although similar this might mean that users wouldn’t be able to use existing arrangements to access databases.

Eventually code was written to bridge between SQLEditor native code and the JDBC drivers using the Java Native Interface (JNI).

The other crucial problem was the SQL parser. This is used if you paste SQL code into SQLEditor or if you import a file. The SQL parser was written using JavaCC, a parser generator that is written in and produces Java code. Several parser generators were looked at to replace JavaCC and eventually ANTLR was chosen.

A new SQL parser was written and tested during 2009 in ANTLR and is included in SQLEditor 1.6. The new parser is completely rewritten compared to the one that existed in SQLEditor 1.4.7 and no code is shared between them.

A major step in developing the new parser was to port all of the SQL test cases from Java (in 1.4.7) to objective C (in 1.6). These automated unit tests are run against the parser to ensure that the new parser behaves correctly compared to both the 1.4.7 parser and the assorted SQL standards.

It is still something of a work in progress though, there are things it doesn’t support and it’s still being actively worked on. One particular thing that makes this somewhat harder than it might otherwise be is that it must accept SQL in several different dialects, not just a single standard.

SQLEditor 1.6 also included user interface improvements and various performance fixes.

Overall it’s an improved program, although I do wish that it had been released sooner.

Thanks to everyone using SQLEditor for your patience and also for trying the beta versions.

SQLEditor 1.4 Final Released

Saturday, August 2nd, 2008

In case you missed it version 1.4 of SQLEditor was released back on July 8th.

If you’re using 1.3.9 you might like to consider upgrading.

The 1.3.9 upgrade system will be set soon to recommend this upgrade
(though 1.3.9 doesn’t use sparkle, so it can’t actually do the upgrade for you)

SQLEditor 1.4
(3.6 MB DMG File)

Lots of great new features and various bug fixes and improvements to the existing ones.

SQLEditor 1.4b26

Tuesday, June 24th, 2008

SQLEditor 1.4b26 is now available for download.

It fixes only one problem which is related to auto increment and SQLite.

This should hopefully be the final beta version for 1.4

:-)

The next version should be the 1.4 final release which will probably happen later this week or early next week (assuming no more problems are reported)

SQLEditor 1.4b26 Download [3.6MB DMG]

Reggy for regular expression testing

Saturday, June 7th, 2008

Handy new tool I came across today which allows you to test regular expressions and see what they select.

Reggy

280 Slides

Saturday, June 7th, 2008

A cool new online presentation tool:

http://280slides.com/Editor/

The slide show application is really nice in that it feels very much like a desktop application when in use, even down the way buttons and key presses behave. The object rotation is particularly clever.

Another thing that makes this one clever though is the underlying framework, which is said to compile cocoa like code into dynamic web pages. It will apparently even be opensourced at some stage!

Scripts in XCode

Tuesday, May 27th, 2008

The build system for SQLEditor has lots of steps, from building each of the component frameworks, compiling the application, assembling the bundle, creating a disk image and then uploading everything to the server. (Plus things like version histories and read me files).To reduce errors I have several aggregate targets and a collection of scripts, but I was puzzled how to produce those little note entries that OCUnit generates when it’s running unit tests. There were several notes I wanted to make but I couldn’t figure it out.

However it occurred to me one day to inspect the souce of RunTargetTests and the answer was of course right there in the source.

<filename>:<line>: note: <message>

gives you a note.

<filename>:<line>: <message>

gives you a warning.

where

<filename>

is the name of the file you want the message to appear from

<line>

is the line number in that file

<message>

is the message you want to display

In the note form the word ‘note’ is a constant. Don’t replace it with anything.

As an alternative you put in use an empty filename and 0 for the line if you’re not interested in these details.

Example

@echo ":0: note: disk image creation complete"

Will display the message “disk image creation complete” as a note in the build window.

Flash CS3 – Trace not producing output?

Friday, March 14th, 2008

Found an odd problem with Flash CS3 today. I was working away and I realised that I wasn’t getting anything in the output window from calls to trace().

Just a completely empty output panel.

The answer is simple, make sure Filter Level is set to verbose in the menu on the output panel. If you have it set to None then you won’t get any output.

I’m not quite sure if this is something that I changed or if it is the default, but it isn’t exactly obvious.

Handy database of recommended Mac Apps

Thursday, February 21st, 2008

Johan Basberg (who designed the beautiful SQLEditor icon) has a handy list of recommended mac applications at

http://dittverk.no/mac/files/tag-editor.php

And SQLEditor is on this list :-)

10.5 support

Thursday, October 25th, 2007

At the moment I believe that both SQLEditor and HTMLValidator are compatible with Mac OS X 10.5 and should work without functional difficulty.

A minor issue that I found is that the toolbar icons don’t look very good against the 10.5 window style. These have already been redrawn and the new icons will appear in the 1.4 release.

This assumes that there weren’t any major changes between the version that I used to test and the release version of 10.5 which will be released on October 26th.

Overall it looks good though.

Retro Mac OS Wordpress theme

Wednesday, August 22nd, 2007

This made me laugh when I saw it:

http://www.modernlifeisrubbish.co.uk/article/retro-mac-os-wordpress-theme

Definitely memories of simpler times ;-)

HTMLValidator 1.0

Tuesday, August 7th, 2007

HTMLValidator 1.0 is finally released.

As I write this, it’s been out since Friday, so I guess I’m a bit late in writing this. HTMLValidator 1.0 is identical to HTMLValidator 1.0b8, except of course that it 1) doesn’t expire and 2) asks for registration.

The first non-beta release seems to have gone reasonably well. People are downloading it, trying it and some are starting to buy it. (If you’re reading this, then thank you!).

Oddly enough the most difficult thing about the whole thing was making sure that the order processing system could correctly deal with more than one product. We have a system that interfaces with our payment provider and it handles logging orders and generating serial codes. When it was originally written, HTMLValidator didn’t exist, we sold only one product and there wasn’t really a plan to develop others; So there were several areas that assumed that was only one product. The lesson here is to assume that you’re going to expand and plan accordingly.

Work has already started on the next release of HTMLValidator. The main areas for improvement are speed and memory usage. Plus there are some improvements to validation that the W3C released in their version 0.80 code release that would be nice to have in HTMLValidator. (Which is of course based on the W3C validator).

If you want to try HTMLValidator then we have a page that tells you all about it.

[HTMLValidator]

building antlr 2.7.7 on Mac OS X

Saturday, April 28th, 2007

It appears that antlr on Mac os x doesn’t like the jikes compiler, at least when I tried building antlr it gave lots of weird compile errors like this:
Found 2 semantic errors compiling "ANTLRException.java":

While it would be a good thing to try to fix the actual code, it’s easier to see if the solution is already available.

The answer came in this posting which suggests renaming jikes before building. Which works, but there is an easier way. Just declare an environment variable before starting the build.


export JAVAC=javac
./configure
make

Changing the java compiler that gets used is documented in the configure script.

HTMLValidator 1.0b3

Friday, March 2nd, 2007

A new version of HTMLValidator today. I moved the validation into a separate thread to improve responsiveness. This is also the way that HTMLValidator will be doing multiple page validation. In fact the new release even includes pretty much all of the code necessary to do this, but it doesn’t include the interface yet. The 1.0b3 release actually validates a list of urls, but the list contains only 1 element. The idea is to test that the basic code works as expected before bolting the interface on the top. :-)

Also new is a little spinner that spins when the application is doing something, some improvements to error display and handling and a few other fixes here and there. The changelog gives a complete list.

Next feature is the multiple file validation interface and then probably a 1.0 release.

HTMLValidator beta 2

Friday, February 16th, 2007

HtmlValidator beta 2 has just been released. The new version offers assorted fixes and a slightly improved interface (a green tick or red cross now appear in the validation window!)

There is also a new downloads page which currently offers an Applescript to validate the source of the front page in Safari.

Usefully it validates the actual source that the browser received, it doesn’t download the url itself.

HTMLValidator

Friday, February 9th, 2007

HTMLValidator 1.0b1 has just been released.

It runs on PowerPC or Intel Macs with Mac OS X 10.4 or later.

The current version expires 28th February 2007.

HTMLValidator is a new desktop HTML validator that works on both web pages and files. It’s something I’ve been working on for a while now in between SQLEditor releases. The main motivation is that I often seem to use the W3C validator, but I can’t always do that with files I’m working on locally. I also tried installing the W3C validator on a local web server and although it works, it seems to require a lot of installation effort, with different dependencies. So the idea occurred to me: what if you could have a drag and drop installation. From there came a web version using drag and drop and finally the application bundle version that is being distributed from today.
The earlier application versions actually displayed the results in an html webview in a window, while the newer releases display the results in a table.

On the drawing board for future releases are more validation options, the capability to validate multiple pages and the ability to watch pages for changes and then validate. Also better printing and Applescript support (although both of these are present in the current version).

I’m really interested to know what you think of HTMLValidator so feel free to send in comments, either to me personally Angus [DOT] Hardie [AT] malcolmhardie [DOT] com or to the support [AT] malcolmhardie [DOT] com email address

MacFuse released – userspace Mac OS X file systems

Friday, January 12th, 2007

I just noticed this announcement on the google mac blog.

Amit Singh has released a mac version of Fuse, which is way for people to write interesting extensions to the file system without writing kernel code. The way it works (as I understand it) is that the Fuse system runs one kernel module which communicates with the actual file system code in userspace.

It looks really clever and there are already a number of useful file systems available for fuse (including ssh as a filesystem and a ntfs driver).
[link]

SQLEditor 1.3.1

Sunday, December 10th, 2006

SQLEditor 1.3.1 got released on Friday afternoon, this was really just a bug fix release which fixed a handful of problems that were identified. I think the only major fix was that the new UID system was slightly broken in that if you copied an object, or duplicated it in some cases, then SQLEditor would not always recreate the unique ID numbers that represent each object. This had the effect that if you copied an object, SQLEditor couldn’t distinguish between the objects when reloading and so all connectors would be attached to the original object and not the new one. An unfortunate bug. :-(

It has now been fixed, along with slight improvements to image saving and a fix for a menu shortcut not being correct. The latter was an odd problem in that a shortcut was set, but it actually conflicted with an existing shortcut and the cocoa menu system is smart enough not to display the same shortcut for more than one menu.

[Download] 2.8MB DMG

For some reason also I don’t think I posted about the 1.3 release. But the 1.3 release was posted on November 23rd and is the first non-beta release to be released since May 2006. It rolled all of the improvements that had been made during the beta testing phase into a new release and is definitely worth upgrading (especially since the upgrade is free). However the 1.3 release has been superceded by the 1.3.1 release, so download that instead.

Insanely transparent …

Saturday, November 18th, 2006

You can just see Steve Jobs stroking a white cat and telling engineers to make products “insanely transparent”, can’t you?

[link]

(It’s actually an article about keyboards, but worth reading anyway)

Writing Unit tests for Cocoa

Wednesday, November 15th, 2006

I realized something interesting today.

I use unit testing to (hopefully) improve the quality of my code.

With Java I use JUnit. With native Mac stuff I use OCUnit.

One really clever thing about OCUnit that I realized today is that if you have several SenTestCase subclasses, each with multiple tests in it, you can put all of them into one XCode target and OCUnit will automatically run them as suites in one test run. This means that you get a summary of all of the tests at the end.

Previously I had a separate XCode target for each test case, where each test case class reported its results separately, which isn’t nearly as good.