Smoother use of more than one SAS DMS session at a time
11th March 2012Unless you have access to SAS Enterprise Guide, being able to work on one project at a time can be a little inconvenient. It is possible to open up more than one Display Manager System (DMS, the traditional SAS programming interface) session at a time only to get a pop-up window for SAS documentation for the second and subsequent sessions. You don't get your settings shared across them, either, while also losing any changes to session options after shutdown.
The cause of both of the above is the locking of the SASUSER directory files by the first SAS session. However, it is possible to set up a number of directories and set the -sasuser option to point at different ones for different sessions.
On Windows, the command in the SAS shortcut becomes:
C:\Program Files\SAS\SAS 9.1\sas.exe -sasuser "c:\sasuser\session 1\"
On UNIX or Linux, it would look similar to this:
sas -sasuser "~/sasuser/session1/"
Since the "session1" in the folder paths above can be replaced with whatever you need, you can have as many as you want too. It might not seem much of a need but synchronising the SASUSER folders every now and again can give you a more consistent set of settings across each session, all without intrusive pop up boxes or extra messages in the log too.
Changing to web fonts
12th February 2012While you can add Windows fonts to Linux installations, I have found that their display can be flaky to say the least. Linux Mint and Ubuntu display them as sharp as I'd like, but I have struggled to get the same sort of results from Arch Linux, while I am not so sure about Fedora or openSUSE either.
This led me to explore web fonts for my websites, with Google Web Fonts meeting my needs through options like Open Sans and Arimo. There have been others with which I have dallied, such as Droid Sans, but these are the ones on which I have settled for now. Both are in use on this website now, and I added calls for them to the web page headers using the following code (lines are wrapping due to space constraints):
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Arimo:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
With those lines in place, it then is a matter of updating font-family and font declarations in CSS style sheets with "Open Sans" or "Arimo" as needed, while keeping alternatives defined in case the Google font service goes down for whatever reason. A look at a development release of the WordPress Twenty Twelve theme caused me to come across Open Sans and I like it for its clean lines and Arimo, which was found by looking through the growing Google Web Fonts catalogue, is not far behind. Looking through that catalogue now causes for me a round of indecision since there is so much choice. For that reason, I think it's better to be open to the recommendations of others.
Command line setting of Windows file attributes
11th February 2012Aside from permissions that can be set using the cacls command, Windows files have properties like read only, archive and hidden. Of course, these are not the same or as robust as access permissions, but they may have a use in stopping accidental updates to files when you don't have access to use of the cacls command. While you could set these attributes using the properties page of any file, executing the attrib command on the Windows command is more convenient. Here are some possible usage options:
Set the read-only flag on a file:
attrib +r test.txt
Remove the read-only flag from a file (found a use for this one recently):
attrib -r test.txt
Set the archive flag on a file:
attrib +a test.txt
Remove the archive flag from a file:
attrib -a test.txt
Set the hidden only flag on a file:
attrib +h test.txt
Remove the hidden flag from a file:
attrib -h test.txt
Using the /s option and wildcards processes a number of files at a time and /d applies the command to directories. They could come in handy when removing read only attributes (also called bits in places) from files copied from read only optical media, such as CD's and DVD's.
A new phone
4th February 2012After a few years with a straightforward Nokia 1661 and a PAYG Blackberry 8520, I decided to go and upgrade from the former to an HTC Wildfire S. So far, the new phone has been good to me with only a few drawbacks. Other than working out how to insert a SIM card, the phone has been easy to use with just a few nuances to learn, such as finger pinch zooming and dealing with an onscreen keyboard as opposed to a real one.
The touchscreen and 3G connectivity are major upgrades from my Blackberry, making web browsing much faster, especially on the larger screen. Checking Google Reader and emails on the go is quicker, with the screen responding well most of the time. It does get dirty, so using a screen protector or regularly cleaning with a lens cloth is advisable. As it happens, I'm still adjusting to the onscreen keyboard, which remains the one area where the Blackberry remains superior. Rotating the phone sideways helps by enlarging the keys, reducing typing errors even for my average-sized fingers. Switching between alphabetic, numeric, and punctuation keyboards still takes some getting used to.

