22 October 2008

Is Your Buttermilk Bad?


Ever since I've been living on my own, there's a lot of questions that come up that I've never had to worry about. This especially includes food going bad. Recently, I had orange specks (dots) in my buttermilk. Did my buttermilk go bad and what is this?

When I found I had bright orange specks in my buttermilk, I really thought it had gone bad. And me, being a maniac on not wasting stuff, starting thinking about all the ways I could use up everything before it goes "completely bad".

With some research, I found out that these specks are actually not bad... in fact, it's what's used to make buttermilk. They are actually supposed to be there!

Bacteria: The Good Kind
The orange dots are a strain of lactic acid bacteria that are used in the fermentation process in making buttermilk. Most buttermilk you buy in stores is inoculated with this bacteria to promote the growth of bacteria found in traditionally-made buttermilk (you know, with the churning and stuff). They usually disappear after a while in room temperature but it doesn't matter if it does not go away. It is a natural part of making buttermilk.

Mystery of the Orange Specks: Case Solved!
So next time you find orange specks in your buttermilk, be thankful they're there. They are actually used to make buttermilk and you might not have buttermilk otherwise!

Note: So when is your buttermilk really bad? You'll know. You think when I say this, you won't. But you'll really know. Usually buttermilk smells sweet/sour. When it's gone bad, there's either something else growing in it (not orange) and it'll start to smell reeaally bad (kind of like when milk goes bad).

Dead Space: Will Scare Horror-Addicts

I'm not even the horror-loving type but this game has a certain appeal that draws you toward it. Dead Space is the most brilliant and awesome-looking sci-fi horror game I have ever seen. The game combines various features of other hits in the genre to produce a nasty and thrilling mix.

Unfortunately, I don't have any 3rd-generation game consoles so even though I won't be able to play this game, I still feel like I have an attachment to it (or maybe it's that tentacle-sucking-my-insides-out type of attachment). However, I love interesting storylines, and it sounds like this one is pretty sweet.

Introduction
The game takes place in the future where Earth mines whole planets for minerals ("planet cracking"). USG Ishimura was one of these Planet Cracking ships that got caught up in something. You play as Isaac Clarke, an engineer that's been called to the USG Ishimura after receiving a distress signal.


Impressions
Since I haven't played the game myself, I'll just give you my impressions. Considering that the Flood in Halo actually kinda got me spooked out, I feel that if I ever play this game, I might just shit my pants. Something that really gets me interested in games is not the gameplay but the storyline. I really like games (no matter how simple or complicated) that have some interesting plot and develop it throughout the story. Just imagine what it would be like completely taking apart a planet for mining. What would you even encounter?

Apparently, some weird things called Necromorphs had taken over the ship and you basically find out more about the infestation and you slice your way through hordes of gory and grotesque pieces of flesh. After I got over the setting, I was actually looking at Isaac's actual suit/armor.

Super-Cool Mask
Isaac really wears something that I feel is realistic. You're a miner... so you might need a helmet/mask. It kind of reminded me of those masks you wear when you're welding things. But his mask looks very gothic and dark. It wouldn't be really surprising if he was a murderer in a horror-film but since he's the good guy, it feels so much more powerful. Too bad you might get your whole head bitten off by a Necromorph.



Lighting
Indescribably fantastic lighting makes the game more mysterious and will probably get you crawling closer to the screen before something jumps out of a air duct and impales you. Dead Space uses something called deferred shading which determines the texture/shade of an object in real-time. Most games have pre-defined shades in the environments so that a wall has a certain shade with the lights on and a different shade for a candle. Every situation has been pre-defined so you'll never find anything interesting in the walls. Deferred lighting determines what shade the wall needs to have while you play the game. So if there's multiple small light sources throughout the screen, then the walls will have some reflections appropriate to the situation. End-effect: everything looks spookier...

Real-Time Phobia
Everything is in real-time so even when you look through menus and stuff, the Necromorphs moving toward you will... keep moving towards you. There's no quick way to turn around other than to turn around the way you normally do. The sense of vulnerability keeps your heart racing every minute you play. The "weapons" are pretty interesting though since they are make-shift versions of mining equipment. Your Kinesis power let's you push and pull things around (in unlimited amounts). So feel free to grab some limbs and beat a Necromorph with it. The Statis power slows down objects. Probably very useful when you have angry dead things rushing towards you.

Never feel safe again, or at least not until you make Necromorphs into mush. Headshots don't work anymore. I used to feel so safe with a shotgot in Halo. In Dead Space, you have to dismember every limb before the Necromorph stops (I just hope arms don't move on their own).

In conclusion, you'll never feel safe in spaceships floating in the dark ever again. No really, considering I only look at games, this is the most exciting scare-myself-to-death game I've seen that I wouldn't mind buying a game console for.

Google PageRank: The Mathematics Behind It All

PageRank is some order for pages that rates them based on how important they are. Since "importance" is such a subjective term, how can you actually rank pages? Search engines have to solve this problem so they know what to display first. Luckily, I learned something interesting in my probability course about Google PageRank.

