How cool is this blog?

Did you know that you can drag and drop the boxes in the left or right and order them as you like?

Just move your mouse over the grey box until the cursor changes, and then drag the box to the new position as you like.

Give it a try and post a comment if you like it!

Twitter Button from twitbuttons.com

Blogroll

BlogCatalog



Showing posts with label Visual Studio. Show all posts

These days, everyone wants to buy state of the art technology when it comes to PCs. Fast processors, lots of RAM, stunning graphics cards, huge hard disk drives, blue ray drives, anything new on the market.

If you are a developer using Visual Studio 2005, you probably want to know how can you truly benefit from all the new hardware while programming your applications.

Well, I am happy to announce (for those of you who did not find out about this until now) that Microsoft has been asking this question for quite a while. When it comes to the RAM usage of Visual Studio, most of you already know that VS 2005 consumes more than VS 2003, but VS 2008 takes it to another level... Especially if you are a Vista user:

VS Version

Minimum RAM

Recommended RAM

2005

192

256

2008

384

384+ XP

768+ Vista


Having 2GB + of RAM is nothing our days. Tomorrow, we will probably count RAM using Terra Bytes.

One great thing that Visual Studio 2008 brings for us, developers, is not only compatibility, but also optimization of the build process on multi core processor systems. This basically means more cores = faster build! And that, I must say, is COOL! Imagine using dual Quad processor system for building projects that usually take up to 10 hours to build. That reduces the overall build time to about 12%!!! Nice.

What is NOT nice nor COOL is that this feature was present also with Visual Studio 2005, just nobody informed us! And it so easy to enable it...

The /MP option can reduce the total time to compile the source files on the command line. The /MP option causes the compiler to create one or more copies of itself, each in a separate process. Then these copies simultaneously compile the source files. Consequently, the total time to build the source files can be significantly reduced.

