Dan Appleman: Kibitzing and Commentary

My personal blog

The Email Encryptor Reborn

Email obfuscation using Javascript is a popular way to hide Email addresses from spam-bots. One of the most popular of these was written by Jim Tucek at the Academy of Science at St. Louis. Unfortunately he hosted it on one of their student pages at http://www.jracademy.com/~jtucek/eencrypt.html, and the other day (during a website move), all of those pages were taken down, leaving web developers unable to create new Email addresses for sites that use the script. After getting a panicked call from a friend (who has many clients on the script), I decided to step in and see what I could do to help. The result can be found on my new Email Encryptor page.
This actually posed an interesting challenge. Jim used RSA encryption (about 10 bits) to encrypt the strings. I’m not sure why he chose an asymmetric algorithm instead of a symmetrical algorithm – as the primary result of this choice is to make it hard to create new Email addresses (in a symmetric algorithm you could use the decryption key to encrypt as well – so the loss of the original page would have had little impact. In an asymmetric algorithm having the decryption key offers no help). Fortunately, the algorithm itself is reasonably simple and widely published. Though I use cryptography a great deal, this was actually my first time doing the math, and translating some of the mathematical requirements into computer algorithms took a bit of thought. It was also the first time I’d really thought about modulus math. Finally, there was the Javascript coding itself. Though my primary expertise remains VB .NET and C#, I’ve gotten to do quite a bit of Javascript in the past couple of years (both in web projects and some Ajax work), so that part was relatively simple. By the way, I love the Visual Studio 2008 Javascript debugger – it doesn’t get much attention, but it’s very cool. As a side-effect I also got a nice prime number example to use next week at SD-West when I talk about the TPL, I mean “the Parallel Extension to the .NET Framework”.
So ultimately I was able to get it to work. It’s now live and hopefully will serve as a good resource to those left stranded when Jim’s page went down, and the rest of us in our never-ending battle to fight spam.

Coding Time

They say life is a balancing act. Certainly one I share with most of you is figuring out how to balance time between learning new technology and actually getting work done. This is particularly challenging for those of us who spend all or part of our time writing or teaching others – especially at times when another version of Visual Studio and the .NET framework is heading towards us with the inevitability of freight train with no brakes.
Lately things have been a bit quiet here. I haven’t posted much on my blog. I don’t speak at too many conferences (though I will be at devconnections next week and probably in Spring – it’s actually a very cool conference, so I do encourage you to consider it if you’re looking for one to attend). I’m not writing much.
Why?
Well, I know this may sound odd coming from someone who obviously (if you look around this site) has very diverse interests. But the truth is that despite the time spent writing, speaking, developing other sites (like searchdotnet.com), I’ve always been and continue to be primarily a coder.
(more…)

DotNetrocks, Gadgets and a Facelift for SearchDotNet.com

It’s been a busy couple of weeks for SearchDotNet.com. It started late last month when I was interviewed for DotNetRocks.com while at the DevConnections show in Orlando Florida. The topic of the interview was mostly about discoverability – how we as developers go about discovering information and existing solutions to problems. We did stray into various other topics, including some stories about earlier adventures (misadventures?) from way back when….
Shortly after the interview, a listener (at least I believe it was) posted a comment on my post describing the launch of SearchDotNet.com where he noted “A little Google homepage widget would be a nice addition”
What a great idea. Of course, I’d never actually written a “gadget” for Google, but it turned out to be remarkably simple, at least as far as simple gadgets are concerned. First I wrote a “Universal” gadget from use on custom Google Homepages. These were also supposed to work on Google’s desktop, but it turns out the latest version has a bug that prevents this for now. So I went ahead and created a Google Desktop gadget, that’s a somewhat trickier process.
While working on the gadgets I also realized that the site still had the minimalist (i.e. ugly) user interface I’d thrown together on the day I launched. It may seem odd that I hadn’t noticed this, but while I use searchdotnet.com all the time, I actually use it from the browser search box (the site has implemented OpenSearch from almost the beginning, so it’s always available as one of the search providers on my browser).
So I spent the past few days cleaning up the site. Not that I’d call it beautiful, but it’s quite a bit better than it was. More important, it now makes proper use of both CSS and .NET master pages, so I’ll be able to more easily update the design later.
I’d also like to take this opportunity to thank readers who have recommended additional sites for searchdotnet.com – I didn’t add all of them (there’s a new section of the site that discusses inclusion criteria), but I did add many of them, particularly some great new experts sites.

The Ramifications of Google Custom Search

I’m a tech skeptic. Seriously. My first reaction to anything new is almost always doubt – especially if it comes with a ton of hype. And I stay skeptical for a long time. As a result, my track record for predicting which technology will be slow to catch on (or fail) is pretty good. Unfortunately, as with most people, my track record for predicting which technology is going to boom is average – I usually figure it out after it’s happened.
Once I got it right – when I saw the Visual Basic 1.0 beta, I knew that it was going to be huge and change the nature of software development. I responded to that change by launching Desaware.
This week I felt the same way when I saw Google Custom Search. Within 12 hours I had launched SearchDotNet.com – really as an experiment (and a tool for my own research, that is already proving useful).
The more I think of it the more I’m convinced that Google Custom Search is going to do for search what VB did to Windows development – change the paradigm.
(more…)

SearchDotNet.com – A Google custom search for .NET developers

So this morning I noticed Google launched a new custom search tool – where you can basically customize the Google search engine to search across a set of sites and perform other customizations. Basically a domain specific search.
Is I mentioned in my last post, I consider discoverability one of the greatest challenges facing developers today (it’s certainly the single greatest challenge I face in my daily work). Somewhere out there are answers to almost every technical problem – but how to find it?
Using Google custom search to create a .NET domain specific search engine was a no-brainer. A quick visit to GoDaddy and who would have believed it: SearchDotNet.com was available!
So here it is – a Google powered .NET domain specific search. I’m still early in the process of adding sites. Some of the choices are obvious (MSDN, duh!). Other sites are those that I’ve had the most luck with finding answers to problems I found challenging.
I’m particularly interested in finding more “experts” sites – those that help answer really tough problems, or those that have advanced content – but that are often lost in the noise. These will get the “by_experts” tag that allow them to really stand out.
So, if you have favorite sites that you think just HAVE to be included in the list, please let me know (by Email or comments). I’m not trying to just build a list of all .NET sites – quite the opposite. There are plenty of aggregators (not to mention general Google search) that are great at searching everything. What I need (and am trying to implement) is a tool I can use for an initial search that has a higher probability of finding a good solution to problems – especially on more advanced topics. Then, if it fails, I’ll go to the broader web search.
Plus, I’ll be adding content to the site on the topic of discoverability in general. Keeping up with rapidly changing technology is no easy thing, and hopefully I can make a contribution to that effort as well.

Update: 14 years have gone by and I’ve long since abandoned that site. However, the concept is still sound – and I’m using it now at SearchTheForce.com – a custom search engine for all things Salesforce.