30 January 2009

On my wishlist: the Sims 3!!!

The Sims 3 is (are???) coming!


That game is definitely on my wishlist!

And so is a new graphic card. My Radeon Xpress 200M doesn't seem to be on the list. And so is a new computer, as I only have two laptops (well, only,... ) and you can't add a graphic card to a laptop (can you?). And so is a new desk for that computer, with a flowery desktop like this one:


(But definitely with different legs.) And so is... nah, I'd better stop now.

20 January 2009

Making Silverlight do the work for me: fake software boxes

What I love about Silverlight is that it does a lot of work for me. An example: fake software boxes. Let's say you have some software to advertise: isn't this box appealing?

So, you can go to the graphics department and nicely ask for such a box. Or follow the tutorial. But what if you have dozens of products to advertise? The graphic people don't want to do that and neither do you. I believe there are some smart graphic editors that do macros or something like that, but there's yet one more way, illustrated by the diagram below:
Here's what I did yesterday working on a website to advertise my company's software:

  1. I took two plain pictures, one for the front and one for the side (this one can be a textblock).
  2. I placed them on the canvas and surrounded them with borders.
  3. I added a rectangle for the top.
  4. I applied transformations to obtain the pseudo-3d effect you can see above.
Now, to make more boxes of the kind, I just need to re-use the xaml and change the images! Piece of cake!

Okay, this is the place where I should put the code, but I did this at work, which means it's copyrighted to my company and I'd have to ask my boss for his permission, which I couldn't really do these days because he's too busy and now I'm leaving work for a week to focus on school. Sorry about that.

Furthermore, this can be done better (look again at the picture on the top):
  1. one can apply a matrix transform to give perspective (that thing where parallel lines all meet somewhere... mine don't)
  2. one can add a shadow (which I definitely should)
  3. one can make rounded corners like Microsoft's software boxes have
  4. one can add a reflection, since it's web 2.0 and every single software box is standing on a shiny surface, and Silverlight is great for that too!
and that's just a few ideas.

Well, if anyone feels inspired and wants to make a re-usable software box control, I'm sure a lot of people would re-use it, so let me know if you do!

13 January 2009

Silverlight and localization

Lucky me! I got a new project: the new company's website. Such sites need to have two features:

  1. an impressive presentation layer
  2. a few languages versions
For the first one, Silverlight is the dream technology. For the second one, however, it's a nightmare. I wanted to be able to change the language easily to say "see, Boss, the French version looks good too". I spent one entire day trying to make it work and it kinda works... kinda.

There are a few catches. First, there is no easy way to do that as in asp.net (there should be!). Microsoft published an article on localizing Silverlight applications and it's no fun to read. But, we're big boys, let's add our resources files by ourselves, rename them and stuff.

Second catch is coming: the constructor in the resourse.designer.cs file is protected instead of public. Two workarounds here:
  1. change it yourself everytime you modify the resource
  2. get a tool for that: Dmytro Kryvko’s Extended Strongly Typed Resource Generator 2.3
So far, everything is to be worked around. But... I wanted too much. I wanted localization and user controls. I could declare two namespaces, one for the resources and one for the controls, I could decalre the resource as a static resource, but binding... no. I got an AG_E_PARSER_BAD_TYPE error on a perfectly correct xaml file. After the entire day of investigating, I gave up on binding my controls to the resources in xaml - I bind them at runtime and rebind each time the language is changed. Ugly, but works.

I don't know... you might have more luck than me. If you wanna localize, start with reading "Silverlight and International Thoughts". There's a fully detailed instruction on creating a localized application in 43 steps.

As much as I like Silverlight, localization is a nightmare and that disappoints me a lot, as it's something that's been done in asp.net already - I feel like reinventing the mouse wheel here!

11 January 2009

What's in my bag

It's a cool feminine tradition to post a picture of all that we carry around in our bags. Here's mine:



What do we have here?

  1. The MSI Wind pink laptop
  2. a mouse for the laptop
  3. a power cable for the laptop
  4. a 4 GB pendrive
  5. a bunch of cards
  6. train season ticket
  7. cell phone
  8. Tic-tacs
  9. hand cream
  10. a Microsoft book
  11. a comb
  12. a few random lipsticks
  13. Astor foundation
  14. a few random hair elastics
  15. a wallet
  16. an mp3 player
I swear it all fits in there!

07 January 2009

Good news from Lifehacker

So the global economy is in trouble and the cold here is unbearable, but Lifehacker posted a bunch of good news recently:

  1. Tetris Wipes Out Bad Memories
  2. Chocolate, Wine, and Tea Improve Cognitive Performance
  3. Playing Board Games Boosts Important Skills
  4. Research Shows Internet Use Good for the Brain
So, what is there to do? Play board Tetris on the Internet drinking wine and eating chocolate!

Bruce Schneier is coming to Poland!

Bruce Schneier is coming to Poland! He'll be the keynote speaker at CONFidence 2009.


More info about the conference at 2009.confidence.org.pl.

03 January 2009

Update

So I haven't updated for a while... here's what I've been doing lately:

  • celebrating Chritsmas with lots of family singing
  • deciding to get married in April or May
  • buying stuff for our new house
  • handling wedding stuff
  • writing my masters paper
  • hosting a New Year's party
  • getting rid of clutter

Most of that stuff is going/gone good, except that the cat vomited on my bridal magazines.

Coming next: back to work, learning Python, preparing for the 70-something exam... Enough to keep a girl busy, right?