Binary Artist

The Jason Marshall Experience

Binary Artist

Jason Marshall
E-mail me Send mail

Recent comments

Authors

Disclaimer

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

© Copyright 2010

Iterate through Struct Constants using reflection

 

using System.Reflection;
 

public Hashtable searchHash = new Hashtable();
System.Reflection.FieldInfo[] fields = [myStructName].GetType().GetFields();
foreach (System.Reflection.FieldInfo field in fields)
{
searchHash.Add(field.GetValue([myStructName]).ToString(),
"|");
}


Posted by Admin on Monday, July 14, 2008 6:18 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Book Review: Domain-Driven Design: Tackling Complexity in the Heart of Software

Great book by Eric Evens discussing the domain driven approach to software design.

Finishing up this book...a book review will be comming soon...

 

"There are many things that make software development complex. But the heart of this complexity
is the essential intricacy of the problem domain itself. If you're trying to add automation to
complicated human enterprise, then your software cannot dodge this complexity—all it can do is
control it."

"The key to controlling complexity is a good domain model, a model that goes beyond a surface
vision of a domain by introducing an underlying structure, which gives the software developers the
leverage they need. A good domain model can be incredibly valuable, but it's not something that's
easy to make. Few people can do it well, and it's very hard to teach."


Tags: , ,
Categories: C# | LINQ | SQL Server | XNA | Domain Driven
Posted by Admin on Wednesday, May 14, 2008 8:00 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Who wrote this piece of code ?

Don't complain about BAD code you come across, Just fix it. Usually you are not privy to the exact situation surrounding the code you see before you.

It's easy to criticize older code someone else has written, but we have all written code that could be better. 

Ever come across a section of code, and say to your self... "Whoa! This sucks!” I wonder what the developer was thinking here.
Then you look further down and realize you wrote it 2 years ago late at night when you had the flu.
 
  

    + =

You can almost always refactor your code to make it more streamlined, readable and efficient.  But not everyone has the time, or makes time to do so.
The important message here is to "Just fix it " but be carefull there could be good reasons for the decisions made to code this solutiuon in a particular way.

More to come...


Categories: C# | LINQ | SQL Server | XNA
Posted by Admin on Tuesday, April 29, 2008 3:10 AM
Permalink | Comments (0) | Post RSSRSS comment feed
Free Hit Counters
page counter