Since I’m pretty new to Windows Forms I learn a lot this days (I have done mainly ASP.NET development). I came across this feature and find it really interesting, Owner and Owned Forms. We can say that for the user it’s the same thing as the ShowDialog() method (grayed parent form, etc…). However, with ShowDialog there is no built-in way to make a link between the parent and the child form.
There is 2 way we can make this relation :
1. As a parameter in the Show() method
Form1 childForm = newForm1();
childForm.Show(this); //this is the parent form
2. Using the properties
Form1 childForm = newForm1();
childForm.Owner = this; //this is the parent form
And you can iterate through the child forms of the parent form with the OwnedForms property.
Do you remember Sam & Max, Full Throttle and Day of the Tentacle (Dott!)? ScummVM allow you to replay these kind of point and click adventure games. You only need to have the data file for them and you are ready to go. There are also different port: Nintendo DS, Dreamcast, PlayStation 2, etc… I think I’m gonna give it a try on the DS as soon as I have all the component. I would really like to play Monkey Island on the bus.
Good news, I will see progress! Since I was not able to do a full one. I will probably do them on my knees for the next couple of days. I forgot to mention how much I will do each time. It’s simple, 3 series of the maximum I can do. I hope to be able to do at least 20 at the end of the trial.
Following the idea of a 30 day trial from Steve Pavlina’s blog to start a new habit, I have decided to give it a try with something I wanted to do for a long time, improving my health. The trial I want to do is doing push up everyday for 30 day without any days off. It does not seem too hard and will be a good candidate to this test.
So tomorrow will the first day and I have put a widget in the side bar to keep you informed of my progress.
But if you want to know why I do this commitment on my blog, you need to check thisWeb Worker Daily post which is all about being more productive with a blog.
The Cirque Du Soleil has just launched a new show : Kooza. If you’ve never seen them before, this is the one who will make you purchase another ticket.
It was fantastic!! Unbelievable! You can’t just imagine how it was. You can’t imagine just in seeing the video. You need to be there. And if you happen to have seen it, yes it’s arranged (you know what I mean).
Yesterday I downloaded the Beta 2 of Visual Studio 2008 and .NET 3.5. And I decided to start writing a little journal application. During the first hour I had not seen anything new and was wondering what are the advantages of migrating to 2008 if you are not doing Web Application (new features concerning CSS, JavaScript, debugging, etc..). I decided to do a quick search on Google, and found the ScottGu’s Blog (highly recommended) which was enumerating some new features. And found 2 that was directly applicable now to my application : Automatic Properties and Query Syntax.
Automatic Properties
Suppose you are writing properties for a class. Don’t you find that you are creating private field for nothing. Wouldn’t it be simpler that the compiler generate it automatically for you. Check this out :
publicDateTime? EntryDate
{
get { return _entryDate; }
set { _entryDate = value; }
}
become
publicDateTime? EntryDate { get; set; }
Less code means more time to do something else, so I’m happy!
Query Syntax
I had a collection of JournalEntry instance and wanted to find the one containing the date the user selected. The way I had done it at first was to iterate through the collection and check if the date was the same (I could have done it with predicate too). But the way LINQ handle it was too cool not to try it.
P.S One advice before you try this. Make sure the project is compiled using .NET 3.5 and you reference System.Core.
My little loop has became this :
IEnumerable<JournalEntry> results = from j in Journal
where j.EntryDate == selectedDate
select j;
For a long time I wanted to have a personal knowledge base that I will use to keep all the code snippet frequently used. I was also needing a place to keep all my todo and useful text. After reading the LifeHacker book (which is excellent by the way) I have decided to do a quick search for online wiki. After some research, WikiDot.com was the one that fit most of my criteria. I needed it to be private so nobody can see my personal stuff and most importantly, be free.
There is also WikiSpaces which is free, but if you want a private wiki, you will have to pay.
First thing : it’s slow. You can’t imagine how it is slow. There is nothing to do, it will stay slow if you access it with the LAN mode. But there is a solution that will help SourceSafe to be a little faster. You need to use Remote Web Access over Http. The time to check-in a single file in my case, has gone from 1 minute to 5 seconds.
Here is some link that will help you setup your environment:
In case you have not seen this very cool presentation done at the TED conference, check this out there : Photosynth. This is a project I would do anything to work on it. They are reconstructing the Notre-Dame Cathedral with image from flicker. Can you imagine that! Unbelievable!
If you still have time to check another video, check the Tony Robbins presentation. I have read his book some years ago (his name in the french book is Anthony Robbins, translator have this crazy idea that name can be translated, by example : Buster in the Mythbuster show is called Jimmy) and he had help me a lot finding what I wanted to do in life. He is very entertaining and motivating.
2 years ago, someone told me Ruby will be the “next big thing”. I told him “no way”. C# will gain more and more popularity and ASP.NET 2.0 will totally rules. God, I was wrong. After 2 months of Ruby On Rails, I must admit it’s here to stay. The ease of use of the Rails framework is impressive. In 30 minutes I have managed to create a little web application to keep track of my weight with complete support for creating/editing/deleting as well as listing all items. This was the first minute, the remaining 29 minutes was modifying the design and doing some CSS.
If you have never seen the coding of a blog engine by a ruby on rails programmer, then you must absolutely check this screencast.
There is a lot more screencasts that will encourage you to go further on the Ruby On Rails website.
And a bonus for all of you who are already into ruby : RailsCasts
Some months ago (when I was blogging on WDevs) I was using Windows Live Writer a lot. The only problem I had, was to configure it to actually see my blog. And today I have decided to give it a second try. And, wow, no problem at all. Everything is working perfectly. There is also some interesting plug-in that will enhance my experience (ex : Syntax Highlighting and Flicker4Writer).
For a month now, I trying to learn ruby and the Ruby On Rails framework. The biggest difficulty so far was programming without intellisense. Honestly, I’m loving this difficulty. I reading a lot more the documentation that before and find this really helpful for my learning. But the coding is a lot more slower and by chance, this is a personal project and I have no deadline (and you can get a project done really quick with Rails, believe me !).
As promised, I will return back everything I have learned about Selenium. I invite you to go the OpenQA web site for additional information.
If you stick with me for this series of article, you will get a great quick start to create good acceptances tests.
Selenium IDE (Integrated Development Environment) is a Firefox extension that records your actions on a page. Then you can execute them back with the IDE or with other version of Selenium (Selenium Remote Control is one of them).
Click the download link. This will install the IDE.
(If , for some reason, the Selenium IDE can’t replay your test, switch to a previous version.)
Third step : Record your first test
In Firefox, go to Tools\Selenium IDE.
Make sure the record button is pressed.
Navigate on the web application.
Press the green arrow (start button).
Your first test is done.
Now, maybe the replay has not worked and you got some errors. This will be covered in the next post when I will show you how to add others commands to your Selenium test.
Here is some features found in the interface:
There is the baseURL text field. Suppose you have two times the same web site, you want to have this attribute because you will avoid hard coding the path in the test. Simply specific another baseURL and the test will be performed on it.
Run/Walk/Step. This is basically the speed at witch the test will be executed. However, Step will require you to press the “Step” button to go line by line. Very useful.
Of course you can save the test, juste press Ctrl-S or go to File/Save Test.
Table/Source tabs. Basically, a test is just an html file (not entirely true, you will see later), composed of a table element, and 3 columns (each one has a specific purpose).
Play with Selenium Test Runner. This will launch a test runner for your test (will be covered later).
A lot more is possible and this is only the beginning.
If you find missing information, just leave a comment, and I will update the post.