Blog Views
Categories
Reviews by Content
Archives
- May 2012 (1)
- April 2012 (7)
- March 2012 (5)
- February 2012 (3)
- January 2012 (1)
- December 2011 (3)
- November 2011 (3)
- October 2011 (3)
- September 2011 (5)
- August 2011 (26)
- July 2011 (6)
- June 2011 (8)
- May 2011 (6)
- April 2011 (9)
- March 2011 (6)
- February 2011 (7)
- January 2011 (6)
- December 2010 (5)
- November 2010 (22)
- October 2010 (5)
- September 2010 (4)
- August 2010 (4)
- July 2010 (5)
- June 2010 (4)
- May 2010 (3)
- April 2010 (1)
- March 2010 (1)
- February 2010 (2)
- January 2010 (4)
- December 2009 (1)
- June 2009 (1)
- May 2009 (1)
- April 2009 (2)
- March 2009 (1)
- November 2008 (2)
- July 2008 (2)
- June 2008 (1)
- April 2008 (1)
- January 2008 (1)
- July 2007 (2)
- June 2007 (1)
- April 2007 (4)
- March 2007 (1)
- October 2006 (2)
- June 2006 (1)
- May 2006 (2)
- March 2006 (1)
- January 2006 (3)
- August 2005 (5)
- July 2005 (5)
- June 2005 (5)
- May 2005 (6)
- March 2005 (9)
- February 2005 (5)
- September 2004 (2)
- June 2004 (1)
- May 2004 (2)
- April 2004 (1)
- March 2004 (2)
- December 2003 (1)
- September 2003 (1)
- August 2003 (2)
- July 2003 (4)
- June 2003 (1)
- April 2003 (2)
- March 2003 (2)
- July 2002 (1)
- June 2002 (2)
- April 2002 (9)
- January 2002 (1)
- September 2001 (1)
Category Archives: Code & Development
Macs Are Really Easy? Ha!
There is a myth. The myth goes “Windows is complicated. Macs are really easy – they just work.”
Like most myths this may have started from an original truth, but is now a lie. I am it’s latest, but I suspect far from only, victim.
Let me explain. For over a year now I have been developing a plugin for the RAW developer Bibble and it’s recent successor, Corel AfterShot. These plugins are developed using c++ and the Nokia QT framework, which theoretically allows the same code and user interface design to compile and run on Windows, Linux and Mac.
As a died in the wool Windows developer, that’s where I started. There’s a QT add-in to Visual Studio, so with a bit of juggling I managed to get one of the examples to load into VS, build, and run using Bibble as the target executable, and I was off. I was on a fairly steep learning curve in respect of the programming model, but I had very few problems compiling and running things.
When it got to the stage that I had something to share with the Bibble community I published the Windows version, and another member of the community kindly cross- compiled for the other platforms. There was another learning curve to make sure my code compiled cleanly on the other platforms, but nothing too drastic. For over a year I sent code updates to Jonathan, and got compiled Linux and Mac libraries back.
Although Jonathan still provides a very helpful service, it became apparent that if I wanted to have full control over the application versions I support, and be able to verify my plugin’s portability, I needed the ability to compile and run each version myself. I wasn’t prepared to buy and carry extra hardware around, but maybe VM technology would work.
I started with Linux. I had a couple of false starts but quickly found a site which has pre-built VMs for most Linux distributions (http://www.trendsigma.net/vmware/), and homed in on Lubuntu – based on Ubuntu but with a quite Windows-like shell. I downloaded and installed AfterShot and QT Creator, loaded up a copy of my code, and clicked “build”. And it worked first time! Getting a completely slick solution took a bit more effort, but it works so well I don’t now even copy the Windows code, I just open the same directory from my Linux VM and run the Linux builds in place.
So far so good. Now for the Mac. What could go wrong?
Mac OSX–A Third-Class OS?
A recent post on The Online Photographer (More Planned Obsolescence: Evil Lion) really chimed with me. Apple’s implacable opposition to virtualisation is a significant opportunity lost.
I’m a Windows user, spending much of the working week away from home. I get a vast amount of value from virtualisation. It allows me to carry just one PC with multiple “client specific” images, and enables me to keep running legacy software almost indefinitely. My main client uses the same technology to provide legacy support for essential software, which in long-cycle engineering businesses can easily be 20-30 years old, as physical assets in such businesses age many times more slowly than the computing equipment around them.
I also develop plugins for the Bibble RAW processor. The same code should work on Windows, Mac and Linux, but you have to compile and test on each platform to confirm this. I’ve recently added a Linux Virtual Machine to my kit. This was remarkably painless, just a few hours work, and I can now rapidly cross-compile and test my Windows-based developments under Linux. If there’s an issue which means having to support more than one flavour or version of Linux adding it would be trivial.
I just can’t do this for the Mac. I don’t want to buy and carry another laptop (which would be useless for any other purpose), and you can’t get virtualised OSX, either as a VM or as a service, through any legal and “safe” route. The result: as far as I am concerned OSX is a “third-class” OS, almost a “technical ghetto”, and I have to rely on the good offices of other developers to deliver my plugins for it.
People will put up with a lot in the name of love. Maybe Mac users “love” their computers enough to tolerate this behaviour. But looking in from outside I find Apple’s attitude perplexing and very annoying.
Posted in Code & Development, Thoughts on the World
1 Comment
First Bibble Plugin Published
I’ve just published my first plugin for the popular image processing suite, Bibble. CAQuest manages chromatic aberration correction, so if you find yourself always having to apply correction for “purple fringes”, this is the tool you need.
To find out more, visit www.andrewj.com/plugins.
Posted in Code & Development, My Publications, Photography
2 Comments
Integrating External Content with WordPress
I’ve been developing andrewj.com for about 15 years, and although I’m not that prolific I’ve built up quite a lot of content.
I recently converted my blog from an old bespoke (= “custom”, for my American friends) solution to one based on WordPress. However, this created a problem, in that the WordPress model is to hold all content in the database, and that wasn’t the right model for me.
Firstly, I have a number of articles which are very long for a blog post, and I had no interest in restructuring them. I also didn’t want to break external links to the existing articles.
Next, I decided that I wanted the freedom to continue to write in that style. Some of my writing takes several weeks, and it works for me to draft it as separate HTML pages. I also sometimes want to include active content or multiple images, and I don’t want to create a large and unwieldy WordPress database full of such stuff.
Finally, my online photo galleries are managed and generated using Jalbum, and I wanted to find a way of neatly integrating single images into my blog, complete with the watermarks and metadata extraction which Jalbum manages so well, without duplicating that functionality in WordPress.
This is probably typical of many older web sites, but WordPress doesn’t really embrace the integration of external content. This article describes how I solved this problem, and a WordPress plugin I have developed to make my solution reusable.
In Damnation of PHP
<rant>Apologies if the title is a bit strong, but I think it’s the nearest I can get to the opposite of “In Praise of PHP”
I’ve just spent a week-end migrating my website to a new hosting server. As part of that process, I had to rewrite all my old ASP code using PHP. Here’s what I learned:
- The Apache/Linux community have misleadingly changed the meaning of “ASP”. If you bought a Linux-based hosting service 5+ years ago with “ASP”, it meant a *nix port of Active Server Pages. That worked for me, as I could develop it on Windows. Now, if you buy a Linux hosting service with “ASP” it means “Apache Server Pages”, and the embedded language is Perl. Useless!
- PHP has positively the worst combination of features for a language:
- A c-based language’s sensitivity to case, ending semicolons and curly bracket counts,
- None of the protections against errors in the latter that a C++/Java (or VB) language gives you, like strong typing and forced variable declaration,
- No single-step debugging. Now I accept that this may not be 100% true, so don’t all write in with the names of all the debuggers I didn’t find in a quick search for tools on Sunday morning, but certainly I don’t have one at the moment,
- It runs differently on Windows and Linux, and in a way I haven’t yet understood 100%, so I can only test by uploading to my live website.
That said, I’ve still got it! I’ve managed to convert my blog and my book reviews, and I’ve actually improved on my old code for the latter. Just please let me have VB.NET back for my next major project.
OK. </rant>
Using Volume Shadowing with Ntbackup Under Vista
The brain-dead backup function of Windows Vista is enormously annoying. There are known ways to get good old ntbackup working, but they have their limitations. Read this article about my attempts to get round some of those limitations.
Domain-Specific Languages
There seems to be quite a lot of activity on the “Domain Specific Language” front at the moment. Martin Fowler published “Language Workbenches: The Killer-App for Domain Specific Languages?”, in which he concludes that the common programming pattern of setting up repeating data structures via either very similar lines of code, or an external configuration file, is actually a DSL. He also republished a paper by Dave Thomas entitled “Design to Accomodate Change” on the related topic of table-driven programming.
However, Martin’s essay goes beyond common programming and data techniques to look at the development of specialist tools which he calls “Language Workbenches”. I’m not completely convinced that we need these in the world of XML and XSD. If you have a defined schema for you XML-based DSL (and aren’t all the many *ML langauges just different DLSs?) then any schema-sensitive editor will provide you with good design and editing support. The leading IDEs (e.g. Visual Studio) all have such a tool built into their core capabilities. Surely we now have a sufficiently sophisticated set of XML-based tools and standards that we have an opportunity to exploit synergies rather than re-inventing the wheel?
Growing a Language
I’ve just read a wonderful paper by Guy L Steele, “Growing a Language“. He argues strongly that programming languages must be “small”, but able to grow. Such a language will have a relatively simple structure, syntactic rules, and a small core vocabulary. However it must also be able to “grow”, integrating new data types and functions, in the form of user code accessed in exactly the same way as core functions.
Steele’s argument is highlighted by the paper’s unique style – he uses a small but growing language himself. He writes using only words of one syllable, gradually adding other words he has defined in these terms.
The paper works at many levels. As well as the fascinating intellectual exercise in style, it makes a strong case for:
- simple but extensible programming languages,
- improving the extensibility of Java, rather than its core vocabulary,
- an agile community process for developing languages, rather than up-front design of great monoliths,
- the communication power of simple language and words.
Steele exhorts us to think about extensibility mechanisms – if we get these right then the core functionality can always grow. And by example, he encourages us to use simple, direct language and benefit from its discipline. On both accounts I agree wholeheartedly.
Enterprise Integration Patterns
Integration, like other design activities, can benefit from sharing ideas and proven strategies in the form of patterns. An excellent starting point is Gregor Hohpe and Bobby Woolf’s Enterprise Integration Patterns website and book.
In my recent work I’ve discovered a few patterns of my own, and I’ve started a page to document them.
First up is entitled “Change Indicator” . You may have a legacy system with an EAI adaptor, or a similar source of messages, which reports on the current state of key business objects. The messages will typically tell you when something has changed, but not necessarily what has changed, but the latter may be important to downstream systems. This pattern shows how to use EAI elements to add this information in a way which is totally transparent to the legacy system and existing users of the EAI scheme.
Blogger Me!
My blog is now fully live. My Thoughts on the World, and the articles in
AgileArchitect.org, are now available via an RSS feed.
For the technically inclined, I’ve built my blog using a combination of VB.NET, Active Server Pages, and a bit of XSLT. This allows me to develop my site using FrontPage and IIS, and run it under Apache. If anyone’s interested I’ll write a technical note on it.





