Rocky Lhota at CNUG#

I was able to get to the CNUG meeting where Rocky Lhotka was the feature speaker.

I had a chance to ask Rocky a couple of questions that had been bugging me about CSLA.

1)  He agreed that using the method of multiple result sets in datareader is not really a good idea in some instances, where a dataset would be much more useful.

2)  He suggested that you should usually not have an object that is sometimes a child and sometimes a parent.  I am not sure I agree with idea.  I believe I understand his point that if you are dealing with a Project object that has a collection of Employees assigned to it, you probably don't need the Employees to be as complex as if you were dealing with an Employee who is assigned to a bunch of Projects, but at the same time you are talking about writing 2 classes with 2 sets of data access scripts, vs 4 classes and 4 sets of data access.  But, he said that there are techniques for making a business object be both a parent and a child.  This is apparently detailed in Ch 7. 

Rocky suggested the book Object Thinking by Dave West

3) He mentioned that people have built UI Frameworks that run on top of CSLA.  I will have to look into this.

4) He was showing an example using an ASP.NET MultiView control, looked like a great way to enable multiple views of the same data.

5) I didn't get a chance to ask him about serialization and deserialization of classes that have small differences.  For example if you serialze an object and use the same byte array to deserialize a similar class, will it blow up if small changes are made, like you add a public property?  I will have to try this out myself.

In all, Rocky was a very good speaker.  Very engaging, funny, and on point. 

Oh and I won the raffle at the end, to get a copy of his book, the one I just paid 60 bucks for :-).

Categories: Programming | .Net | Architecture
Saturday, April 22, 2006 5:27:52 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Cool Icons#

A friend of mine has been using Plesk to automate some hosting settings.

I was taking a look at it and thought they had a lot of cool looking icons.

Not that anyone would want to download icons from a website and use them... :-)

Categories: Programming
Saturday, April 22, 2006 4:57:32 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Moving a Network#

This weekend I helped a client of mine move their computer system to a new factility.  In the new location I racked up and configured an HP Procurve switch, and 2 Cisco APs.

All in all the move went well.  I had some problems getting into the Procurve at first.  I think the problem was a bad serial cable, but in the end I got it working right.

We didn't quite have enough ports on Procurve, so I uplinked a couple of their old switches until I could procure some more modules for the HP.

The Cisco 1100 APs had great range.  I was able to blanket the entire facility with WIFI access.  Pretty nice!

Categories: Hardware | Networking | Firewall | Security
Saturday, April 22, 2006 4:55:42 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Fixing Left Column Problem With dasBlog Essence Theme#

I got a response back from Jelle Druyts regarding the problem where the left column falls off the page if you narrow the window enough.

He was kind enough to respond with his CSS changes:

/*----- Content Styles -----*/

#content {
        margin-top: 10px;
        position: relative;
        top: 0px;
}

#bodyContainer {
        margin-left: 220px;
}

/* Exceptions for Print */
@media print {
        #bodyContainer {
                width: 100%;
                margin-left: 0px;
        }
}

(...A little later...)

pre {
        overflow-x: scroll;
}

(...A little later...)

#metaContainer {
        border: 1px dashed #d0d0d0;
        background-color: #f0f0f0;
        color: #505050;
        font-size: smaller;
        width: 210px;
        position: absolute;
        top: 0px;
}

Once you apply these to the dasBlog.css file in the Essence theme package, the left column will remain in place!  Excellent!

Categories: Blogging | dasBlog | HTML
Saturday, April 22, 2006 4:28:59 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Delete the Web Apps DLLs and Everything Works#

Here is another of my favorite problems with VS2005.

If I have a Web Application Project.  If I build it (with no errors) then when I try to view it I get the error below.  However,

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The type 'Company.Web.Equipment.Global' is ambiguous: it could come from assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\equipment\3f386648\c5a85b94\App_Code.gv_z5p7w.DLL' or from assembly 'C:\Data\Company\Company.Web.Equipment\bin\Company.Web.Equipment.DLL'. Please specify the assembly explicitly in the type name.

Source Error:

Line 1:  <%@ Application Inherits="Company.Web.Equipment.Global" Language="VB" %>

Source File: /Equipment/global.asax    Line: 1


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

 

