Code zealot in a connected world
Doing a simple timeout page with WebClientApplication
/<%@ Application Language="C#" Inherits="Microsoft.Practices.CompositeWeb.WebClientApplication" %>
<script Language="C#" RunAt="Server">
protected override void PrePageExecute(Page page)
{
// True when the current session was recreated with the current request
if (Session.IsNewSession)
{
// redirect if the requested page is not Default or the Timeout page
// or if the request method isn't GET
if ((!(page is Retail.Web._Default) &&
!(page is Retail.Web.Errors.Timeout)) ||
Request.HttpMethod != "GET")
{
Response.Redirect("~/Errors/Timeout.aspx");
return;
}
}
base.PrePageExecute(page);
}
This approach relies on the Session.IsNewSession property to tell us if the current session was created with the current request, with a bit of convenience support for the timeout/default pages.
Nikhil has a more detailed solution: Detecting Session Timeout in ASP.NET 2.0 Web Applications if you want to differentiate between
- new session object and user was really new, (aka no ASP.NET_SessionId)
vs
- new session object and the user really timed out (aka sorry I was surfing the web and the app timed out)
GMail getting slower and sloowweerr
/There could literally be thousands of reasons for why GMail seems to be running slower and slower for me:
- FireFox Extensions?
- I use FireBug (which Google has told me to switch off)
- I use GreaseMonkey
- I use the Web Developer AddOn
- Network connection?
- The firewall behaves funnily at work
- Too many processes running?
- Doesn't explain why other websites run fine though.
- FireFox default caching mode?
The thing is, it really shouldn't be "my problem" to work out what's wrong with GMail. As far as I'm concerned, other websites continue to work fine, and if I switch to the basic GMail view, it works fine too. So there must be something wrong with the standard version of GMail.
Which really got me to think about the whole connection between web and PC.
I use GMail because:
- Lots of space - but that's hardly new now - everybody is out there throwing hard-drive spaces at you
- Can use everywhere, simple and fast - again I'm not so sure about the speed anymore
- Easy to get my centralized data out - this turned out to be a bit of a false impression. It is difficult to get data out of Google. May be there will be new Google API eventually, I can only hope.
I use an offline mail program (like Windows Live Mail) because:
- Offline reading, if mail server is down I don't lose access to my mail
- Composing experience offline is better, GMail with its auto-save and FireFox's build-in dictionary comes pretty close though
- Stripping advertising
- Combines blog reader, podcast and videocast facilities - which I can then synchronize to a portable player
- Speed of browsing emails, waiting for an webpage to load is silly
You would think Microsoft should theoretically have an advantage with their desktop/web integration strategy, I'm just not sure why it hasn't been executed (or received favourably) yet.
Laptop has three vertical lines now
/Looks like my Dell Inspiron is really heading for the trash can.
Dell customer care has got back to me with some model numbers that the out of warranty replacement covers, unfortunately the bad news for me, my LCD isn't one of those part numbers.
Not sure where to go now:
- Get the parts and replace the LCD screen myself
- Purchase extended Dell warranty (feels a bit like getting blackmailed?)
- Throw the laptop off my level 14 building (I'm sure this would be illegal in most places)
- Purchase a new laptop
- Dell again?
- Or another brand...
Nikhil Kothari's behaviour framework for SilverLight
/Nikhil here describes a mini behaviour framework for SilverLight, and then proceed to implement a DefaultCommit, AutoComplete and TextFilter behaviours that can be attached to the SilverLight textbox.
Very cool.