Posts

OpenID Prime Time Redux, now with Microsoft!

"We don't all agree on everything. I don't agree with myself on everything..." -- Rudy Giuliani Not too long ago I opined about whether OpenID was really ready for Prime Time A Short while ago, Microsoft announced a deal with JanRain, VeriSign and Sxip to develop integration between Microsoft CardSpace and the open source OpenID project. In addition, the partners announced that Microsoft would be bringing its anti-phishing technology to the OpenId platform - important, because any time you have an open-source, open-standards Single Sign On infrastructure, you are going to attract the dastardly hackers that attempt to abuse it. I believe that these are new technologies that will have a significant impact on the future of the Internet, identity and single-sign-on (SSO) as we know them. OpenID is an open, decentralized, free framework for user-centric digital identity. It attempts to solve the problem of Web single sign-on - something that Microsoft attempted at first ...

Dynamically Loading an Image from an External Assembly

This one came up recently in the C# newsgroup, so I thought I'd take a quick crack at it: private void button1_Click(object sender, EventArgs e) { Assembly asm = Assembly.LoadFrom(System.Environment.CurrentDirectory + @"\AssemblyResources.dll"); Stream strm = asm.GetManifestResourceStream((string)asm.GetManifestResourceNames()[0]); Bitmap b = (Bitmap)Image.FromStream(strm); pictureBox1.Image = b; } What you are doing is: 1) Assuming the "external" assembly is a managed assembly, and it's name is "AssemblyResources.dll", and it resides next to the executable (for ASP.NET you would have to use Server.MapPath or some combination of Request.PhysicalApplicationPath, or the like). We load the assembly into the AppDomain using the LoadFrom method. 2)We extract the resource into a stream using the GetManifestResourceStream method. 3) To make it easier to know the exact names of resources (which can be tricky) I use the GetManifestResourceNames method, whic...

Microsoft Junking GotDotNet.com site

According to the site: "We are phasing out GotDotNet for the following reasons: Microsoft wants to eliminate redundant functionality between GotDotNet and other community resources provided by Microsoft Traffic and usage of GotDotNet features has significantly decreased over the last six months Microsoft wants to reinvest the resources currently used for GotDotNet in new and better community features for our customersPhase Out ScheduleThe GotDotNet phase out will be carried out in phases according the following timetable: (etc, etc)" Basically what we are saying here folks, is "We don't think there's enough interest in this site, and we think we have other resources that are better, so take it or leave it". Well! Sez who? I've got samples up there that have been downloaded OVER 47,000 times, and I myself have downloaded sample code contributed by others probably a hundred times or more. Yes, I know you've got Codeplex.com. It's very nice - but it...

SQL Server: "Don't Reinvent the Wheel" Department

In your travels as a professional software developer, especially when you come into a new position and need to get used to a new enterprise and its programming - related environment - the tools, the programming style, the existing codebase, etc. you get to observe some of the repetitive coding patterns that people resort to in order to solve their problems. One of the most common ones I've observed is where developers do not have a full understanding of how ADO.NET and connection pooling work. It seems almost like instead of seeking out and using best-practices code and techniques, that some people, either through lack of knowledge or just plain being stubborn, feel compelled to "roll their own" DAL and Database layers. Mistakes and poor design often result. Back around 2001, I found the Microsoft Data Access Application Block ("SqlHelper") class, which quickly solved a whole bunch of data access problems for me, and in fact I still use it today - 5 years later ...

Meet Jack Murtha: Official Saboteur of US peace efforts in Iraq (and parallels to programming)

Since last December, Mr. Murtha has become the hero of the antiwar crowd, and, as we've seen with other such individuals, scrutinizing their behavior is considered disrespectful. Few might recall (since many aren't even old enough to remember) that after the massive 1980 Abscam scandal, Mr. Murtha was named by the FBI as an unindicted co-conspirator. Sez Murtha, "Once we get out of there, it will be more stable in Iraq." Oh, Really? Jack Murtha is an idiot. If he has his way and we get out of there, even many left-wing Democrats agree that all hell will break loose, and we will be in much more danger - not only from Al Queda, but from Iran and other destabilizing influences, than we are now. Newt Gingrich: "It's conceivable that Murtha woke up one day a year ago and said, 'You know, if I don't start bashing America, and bashing the military, and repudiating everything I've stood for my whole life, these guys aren't going to allow me to be chai...

