Using ASP.Net for Code Generation

Jul
15
2009
by M.S.

Developers periodically find themselves with the need to have utilities to generate large amounts of templated C# code (a common example would be class files from either a database or text file). There are a number of options for writing code generation utilities, from CodeSmith to manually building up large strings in your C# code; some obviously easier and faster for the developers to write than others.  For developer's who, for reason's involving ease of use or familiarity, would like to use an environment similar to asp.net for managing their templates, I would point out they do have the option of actually using asp.net.  Nothing about asp.net actually requires the textual output for an .aspx page to be html. 

Read on to see a basic implementation of the idea.

 

SMercer

A Quick Note on Blocking the Digg Bar

Apr
13
2009
by SMercer

The low-down on the Digg Bar

If you have been on Digg in the last week or so, you have probably noticed that when following a link out of digg that your browser retains a strip at the top of the page you are viewing. This little toolbar, known as the "Digg Bar" contains helpful short cuts to digg functionality. Another "benefit" of the digg bar is that it frames the content on the target site with a shortened, easy to remember digg.com url. The benefit of this url is that as people share the story with one and other, it presents further recipients of the link the opportunity to contribute to the stories standing on digg without having to actually find it on digg (which can be very frustrating). One would think of this as good thing, but many bloggers and authors are up in arms about that fact that this can be viewed as digg framing their content as it's own. Anybody who knows anything about digg knows that it doesn't really produce any content of it's own, so this didn't really bother me at first. However, once I realized that if you were to follow a link to this blog post from digg that it would obfuscate the fact that you are going to delphicsage.com, I did begin to see what this outrage stems from.  I should note that the digg bar does display the original URL, but since it's the digg.com url in your address bar that would be most likely be copied and sent to friends on facebook (etc, etc, etc) it's digg that would reap all of the search engine gold from your hard work.

On Blocking the Digg Bar

Although the Digg Bar does have it drawbacks, I'm not sure if the folks over at digg were trying to be "evil". Some of the side effects of the digg bar have long been considered no-nos in the the web world, and especially now since SEO competition is so fierce. Many sites are beginning to block the digg bar (engadget included). I recently stumbled accross a PHP script that blocks any user from digg from seeing the sites content via a server side HTTP_REFERER detect. THIS IS A VERY BAD IDEA. Denying users access to your content because you have a grudge against digg is a case of "cutting off your nose to spite your face". The amount of web traffic that digg produces cannot be ignored, your readers/customers/clients deserve better than to be blocked completely. I would suggest doing what engadget does by simply using a javascript to remove the digg bar if it's there, leaving your content intact. Here is a good example of how to do this using a simple javascript.

A few weeks ago, my Mom told me she needed a computer. I had an old, extra laptop hanging around so I told her and my Dad not to buy one. The first application I installed was Google's Chrome web browser.  Read on to find out why.

Before I installed Chrome, I installed a fresh copy of Windows XP (That I also happened to have lying around.)

To address some concerns coming from the dark corner of the internets full of *nix people: no, I wasn't going to install Ubuntu or another Linux on her machine. I lost sleep over the decision not to install FreeBSD, however. These operating systems are just not ready for Mom.  It's just this old 1.5 GHz HP zt3000 with 1GB RAM and built in wireless. A very decent machine. I had run Gentoo on it for years, and wrote many Java libraries for various things. With old sentiments like that, I could only give it to my Mom. And, no I didn't have an extra Mac on hand (although I wish I did!).

Anyway, continue reading to find out why I feel that google chrome is the best way for my mom to surf the web.

These top 10 posts are a little bit tiresome, but in case anyone out there wants to know which tools the developers of Delphic Sage hold near and dear to their hearts, I bring you the following list:

  1. Visual Studio (or Eclipse)
  2. SQL Server Management Studio
  3. SVN / Visual SVN / Tortoise
  4. SQL Compare (with Command Line)
  5. jQuery
  6. FireBug
  7. Cruise Control
  8. NAnt / Ant
  9. Fiddler
  10. YSlow

Most of these tools are free....some are not. Either way, I feel that these tools are a fair representation of how much web development has changed in the past few years. Now, if only the browsers could keep up we could really start to make some progress!

Ok, before the flame war begins, I will say that I do indeed realize that the title of this post is totally assinine. Also, I would like to include a disclaimer that the BSOD I refer to is in reference to a "Black Screen of Death".

The Real Story

Over the weekend, I was flying out of Philadelphia International Airport to attend the wedding of a dear old college friend. I did the online flight check-in on my macbook, and hopped a cab out to the airport. Once through security, I went to the arrival/departures board to be sure that everything was on time with my flight, and encountered the screens pictured above. A few were empty screens that would have otherwise contained the flight data, while others were totally blacked out displaying and apple logo and what I am guessing was some sort of unique identifier for the server or screen. There was also and airport worker standing with a clipboard and a line of other passengers, but I simply checked my gate number on my boarding pass and settled into listening to some tunes and drinking coffee at the gate. At some point, I pulled my head out of iPodland and noticed that my flight did not seem to be boarding. I asked the lady at the counter, who informed me that my gate changed...but since the system was down I did not know! Anyway, I had to run to another terminal and just made my flight by about 5 minutes.

Now, before you get all huffy with me

Let me just say that I am an apple OSX fan, but being a software engineer I also rock a ThinkPad running windows for development purposes (in addition to my macbook).  I'm not a total stranger to Linux either. Personally, I have little or no allegiance or dogmatic belief system associated with any specific technology, as I am happy to drop one thing for another on a case by case basis. I have always enjoyed seeing gigantic Windows BSOD shots projected on the sides of buildings and other highly public places, and found this to be a pretty amusing alternative.

Results Per Page 
Page: 1 2 3 4 5