Monday, August 13, 2007

Why DRM Sucks!

So here's the scoop. Google video is closing its doors, and when that happens their DRM service will no longer function. Why does that matter? Well even if you shelled out $19.95 or whatever to purchase the video you no longer can view that file.  This is the equivalent of having Bestbuy go out of business, and all the DVD’s you’ve every bought from them melt inside the case… bogus!

 

Ars Technica Article

 

 

Thursday, June 14, 2007

Using SharpDevelop as a Portable App

Lately I’ve been messing around with SharpDevelop.  Mainly because I think I’m going to pick Boo as my one new programming language each year.  As part of my research I’ve discovered that it can be used as a Portable App.  That is, it can be run directly from a USB thumb drive without an install.  In it’s simplest form all that is needed is to copy the files from the install directory to the thumb drive and away you go.  However if you are using the PortableApps Suite and want SharpDevelop to show up in you menu it’s a little harder.

 

First the PortableApss Suite expects all its applications to exist in folders that end in “portable”.  This isn’t hard to do just create a ShpapDevelopPortable folder under the PortableApps directory and copy the files there.  Now, the second hurtle is that the Suite menu expects the executable to be in that root folder; SharpDevlop is not, it’s in a bin folder.  You could probably move the assemblies to the root directory but it would probable create problems with some of the resource dependences.  So, I decided to create a proxy exe that would call the real one.  Here is the entire source code.

 

/*

 * Created by SharpDevelop.

 * User: Trevor Michealson

 * Date: 6/13/2007

 * Time: 11:17 PM

 *

 * To change this template use Tools | Options | Coding | Edit Standard Headers.

 */

using System;

using System.Collections.Generic;

using System.Diagnostics;

 

 

namespace SharpDevelop

{

       class MainClass

       {

             

              public static void Main(string[] args)

              {

                        string apploc = @"/bin/SharpDevelop.exe";

                            Process SharpDev = new Process();

 

                if (System.IO.File.Exists(apploc))

                    SharpDev.StartInfo.FileName = apploc;

                else

                    SharpDev.StartInfo.FileName =

                    @"/PortableApps/SharpDevelopPortable/" + apploc;

                SharpDev.Start();

               

              }

       }

}

 

 

The if statement determines if you are running from the menu or if you’ve run the exe directly, it gets a different working directory in both.

 

Note: when I brought it to work it ran in completely different working directory.  I’m not sure if this is Windows 2000 or a profile setting but this code did work on both my Home PC (running XP) and my Laptop(running Server 2003).

Wednesday, June 06, 2007

Programmer Personality Type

 

Your programmer personality type is:

   
DHTB

You're a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.


You like coding at a
High level.
The world is made up of objects and components, you should create your programs in the same way.


You work best in a
Team.
A good group is better than the sum of it's parts. The only thing better than a genius programmer is a cohesive group of genius programmers.


You are a li
Beral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.

 

Get your programmer personality type at

http://www.doolwind.com/index.php?page=11

 

Monday, May 14, 2007

Reporting Services Table Column Headers in Excel

Recently I've been working with SQL Reporting
Services. I have a generally high opinion of
the product, but I have discovered a fairly large
problem. It does not support repeating column
headers when exported to Excel.

What I have found is that this isn't a bug
in fact it was a design decision to put headers
in the repeating rows in order to support
images. With the repeating rows in use;
there is no other way to repeat information
on each page.

The header can be moved to the excel header
by setting the UseSimpleHeader tag in the
device directive, but even then the table
header row won't repeat. My personal
opinion is that this shouldn't be a big deal
because if the report is exported to PDF
the column header repeat just fine, I have
to imagine that plenty of offices won't view
that as an expectable solution.

By the way, I'm not a Reporting Services
expert, if there is something I've missed
please tell me.

Saturday, April 28, 2007

Richmond Code Camp 3

So I decided to skip a session at the Richmond Code Camp, and I thought now would be a good time to write a blog post; so here goes. This is the third code camp here in Richmond and it’s been a great success, other then the fact that it rained for the third time as well. It’s the biggest one yet, or so they tell me, and I love that. The quality of speakers is excellent and just gets better every time, it’s a shame nobody from my office comes with me. My only real gripe is, as always, the name; couldn’t we call it the “Richmond Day of .Net” why must I be ridiculed for trying to better myself as a professional, dang! Oh well, time to head to the next session catchya later.

T

http://www.richmondcodecamp.org/

Thursday, April 12, 2007

Current Tech Podcast lineup

I've become a bit of a podcast enthusiast lately. I'd posted before about
listening to tech podcasts but I thought it was time to revisit the topic.
Now that I actually have an Mp3 player I find myself listening to podcast in
the car as well as at work. They are a great way to keep up with current
trends without having to spend hours a day reading, though I do that too.
So here's a list of what I'm listening too. This list usually amounts to
about five hours of listen time a week which cover my commuting time nicely.


.NET Rocks <http://www.dotnetrocks.com/>
ARCast <http://channel9.msdn.com/>
Hanselminutes <http://www.hanselminutes.com/>
this WEEK in TECH (TWiT) <http://www.twit.tv/>
Windows Weekly <http://www.twit.tv/>

Friday, March 30, 2007

Using Forms Authentication with Callbacks

We use callbacks all over the place in our asp.net applications. Because of
various security and technical concerns we also use forms authentication by
default. Well this creates a problem when the forms authentication ticket
expires. In the traditional model using postbacks when the authentication
ticket expires you are redirected to the login page however when a callback
occurs there is no action by default. After discovering this I began
googling for information and found this blog post
http://blogs.msdn.com/irenak/archive/2007/03/12/sysk-304-how-to-detect-and-h
andle-form-based-authentication-timeout-during-asp-net-script-callback.aspx.
Admittedly it is a little hacky but I think it works well for our purpose.
Read the article, but the jist is this:

Micorsofts callback javascript handler expects a response that either begins
with an 's' for success or 'e' for error. The authentication failure does
not return either of these

To get around you add a handler for the Application_AuthenticateRequest
event in the global.asax. In the handler, write a message to the response
the begins with an 'e' then you can redirect to the login page from within
the the Callback error javascript.