Home | Categories | Sources | Sites | Languages | About
Note: The project has been discontinued
Philip Rieck [Site] [XML]
Description: Phil in .net
Last Update: 03:24:45 05/27/2006

Additional Info

First Fetched: 00:18:02 01/31/2004
Last Updated: 03:24:45 05/27/2006


More asp.net Viewstate filters …
Note, this is cross-posted from Philip Rieck's full weblog. Full entry is here. I have the strong feeling that I will no longer cross-post to weblogs.asp.net. So if you find this stuff interesting, you'll probably want to subscribe to my rss feed. Otherwise, thanks for reading and goodbye. I'll keep the content available here as long as they'll let me. The background: I've seen a lot of articles lately about viewstate (well, in the last two weeks or so. I'm bad about keeping up with the rss) . Scott Mitchell recently published one article on MSDN all about the viewstate, and (among other things) showed how to send less viewstate. In it he also mentioned that Scott Galloway blogged on viewstate compression using bzip2. Also of note is the Flesk viewstate optimizer. All of these allow you to send less viewstate to the client, which means that you're saving bandwidth twice -- since the browser sends the Sviewstate back with the next request. For large pages with lots of viewstate, ...
03:53:00 June 18, 2004, Friday (PDT) Source: Philip Rieck
.Net says - multiple languages supported. VS.Net says - don't try it.
It's beta 2 of the new visual studio, soon to be VS.Net 2002. It's awesome, and I'm blown away. In all ways, I love .net development, and Visual Studio gets better and better. However, one bug will plague me through my career. ... Warning -- it's extremely simple. You will probably become very aggravated (as I did) when you realize that it's a bug that impacts anyone trying to take advantage of .net's language-agnosticism that hasn't been fixed for two and a half versions. Is there anything I can do to help? Full Post here Cross Posted from Philip Rieck's full blog..
12:53:00 February 17, 2004, Tuesday (PST) Source: Philip Rieck
HttpModule to keep post-back scroll position
One of the things I hate about the joy of postbacks is losing my scroll position. On a page that's a bit longer than the window, if I have an auto-postback combobox (for example), the user selects an item, the page posts back, and poof! they're back at the top of the page. On a corporate intranet the post back is nice and fast, and many times the user has no clue that it happened.... Except for the fact that the page just "jumped" back to the top. Because of this I (as many people) write my controls to re-position, or I have page logic to re-position after a postback. There are articles on CodeProject with controls for keeping the scroll position, one on DotNetJunkies that isn't quite so pre-packaged, but still good, and several tutorials. The problem then is that the behavior is coded in everywhere, or the control must be included on each page, or the page must be derived from something other than the Page class, or something else.. I wanted a fire and forget solution. So here's ...
09:00:00 February 11, 2004, Wednesday (PST) Source: Philip Rieck
UDDI - has it ever lived?
Aaron Skonnard asked “Is UDDI Dead?” a few days ago, Wondering if WS-Addressing will reduce the need for it. Dave Bettin thinks that it can be sucessful, at least in the enterprise. Michael Erls thinks so too. My take - UDDI hasn't lived at all yet. I'm not so sure it will. I agree with the opinions that if it does, it will be in the enterprise only, but I don't think it will live there either. Why not? Well, at several large enterprises, I've seen solutions already in place -- web services at well known points that serve up the endpoints for other web services. These are tied into a web app that lets people search for functionality based on keywords and categories that make sense in the business they have. This solution allows developers to find the services they want, if they exist. It allows them to list and describe the services they create. It allows them to programmatically (via the webservice) find a service that they already know about. All using technologies and methods ...
13:40:00 February 7, 2004, Saturday (PST) Source: Philip Rieck
WaitHandles for the confused
I put up a somewhat old writeup on the ManualResetEvent and AutoResetEvent on my full blog, thought since it was .net, I'd post here as well. Here's an excerpt: Confused about WaitHandles? Sure you are. For one, they have the word "Event" on them.. Are they events? Do they call delegates?. For another, what's this "Reset" action, and why would I want to do it manually? And lastly, what does the documentation mean when it says "Signaled" and "Nonsignaled"? In project [codename] you see a good number of calls to WaitHandle-derived objects , both AutoReset and ManualReset. As the interaction can be somewhat complex, it can be difficult to decipher what is going on. Hopefully this simplified example will help clear things up. You can find it here if you're interested. It really was written for interns, but if you've never used them, you might find it useful.
06:27:00 January 27, 2004, Tuesday (PST) Source: Philip Rieck
Sharing my oft-used Ink controls, part 1.
I do a good amount of TabletPC development, pretty much mostly for myself. I have lots of fun and useful apps that do things I need, and some apps I use to demo the Tablet to others.. And, like any developer, I hate to redo work. So I created a library of controls that I use that I can drop-in. I showed these to a friend today and she said “Share with the world!”. So here you are. This is the first one that I would even consider letting anyone else look at, and it's not a control I'd consider anywhere near polished. But perhaps you other TabletPC developers out there can use and adapt this to reduce some of the “gruntwork”. So, here's the TabletTextbox - it's an Ink input control that I use on a lot of forms to quickly input text / numbers whatever. It allows quick retrieval of the recognized text with the .Text property, and can optionally show a field label and / or the recognized text inside the control (each can be put in one of the four corners, or omitted). Here's a runtime ...
14:12:00 January 21, 2004, Wednesday (PST) Source: Philip Rieck
Strongly typed dataset tip
While doing code reviews (for .net code, of course!), I see one minor annoyance with strongly typed datasets again and again - not using the TableName property. I don't know why this comes up so often, so I thought I'd add a quick tip about it. If you have a strongly typed dataset (some call them XSD datasets), great. You don't need to remember column names or worry about casting values. So why do I see things like this: dAdapter.TableMappings.Add("Table1", "MyTable");//orcntrl.DataMember("MyTable"); Instead of using the table's name as a string, use the .TableName property as such: dAdapter.TableMappings.Add("Table1", typedSet.MyTable.TableName);//orcntrl.DataMember(typedSet.MyTable.TableName); Now you can rename your table and let the compiler find all of the code you need to change, instead of trying to do a “Find” and hoping you didn't miss any. I'm all about making the compiler find as many problems as I can. [cross-posted from Philip Rocks, Philip Rieck's new-ish real blog - ...
01:03:00 January 21, 2004, Wednesday (PST) Source: Philip Rieck
Don't loose this regex
I really wish I knew where I found this... but after only an hour of digging in my old code, I found the regex to deal with CSV files (that is, handle both quoted and non-quoted values, commas in quoted values, etc). I know I didn't write the regex pattern. I also know I don't want to lose this and have to try. // ,(?=([^"]*"[^"]*")*(?![^"]*")) Regex rex = new Regex(",(?=([^\"]*\"[^\"]*\")*(?![^\"]*\"))");string[] values = rex.Split( csvLine );foreach( string v in values){ ...} If you have an attribution for me, please let me know. I'd like to give credit to the regex author. [update] - yes, it was from here : http://radio.weblogs.com/0117167/2003/02/18.html#a132 (that's from Early and Adopter) (thanks, Darren Neimke!) [cross-posted from Philip Rocks, Philip Rieck's new-ish real blog - http://philiprieck.com/blog/]
04:40:00 January 16, 2004, Friday (PST) Source: Philip Rieck
Labelling people "advanced" is done by beginners.
So, I'm sure you've seen Scoble post on what advanced users need, and responses like Jeff Key's, Richard Tallent's, Andy Hopper's , and Larry O'Brien. Here's why I think that labeling users as "Advanced", "Beginner", "Blue-square", or "Rob" is a bad idea. (unless their actual name is "Beginner", or whatever) I'm a great cook, even though I don't cook much anymore (now that my wife has surpassed me I refuse to cook lest the comparisons begin). If someone asked me if I was an "advanced" oven user, I'd say "yes" without hesitation, then prove it by letting my wife whip up something delicious. I know what temperature I want to use, why I want to use that temperature, how long to keep it there, and to not touch the hot burny type things unless supervised by an adult. But I'm also an idiot. I know, you don't believe me, but I always turn the oven on without looking in it. That wouldn't be bad, except for the fact that 99% of the time there's a broiler pan or cookie sheet in there, and I ...
00:21:00 December 10, 2003, Wednesday (PST) Source: Philip Rieck
Perhaps a social statement
From ThisIsBroken, comes this I know I feel like this scene from Vancouver is accurate some days.
04:02:00 December 1, 2003, Monday (PST) Source: Philip Rieck
To beta or not to beta-- The previewer's dilemma
I went to the PDC. I got the bits. I played with Whidbey and ASP.NET 2.0. I fell in love. Back in the real world of work, I'm about to start a 4-6 month project. During this project we'll have to: Use (or write our own) a page templating solution that will allow a consistent look and feel across the site with minimal effort per-page. Hmm, master pages would be perfect Allow personalization. Hmm, doesn't asp.net 2 have a personalization engine? We'll use objects as data sources. Unfortunately our interns will have to forgo the use of the designers because they don't support this at design time. Hey, doesn't whidbey have an object datasource? We'd like to: validate against XHTML. Not going to happen with VS2003. pre-compile the huge number of pages / ascx's this project may have to catch compilation errors before the page or code-path is hit. Wish I could do this Yikes- I want Whidbey! Now!. I can get lots of this now from different or home-grown solutions, but in 9 months or a year ...
00:28:00 November 20, 2003, Thursday (PST) Source: Philip Rieck
Soap with attatchments change in WSE 2!
Rebecca Dias let us know of a change to WSE2 based on PDC feedback: We have already taken one action in WSE v2.0 as a result of the feedback from the PDC. Attachments will be abstracted away so that migration to MTOM will be more seemless. This makes me very happy in two ways: Despite letting us know that adopters of WSE are on the “Bleeding edge”, and should expect more work when migrating from one version / messaging technology to the next, they're still making it easy on us. Attachments are one of those things that we want now, and WSE is for people that aren't afraid to pay later for doing it now. Thanks for making us pay less. Ahh, SWA & DIME, I hardly knew ye. She cares! she really cares! -- I mean, of course, that Microsoft cares. One of the biggest lessons I came away with from the PDC was that I am Microsoft's customer, and I'm important to them. Too often, people think of MS as the “evil monopoly” that simply churns out standards-breaking software, and those of us that ...
14:20:00 November 12, 2003, Wednesday (PST) Source: Philip Rieck
Longhorn available on Subscriber downloads
That's right - the same bits of Longhorn preview available at the PDC are now available to download (MSDN subscribers only). I guessing slowly, as everyone in the world hits the servers at the same time.
06:52:00 November 12, 2003, Wednesday (PST) Source: Philip Rieck
Whidbey: ExStencil folder found. Activate M2.5 Features found. Huh?
Okay, So Jeff Key found the folder containing expansion files. How do we make our own expansion stencil files and get them to register in with Whidbey? Am I an idiot, or does this not work yet? (Yes, I know, two separate questions) Also, can anyone tell me what the heck “Activate M2.5 Features” means under “Code focused development” in the VS options dialog? (Go to Tools | Options, select Text Editor | C# | Miscelaneous). The help for this option property page states (and this is the full text, other than the “pre-release documentation“ disclaimer and useless see-also links) The Miscellaneous property page, in the C# folder of the Text Editor folder of the Options (Tools menu) dialog box contains the following properties: Yep. That's it. Almost as helpful as the “How-To” on creating your own expansions for VS.NET Whidbey (see Jeff's post)
14:35:00 November 6, 2003, Thursday (PST) Source: Philip Rieck
For most developers, it's not about tweaking performance
Due to quick feedback (out of band) about size and relevence to .net, I have moved my response to this post from Critical Section to a “story“. You can find it here. Sorry to those that saw this in the aggregators.
03:01:00 November 4, 2003, Tuesday (PST) Source: Philip Rieck
Are consistent user interfaces a thing of the past?
Many people have seen the new Avalon UI paradigm, and the ease with which one can "skin" an Avalon app. Many of those people are concerned (rightly, I think) that this means that every app out there will depart completely from UI standards that we all know. Lately, I've been asking myself - is that a bad thing, or a good thing? You can ask anyone who knows me (if you can find anyone to admit it); I have some strong feelings on UI design and consistency. I've gone to the mall management office when a pull door had a horizontal push-style bar to complain0. I hate analog watches (I mentally translate the position to numbers anyway - why not show me the numbers?), and I've quit using applications that annoy me because they depart from windows standard UI behavior in ways that make it hard to use the application ( a push button is not a drop down menu! - I'll live with the little down arrow part, but the whole button?). Now, seeing what Avalon is capable of and what it makes easy, I ...
00:44:00 November 3, 2003, Monday (PST) Source: Philip Rieck
gSOAP 2.3.8, and you do care.
From Dave Bettin - gSOAP 2.3.8: We are pleased to announce the gSOAP 2.3.8 stable release for C and C++ Web services: ** Support for ANSI C and C++, including STL and templates** Full support for SOAP 1.1 and 1.2** Full support for WSDL 1.1 (WSDL document import and generation)** Proven interoperability (including all SOAP encoding types, SOAP sparse arrays, bitmasks, and Schema simpleTypes and complexTypes) Why do you care about a C++ soap library on sourceforge, oh ASP.net blogger? Indigo will work with this. This will work with Indigo . With IBM proving interoperability with MS, with BEA working on full interoperability, and with open source actively producing specification-compliant libraries, this means that producing truely interoperable services is within your grasp - and in fact may be very easy to grab. As your services are easier to consume and consumable by more people and technologies, the value of those services goes up. And producing value is what it's all about (note ...
09:00:00 October 31, 2003, Friday (PST) Source: Philip Rieck
Don Box deletes Powerpoint, takes notes in code
After the fun PDC Session where the Indigo Panel sings "Give Soap a Chance", Don is giving a talk which is his "last chance" to talk to us all. Since he has no powerpoint anymore ( it was deleted last session in a fit of power-point overload rage) he is taking notes in code. I like it, this is very succinct: /* Indigo Connector = {Port, Channel, Message, Service}; */ Giving the concept that the Indigo connector model consists of only four concepts. Can you guess what they are?
07:05:00 October 30, 2003, Thursday (PST) Source: Philip Rieck
Monad (an unfortunate codename from greek philosophy meaning "indivisible unit") has me excited. It's the "new command shell" from MSFT. You may have heard of it by now, some have said "like unix"... I think I'll say it's "like a .net shell". How so? Think classes passing objects from one to the other, perhaps giving a UI, taking input, or performing actions - all in managed code (.net). Hmm, you say, isn't that like any application? Yes! One exception only - you string together the classes (called "commandlets") that will get executed at the command line, passing in attributes for each class, and implicitly giving the order in which to execute them. get/process | sort "handles" | out/xml Okay, perhaps not excatly right syntax, but pretty close. What this will do is instantiate an object of the managed class that (with attributes) says it provides the commandlet get/process. It will then call special methods on that class, and pass the output object (in this case an array of ...
11:16:00 October 29, 2003, Wednesday (PST) Source: Philip Rieck
Ask the experts .. a wonderful community move
One of the things that Microsoft is now doing really, really well is getting the community of developers involved. Part of that is blogs, part is gotdotnet, part is just Scoble... and a small but really cool part is the PDC ask the experts. I had the great fortune to have Jeffrey Schlimmer sit down next to me with a churrito in hand and chat with Dave Bettin and myself about web services, Indigo, WSE and wsdl. It's great to know that a person like that is working on ws-policy and wsdl. Great chat, and perhaps we convinced him to blog a bit more... He did mention that the new spec for WSDL is no longer known as WSDL 1.2, (although it was published as such), but is now "the spec formerly k.." no, I mean it's now known as WSDL 2.0. As he said "we didn't just turn some knobs like the new soap spec, we added new knobs and removed old ones..." It needed a new major version He also mentioned the work with IBM and other (unnamed) companies, and I'm very happy to see that they are working ...
03:38:00 October 29, 2003, Wednesday (PST) Source: Philip Rieck
Lorem Ipsum backfires in ironic manner.. film at 11
Don Box is pointed to the Lorem Ipsum page by Nikhil... Hoax or not, many people use Lorem Ipsum text to keep people from being distracted by real text. It's supposed to stop things like these in a graphic layout design session: A business stakeholder interrupting the session saying “those figures aren't right... Sam always produces more than one million sales per year!“.. A user not listening to the demo because he's interested in the text you copy-pasted into the main content area from slashdot And other equally annoying interruptions / problems stemming from people not focusing on the purpose of the meeting / presentation, and instead being distracted by a trivial “space-filler“ So we use “Lorem ipsum dolor sit amet...” (see the page for further details). But beware!... True story - In demos to different groups of users of different products (but in the same company) that used Lorem Ipsum, a comment was shouted out - “Cool! - our new site will automatically translate text - ...
17:45:00 October 24, 2003, Friday (PDT) Source: Philip Rieck
Longhorn available to non-PDC
To those of you not at the PDC, reliable sources (?) say that Longhorn will be available as a public beta (for an undisclosed small fee) in November, and to MSDN subscribers in December. I wonder if this means that PDC-attending MSDN subscribers will see two different builds of the beta. That seems like pretty quick turn-around for creating distributions, but it would be great - give me early bits, and keep the updates coming! It's great that as a developer I get to see what I'll be writing software for soon (very soon for me), but not if what I get changes in major ways before release, and I never see the updates that are happening. I wonder if the delay from public to MSDN is so that prolific copying by subscribers does not remove the need for the public to register and pay a small fee?
08:14:00 October 24, 2003, Friday (PDT) Source: Philip Rieck
PDC ... so much to do, and so little time - go faster, time!
The human aggregator, says this: Sorry I'm a little light on the blogging. Got tons going on preparing for the PDC. I have nothing to do with the PDC, other than attending -- and I have lots to do. I can't imagine having to prepare for a 7000 attendee conference, and blog 20-30 posts per night. Wow. Sometimes I don't think I have enough time to prepare properly, but I still want the week to zoom by faster than it is. What could an attendee possibly have to do, you ask? Well, when you're paying for the PDC from your own pocket (and my wife is happy about it), you want to get as much as possible out of it.... so I want to: Memorize all WS-* specs. Okay, maybe not memorize, but know really, really well. Clear up lots of space on my laptop for cool bits. I'll probably repave and make sure to install VirtualPC Research what's been leaked or said about Yukon. I'm stoked. Prepare the TabletPC. I have an Acer TM C110, so my main concern is the external DVD drive (it has no internal ...
14:30:00 October 22, 2003, Wednesday (PDT) Source: Philip Rieck
Why you MUST use Option Explicit... er, Strict
I'm not all that against VB.NET, but I'll be honest -- I normally cringe when going to a client site that uses it exclusively. The reasons are many and varied, but most of the time my fears are groundless... But one thing that gives me night terrors is seeing VB.NET projects with Option Strict not turned on. Back in the days of VB6, those people wishing to write second-rate and error-prone code had the nifty switch called “Option Explicit” - To simplify it, we'll say it's a compiler switch that said “Error the compile if variables aren't explicitly declared before use”. It stopped you from saying Dim Abcde as Integer on one line, and DoSomething(Abce) on another. I can't tell you the number of times I'd get handed code, turn Option Explicit on in a file and immediately have the build break. Yikes! Never once was there an acceptable reason to do this. (One person did start in on performance nit-picks - don't let me get started). The best part was that the great (no sarcasm, VB6 was, ...
15:07:00 October 21, 2003, Tuesday (PDT) Source: Philip Rieck
Your baby is ugly
One of the hardest things about being a contractor is working with smart developers who have transitioned to a new technology and don't understand it. Many of them (not the best ones) think that they are doing great with the approaches and code they have. Lord forbid you tell them otherwise. A few contracts ago I ran into this in a major way. The lead developer was in way over his head but couldn't be given any advice at all -- if you softened it up, he ignored it. If you pushed it, he pushed back... if you argued it he let you go (and did, to three contractors who agreed that changes should be made). Sure, we've all done the thing where you give it to them as their idea, but sometimes nothing seems to work. My consulting company is owned by a great woman with lots of tech industry savvy. Just lately she gave me the phrase for it: "You can't tell someone their baby is ugly, no matter how you disguise the statement". And it can be very true. No matter how many people laugh at the ...
15:23:00 October 20, 2003, Monday (PDT) Source: Philip Rieck
VB.net operator overloading, static methods
Came across this this evening: A brief description of the Operator Overloading feature.[Cameron's Visual Basic Blog] And liked what I read. VB.NET gets what it's needed from day one (if you ask me); the ability to consume overloaded operators.. Being able to create operator overloads is a great bonus. Not that ClassName.op_Addition(left, right) is so bad to type, but... it's ugly. While we're on it, it really exposes one of the things I hate (perhaps irrationaly) about VB.net - using static methods from an instance variable. I'm sure that this is one of those things that now can never change (“it would break code“, they say), but I certainly consider it a mistake. What does this mean: .csharpcode { font-size: 10pt; color: black; font-family: Courier New , Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0px; } .kwrd { color: #0000ff; } Dim inst As Foo = New Foo inst.prop = 1 inst.SMethod() inst = Nothing Foo.SMethod() inst.SMethod() ...
15:07:00 October 20, 2003, Monday (PDT) Source: Philip Rieck
Considering Exceptions Harmful Considered Harmful
Joel Spolsky is a man whom I have come to respect because of his writing. I still do, and it will take more than one posting by him that I disagree with to change that. But boy, do I disagree with his disagreement with exceptions. So do others (like Jesse Ezel in this post, Dare Obasanjo in this post, and with more brevity, Andy Smith with this post). So let me put in my two cents. Let's say I have a function f(x), defined as 1/x. If I want to evaluate this over some domain, I may say y= f(x). Here's our basic function.... similar, you may say to a function in code: (lets stick to ints for input) ouble f(int x){ return 1D/x; }Great. Now what happens when I pass in 0? Without exceptions, I have two choices. Return a "guard" value, like 1.7x10308 that means "Error", and check for that each time I call f(x). Change f(x) to int f(int x, out y) { if(x == 0) return 1; y = 1D / x; return 0; } The problems with the first approach are many, so let's list a few: For each type of error I ...
13:39:00 October 14, 2003, Tuesday (PDT) Source: Philip Rieck
Help the world one developer at a time
[update - 2] : Dave has decided that he can not handle the guilt of taking people's money to go to the PDC - he'll be there some other way.. He's refunded to those that donated.. Guess Roy Osherove was right (and those that commented there). Dave Bettin, one of the best developers I've ever worked with really wants to go to the PDC - he's asking for some help. Dave worked on my team when he moved from Java to .net full-time, and I was amazed to see an "anti-M$" guy turned to "Hey, Microsoft has it right!"
08:13:00 September 26, 2003, Friday (PDT) Source: Philip Rieck
.net language preferences
No, I won't be stating my preference or starting a holy war, but I do want to share some observations. Okay, so again with the technical interviews. This time, a question that I always ask i (because client sites always ask it), “What is your preferred language to do .net development with, and what languages are you comfortable with”. The answers can be broken down as such (note that I'll put my opinions on why after): “I preferr VB.net, and I have seen / I have done c#. It doesn't matter, since all .net languages do the same things” 6 of the 7 times this answer was given, the developer was a VB6 or ASP convert (recent) that didn't know anything of c# (had never really used it, but had seen examples). The 7th, the candidate did not know c# at all, but was coming from Access (VBA) development “I prefer C#, and I can do VB.NET but I don't like to“. 3 of the 5 times this was given, the developer was strong in .net and knew both languages. The 4th candidate was a recent java convert ...
09:09:00 September 6, 2003, Saturday (PDT) Source: Philip Rieck