Tuesday, November 25, 2008
#
So Graz has this ongoing vendetta against iTunes, mostly because the interface doesn't follow Windows guidelines.
And I just got Microsoft Office OCS here at work. And if I use Windows Media Player (WMP) then it'll auto-pause music when I get a phone call. So I decided to try out WMP. After all, it's made by the BIGGEST SOFTWARE COMPANY IN THE WORLD and a media player is a fairly simple thing, what could possibly go wrong?
Ok, so...it doesn' t support drag-n-drop. Well, it does, and it'll give me the little + of "valid to drop things here" when you drag something, and then I drop it and...nothing happens. It doesn' t add to the library. So it follows the interface guidelines, but doesn't actually WORK. I tried, over and over, incredulous that MICROSOFT COULD JACK UP DRAG AND DROP but there it was. Drag file, drop, nothing. It acts like it's going to work, but doesn't actually DO anything.
Then I go to the library and tell it to add files to my playlist from a directory. It processes 650 files and adds 150. Um. Ok. Why did you skip 500 files? No information on why. It just did. Turns out it didn't like them because they're m4a files (DRM free Apple AAC files). Sigh. So then I go and find an addon to read m4a files. Because, you know, it's just the default format for the best selling music player in the WORLD, why would they add it into the default installation? Now with the codec I can listen to the AAC's but it won't add 'em to the library. So I look at help and it says that anytime I play a file it'll add to the playlist. And it doesn't. So the help file is lying.
Back up a second here.
A long time ago, back in 1993, a company called Nullsoft, that was basically 2 guys in a kitchen, wrote a piece of software called WinAmp, the best media player ever made. Why? It worked. Get this: you could drag and drop files into it and it'd play the files and add them to your library. It eventually could play video too. And it just all worked. It was simple, robust, and reliable. And windows media player CAN'T DO STUFF THAT WINAMP WAS DOING 15 YEARS AGO.
Now the fun part.
It turns out that if I make a playlist, I can create a playlist with these songs, but it won't put them in the library.
Sigh.
I gotta figure out of OCS will play nicely with any other audio players, or if I'm locked into this godawful piece of crap.
**update
OK, so here's what's going on.
In order to use m4a files (Unprotected AAC's) in WMP, you need to install 2 things. First, you have to install a codec for AAC, then you have to install another, completley separate, piece of software to make WMP recognize the AAC tags. If you don't have this, then WMP won't really import the files into your library DESPITE TELLING YOU IT'S GOING TO.
The absolute biggest sin any user interface can make is to lie to users. WMP delights in telling lies. "Sure that worked LOL".
The tagging thingy can be found here:
http://www.softpointer.com/WMPTagSupport.htm
The AAC codec can be found with a google search.
chris.
I saw Mark's post earlier bringing up
how you're not supposed to use sp_ as the start of a stored procedure name....
Here's *why* it does that.
Go to any user database (NOT MASTER) you have and put in a proc like this:
create proc sp_addlogin
as
begin
select 'hah, PWND!'
end
go
And then try to run it.
You get an error message back:
Msg 201, Level 16, State 4, Procedure sp_addlogin, Line 0
Procedure or function 'sp_addlogin' expects parameter '@loginame', which was not supplied.
Which is a good thing. Notice that it's running the sp_addlogin in *master* and not the one in your local user database. The interesting thing is that if you try to run it directly:
exec monitoring..sp_addlogin
You get the same message back.
You cannot create a stored procedure with the same name as a system stored procedure and have it run. It doesn' t matter what database you put it into.
So the question becomes *why*. Here's why:
create proc sp_addlogin
@Loginame sysname,
@passwd sysname,
@defdb sysname,
@deflanguage sysname='',
@sid uniqueidentifier,
@encryptopt nvarchar(500)
as
begin
declare @rc int
insert into ImAnAwesomeHacker values (@Loginname, @passwd, @defdb, @deflanguage, @sid, @encryptopt)
exec @rc = master..sp_addlogin @Loginname, @passwd, @defdb, @deflanguage, @sid, @encryptopt
return @rc
end
go
(Ignore my lack of a field list on the insert, this is just an example and won't work anyway

)
And now you can capture *every* single username and password in cleartext. Grats.
Well, you can't do that, because your uberl33t haxor won't work because your stored procedure called sp_addlogin will never get called. Curses, foiled again! This does, however, illustrate pretty succinctly exaclty why SQL Server always checks master or sp_ names.
In older versions of SQL Server (i.e. 4.2 to 7.0 I think) if you named a stored proc sp_ and had one named the same in master it would *always* run the one in master. It doesn't do that anymore, but it still has to check master to see if you're trying to play games with a system proc. It only does this for stored procedures that start with sp_, so this is a very small but still somehow measurably important performance optimization. I think they changed the behavior because too many cretins use sp_ for stored procedure names and then forget to change database context away from master when they're updating stored procedures, which back in the olden days was done strictly with create/drop. The interesting problems that could result are left as an exercise for the reader.
Does anyone have anything *bad* to say about Hyperbac?
I've searched google, blown through every article there, blog entries, and everything. I can't find a single bad thing about the product.
Hell, Lance likes it. And I haven't ever seen Lance like any technology more advanced than bacon.
"Wheels suck. They square off, don't roll uphill on their own! I saw one roll backwards down a hill and over some guy's toe once. This is crap!"
Seriously.
"Fire's kinda OK, but I watched some guy get burned real bad once. I think I'll stay away from that."
And then Hyperbac:
"I've been testing that for over a year now and haven't found any problems."
Yeah. So either it (1) is completely suck free, or (2) they slipped Lance some really neat pills.
Thoughts?