Technology Tales

Adventures in consumer and enterprise technology

Checking existence of files and directories on UNIX using shell scripting

23rd April 2007

Having had a UNIX shell script attempt to copy a non-existent file, I decided to take another look for ways to test the existence of a file. For directory existence checking, I was testing for the return code from the cd command, and I suppose that the ls command might help for files. However, I did find a better way:

if [ -f $filename ]
then
    echo "This filename [$filename] exists"
elif [ -d $dirname ]
then
    echo "This dirname [$dirname] exists"
else
    echo "Neither [$dirname] or [$filename] exist"
fi

The -d and -f flags within the evaluation expressions test for the existence of directories and files, respectively. One gotcha is that those spaces within the brackets are important too, but it is a very way of doing what I wanted.

Google Reader

22nd April 2007

Going through the stats for my other blog, I noticed some activity from Google Reader and decided to investigate. What I discovered was a very capable feed reader, much better than Technorati's equivalent. The interface feels a little like an email client, with a different entry in the sidebar for each feed. It also gives you full text and pictures for each blog article that it picks up, though it messes with my hillwalking blog for some reason... As a feed aggregator, it performs very well and makes my blog surveying a lot more effortless. I know that Outlook 2007 has aggregation functionality too, but the portability of Google's little online offering makes it worth taking further, especially as you wouldn't need to pay for it anyway.

Update: Google Reader also allows you to share items from your feeds.

Learning about Oracle

20th April 2007

My work in the last week has put me on something of a learning about Oracle. This is down to my needing to add file metadata to a database as part of an application that I am developing. Since the application is written in SAS, I am using SAS/Access for Oracle to update the database using SQL pass-through statements written in Oracle SQL. I am used to SAS SQL and there is commonality between it and Oracle’s implementation, which is a big help. Nevertheless, there, of course, are things specific to the Oracle world about which I have needed to learn. My experiences have introduced me to concepts like triggers, sequences, constraints, primary keys, foreign keys and the like. In addition, I have also seen the results of database normalisation at first hand.

Using Oracle’s SQL Developer has been a great help in my endeavours, thanks to its online help and the way that you can view database objects in an easy-to-use manner. It also runs SQL scripts, giving you a feel for how Oracle works, and anyone can download it for free upon registration on the Oracle website. Additionally, I have installed the Oracle 10g database Express edition at home, which serves as a valuable personal learning resource. That is another free download from Oracle’s website.

My Safari bookshelf has been another invaluable resource, providing access to O’ Reilly’s Oracle books. Of these, Mastering Oracle SQL has proved particularly useful, and I made a journey to Manchester after work this evening (Waterstones on Deansgate is open until 21:00 on weekdays) to see if I could acquire a copy. While that quest was to prove fruitless, I now have got the doorstop that is Oracle Database 10g: The Complete Reference from The Oracle Press, an imprint of Osborne and McGraw Hill. Since I needed a broader grounding in all things Oracle, this should help. Usefully, it also covers SQL, but the aforementioned O’ Reilly volume could return to the wish list if that provision is insufficient.

Oracle SQL Developer and MySQL

17th April 2007