FIX: Flash on Windows Vista

Lots of people (me included) have been complaining that Flash (such as for viewing videos on Youtube.com) doesn't work. You go and install Flash again (as prompted) and when you go back to view the video it's like you haven't done anything -- no Flash. Here's the fix: Navigate to C:\Windows\System32\Macromed\Flash Then right-click over both 'Flash9b.ocx' and 'FlashUtil9b.exe', and choose Properties. In Properties choose the "Security" tab. Click on the "Everyone" account (or add it if it isn't there), and the button called "Edit" and then check the box called "Full Control", click "Apply" and do the same with your own Windows local account name. Once you have done this for both files, run the FlashUtil9b.exe and it should install and update and tell you to restart. Do so and you should now find that YouTube and other sites that use Flash now work.

YEESH! FORGET DATAREADERS!

I see so much of this on forums and newsgroups, I almost feel compelled to say "something". It seems that somewhere along the way new .NET developers read (or are told) that the DataReader is the "most efficient way" to get data out of a database. What happens next is they take this 100% literally, and get themselves into all kinds of trouble - blowing up connection pools, trying to do things that you cannot do, and so on. This becomes the idee fixe de-facto method for getting data, no matter what. Yes! The DataReader IS the fastest way to get data out of a database. However, that comes with a price that you need to evaluate. DataReaders hold the connection open. You cannot have a method that just "returns a DataReader" - leaving you to blithely do whatever you want -- unless CommandBehavior.CloseConnection was used in the intial SQL call and you are prepared to call the Close method on your reader. In addition, DataReaders offer only ONE TIME firehose-st...

FIREFOX / IE Word-Wrap, Word-Break, TABLES FIX

One of the most annoying things a developer (who would normally delight in writing code, not futzing with markup) can have is getting rendering issues between different browsers. The two biggest players are of course Internet Exploder and Firefart (as I lovingly like to refer to each). In most cases that's going to take care of 98 percent of your total site traffic. IE has had a proprietary "word-break" style attribute for a long time, and this made it into the CSS 3.0 spec. But that doesn't necessarily help you with Firefox right now. Firefox literally - (and I consider this completely idiotic, since it's been in their bug database for FIVE YEARS) does not have a reliable CSS style element to force table cell content to break in the middle of a word in order to stop the content from expanding your table / div off the page or over other content on the page. Here's a partial fix, which will work for most tables and browsers. The style declaration (I call it m...

XAML, Expression Blend, and WPF

Microsoft is apparently moving forward as fast as it can with the integrated "next gen" tools like Expression Blend that are XAML - compliant. XAML has a lot of promise, expecially because of it's high level of adaptability to animation, Windows Forms - like controls, play stuff in the browser, and so on. I do a lot of work with Maya on the side. Mostly, I take my digital photographic work and do "digital photo collage" by overlaying photos as the material attributes of various shapes, often 3D replicated with MEL scripting, setting raytracing, refraction, reflection, lighting and other features then doing a master render to a large TIFF file (sometimes 65MB). I have a friend who runs a studio here in Deland, FL and he has an expensive giclée printer , so he can put these out on large - format prints on expensive paper for me (that is, the "good ones", 'cause this can cost $100 a print -- here is a link to a small size one ). At any rate, Thomas ...

Did Chuck Norris Kill SOA?

It's fun to get a handle on what people are interested in on the web. At my ittyurl.net site , I have a ticker that shows the most popular internet searches for the day,constantly refreshed, and when you click on one, it takes you to the search results for that on my search page -- on site. This is extremely interesting to me because it not only keeps "counts" of the most popular (and recent) searches for everyone to see, it also increments the count every time somebody clicks on one of the searches that are already there. So you get kind of a mixed bag - what people are searching for on the web in general, plus what of my current list of top searches are getting "re-clicked". Here's a sample of a recent top 20: Saddam Hussein runescape fergie aishwarya rai ufc ciara wwe limewire grey's anatomy cross-page postback hi-5 nfl draft britney spears web.config james brown System.EnterpriseServices ASP.NET app beyonce knowles new years revolut...