Wednesday, July 19, 2006

Clear Visual Studio's Recent Project List

I spent some time trying to figure this one out before I realized that there really is no way to do it through the GUI. The only way is through the registry, but it's easy enough.

All entries are under:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\(whatever version you have)\ProjectMRUList

all versions of Visual Studio, since 2002 at least I think, store it on the same location so just go to the folder of the version you want (7 is 2003 and 8 is 2005 by the way) and you should see the ProjectMRUList entry.

Just delete the entries you don't want in your Recent Project List anymore and voila!

Tuesday, July 18, 2006

What is XML?

The new generation of Microsoft Office products and even the next Windows itself are heavily based on XML and consequently both will focus heavily on promoting its use to do various things. So, if you haven't wised up to it yet, this is your chance to demistify the monster and finally learn about what the hell is XML.

XML sounds more scary than it really is. It stands for eXtensible Mark-up Language, which just really means "a mark-up language that you can customize whichever way you want." And that pretty much defines everything XML is.

A mark-up language for those who are not familiar to the term is a programming language made of tags that you can use to, well, tag text, effectively telling the computer to interpret things in a certain way. Tags are made of angle brackets. The < symbol opens a tag, and the > symbol closes a tag.

Most mark-up languages will give you a pre-defined set of tags that you can use to mark up your text in a certain way. For instance, in HTML, if you wrap text around the b tag, that is, for instance, <b>some text</b>, you are telling the computer to make that text bold.

Now this is where XML presents its peculiarity and where the "extensible" adjective of its title fits in. XML does not have any pre-defined tags (well, almost)! That's it, you create your own tags and use it whichever way you want to use. So, in XML, there is no <b>tag for bold or anything of the sort. There could be if you want, but you could make that tag be called <iwantthisbold>if you want.

So, first lesson learned: XML is extensible, that is, fully customizable by the user.

Now for a second and very important lesson: XML is only data and nothing else.

Unlike HTML which provides an library of pre-defined tags which produce specific results, such as using the b tag for making text bold, XML tags do not have any meaning, they don't achieve anything. XML is just data, what you do with it is up to you. So, for instance, if you add write a tag named <IWantThisBold> the text will only be bold if the program that reads your XML decides to make it bold. So, XML is only as good as the program that interprets it.

This raises a question: Couldn't I just mark-up my text, say, with percentage signs and then feed to a program that understands that as bold? If XML doesn't do anything by itself why do I need to follow rules such as encapsulating my tags with angle brackets? Well, you could. There is nothing stopping you from doing so, however, you would have to write your own programs to understand that specific format of mark-up you came up with. See, the beauty of XML lies in its rules. That is because in a way, XML is just a standardized format of mark-up which makes it widely acceptable by any programs out there. So be it Word, Excel or the Gimp, if they want to accept XML they know what to expect. XML is almost like a widely accepted contract of mark-up formatting.

Let's look at an example of an XML document:




<? xml version="1.1" ?>
<Books>
<Book>
<Title>The Da Vinci Code</Title>
<Type>Thriller</Type>
<Summary>John Langdon sets out to solve an ancient</Summary>
</Book>
</Books>

As you can see, the immediate characteristic of an XML document is that it's pretty self-explanatory. No one needs to tell you what this document is trying to achieve. It's a file that provides a list of books. Moreover, it's intuitive. It doesn't take any research or technical knowlege to guess what you would have to do if you wanted to include another book on that list.

So that is the mystery of what is XML solved.

As you can see, XML only sounds fancy, but it's actually really simple and nothing to be afraid of.

Of course, things can get pretty complex, but you don't need to get involved with the complexities surrounding XML unless you really want to. Anyone can write XML files and that is, in fact, the whole point of XML: easy information sharing.

Stay tuned on this blog for more on XML!

Sunday, July 09, 2006

Internet Explorer 7 (IE 7): first impressions

I just downloaded IE7 a couple of days ago and I must say: I am impressed! While there is nothing revolutionary about it, Microsoft has done a good job at bringing IE on par with the current standards and array of features expected from modern browsers these days. It took them a long time, but it seems like they are definitely on the right path. And the beta is really stable!

Design 8/10
The first thing you will notice about IE7 is its new interface. The design is much better, much less cluttered with sharp graphics and the way things are laid out it really does give you a lot more viewing area than any browser out there at the moment without having to go full-screen mode. The "Favorites" section is conveniently place right next to the tabs (more on that later) which is the perfect place for it really, however, the display and mechanism of the Favories section have not changed at all. It would have been nice to have a "Quick Favorites Toolbar" of sorts like in Firefox.

