20 November 2009
ASP.NET MVC Error Handling
I wrote a short how-to article about trapping unhandled errors in ASP.NET MVC web applications.
15 July 2009
Website is Back Up
Oh. My. Goodness. My website has been down for a couple weeks and I have been away and busy and just not on it. It's back up now. It was down due to a bug in a browsers settings file and the error message and "[No relevant source lines]" made it a little difficult to figure out.
19 June 2009
Google Calendar Sync in iPhone 3.0
This is good! It wasn't very straightforward until I found the URL specified on Google's Getting Started with CalDAV page (see the "Enable Google Calendar in Apple's iCal" link).
Here's how to set up your Google Calendar on your iPhone:
* On your iPhone, tap on Settings
* Open Mail, Contacts and Calendar
* Tap on Add Account...
* Select Other
* For Server, enter this URL and replace YOUREMAIL@DOMAIN.COM with your Google login/email address: www.google.com/calendar/dav/YOUREMAIL@DOMAIN.COM/user
* Enter your Google user name and password
* Click the Next button and it will attempt to connect to your Google Calendar and verify that your iPhone is set up correctly.
Now when you open your iPhone's calendar, you'll see all of your Google Calendar events. Very cool.
Here's how to set up your Google Calendar on your iPhone:
* On your iPhone, tap on Settings
* Open Mail, Contacts and Calendar
* Tap on Add Account...
* Select Other
* For Server, enter this URL and replace YOUREMAIL@DOMAIN.COM with your Google login/email address: www.google.com/calendar/dav/YOUREMAIL@DOMAIN.COM/user
* Enter your Google user name and password
* Click the Next button and it will attempt to connect to your Google Calendar and verify that your iPhone is set up correctly.
Now when you open your iPhone's calendar, you'll see all of your Google Calendar events. Very cool.
10 June 2009
ZIP Code Lookup with the Google Geocoder
I have a client who has ended up (due to a misunderstanding by me) with a list of user registrations having some addresses without ZIP codes. So I decided I could probably fix all of them by using a ZIP code lookup service. The U.S. Postal Service has a web service for this, but after signing up and trying it I decided it was a real pain. The sign up process was a little heavy handed, but worse was the test server they restricted you to using until your "application" was "ready," and then you would need to contact them for access to the real site.
I figured there must be a better way, so after some searching (including programmableweb.com and data.gov), I found that Google's Geocoder can do this.
So my simple, kind of raw REST demo of using the Google Geocoder for ZIP code lookup is working. Useful and simple, take a look.
I figured there must be a better way, so after some searching (including programmableweb.com and data.gov), I found that Google's Geocoder can do this.
So my simple, kind of raw REST demo of using the Google Geocoder for ZIP code lookup is working. Useful and simple, take a look.
Make Your Own Twitter Badge with jQuery
For the geekily inclined, you can easily make your own Twitter badge using jQuery and the Twitter API and display your latest tweets on your website. Step-by-step instructions. Do it now!
Performance of jQuery Selectors in ASP.NET
My old post about the problems with control ids in ASP.NET and using them with jQuery did not describe the small performance hit of using the "ends with selector," e.g., $("input[id$='txtDateStart']"). This post at encosia.com has some good tips for optimizing this a bit.
03 June 2009
jQuery and REST and Flickr and Google Maps Demos
My demo page has been updated, massively, over the past few weeks with REST demos using jQuery, Flickr, the Google Maps API and some other stuff. It's fun but I also want to build up to something more novel and powerful using these techniques. No promises, but fingers crossed that I find time to keep moving forward.
As far as blogging goes, well, it's been over two years since I've updated this. Doesn't bother me right now.
As far as blogging goes, well, it's been over two years since I've updated this. Doesn't bother me right now.
12 December 2007
ASP.NET Control IDs and jQuery
I'm using jQuery a lot more for DOM manipulation, UI sugar and general lessening of javascript drudgery. In an aspx page, referencing a control using js is a pain because of how ASP.NET munges the control name. For example, "ddlDate" becomes something like "ctl00_ddlDate." I found lots of articles about this and various approaches, but they all seemed a little too involved or fragile.
The good news is that the original control name always seems to be preserved at the end of the control id ("always" -- I hope that's correct and so far it's been working). So by using jQuery's select[id$= syntax, here is a really simple way to handle this:
The good news is that the original control name always seems to be preserved at the end of the control id ("always" -- I hope that's correct and so far it's been working). So by using jQuery's select[id$= syntax, here is a really simple way to handle this:
<script language="javascript" src="Images/jquery-1.2.1.pack.js"></script>
<script language="javascript">
$(document).ready(function(){ var ddlDate = $("select[id$='ddDateName']"); var txtStart = $("input[id$='txtDateStart']"); var txtEnd = $("input[id$='txtDateEnd']")etc...
18 October 2007
SQL Server 2005 Management Studio RANT #1
Number one of many rants about Management Studio, not #1 as in this is the worst thing about MS, because it's not the worst thing:
Scripting a database to SQL Server 2000 (i.e. 8.0) format using the Tasks | Generate Scripts feature gives me a nice .sql script file. But when I run it in SQL 2000's Query Analyzer, it fails with syntax errors! Specifically, it's missing open parentheses on multiple lines. You've got to be kidding!
I know I can fix all of these errors, and I know there are products that do a better job of scripting database schema than Microsoft's own tools. But, this should work.
If I have time and continue with the many complaints I have about Management Studio, the conclusion is obvious: we need a much better IDE for SQL Server 2005.
Scripting a database to SQL Server 2000 (i.e. 8.0) format using the Tasks | Generate Scripts feature gives me a nice .sql script file. But when I run it in SQL 2000's Query Analyzer, it fails with syntax errors! Specifically, it's missing open parentheses on multiple lines. You've got to be kidding!
I know I can fix all of these errors, and I know there are products that do a better job of scripting database schema than Microsoft's own tools. But, this should work.
If I have time and continue with the many complaints I have about Management Studio, the conclusion is obvious: we need a much better IDE for SQL Server 2005.
26 July 2007
Microsoft Open Source Website
At first I thought this was an April Fool's joke. In July. Just not really sure what to think now.
20 July 2007
Collaborative Editing
I like reading Dare Obasanjo's blog. Though he is frequently too pro-Microsoft and, as one would expect, anti most-of-the-rest, he raises interesting issues and his counter arguments to much of the web zeitgeist is insightful. But I'm not sure why he can't use something besides MS Word to edit a document with his coworkers.
One of his usual targets, Google, offers Google Docs, which is a great way to collaborate with a small team. I have used this to collaboratively edit documents, and I like it a lot for small group collaboration. And it's only one of maybe a hundred or more different web-based solutions for collaborative editing.
The irony, of course, is that Dare is pointing out a key shortcoming of the traditional and still present Microsoft way. That is, fat-client, file-based solutions to things. Maybe that is still the problem with many of the Microsofties (and I certainly see this from time to time with people I know well who have a strong Microsoft background) and with the company in the larger sense -- that the web is still this thing that they don't feel too comfortable embracing to solve typical problems.
One of his usual targets, Google, offers Google Docs, which is a great way to collaborate with a small team. I have used this to collaboratively edit documents, and I like it a lot for small group collaboration. And it's only one of maybe a hundred or more different web-based solutions for collaborative editing.
The irony, of course, is that Dare is pointing out a key shortcoming of the traditional and still present Microsoft way. That is, fat-client, file-based solutions to things. Maybe that is still the problem with many of the Microsofties (and I certainly see this from time to time with people I know well who have a strong Microsoft background) and with the company in the larger sense -- that the web is still this thing that they don't feel too comfortable embracing to solve typical problems.
02 May 2007
Guerrilla Spam Filtering
We use Exchange and Outlook at the office for email, like too many organizations in the world. However, we have (I am embarrassed to say) not been using any spam filtering service or appliance. The result is that junk mail rolls in heavily each day.
In Outlook, you can create rules and I have a billion of them to filter out keywords and known sources of spam (to the extent that that is effective). It is an OK 80% solution. But when I'm away and using Outlook Web Access, none of my desktop Outlook rules are applied.
So my solution has been to leave Outlook running on my desktop at work. Then, when I run OWA my inbox is cleaned to the 80% level that my Outlook rules accomplish. This is not recommended and is not a good spam filtering strategy, but it actually works.
In Outlook, you can create rules and I have a billion of them to filter out keywords and known sources of spam (to the extent that that is effective). It is an OK 80% solution. But when I'm away and using Outlook Web Access, none of my desktop Outlook rules are applied.
So my solution has been to leave Outlook running on my desktop at work. Then, when I run OWA my inbox is cleaned to the 80% level that my Outlook rules accomplish. This is not recommended and is not a good spam filtering strategy, but it actually works.
03 April 2007
ASP.NET Master Page Title
There are a lot of articles about how to programmatically set the title for pages on a web site, such as this one at odetocode.com. But I need to do something much more mundane -- set the title for ALL pages on my website to be the same but optionally, to be able to programmatically override the title for any web page.
The straightforward way to use the same title for all pages if you are using master pages is to 1) set the <title> in the master page's HTML and 2) remove it from every content page's page directive. That works great. But I want to make this a little easier to maintain, so I hooked this into my site's base page and use web.config to maintain the site's title.
My site's base page (BasePage), from which all of my site's pages are derived, is declared like this:
In the BasePage constructor, I get the site's title from web.config and trap for any exception:
This also allows me to forget about manually removing "Untitled Page" from the page directive in every content page. To programmatically set the title, should I need to, I expose a property that prevents setting it to blank (or to the default Visual Studio .NET setting):
Now, to maintain my site's title, I just set it in web.config:
So this gives me a fairly clean way to maintain my site's title and also to override it per content page should I need to. For example, my contact page can append " - Contact Us" to the existing title by modifying the base page's Title property in Page_Load.
Seems like a lot of work for something so simple. I'm sure there may be a cleaner way, but for now this seems fairly good.
The straightforward way to use the same title for all pages if you are using master pages is to 1) set the <title> in the master page's HTML and 2) remove it from every content page's page directive. That works great. But I want to make this a little easier to maintain, so I hooked this into my site's base page and use web.config to maintain the site's title.
My site's base page (BasePage), from which all of my site's pages are derived, is declared like this:
public class BasePage : System.Web.UI.Page
In the BasePage constructor, I get the site's title from web.config and trap for any exception:
public BasePage() { try {Title = WebConfigurationManager.AppSettings["SiteTitle"];
}
catch (Exception ex)
{ System.Diagnostics.Trace.WriteLine(ex.Message); Title = "My Site";}
}
This also allows me to forget about manually removing "Untitled Page" from the page directive in every content page. To programmatically set the title, should I need to, I expose a property that prevents setting it to blank (or to the default Visual Studio .NET setting):
public new string Title
{ get {return base.Title;
}
set {if (value.Trim().Length > 0 && value != "Untitled Page")
{base.Title = value;
}
}
}
Now, to maintain my site's title, I just set it in web.config:
<add key="SiteTitle" value="My Site" />
So this gives me a fairly clean way to maintain my site's title and also to override it per content page should I need to. For example, my contact page can append " - Contact Us" to the existing title by modifying the base page's Title property in Page_Load.
Seems like a lot of work for something so simple. I'm sure there may be a cleaner way, but for now this seems fairly good.
21 March 2007
Visual Studio Find using RegEx
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargh!
Why couldn't Microsoft make the regex search use some existing regex dialect? Maybe they did (randomly!) pick one, but it's not the regex dialect they use in the .NET Framework.
I admit to always finding another way when faced with searching for something like the following lines (which happens to be a task for me today), but I'm keen to do it more easily:
CREATE PROCEDURE
CREATE PROCEDURE
So using Microsoft's VS.NET syntax, it's this:
^create:Zs+procedure
That's good to know: :Zs is a SPACE, and :Zs+ is ONE OR MORE SPACES. And if I want to find these:
CREATE TABLE
CREATE FUNCTION
CREATE VIEW
It's this:
^create:Zs+:w
So :Zs+:w is ONE OR MORE SPACES FOLLOWED BY A WORD.
And I'm going to refer back to this post because I won't remember this two months from now.
Why couldn't Microsoft make the regex search use some existing regex dialect? Maybe they did (randomly!) pick one, but it's not the regex dialect they use in the .NET Framework.
I admit to always finding another way when faced with searching for something like the following lines (which happens to be a task for me today), but I'm keen to do it more easily:
CREATE PROCEDURE
CREATE PROCEDURE
So using Microsoft's VS.NET syntax, it's this:
^create:Zs+procedure
That's good to know: :Zs is a SPACE, and :Zs+ is ONE OR MORE SPACES. And if I want to find these:
CREATE TABLE
CREATE FUNCTION
CREATE VIEW
It's this:
^create:Zs+:w
So :Zs+:w is ONE OR MORE SPACES FOLLOWED BY A WORD.
And I'm going to refer back to this post because I won't remember this two months from now.
14 March 2007
Durable Information
Email is a wonderful way to communicate. I keep in touch with people I would have long ago neglected because of it. It's almost free. It's fast. It's super convenient. It's flexible, and allows me to send not just my words, but pictures, files, links and even viruses if I'm irresponsible. It's fairly private, and can be totally secure if I choose the right provider and tools. OK, spam is a nightmare, but more or less, email is a great thing for communicating.
Unfortunately, email doesn't cut it for storing information that is durable, a phrase that I'm sort of adopting or making up for the context of this post. By durable I mean the following:
I work on a small software project (I am the sole developer) for a client of my employer. The client and I communicate frequently about the state of project tasks, why certain things aren't meeting his needs, etc. This goes on over the course of one "release" of the project, or about six weeks. He emails me, I respond, he responds, etc. Then I find a problem, I fire off a message, he ignores it, we revisit it a month later without remembering much about it... and on and on.
This is typical small company project management, which is to say, it's not being managed. The only way to get a complete picture of what was decided, how it was interpreted, what is left to do, how to login to the FTP server -- whatever -- is to sift through and piece together artifacts from the following:
Yes, my company owns my inbox, but that is not the point. The issue is how to reduce the friction created by my laziness. That my company owns the information that I am mismanaging means I am obligated to store these bits of decisions and communications in such a way that it can be found. Found by my managers, auditors, the next developer who takes on this project after I'm on another, the client, QA people so they can tweak a test plan et. al.
At the very least, emails should be saved off to a public folder. This is a pain, however. A good project management tool (such as basecamp) is much preferred for aggregating this type of communication and preserving it. Email should be used for notification or quick comments. Anything more long-lived than spur-of-the-moment has to be put somewhere else. Then it can be searched, prioritized, validated, transferred and generally managed. Durable information, not fleeing bits of conversation scattered across multiple inboxes.
Unfortunately, email doesn't cut it for storing information that is durable, a phrase that I'm sort of adopting or making up for the context of this post. By durable I mean the following:
- It needs to be found later by someone other than the email sender or recipient
- It constitutes a record of a decision or other important information that is of interest to a group outside of the email sender or recipient
- It is "owned" by someone other than the email sender or recipient.
I work on a small software project (I am the sole developer) for a client of my employer. The client and I communicate frequently about the state of project tasks, why certain things aren't meeting his needs, etc. This goes on over the course of one "release" of the project, or about six weeks. He emails me, I respond, he responds, etc. Then I find a problem, I fire off a message, he ignores it, we revisit it a month later without remembering much about it... and on and on.
This is typical small company project management, which is to say, it's not being managed. The only way to get a complete picture of what was decided, how it was interpreted, what is left to do, how to login to the FTP server -- whatever -- is to sift through and piece together artifacts from the following:
- My inbox
- My sent items
- The client's inbox
- The client's sent items
- Our IM logs
- Some documents squirreled away on my company's network
- His [My Documents] folder
- etc.
Yes, my company owns my inbox, but that is not the point. The issue is how to reduce the friction created by my laziness. That my company owns the information that I am mismanaging means I am obligated to store these bits of decisions and communications in such a way that it can be found. Found by my managers, auditors, the next developer who takes on this project after I'm on another, the client, QA people so they can tweak a test plan et. al.
At the very least, emails should be saved off to a public folder. This is a pain, however. A good project management tool (such as basecamp) is much preferred for aggregating this type of communication and preserving it. Email should be used for notification or quick comments. Anything more long-lived than spur-of-the-moment has to be put somewhere else. Then it can be searched, prioritized, validated, transferred and generally managed. Durable information, not fleeing bits of conversation scattered across multiple inboxes.
13 March 2007
Harder to Type, Easier to Maintain
One of my favorite software books, Steve McConnell's Code Complete, rails against hard-coded strings because they make an application difficult to maintain. At "typing time," it's the easiest and quickest way to do things. Thereafter, though, you've created a debt that you will pay down for the life of a project.
When we work with DataSets, DataTables and other means of packaging data, it is hard to avoid littering code with literal strings that represent column names. This is not helped by our tools -- how hard would it have been for Microsoft to expose an enum for column names from a DataTable object in a generated typed DataSet? (And why is "strongly-typed DataSet" preferred over "typed DataSet"?)
Several years ago, when I first started using .NET, I created an database column enum and constants generator. Point it to a database and let it generate enums or constants (in C# or VB.NET) for every table and view, or pick the ones you want. It's part of the suite of tools I use to create the data layer and business layer in my applications.
It's a simple thing. So instead of writing code like this:
I can write it like this:
A typical application is going to have references to columns in many places:
If When your database schema changes, just regenerate the source file for the enums/constants and fix up your code. Most changes will now break the application at compile time, not run time. This makes it trivial to identify and fix these issues. A large application with thousands of references and many developers just cannot be maintained with hard-coded strings for column names. Catching these errors at run time requires 100% code coverage, and happens way too far downstream to NOT lose you money.
GridViews and other designer-based code may still be a chore, but you're not making things worse because that's how they are whether or not the rest of your source code has hard-coded values.
Does "LastName" look nicer than CustomerColumn.LastName? Probably. Is "LastName" easier to type? I'd say so. But it creates a mess, one that too many developers are keen to accept, unfortunately. Keep in mind, what I'm talking about here is for developers who haven't adopted object relational mapping or other means of encapsulating and abstracting object data. If you're still using DataSets and DataTables, you need to consider the friction your are accepting by hard-coding string column names, primary keys, default values, filters and so forth.
When we work with DataSets, DataTables and other means of packaging data, it is hard to avoid littering code with literal strings that represent column names. This is not helped by our tools -- how hard would it have been for Microsoft to expose an enum for column names from a DataTable object in a generated typed DataSet? (And why is "strongly-typed DataSet" preferred over "typed DataSet"?)
Several years ago, when I first started using .NET, I created an database column enum and constants generator. Point it to a database and let it generate enums or constants (in C# or VB.NET) for every table and view, or pick the ones you want. It's part of the suite of tools I use to create the data layer and business layer in my applications.
It's a simple thing. So instead of writing code like this:
30 dRow["LastName"] = "Smith";
31 dRow["FirstName"] = "Bob";
I can write it like this:
30 dRow[CustomerColumn.LastName] = "Smith";
31 dRow[CustomerColumn.FirstName] = "Bob";
A typical application is going to have references to columns in many places:
- Assigning values to columns
- Persisting data
- Filtering (using the DataTable's .Select method or a DataView's .RowFilter property)
- Sorting
- Ad-hoc querying
- Data binding and other tasks above in the designer for a form or web control
GridViews and other designer-based code may still be a chore, but you're not making things worse because that's how they are whether or not the rest of your source code has hard-coded values.
Does "LastName" look nicer than CustomerColumn.LastName? Probably. Is "LastName" easier to type? I'd say so. But it creates a mess, one that too many developers are keen to accept, unfortunately. Keep in mind, what I'm talking about here is for developers who haven't adopted object relational mapping or other means of encapsulating and abstracting object data. If you're still using DataSets and DataTables, you need to consider the friction your are accepting by hard-coding string column names, primary keys, default values, filters and so forth.
12 March 2007
Agile FUD
Why do some people argue as though "agile" is some grand methodology, a prescribed process, comes with a big book and a two week training course and has a rigid set of mantras? It doesn't as best I can tell. I have adopted some agile practices in my daily routine, such as unit testing (though not TDD as of now), intensive refactoring, simple and frequent communication and continuous integration. There are a lot of agile practices that I do not have the expertise to try right now, or the right projects to try them on or the right team to try them with. I am basically fitting what I can into my current environment, reading all I can and reexamining every month or so to identify what else I can apply or do differently.
I think this is the whole point of agile. That is, there is no one prescribed way. Rather, there are principles or fundamentals, and the practices reflect these in a sort of toolbox approach. And above all, the personnel involved are intelligent and experienced enough to use these things to improve how they create software and in turn improve the software they create.
For example, sometimes we have projects that are remediation types of engagements. In other words, we are hired to fix something and it may last for a month. Can I do TDD? Should I set up a continuous integration server? It depends. I have enough experience to know which tools to apply to solve this problem.
So when I read something like this that portrays agile as some all-or-nothing "methodology," it makes me wonder first, if people like this are using some prescribed methodology already or instead have none whatsoever, and second, if they aren't just looking for a way to bash these ideas by portraying them as something they are not. That post at secretgeek makes it sound as though agile is loaded with ideas that contradict each other. I don't think this is the gist at all.
One tool from the toolbox that has had a huge impact on how I write code is designing for testability. This is one of the first things I consider when creating any code. It forces me to think about:
Pretty standard stuff. I am amazed that it's still not universal.
I think this is the whole point of agile. That is, there is no one prescribed way. Rather, there are principles or fundamentals, and the practices reflect these in a sort of toolbox approach. And above all, the personnel involved are intelligent and experienced enough to use these things to improve how they create software and in turn improve the software they create.
For example, sometimes we have projects that are remediation types of engagements. In other words, we are hired to fix something and it may last for a month. Can I do TDD? Should I set up a continuous integration server? It depends. I have enough experience to know which tools to apply to solve this problem.
So when I read something like this that portrays agile as some all-or-nothing "methodology," it makes me wonder first, if people like this are using some prescribed methodology already or instead have none whatsoever, and second, if they aren't just looking for a way to bash these ideas by portraying them as something they are not. That post at secretgeek makes it sound as though agile is loaded with ideas that contradict each other. I don't think this is the gist at all.
One tool from the toolbox that has had a huge impact on how I write code is designing for testability. This is one of the first things I consider when creating any code. It forces me to think about:
- How to structure the solution in Visual Studio .NET. I always create a "
.Tests" project in addition to the main project (it used to be ".Test" until one of the versions of the Test Driven .NET add-in for VS.NETcaused problems in projects named this way). Instead of creating some goofy form to drive my tests and therefore requiring me to manually test each time I make changes, all of my public methods can be launched through my unit tests. Right-click, Run Tests. Low stress. This is pretty standard stuff. - How to design a class. When thinking about how to test it, you must immediately consider what the constructor does, how to initialize state, whether a static class is a good idea for the scenario, etc. Having to change these things later puts you into a much more defensive mentality, where you feel like you are constantly catching up and rethinking very basic design decisions. Again, pretty standard. Thinking about testing forces better design decisions.
- How to design its interface. When you know how your class can be used (i.e., because you thought about "exercising" it with unit tests at the outset), your interfaces are much cleaner and more consistent throughout a project.
- How and where to initialize and destroy resources. Basic stuff, but again, having to tweak things later can be annoying, and being inconsistent has subtle implications for robustness.
- Where to stash configuration information so that it is accessible in a very flexible way. Does the class need a SqlConnection? How do you provide it? Do you have different databases for development, testing, staging, performance testing and production? Instead of cluttering the class with code that accepts these, is it better to make it config-based? If you do, your ".Tests" project needs to be defined a certain way with its own config file, etc...
- How NUnit can automatically run my unit tests to help me control regression. Now that you've thought through these other things, everything is set up to do this. You can make changes and perform major refactoring at will and know what the health of your application is.
Pretty standard stuff. I am amazed that it's still not universal.
09 March 2007
ASP.NET 2.0 DataBinding Redux
In a previous post I mentioned my skepticism about using ObjectDataSource to bind business objects in ASP.NET 2.0. My desire to "implement some well-defined interfaces in our business objects and just have this stuff work" is touched on by the EntitySpaces guys, but it's more than just what I mentioned and it's touched a nerve.
I think the musings that Microsoft may have yanked what support there was for design-time data binding in 2.0 in order to develop their own ORM functionality in ADO.NET v.next is likely correct. Just like Sandcastle-NDoc, Team System-NUnit-NAnt and the other things I mentioned previously, it seems Microsoft is going to go their own way and quash a good portion of the open source efforts to build on their tools.
I think the musings that Microsoft may have yanked what support there was for design-time data binding in 2.0 in order to develop their own ORM functionality in ADO.NET v.next is likely correct. Just like Sandcastle-NDoc, Team System-NUnit-NAnt and the other things I mentioned previously, it seems Microsoft is going to go their own way and quash a good portion of the open source efforts to build on their tools.
SQL 2005 Script Files and VSS
Using Microsoft Visual SourceSafe 6.x and Microsoft SQL Server Management Studio (for SQL Server 2005) is a bit of a pain for scripting database changes. One problem is if you don't save the script file as ANSI, VSS cannot use its diff feature to show you the results. It will simply say, "Binary files differ." You need to save it as ANSI, since that's all VSS 6.x supports for visual diffs.
To save your .sql files as ANSI:
Then you can check the .sql file into VSS. Subsequent edits will not require you to go through all of these dialogs to properly save the file. Management Studio will use the file's current encoding and line break settings thereafter, so you can just (thankfully) click Save.
To save your .sql files as ANSI:
- Instead of just clicking the Save button, select File | Save As...
- Click the little arrow on the Save button and choose Save with Encoding...
08 March 2007
RFPs
Interesting take on RFPs at airbag. We have been occupied with some proposals recently, and I have to agree this is rarely a very fruitful way to land new business. So many of these RFPs are really for one or more of the following purposes:
Some of the comments to the airbag post really hit home:
- The company sending it out can satisfy some requirement that they found a consultant in a competitive manner
- They've already found a consultant and need to appear that they did it in a competitive manner
- They are looking for the lowest cost bidder and that is their top priority
- They are not clear about what they want and are soliciting ideas through the RFP process.
Some of the comments to the airbag post really hit home:
"The problem is rarely defined and the client usually has a vendor and solution already in mind."
"They take a lot of time, you only have a marginal chance of winning the work. It really just drives your overhead up with a lot of non-billable work, making the clients that didn't send you a RFP essentially pay more."
"The traditional RFP process is damn near a no-win situation for us. We ran the numbers and we've got a horrible track record when it comes to winning work of an RFP. Given the time it takes to address them (much more than other ways of bringing work in) we've realized that RFPs aren't really something we should be spending a whole lot of time on."
"Submitting a "proposal" of any sorts before there's been any communication is akin to ordering a bride online. It may work for some people but it's unlikely they'll have a relationship that'll last. Too much room for misunderstandings and miscommunications."
Subscribe to:
Posts (Atom)