Otherwise, the user interface is bright and pleasing to the eye, with the typical presentation of both a clock and current weather on there. Handily, the screen is locked easily too with a press of the button at the top right of the phone. That will put a stop to inadvertent phone calls, emailing, web browsing and other things, so it is to be commended. To unlock the screen, all that's needed is to swipe the lock bar to the bottom. Any alerts are viewed similarly with holding down your finger on the top bar presenting an extension that can be pulled all the way down to see what's there.
The Android Marketplace icon on the home screen lets me easily add apps with automatic updates, though this requires monitoring data usage on your phone plan. The WordPress app works better than on my Blackberry, but UberSocial's retweeting function is worse on Android. It displays all account feeds on one screen and requires swiping for actions like replying or retweeting, which I find awkward. I might try an alternative app. I've downloaded several others, including CrossCountry Trains' app (which is good, despite failing to find Macclesfield-Edale Sunday trains) and LinkedIn (which works well). You can move apps to the microSD card to save internal storage space, though I don't plan to install many.
The Wildfire performs well at its core function: making and receiving calls. It imported contacts from my SIM card, though Bluetooth transfer from an old phone is also possible. Call sound quality is clear and loud. The side rocker button adjusts speaker volume during calls and ringtone volume otherwise. By default, the phone vibrates and rings simultaneously for incoming calls, which I may change later. The same applies to notification sounds for text messages, emails, and tweets.
Battery life is this phone's main weakness. It needs charging every night, unlike my previous phones. The bright, responsive screen likely causes this drain. Many users report similar issues online, with some experiencing even worse battery performance. While there are tips for extending battery life, they involve disabling key features like 3G or data connectivity, which defeats the purpose of having a smartphone. Thus, I'm considering buying a spare battery, as I did for my Pentax DSLR. Some users recommend higher-capacity replacement batteries, though this seems riskier.
All in all, first impressions of the HTC Wildfire are good ones. Over time, I should find out more about the ins and outs of the gadget. After all, it is a mini-computer with its own operating system and other software. Since I continue to learn more and more about PC's every day, the same should be the case here too.
How the Cinnamon desktop environment offers a conventional alternative to the experimental approaches of others
28th January 2012The computer on which I am writing these words is running Linux Mint with the Cinnamon desktop environment, a fork of GNOME Shell. This looks as if it will be the default face of GNOME 3 in the next version of Linux Mint, with the MGSE dressing up of GNOME Shell looking more and more like an interim measure until something more consistent was available. While some complained that what was delivered in version 12 of the distribution was a sort of greatest hits selection, I reckon that bets were being hedged by the project team.
Impressions of what's coming
By default, you get a single panel at the bottom of your screen with everything you need in there. However, it is possible to change the layout so that the panel is at the top or there are two panels, one at the top and the other at the bottom. So far, there is no means of configuring which panel applet goes where, as was the case in Linux Mint 11 and its predecessors. However, the default placements are very sensible, so I have no cause for complaint at this point.
Just because you cannot place applets doesn't mean that there is no configurability, though. Since Cinnamon is extensible, you can change the way that time is displayed in the clock, as well as enabling additional applets. It is also possible to control visual effects, such as the way new application windows pop up on a screen.
GNOME 3 is there underneath all of this, though there's no sign of the application dashboard of GNOME Shell. The continually expanding number of slots in the workspace launcher is one sign, as is the enabling of a hotspot at the top right hand corner by default. This brings up an overview screen showing what application windows are open in a workspace. The new Mint menu even gets the ability to search through installed applications, together with the ability to browse through what's available.
In summary, Cinnamon already looks good, though a little polish and extra configuration options wouldn't go amiss. An example of the former is the placement of desktop numbers in the workspace switcher, and I already have discussed the latter. It does appear that the Linux Mint approach to desktop environments is taking shape with a far more conventional feel than the likes of Unity or GNOME Shell. Just as Cinnamon has become available in openSUSE, I can see it gracing LMDE too whenever Debian gets to moving over to GNOME 3 as must be inevitable now unless they take another approach such as MATE.
In comparison with a revolution
While Linux Mint are choosing convention and streamlining GNOME to their own designs, it appears that Ubuntu's Unity is getting ever more experimental as the time when Ubuntu simply evolved from one release to the next becomes an increasingly more distant memory. The latest development is the announcement that application menus could get replaced by a heads-up display (HUD) instead. That would be yet another change made by what increasingly looks like a top-down leadership, reminiscent of what exists at Apple. While it is good to have innovation, you have to ask where users fit in all of this when Linux Mint already has gained from what has been done so far and may gain more again. Still, seeing what happens to Ubuntu sounds like an interesting pastime, though I'm not sure that I'd be depending on the default spin of this distro as my sole operating system right now. Also, changing the interface every few months wouldn't work in a corporate environment at all, so you have to wonder where Mark Shuttleworth is driving all this, though Microsoft is engaging in a bit of experimentation of its own. We are living in interesting times for the computer desktop, so it's just as well that there are safe havens like Linux Mint, too. Watching from afar sounds safer.
Dispensing with temptation as new cameras keep getting launched
26th January 2012Many manufacturers followed Olympus into the compact system camera market. Nikon joined late last year, though Canon hasn't yet entered. Olympus E-PL1 kits with 14-42mm zoom lenses tempted me at around £250. After researching competitors, my shortlist included the Samsung NX-11, Sony NEX-C3, and its higher-end model, the NEX-5N.

