August 2006 - Posts
Do you have two monitors on your desk? If not, I suggest going out and getting another. I'm amazed at how much more productive and efficient I am with multiple monitors. Alt-Tab still has it's uses, but I'm not using it nearly as heavily.
Here's what I would love next....
As part of the application I'm currently working on, I'm writing an import routine. This import routine pulls in data that is read from an XML file. The problem is that the process, which kicked off via a button clicked event, takes nearly two hours to run. Right now, there is no useful information being displayed to the end user. The page from the client's standpoint times out, but the process on the server is actually happily marching along, giving the user no valid feedback. I think this is somewhat unnacceptable and am wondering if any of you out there have dealt with something similar.
In the old "classic asp" days I would create an iframe that would call a page whose duty it was to read a status file (a flat text file). The long running process would update the status file and the iframe would routinely update the status.
Is there a better way in 1.1? If so please advise.
Thank you,
Tim
I'm laughing as I'm reading the arbitration decision regarding Google suing an apparently money hungry idiot. The defendent (referred to earlier as the idiot) tried to convince the arbitration panel that when she purchased googlecheckout.com, googlematching.com, and googleoutdoors.com that she fully intended to set up a dating site. "Go ogle checkout" is how it was going to be called. where "where the word 'ogle' commonly means 'to glance amorously.'" .....Riiiiiiiiiiiiiiiiiiiiiight
First do we need another dating site? I suppose it's America and if you have the desire you can do what you want. I do find it ironic though that with the recent Google hookup that another site would use a similar name in trying to start a supposed dating site.
In the article, this woman, asked Google to pay her 1.2 MILLION, yes MILLION, TWO commas for the domain name. She then got reasonable and lowered her offer to a paltry $375,000. Google balked and too her to court. Here's an excerpt from her reply email to google cease and desist letter:
"Hi there. I have received your email and do not actively have these domain names in use. ... I am the proud owner of these domain names and others. I am wiling to do a transfer of these domain names to the google property rights at a cost of my expenses and time and future loss of business. I would possibly be willing to accept an offer of $ 1,250,000.00 as a package deal for all three domain names."
Pretty ballsy if you ask me. "Stop? me? little old me? ok, for 1.25 million"
Google won. Rightfully so in my opinion.
I wonder how much practice/coaching she had to have so she didn't ruin her case by slipping up somewhere and saying "googlecheckout" rather than "go ogle checkout".
Each Friday we have an in-house training session. Topics vary from how we do things interally to new idea such as NetTiers, CodeSmith or ActiveRecord/NHibernate. Really it's quite cool that our company does this. If nothing else it gets the developers together once a week in a room to learn something together.
Today was my day to teach on the provider model design pattern, something I've been a proponent for internally as we are having scaling issues while also offering customization. I prepared and wrote some code to explain the concepts and printed some flow charts and what not. All of it came together wonderfully!!! In fact afterwards I felt like everyone in the room, even some non-developers (design guys) could understand what was going to be going on in the development camp in the future.
The kicker for me is when I asked for comments/questions, I had just one comment from one of our more stringent attenders. He said, "Great job, I've actually watched a Microsoft presentation on the topic and this was better/made more sense"
I wonder if I'll finally be promoted in rank in the Ze Frank's League of Awesomeness
Tim
There’s a blog post out there from Fritz Onion floating around about generating a fresh request from IE. I thought some of you mind find this helpful. Sorry it’s long, I wanted to make sure the problem was clear before I went on trying to fix it. If you have questions come see me.
The problem:
If you have a page that has posted back how do you generate a fresh request of that page, as if it were your first visit to that page? If you click the “refresh” button you simply get a dialog asking, “The page cannot be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page that you were trying to view." If you click “Retry” you get the page with the information re-posted. If you click cancel, you’re taken back where you came from, no fresh request.
Possible fixes:
I would solve this problem by copying the url, going somewhere else, then pasting the url back in, thus generating a fresh request for the page. In development this can take some time and it’s just dumb to have to do this.
A better fix:
On any page where you want to generate a fresh request simply change the case of one of the letters. IE will process this as a new request and get you a fresh request.
Test this out:
- Go to http://www.genesishealth.com/physicians/index.aspx
- Search on the last name “Anderson”
- Now say you want to go back to an empty search (the first time you were to visit a page). How do you do it? Try the fix by changing case, it works nicely. Change index.aspx to index.aspX and you’ll see a fresh page is requested.
My spin:
Michael introduced me to bookmarklets awhile ago. If you are unfamiliar basically a “flaw” (or feature depending on who you talk to) in IE allows you to run javascript in the address bar. A bookmark simply replaces the address bar with what it stores in the url property. If you type javascript in a bookmark url IE will happily run the javascript. Don’t believe me? Crack open IE and type javascript:alert("Hello World") and hit “Go” or “Enter”.
I’ve created a bookmarklet that simply changes the case of the last character in your Url.
To create the bookmarklet do the following:
- Make sure the Links toolbar is visible (ensure View/Toolbars/Links is checked).
- In the Favorites menu, select Add to Favorties...
- Type "Real Refresh” (or whatever you want) in the Name field.
- In the Create In box, select the Links folder. Click OK.
- Copy the text of the bookmarklet, below
javascript:var loc=document.location.href;var lastChar = loc.substr(loc.length - 1); if (lastChar == lastChar.toUpperCase()){lastChar=lastChar.toLowerCase()}else{lastChar = lastChar.toUpperCase()};document.location.href=loc.substr(0,loc.length-1) + lastChar;
- Right-click on the new "Real Refresh" link in the Links bar, and select Properties.
- Paste the bookmarklet text into the URL field. Click OK.
Possible caveats:
If you have a query string it, this bookmarklet will handle fine, this script will keep it but will modify the last character of any string passed to it. That being the case the last value could have a goofy value, ie “...Name=TiM” So if you're reading in data that is case sensitive, you need to be wary. If this is a problem, I would suggest modifying the script to find the .com or and change it to .coM or something insignificant like that.
I'm a fan of the #region tag usage in source code for easy collapsing and categorizing of code. What I set out to do was to see if there was a way to change the default behavior of VS.Net 2003. When I create a new webform, the aspx.cs file that is generated isn't set up the way I wanted. I find myself creating a lot of regions right off the bat. Here's what I found.
Navigate to: C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\DesignerTemplates\1033 (or wherever you've installed Visual Studio .NET 2003)
Make changes to NewWebFormCode.cs
Here are the changes I made
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace $NAMESPACE$ { /// /// Summary description for $CLASSNAME$. /// public class $CLASSNAME$ : System.Web.UI.Page { #region Controls #endregion #region Private #endregion #region Properties #endregion #region Internal Methods #endregion #region Control Events #endregion #region Page Events private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here } #endregion #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET // Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } }
|
You'll notice there are other default templates there you can mess with and do similar things to.