My favorite photo this month...
Thursday, October 9, 2008
Tuesday, September 23, 2008
President Clinton on David Letterman
Brilliant.
I thought the interview was excellent, and it reinforces my believe that Letterman is a much more shrewd host than he gets credit for (or makes out to be).
Americans are getting nervous. The economy is in shambles. We're hearing alarms about "peak oil", and energy crisis. There are record home foreclosures. Natural disasters in the South. We're mired in Vietnam Part 2 in Iraq. Things look bleak.
Rather than another night of zany stupid pet tricks, Letterman instead books President Bill Clinton and asks him about what has happened, and what can be done to fix it. No off-the-wall antics or sill questions (well, maybe one), just a quiet studio and three full segments for Clinton to answer the few, pointed questions Dave asks. I thought it was a brilliant move. Clinton is knowledgeable, relevant, engaging, and in some ways, polarizing. A perfect guest for a meaty subject in a venue that usually trends toward the absurd.
Great stuff. If you didn't see it, you may be able to watch it at Letterman's Web Site. I don't know if the entire interview is there, but I would hope so.
Thursday, September 18, 2008
Leopard and SBS 2003 Still Don't Play Nice
For the most part, my life after the "switch" to the Macintosh has been great. No more antivirus software. No more fear of viewing an HTML email. No more long boot-ups and sluggish performance.
One constant point of misery remains, however...
As a .NET developer, I must continue to use a Microsoft SBS 2003 server to get my job done. Alas, the Mac and the Windows Server don't like each other. Shocking, I know.
The simple act of copying a file from my Mac to a shared folder on the Windows Server is like playing Russian Roulette. Sometimes it works. Sometimes the file never copies, we end up with a zero byte file in the folder, then the server crashes. Kaboom!
This has been going on for 9 months now. I have all the latest patches from Apple and Microsoft. I've followed all the online guides. I have scoured the web for any tip, trick or kludge to work around it -- no luck. Grrrrr.
- It's an Apple problem, because real Windows PCs can work on the file share for weeks on end and NEVER have this problem.
- It's a Microsoft problem, because regardless of what the Mac does it should NEVER crash the server.
- It's my problem, because I'm stuck in the middle, rebooting and trying again and again like a deranged circus monkey.
Hope springs eternal. Microsoft has recently release Windows SBS 2008, and Apple will release Snow Leopard this winter. Maybe then I can truly achieve OS harmony. Until then....
...can anyone help?
PS: Windows Guy: Please spare the "Get rid of the Mac" comments. Mac Guy: Please spare the "Get rid of Windows" comments. Linux Guy: No one cares. Thanks!
Wednesday, July 2, 2008
Sam & Max are coming to the Wii
The big news yesterday was that we finally made the jump to HD in the PixelFlop household. A new Pioneer 50" Plasma TV was delivered in the early afternoon, and the wife came home from Target with a Nintendo Wii shortly after. It was like Christmas in July.
Today, that Christmas just got even better.
IGN just released news that Sam & Max, Freelance Detectives are coming to the Wii.
What a fantastic idea. Point and Click adventures like Sam & Max, Curse of Monkey Island and Day of the Tentacle are amongst my favorite types of games. They've fallen out of favor in the high paced, shoot shoot shoot world of console gaming that dominates this decade, but for my money, they top the list when it comes to enjoyment.
I hope this little experiment proves successful, and we see a Renaissance of adventure gaming on the Wii.
Monday, June 16, 2008
My Visions Are Coming True
OK, so I may not be Nostradamus, but in the past few weeks a few of my rants about things I want have come to pass...
Earth to HBO, Get With The Times! / March 28, 2008
HBO has started selling some of their shows an iTunes. We're still a long way from getting new episodes of Entourage within a day or two of when they air. They only have six titles for sale, none are still on the air, and not all the episodes are available, but it's a start...
Better Exchange Support Coming to Apple Mail? / March 8, 2008
This one wasn't hard to predict, but sure enough, Apple has announced that full Exchange support will be part of the next version of Mac OSX, code named Snow Leopard. This means that Apple Mail will potentially be on equal footing with Outlook when it comes to interacting with Exchange Server.
I'm sure the nay-sayers will still come up with a reason to protest, but in my mind, this knocks down one of the final barriers keeping the Mac out of mainstream business. Couple this with the push-back Microsoft is getting on Vista, and I expect Apple's market share to grow substantially in the next 3 years.
I guess it's time for me to start the speculation machine up again. I need to keep ahead reality!
Hmmmm. Let's see...... Ah, I've got one:
I predict that I will win the lottery this week.
Here's to hoping...
Tuesday, June 3, 2008
List ALL Stored Procedures in an SQL Server Database
Today I ran into a unique problem. I needed to reassign the permissions on a bunch of Stored Procedures in an SQL Server database. What a joyless task.
Now, I could do this by hand. Just open up Microsoft SQL Server Management Studio, right click on the Stored Procedure, and assign the permissions. In my case, however, I had hundreds of Stored Procedures to change. Doing this one by one would make me want to claw my eyes out.
The solution is to use some hidden system tables to get the list for me.
SELECT [name]
FROM sys.sysobjects
WHERE (type = 'P')
This gives me the list I want, but I can do a bit better:
SELECT 'GRANT EXECUTE ON OBJECT::[dbo].[' + name + '] TO [MyUserID];' AS Expr1
FROM sys.sysobjects
WHERE (type = 'P')
AND (LEFT([name],3) = 'DNN')
With this SQL, I generate the actual command needed to grand the new permissions to the Stored Procedure. I also use a WHERE condition to limit the effect to just Stored Procedures beginning with DNN, so I don't do this to everything, just the ones I want.
Once I run this, I just copy the results, paste it back into the SQL section of Microsoft SQL Server Management Studio, and execute. Bingo! My permissions have been altered.
Enjoy.
Friday, May 23, 2008
Generating Google Base XML files in VB.NET
This may be a bit obscure, but since I struggled with this, I'm sure someone else in the future will struggle with it too. Hopefully this little post will help.
Goal: Create an XML file in RSS 2.0 format using VB.NET for use with Google Base
Challenge: Getting the .NET XmlSerializer object to generate the XML for you with the correct "g:" prefixes on the Google specific tags.
Making XmlSerializer generate basic XML is rather trivial. A quick search of the Interwebs will show you numerous examples. Essentially you just generate a class that matches the basic layout of the XML you want, populate the class, and send XmlSerializer off to covert it to XML.
Getting it to generate the Google specific XML needed for Google Base is a much more difficult problem, however. It becomes a bit tricky when you need some of the xml tags to be generic (for example, <title>), and others to have the Google prefix (ala <g:price>)
Solution: The key lies in a few hints you include in the Class definition to tell XmlSerializer what to do. Here's an example of the class I used:
RSS.vb
Imports System.Xml.Serialization
<XmlRoot(ElementName:="rss", Namespace:="")> _
Public Class rss
<XmlElementAttribute("channel")> _
Public channel As New rssChannel()
<XmlAttributeAttribute("version")> _
Public version As String = "2.0"
End Class
Public Class rssChannel
Public title As String
Public link As String
Public description As String
Public language As String = "en-us"
<XmlElementAttribute("item")> _
Public item As New rssChannelItems()
End Class
Public Class rssChannelItems
Inherits CollectionBase
Public Sub Add(ByVal Item As rssChannelItem)
Dim I As Integer = List.Add(Item)
End Sub
Default Public ReadOnly Property Item(ByVal Index As Integer) As rssChannelItem
Get
Return CType(List.Item(Index), rssChannelItem)
End Get
End Property
End Class
Public Class rssChannelItem
' Required
Public id As String
Public title As String
Public description As String
Public link As String
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public price As Double
' Recommended
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public provider_class As String
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public year As Integer
' Optional
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public agent As String
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public area As String ' Sq Ft
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public lot_size As String
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public property_taxes As Double
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public school_district As String
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
Public zoning As String
End Class
Notice this part of the code:
<XmlElement(Namespace:="http://base.google.com/ns/1.0")> _
It is telling the XmlSerializer that I want the element to have the g: prefix. That's the revelation. Once you have that in place, you just create an instance of the class, populate it, and save the XML to disk.
Export.vb
Sub GenerateGoogleBase()
Dim rssFeed As rss = Nothing
Dim rssItem As rssChannelItem
Try
rssFeed = New rss
With rssFeed.channel
.title = "one"
.description = "two"
.link = "three"
End With
rssItem = new rssChannelItem
rssItem.id = "1234"
rssFeed.channel.item.Add(rssItem)
Dim xml As New XmlSerializer(GetType(rss), "http://
base.google.com/ns/1.0")
Dim strFile As New FileStream("C:\Test.xml", FileMode.Create)
Dim xmlns As New XmlSerializerNamespaces()
xmlns.Add("g", "http://base.google.com/ns/1.0")
xml.Serialize(strFile, rssFeed, xmlns)
Catch ex As Exception
End Try
End Sub
Wrap Up: As I said up front, yeah, this is a bit random and obscure. I'm sure I won't be the only person who struggles with this though. My hope is that the next person down the line will find this post and be helped by my struggle.
Big Thanks to Phil Weber for the basic RSS code, and Martin Honnen for helping me with making it work with Google Base.