It's a question that comes up quite often, and much has been said about it already. But I figured I'd throw in my two cents.
The situation is this: you've got a computer with 4GB RAM, but Windows (or Linux, or MacOS, etc.) reports you have only 3.25GB (or some other number less than 4GB). Where did the rest of the RAM go? How can you use the full amount? The answer to that last question is unfortunately that you can't, not with a 32 bit version of Windows anyway.
Here's what's going on. To read and write information in memory a computer program must specify where in memory it wishes to do so. For this it uses an address (I'm leaving virtual memory out of this discussion because it's irrelevant and would only complicate matters, so in this article when I say address I mean a physical address, that refers to an actual byte on your real RAM chips). Ever since the introduction of the 386 these addresses have been 32 bits in size. This means that there are 2 to the power of 32, or 4294967296 possible addresses. Because the x86 architecture addresses individual bytes, this means a maximum of 4294967296 bytes, or 4GB, can be addressed. This is the physical address space.
Many devices like your video or sound card use memory mapping to allow software to communicate with those devices. What this means is that they use certain addresses don't actually refer to a byte in memory; instead writing to that address sends information to that device. To do this they reserve a portion of the physical address space. If your video card is using 512MB of that address space and you install 4GB of memory in the system, you would need 4.5GB of address space to address all that, which you don't have. So 512MB of physical RAM cannot be addressed (because those addresses are used by the video card) and thus cannot be used or even "seen" by the OS.
Note that it's not only the video card; most other devices do this as well. Using the System Information tool in Windows (Start, Run, msinfo32.exe) you can see all hardware devices that do this and what address ranges they use under the "Hardware Resources, Memory" option (for the oldies: notice how there are still some devices that map into the old "upper memory" region (the area between the first 640KB and 1MB of RAM)). The ranges are shown as hexadecimal numbers.
Most 32 bit processors support an extended addressing mode called PAE (Physical Address Extension) which allows it to use 36 bit addresses for a total of 64GB of address space. 64 bit CPUs can use 64 bit addresses which allow for (theoretically) more than 16 million GB RAM (16 ExaBytes). However, for compatibility reasons all hardware devices will map into the first 4GB reason of address space (otherwise they wouldn't be able to run a 32 bit OS). So there's still an overlap and in the default scenario you'd still lose part of your RAM (even if you have e.g. 8GB RAM, you'd lose part of the first 4GB and see only e.g. 7.2GB). But most modern motherboards are capable of remapping the upper portion of RAM into the range above 4GB so all of it can theoretically be used (unless you actually have 64GB of RAM on a system with PAE).
I say theoretically because you still need OS support for the 36 bit addressing (or a real 64 bit OS on 64 bit systems). Windows does support PAE (among other things it's needed for Data Execution Prevention in Windows XP SP2 and up) but unless you have Windows Server it doesn't actually allow you to use the address above the 4GB boundary so you still lose RAM even if your motherboard has this support. The 64 bit versions of Windows (even the client versions) allow you to use 18TB of RAM so naturally it can use the full 4GB if your motherboard can do the remapping.
So simply put, if you want to use 4GB RAM and not lose any of it, you need a 64 bit CPU and either Windows Server, a 64 bit version of Windows, or some other operating system that either supports PAE or 64 bit.
It's time to once again break my usual habit of not rehashing other people's news. Microsoft has remained very tight-lipped about what Internet Explorer 8 will be like, but just recently they've started trickling out information.
Today they announced that IE8 renders the Acid2 CSS compliance test correctly. This, and other work being done on standards compliance in IE8, constitute a major leap forward for IE, and this means good news for web developers like myself (although it'll be a while until we can truly use this stuff, seeing as how even now IE6 still outnumbers IE7, so no telling when IE8 will become the majority).
I hope they'll release a beta soon. :)
For a joke on Channel9 I needed a screenshot of Channel9 in Internet Explorer on Windows 3.11, and for a laugh I also decided to make a screencast of setting up Windows 3.11 in Virtual PC. It's not very useful, but maybe a bit of nostalgia for people who used this OS. :)
The cursor is a bit wonky at times. It seems Windows Media Encoder (which I used to take the screencast) shows Vista's own cursor even when the cursor is captured by Virtual PC and isn't actually visible. This is why you get an additional cursor when I'm using the mouse in the Virtual PC. Nothing I can do about that, though.
One of the nicer consequences of me passing the exams is that my research lab at University would provide with a new laptop. They'd already given me an old Panasonic to get me through the intervening months, but now that I'm a real student at the lab, they can afford to get me new stuff.
Based on Internet reviews I chose the Dell XPS M1330. Today, it arrived.
The pros: unlike your regular Dell laptop, this one looks extremely cool. The 13.3" widescreen WLED screen is fantastic. I like the keyboard so far (it's not gotten any real workout though). It has a fingerprint reader which is just plain cool (when Windows shows the welcome screen I just scan my finger and it logs on). Vista runs great on it, it's very fast, but with a Core 2 Duo T7500 (2.2GHz) and 2GB RAM, what do you expect? I also specifically picked the optional 7200RPM hard drive because I hate the usual slow laptop hard drives.
The cons: it's heavier than I expected. Maybe I've gotten spoiled by the Panasonic which weighs nothing. It's not super heavy but it could've been better. The edges around the screen are rather wide, without those the laptop could've been much smaller. It has only two USB ports. Dell installed the usual amount of crap on it that I had to take some time to remove.
One interesting thing is that Dell Japan didn't offer an option for an English version of Windows (especially weird since they did offer an English keyboard layout). But they did offer an option to get Vista Ultimate for a relatively small amount of money (which I didn't have to pay anyway :P ). So I got that and then used the English language pack available through Vista Ultimate Extras to turn the UI to English, which works great.
So overall I'm very pleased. But then again, since I've just gotten a great laptop for free, why wouldn't I be. :)
Path finding is a fairly simple problem with well-known algorithms. When you're doing path-finding for a train route this is even easier: all you have to consider is the price and duration of the different possibilities (as well as convenience factors such as number of transfers if you want a really good result).
The website Hyperdia offers a convenient way to find train routes in Japan. When I was looking for a route from Higashi-kitazawa (the station nearest to my lab at Tokyo University) to Shinjuku, it makes sense that it comes up with this route:
Note that I don't actually need Hyperdia to find this out; this route is simple and I've taken it many times (although usually not starting at Higashi-kitazawa but earlier down the line). I was mainly interested in the price from this station, and I wanted to see if it would be faster to walk to Yoyogi-Uehara instead and take an express train. But I digress.
Hyperdia always gives you several alternatives. Sometimes routes that are faster but more expensive, slower but cheaper, take more or less transfers, and, as I've found out today, sometimes it's routes that are slower, take more transfers, and are more expensive! This is the second option Hyperdia lists for this route:
Uhm, ok? I've plotted these two routes on a map. As you can see they appear very similar in terms of distance covered. But the second route takes two transfers instead of zero, is more than twice as expensive, takes almost twice as long, and includes two minutes walking!
Some consolation can be found in the fact that this was at least not the first route it offered, so it does at least recognize that the other one makes more sense. But the fact that this route is offered at all makes you wonder what kind of weird weight-function is used to evaluate these routes? :P