Site: http://claudiolassala.spaces.live.com/ Link: http://claudiolassala.spaces.msn.com/feed.rss
by via Claudio Lassala in Software Development on 9/30/2009 8:28:45 PM
CORRECTION: I meant October 8th (not 9th…). :) I’m speaking at the HDNUG next Thursday, October 8 (meeting starts at 6pm). The topic is listed below. Hope to see you there! Be a Professional Developer and Write Clean Code! Poorly written code can be created quickly, but it comes at a cost of high maintenance. Most of the time, code can be improved easily by following some simple practices. Professional developers should know these practices and tools and apply it to their work every day. In ...
[ read more ]
by via Claudio Lassala in Software Development on 8/7/2009 3:47:07 PM
I’ve uploaded my material presented at the LA C# and SoCal user groups here and here, respectively. I’d like to thank everybody who showed up. There were lots of good questions and participation from attendees. I’ve had some weird things happening to my machine at the SoCal meeting. In the last several days I’ve noticed that is seems like there’s a Windows Update available almost every day. I normally apply the updates and they seem harmless. When I was shutting down my machine before heading t ...
by via Claudio Lassala in Software Development on 8/3/2009 3:14:23 PM
Tomorrow morning I’m flying out to L.A. for two presentations at user groups through INETA. I’m certainly looking forward to it. Since the two user groups are 25 miles apart from each other, we’ve figured I could present topics that compliment each other, hoping that the local folks could attend to both meetings. :) 8/4/2009, Tuesday, 6:30 pm for LA C# at Manhattan Beach library (info) Topic: Intro to Test-Driven Development Even though the name suggests that Test-Driven Development (or TDD) ...
by via Claudio Lassala in Software Development on 2/2/2009 5:02:35 PM
EPS has announced another full week of .NET for VFP developers training for March. I’ll be involved again with delivering a good chunk of training. If you’ve missed the other ones, this is your chance. :) For more information, go here. ...
by via Claudio Lassala in Software Development on 1/25/2009 2:58:01 AM
UPDATED: Fixed the broken link (sorry about that, folks!) The material can be downloaded here. The event was fun. My three sessions were well attended, everything went well, got some good questions from the attendees. I’d like to thank everybody who showed up, and everybody who’s made the event happen. I’m definitely looking forward to the next one. I also got invited to present at the Houston .NET User Group for the March meeting. I’ll post more details once I figure what topic I’m going to be ...
by via Claudio Lassala in Software Development on 1/22/2009 7:29:54 PM
I’ll be speaking at the Houston TechFest this Saturday, Jan 24. Hope to see some of you out there! Here are the topics I’ll be presenting on: Using the new Features in C# 3.0 There are a great number of new features coming with C# 3.0, such as Object Initializers, Anonymous Types, Type Inference, Extension Methods, and Lambda Expressions. This session introduces those new features, and shows how they are a great addition to the developer’s bag of tricks, by showing how they can be used totally s ...
by via Claudio Lassala in Software Development on 1/13/2009 2:46:40 PM
Say I have a generic method of some sort, and one of the things that I do inside this method is to create an instance of the generic parameter. Something like this: public class SomeUtilityClass { public void DoSomething<T>() where T : new() { T myObj = new T(); Console.WriteLine("Doing stuff with " + myObj.ToString()); } } Users of that class could only use that method if specifying a type that has a default constructor (this gets enforced by the com ...
by via Claudio Lassala in Software Development on 5/27/2008 10:24:54 PM
I've just spent about 30 minutes checking out the recently announced Microsoft Source Analysis for C#. I definitely love the idea, but I'm not sure I'll be using it just yet. Here are some of my impressions (again, I haven't spent a lot of time on it yet)... All using directives must be placed inside of the namespace Hmm, but VS itself violates that rule on every class we create...! The property must not be placed on a single line. The opening and closing curly brackets must each be placed on ...
by via Claudio Lassala in Software Development on 5/13/2008 2:38:00 PM
Here's a simple implementation of an object mapper using lambda expressions that I've shown yesterday at the Tulsa School of Dev. Say we need to copy some data from one object to another. For this example my objects are a Book and an AlternateBook. The class are shown below: public class Book { public Book() { } public Book(string title, int yearPublished) { Title = title; YearPublished = yearPublished; } public string Title { get; set; } public ...
by via Claudio Lassala in Software Development on 4/22/2008 3:52:16 PM
In my constant search for making it easier to write tests for common things in our framework, I believe I was able to clear some things up by using extension methods. Not that this hasn't been done before, it's just that I want to document how I got to it so that I can use this post to explain the approach to other people (and maybe help somebody else learning about this). :) The scenario is: we need some clean and easy way to test validity of entities after business rules have been evaluated. ...
by via Claudio Lassala in Software Development on 4/21/2008 3:49:09 PM
Last week, good pal Rod Paddock asked me an interesting question about LINQ, and I think this may be useful to others (not that the answer may not already be out there somewhere, of course...). The main scenario was that different queries had to be run depending on some options. The from and select parts of the query where pretty much the same; the parts that varied were the where and orderby ones. Here's some code to illustrate a simplified scenario: Collection<string> months = new Coll ...
by via Claudio Lassala in Software Development on 4/11/2008 6:46:43 PM
Hmm, this is something I did not know: when a testing framework's Assert method fails, an exception gets thrown. We don't actually see that exception, because the framework catches it. We usually don't see it because tests normally look like this: [Test] public void SomeTest() { Assert.IsTrue(false, "whatever"); } However, say the test was written like this: [Test] public void Test() { try { Assert.IsTrue(false, "whatever"); } catch (Exception ex) ...
by via Claudio Lassala in Software Development on 12/14/2007 5:28:32 AM
The other day I was messing with making an application be configurable to have shortcuts for specific functions. For instance, in a data-entry form that has the typical functionality such as "new", "load" (or "open"), "save", etc., which are triggered by a click on a button somewhere (right on a form or on a Toolbox or Ribbon control), the users also expect to be able to use keyboard shortcuts (such as Ctrl+N for "new" and Ctrl+S for "save&q ...
by via Claudio Lassala in Software Development on 11/15/2007 5:37:05 AM
Since I'm always getting questions about handling enums, I decided to blog about it. Back to the basics First let me cover some ground for those who are not familiar at all with enums. If you are familiar with them already, just skip this section. Say we have some code somewhere that looks like the following:Console.WriteLine(SayHello((0))); // prints out "Hello, Administrator!" Console.WriteLine(SayHello((1))); // prints out "Hello, Developer!" Console.WriteLine(SayHello(( ...
by via Claudio Lassala in Software Development on 11/5/2007 9:17:01 PM
This is something pretty cool that LINQ can be used for: querying information on Reflection data. For instance, the query below creates a list of all classes that are subclasses of the Exception class within the currently loaded assemblies. It also lists the properties declared at the subclasses level, making it easier to spot the properties that haven't been inherited from the baseclass:var exceptionClasses = from assembly in AppDomain.CurrentDomain.GetAssemblies() from type ...
by via Claudio Lassala in Software Development on 7/10/2007 7:40:10 PM
Just finished the presentation. It went pretty well, I think (or so was I told). :) The slide deck and source code can be download here. And for those of you waiting on my next posts on productivity, it is coming! I started writing my next post, but haven't finished yet. I should have it out on the next few days. ...
by via Claudio Lassala in Software Development on 6/25/2007 4:55:47 PM
I was working on fixing some custom static analysis rules here. In one of the rules I check whether a type's member have XML comments. My rule was reporting a false positive regarding lack of XML comments on the compiler-generated default constructor. Well, we shouldn't expect the compiler to also push XML comments there, right? :) I poked around to see how I could figure out whether a default constructor was a compiler-generated one, or one explicitly written by the developer. This is what the ...
by via Claudio Lassala in Software Development on 4/17/2006 5:19:36 PM
Tomorrow I'm doing a presentation at the local C# user group (at the HalPC in Houston). C# 3.0 and LINQ The next version of C# (3.0) brings many new exciting features, such as Extension Methods, Type Inference, Anonymous Types, etc. These new features are the main force behind LINQ (Language Integrated Query), but they can also be very useful on their own. In this talk we'll go through all these new features to know what they are and how they can be used, and how they ultimately bring LINQ t ...
by via Claudio Lassala in Software Development on 3/18/2006 12:01:26 AM
I've had a bunch of libraries of custom rules that we've been using with FxCop against .NET 1.x code. I've just gone through the process of recompiling those rules to work against .NET 2.0 assemblies, both using VS 2005 integration with code analysis and the external FxCop 1.35 GUI. Here are my findings on the process: I didn't have to anything on the code for the rules (seems like the introspection engine hasn't changed). In order to use the custom rules within the VS 2005 IDE, the rule asse ...
The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.