Tuesday, March 27, 2007

Citing Wikipedia? Read this first…


Are you a wiki fan? Do you have the compulsive nature of automatically going for wikipidia?org when u want to know about anything? Are you amused by the top bunks that wiki occupies in Google search results? If yes then u need to understand the dual nature of information presented on wikipedia.
Lets first understand how Wikipedia get all that information? It is an open community encyclopedia that can be edited by anyone? Other then the rules of well formed structure, it does not tell us what not to write and how to define things. So it becomes very possible that a user writes or edits a topic on which he is not an expert or the user thinks that he has the correct information. Since there is no authority to validate that information, it becomes a very real possibility for the published information to be incorrect. But from the view of a user of that information, the popularity and enormity of the wiki foundation makes it easy to believe that the contained information is correct. Thus, the information looses credibility and becomes contradictory with the concept of citation. For a primer here are a few excerpts for the web-

History Department Bans Citing Wikipedia as a Research Source
By NOAM COHEN Published in New York Times, February 21, 2007

Dr. Waters and other professors in the history department at Middlebury College had begun noticing about a year ago that students were citing Wikipedia as a source in their papers. But the errors on the Japanese history test last semester were the last straw. At Dr. Waters’s urging, the Middlebury history department notified its students this month that Wikipedia could not be cited in papers or exams, and that students could not “point to Wikipedia or any similar source that may appear in the future to escape the consequences of errors.”


Referencing Wikipedia? Use Caution
By Kevin Garcia (The Brownsville Herald ) January 24, 2007

To many, Wikipedia is a godsend. It's a way to find information on any topic quickly and easily. What some fail to realize, however, is that nothing on the Web site can be taken at face value. Anyone, from age 8 to 80, from a high school dropout to a rogue scholar, can edit the online encyclopedia. Wikipedia can actually be a good source of information. It can lead people to any number of ideas that they might never have considered. That's the beauty of mass media. What Wikipedia is not, however, is a credible source.


When it comes to Computer Science, don't reference Wikipedia
by Christopher Diggins written July 31, 2005

This is not the first time a Wikipedia computer-science definition has made me want to pull my hair out. In the end I don't care, as long as people don't make the mistake of taking Wikipedia definitions seriously. Just remember that in Wikipedia the definitions are written by random people, and edited by random people, not experts.


  • It is not all bad, wiki is a very good source for information about any topic. But considering it’s use as a credible source of information is not good. There are many more such articles that advice people not to use Wikipedia for citation and every user should try and find a credible source for information for such purposed.

Friday, March 23, 2007

A take on C++ by its creator Bjarne Stroustrup

Wow, I mean simply wow. Today a friend(Amardeep) IMed me a link to a leaked interview(taken on 1st Jan 1998 and never published), supposedly with Bjarne Stroustrup, the creator of then C++ programming language. The language that changed the world of programming and software engineers. When I was in college I was attracted to the world of computers and c++ gave me the way to actually contribute to the IT world. It created the base for me to understand how a computer works and how I can customize it to my liking.

In this interview with Stroustrup, the reporter thought he would get a retrospective view of the revolutionary programming language Stroustrup had created but instead by the end of the interview he was boggled. Stroustrup, unfortunately, had a very different take on his effort and went on to say that c++ was actually the result of a scheme he conjured up one day because he thought that the present programming languages were actually demeaning the importance of programmers by being too easy to learn!

Stroustrup thought that in the beginning programmers were royalty and had huge salaries but since earlier programming languages were easy enough to be learned by anyone, it resulted in too many programmers thus dropping the status of programmers as a 'demi-god'. So, he went on to create a programming language that was so insanely complex that most people would not be able to learn it and the few who did would stay high up in the software industry food chain.

To better explain his point of view here are a few quotes by Stroustrup from the interview-

"Well, in the beginning, these guys were like demi-gods. Their salaries were high, and they were treated like royalty."

"Well, one day, when I was sitting in my office, I thought of this little scheme, which would redress the balance a little. I thought 'I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers? Actually, I got some of the ideas from X10, you know, X windows. That was such a bitch of a graphics system, that it only just ran on those Sun 3/60 things. They had all the ingredients for what I wanted. A really ridiculously complex syntax, obscure functions, and pseudo-OO structure. Even now, nobody writes raw X-windows code. Motif is the only way to go if you want to retain your sanity."

"Well, it's been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it's taken them a lot longer than I thought it would."

"It was only supposed to be a joke, I never thought people would take the book seriously. Anyone with half a brain can see that object-oriented programming is counter-intuitive, illogical and inefficient."