Let's start off with an amazing(ly vague) definition that tells us very little and a whole lot at the same time:
"A page has high rank if the sum of the ranks of its backlinks is high."

Wow. What a statement. Let's break it down.

What Is A Backlink?
It's when someone else links to your website. So it doesn't matter if you have a million links to other websites, it only matters if those million wesbites have links to you. Sounds simple enough.

So what if you have a thousands of dummy pages that all link to your page? Well, it would seem that your page gets a high rank then. However, how does Google prevent this? The pages that link to your page need to be important too. So if some big website links to you, you're somewhat important too.

Probability and Stationary Equations (for Math People)
Anyways, it turns out Google PageRank uses this nifty idea in probability involving stationary equations of Markov chains (anyone scared of math, close your eyes now and scroll to the end):






Putting it together, we get that the PageRank of page i is the sum of all the PageRanks of page j times the probability of it going to page i.

This is the exact formula for stationary equations in Markov chains. So now, if you have a bunch of dummy pages that link to your page, you're still not important because the probability that anyone goes to those dummy pages if very low (hence all of those PageRanks stay low). Now let's try to screw this thing up too.

What if you have some person that decides not link to anyone at all! Or maybe just links to itself. So if even one page has a link TO this page, then as time goes by, everyone will end up at this page and get "stuck" (we don't use the back button since we only follow links). This is called a deadend or spidertrap. In the stationary equations, what happens is that this page gets ALL the importance.

Taxation
One solution to this: taxation. Basically, "tax" everyone's page and take that percent and redistribute links randomly. So suppose there's a 30% tax. Then the probabilities of going through a link is only 70% of what it originally was. Then we take that 30%, and add a random link to some random page. So now, with probability 70%, the "spidertrap" goes back to itself. The other 30% goes to some other page(s).

So you might be thinking how do you calculate the probability of going from one webpage to another. Easy way: you don't! Just assume that you have equal probability. I guess there are better ways that might get only a slightly better answer, but to save time and calculation power, each link has an equal probability of being followed.

For the Non-Math People
So those that skipped over the previous section. Here's a summary: There's an interesting topic in probability called stationary equations that helps you find what "fraction" of the time you are on a webpage. Essentially, if you have a lot of high-ranked websites backlinking to you, many visitors are very likely spending lots of time on your webpage.

What if you try to hog all that importance? What if you don't put links out to other people? In theory (without the browser back button), visitors that come to your page will get "stuck" there. This is called a deadend or a spidertrap.

Taxes on Webpages (For Non-Math People)
Taxation solves this by solving the calculations in stationary equations with random links pointing from every page to every other page. In other words, it creates smaller and less important links that aren't really there when doing the calculations. So when you get stuck in some page, you can follow the non-existent link to something else. It's called a tax because you can think of it as though you're very unlikely to follow that non-existent link and the webpage loses some of it's PageRank (based on how big the tax is).


You can kind of think of it as money. Everyone gets money, everyone gives money. If someone only got money and never spent anything, you can imagine that over a long period of time, he would have most of the money in the world. The taxes basically take that money and give it back to everyone. (Think communism when you see 100% tax... everyone is equal).

Current Model
Google is constantly changing their PageRank algorithm but this is essentially the basis for their model. Understanding Google's PageRank can really help if you have a new website and you want become important really fast. Or if you're interested in working for Google (or planning on buying out Google), doesn't hurt to know this either.

07 October 2008

Crack Windows Passwords

Are you really sure no one can figure out your Windows password? It turns out Windows doesn't do a really good job of hiding your password.

Anyone that has access to your Windows XP/Vista has access to your password. It's almost fun after you learn how to do it. What do you need?

SAMInside is a great program that is fairly quick too in figuring out your password. You do need to copy some essential files though.

It turns out that Windows XP/Vista store passwords in a file in C:\Windows\syster32\config. Two files to be exact. The first file is named "SAM" (stands for Security Accounts Manager). A hash of your password is stored here but it turns out the algorithm Windows uses is horrible. If your password is less than 14 characters, then it splits the password into two 7-character pieces. Another file tries to make this crappy method more "secure" by using some special system properties to encrypt the SAM. The exact information needed for this is stored in the "SYSTEM" file. Once you have both of these files, SAMInside can crack alphanumeric passwords in about 3 hours.

3 hours?! Ok...well maybe a bit longer for some of the weirder people that use punctuation/symbols. But does it really matter? Once a person just copies the SAM and SYSTEM files, you're screwed. Windows does make accessing these files difficult but there are really easy ways around this (boot using a different operating system for example). So what do you do?

  1. Don't let anyone else touch your computer and make sure no one does... (I guess you could do this, but I prefer #2/#3...)
  2. Make your passwords longer than 14 characters. Windows puts a different algorithm to hash your password (takes years/eons to crack passwords now).
  3. Disable the LM hash.
So anyone who wants more information/details on any of this, I might have another post up later (or you could just ask).