How to map network drives using the Windows command line
5th September 2007Mapping network drives on Windows usually involves shuffling through Explorer menus. There is another way that I consider to be neater: using the Windows command line ("DOS" to some). The basic command for creating a mapping goes like this:
net use w: \\yourserver.address
To ensure persistence of the mapping across different Windows sessions, use this:
net use w: \\yourserver.address /persistent:yes
Here's how to set up a mapping that logs in as a different user:
net use w: \\yourserver.address password /user:you
The above can include domain information as well, and in a number of different forms: domain\username is one.
To delete a mapping, try this:
net use w: /delete
List all existing mappings:
net use
This is a flavour of what is available, and Microsoft does provide documentation. Issuing the following command will bring some of that on the command line:
net help use
My type of blogging
31st August 2007A recent article by Lorelle VanFossen on The Blog Herald got me thinking about my blogging journey and what I have learned about myself. My brush with reactive blogging has taught a number of lessons. The first of these is that I just cannot keep up with others; someone always gets there first. Another lesson is that taking on a topic of the day takes up loads of time when it lies outside my area of expertise, and I spend a lot of that time researching the topic. What follows from this is that if the post doesn't flow from me, it either takes up a lot of time or it doesn't happen at all. Yes, I have been known to bin stillborn posts due to loss of interest or where things just wouldn't come together at all.
Following all of this, I have come to the conclusion that I am a proactive blogger. That said, I still need to get some bursts of inspiration from somewhere. For instance, my hillwalking blog always experiences a burst of activity after I have been trekking in the outdoors; such encounters never fail to produce something that is worth sharing. In the same vein, anything you find here is likely to influenced by what I have encountered in the technology world. Yes, news items do provide ideas for posts, but it is in a more leisurely way rather than the frenzied approach of some. And like the hillwalking world, such inspiration does have its peaks and troughs.
A rake of new cameras
30th August 2007
The 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.
Even if the former seemed to be a case of playing catch up, 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. While I realise that megapixels aren't everything, it has seemed to go like that thus far. Playing catch up doesn't apply to the 1Ds Mark III given 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 has also announced a new DSLR, while a number of manufacturers have new digital compacts on the market too. All the previous makers have something, as does Olympus. It was astonishing to see this all happening at once, yet I suppose that's how it goes. Though IFA has been on over the last week, 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.
Keep a hold on those serial numbers…
3rd August 2007In the times when all software was bought boxed, there were fewer issues with finding serial numbers, activation codes and the like. If you were tidy and retained the packaging and documentation while knowing where to find them, you were away. However, in these days of software distribution over the web, things are a little less clear-cut. The said codes tend to reside in emails sent following the purchase and, if you are like me, they tend to be scattered around the place; it is not a good thing when you need to get your software reinstalled after a system meltdown, like what I am needing to do. Another trap is that expensive software could disappear all of a sudden if your hard drive crashes, not an enticing thought. A spot of backup of both the installer and product key seems very much in order.
Troubleshooting missing HAL.DLL and boot configuration issues in Windows XP
2nd August 2007My PC is very poorly at the moment and Windows XP re-installation is the prescribed course of action. However, I have getting errors reporting missing or damaged HAL.DLL at the first reboot of the system during installation. Because I thought that there might be hard disk confusion, I unplugged all but the Windows boot drive. That only gave me an error about hard drives not being set up properly. Thankfully, a quick outing on Google turned up a few ideas. However, I should really have started with Microsoft, since they have an article on the problem. About.com has also got something to offer on the subject and seems to be a good resource on installing XP to boot: I had forgotten how to do a repair installation and couldn't find the place in the installation menus. In any event, a complete refresh should be a good thing in the long run, even if it will be a very disruptive process. While I did consider moving to Vista at that point, bringing XP back online seemed the quickest route to getting things back together again. Strangely, I feel like a fish out of water right now, but that'll soon change...
Update: It was, in fact, my boot.ini that was causing this and replacement of the existing contents with defaults resolved the problem...
iTunes: a resource hog?
1st August 2007When I started to use iTunes, it very much played well with other software applications running. Then, a few versions later, the playback began to suffer with iTunes running in any way other than on its own. A solution that I have is to fire up the Windows Task Manager, go to the Processes tab and find iTunes.exe in the list. The next thing is to right-click on this, select the Set Priority and change the setting to Above Normal. Windows will warn you about what you are doing, even if it usually doesn't cause any other problems. Yes, it sounds a bit extreme, yet it always solves the playback problem.
So long as iTunes is merely playing music, all is well. However, when it starts ripping CD's, it's a wholly different matter. That is a CPU intensive operation, and setting the process priority to Low is an excellent idea. I recently got caught out by a default setting of ripping any music CD inserted into the PC and, at Above Normal priority, the PC got locked up. Eventually, I got things back under control and lowered the priority. Needless to say, iTunes will just list the contents of an inserted CD from now on. I have learnt my lesson; keeping the command line open to get at command line process tools would be a superb idea for the future, especially as I know where to find these on the web.
Sending emails with PHP
27th July 2007Recently, I got the idea that I'd upgrade a feedback form that I have on my photo gallery so that it would email me comments left by visitors, rather than just storing them on the web server for later perusal. I opened up my copy of PHP Unleashed (John Coggeshall, SAMS), turned to the relevant chapter, when it all started to look rather daunting. Then, another suggestion popped into my head: potter over to PEAR and see what they have there. In the light of my reading, I knew what I wanted and downloaded the Mail and Mime-Mail packages. Another spot of perusal led me to some sample code that I could use with these, and I modified that to suit. Within 30 minutes, the results of my labours were in place, which all works very nicely too. Nevertheless, I still need to learn more about the code that I am using.
FCKEditor for WordPress
26th July 2007Because the standard WordPress post editor got broken on this blog, my mind turned to replacing it, especially when I spied plugins for adding FCKEditor to the thing. Dean Lee's is the one that I am using, and it seems to work well so far too. As this is FCKEditor, there are more editing options than those offered by the WordPress standard and that's even with the advanced options made visible with the Alt+V/Alt+Shift+V keyboard shortcuts; the former is for IE and the latter for Firefox. We'll see how it goes from here...
Field testing my new Pentax K10D while out hillwalking
24th July 2007On Saturday, I happened to be in a branch of Jessops only to overhear a salesman emphatically state that you don't buy a camera for its specifications but for the photos that it produces. While his tone of voice was a touch condescending, and he seemed to be putting down a DSLR, he was essentially right. Nevertheless, the specifications do help you get the images, so they have to be seen in that light.
For instance, having on-board sensor cleaning may save you from having either to clean the thing yourself or send the camera away for the professionals to do what is needed, a much safer option in my view. And there may be occasions where image stabilisation is very useful, low light wildlife photography for instance. Yes, there are features that I consider surplus to requirements, like live viewing and movie capture, and that is very much due to my buying cameras to make photos. The salesman in question would surely have agreed...
Off to the Lakeland Fells
Sunday saw me head to the Lakeland Fells for some walking and a spot of testing of my new Pentax K10D. The details of the walk itself are not for here but for my hillwalking blog and that is where you will find them. While making my way from Crewe to Windermere, I perused the manual looking particularly for information pertaining to functions that I actually use, I should really have done this beforehand, but distractions meant that I hadn't got around to it. I had to wade through something designed for a new SLR user before I got to what I consider the important stuff. Though this may be a bit irritating, I can understand and accept why they do it this way; we were all new users once, and they are hardly likely to want to know about things like aperture priority, raw file capture, ISO control and such like straight away.
First Impressions of the Pentax K10D
What do I think of it then? Let's start with first impressions. It is definitely smaller than the Canon EOS 10D it accompanies in my possession. That said, it is not too small and there is a decent grip hosting the shutter release button and the camera on/off switch. It also feels well-assembled and reassuringly weighty, an important consideration given that it will see the outdoors a lot. A discussion of the features most relevant to me follows.
Power Management and Response Time
On the subject of switching on and off, the camera is set to go into a sleep mode after a second of inactivity, but it reawakens quickly when needed, the trigger being half-depression of the shutter release button. In fact, the camera does reawaken much faster than my Canon as it happens and where the delay is a constant source of some irritation.
Key Controls and Features
Even if it might sound strange, the on/off switch is also used to activate the depth of field preview, something that no SLR should not have. The location may be unusual, but maybe the designers thought that having shutter release and depth of field preview next to each was a logical way to do it. From a camera operation point of view, there is certainly something to that way of thinking.
Behind the shutter release, you'll find a screen that is a reminder of film SLR's. This conveys information such as battery life, number of exposures remaining on the card and exposure details (aperture & shutter speed).
Display and Menu System
Staying on the subject of screens, the one on the back of the camera is larger than that on the Canon. As is customary for these, it allows replay of photos taken and access to the various menus required to control the camera's operation. In comparison to the Canon, which is essentially a one menu affair with a thumb wheel controlling scrolling and an OK button at its centre to perform operations, the Pentax has a more elaborate system of submenus: one each for recording, playback and set-up.
The playback menu is where I found the setting that makes the camera highlight areas of underexposure and overexposure during image playback. This is something that I missed regarding the Canon until I happened upon it. Camera cleaning is located on the set-up menu, and the camera is now set to clean the sensor every time that it is turned on. Why this is not enabled by default is a little beyond me, but the designers might have thought that a vibration from the camera on turning it on could have resulted in a load of support calls. The same submenu also hosts memory card formatting.
File Format and Navigation Options
The recording submenu is where I set the camera to deliver RAW DNG files, an Adobe innovation, rather than the default JPEG's. There are other options like RAW PEF files, Pentax's own format, or RAW and JPEG simultaneously, but my choice reflects my workflow in Photoshop Elements; I have yet to stop the said software editing the DNG files, however.
With all these options, it is fortunate that there is a navigation wheel whose operation uses arrow buttons to get about. While on the subject of the back screen, there are further settings that are accessed with the FN button rather than the Menu one. These include ISO, white balance, shooting mode (single, continuous, timed and so on) and flash. The only setting that I changed out of this lot was to set the ISO to 400; I prefer to feel that I am in control.
Exposure Modes and Controls
Returning to the camera's top plate, the exposure mode dial is on the left-hand side, which is no hardship to me as this is in the same place as on the Canon. There are no scene modes, but the available exposure modes are more than sufficient: fully automatic, program, sensitivity priority, shutter priority, aperture priority, shutter and aperture priority, manual, bulb and external flash synchronisation.
A few of these need a spot of explaining. Sensitivity priority is a new one on me, but it is a consequence of the ability of DSLR's to offer a range of ISO settings; the aperture and the shutter speed are varied according to the ISO setting. Shutter and aperture priority is like manual exposure and is the inverse of sensitivity priority: set both aperture and shutter speed, and the camera will vary the ISO setting. Both of the foregoing assume that you let the camera set the ISO, but my setting the thing myself may have put paid to these functions.
Shutter priority and aperture priority are, as far as I can tell, their usual selves. For all exposure modes, the thumb wheels at the front and back of the shutter release handgrip set apertures and shutter speeds where appropriate, and this arrangement works well.
Metering Options
The focussing mode selector is found on the left of the body, next to the lens coupling. I am used to having this on the lenses themselves, so this is a new arrangement for me and one to which I can easily become accustomed. In fact, it is easy to find it while composing a picture. The modes themselves are manual focus, one-time autofocus and continuous autofocus; the last of these is for focussing on moving objects.
While I could go further, perhaps overboard, with a discussion of the features of this camera, I draw a line at what's here. Yes, it is useful to set the focussing point and activate image stabilisation, but the above are what matter to me and its performance in the photo making department is the most important aspect.
Performance in the Field
That neatly brings me to my appraisal of how it performs. With inspection of the first few images on the review screen, I was a little disappointed to see how dark the foreground was in comparison to the sky. When I brought everything home, as I always do, I found that things weren't necessarily as they appeared in the field. The Pentax more usefully offers histogram review and highlighting of any areas that are either underexposed or overexposed. It is these functions that I will be using in reshooting decisions while out and about with the Pentax, and the same can be said for how I currently use the Canon.
In fast changing lighting, the AE lock technique was a bit irritating, yet I am certain that I will get better at it. The autofocus doesn't always lock onto the subject, especially in tricky lighting, so manual focussing is a definite necessity and is more useful more for landscape photography, in fact. Nevertheless, the autofocus did do well most of the time, and my Sigma lenses have done worse things on me.
Conclusion
Overall, I'm satisfied with the K10D and plan to continue using it. My recent excursion yielded some quality photographs, which, as the Jessops salesperson would agree, is the ultimate purpose of any camera.
SAS9 SQL Constraints
23rd July 2007With SAS 9, SAS Institute has introduced the sort of integrity constraints that have been bread and butter for relational database SQL programs, but some SAS programmers may find them more restrictive than they might like. The main one that comes to my mind is the following:
proc sql noprint;
create table a as select a.*,b.var from a left join b on a.index=b.index;
quit;
Before SAS 9, that worked merrily with nary a comment, only for you now to see a warning like this:
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of this is a possible data integrity problem.
In the data step, the following still runs without a complaint:
data a;
merge a b(keep=index var);
by index;
run;
On the surface of it, this does look inconsistent. From a database programmer's point of view having to use different source and target datasets is no hardship but seems a little surplus to requirements for a SAS programmer trained to keep down the number of temporary datasets to reduce I/O and keep things tidy, an academic concept perhaps in these days of high processing power and large disks. While adding UNDO_POLICY=NONE to the PROC SQL line does make everything consistent again, I see this as being anathema to a database programming type. Though I do admit to indulging in the override for personal quick and dirty purposes, abiding by the constraint is how I do things for formal purposes like inclusion in an application to a regulatory authority like FDA.