Thursday, 13 December 2007

Dreamgirl

Her name was Andrea, but her friends called her Andrew, for some reason. Or at least this is what I found out a bit later, at my place. I'd also call her Andrew, as I thought she enjoyed it, or at least that she was used to it more. Turned out she really hated it, but she would not show herself vulnerable to something like this in front of her acquaintances.

One would not call her neither skinny, nor athletic, but she was a thin blonde, with a rather tense looking face, a bit short, but not much; really nice skin. I met her at this party and, even if I wasn't really attracted to her, I was in the mood. I wouldn't have minded shagging her if she was up for it. She certainly was more friendly than the brunette earlier. The bitch had noticed me looking at her and started making faces, to everyone's amusement. I told her she was looking very cute, in a babyish kind of way. I am not very good at acid remarks, obviously, especially when I am wasted. Hitting on a girl that drank in a corner with some other girl was not a good idea, anyway.

I had sobered up by the time I met Andrea. She started talking to me, actually, and I found the conversation with her quite entertaining. Her face was really interesting once she got to smile. All the tension would suddenly vanish and that smile would take 10 years off her. I was quite curious to see how she laughed. She wasn't much of a laugher, though, although I did use some of my best party jokes.

After a while she started telling me stuff about her, even rather private things. I am used to people getting drunk and spilling everything out - I usually do that - but she wasn't drunk. She did accept a drink from me, but she was definitely sober, yet she seemed desperate, somehow. Apparently she was quite the party girl. She told me about one time when she and her friends partied in a bus they rented and they woke up the next morning, all hung over and drooling all over each other. I stupidly smiled and told her I knew how that felt, all the time feeling a bit envious because I had no idea. I also felt like she read me like an open book, anyway.

By that time we'd ended up at my place and Andrea and me continued talking about all kinds of things. In a matter of hours we ended up feeling like good friends, although it was pretty clear we would not stop there. We were never going to be in love with one another either. I think she really enjoyed that I wasn't like her friends and that I didn't even know them. It was then when she told me not to call her Andrew anymore, her name was Andrea.

In fact, we got to leave the party after she did something really unexpected. We had been talking for a few minutes, normal stuff like names and how we are feeling and how the party is like, the bus thing, when she suddenly pulled a big notebook filled with pictures and personal notes written on paper that was cut in different shapes, all glued together in a thing that looked like a little girl's diary. She said "You want me to show you my life plan?". She'd written in that thing all the dreams that she had, detailed plans of what she intended to do with her life, things that she saw and she liked and she wanted to see more of. Her photos were really good, but the notes were really personal. I couldn't believe that she would show something like that to me. I felt like a thief, getting something I did not earn. The party was not a good place to be anymore, it was too impersonal and it lacked privacy.

I told her that if she wrote in the thing that she wanted to get married and have children and that was some weird ploy to pull me into it, it would certainly be a waste of time and not go well. Then she laughed, mind you. It was something I was really honest about, but I think she realised that and to my personal relief, there was no talk of children inside there. Her laughter was really beautiful.

So back at my place I started to look deeper into her journal thingie. She gave me a CD, told me that she would need to process some of the pictures she took and that on the CD was a special software that would read Binko files, whatever graphics format that was, and it would be good if I had it on my computer. It was funny and refreshing to hear that, I laughed and proceeded on installing the software. You see, we never talked about getting together again after this, certainly not at my house again. It was like she was admitting that she liked me and that she knew I liked her and that talking about it would be moot.

I felt than that maybe she would end up fixating on me, acting all neurotic and possessive at one time or another, but I didn't really care. If she would do that, she would be just opening more to me and I would never be forced to lie to her because of it, I would just react to what she would be doing or saying. Without actually defining it, it was already decided that we would have an honest relationship above all else. Not like boyfriend and girlfriend, more like that of best friends.

At that time I got a little nervous, thinking maybe I will get the "let's just be friends" speech and that was to be that, but before I could finish my thought, Andrea was kissing me. She would be gentle and sentimental in bed, not something one would expect from a party girl, but then again, I wouldn't want to believe that she would do that with anyone else.

