Until SAS 9.2, SAS/Access will not support the Oracle timestamp format. There still is no word on when 9.2 might appear so it’s over to the SQL pass-through facility…
Archive for April, 2007
Uses for symbolic links
UNIX (and Linux) does a wonderful trick with its file and folder shortcuts; it effectively treats them as file and folder transporters that transfer associate a file or folder that exists in one folder hierarchy with another and it is treated as if it exists in that hierarchy too. For example, the images folder under /www/htdocs/blog can have a link under /www/htdocs/ that makes it appear that its contents exist in both places without any file duplication. For instance, the pwd command cannot tell a folder from a folder shortcut. To achieve this, I use what are called symbolic links and the following command achieves the outcome in the example:
ln -s /www/htdocs/blog/images /www/htdocs/images
The first file path is the destination for the link while the second one is that for the link itself. I had a problem with Google Reader not showing up images in its feed displays so symbolic links rode to the rescue as they did for resolve a similar conundrum that I was encountering when editing posts in my hillwalking blog.
Checking existence of files and directories on UNIX using shell scripting
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 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
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 of 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; you can find what I am sharing here.
Inexpensive hosting
On a recent blog hopping excursion, I spotted a mention for no frills hosting by Streamline.net by a satisfied customer. I’ll stick with Fasthosts for now because I have what I need from them in terms of features and uptime, even though I am paying a bit more. the Streamline package looks interesting though…
Learning about Oracle
My work in the last week has put me on something of a learning about Oracle. This is down my needing to add file metadata to database as part of an application that I am developing. The application is written in SAS but 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. Also useful is the Express edition of the Oracle 10g database that I now have at home for personal learning purposes. 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 (Waterstone’s on Deansgate is open until 21:00 on weekdays) to see if I could acquire a copy. That quest was to prove fruitless but 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. I needed a broader grounding in all things Oracle so this should help and it also covers SQL but the aforementioned O’ Reilly volume could return to the wish list if that provision is insufficient.
SAS and Oracle
It seems that SAS have put a good deal of effort into making their software work with Oracle. Admittedly, you have got to buy SAS/Access for Oracle in addition to the other components that you already have but it is worth it. The Oracle library engine makes things easy so long as there are no incompatibilities on the database side. For instance, SAS has no plans to support the Oracle timestamp format until the forthcoming SAS 9.2 and this does make things a little interesting. However, this can be resolved with the Oracle SQL pass-through facility where you pass Oracle SQL through to the database itself for processing, avoiding incompatibilities. A more pressing issue is using PROC APPEND to add records to the data tables without updating any sequences that are associated with table ID’s. The SQL pass-through facility is the best way around this so that you can update the sequence with a SELECT statement and use the current value for the ID in the following EXECUTE statement. It may sound far from ideal but you need to process your data row by row; once set up though, everything works well.
Oracle SQL Developer and MySQL
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 do 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.

WordPress anti-spam plug-ins
I have just learned about and started to use two new tools on my other blog to combat comment spam. Akismet was doing well but I was moderating more than I should. One plug-in is Bad Behaviour and this interrogates incoming traffic and blocks anything that is attempting the nefarious. This cuts off spam bots before they can even see the blog. Spam Karma 2 is the other new weapon in my arsenal. It is another spam detector and using it alongside Akismet is following the defence in depth approach: when spam gets past one, it is unlikely to pass the other. Both can coexist together and there apparently is an Akismet plug-in for Spam Karma that does away with the need for Akismet itself. The array of options offered by Spam Karma may put off some but that means that extra power is there should it ever be needed.
Return to Elements
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 the curves adjustment. 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.
Tags
Adobe Apache Blog Blogging Books Canon Command Line CSS Drupal DSLR Firefox Google Hardware HTML IE7 Installation Internet Explorer JavaScript Linux Microsoft MySQL openSUSE Opera Operating System Oracle Perl Photoshop PHP Safari SAS SQL Ubuntu UNIX Virtualisation Virtual Machine Vista VMware VMware Workstation Web Browsers Windows WordPress WordPress.com WordPress plugins XHTML XP