Well, I'll been here in Las Vegas for 36 hours and I'd just like to say that I've never stayed at a hotel where the employees are as helpful and pleasant as here at the Venetian.
The first session of the pre-conference was fantastic: Semantic HTML and Unobtrusive JavaScript presented by Nate Koechley
The second session, on the other hand, Cascading Stylesheets presented by Molly Holzschlag was atrocious. After the first two hours, we had covered what anyone can learn about CSS from a book in the first ten pages. Quite a few attendees, including my team, left the presentation early. (Hint Molly, you do not need to repeat war stories more than six or seven times)
So, with the main conference starting tomorrow, MIX09 is batting 50%.
Tuesday, March 17, 2009
Monday, March 9, 2009
The "Weekly" Newsgroup post #1
When I decided to become more active in the dot net community, I did a number of things:
I started this blog,
I started to attend the monthly meetings of our local users group ( omahamtg.com )
I started writing articles for codeproject.com (None of which I've finished yet - Bad Lee)
And, I started to hang out in the C# and ASP.net newsgroups as well as the forums at asp.net and silverlight.net in the hope that with my feeble knowledge I could help someone that the more experienced and knowledgeable would pass over as not worth their time.
Well, first thing I learned was that all the "Experts" on these newsgroups/forums are so helpful that I was only able to help a few people, and only then because their questions dovetailed exactly into my knowledge base.
But the big thing I learned was home much I could learn by reading the posted questions and answers. People are out there trying to do things with Dot Net that I never even thought of trying and reading in the replies how achieve those things has expanded my knowledge of all things Dot Net.
I used to think (and still do) that reading others source code was a great way to learn. When I found a link to Scott Hanselman's Weekly Source Code blog entries, I was forever indebted to Scott for searching the web and finding those few source code gems in the vast sea that is the Web.
I the same vein as Scott's Weekly Source Code posts, I'd like to start a "Weekly" posting of one or more Newsgroup/Forum questions that really deserve more focus than they received.
And Now: Question of the Week #1
================================
is there shorter way to code this
In this series of questions and answers, rodchar asks how he can get to two properties (Id and Text) of three different controls. His example shows the brute force way of taking an Object and through a series of IF statements determining if the Object "IS" of a certain type, then casting it to that type so as to access its ID and Text properties.
On reading the answers the Experts gave, it is obviously a perfect problem to be solved by an Interface. I chose this question because in my dealings with other programmers, Interfaces are the hardest part of OOP for them to grasp. Here in this one simple question, we have nearly the perfect example of how and where to use an interface.
Since there is now common parent that exposes the Text property, rodchar cannot just cast the Object to the parent. But, since they all already implement a Text property and an Id property, we can define an Interface that declares these two properties.
Here is the Interface suggested by DabblerNL
Now, All that is needed is to have the Objects implement the interface. Since they technically have already done so, they only need to be declared.
And viola! Just replace your old TextBox and CheckBox with the new versions and then all you need to do is cast the new controls "AS" your new interface: ITextAndID as so!
Being able to access these properties through the interface, and being able to implement the interface with no actual code other than the declarations makes this a pure example of interfaces!
I started this blog,
I started to attend the monthly meetings of our local users group ( omahamtg.com )
I started writing articles for codeproject.com (None of which I've finished yet - Bad Lee)
And, I started to hang out in the C# and ASP.net newsgroups as well as the forums at asp.net and silverlight.net in the hope that with my feeble knowledge I could help someone that the more experienced and knowledgeable would pass over as not worth their time.
Well, first thing I learned was that all the "Experts" on these newsgroups/forums are so helpful that I was only able to help a few people, and only then because their questions dovetailed exactly into my knowledge base.
But the big thing I learned was home much I could learn by reading the posted questions and answers. People are out there trying to do things with Dot Net that I never even thought of trying and reading in the replies how achieve those things has expanded my knowledge of all things Dot Net.
I used to think (and still do) that reading others source code was a great way to learn. When I found a link to Scott Hanselman's Weekly Source Code blog entries, I was forever indebted to Scott for searching the web and finding those few source code gems in the vast sea that is the Web.
I the same vein as Scott's Weekly Source Code posts, I'd like to start a "Weekly" posting of one or more Newsgroup/Forum questions that really deserve more focus than they received.
And Now: Question of the Week #1
================================
is there shorter way to code this
In this series of questions and answers, rodchar asks how he can get to two properties (Id and Text) of three different controls. His example shows the brute force way of taking an Object and through a series of IF statements determining if the Object "IS" of a certain type, then casting it to that type so as to access its ID and Text properties.
On reading the answers the Experts gave, it is obviously a perfect problem to be solved by an Interface. I chose this question because in my dealings with other programmers, Interfaces are the hardest part of OOP for them to grasp. Here in this one simple question, we have nearly the perfect example of how and where to use an interface.
Since there is now common parent that exposes the Text property, rodchar cannot just cast the Object to the parent. But, since they all already implement a Text property and an Id property, we can define an Interface that declares these two properties.
Here is the Interface suggested by DabblerNL
public interface ITextAndID
{
string Text {get;set;}
string ID{get;set;}
}
Now, All that is needed is to have the Objects implement the interface. Since they technically have already done so, they only need to be declared.
public class InterfacedTextBox: TextBox, ITextAndID {}
public class InterfacedCheckBox: CheckBox, ITextAndID {} And viola! Just replace your old TextBox and CheckBox with the new versions and then all you need to do is cast the new controls "AS" your new interface: ITextAndID as so!
var TheId = (ITextAndID)TheObject).ID;
var TheText = (ITextAndID)TheObject).Text;
Being able to access these properties through the interface, and being able to implement the interface with no actual code other than the declarations makes this a pure example of interfaces!
Labels:
computer problems,
computer science,
dot net,
programming
Sunday, March 1, 2009
Sudoku in Silverlight
You know how it is, you learn a skill (Programming in my case) because you see the results of others. Looking at the fruits of their labors, you say, "wow! I want to be able to do that." So you start learning, take some classes, read some books, maybe like me you enroll in the Computer Science program. If you get good, you may even get a job using your new found skill. But, did the learning of this skill lead you to the place you wanted to be, all those long years ago?
When I first started programming, it was to automate the games I was already playing. Then I moved into trying to replicate the types of games that I had played before on the computer. But as it usually happens, the real world got in the way. Instead of learning how to animate sprites, I had to learn how to connect to a database. Instead of graphics, I had to learn about algorithms.
Now, I'm not knocking my job and the work I do. I rarely go to "Work" since I get to indulge in my passion for programming every day. But, I feel this need to give more than lip service to the original reason that I got into the "Biz" in the first place.
Believe me, in 25 years the landscape of game programming has changed so much that I hardly recognize it! And, I've tried to keep my feet wet in the technology the entire time. The time when the ability to draw a digital stick figure and write a great game around it (Lode Runner) is long gone. When I first made up my mind to bite the bullet and truly try to learn game programming, in depth, the technology seemed so complicated that I almost quit.
But Rome was not built in a day and neither were any of my favorite games. Like I tell all of my junior programmers, "Start at the beginning, then just program each little piece until it is done”, I decided to start with the smallest bite I could “chew” and then just keep going. The first "Game" I wrote was a Sudoku generator with a Javascript back end. I Wrapped a website around it and launched it a couple of years ago.
Well, here is the thing about games, the are not all created equal. Sure Sudoku is a "Game" per se, but not really related to my true love, boardgames. So http://www.freedailygames.net languished for a few years without any upkeep. I even thought of just shutting it down, but according to Google analytics, I have a few very loyal customers. And, now with the new technology of Silverlight, I thought that updating my site with a Silverlight implementation of Sudoku would help me build my skills and give freedailygames.net a tech boost.
Well, here is my take on Sudoku in Silverlight.
And here is a zip file containing the entire Visual Studio 2008 Project.
When I first started programming, it was to automate the games I was already playing. Then I moved into trying to replicate the types of games that I had played before on the computer. But as it usually happens, the real world got in the way. Instead of learning how to animate sprites, I had to learn how to connect to a database. Instead of graphics, I had to learn about algorithms.
Now, I'm not knocking my job and the work I do. I rarely go to "Work" since I get to indulge in my passion for programming every day. But, I feel this need to give more than lip service to the original reason that I got into the "Biz" in the first place.
Believe me, in 25 years the landscape of game programming has changed so much that I hardly recognize it! And, I've tried to keep my feet wet in the technology the entire time. The time when the ability to draw a digital stick figure and write a great game around it (Lode Runner) is long gone. When I first made up my mind to bite the bullet and truly try to learn game programming, in depth, the technology seemed so complicated that I almost quit.
But Rome was not built in a day and neither were any of my favorite games. Like I tell all of my junior programmers, "Start at the beginning, then just program each little piece until it is done”, I decided to start with the smallest bite I could “chew” and then just keep going. The first "Game" I wrote was a Sudoku generator with a Javascript back end. I Wrapped a website around it and launched it a couple of years ago.
Well, here is the thing about games, the are not all created equal. Sure Sudoku is a "Game" per se, but not really related to my true love, boardgames. So http://www.freedailygames.net languished for a few years without any upkeep. I even thought of just shutting it down, but according to Google analytics, I have a few very loyal customers. And, now with the new technology of Silverlight, I thought that updating my site with a Silverlight implementation of Sudoku would help me build my skills and give freedailygames.net a tech boost.
Well, here is my take on Sudoku in Silverlight.
And here is a zip file containing the entire Visual Studio 2008 Project.
Labels:
computer science,
dot net,
games,
graphics,
programming,
silverlight
Subscribe to:
Posts (Atom)