 |
by mhouston
10. June 2008 12:15
Another excellent year at TechEd! After all these years, I still enjoy the lengthy, opinionated and inebriated conversations over technologies, implementations, products, etc. I did make it to a few interesting sessions and spoke to a few 'official' types about various things ASP.Net MVC, Velocity, Unity, Oslo, etc... The presentation I actually enjoyed the most was Andrew Connell's 'Don't be a Tool...' SharePoint dev talk...really good stuff from an outstanding presenter. I was just happy to hear someone actually tell developers to be developers again and quit whining...this could turn in to a <rant/>...I'll stop now. As usual, the most interesting stuff happens after hours ;-P Every year I say I'm going to capture more evidence, but I always forget to take pictures...here's the few I ended up with this year. It was great to see all my old friends and meet quite a few new ones. I love all of you nerds. Big props to the Fl crew for organizing the ]inbetween[ event. And oh, btw, before I forget....SHAREPOINT NATION!!!
by mhouston
1. June 2008 13:49
@alanstevens has organized a Meetup of tweeps, twitters and the like...see you there...
Info/links on Allan's Blog
by mhouston
6. April 2008 10:01
May 1st
Register --> MS Launch Event - Heroes Happen
The Nashville Visual Studio .NET User Group Leadership will be staffing the INETA booth, so stop by for a visit. I'll be there...and you should all buy me drinks afterwards! ;-)
by mhouston
27. March 2008 22:29
by mhouston
26. March 2008 16:25
Someone ask me about working with dates recently in TSQL...I was too busy at the time to stop and remember this...I did get back to them later ;-)
Here it is. I'm sure most people know this, but at least I want forget next time...
DECLARE @CurrentDateWithTime datetime
DECLARE @CurrentDateZeroTime datetime
DECLARE @TomorrowZeroTime datetime
SET @CurrentDateWithTime = GETDATE()
SET @CurrentDateZeroTime = CAST(FLOOR(CAST(@CurrentDateWithTime AS float)) AS datetime)
SET @TomorrowZeroTime = CAST(CEILING(CAST(@CurrentDateWithTime AS float)) AS datetime)
PRINT @CurrentDateWithTime
PRINT @CurrentDateZeroTime
PRINT @TomorrowZeroTime
Why does it work? Add the following PRINT statements and it becomes obvious.
PRINT CAST(@CurrentDateWithTime AS float)
PRINT CAST(@CurrentDateZeroTime AS float)
PRINT CAST(@TomorrowZeroTime AS float)
The output should be :
Mar 26 2008 6:22PM
Mar 26 2008 12:00AM
Mar 27 2008 12:00AM
39531.8
39531
39532
Technorati Tags: SQL, TSQL, datetime, code
by mhouston
17. February 2008 07:40
I won't make this a long,drawn-out rant, but I have to vent (just for peace of mind)...
I actually saw the following in code recently :
if("A Literal String".ToUpper() == someRandomVariable.ToUpper()){...}
and
string vbcrlf = "\r\n";
How/When will development on the Microsoft platform ever mature to the point where any bozo who can spell his name and have a conversation with a recruiter will not be allowed to actually create code on real software systems?
I know the dream is that creating LOB systems/applications becomes as easy as using an iPOD, but, for god's sake, we're not there yet. STOP IT! You actually do have know more than simple syntax to do this job!
Oh...here's another one...
I just found a situation on a SQL server: In true Microsoft DBA fashion, a bozo had set the log file initial size for a particular database to the exact size of the physical drive it was located on - and had it configured to auto-grow by 10% !
okay...I'm calming down now...see the the daily WTF for more evidence that our industry is a mess. I can't believe I've reached the point that I hate hobbyist...in the past I had a great deal of respect for the hobbyist programmers...now they all have programming jobs, but no clue. I created an excel macro once, so I should be qualified to design your fulfillment system....jeez!!!
Technorati Tags: bad code, wtf, .net
by mhouston
24. July 2007 23:34
This was from an email I sent to some peeps for a quickie how-to...I was told that this kind of junk was worth posting on a blog. Of course I want to do my part in cluttering up the world...
DECLARE @x as xml
SET @x = '<test att="1">
<node1 att="test att val node 1">test data 1</node1>
<node1 att="test att val node 2">test data 2</node1>
</test>' --query a node set like a table
SELECT xd.rows.value('(.)','nvarchar(50)') AS result
FROM @x.nodes('/test/node1') xd(rows)
--WHERE xd.rows.value('(.)','nvarchar(50)') LIKE '%test data 1'--to get values of attributes and nodes
select @x.value('(/test/@att)[1]', 'int' )--select @x.value('(/test/node1/@att)[1]', 'nvarchar(50)' )
--select @x.value('(/test/node1/@att)[2]', 'nvarchar(50)' )
select @x.value('(/test/node1)[1]', 'nvarchar(50)' )
--select @x.value('(/test/node1)[2]', 'nvarchar(50)' ) --to get nodes/sections/sets/doc fraagments
select @x.query('test/node1')
FYI, the way to dynamically create the xPath statement : use sql:variable to amend the xPath statement - if you try string concats you'll find this out ;-)
Technorati Tags: SQL, SQL2005, SQL2K5, XPATH, XML
|
|
|
|