I am so tired of the term “Web 2.0”. When ever I see that that term bandied about, I get a mental flashback to an old Verizon commercial where a consultant is pronouncing the word paradigm as “Pair-Uh-Dig-Um”. It’s another example of “buzzword bingo”. What does it mean? And I do mean that specificly.
You get the impression that there is a line drawn somewhere, that separates “Web 1.0” from “Web 2.0”. As near as I can tell, the definition du jour of “Web 2.0” is that it’s interactive web services with dynamic content and social participation. That right there is vague enough to mean anything and nothing. Now I’m starting to blog postings that describe “Web 2.0” as a metaphysical process. This isn’t Aug. 16, 1987, people. Let’s just look at the web for what it is, a means of communication, and leave the mumbo-jumbo stuff out of it.
Nicholas Carr has a great article, “The amorality of Web 2.0”, that pretty much nails how I feel about this thing. Joel Spolsky (required reading for anyone in software development) has a very good rant “Architecture Astronauts Are Back”, with a followup with the links to see what made him crazy (but crazy in a good way).
This looks like a logical way to handle command line parameters while still following convention of using an app.config file.
….I used another arguments parser from Code Project, “C#/.NET Command Line Arguments Parser“.
I like it because it works like the ASP.NET querystring parser – it handles the parsing (quoted strings, different delimiter styles) and exposes a string dictionary with the results.
I use a GetSettings accessor that reads the default from the app.config file, but allows overrides via command line. I like this approach because settings are their standard location (app.config), and any config setting can be overriden via command line without an attribute change and a recompile.[STAThread]
private static int Main(string args)
Processor processor1 = new Processor(args);
}private Arguments arguments; public Processor(string args)
this.arguments = new Arguments(args);
} public Process()
} private string GetSetting(string key)
string setting = string.Empty;
if (this.arguments[key] != null)
setting = this.arguments[key];
setting = ConfigurationSettings.AppSettings.Get(key);
if (setting == null)
Here’s a quick and dirty way to export a table to a text file with SQL Server. With some minor tweaking, it should also work for views and stored procedures that return result sets.
Here is a simple method of exporting all the data from SQL Server table to a Text File
CREATE Procedure BCP_Text_File
If exists(Select * from information_Schema.tables where table_name=@table)
Declare @str varchar(1000)
set @str=’Exec Master..xp_Cmdshell ”bcp “Select * from ‘+db_name()+’..’+@table+'” queryout “‘+@FileName+’” -c”’
Select ‘The table ‘+@table+’ does not exist in the database’
Execute this procedure by giving Table Name and the File Name
EXEC BCP_Text_File ‘Employee’,’C:\emp.txt’
Now all the data from Employee table will be exported to the text file which will be located at C:\emp.txt
[from WebLogs @ SqlJunkies.com]
If you were looking for a reason to dump DAAB, it looks like the good parts have already been folded into ADO.NET 2.0.
The ADO.NET data providers in .NET 2.0 provide factory and common ADO.NET classes that make it easy to keep your code independent from a particular ADO.NET data provider or database product.
There’s just something about RegEx that makes my ears bleed. Fortunately other people get it. Here’s an example of how to filter text out of an expression, courtesy of Jeff Atwood’s Coding Horror….
For example, if the word fox was what I wanted to exclude, and the searched text was:
The quick brown fox jumped over the lazy dog.
… and I used a regular expression of [^”fox”] (which I know is incorrect) (why this doesn’t work I don’t understand; it would make life SO much easier), then the returned search results would be:
The quick brown jumped over the lazy dog.
Regular expressions are great at matching. It’s easy to formulate a regex using what you want to match. Stating a regex in terms of what you don’t want to match is a bit harder.
One easy way to exclude text from a match is negative lookbehind:
But not all regex flavors support negative lookbehind. And those that do typically have severe restrictions on the lookbehind, eg, it must be a simple fixed-length expression. To avoid incompatibility, we can restate our solution using negative lookahead:
I would have loved to have seen that ono pop up on the scrren.
Back in 1994, Boeing considered equipping each seat with a serial modem.
Laptop users could hook up to the modem and dial out. (Dial-up was the primary means of connecting to the Internet back in those days.)
We chuckled at the though of attaching the serial cable and getting a Plug-and-Play pop-up message:
New device detected: Boeing 747
[via The Old New Thing]