I don't know why it is only happening with this one web app.

Very frustrating.

Update: This has been resolved.  The problem is obvious now.  This was a web application that had been converted to a Web Site Project.  When I tried to reimport the files manually into a new Web Application Project there was one minor, yet major, difference that was causing it to fail.  The "CodeBehind" attribute had been changed to "CodeFile".  I didn't think much of it at the time, but of course this indicates that it is going to actually USE the codefile when the page is accessed.  By having a CodeFile attribute AND compiling the code into a DLL, I was ending up with copies of every class.

Categories: Programming | .Net | ASP.Net | VS.Net | Rants
Thursday, April 20, 2006 5:00:08 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Upgrading ASP.NET to 2005? Check your references.#

Some of my web applications that I have recently upgraded to 2005 at some point had their references changed to point to the DLLs that were already in the bin directory.

Of course this was causing all kinds of problems with missing DLLs and compile problems.

Make sure you check your references to see that they are not just pointed back into the bin.

 

Categories: Programming | ASP.Net | VS.Net
Thursday, April 20, 2006 4:32:51 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

App.Config functionality for Class Library Assembiles#

I was just reading this site:

http://www.bearcanyon.com/dotnet/#AssemblySettings

I downloaded the sample code (link below).  It is supposed to allow you to have a config file per assembley e.g. MyAssembly.dll.config. 

I haven't looked at the code, but I guess you would just write something that uses reflection to find the assembly name, and then look for an xml file to read.

AssemblySettings.zip (10.5 KB)

 

Categories: Programming | .Net | .Net Framework | Tools
Thursday, April 20, 2006 2:25:32 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Sending Datasets and Objects Over the Wire: Serialization and XML#

I have tried to councel against sending datasets across web service calls, but we have a lot of instances where this is being done.

One of the problems with this is that datasets get bloated when converted to XML.

So I set out to compare the sizes of:

  1. Serialized List(Of MyType)
  2. Serialized DataTable
  3. Serialized DataSet
  4. XML Serialized Dataset

I wish I had done some research on this, because I would have quickly been reminded that DataSets always serialize as XML, even if you are using the BinaryFormatter. 

There are lots of people out there coming up with their own ideas for how to improve the serialization of datasets:

Anyway, this isn't really THAT big of a deal, because my real goal wasn't to improve the dataset serialization, but to simply see what it would be, and compare it to some other ways to serialize data, like in a list of business objects or a datatable.

The results are interesting:

Given a list of 1013 Business Objects (Records) the serialization results are as follows:

Method Size (bytes)
List(Of MyType) 290,321
DataTable 819,575
DataSet 693,088
XML Serialzied Dataset 851,614

I have read that you can really decrease the size of the dataset by writing your own logic to do the serialization, but as everyone points out that is kind of a pain.


Categories: Interesting | Programming | .Net | ASP.Net | WebServices | XML
Thursday, April 20, 2006 1:44:19 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Byte Array To String#
Here is a very simple code snippet for converting a Byte Array to a String in VB.Net

Encoding.ASCII.GetString(bytes)



And here is a function for that uses it to convert a byte array to a string

    
Private Function streamToString(ByVal stream As System.IO.MemoryStream) As String
Dim o As New IO.StreamWriter(stream, System.Text.Encoding.Default)
Dim bytes(stream.Length - 1) As Byte
stream.Read(bytes, 0, stream.Length - 1)
Return Encoding.ASCII.GetString(bytes)
End Function

Categories: Programming | .Net | VB.Net | References
Thursday, April 20, 2006 9:58:39 AM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Implementing System.ICloneable and a Snippet#
This will provide the necessary functions to implement ICloneable as well as a type specific Clone method.
        
Public Function Clone() As ClassName
Dim bFormatter As New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Dim stream As New System.IO.MemoryStream()
bFormatter.Serialize(stream, Me)
stream.Seek(0, System.IO.SeekOrigin.Begin)
Dim newClone As ClassName
newClone = CType(bFormatter.Deserialize(stream), ClassName)
Return newClone
End Function
Private Function ICloneableImplementation() As Object Implements System.ICloneable.Clone
Return Me.Clone
End Function


I wrapped this into a snippet that you can import into Visual Studio 2005.

