Author: Soul Solutions Created: Sunday, 6 August 2006
Tips and Tricks as we come across them

BronwenWeeGo.jpgWell i got my new 9400 Dell lappy. Only problem is, johnWeeGo.jpg has the 9300, which from the outside looks pretty much identical, and we both have tech ed backpacks so the chances of us taking the wrong lappy is kinda high.

So how did we solve this you might ask....with stickers of course

 

the2dells_little.jpg

BronwenWeeGo.jpg


Implement .NET Framework interfaces to cause components to comply with standard contracts. (Refer System namespace)
• IComparable interface, IComparable Generic
- V2 
• IDisposable interface
- version breaking change to add this to a class
• IConvertible interface - converts objects to value type
• ICloneable interface
• IEquatable<T> interface
- V2 Generalised compare different objects
• IFormattable interface - cultural ToString()



Improve type safety and application performance in a .NET Framework application by using generic collections. (Refer System.Collections.Generic namespace) all V2 classes pretty much impmented as generic versions of the 1.1 classes.  Faster because there is no boxing/unboxing• Collection.Generic interfaces • Generic Dictionary • Generic Comparer class and Generic • Generic KeyValuePair structure • Generic List class, Generic List.Enumerator structure, and Generic SortedList class - Sorted List uses less membery than sorted Dictionary, SortedDictionary has faster insert and delete on unsorted data.  Sorted List populated all at once is faster than dictionary.• Generic Queue • Generic SortedDictionary class • Generic LinkedList • Generic Stack class and Generic Stack.Enumerator

 

...

Read More »



Manage a group of associated data in a .NET Framework application by using collections. (Refer System.Collections namespace) • ArrayList class - implements IList• Collection interfaces   ICollection - defines size, enumerators, and syncronisation of collections  IComparer - used with Array.Sort and Array.BinarySearch.  Allows customisation of sort order of a collection    IEnumerable - exposes enumerator, for simple iteration over collection  IHashCodeProvider (obsolete)  IEqualityComparer - V2 - customised equality comparison for collections• Iterators     IEnumerator - simple iteration over collection• Hashtable class • CollectionBase class and ReadOnlyCollectionBase class • DictionaryBase class and DictionaryEntry class • Comparer class • Queue class • SortedList class • BitArray class • Stack class  

...

Read More »



Manage data in a .NET Framework application by using .NET Framework 2.0 system types. (Refer System namespace) • Value  • 2 categories - structs - enumsDerived from System.ValueType.  Cannot contain null. Implicit default constructor that intialises default value. Assigning one valuetype to another copies the contained value.  Stored on stack

• Referencetypes (object, string, class, delegate, interface) Store references to the actual data.  Inherits from system.object. Stored  on heapDelegate – Function pointer.

• Attributes

Associate declarative info with code.  Can be queried at runtime by Reflection.CLR attributes e.g. [System.Serializable]common ones.. - conditional e.g. [Conditional(“DEBUG”)]- obsolete e.g. [System.Obsolete("use class B")]- global e.g. [assembly: AssemblyCompany("Soul Solutions")]- attribute usage e.g. [System.AttributeUsage(System.AttributeTargets.All)]Custom Attributes – create a class : System.Attribute.  Give attributes [System.AttributeUsage(System.AttributeTargets.Class |                       System.AttributeTargets.Struct, AllowMultiple = true)  // multiuse attribute]

• Generic types Increase code reuse and type safetySystem.Collections.Generic , System.Colections.ObjectModel Collections e.g. Dictionary, List, queue, stack – Faster as they prevent boxing/unboxingNullable – allows value type as if they could store nullConstraints:Where T: struct, class – must be a value / ref typewhere T: new() – must have public parameter constructorwhere t: base – must derive from…where t: interface – must implement interfacewhere t: U –...

Read More »

BronwenWeeGo.jpgI now face the problem of contact on 4 different instant messenger clients....MSN Messenger, Google Talk, Skype and now ICQ (for my new job).  I started looking at Meebo which allows me to log into 3 of the 4 at once without having to install yet another client and it's looking ok so far.  Least it means i don't have to install and run 3 separate IM clients. 

So just wondering the following:

What does everyone else use?

Anyone found one that does all 4 clients? 

BronwenWeeGo.jpgTo add an attribute by code in Infopath:

 

 
            IXMLDOMNode expressionBox= _document.DOM.selectSingleNode("//someNode");
            IXMLDOMNode disableEditing;
            node2 = _document.DOM.createAttribute("disableEditing");
            node2.text = "yes";
            addressNode.attributes.setNamedItem(node2);

johnWeeGo.jpgI installed Vista RC2 when it was first released and have been struggling with performance using a Dell 9300 with1GB RAM, 7200 HDD, 2Ghz M cpu, 6800go GPU. Today my new RAM arrived from AusPCMarket - 2 sticks of Corsair DDR2 1GB. What a difference it has made. Now can say from experince get at least 2GB RAM for Vista!

Using the built in memory gadget I was using between 56% (nothing) and 90%+ (debuging). I'm now at 27% (nothing) and 60% (debugging). Clearly my performance issues were related to running out of RAM and having to use slow disk.

As a side note the upgrade, although it has changed my system from painful to useful, had no impact on my Vista performace score for memory of 4.4.

BronwenWeeGo.jpgWe came across a problem with InfoPath 2003 the other day.  We use a lot of expression boxes to display read-only data, and happened across the fact that we can select them, type in them, and then save the data .  All very scary when it's meant to be READ ONLY!

Only thing i've found on it is this article...which pretty much says delete them and re-add them.  Did a quick test and that seems to work.  If there's an easier way to fix this (as i have at least 10 expression boxes on about 100 forms) I'd be most grateful...

BronwenWeeGo.jpg
In less than 2 weeks I start a new contract where everyone works from home.  So i've started preparing myself for it...

I've bought myself a few things...
1. Logitech 350 usb skype headset to talk to my new workmates
2. Dell 9400 lappy so i can be a bit mobile and have the processor power to run VS2005

Already have cable internet, and aircon in the room...

Put a few things in place to encourage work...
1. I've got my soul solution work shirts so i can know i'm at work and stop myself working in my pj's
2. Cleaned up the study so it's left handed friendly, have the ability to plug into the desktop screen for 2 screen work environment, and to help prevent me working in bed
3. Lined up the dog to do code reviews...well i can walk him through it and find my own mistakes
4. Will continue my "don't eat at your desk" rule

Any other words of advice?

Copyright © 2002-2009 Soul Solutions Pty Ltd. | Login