And then I woke up. It was time for me to go to work and Andrea was already fading from my memory. It was a beautiful dream.

Using Cache in ASP.Net applications

Most programmers use the ViewState to preserve data across postbacks and the Session to preserve data for a user. There are cases when you want to preserve data across users. Maybe you are using an IHttpHandler and you want to send information through a key between your application and the handler. Or maybe you want to keep data that is resource consuming to acquire, but used by more users of the same application. Here is where Cache comes along.

There are two things you need to pay attention to when you are using the Cache:
  • While using the syntax Cache[key] is very simple and consistent with the ViewState, Session or other dictionaries you are used to, you need to be aware that in case of the server freeing memory, the cache items will be removed based on priority. Try to use Cache.Add or Cache.Insert with CacheItemPriority.NotRemovable when you are sure you don't want this to happen. The Absolute and Sliding expirations will still work.
  • I've read somewhere that HttpContext.Current.Cache does not work across users. It's like another Session object. Use HttpRuntime.Cache instead. I also looked in the ASP.Net source code and I found out that HttpContext.Cache returns HttpRuntime.Cache, so I don't see how these two properties could behave any differently. HttpRuntime is much easily usable, though, since it works in situations where HttpContext.Current is null

Wednesday, 12 December 2007

Rental Magica - interesting anime, but too silly to take seriously

Group image of the main cast
Rental Magica started very well, like a combination of Elfen Lied and Full Metal Alchemist. Unfortunately the magic is a lot more benign and not founded on anything interesting like in FMA, and the only connection to EL is the fact that the lead character is a nice guy surrounded by children looking female girls that have a crush on him.

Other than that, I've only watched the first 10 episodes. There was the potential of greatness, while the series explored the taboos of magic and what happens to mages trying to break them. Also there are a homunculus and a mechanical archenemy present. However, someone decided that it is better to fight evil with goodness and that in the end goodness should win, making the whole thing really silly.

I would recommend it to children only.

Sunday, 9 December 2007

Vampire the Masquerade - Redemption

Game cover image
I got this game from a colleague of mine, something she labelled as strategy. Well, it was actually an RPG, and a pretty good one, too. Considering that it is rather old, it certainly goes up there in my games top. It is one of the games in the Vampire the Masquerade series, codenamed Redemption and released in 2000 by Activision.

Ok, the idea is that you are a crusader, left behind by your company due to severe battle trauma. A helpful and kind nun takes care of your wounds and makes you better. However, you soon find out that the city (of Prague) is plagued by monsters and undead creatures. As a devout follower of God's path (infidel! I kill you!), you get your mighty sword and crusader expertise and proceed on a debug mission. It would be pointless to go further from here, as the story evolves until you get in the year 1999 and in the cities of Prague, Vienna, London and New York.

The fun of the game is that you use both vampiric attacks and magic and a bit of strategic thinking in order to attain your goals. Starting out with a single character, you get to have up to four.

Now about the fast lane: how to finish the game as soon as possible. First of all try to equip your characters with the best armour and weapons you can find. At first you don't have a lot of money, but you find all kind of stuff when you kill monsters. Second of all, you will get to find a lot of rings and necklaces and bracelets that only improve APP(earance). You might think that wearing them will pimp your vampires, but Appearance is very important for one of the most crucial spells in the game: Enchantment. The other very important spells are: Feed, Blood Healing and Ice Statue. If you master these four spells you can defeat anyone. Unfortunately, Ice Statue will not be available until you defeat the Tremere, which is quite advanced in the game. Any spell that makes the target not attack will be as good, though. The next important spells are Awaken (wakes up a dead member of your group) and Walk the Abyss, which allows you to instantly transport to your save game place (the Haven) and store your objects and increase your stats. A good secondary spell is Spirit's Touch, which will identify the unknown objects you find.

Another important thing is to go to Options -> Controls and remove all spells from your group except auto healing. Otherwise your vampire buddies will gobble up blood like it's 12 years old Whiskey. And talking of control, near each character's picture there is a green light. Click on it and the guy will not follow you around like a dumbass, killing the people you are trying to feed upon or do magic tricks on.