What eventually countered the allure of shiny objects was the question as to why I needed such an item. After all, I already possess a Pentax K10D DSLR and a Canon PowerShot G11, and these have been satisfying my photographic needs for a while now. While the DSLR may date from 2007, it is still working well for me and, if it ever needed replacing, I'd be going for another Pentax with the K-5 being a strong contender. The Canon is doing what's asked of it, so the recent launching of the G1 X isn't so tempting either.
The whole dalliance has me wondering about how photographic equipment changeovers come about. After all, it was around a decade ago with the DSLR revolution was in the offing if not in progress. Until then, film photography was predominant, but it looks as if it got as far as it could from a technological point of view when I look back at what happened. The digital photography area was new and untapped, so moving there offered new possibilities and purchases more easily justified. The result is that very few film cameras are being made nowadays. Ironically, it's film photography that now is untrammelled terrain for many, and it is holding its own too in an era when digital photography predominates.
The same sort of newness that came with digital photography also applies to CSC's to a certain extent. From the heritage of half-frame 35 mm film photography, Olympus has fashioned a different type of digital camera: essentially a compact with interchangeable lenses. Was it the fact that I have no CSC that caused me to be tempted, and has it happened to others too? Also, is that what got digital photography going in the first place?
It almost feels as if camera manufacturers have to keep bringing to market new models and new types of camera to stay in business. After all, Minolta had to sell its camera division to Sony when they failed to get going in the DSLR market quickly enough. The same thing might have happened to Pentax too, with the marque passing to first to Hoya, and then to Ricoh after the firm lost its independence.
What doesn't help is the lack of longevity of camera models. The coming of digital photography has exacerbated this situation, with models being launched at a frenetic rate. In the days of film photography, a model could last on the market for a few years and there was once a time when a twenty-year lifetime wouldn't have looked so ridiculous, though there were incremental improvements made over that time too. For instance, a Pentax K1000 wouldn't be the same at the end of its production run as it was at the start, though the model number may be the same. That world is gone.
SLR design has endured for about 50 years, but mirrorless technology now presents unprecedented competition. Even compact cameras offer live through-the-lens viewing. Olympus revived its film heritage by creating the E-P1 with interchangeable lenses. These descendants of the original half-frame 35mm PEN cameras appropriately use smaller micro four thirds sensors. Sony has developed translucent mirror technology that eliminates moving parts found in traditional SLRs. Canon experimented with this in the 1980's with film cameras but abandoned it. Meanwhile, Samsung and Panasonic produce mirrorless SLR-style cameras with live viewing and electronic viewfinders, suggesting full-size equivalents may be coming. Olympus's current teaser campaign has sparked speculation about a possible OM-D release.

In parallel with all this, Sony is making a good impression with their CSC's, the NEX series. These have APS-C sized sensors like many DSLR's and in compact bodies as well. However, the feel very much is that of a compact camera and some have complained of a like of buttons on them, even if the photographic quality is excellent. Samsung have gone for the same sensor size in their NX-11, while they have gone for SLR styling. That may be more suitable for some than having to find settings buried in menus.
We're living in an exciting yet unsettling period of camera technology evolution. Cameras are becoming smaller, and traditional still cameras now shoot videos too, though filmmaking remains a time-intensive hobby that doesn't interest me. Recent legal developments complicate original work, as shown by a successful copyright case based on Photoshop image processing. With countless images being created daily and potential changes allowing intellectual property claims in small claims courts, avoiding infringement becomes harder. Film photography seems appealing in contrast and remains viable despite Kodak's financial struggles. As tastes shift and film becomes novel again, the future is uncertain. Perhaps investing in a DSLR body makes sense before Compact System Cameras completely replace them. Camera technology has become interesting once more.
Testing of Ubuntu 12.04 Alpha 1 reveals a polished Unity desktop with room for improvement
22nd January 2012After an aborted installation in VirtualBox using the direct installation, I got a VM instance of Ubuntu 12.04 in place by installing from a loaded Live CD session. That proceeded without any trouble and downloaded the required updates too. First impressions revealed a polished Unity interface that ran without any crashes. The task of adding VirtualBox's Guest Additions in the usual way was all that was needed to tart up the experience even more. However, there remains a wish list for improvements to the Unity desktop, so here are mine:
- Merging of an application title bar with the desktop's top panel on maximisation: In 11.10, removing the
appmenupackages does force menus into application windows and that seems to be destined as a configurable item in Unity at some point; it'd be good to see it in 12.04 though it's not in the first alpha release. The merging of the panel and title bar would be a good thing to have as a user setting too because I am unconvinced by the current behaviour when there is plenty of screen space. - Rearranging icons on the application launcher: There appears to be no obvious way to do this at the moment and attempting to move them with a mouse only moves the launcher up and down. There is no doubt that this behaviour is a bonus for those working with small screens, but it is a nuisance unless there is another means for achieving the same end.
- Desktop environment switcher on the login screen: This seems to have disappeared for now. Hopefully, this is an oversight that will see correction in later stages of the development of Ubuntu 12.04. This is how I currently get Ubuntu 11.10 to boot into GNOME Shell, so its loss would be a step backwards. Then, a Gubuntu project would become truly necessary, though I have to say that Linux Mint makes such a viable alternative that I wonder how they would get going.
In summary, it does look as if the Unity interface is getting more and more polished. However, there are niggles that I have described above that, I think, need addressing, and I hope that many of them will be addressed in either 12.04 or 12.10. Though usability seems to be improving, I still am left with the impression that it has a way to go yet.
Dealing with variable length warnings in SAS 9.2
11th January 2012A habit of mine is to put a LENGTH or ATTRIB statement between DATA and SET statements in a SAS data step to reset variable lengths. By default, it appears that this triggers truncation warnings in SAS 9.2 or SAS 9.3 when it didn't in previous versions. SAS 9.1.3, for instance, allowed you to have something like the following for shortening a variable length without issuing any messages at all:
data b;
length x $100;
set a;
run;
In this case, x could have a length of 200 previously and SAS 9.1.3 wouldn't have complained. Now, SAS 9.2 and 9.3 will issue a warning if the new length is less than the old length. This can be useful to know, but it can be changed using the VARLENCHK system option. Though the default value is WARN, it can be set to ERROR if you really want to ensure that there is no chance of truncation. Then, you get error messages and the program fails where it normally would run with warnings. Setting the value of the option to NOWARN restores the type of behaviour seen in SAS 9.1.3 and versions before that.
The SAS documentation says that the ability to change VARLENCHK can be restricted by an administrator, so you might need to deal with this situation in a more locked down environment. Then, one option would be to do something like the following:
data b;
drop x;
rename _x=x;
set a;
length _x $100;
_x=strip(x);
run;
While It's a bit more laborious than setting the VARLENCHK option to NOWARN, the idea is that you create a new variable of the right length and replace the old one with it. That gets rid of warnings or errors in the log and resets the variable length as needed. Of course, you have to ensure that there is no value truncation with either remedy. If any is found, then the dataset specification probably needs updating to accommodate the length of the values in the data. After all, there is no substitute for getting to know your data and doing your own checking should you decide to take matters into your hands.
There is a use for the default behaviour, though. If you use a specification to specify a shell for a dataset, then you will be warned when the shell shortens variable lengths. That allows you to either adjust the dataset or your program. Also, it provides additional information when you get variable length mismatch warnings when concatenating or merging datasets. There was a time when SAS wasn't so communicative in these situations and some investigation was needed to establish which variable was affected. Now, that has changed without leaving the option to work differently if you so do desire. Sometimes, what can seem like an added restriction can have its uses.
Trying out Irish Mobile Broadband
2nd January 2012Over the course of a year, I end up visiting Ireland a few times, so I decided to invest in a Meteor PAYG broadband stick to see how I'd get on with it. For €20, you can get a 30-day pass with 7.5 GB downloading capacity, a more generous offer than you'd get with some UK mobile networks (T-Mobile really comes to mind here). Signal strength was strong wherever I tried it too with 3G being available so long as you are in the right place with EDGE being the lowest that I got otherwise. Download speeds are good too so it turned out to be a good investment of €30 to get the Huawei E173 USB dongle (I had a T-Mobile one of these before that no longer works, so I am keeping an eye on reliability with this one; though the design seems a little different, I am getting OK so far) and €20 of credit that comes with it. After all, anything's better than the punitive roaming rates that UK providers charge.
Yet another useful Windows shortcut
11th December 2011During the week, I needed to go to a client to upgrade the laptop that they'd given me for doing work for them. The cause was their migration from Windows XP to Windows 7. Office 2010 also came with the new set-up, and they replaced the machines with new ones too. As part of doing this, they carried out upgrade training and this is when I got to learn a thing or two.
While I may have been using Windows 7 since the beta releases first were made available, I am under no illusions that I know all there is to be known about the operating system. Included among the things of which I wasn't aware was a shortcut key combination for controlling display output from the HP laptop that I'd been given. This is the Windows key + P. This brings up a dialogue screen from which you can select the combination that you need and that includes extending the display across two different screens, such as that of the laptop and an external monitor. Going into the display properties will fine tune things such as what is the main display and the placement of the desktops; there's no point in having Windows thinking that the external screen is to your left when in fact it is on the right.
Another interesting shortcut is the Windows key + TAB. This affects the Aero application view and repeating the combination cycles through the open applications, or you can use a mouse wheel to achieve the same end. With ALT + TAB and the taskbar still about, this might appear more of a curiosity, but some may still find it handy, so I've shared it here too.
All in all, it's best never to think that you know enough about something because there's always something new to be learned, and it's always the smallest of things that proves to be the most helpful. With every release of Windows, that always seems to be the case and Windows 8 should not be any different, even if all the talk is about its Metro interface. A beta release is due in the spring of 2012, so we'll have a chance to find out then. You never can stop learning about this computing business.