Category Archives: Tip of the Day

Simple posts that offer a titbit of information about various aspects of software development.

Tip of the day #22: Obtaining all subdirectories recursively

This is an example of how to obtain a list of all subdirectories using a recursive method with the .NET Framework. public static List<DirectoryInfo> GetSubdirectories(DirectoryInfo directory) { // Set up the result of the method.List<DirectoryInfo> result = new List<DirectoryInfo>(); // … Continue reading

Posted in Tip of the Day | Tagged , | Leave a comment

Tip of the Day #21: Prefer the use of first-child CSS selector over last-child

I just got this fantastic tip from Jamie Boyd , a colleague of mine: The :first-child and :last-child selectors are super-useful for applying alternate styling to items in lists and things like that (e.g. removing the margin from the last … Continue reading

Posted in Tip of the Day | Leave a comment

Tip of the day #20: Don’t spam your own email while developing apps that send email

When we develop applications, often there will be a requirement for that application to send out emails. While this is going on we usually end up with lots of emails being sent to our own email address for test purposes. … Continue reading

Posted in Tip of the Day | Tagged , | Leave a comment

Tip of the Day #19: Create a list of objects instead of many lists of values

I?ve been reviewing some code and I came across something that jars. What is wrong with this is many-fold. Essentially, instead of encapsulating an related data into an entity that describes the whole the developer had created silos of data … Continue reading

Posted in Tip of the Day | Tagged , , , | Leave a comment

Tip of the Day #18: Dealing with data rounding issues

If you have data coming in from a database, web service or other source external to your application and it contains, say for example, price information then do not round it. Don?t attempt to apply any form of formatting to … Continue reading

Posted in Tip of the Day | Tagged , | Leave a comment

Tip of the Day #18: Storing User Input in XML

If you are going to dump user generate input into XML please remember to escape appropriately. For example, the ampersand symbol has special meaning in XML and you must escape it. e.g. & becomes &amp;

Posted in Tip of the Day | Tagged | 1 Comment

Tip of the day #10 (XP Pro IIS Admin)

If you are in the same situation as me where you have to develop web applications on Windows XP and have many projects on the go and for what ever reason cannot just stick each into its own virtual directory … Continue reading

Posted in Tip of the Day | Tagged , | Leave a comment

Tip of the Day #9 (The Project Location Is Not Trusted)

This tip is to get a tool called ZoneStripper by James Kovaks to stop the annoying “project location not trusted” dialog box, below, appearing when you open downloaded solutions in Visual Studio. If you download zipped source code from the … Continue reading

Posted in Tip of the Day | Tagged , , | 7 Comments

Tip of the Day #5 (SQL Server memory usage)

You can limit the amount of memory that SQL Server uses by using the sp_configure stored procedure. By limiting the amount of memory that SQL Server is permitted to use it means that more memory is available to other applications … Continue reading

Posted in Tip of the Day | Tagged | 4 Comments

How to get a list of all subdirectories

This is an example of how to obtain a list of all subdirectories using a recursive method with the .NET Framework. public static List GetSubdirectories(DirectoryInfo directory) { // Set up the result of the method. List<DirectoryInfo> result = new List<DirectoryInfo>(); … Continue reading

Posted in Software Development, Tip of the Day | Tagged , | Leave a comment