Because of my work, I recently have had a bit of exposure to Oracle SQL Developer, which I have been using as part of application development and testing activities. For further investigation, I decided to have a copy at home for further perusal (it's a free download) and it was with some interest that I found out that it could access MySQL databases. To accomplish this, you need Connector/J for MySQL so that communication can occur between the two. Though you quickly notice the differences in feature sets between Oracle and MySQL, it seems a good tool for exploring MySQL data tables and issuing queries.

Oracle SQL Developer

Navigating Photoshop Elements 5 with CS2 experience

4th April 2007

After a session with Photoshop CS2 and a preview of CS3’s capabilities, I went and got myself a permanent copy of Elements 5 after seeing the similarities between Scott Kelby’s books on Elements 5 and CS2. In any event, I fail to justify the cost of CS2 with CS3 being imminent and the attractions of Elements 5 were too much to ignore. I may yet go for CS3, but I’ll stick with Elements 5 for now.

The similarities between the different members of the Photoshop family are eerie. Once I got used to finding some things in different places from where they are in CS2, I quickly found myself at home in Elements. The biggest miss that I found was the lack of an adjustment layer for editing curves. Otherwise, everything else is as I would hope to find it, and the sliders for curves adjustment in Elements make up for the absence of an associated adjustment layer. Bicubic resampling, an enhancement since Photoshop 7, is as per CS2 and my new workflow worked without too many changes. I took advantage of Kelby’s advice when using Camera Raw and used the Adjust Sharpness feature in place of the Unsharp Mask to get what I perceive to be good results. Everything seemed to work fine for the test digital photo that I was processing for my other blog. I am not totally abandoning my examinations of Elements’ big brother, though; the smart layers feature looks interesting, especially for non-destructive sharpening.

The joys of eBooks

3rd April 2007

One of the nice things about eBooks is the saving that you can make on buying one instead of the dead tree edition. And if you get one from Apress, it is the full article that you get, and they keep it available so that you can download another version if you need it. You can also print the thing off if you want too, yet a laser printer producing double-sided prints is an asset if you don’t want your space invaded by a hoard of lever arch binders. Having a copious supply of inexpensive toner helps too, as does cheap paper. Otherwise, you could spend your savings on printing the thing yourself.

The ever pervasive Safari does things a little differently from the likes of Apress. Mind you, the emphasis there is on the library aspect of the operation and not eBook selling. The result is that you can only ever download chapters, so no index or overall table of contents. You still can buy all the chapters for a particular book, though some publishers don’t seem to allow this for some reason, but finding anything in there after you have had a read becomes an issue, especially when it’s the hard copy that you are using. Take yesterday, for instance, when trying to relocate the formatting parameters for the UNIX date function. Though I eventually found them in the chapters of UNIX in a Nutshell that I have downloaded and printed off, I spent rather longer looking in Learning the Korn Shell than I should have done. Even if I know that you can search in the PDF’s themselves, that is more laborious when there are a number of files to search rather than just the one. I suppose that the likes of O’Reilly prefers you to buy paper copies of its books for more extensive use, and they have a point, even if having the electronic version all in one file does make life so much easier.

New version of ZoneAlarm Security Suite

1st April 2007

Having owned a licence of ZoneAlarm Security Suite 6, I was wondering if I would get a pop-up inviting me to upgrade, free gratis as I have a subscription, to the latest version. In the middle of my Office 2007 installation activities, the notification duly turned up to prompt me to download and install the update to version 7.

The first change you will notice is in the branding, ZoneAlarm is now owned by Check Point Software Technologies, but the real reason for my interest is my hearing that Kaspersky antivirus technology is now part of the package. In addition, learning capabilities have also been added so that you don’t get annoyed by the thing asking you if it is alright for a certain application to do something or other that seems vaguely out of order, all the time. This has been part of Norton Internet Security for a while and is certainly an asset; Windows Vista’s User Access Control feature would do well to implement some of this learning, given what I have heard of its activities. And ZoneAlarm 6 was prone to nag you a lot as well, at least it did for me.

The installation went well for me, apart from the non-activation of the antivirus functionality. This took an update and a reboot to sort out, leaving me to think that it might have emanated from the changeover to British Summer Time that took place last weekend. I shall be keeping an eye out for what happens when the changeover to Winter time takes place (don’t worry, I fully plan to enjoy the intervening time; I have more than learned to enjoy each season for its delights). Having a time changeover like this knock out your antivirus software is far from ideal. Other than that, everything is working fine, especially as the firewall is staying silent as it continues to learn.

More on Office 2007

31st March 2007

Since today was to have been the last day of my Office 2007 trial, I headed over to Amazon.co.uk at the start of the week to bag both Office Home and Student 2007 and Outlook 2007. Both arrived yesterday, so I set to ridding my system of all things Office before adding the new software. So the 2007 trial had to go, as did Office XP and any reference to Office 97; Office XP was an upgrade. From this, you might think that I am on a five-year upgrade cycle for Office, and it certainly does appear that way though Office 95 was the first version that I had on a PC; it came with my then more than acceptable Dell Dimension XPS133 (Pentium 133, 16MB RAM, 1.6GB hard drive… it all looks so historical now).

Returning to the present, the 2007 installations went well and all was well with my system. Curiously, Microsoft seems to label the components of Office Home and Student “non-commercial use”. While I accept that the licence is that way inclined, they could be a little more subtle than to go emblazoning the application title bars with the said wording. Nevertheless, I suppose that it is a minor irritation when you consider that you are allowed a three machine licence for what are the full versions of Word, Excel, PowerPoint and OneNote. It must be the presence of OpenOffice on the scene that is inducing such benevolence.

Curiously, Outlook isn’t included in Office Home and Student, hence my getting the full version of the application separately. That means that there is no nefarious wording about the purpose for which it should be used. While on the subject of Outlook, my purge of previous Office versions thankfully didn’t rid my system of the PST files that I was using with Outlook 2007’s predecessors. In fact, the new version just picked up where its predecessors had left off without any further ado. As I have been getting used to the new interface, changed from Outlook 2002 but not as dramatically as the likes of Word, Excel or PowerPoint, there is a certain amount of continuation from what has gone before in any case. The three-pane window is new to me as I never encountered Outlook 2003 and that may explain why it took a little time to find a few things. An example is that all calenders appear in the same place when I had expected the association between calenders and their PST files to be retained. Nevertheless, it is not at all a bad way to do things, but it does throw you when you first encounter it. Its RSS feed reader is a nice touch, as are the translucent pop-ups that appear when a new message arrives; that tells you the title and the sender so you can decide whether to read it without so much as having to look at it and interrupt what you are doing.

In a nutshell, all seems well with Office 2007 on my machine, and I am set up to go forward without the headache of an upgrade cycle since I have recommenced from a clean slate. Though I have heard of some problems with Office 2007 on Windows Vista, I am running Windows XP and I have had no problems so far. In fact, I plan to sit out the Vista saga for a while to see how things develop and, who knows, I might even not bother with Vista at all and go for Vienna, its replacement due in 2009/2010, since XP support is to continue for a good while yet.

Is Windows 2000 support finished?

30th March 2007

At work, we still use Windows 2000 on our desktop and laptop PC’s. This may (or may not) surprise you, but the XP upgrade seems to have been thought a premature move, only for Vista to turn up later than might have been expected. Now that Microsoft is winding down support for Windows 2000, thoughts have started to turn to a Vista upgrade, but the realisation soon dawned that a move to Vista was a major one, and it now looks as if we will be on Windows 2000 for a little while yet, until 2008 at least.

I, too, have Windows 2000 lurking around at home as a testing platform, not a work copy I hasten to add, and software vendors increasingly are not supporting the operating system any more. Symantec is one of these, with the 2006 versions of its products being the last ones to support Windows 2000. Initially, I was left with the impression that Kaspersky was the same, but this does not seem to be the case. While the open-source community can continue their supply of productivity applications such as OpenOffice, the GIMP and so on, it is the security side that is of most concern as regards the future of Windows 2000. That said, its successors are not the prime targets for cracking, but shared code could mean that it falls foul of the same exploits.

I have yet to notice it with the hardware that I am using, but hardware advances may yet put paid to Windows 2000 like they did to members of the Windows 9x line, especially when you consider that the operating system dates from 1999. Then again, you may find that you don’t need the latest hardware, so this might not affect you. This is not all that unreasonable given that the pace of technological progress is less frenzied these days than it was in the nineties, when Windows 95 was more or less out of date by the turn of the millennium. Having the gold OEM version of Windows 95 as the basis for a Windows 9x upgrade treadmill meant that my move into the world of NT-based operating systems was a clean break with a full version of my new operating system and not its upgrade edition.

Nevertheless, there remains a feeling that Windows 2000 is being cut off prematurely and that it could last a while longer with a bit of support, even if there is a feel of the late nineties about the thing. After all, Windows 2000 probably still supports a lot of what people want to do and without the Big Brother tendencies of Vista too.

What the Adobe CS3 launch means for individual users

28th March 2007

Last night, I sat through part of Adobe’s CS3 launch and must admit that I came away intrigued. Products from the Macromedia stable have been very much brought under the Adobe umbrella and progressed to boot. One of these that attracts my interest in Dreamweaver and Adobe is promoting its AJAX capabilities (using the Spry library), its browser compatibility checking facility and integration with Photoshop, among other things. Dreamweaver’s CSS support also gets taken forward. In addition, Dreamweaver can now integrate with Adobe Bridge and Adobe Device Central. The latter allows you to preview how your site might look on a plethora of WAP-enabled mobile phones while the latter, unless I have been missing something, seems to have become a media manager supporting all of CS3 and not just Photoshop.

Speaking of Photoshop, this now gets such new features as smart filters, I think of these as adjustment layers for things like sharpening, monochrome conversion and much more. Raw image processing now has a non-destructive element, with Photoshop Lightroom being touted as a companion for the main Photoshop. Speaking of new additions to the Photoshop family, there is a new Extended edition for those working with digital imaging with a 3D aspect and this is targeted at scientists, engineers, medical professionals and others. It appears that data analysis and interpretation is becoming part of the Photoshop remit now as well.

Dreamweaver and Photoshop are the components of the suite in which I have most interest, while I also note that the Contribute editor now has blogging capabilities; it would be interesting to see how these work, especially given Word 2007’s support for blogging tools like WordPress and Blogger. Another member of note is Version Cue, adding version control to the mix and making CS3 more like a group of platforms than collections of applications.

Unsurprisingly, the changes are rung out for the rest of the suite with integration being a major theme and this very much encompasses Flash too. The sight of an image selection being copied straight into Dreamweaver was wondrous in its own way, and the rendering of Photoshop files into 3D images was also something to behold. The latter was used to demonstrate the optimisations that have been added for the Mac platform, a major selling point, apparently.

For me, the outstanding question is this: do I buy into all of this? It’s a good question because the computer enthusiast seems to be getting something of a sidelining lately. And that seems to be the impression left by Windows Vista, it gives the appearance that Microsoft is trying to be system administrator to the world. There is no doubt but CS3 is very grown up now and centred around work flows and processes. These have always been professional tools, with the present level of sophistication and pricing* very much reflecting this.

That said, enthusiasts like me have been known to use them too, at least for learning purposes. The latter point may yet cause me to get my hands on Photoshop CS3 with its powerful tools for digital imaging, while Dreamweaver is another story. Given it doesn’t fit what how I work now, this is an upgrade that I may give a miss, as impressive as it looks. For a learning experience, I might download a demo, but that would a separate matter from updating my web presence. This time next month may tell a tale…

  • Pricing remains the bugbear for the U.K. market that it always has been. At the present exchange rates, we should be getting a much better deal on Adobe products than we do. For instance, Amazon.com has the Web Premium CS3 suite from Macromedia Studio 8 priced at $493.99 while it is £513.99 on Amazon.co.uk. Using the exchange rate current as I write this, £1 buying $1.96605, the U.K. price is a whopping $1010.53 in U.S. terms. To me, this looks like price gouging and Microsoft has been slated for this too. Thus, I wonder what will be said to Adobe on this one.
  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.