A couple of years ago I gained a set of the “periodic table” stickers that Adobe produced. Like many folk I stuck some of them on my laptop. They looked a bit lonely for I limited myself to the four relevant to me. This led to me writing to the likes of Software WTF?, Stack Overflow and the like to get more stickers.
Whilst it serves its purpose the vast majority of the time, I recently came across a fundamental problem with it: it doesn’t support shared folders, or copying files, when the “guest” (VM) is Solaris. It is possible to copy files from a Solaris box to a Windows or Linux guest; from a Windows box to a Linux guest etc, but Solaris guests cannot do this. A search for solutions yielded various complicated ways of mounting/ unmounting USB drives or setting up Samba and the like to share files over the network. There seemed to be no simple way around the problem though. I have hit upon what I feel is a fairly simple work-around myself, so I’m sharing it with others here.
The solution I used for getting files from Windows onto the Solaris guest may surprise people: I used ISO images. However it doesn’t involve burning real CDs/ DVDs; just creating .iso files. To do this, I used a program called PowerISO. The free version will create images up to 300Mb, so it’s likely to be usable in many situations. There are other programs capable of creating ISO’s too if you prefer to use them, but I like PowerISO (I bought the full product), so I’m describing that here.
The steps to transferring files from Windows to Solaris are:
- Open PowerISO and a Windows Explorer window.
- Navigate to the required files in Explorer and drag them to PowerISO
- Go to File menu -> Image Properties in PowerISO and turn off “Enable file optimization” (this’ll save lots of time in the next step)
- Save to an ISO file. I found 200Mb took around 10 seconds to save on a 5400 RPM laptop disk.
- Now switch to Solaris guest and select Devices menu -> Mount CD/ DVD-ROM
- Add your ISO image to the list and mount it.
- A File Browser window will open up in Solaris. Copy the files from there to where you want them on the Solaris file system
And that’s it: job done. To then transfer more files:
- Eject the “CD” on Solaris
- Select Devices -> Unmount CD/ DVD-ROM from the menu
- Now delete the files from PowerISO, drag some new ones across and save again. Say yes when prompted whether to overwrite them.
- Repeat steps 5 and 7 above
No sooner did I write this post than the Sun VirtualBox team let me know via twitter that a new version of VirtualBox is due in a few weeks, that will fix this problem. This is great news, even though it renders my work-around unnecessary almost as soon as I find it 🙂
- Easy to understand
in that order. If you write code that isn’t easy to understand, then you aren’t being clever and nor is your code. I suggested this idea on StackOverflow in response to the “What is the most clever code you’ve ever seen?” question. It generated a lot of negative feedback from some folk, though the positive score (at the time of writing at least 😉 ) suggests more folk agree with me than disagree.
The fact that “clever” code often is anything but was highlighted by a recent article on The Daily WTF. It gives an example of a classic piece of “clever” code that not only resulted in an incomprehensible mess, but also ran far slower than could be achieved with a simple, easy to understand solution. In this case, the developer used the obscure C feature of long jumps, rather than a simple for or while loop.
So next time you are tempted to write a “clever” programming solution to some problem, ask yourself whether you are really being clever, or whether you are being a Homer Simpson.
Answer: think up a silly name and sell them as triple-core chips!
AMD have recently announced that they are producing a new line of processors with a triple core to fill a gap in high-end desktop machines. This gives them the edge over Intel, who only offer 1,2 or 4 core. And apparently it really isn’t because they have a batch of dodgy quad-cores to sell off. I believe them… 😉