Implement ICloneable.snippet (1.84 KB)


Categories: Programming | .Net | VB.Net | VS.Net | Tools
Thursday, April 20, 2006 9:00:40 AM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

VS2005: C# Projects Get Reference Folder VB Doesn't#

In VS.Net 2003 projects had a little sub folder looking icon called References that you could quickly expance to see what assemblies are being referenced. 

In 2005, you have to open a projects page and navigate to the references tab, but only for VB.Net projects.  C# projects still get the nice shortcut.  Weird.

Categories: Programming | .Net | C# | VB.Net | VS.Net
Wednesday, April 19, 2006 3:51:13 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

VS.Net 2005 Uses Wrong DLL For Reference#

I just came across another bug in VS.Net 2005.

When I went to upgrade some of my projects from 2003 to 2005 I copied them to a new folder.  So for the sake of simplicity lets say that my projects were in C:\Projects\ and the 2005 versions are in C:\Projects2005\.

Some of the projects had a reference to a DLL located in C:\Projects\MyDLL, so when you run the upgrade wizard, it adds C:\Projects\MyDLL as a reference path for your new project located in C:\Projects2005.

Now here is what ticked me off.

I had already taken the code from MyDLL and upgraded it to 2005, built the DLL, and put the DLL in C:\Projects2005\MyDLL.

So if you convert a project, it doesn't know about that new 2005 version of MyDLL, so I was nice enough to go in, remove the 2003 reference, and repoint it to the 2005 version.

However, at this point it says "Oh I see you want me to use this DLL, but it looks like there is one with the same (whatever criteria it uses, maybe just the name?) in my reference path (C:\Projects\MyDLL), so I'll just throw out whatever you were asking me to do and reference that one" which is EXACTLY what I didn't want it to do.

Categories: Programming | .Net | VS.Net
Wednesday, April 19, 2006 3:41:09 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

VS 2005: Remove Project=Lose Reference #

I had been really bugged by the way VS.Net 2005 seemed to treate project references.

As I mentioned in a previous post, if you remove a project from a solution, all references to that project are also removed from their respective project.

The result is that lots of project suddenly lose reference to a needed dll or project, and you have to go back and manually add the reference back in.  Big pain.

Thankfully, Mikhail Arkhipov from Microsoft has reassured me that 1) I am not going crazy, 2) this is not by design as in fact a bug, and 3) it will be fixed in a (hopefully soon to be released) service pack. 

Strike 1 issue with VS.Net 2005.  Only like 10 more to go.

Categories: Programming | .Net | VS.Net
Wednesday, April 19, 2006 3:16:03 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

SEO#

Search engine optmization is the efforts to increase a website's ranking in the various search engines.

One site that I have been using, mostly for fun, is http://www.googlerankings.com which, unlike other sites that just tell you the page rank of your site, will allow you to provide a search term, and it will try to find your site on the google, msn, and yahoo. 

You just need to provide your Google API key:

Of course, finding that your site is number 836 for some search doesn't really help you in any meaningful way, other than to know that no one is ever going to find your site through that search engine.

I was trying to see who my site is listed number 2 at MSN for "Chris May" but not even in the top 1000 at google or yahoo.  

Categories: Networking | SEO
Wednesday, April 19, 2006 8:24:15 AM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Which Is Worse#

Which is worse?

The fact that I spend so much time working at Borders, that when they hire a new barista I notice, or the fact that I spend so much time working at Borders that the new barista notices that I used to have a beard.

Categories: Thoughts
Wednesday, April 19, 2006 7:44:31 AM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Ticketmaster Sucks!!!#

OMG TicketMaster Sucks!!!

I just went to buy some tickets for The Secret Machines, and the tickets were 15 bucks each. 

I picked the FREE delivery option, and my order came to $72.30.  WHAT???  3 tickts @ $15 << $72.30.

So for a 15 dollar ticket, they add on a "facility charge" of another buck, then there is the "Convenience Charge" WTF is that BS?  Tax is only 1.50 but then they throw on a "Order Processing Fee" charge of 4.80?? What the hell is the difference between their Order processing fee, and their Convenience charge?  This is totally gay.

In the end my "tickets" cost 60% more than the cost of the "tickets"!!

