Friday, December 4, 2009

Streaming music

I'm not a fan of streaming music nor videos, but it's pretty boring working in front of a computer the whole day running test scripts with nothing to listen to. So I asked my colleague if he has MP3s (coming from the Philippines, we usually download our mp3s and play using itunes). He then introduced me to http://www.di.fm. I immediately loved it; I thought streaming was going to be slow, but it wasn't. I just select 40K low bandwidth, and the music streams are continuous.

If you don't have access on mp3s on your PC, you can check it out.

Tuesday, December 1, 2009

* and Auto Difference in Silverlight

With Silverlight (as well as with any other application), people do need to play around to learn. I do precisely that to learn, as well as get some bugs fixed.

With ASP .NET, you always have to use tables to arrange your layout. The Silverlight equivalent of that will have to be the Grid. With the Grid, setting the height and width is also inevitable (the same way goes for setting and row and column, as well as row/columnspan). With that comes * and Auto.

* and Auto have different behaviors. If you have two columns in a Grid, setting the width to * will yield 50% allocation for each column. Whereas with Auto, the width set will be according to the original dimensions of the control you put inside that Grid. If the control in the Grid however will have a width or height adjustment at runtime, setting width or height to Auto will cause the Grid to expand. With *, the Grid will stay the same, and the control (listbox) will adjust.

Margins also play an important part in Silverlight. You usually have to adjust them to set your controls properly.

There's no "Design" view for Silverlight in Visual Studio; unlike with ASP .NET. That is why Expression Blend is necessary so that you don't have to run your application to view it.

ListBox scrollbar

Unlike the problem discussed in the link below, my problem was how do I set the listbox (in Silverlight) to show a scrollbar by default. There are two things you can do here:

1. Set the Height property of the listbox to Height="<value>". This is a good solution if you're not a fan of scrollbars, because the scrollbar will only show if the Height was reached.
2. Set the ScrollViewer.VerticalScrollBarVisibility="Visible". With this solution, the scrollbar is always visible. This is a good solution however if you don't know the exact height of your listbox, esp. for varying screen resolutions.

The source for last item is below:
Link to Prevent Silverlight Listbox from being displayed forum

The image for the last item is also below:


It'll almost be a month since I worked on Silverlight. It's a different type of programming experience for me. No more divs, p, br, table, tr and td tags! Welcome MS Expression Blend!

December 1

It's already the 1st of December, and the snow already started to fall . It's the first time I experienced snowfall so I am giddy. I've also been working for a month now. And my husband is finally getting a job offer, so life is getting better. :) (I still have yet to receive my first pay cheque though)

Wednesday, October 28, 2009

WCF using Visual C# Express Edition on Windows XP Home Edition

WCF (Windows Communication Foundation) has been getting a lot of buzz lately. For me, it's actually Web Services with extra (++) features. If you want to learn WCF, there are a lot of information from Microsoft.

I've tried to implement a WCF Service (self-host) and WCF Client using Visual C# 2008 Express Edition on a WinXP Home Edition system. To do that, you can follow the introductory videos in the Microsoft site (Beginner's Guide to WCF). I followed - Creating Your First WCF Service, Self-hosting WCF Services, and Creating Your First WCF Client, all by Aaron Skonnard. It was tough because some of the tools aren't there, but google always comes in handy.

The tool / site that I've used are:
- SvcConfigEditor.exe (substitute for Edit WCF Configuration) (you may find this in Program Files\Microsoft SDKs directory on your system)
- Create Temporary Certificate (from Codeplex) (this is important to run your WCF host; this also solves the ff. error: "Cannot load the X.509 certificate identity specified in the configuration", which you may encounter from following the aforementioned videos)
- for creating the client, I used BasicHttpBinding_IEvalService instead of
WSHttpBinding_IEvalService. For the metadata address to add the EvalService reference in the client, I used the information from the <services>\<host>\<baseAddresses> found in the host's app.config.

Skip the parts on the WCF Test Client because it's not available with the Express Edition. Anyway, you can always test using the client.

Don't forget to run WCF Service Host before you run the client.

Drop me a comment if you have questions.

Moving In to Canada

We have already moved. And it's been 3 months since we moved! It was pretty tough to move in Canada, especially in the summer. The weather was okay, but it was very hard to look for a job, even temp jobs. It was partly due to the recession, the "canadian experience", and the fact that students (aside from those unemployed) are also applying for summer jobs. The situation is getting better right now, there are more job openings than the summer, but it's getting cold. If I have my way, I would prefer to work during the summer and just stay at home (or work from home) during the winter.

So my advice for those wanting to immigrate to Canada is, if you can find a job before moving in, better do so. Otherwise, bring enough money to cover for your expenses for minimum of 6 months (that's the minimum required money which is listed in the immigration site). Also, spend sparingly until after you have a job. Once you're already here, do the ff. things:
1. Get your SIN.
2. Open a bank account (you need the bank statement to apply for your Health Card).
3. If you have kid(s), apply for the Child Tax Benefit. (This is a BIG help for newcomers and those with low income)
4. Get a Driver's License.
5. Get your Health Card (after you get your bank statement).

Once you're applying for a job, do not forget to retrofit your resume based on the requirements.

You may also consider getting retirement savings plan (RRSP) and educational plan (RESP) for yourself and your kids.

Canada is a great place to raise kids. Aside from the child tax benefit, school (kindergarten to highschool) is free. My son has also adjusted well - from the weather, to the house, milk, playmates, etc. Below is his latest picture.

Monday, June 29, 2009

Safari's Develop menu

I have been doing Change Requests, performing Unit Tests and bug fixing for a while now. The bugs are either easy or too difficult (Intermittent and hard to replicate). Grrr...

Just as in my previous company, we are testing on 3 browsers: IE 6, Firefox 3 and Safari 4. Firefox and Safari should be consistent until after I encountered a browser feature, wherein the presentation in Safari is entirely different compared to IE and Firefox. And it cannot be overridden even with using inline style. Hayyy....

To my delight, I have however discovered that there is a "Develop" menu included in Safari, which can be used to debug / inspect the page. To enable the said menu, from Safari 4, go to Preferences, Advanced, and then click the "Show Develop menu in the bar" checkbox. Remember to select "Show Menu bar", too, so that you can see the menu. No need to install any third party software :)

For IE, I have been using IE Developer toolbar. And for Firefox, there is Firebug. IE Developer toolbar is available in Microsoft site. Firebug is available at: http://getfirebug.com/