And back to the fast lane: use Enchantment to control an enemy to fight the others around him when there are more than one foe. Then run in front of him with one of your group, so that he follows (or do that from the start if you can separate him from the others or if he is alone), then wait with another character with big Feed rating and, of course, Feed until the foe dies. In order for this to work, the little green lights must be off, otherwise they will follow and attack like idiots. In the case of monsters and non-blooded creatures, freeze them and kill them.

Also to note is that Christof's AI is more violent than for others. Even without his little green light, he will still attack stupidly. Another thing to note is that using the middle mouse button, the characters will attack with a slower, but stronger attack, optimal for frozen creatures or when they are fighting someone else in the group. Remember to keep your Feed guy empty by letting the others feed on him!

Ok, that's it. The game has a multiplayer option as well, but I haven't explored it yet. The movement AI is the worst part of the game. Also the story could have been more interesting. At some times I managed to enter unfinished portions of the game, where characters would just sit and not interact or where the dialogue would have been replaced by general options like "Threaten" "Leave Alone". Other than that, it's a pretty smooth, though linear, game.

If anyone is interested, there are three possible endings, and here are the YouTube links. Just make sure you want to see them before you finish the game or not.

Good Ending
Neutral Ending
Bad Ending

Saturday, 8 December 2007

How to select VLC default encoding of subtitles

Update 11 Feb 2016: I've just taken another look at the VLC menu (version 2.2.0) and the way to get to the encoding is: Tools → Preferences →
  • For 'simple' interface: Subtitles/OSD → Default encoding
  • For 'all' interface: Input/Codecs → Subtitle codecs → Subtitles → Subtitle text encoding

I have been using VLC Video Lan Player for a long time, mostly for myself, since it can show instantly movies that are incomplete and gets past most video performance issues in Windows by mostly ignoring the default video renderings and using its own codecs.

But there was always this problem with the Romanian translations. The specific Romanian letters (diacritics/diacritice) appeared like weird characters and it got annoying. I thought a simple configuration setting might solve the problem, but it wasn't the case. In the extensive (and mostly incomprehensible) configuration interface there were all kinds of options regarding the subtitles, but not a default subtitle encoding.

Ok, so here is how to do it.
  • Method 0: See above :) It's the GUI way of choosing the setting at Method 3
  • Method 1. Load the movie from the Open menu option. You get to choose your subtitle file and also the subtitle encoding, in the Advanced Options menu. For Romanian all you have to do is choose is 8859-2 (Latin2). But this doesn't solve multiple movie files in the playlist or set a default encoding. This doesn't seem to work anymore
  • Method 2. use the --subsdec-encoding=ISO-8859-2 setting in the VLC command line.
  • Method 3. And the one that solved all my issues. Go to the folder <Operating System Drive>:\Documents and Settings\<Current User>\Application Data\vlc\ and open in a text editor the file vlcrc. Then search for the option subsdec-encoding, uncomment the line and change the Default to your encoding, for example ISO-8859-2.


That's it.

Thursday, 6 December 2007

Mushishi


Mushishi is a strangely calming anime. It takes place in almost feudal Japan (they seem a lot more liberal and have access to some technology like microscopes and the mushishi talks about genetics in one episode) and follows Ginko, a man that can see the strange lifeforms that are all around us, called Mushi.

In the end the episodes are rarely tense, with no or almost no violence. The mushi themselves are not perceived as evil that must be killed, but as a part of the ecosystem. Unlike most mushishi (a sort of mushi hunter/doctor), Ginko, the lead character, seeks only to restore the balance between normal life and mushi life.

The anime itself takes place for only 26 episodes, all self contained, you could watch any of them in any order without losing any continuity. The manga is of course much longer and you can read it here.

The calm music and the elements of traditional Japanese life and history are most welcome for a leisurely time when you want to relax and take your mind of things.

Hidden porn in ASP.NET Ajax

I was building my nice little web app, you know: grids, buttons, ajax, stuff like that. And of course I had to create CSS classes for my controls, for example a button has the class of butt and the Send button has a class of buttsend. I agree it was not one of the most inspired CSS class name, but look what ajax made out of it:

Details: Error parsing near 'ass=buttsend'