Later he goes on explaining the 'illogical and un-important' features like operator overloading, executable size, typedefs, inheritance etc. Oh and did i say what he felt about C++ when he finished working on it he said, "Hated it. It even looks clumsy, don't you agree? But when the book royalties started to come in... well, you get the picture."

To tell u the truth I really hated this kind of response from Stroustrup, who was one of my computing childhood heroes। How often has it been said that never come face to face with your childhood hero if you want them to say an inspiration। In the end I would like to believe that this interview is not true but a search on Google says otherwise and that you should not believe everything you read.
See full interview here or here.

Monday, March 12, 2007

(Vista & XP)Share saved games between multiple OS

Introduction

With the release of vista I was excited and noticed that the era of multiple operating systems had returned। Just as when XP was released Computer enthusiasts had both 98 and XP installed. Similarly since the launch of Vista a lot of people now have vista as well as XP installed.

Problem

With multiple OSes we definitely have problems like installing software twice. But a lot of Software and applications can be run from the same location. For example games. Say u were playing NFS MW in XP. You install vista and want to play MW, You have two options, ONE, do the tiresome job of either copying the saved games from the XP drive to the vista drive(and then back if u want to play from XP again) or TWO, restart the system to XP. It is very inconvenient.

Solution

The best solution i came across is to create virtual folders(aka Hard links, Special Folders. not Virtual folders feature in Vista). What we want to do is have the actual save game files in one location, like XP, and create a virtual folder linking it to them from vista.

Assumptions
  1. XP installed in I:\Windows
  2. Vista installed in C:\Windows
  3. Games installed in D:\ (eg "e:\NFS Most wanted") (can be anywhere)
  4. MW creates saves in XP "I:\Documents and Settings\%username%\my documents\NFS Most Wanted"
  5. Req. virtual folder in vista at(MW creates saves here in vista) "C:\users\%username%\documents\NFS Most Wanted"
  6. Substitute drive letters, directory and username to ur system specific
  7. BACKUP YOUR DATA BEFORE MOVING FORWARD!

There are many options to do this like-

  • mapping a folder to a drive then mapping that drive to another folder
  • using DOS Commands like SUBST and FSUTIL
  • Shell extensions(playing with objectID, BirthvolumeID etc and desktop।ini scripts)
  • Windows Resource kit utility - linkd.exe

These options are messy, unless u r a 5 year veteran Linux admin। After a lot of very hard searching I found the utility called 'Winhardlink'. It does all the dirty work for You. You just have to specify the source directory/file and the target directory/file.


About WinHardLink
- Homepage - Direct Download
Software License(free) - Size(563 KB (576,687 bytes))

Advantages of WinHardLink

  • Works on vista
  • Created Hard links work across OSes i.e. if u create it in vista it will automatically be available as a normal folder in the other OS even if this utility is not installed
  • XP cannot differentiate between links and actual folders
  • Vista shows a shortcut icon on the hard link but reports as a folder in properties

