Monday, August 23, 2010

Wow look, M$ invented this new thing called symbolic links!

You know, I get tired of seeing how the world thinks they need to make Bill Gates richer and richer so that they can experience the latest technological revolutions. If you want to see amazing stuff, just try a freely available operating system that's been doing high performance multitasking, windowing, INTER-networking and secure remote access since 20 years before the first anaemic little Windows version 3.0 bellyflopped onto the market. Yes, that's right, it took M$ three versions before anyone paid attention to them, and now 20 years later, not much has improved except for the transparency of the windows, and the security model which is slowly catching up with where Unix was 20 years ago, thanks mainly to pressure from frustrated Unix savvy people who are forced by their employers to allow Windows to embarrass them and keep wasting all their time, by frequent rebooting, waiting for stupid little animations, not to mention losing days and weeks from reinstalling applications and removing viruses that got in through gaping big obvious security holes. Oh, and those stupid "discovering" features. Why do you keep wasting my CPU cycles to discover things? I never told you to discover anything! I'm happy with what I have found by myself for now, you can go play later when I don't need my computer!!!

Read this email thread below for a laugh..., and note that the messages are in reverse order (like most email systems these days), so it might make more sense to start reading at the bottom.

Note also how this developer has all his/her source codes working copies on his/her operating system partition, great organization (NOT) ! Then again, (s)he has probably never set up a computer with more than one partition before.

I also like the way this programmer thinks that Shortcuts are a type of link ("Dragging the directory and holding ctrl-shift"), although he/she does recognize that they are not the same as actual symbolic links or junctions. Windows shortcuts are not, never have been, and never will be, a file-system feature in anyway whatsoever. They were an attempt by Microsoft to imitate Unix Symlinks when they brought out the abysmal Windows 95, but they require intelligence at the application level in order to work properly (so M$ can blame other software vendors for not following THEIR standards). Luckily, the standard file open dialog handles them reasonably well, but if you give an application the path of a shortcut, it will try to open the actual shortcut, not the target that it refers to.


From: <Me>
Sent: Monday, August 23, 2010 11:55 AM
To: <A Unix savvy friend of mine who's not on the ProductX development team>
Subject: RE: Using a link for Thirdparty

Thought you might enjoy this for a bit of a laugh. I was going to include the following two paragraphs as well, but thought that might be a bit much for a Monday :P Sorry to bother you with <ProductX> related stuff again :)


--------------------

MS also did not invent virtual memory, disk compression or window snapping. I’m glad they finally do have Window snapping although it doesn’t work properly on multi-monitors and virtual machines, so I’m guessing it only works properly on hardware which pays kickbacks to MS (just kidding, but who knows), and I’m rolling my eyes that this is considered an add-on feature because it’s so “revolutionary”, although of course it still doesn’t work half as well as on Gnome.

I’ve been using Linux quite a bit recently as you may have guessed, and I have to say it’s the first time in my life that I’ve seen the CPU actually hit absolute 0% ... right now I’m in Windows and my CPU is bouncing between 4% and 40% with absolutely nothing happening on the screen. Why? Security by self-denial of service? And I have never seen Windows drop below 3% CPU in my life, nor have I seen and heard the hard disk light and disk head inactive for more than about a second. On Ubuntu, sometimes it’s so quiet that if you blank the screen and turn off all the other noisy Windows machines in the room, you would think it’s turned off ... But as soon as you move the mouse, everything pops back to life, ready in an instant to submit to your will, without needing to reload gigabytes of worthless junk from the paging file.

---------------


From: <Me>
Sent: Monday, August 23, 2010 11:49 AM
To: <All Members of the ProductX development team>
Subject: RE: Using a link for Thirdparty

I’ve been doing this ever since I figured out that <ProductX> required two copies of the same thing on the same physical disk, so I ended up finding the “Junction” utility from SysInternals, and I showed <Programmer2 of ProductX team> how to use this utility back in February. I realized about 3 months ago that Windows now has the “mklink” command built in, so I don’t need to download Junction anymore. Symbolic links are something I learned from Unix about 20 years ago, although Unix itself has probably had this feature for almost 40 years, just in case anybody thought MS invented them :-)

Hard links are even more fun, they make the same file appear in multiple places, and all of those “places” look exactly like an actual file, not like a link, and there is no quick and easy way to tell from where else a particular file is being linked. If you delete the file from one location while others remain, the file seems to get deleted, but disk usage doesn’t change, just like a reference counting pointer :-)


From: <Programmer1 of ProductX team>
Sent: Thursday, August 19, 2010 6:59 AM
To: <All Members of the ProductX development team, including me>
Subject: Using a link for Thirdparty

To compile <ProductX> we need ThirdPartyBinaries and ThirdPartyBinariesX64, ThirdPartyBinariesX86.
ThirdPartyBinariesX64 and ThirdPartyBinariesX86 are provided via sourcecontrol, ThirdPartyBinary is not and must be generated by hand (something I always forget).
If you are using 64 bit then it is a copy of the X64 directory, for these 32 bit machines if we still have them then it is a copy of the X86 directory.

Now instead of a copy we can use a link.
There are 3 ways you can set up a link.
- Dragging the directory and holding ctrl-shift. This creates a file which links to the new directory. Whilst we can use this in explorer to browse, it is no good for the compiler.
- Using a dos window (run as admin!) use mklink as follows:

C:\Development\Net4>mklink /d ThirdPartyBinaries ThirdPartyBinariesX64
symbolic link created for ThirdPartyBinaries <<===>> ThirdPartyBinariesX64

C:\Development\Net4>dir
Volume in drive C has no label.
Volume Serial Number is XXXX-9999

Directory of C:\Development\Net4

19/08/2010 11:44 <DIR> .
19/08/2010 11:44 <DIR> ..
19/08/2010 11:41 779 .hgignore
19/08/2010 11:30 <DIR> <ProductX>
19/08/2010 11:41 <DIR> Thirdparty
19/08/2010 11:44 <SYMLINKD> ThirdPartyBinaries [ThirdPartyBinariesX64]
19/08/2010 11:30 <DIR> ThirdPartyBinariesX64
19/08/2010 11:41 <DIR> ThirdPartyBinariesX86
1 File(s) 779 bytes
7 Dir(s) 285,707,583,488 bytes free

Notice how the directory knows that it is a symbolic link. And this works.
- You can also use the /j option in mklink which creates a junction, but this is not necessary...

HTH

<Programmer1 of ProductX team>

From: <Team Leader of ProductX team>
Sent: 19 August 2010 10:30
To: <Programmer1 of ProductX team>
Subject: Command is mklink.exe

Can you work out what to do and then email the <ProductX> developers

No comments: