Skip to main content

Posts

Stopwatch Threshold Logging

Today's post is not related to regular expressions at all. In fact it's not really related to Regex Hero except that it potentially affects the website. But I figure I'd write about it here anyway. I've been diagnosing some intermittent web server performance issues for awhile now. And in effort to gain some insight into which pages are slow and how often, I wrote a simple logger. The idea is to time the ASP.NET page lifecycle from start to finish, and if it exceeds a certain threshold, then log it. The advantage of this approach is that it's not going to waste processing time logging the stuff I don't care about. If you're interesting in this for yourself and you're running ASP.NET all you'd have to do is add the following to your global.asax: private Stopwatch sw; protected void Application_BeginRequest() { sw = new Stopwatch(); sw.Start(); } protected void Application_EndRequest() { sw.Stop(); if (sw.ElapsedMilliseconds ...

Bugs fixed, Improved Efficiency, UI Tweaked, and Code Hinting Improved

Bug fixes When you press the down arrow key the focus shifts to the code hinting box, but holding down the key wouldn't do anything unless you lift and press again. Now as you press and hold the down arrow key, the selection will rapidly move down the list. The code hinting box wouldn't go away when you shift focus to the target string or click in the regular expression box. Now it will. The app would throw unfriendly errors if you have disabled Isolated Storage. Now it won't. The app would throw unfriendly errors occasionally when trying to step to a match that doesn't exist. Now it won't. Improved Efficiency I've enabled output caching on the home page as well as the tester to improve ASP.NET performance, if only slightly. I've combined three separate web service calls upon initialization to only one. This will reduce the time it takes for the tester to recognize your login. UI Tweaks I've changed the placement of the code hinting popup to...

Silverlight 4 release date confirmed: April 15th, 2010

What I had suspected is now confirmed. Silverlight 4 will be launched along with Visual Studio 2010 on April 12th. If you're in the Las Vegas area you can even register for the launch event . Or you can watch it online . I've talked before about how Silverlight 4 will affect Regex Hero . So needless to say, I can hardly wait for it to 1.) be released and 2.) reach a large enough audience for me to make the switch. I'm going to be keeping an eye on riastats.com for adoption rates. UPDATE: So the official Silverlight 4 launch was broadcast live today. And I learned that in fact the actual release date will be April 15th (Thursday). UPDATE #2: Silverlight 4 is live! Get it here: http://www.microsoft.com/getsilverlight/get-started/install/

Major UI Overhaul

I was pretty proud of Regex Hero's simplicity in the beginning. But I've built Regex Hero little pieces at a time for the past year. As such, I've gone in a few different design directions and the usability has suffered a little. I'm a programmer 1st, designer 4th. That's no excuse, really. If I was a more disciplined designer I wouldn't have let this happen. But nothing in Silverlight development is final. So I sat down this weekend to solve some of these UI problems, and solve them well. My Inspiration Bill Buxton has talked about creating a common design language for an application. What he's getting at it is that the design of your application should be consistent throughout so that when you explore a new section of the application you'll instinctively know how things work. For instance, new dialog boxes, windows, and basic UI elements should always appear in a consistent, and therefore, predictable manner. Likewise, the color scheme o...

Introducing Code Hinting for Regular Expressions

It's been a long time in the making but code hinting is here, and I'm pretty excited about it. I've created a short code hinting demo that shows it off a bit. This feature is available only to licensed users . If you're a licensed user and you open up the tester now you'll see hints appear as you start typing an open parenthesis "(", bracket "[" or brace "{". I took a lot of inspiration from Intellisense. In particular, I based my design off of the Intellisense in Expression Blend. I like the look & feel of Expression Blend. But the regular expression language is so different than anything Intellisense is used for. So functionality-wise I was on my own. I knew one thing I didn't want. I didn't want the code hinting to aggressively autocomplete. In other words, Intellisense in Visual Studio will sometimes autocomplete whatever you're typing at the time, sometimes adding code that you don't even want...

Proper Off-Site Backups Have Been Configured

When the site was hosted with Orcs Web they would backup the server for me as a part of their managed hosting. Now that I'm with Liquid Web and I've opted not to use their $100/month Guardian backup service, backups are on me. So today I set up a database backup maintenance plan. Every night the server will create full backups for every database in SQL and save the backups to the extra (backup) hard drive in the server. I've got the backups configured to expire after 14 days. Essentially what this means is that I'll have quick restore capability for any day up to 2 weeks in the past. But that's really not enough. So in addition to this I've signed up for MozyPro off-site backup. I've used MozyHome on my home computer for the past year and I've been pleased with their service. The MozyPro service is slightly more expensive than MozyHome. But MozyHome will not run on a server, so MozyPro it is. I configured MozyPro to backup nightly just a...

Code Hinting for Regular Expressions : The Theory

I haven't heard much feedback on my code hinting post in January, perhaps because the first demo is not too impressive. And in fact I haven't been able to work on it as much as I wanted. But I'm still thinking about it and planning the user interface. There's still a lot to do to make this as well polished as Intellisense is in Visual Studio or Expression Blend. In fact I'm drawing more inspiration from the Expression Blend interface, but that's another story. When I first started on this I knew that I needed to parse the regular expression on the fly and display the hints based on the text next to the caret. I begun by researching parsing theory. Now, I know what you're thinking. Why bother? Why not just use regular expressions? Well, I knew that regular expressions are ill-suited to parse HTML , and I thought that they may not be the best choice for parsing themselves, either. The reason I thought this, it turns out, was completely valid. Reg...