How-to (example using NFS MW and above assumptions)

  1. Download and install WinHardLink in one OS(say vista)
  2. Launch from start menu
  3. Select Hard Link>New Virtual Folder. a windows will pop up
  4. Click "..." against the 'Alias dir' to select the destination to "C:\users\%username%\documents\NFS Most Wanted" (You may have to create a new folder 'NFS Most wanted)
  5. Click "..." against the 'Source dir' to select the location of the saved game to "I:\Documents and Settings\%username%\my documents\NFS Most Wanted"
  6. Click OK.You are done.
  7. Make sure the checkbox is checked along the folder in the main window of WinHardLink।

Testing

  1. Browse to see that the folder exists
  2. Create a new text file in either folder and put some text in it
  3. Check the other folder for its existence
  4. Cross check by editing both files and re opening from the other folder
  5. They should behave as normal file folders
  6. Start the game and see that the profile is loaded
  7. Now u can play MW from any os without worrying about multiple सवेस

More Suggested uses

  • consolidation of saved games। i.e. u can move the all save games to a central location like "d:\saves\[game-name]" and create virtual folders in both OSes where the games expect the saved games to be. Now u can format/reinstall etc without disturbing saves.
  • When one drive is full u can move any folder to another location and just create a hard link for it in its place (see moving the whole MS office folder at the homepage above)
  • Use in conjunction with 'saved searches (aka virtual folders)' feature of Vista to have the ultimate control over data accessibility

Tested with- NFS MW, NFS Carbon(but there is some compatibility problem in vista in loading saves created in XP), Just Cause, Battlefield 2 & 2142, Fifa 07, PES6, GTA SA, MS Flight Simulator X, Visual Studio Projects, Portable apps launch icons, NOT tested with network folders.

Cheers. If you like this solution then please leave a comment.

Make DVD iso from CD isos of Fedora Core

Allright people.. lots of ya all seem to be interested in this.

it is quite simple. Since things have gone multi-giga-byte now a days, handeling one DVD is way easier then poppin n jiggling six CDs one after the other.

Ok here are the steps.

What u need:
1. The CD isos of Fedora core ofcourse(the 1st five only, as sixth is rescue)
2. Magic ISO to edit images. or any other free alternative
3. An editor.
4. A Dvd Burner.
5. Daemon tools(makes life easier and lessens the free space req.)
6. 4 Gb free HDD space(+ the space the CD isos are taking up)

HowTo:
1. Copy the CD1 to a temp folder.(there should be 4 GB space on this drive)
2. Open Magic ISO and browse for the file.
3. From the root of the image see for a file named ".diskinfo"
4. Right click and extract on desktop.
5. Open a command promp and type "edit"(notepad doest work with this nicely, u can use textpad too)

6. Browse to the ".diskinfo" file. it will look like this:
1142397842.393345
Fedora Core
x86_64
1
Fedora/base
Fedora/RPMS
Fedora/pixmaps


7. Edit the file to look like this, basically append ",2,3,4,5" after "1" in line 4.
1142397842.393345
Fedora Core
x86_64
1,2,3,4,5
Fedora/base
Fedora/RPMS
Fedora/pixmaps


8. Save the file.

9. Drag and drop it to the open iso in Magiciso.

10. Right click on daemon tools in the taskbar and goto virtual CD/DVD-ROM>set no of deviced>4 Drives.

11. After the drives have been created left click on daemon tools again and select "Device 0" and Browse to the 2nd CD image to mount it.

12. Repeat the above step for Cds 3 thru 5. (and select device 1 thru 3 respectively). You should have cds 2 thru 5 loaded in virtual drives. check thru My computer.

13. Next, for each drive(mounted image) go to Drive:\Fedora\RPMS and select and drag and drop all files onto the magic iso window under the folder Fedora\RPMS.(alternatively add then thru magic iso, whatever, just add all). You will be asked to over write a file "TRANS.TBL" each time u drag and drop. just select yes(for explanation see page 3 of this thread).

14. After you have added all rpm files. select File>save under magiciso. rename the file to DVD from CD.

15. You are all done. Now Burn and enjoy!!!


Clean UP:
1. Left click on deamon tools and select unmount all.
2. Right click deamon tools and goto virtual CD/DVD-ROM>set no of deviced>1 Drives
3. Delete the CD isos if u want to free up space(1st check the DVD Image to be sure)
4. Delete ".diskinfo" from desktop

SHORTCOMING: This media will NOT pass the media check. so do no test it. If u are paranoid'nf then load a virtual machine and emulate the linux setup and "media-check" the individual cd isos there. To make it pass the media check u need to regenerate the checksums. which is beyond the scope here and worthless for home users. others google.
---------------------------------------------------------------------------------------------

EDIT: src2206 and aditya.shevade were interested in the reverse i.e. DVD to CD iso...
(this is a painfull method)

1. Go to the fedora website hosting the CD isos.
2. Directly mount the CD isos one by one in deamon tools via the webaddress(suppose drive x)
3. Run "CMD" and execute the following commands:
4. Change directory to drive x by typeing "x:"
5. type "copy .diskinfo c:\cd1.diskinfo"
6. Type "tree > c:\cd1.txt"
7. Load the next iso in deamon tools and repeat the two commands above but keep changing the 'cd1' to cd2 and so on(in both commands).
8. Now after u have all the directory structure u gotta get working. load the DVD iso in deamon tools
9. Now using explorer create five folders named CD1 ... CD5
10. See the directory structure but running CMD and using the edit utility.
11. Now for each folder duplicate the contents by copying the files from DVD according to the CD structure.
12. Rename each "cdx.diskinfo" file to ".diskinfo" and place in respectibe CD folder
13. Make iso using magiciso or nero.
14. Varify the file size.
15. Any files u dont find in the DVD, copy them off by loading the CD iso
again in Deamon tools directly from the web.

I sincerely dont think u will go thru the above painfull process.
I am not aware of any simpler processes except downloading the ISO images.
Just think of my effort to write this procedure and try it. give feedback.
I havent tried the above so no promices but logically it should work.