So, just open Visual Studio, open up your C++ project (sorry C# users) -> right-click and select Properties -> in the left tree expand Configuration Properties -> expand C/C++ -> select Command Line. In the Additional options text area, type "/MP" and press OK. That's it, you're all set!

PS: I don't know if you need to restart VS or reboot your computer. It should not, since you are only modifying the command line arguments of the build command. Anyway, if you don't see any results after doing this change, you either did something wrong or need a new processor :P



There was a lot of buzzing (still is) around here lately about 64 bit - from processors to programming for 64 bit machines. So I decided to write a small post on this topic. There are tons of articles out there, so feel free to Yahoo or Google them and read the one you like.

First of, I don't want to write pages and pages about the subject, so consider this just a short introduction. Visit the links I post and if you still need more info, ask. I will provide if I can.

Computers work with BITs (binary digits). A BIT is either 0 (zero) or 1 (one). This basically comes from electrical circuits where you have 0 (zero, off - no electricity) or 1 (one, on - we have power!). You can think at your light switcher. When the light is on, the light bulb is in the state of "1" (on). When you turn it off, its state is 0 (off). Using this technology is similar to the Morse Code, when depending if the light is on or of, and how long it stays in that state, you can send a message on a large distance without any type of wire. Now imagine that your PC has a LOT of tiny little light bulbs that change from 0 to 1 and back, depending on the data that you want to send.

(NOTE: This is just a newbie introduction. If you want to find out How PCs work, check out http://www.howstuffworks.com/pc.htm and their entire website about computers: http://computer.howstuffworks.com/).

"32 bit computer" basically means that the PC uses 32 bits ("light bulbs") to communicate, whereas 64 bit PCs have 64 "light bulbs". You can surely imagine that by sending 64 pieces of information (32 bits x 2) instead of just 32 means (usually) half of the required time to communicate the same thing. So this is advantage number 1 - increased performance.

The second most obvious remark is that if you want to send a word that is larger than 32 characters (assuming we have 1 bit for 1 letter), you need to send more messages just to transmit 1 word. If you have 64 bits, you can send up to two 32 words in the same 64 bit word, which again means double performance. And increased word capacity - advantage number 2.

(I only hope someone will appreciate the efforts I had to put up with in order to write this newbie introduction to bits ...)

More technical part now:

There are two types of 64 bit processors: true 64 bit processors and processors that support 64 bit operations.

To make this clear from the start, all AMD64 and Intel Core2/Quad/Extreme/Xeon support 64 bit operations and you can (it's even recommended) to use a 64 bit operation system with them. There are some "true 64 bit processors" which are, of course, expensive and rare. You do not need a "true 64 bit processor" unless you are Bill Gates and have a lot of money to spend on creating new 64 bit software for your "true" machine. Some of the names of these "true 64 bit processor" (oops, did I write that again? :) ) are: Itanium and Itanium 2 from Intel , and Opteron from AMD.

What is the difference between the two ("supported 64" and "true 64")? You cannot run any 32 bit application on a "true" 64, but you have no problem running either 32 or 64 bit applications on a processor that "supports" 64 bit operations. Itanium and Opteron are heavy duty workstation processors, that will run with dedicated applications which are developed especially for them, so they are not built for running your favorite game on it.

FYI: If you want to have a 64 bit system, you must also buy 64 bit compatible hardware for your processor to work with. Elsewhere, you will just end up with a very smart brain in a much to small case...

Advantages of having a 64 bit architecture?

  1. Increased performance due to larger word length
  2. Increased performance due to larger BUS size
  3. Ability to work with larger memory blocks -> more RAM (up to 16TB) compared to up to 3GB in 32 bit systems

Disadvantages of "supported 64 bit" systems?
  1. Need to buy new hardware for it to fully function (although if you already have a Core 2/Quad/Extreme processor, you are most likely already equipped for 64 bit operations)
  2. ...

Disadvantages of "true 64 bit" systems?
  1. Very expensive
  2. Does not have 32 bit backwards compatibility
  3. Applications need to be compiled specially for those types of platforms (you need to rebuild your existing code if migrating from 32/64 to true 64)
  4. Very few application which are true 64 bit

I told you this was a long topic...

To wrap it up, some links for you to read more:
  • 64 bit in general
http://www.redbooks.ibm.com/abstracts/tips0475.html
  • 64 bit programming
http://www.gamasutra.com/features/20040603/pournelle_01.shtml
http://blogs.msdn.com/tolong/archive/2007/03/21/use-visual-studio-to-build-64-bit-application.aspx
http://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Framework/CPlusIntegrated64Bit.htm
http://blogs.msdn.com/deeptanshuv/archive/2006/04/11/573795.aspx
http://msdn.microsoft.com/library/en-us/dndotnet/html/64migrate.asp

Well, I hope we are all a little BIT wiser... All the best!



I was trying to find how you can automatically increment the version number for my C++ application. Then I found this useful post on the MSDN site, so I am sharing it with you.

You can find all the needed information in the post, so I am just posting a summary for those of you who just want to get an idea of how to do it.

Basically, you need to create a Visual Studio macro and register it for the BuildFinish event. You then move the version information from resources in a separate file (to make sure the macro does not mess anything up) and tell the macro (using VB code) to edit the file containing the version number and increment it. What happens is that after each build, VS executes the macro, which modifies the text file (actually, a header file) incrementing the version number. This way, for each build you will have a new version number for the application.

Even if you do not need automatically incremented versions for each build, the MSDN tutorial is useful because it show C++ newbies (like myself) how to easily separate the version number from the rest of the resources and keep the version number in just one place.

The link to the site is: http://support.microsoft.com/kb/237870

Build it safe :)

PS: Another cool post shows how to update the version information at runtime. Thanx to CodeProject for this one: http://www.codeproject.com/KB/cpp/UpdateVersion.aspx

Subscribe to: Posts (Atom)

Feedjit

Bloglinker list