28. November 2005 19:47
Do not build with Cade Homes of Milwaukee!
Once upon a time I decided to build a house. It hasn't been going well, and my builder could care less if they finish my house or if I drop dead tomorrow. In my industry time and cost overruns happen often, however most Consulting firms suffer from this crazy idea that even when things go wrong and we make mistakes the customer should get good value from us and ultimately be happy not only with the end result of our work but the experience of working with us as well. Maybe it has something to do with Milwaukee being a small town and people talking to each other...
In the case of my builder they can treat me however they want and still get their money, and they are obviously unconcerned with what unhappy customers say. The only recourse I have is to encourage everyone who will listen to avoid building with this company. Based on the rule that "each person tells 10 other people" perhaps some day they will track lagging sales back to that one customer that they made feel unimportant and crazy every chance they got. Its far more likely that word will get around "Wow that Damon guy holdes grudges I guess" and for that reason I typically keep personal stuff off of this blog.
This post will remain until I get some incredibly intresting (ergo, don't hold your breath) piece of tech to post about. If you are in the area and considering building a house, I'd be happy to send you copies of my two complaint letters to the Metro Milwaukee Builder's Association nicely summarzing Cade's apathy towards their customers.
26. November 2005 03:42
ObjectDataSource, I hardly knew ye.
Once I did get to know you, I didn't like you. You see, when I saw the ObjectDataSource demos I thought "Finally, Microsoft understands me". I did a couple of quick tests of the designer support and functionality and was pleased with the results. Tonight I created a "service agent", a class to wrap access to an out of process call, in this case playing around with the Amazon.com affiliate program again. For operations that require input parameters to the ODS you can often just tie the parameters to a control on your page using markup and with one line of code:
protected void searchBtn_Click(object sender, EventArgs e)
gets the results out of the service agent class. The ODS pulls the parameters our of the configued form fields and away we go.
Then I realized I am still a misunderstood objects maniac lost in a world of DataSet coding. Once my List<CustomType> is read from my middle tier object it no longer exists. Anywhere. I had deluded myself into thinking that things like "SelectedRow" in a GridView would give me something I could cast to my CustomType, that various GridViewEventArg/ObjectDataSourceEventArg.DataItem would give me something I could cast back to my custom type. Maybe GridView.SelectedRow would contain a set of values I could use to rebuild my entire object...
No, no, no. I will say for some types of things the ODS is still useful. As long as you don't mind looking up your objects using a DataKey and/or your model fits in with this a little bit better than mine does I would still prefer this over an SqlDataSource So unless I find some obscure method that is not presenting itself right now I am back to programming the same way I did in ASP 1.1: Get ArrayList of Objects, put in session to refer to them later, configure <Columns> in Grid control, DataSource, DataBind, etc.
21. November 2005 04:16
No, that's not a typo.
I have long been enamoured of the Amazon.com WebService API and have recently began actually using them in a semi productive fashion. In the web service developer's newsletter I see this in tonight's release:
"When we think of interfaces between human beings and computers, we usually assume that the human being is the one requesting that a task be completed, and the computer is completing the task and providing the results. What if this process were reversed and a computer program could ask a human being to perform a task and return the results? What if it could coordinate many human beings to perform a task?
Amazon Mechanical Turk provides a web services API for computers to integrate Artificial Artificial Intelligence directly into their processing by making requests of humans. Developers use the Amazon Mechanical Turk web services API to submit tasks to the Amazon Mechanical Turk web site, approve completed tasks, and incorporate the answers into their software applications. To the application, the transaction looks very much like any remote procedure call - the application sends the request, and the service returns the results. In reality, a network of humans fuels this Artificial Artificial Intelligence by coming to the web site, searching for and completing tasks, and receiving payment for their work."
You can read more about it here: http://www.amazon.com/gp/browse.html/ref=aws_gen_nl13amt/104-4070773-8438325?node=15879911
I find this interesting in light of all the captcha and captcha breaking and ideas for better captcha going on. It seems necessary for irony's sake to now implemented an automated system that can respond to these requests and get it right...
15. November 2005 18:03
During the visual studio 2005 beta I did some testing with CF v2 and was very excited by the results. The tests were done on one of my CE.net 4.2 devices. I was told by numerous Microsoft people that when the final version came out it would require CE 5 to run, which is a serious kick in the junk. There are some very serious issues with the CF version 1, most notably working with SQLCE 2.0. By forcing the CE 5 issue, any future hope for people who don't have the ability to upgrade to CE 5 is crushed. Did I say it was a hard kick in the throat? Just to tease me, creating a Smart Device CAB project in VS 2005 shows "OSMin" as 4.00, this is clearly just thrown in to confuse and annoy since OSMin is really 5.0.
On well known compact framework usenet guy Daniel Moth's blog (link is not working for me) he states that there is a chance that a service pack for the Compact Framework v2 will include "runtime only" support for ce.net 4.2; I would assume this will allow SQL Mobile to run as well. I would encourage you to go to http://lab.msdn.microsoft.com/productfeedback/ and do a search for compact framework 2 on CE.net 4.2 and vote for it.
14. November 2005 21:03
I did a brown bag demo of some VS 2005 stuff today and found that a construct I use a lot : try/catch/finally is not in the standard code snippets so I set about creating it. I was somewhat disappointed not to be able to find an interface within visual studio to do this, so I found the code snippet files and copied one of them. I created a snippet as follows:
<?xml version="1.0" encoding="utf-8" ?>
<Description>Code snippet for try-catch-finally</Description>
and saved it in a file called trycf.snippet. It's fairly easy to follow what to do, if you want to be able to tab among items you create a <Declaration> and then refer to it by its Id tag ala : $mystuff$. There is a built in $selected$ Declaration in case you use ctrl+k,s to "surround with"
I thought I might make several of these so I made a folder c:\Projects\code snippets and went to Tools-->Code Snippets Manager to tell visual studio about my new snippet. Clicking on "Add" let me browse and find my custom directory, however the behavior in the IDE then changes to the following:
... and I didn't like this, I want to avoid extra keystrokes although I suppose categories might be useful for some people. I'm trying to use snippets to stave off carpal tunnel here people. You can highlight the Visual C# category and chose "import" though and it appears in line with the other snippets.
9. November 2005 15:08
At the Wisconsin .NET user's group's Visual Studio/SQL Server 2005 launch even last night I won full copies of Visual Studio 2005 and SQL Server 2005. Of course I already have these through MSDN and the copies are marked "Not for Resale". They're valuable so I don't want to just give them away. I did note that they are not marked "Do not trade this for an XBox or Beer"...
4. November 2005 20:25
I had a small master page issue which I fixed quickly but which made me want to complain.
One of the great things about .NET is the great design time experience. Dropping designer support for nested master pages irked me, and there are some other quirks as well. In one case, I have a page using <div> and the "float" style attributes for layout. As soon as the divs are nested three deep or so the content no longer renders in the designer. It seems to be specifically related to the style as I will explain along with the next issue.
In my master page for the site I import a style sheet like so:
<style type="text/css">@import url(kcstyle.css);</style>
Obviously this is a relative path. If you create sub-directories beneath your site obviously this won't work so I changed to an absolute path like so:
<style type="text/css">@import url(/KlipschCorner/kcstyle.css);</style>
When the content renders in the designer now it does not show my styles for any pages regardless of directory. When I run the site however all pages look great regardless of directory. Now that the designer can't find the stylesheet, the content which did not render inside my <div> tags before is now visible in the designer. I would assume the designer is in some way using an IE component to render behind the scenes but this might not be the case. The answer seems likely to be the fact that the "ASP.net Development server" is not behaving in the same way that running the site via IIS would. The inconvienient part is that if you are using newer standards like <div style="float:left;"> for your layout, the designer view looks nothing like the fully rendered view.
Compare this view without style:
To this one when the site is actually ran:
The only difference is the stylesheet. Maybe I'm complaining about something petty here, but it seems that this type of thing is going to annoy a lot of people. Isn't part of the point of the designer that you don't have to run it to see what it looks like?
3. November 2005 16:15
I had some odd issues with SQL 2005 last night. It seems that the surface area configuration tool and the SQL 2005 Native Client bear some investigation. I was building connection strings just like I would for SQL 2000 and getting a "No process is on the other end of the pipe" error. At http://msdn2.microsoft.com/en-us/library/ms175496.aspx
there is some discussion of the issue but none of the fixes worked, I actually had to turn off the shared memory connection to get it to work. I'm sure there's an explanation for this but I'm not interested in learning the gory details of SQL 2005 yet, I just wanted to get working on my application again.