The menus have been nicely tucked away on the right-hand side in the form of icons which can be clicked on to bring up a pop menu with all the sub-menus. So if you want to get to Internet Options, just click on the Tools icon on the right-hand side and from the drop-down menu choose the appropriate option.

Speaking of Internet Options, although everything is looking pretty neat and sharp, the way the information and settings are distributed and presented in those many tabs have not changed much at all, which is pretty dissapointing. I, for one, never found IE's menus and settings tabs very organized and sometimes it takes either forever or a quick look up on the web to find how to change a particular setting and this trend apparently continues. At least they seem to have kept things exactly as it was in previous versions so if you've already learned how to enable javascript debugging, for instance, you won't have to learn how to do it again in version 7.

Features 8/10

Tabbed Browsing
Yes, finally, you can use tabbed browsing with Internet Explorer. If you haven't used tabbed browsing before all it means is that you don't need to keep opening new windows all the time when you want to keep something on the screen while checking another web site out. You just open the new one in a tab and you can switch between them to your heart's content. It does make browsing a loooot easier and more enjoyable not to mention practical. Microsoft does not get any patting here though since this is just the way browsing has been now for a looong time so this feature was really no more than the very least expected.

Delete Browsing History
Remember those days when you checked a dodgy web site and thought you had erased all your tracks by hitting "Clear History..." only to find out that when your partner typed any word starting with "p" on google they'd see all the naughty stuff you've looking at on the net?
That's because the "Clear History" is only one part of the equation of making sure no one will be able to see what you've been using your browser for and previous versions of IE didn't exactly make it intuitive to delete all that information. Well, you can be more at ease now with IE7 because everything to do with "browsing history" is on one screen. So all you have to do now is hit "Delete all..." if you are in a hurry or you can just delete whatever information you want individually like cookies or automatic passwords stored by IE.

Built-in Search Bar
Again, another non-ground-breaking feature, but a definitely nice addition. IE 7 has a medium-sized search bar tucked neatly right next to the address bar. The biggest surprise perhaps is that neither it is restricted to MSN searches only, nor MSN is the active search engine by default, it's Google, believe it or not.

Built-in Security
Now, this seems to be the only feature that doesn't clone something that Firefox has already done. IE 7 comes with things such as a built-in Pop-up blocker and anti-phishing filter. The former is more well known, but the later may require some explanation. Phishing is the "art" of "cloning" web sites. For instance, a kid could set up a web site that looks like your bank's site and if they're really good they can make any requests to your bank's site go to his site instead. You wouldn't notice the difference since they'd look the same and bang, the kid's got your log in information effortlessly. IE comes with an anti-phishing engine which supposedly will recognize any dodgy sites and alert you to it in addition to reporting the site to authorities. It does that by keeping a database of dodgy sites at Microsoft and checking to see if you are accessing one of them. So, it begs the question: will this system work? I don't know yet, but Microsoft promises it will, so I guess we'll have to wait and see.


Overall 8/10
So far this is how much it scores for me. Internet Explorer 7 doesn't offer anything new to the browsing scene, instead it just does the big leap from the ancient structure and looks of IE 6 to what is expected of a decent browser in the mid-2000's.

Saturday, July 08, 2006

Use Windows Explorer

Many of you who were used to using Windows Explorer in Windows version previous to XP wonder what happened to it. As convenient as the "My Computer" interface is not all of the functionality is there and it can get pretty annoying if you want just want to copy/cut->paste folders from one place to another and you have to keep navigating back and forth between locations.

To use the windows explorer interface on Windows XP, just hold the windows button on your keyboard and press E. Now you can see all your drives in a tree-like interface just as you used to!

Friday, July 07, 2006

The type attribute cannot be present with either simpleType or complexType

Okay, I was struggling with this one for a while and couldn't find any answers on the net and it's one of those things that turn out making you feel stupid.

My xsd schema wouldn't validate. It failed with the error message mentioned on the title of this post: "The type attribute cannot be present with either simpleType or complexType." The relevant part of my schema was:


<xs:complexType name="ct_tuning">
<xs:attribute name="style" type="xs:string" use="required" />
<xs:attribute name="key" type="xs:string" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[a-gA-G]" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>

</xs:complexType>


Now what could possibly be wrong with this that???

Well, it turns out the error message is not helpful at all and doesn't make any sense.

The problem with this snippet is that the attribute has already been given a type.If you notice the declaration in bold you'll notice that the attribute named "key" has been declared with type="xs:string". By declaring the simpleType underneath I am declaring its type twice.

Deleting the type="xs:string" from the declaration solved the problem.