Just a simple tip if you haven’t already tried to use these layout controls.
When you are creating content (controls) to add to the grid via a Row and Column number it would help if you knew the index is 0 (Zero) based …. that would be Column 0, Row 0 for the top left corner and not 1,1 as it should be :)
Enjoy!
Linq2SQL is fast becoming one of my favorite frameworks for throwing quick sites together. I used to use a lot of object relational mappers but this is free and built in so .. yay :)
I’ve noticed recently a lack of understanding in trying to return a single entity from a collection. Many times when you fetch data you know there will only be 1 row but you get a collection or have to request First from an IQueryable type.
Lets say you have a Customers table. You want to fetch 1 row of type Customer.
Customer myCustomer = (from c in dataContext.Customers
where c.CustomerId = 1
select c).Single<Customer> ();
myCustomer will now be of type Customer – nice and clean :)
A good all around LINQ book, not just L2SQL but Link to everything.

Well unless you’ve been living under a rock you’d know that Silverlight 2.0 has now been released. Why do you care? … Assuming the rock you were under wasn’t too big :) you’d know that the first release of Silverlight was really intended for designers and not developers although, there was technically nothing stopping you from creating anything you wanted. It was just extremely painful. Think pencil in ear.
Silverlight 2.0 brings all the goodies that we’ve come to expect as good little Microsoft developers. We have better looking user controls, layout controls and a host of 3rd party controls from companies like Telerik and ComponentArt.
And so the great move to Silverlight begins, anyone that has any half decent web application is going to want it redone in Silverlight and most new projects will want to take advantage of the hype around this technology. Please note (pretty please?) I don’t really like the word “hype” since the technology truly is amazing .. anyway with the CYA out the way I too started on a new design for some of my own products.
One of these is my Mafooku shared store system. This site, like many, requires that Google can do a good job searching for content since there are thousands of products for sale. Then it hit me. How is Google going to search my content when it’s embedded in a control … I’m sure many of you are already shouting – but just emit the same content and hide it … nah, not really practical on many sites and a waste of bandwidth.
You probably hoping there is some great solution – nah … nothing yet. I’m thinking there needs to be some interface added for search engines to find the exact content you’re displaying but I am unaware of anything as yet. I’m not saying there isn’t :) I just haven’t found it yet.
I did want to share a link to a short blog post about a transform you can add, that a search engine can use to get a form of rendered and readable content which can be searched.
Content Transform
It did also just occur to me that creating external links like
http://somelink/?id=x
need a way to be interpreted by the Silverlight application so that the correct content can be displayed … fun :) I’m sure it will be easy but definitely a new way of doing things.
It is the best of Flash, Smart clients and the web all in one. I hope you’re going to get learning too! Nobody needs another html web site :)
ps: Dear Google, please make me a Silverlight Adsense control :)
I’ve thrown up a new site over the last week. It’s sole purpose is to track and gather information on the features we all really really need for our gadgets, phones and even operating systems.
Anybody can post a feature idea and can request for products to be added to the site.
Take a look and get voting! What Feature?
Yes, the site is called What Feature … do you know how hard it is to find a good domain name these days ;) I thought I did a fairly good job with that one.
Anybody take a guess what application this is?
I hope you’re laughing, for anybody running Office 2007 – probably the most bug riddled release ever from MS. This is supposed to be my outlook. Besides suddenly and continuously prompting me to login to our freaking exchange server I get this window – maybe they can repackage this as Micro-Outlook for the iPhone maybe? ;)
At my office we’ve also noticed that all Vista and Office 2007 machines that have Visio installed get a nasty bug that crashes Visio every single time it exits even after a OLE sequence.
I hear bells in my head :)
I hate to sound like I’m just jumping on the band wagon with another Vista rant, the Internet already has enough of those :) but this is just one of those damn stupid things that I just can’t let go, simply because every time I try use my camera I get the dreaded driver disk screen.
Once you’ve been using Vista for awhile you’ll find a few gems that’ll make you want to just stick it out but man, after almost 2 years you would think it was better than this.
So here is the low down. I have a Pentax A20 digital camera – nothing unusual there. Ever since I switched to Vista I’ve been able to just plug my camera in via USB and copy off my images, even using Vista’s new image manager. This camera has no drivers – non were ever made since it uses a generic drive. (SD Chip) – Well last week I plug my camera in and whamo … now Vista says it needs drivers for a device that has NO freaking drivers. No way around it, no fix, no drivers to download – Vista just lost the freaking plot and now I have to take out the SD chip each time I want my pics….
Bravo MS bravo …
I haven’t yet posted my work on PHP so this is a little out of context however since it applies to many popular languages I’m just going to go ahead and post :)
Here is a brief description of what duck typing is – basically slang but a very nice feature of various programming languages. I personally like it and I suspect most others do simply because it saves key strokes, after almost 10 years of c# programming you get very tired of double declarations.
So I have recently been doing a lot of work with PHP and discovered a disadvantage of duck typing. Although the compiler and runtime environment may know what type a variable is, you as a programmer might not! This might not seem like a big problem if you wrote the entire program but if you’re working with someone elses code or writing plugins/modules for existing systems, you’ll find this kinda hard. If you see a variable called $params being passed into a function you could “guess” it is an array but it might be some custom class.
I use a nice PHP IDE (phpEd) and real debugger so I can get the information quickly if I want but still, it raised yet another issue in trying to understand what code is trying to do.
-c
Here is a small project I thought others might find as useful as I have. We all know how hard it is to find a decently written schema these days especially when you inherit a project. Well why carry those ugly column names into code? This generator will create nice names for your columns while preserving the actual column name in the Linq To SQL dbml files.
This is an initial release so better things to come but it works for now. If you’d like to get involved there is a dedicated page here and a codeplex project as well.
Download from http://www.codeplex.com/linqalias/
Keep track of changes on my blog page here http://www.typemismatch.com/linq-alias/
Enjoy, -c
“Code Generation” tools to be more specific. Let me clarify that firstly. I’m not talking about tools that just take away programmer’s jobs – I don’t see anything that would suggest that is currently possible. I’m more interested in tools that just do what we keep repeating. If you haven’t discovered code productivity tools yet then you’ve been living under a rock! It’s time to wake up and get busy. You’re too slow these days without some good tools and so I’ve put a few posts together just for the best tools you could start with.
If you browse around the net these days you’ll find tons of “silver bullets” for the programming problems of today. Time is usually the best test of these things and pretty much all fancy styles, methodologies or techniques have failed or fail to some degree. The bottom line is, there isn’t a magic way to develop software, that will at least guarantee good quality or bug less code. So I think the next best thing is – how do we developer faster? and if we do find something that works well, how can I automate that so the next time I use it, a. I don’t have to rewrite it and b. I don’t re-create any bugs.
As a developer if you can build a library of tools, snippets and templates you’ll definately be headed down the road to more successful software. Now not all my suggestions are for code generation – I’ll talk a little about profilers and other such tools you just have to have!
http://www.typemismatch.com/2007/11/25/tools-productivity-tools-generators/
http://www.typemismatch.com/2007/11/24/tools-net-profilers/
If you do have any tool recommendations please leave a comment and I can see about adding a post for them.
-c
There are many tools out there for developers and I’ll probably write some more later about some ORM tools I use often and that save a ton of time. This article is about a more generic tool, something that can help you no matter what kind of code you’re writing. These are productivity tools and/or code generators.
A good tool in this area does at least the following:
- Helps identify code mistakes
- Supports code block templates
- Lots of refactoring support
- A good deal of syntax high lighting, i.e. code blocks, braces, line numbers etc.
Again this isn’t a tool you’re going to find for free. They take a great deal of time and research to develop so be prepared to spend a little. I’d say anything priced from $150-$250 is about average.
Below I have listed two tools both from the same company. The first called “Refactor!Pro” is a great tool however it is included in the more advanced product called “CodeRush” both from DevExpress.
Although Refactor!Pro is only $99 it is well worth the extra $150 to get the full product. This tool is incredible and you’ll discover even in the first day of usage that it can save you a ton of time. The ability to create your own templates which change depending on the code you’re editing is awesome. I picked this over competitive products primarily for 1. Their support and other product lines and 2. Their integration with the keyboard and keyboard shortcuts was just the easiest to use.
Don’t forget, you must learn to use these tools. If you get one and don’t bother to learn the shortcuts or how the templates work then you’re just wasting your money. See some juicy screen shots belows.

As usual you can get a nice long trial, so give it a go!
-c