Ticketmaster really sucks ass.  I hate them with a passion.

And how come I keep signing up to be notified when some bands go on tour and they never email me, those ass hats.

Item Charge
 
Full Price Tickets US $15.00 x 3
Facility Charge US $1.00 x 3
Convenience Charge US $6.25 x 3

Additional Taxes US $0.75
   
Delivery (Standard Mail) No Charge
Order Processing Fee US $4.80
Additional Taxes US $0.75
   
Total Charges US $72.30

Categories: Rants
Tuesday, April 18, 2006 2:59:14 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Upgrading to 2005 Continuing To Be A Pain#

I decided to go with Scott Gu's suggestion to use Web Application Projects to help ease the conversion for 2003.

I will agree that this is a much better way to convert your project than to turn it into a Web Site Project, but there are still lingering problems.

In one of my projects the web page and code behind have somehow become lost.  The code behind pages can't see their controls, which are placed in some mystery file thanks to the new Partial Class feature.

I tried ranaming the files, I tried cutting and then replacing the HTML that defines the controls, the only thing I found that works is to totally delete the file and recreate it exactly the same way.  What a pain.

The "What a pain" concept is the only constant in this process.

I am still not sure what is going on with project references. 

As far as I see, if there is a DLL in the bin directory, you don't need a reference to that DLL.  But as soon as you clean out your bin, your project will break with error messages that are nothing like "Are you missing a reference?" because, of course you are, VS.Net just removes them all the time w/o asking you! 

There must be some new paradigm with how you are supposed to work with references, projects, and solutions, because trying to do it like you would in vs.net 2003 is causing a ton of problems.

Update: Almost as if VS was getting back at me, as soon as I posted this it took a crap and crashed.  :-)

Categories: Programming | .Net | ASP.Net | Rants
Monday, April 17, 2006 6:16:34 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

University of Chicago First Grades#

I just got my first set of grades from University of Chicago.  I got an A in OO Architecture and Design Patterns, and a B in Software Construction.

I think I couldn't have done any better than a B in Software Construction.  The work was very challenging, in a good way, but the time requirement was so great that week after week I wasn't able to complete the weeks assignment, or if I was able to complete it, my code wasn't as strong as it could have been.

I am taking this quater off to focus on work, and I am not sure if I will be taking anything in the summer as they usually do the really basic classes then.  We will see. 

I probably still need to take some kind of discrete math class, but I don't want to pay the $3600 bucks to take it at UofC if I can take it elsewhere for less.

Categories: University of Chicago
Sunday, April 16, 2006 10:25:35 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Bret Martin and Katie Kniss Are Getting Married#

Bret Martin and Katie Kniss

Bret Martin and Katie Kniss are getting married

I am going to see if I can get a googlewhack on Bret Martin and Katie Kniss, linking to this page.  Technically a googlewhack is 2 words that are in the dictionary, but I am expanding on this to include names.

Putting their names in some H1 and H2 tags at the top here should help with the Googlebot.

Bret Martin and Katie Kniss are getting married.


Actually, Katie is probably getting the raw end of this deal, she is going to have to put up with Bret for years to come. 

Same goes for Kathleen.  Sometimes I wonder if knew what she was getting herself into.  :-)

The wedding is this summer in St. Louis, and I hear they are spending their honeymoon in Peoria.  Well not just Peoria... East Peoria. 


Update: Well I got my home page number 1 on the major 3 search engines:
Google
Yahoo
MSN

But they are only indexing my homepage right now, not the actual article link (Bret Martin and Katie Kniss).

Categories: Funny Stuff | Misc | Thoughts
Sunday, April 16, 2006 12:54:14 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

Citrix Alternatives?#

Slashdot is running an Ask /. article on alternatives to Citrix.

At Walsh, we run a lot of applications over Citrix, mostly apps that really aren't meant to be run remotely, to allow remote users to run them against databases that are stored in our main offices.

MSi is interested in a solution such as this as well but for more daily operations than specific application access.

Categories: Servers | Networking | Software | Windows
Saturday, April 15, 2006 11:20:02 PM (Central Daylight Time, UTC-05:00) #    Comments [0]  | 

 

All content © 2010, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<April 2006>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 2.3.9074.18820

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: