Technology Tales

Adventures in the world of technology

New year, new blog

17th January 2007

Hello and welcome.

This may be the first time that you encountered me in cyberspace, but this is not my first foray into the blogosphere: that is HennessyBlog. So why the new blog, then? The reason is that I fancied having somewhere to mull over computer technology, both new and old. And HennessyBlog is already devoted to the enjoyment of the great outdoors matters else, and I do not want to dilute that focus. While a technology fan, I also like going walking in the countryside and visiting interesting towns and cities, capturing any views encountered with my camera. From these photos, I have compiled my online photo gallery, and HennessyBlog also features news of updates to this.

So there you have it: this will be my technology blog. I do build my own PC’s, so references to computer hardware may appear from time to time. Even so, I am more of a software person and programming is a love of mine. Currently, we also are going through a period where there are a lot of new software releases: who cannot have heard of the forthcoming versions of Windows and Office? I have been having a look at some of these. Like anyone interested in computer technology, the Internet is also a big interest of mine, not least because I have been dabbling in web development for most of the last 10 years. I deliberately say development because, although I can probably do passable website interfaces, I am more technically adept than artistically gifted. I did mention programming earlier: this pays my bills, so it may feature at some point.

Adding a new hard drive to Ubuntu

19th January 2009

This is a subject that I thought that I had discussed on this blog before but I can’t seem to find any reference to it now. I have discussed the subject of adding hard drives to Windows machines a while back so that might explain what I was under the impression that I was. Of course, there’s always the possibility that I can’t find things on my own blog but I’ll go through the process.

What has brought all of this about was the rate at which digital images were filling my hard disks. Even with some housekeeping, I could only foresee the collection growing so I went and ordered a 1TB Western Digital Caviar Green Power from Misco. City Link did the honours with the delivery and I can credit their customer service with regard to organising delivery without my needing to get to the depot to collect the thing; it was a refreshing experience that left me pleasantly surprised.

For the most of the time, hard drives that I have had generally got on with the job there was one experience that has left me wary. Assured by good reviews, I went and got myself an IBM DeskStar and its reliability didn’t fill me with confidence and I will not touch their Hitachi equivalents because of it (IBM sold their hard drive business to Hitachi). This was a period in time when I had a hardware faltering on me with an Asus motherboard putting me off that brand around the same time as well (I now blame it for going through a succession of AMD Athlon CPU’s). The result is that I have a tendency to go for brands that I can trust from personal experience and both Western Digital falls into this category (as does Gigabyte for motherboards), hence my going for a WD this time around. That’s not to say that other hard drive makers wouldn’t satisfy my needs since I have had no problems with disks from Maxtor or Samsung but Ill stick with those makers that I know until they leave me down, something that I hope never happens.

GParted running on Ubuntu

GParted running on Ubuntu

Anyway, let’s get back to installing the hard drive. The physical side of the business was the usual shuffle within the PC to add the SATA drive before starting up Ubuntu. From there, it was a matter of firing up GParted (System -> Administration -> Partition Editor on the menus if you already have it installed). The next step was to find the new empty drive and create a partition table on it. At this point, I selected msdos from the menu before proceeding to set up a single ext3 partition on the drive. You need to select Edit -> Apply All Operations from the menus set things into motion before sitting back and waiting for GParted to do its thing.

After the GParted activities, the next task is to set up automounting for the drive so that it is available every time that Ubuntu starts up. The first thing to be done is to create the folder that will be the mount point for your new drive, /newdrive in this example. This involves editing /etc/fstab with superuser access to add a line like the following with the correct UUID for your situation:

UUID=”32cf775f-9d3d-4c66-b943-bad96049da53″ /newdrive ext3 defaults,noatime,errors=remount-ro

You can can also add a comment like “# /dev/sdd1” above that so that you know what’s what in the future. To get the actual UUID that you need to add to fstab, issue a command like one of those below, changing /dev/sdd1 to what is right for you:

sudo vol_id /dev/sdd1 | grep “UUID=” /* Older Ubuntu versions */

sudo blkid /dev/sdd1 | grep “UUID=” /* Newer Ubuntu versions */

This is the sort of thing that you get back and the part beyond the “=” is what you need:

ID_FS_UUID=32cf775f-9d3d-4c66-b943-bad96049da53

Once all of this has been done, a reboot is in order and you then need to set up folder permissions as required before you can use the drive. This part gets me firing up Nautilus using gksu and adding myself to the user group in the Permissions tab of the Properties dialogue for the mount point (/newdrive, for example). After that, I issued something akin to the following command to set global permissions:

chmod 775 /newdrive

With that, I had completed what I needed to do to get the WD drive going under Ubuntu. After that IBM DeskStar experience, the new drive remains on probation but moving some non-essential things on there has allowed me to free some space elsewhere and carry out a reorganisation. Further consolidation will follow but I hope that the new 931.51 GiB (binary gigabytes or 1024*1024*1024 rather the decimal gigabytes (1,000,000,000) preferred by hard disk manufacturers) will keep me going for a good while before I need to add extra space again.

A new look

11th October 2021

Things have been changing on here. Much of that has been behind the scenes with a move to a new VPS for extra speed and all the upheaval that brings. It also gained me a better system for less money than the old upgrade path was costing me and everything feels more responsive as well. Extra work has gone into securing the website as well and I have learned a lot as that has progressed. New lessons were added to older, and sometimes forgotten, ones.

The more obvious change for those who have been here before is that the visual appearance has been refreshed. A new theme has been applied with a multitude of tweaks to make it feel unique and to iron out any rough edges that there may be. This remains a WordPress-based website and new theme is a variant of the Appointee subtheme of the Appointment theme. WordPress does only supports child theming but not grandchild theming so I had to make a copy of Appointee of my own so I could modify things as I see fit.

To my eyes, things do look cleaner, crisper and brighter so I hope that it feels the same to you. Like so many designs these days, the basis is the Bootstrap framework and that is no bad thing in my mind though the standardisation may be too much for some tastes. What has become challenging is that it is getter harder to find new spins on more traditional layouts with everything going for a more magazine-like appearance and summaries being shown on the front page instead of complete articles. That probably reflects how things are going for websites these days so it may be that the next refresh could be more home grown and that is a while away yet.

As the website heads towards its sixteenth year, there is bound to be continuing change. In some ways, I prefer that some things remain unchanged so I use the classic editor instead of Gutenburg because that works best for me. Block-based editing is not for me since I prefer to tinker with code anyway. Still, not all of its influences can be avoided and I have needed to figure out the new widgets interface. It did not feel that intuitive but I suppose that I will grow accustomed to it.

My interest in technology continues even if it saddens me at time and some things do not impress me; the Windows 11 taskbar is one of those so I will not be in any hurry to move away from Windows 10. Still, the pandemic has offered its own learning with virtual conferencing allowing one to lurk and learn new things. For me, this has included R, Python, Julia and DevOps among other things. That proved worthwhile during a time with many restrictions. All that could yield more content yet and some already is on the way.

As ever, it is my own direct working with technology that yields some real niche ideas that others have not covered. With so many technology blogs out there, they may be getting less and less easy to find but everyone has their own journey so I hope to encounter more of them. There remain times when doing precedes telling and that is how it is on here. It is not all about appearances since content matters as much as it ever did.

Something to watch with the SYSODSESCAPECHAR automatic SAS macro variable

10th October 2021

Recently, a client of mine updated one of their systems from SAS 9.4 M5 to SAS 9.4 M7. In spite of performing due diligence regarding changes between the maintenance release, a change in behaviour of the SYSODSESCAPECHAR automatic macro variable surprised them. The macro variable captures the assignment of the ODS escape character used to prefix RTF codes for page numbering and other things. That setting is made using an ODS ESCAPECHAR statement like the following:

ods escapechar="~";

In the M5 release, the tilde character in this example was output by the automatic macro variable but that changed in the M7 release to 7E, the hexadecimal code for the same and this tripped up one of their validated macro programs used in output production. The adopted solution was to use the escape sequence (*ESC*) that gave the same outcome that was there before the change. That was less verbose than alternative code changing the hexadecimal code into the expected ASCII character that follows.

data _null_;
call symput("new",byte(input("&sysodsescapechar.",hex.)));
run;

The above supplies a hexadecimal code to the BYTE function for correct rendering with the SYMPUT routine assigning the resulting value to a macro variable named new. Just using the escape sequence is far more succinct though there is now an added validation need once user pilot testing has completed. In my line of business, the updating of code is the quickest part of many such changes; documentation and testing always take longer.

Copying only updated and new files

20th October 2008

With Linux/UNIX, the command line remains ever useful and allows you to do all manner of things, including file copying that only adds new files to a destination. Here’s a command that accomplishes this in Linux:

cp -urv [source] [destination]

The u switch does the update while r ensures recursion (by default, cp only copies files from a source directory and not anything sitting in subfolders) and v tells the command to tell the user what is happening.

Though buried and hardly promoted, Windows also has its command line and here’s what accomplishes a similar result:

xcopy /d /u [source] [destination]

Anything’s better than having to approve or reject every instance where source and destination files are the same or, even worse, to overwrite a file when it is not wanted.

New Firefox, new ForecastFox

25th February 2007

Firefox 2.0.0.2 has made its appearance and the CPU usage bug seems to have gone away. We’ll see how it goes… Also, a new version of the Accuweather.com powered ForecastFox plug-in has come out. It was when I was using it that I noticed heavy CPU usage but the behaviour has yet to make its reappearance and I hope it never will. Now, I can get back to enjoying this very useful widget.

New Year, new schedule

5th January 2008

In 2007, I set myself a challenging goal: post something new to this blog every day. Of course, it didn’t happen quite like that. Therefore, for 2008, I’ll be going for a less onerous one: a post every two or three days. That should mean that I don’t run out of steam; pacing yourself to ensure that quantity doesn’t dilute quality is a very good idea. Welcome to 2008.

Photoshop CS2 workout

8th March 2007

Adobe Photoshop CS2

I am in the process of adding new photos to my online photo gallery at the moment and the exercise is giving my Photoshop CS2 trial version a good amount of use. And the experience also adding a few strings to my bow in graphics editing terms, something that is being helped along by the useful volume that is The Focal Easy Guide to Photoshop CS2.

The most significant change that has happened is that to my workflow. Previously, it took the following form:

  • Acquire image from scanner/camera
  • For a camera image, do some exposure compensation
  • Create copy of image in software’s own native file format (PSPIMAGE/PSP for Paint Shop Pro and PSD/PSB for Photoshop)
  • Clean up image with clone stamp tool: removes scanner artefacts or sensor dust from camera images; I really must get my EOS 10D cleaned (the forecast for the coming weekend is hardly brilliant to I might try sending it away).
  • Save a new version of the image following clean-up.
  • Reduce the size of the digital camera image to 600×400 and create a new file.
  • Boost colours of original image with hue/saturation/lightness control; save new version of file.
  • Sharpen the image and save another version.
  • For web images, save a new file with a descriptive name
  • Create JPEG version
  • Copy JPEG to Apache web server folders
  • Create thumbnail from original JPEG

The new workflow is based upon this:

  • Acquire image from scanner/camera
  • For a camera image, do some exposure compensation; there is a lot of pre-processing that you can do in Camera Raw
  • Create copy of image in software’s own native file format
  • Clean up the image with the clone stamp tool and create a new file with _cleaned as its filename suffix. I tried the spot healing brush but didn’t seem to have that much success with it. Maybe I need to try again…
  • Add adjustment layer for level correction and save file with _level suffix in its name.
  • Add adjustment layer for curves correction
  • Add adjustment layer for boosting colours with hue/saturation/lightness control
  • Flatten layers and save new image with _flatten suffix in its name
  • Sharpen flattened image and create a new version with _sharpened suffix in its name
  • For web images, save a new file with a descriptive name
  • Create JPEG versions in Apache web server folders; carry out any resizing using bi-cubic sharpening at this point.

Some improvements remain. For instance, separation of raw, intermediate and final photos by storing them in different directories is perhaps one possibility that I should consider. But there are other editing tricks that I have yet to use as well: merged and blended layers. Bi-cubic smoothing for expanding images is another possibility but it is one that requires a certain amount of caution. And I am certain that I will encounter others as I make my way through my reading.

A rake of new cameras

30th August 2007

Nikon D300The websites of Amateur Photographer and Tech.co.uk are good places to find out what is happening in the world of digital cameras, which is just as well given the recent camera launching frenzy. It all seemed to start off with Canon’s EOS D40 and EOS 1Ds Mark III. The former seemed to be a case of playing catch up but I still think that Canon should have used the opportunity to pull ahead, at least in the megapixel stakes; Sony is working on a 12 megapixel offering and could be about cause of 12 megapixel sensors becoming the norm for consumer digital SLR’s like they did with the 10 megapixel level. I realise that megapixels aren’t everything but it has seemed to go like that thus far. Playing catch up doesn’t apply to the 1Ds Mk III with its having a monster sensor resolution of 21 megapixels and, needless to say, the improvements to the favoured DSLR of landscape photographers don’t stop there. Nikon were also in the fray with new 12 MP offerings: D300 for the enthusiast and D3 for the professional. The sensor in the latter interestingly features a sensor that sits between full frame and the more usual APS-C sizes. Panasonic have also announced a new DSLR but a number of manufacturers have new digital compacts on the market too. All of the previous makers have something as does Olympus. It was amazing to see this all happening at once but I suppose that’s how it goes. IFA has been on over the last week but some launches preceded this; it’s usually something big like Photokina that results in this sort of thing…

Update: I have discovered since the Nikon’s D3 has a sensor sized in the full frame domain. It might be 36mmx23.9mm rather than 36mmx24mm but the FX format comes extremely close and the advent of full frame DSLR’s being purveyed by a number of manufacturers may be upon us.

Getting custom Python imports to work in Visual Studio Code

18th February 2022

While I continue to use Spyder as my preferred Python code editor, I also tried out Visual Studio Code. Handily, this Integrated Development Environment also has facilities for working with R and Julia code as well as MarkDown text editing and adding the required extensions is enough for these applications; it helps that there is an unofficial Grammarly extension for content creation.

My Python code development makes use of the Pylance extension and it works a little differently from Spyder when it comes to including files using import statements. Spyder will look into the folder where the base script is located but the default behaviour of Pylance is that it looks in the root path of your workspace. This meant that any code that ran successfully in Spyder failed in Visual Studio Code.

The way around this was to add the required location using the python.analysis.extraPaths setting for the workspace. That meant opening Settings by navigating to File > Preferences > Settings in the menu system and entering python.analysis.extraPaths into the search box. That took me to the section that I needed and I then clicked on Add Item before entering the required path and clicking on the OK button. That was enough to fix the problem and all worked as it should after that.

  • 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.