Tag: linkedIn
Client just went live
by Joseph on Mar.19, 2009, under Consulting
Hey guys, just had a client go live. Interested in buying a diamond or engagement ring for your lady? Check out http://www.edwardjamesandco.com. Edward not only sells a large arrangement of engagement rings, but he has a huge selection of loose diamonds.
On a personal note, I’ve been working with Edward for the past 6 or so months, and he’s a really great guy. The next time I buy my wife something of this caliber I’m definitely going to be going to him.
Even if you’re not in the market right now, go check out the site anyway. He has a wealth of knowledge about diamonds and rings: what to look for in a diamond or setting, and other information about how the entire certification process works. He’ll be updating his site regularly to keep people informed of his industry, so if you’re into diamonds you might want to consider registering on his site just for informational reasons.
Anyway, that’s my two cents, take care guys!
The SRP Swiss Army Knife
by Joseph on Mar.07, 2009, under Programming
I read this blog a few weeks back, and while the principles that the author was trying to convey I don’t disagree with, I did have a hard time stomaching the idea that Swiss army knives made for bad OOP design. Why? Because I really like Swiss army knives! I mean come on, what other device lets you have 100+ different kinds of knives, a compass, a light, a magnifying glass, and a USB drive all in one “disappears in your pocket” size container???
Ok so I know what most of you are thinking… I’m just PROVING that they violate SRP right? Not actually. In case you’re not familiar with the principle of SRP, check out this wiki. The reason why I believe the Swiss army knife does NOT violate SRP is because my general rule of them is, if I can state the responsibility of the object in question in one single statement, then I have identified it’s SINGLE responsibility. So I have to ask myself, what is the SINGLE thing that a Swiss army knife does?
Responsibility statement: A Swiss army knife is responsible for allowing it’s user to be able to use any tool that has been installed into it.
Short, simple, and to the point. Now, that sounds all fine and dandy, but if I don’t implement the code the way I’ve dictated in my statement, then I will violate SRP, so how is it that I build a Swiss army knife while preserving my responsibility statement? Enter code.
1: public interface SwissArmyKnife
2: {
3: ITool PullOutTool(ITool tool);
4: void PutAwayTool(ITool tool);
5:
6: IList Tools { get; }
7:
8: ITool ToolBeingUsed { get; set; }
9: }
My interface defines any type of Swiss army knife I ever wish to make. It’s only responsibility is to be able to use a tool that it has. So then how do you use the Tool? Well here’s how an ITool might look like:
1: public interface ITool
2: {
3: void Use();
4: }
Now you can get any tool from the Swiss army knife and then use it. Notice that it’s NOT the responsibility of the Swiss army knife to know HOW to USE the tool, only to get it out or put it away.
So what would violate SRP then? Why did the author choose this particular product to harp on? I think it was a matter of perspective really. The article I read had numerous pictures of knives all decked out such as this one. Here is where I believe the real trickery is. The author shows the pictures of all the swiss army knives with all the tools exposed. If you really tried to use the knife like this, you would probably really screw up your hand! That’s my point. The knife is not of any use to anyone unless you’re using ONE tool at a time. This is why SRP is not being violated.
You might take this a step further and say that you have a Swiss army Factory that would actually build the Swiss army knives, but that would be a discussion for another day.
Anyway, I hope everyone has found this interesting, till next time!
Light up the world in Silverlight!
by Joseph on Mar.07, 2009, under Programming
I just finished watching a variety of videos from Mike Taulty about learning Silverlight. These are exceptionally good videos and I would suggest anyone that is trying to learn Silverlight OR Windows Presentation Foundation (WPF) to take a look at them.
Here are links to all the videos.
- Silverlight – Hello World
- Silverlight – Anatomy of an Application
- Silverlight – The VS Environment
- Silverlight – Content Controls
- Silverlight – Built-In Controls
- Silverlight – Width, Height, Margins, Padding, Alignment
- Silverlight – Using a GridSplitter
- Silverlight – Grid Layout
- Silverlight – StackPanel Layout
- Silverlight – Canvas Layout
- Silverlight – Databinding UI to .NET Classes
- Silverlight – Simple Styles
- Silverlight – Custom Types in XAML
- Silverlight – Binding with Conversion
- Silverlight – List Based Data Binding
- Silverlight – Simple User Control
- Silverlight – Templating a Button
- Silverlight – Resources from XAP/DLL/Site Of Origin
- Silverlight – Animations & Storyboards
- Silverlight – Uploads with WebClient
- Silverlight – Downloads with WebClient
- Silverlight – Calling HTTPS Web Services
- Silverlight – Calling Web Services
- Silverlight – Making Cross Domain Requests
- Silverlight – Using HttpWebRequest
- Silverlight – File Dialogs and User Files
- Silverlight – Using Sockets
- Silverlight – Using Isolated Storage
- Silverlight – .NET Code Modifying HTML
- Silverlight – Using Isolated Storage Quotas
- Silverlight – Calling JavaScript from .NET
- Silverlight – Evaluating JavaScript from .NET Code
- Silverlight – Handling HTML Events in .NET Code
- Silverlight – Handling .NET Events in JavaScript
- Silverlight – Calling .NET from JavaScript
- Silverlight – Displaying a Custom Splash Screen
- Silverlight – Passing Parameters from your Web Page
- Silverlight – Loading Media at Runtime
- Silverlight – Dynamically Loading Assemblies/Code
- Silverlight – Reading/Writing XML
- Silverlight – Multiple Threads with BackgroundWorker
- Silverlight – Insert/Update/Delete with the DataGrid
- Silverlight – Getting Started with the DataGrid
- Silverlight – Embedding Custom Fonts
Five Common SEO Mistakes
by Joseph on Mar.07, 2009, under Technology
I’ve come across this many times when building sites for clients. ASP.NET is really great for building dynamic content pages, but not so great when you’re trying to expose those dynamic pages to a crawler or bot used by search engines. Usually I’ve found myself having to index the crawler or bot to go find specific pages if I wanted something to show up explicitly. For instance, you might have a product that you really want to showcase and have searchable. The product’s URL, however might be parameter based, something like http://www.yourstore.com/productdetails.aspx?productid=5.
Here are 5 common mistakes you should avoid when building sites that need to be Search Engine Optimized (SEO).
1. Overuse of Button Controls
The Button and LinkButton controls are handy for running server-side logic when a link or push button is clicked, but keep in mind that search engines can’t follow these links. These controls cause a postback via Javascript code that search engines are unable to execute. I’ve seen more than one developer who’s standard method of linking from one page to another was to drag a LinkButton control onto the page and then place a Response.Redirect in the event handler, making the entire site completely uncrawlable by search engines.
2. Duplicate Page Titles
With any dynamically generated site, it can be difficult to generate unique page titles for each and every page, but it really is important. If you have a quality site, then the search engines are working hard to drive traffic to your site. After all, that is their core business – to provide links to the best resources on whatever the searcher is looking for.
So you need to make it easy for the search engines to figure out exactly what your pages are about, and the page title is an important part of that. Not only that, but once the search engine does rank your page highly, the title is the primary text that searchers will be seeing and using to determine whether to click on your listing or not!
3. Duplicate Meta Descriptions
Much like the duplicate page title issue, the meta description tag should not be duplicated across your pages either. Like the page title, this text is used (although to a lesser extent) by the search engines to determine the content of your page and also appears underneath your title in the search engine listing. Depending on the number of pages of dynamic content on your site, it might not be practical to add multi-sentence descriptions for every single page. In this case, simply remove the meta description tag altogether. The major search engines are pretty good at improvising when the description tag is missing by displaying portions of the page body that match the user’s search keywords instead.
4. State-Dependent Pages
Search engines rely heavily on the idea that every unique page has it’s own unique URL. That means that if you are basing a page’s content on session variables or viewstate parameters, you are probably going to have problems getting that content indexed. Once a search engine finds a URL, Google will continue spidering that page, but you can bet that the search engine robot will not navigate through your site again to get there. So you need to make sure that any content you want indexed by search engines can be accessed by simply opening your browser and typing in the URL of that content. That means unique URLs for every product in your ecommerce store, ever category in your directory, etc.
5. Duplicate Content When Rewriting URLs With ASP.NET
When you rewrite a URL, the browser is displaying a keyword-rich URL, but internally the URL of the page being displayed is still the ugly URL with the querystring parameters. In technical terms, the Request.RawURL value might be something like:
- http://www.store.com/products/coffee-cup.aspx
but the Request.Url value would still be something like:
- http://www.store.com/products.aspx?productID=15
All of that is just fine, but a problem can arise if you have a Button or LinkButton control that posts back on that page. By default, the button control will post back to the Request.URL value. causing the URL to change after postback. This can be a problem if some users end up linking to your ‘ugly’ URLs, because the search engines will find that link and spider it. To the search engine the two different URLs signify two different pages and both will be indexed seperately, causing a pretty ugly duplicate content problem.
The original article that I read this from was on this blog
Visual Studio Tip: Jump Between Braces
by Joseph on Mar.07, 2009, under Technology
Have you ever found yourself lost inside some sort of block statement, wondering when the beginning of the block began or ended? I just found this awesome feature in Visual Studio that allows me to jump to the beginning or ending of a block.
To do this, put your cursor before or after the brace (your choice) and then press Ctrl+]. It works with either curly or round braces.
I originally found this nifty little feature from another blog

