Category Archives: Development

Great Series — 31 Days of Mango

Jeff Blankenburg does it again with another great 31 day series of tutorials. This time it’s Windows Phone Mango.

snaplr

photo via Jeff Blankenburg

31 Days of Mango

31 Days of Mango in eBook Form

In the past, Jeff has done awesome work with his other 31-Day series – such as 31 Days of Silverlight and 31 Days of Windows Phone 7.  I recommend any of his 31-Day series posts as well as his blog in general. Jeff always seems to come up with really helpful tips and tutorials.

Happy learning!

Good Intro to Programming Series on Lifehacker

A couple of weeks ago I ran across a series of articles on Lifehacker titled “Learning How to Code”. It is a great series for anyone interested in getting into programming. The series uses JavaScript as it is readily available to anyone with a text editor and a browser.  Adam Dachis does a great job of keeping the content fresh and informative while not getting too advanced.

Below are links to each article in the series -

Happy coding!

SQL Saturday #57 – Houston

I attended/volunteered at the first SQL Saturday (57) Houston. The event took place this passed Saturday at the Bammel Church of Christ and with about 185 in attendance (350 registered), the event was a success (IMO).

Main Picasa Photo Set for SQL Saturday #57

My Picasa Photo Set for SQL Saturday #57

Photos taken by Sri Sridharan of SQLRocks.com

Below is a roundup of SQL Saturday 57 recaps and reviews. I will update it as I see new posts come up.

Can’t wait to see what the next Houston SQL Saturday holds…

C# Special Interest Group – 11/30/2010

I attended the Houston C# SIG last Tuesday. Alan Stevens did a great presentation titled The Taming of the Code.

AlanStevens

In this presentation he talked about the importance of constant learning and refactoring.

Below are some of the high points I picked up.

1. The Goal

  • Build the right thing and build it well
  • Technical Debt – Shipping the right thing even though it is not perfect
  • Do the simplest thing that can possibly work
  • Enable change

Build architectural seams or fault lines into your code, so if need be, it can be picked up and “stitched in” somewhere else

*ilities

  • Agility
  • Testability
  • Readability
  • Reversability
  • Changeability
  • Flexibility
  • Maintainability

Domain Driven Design

2. The Guidelines

Don’t Repeat Yourself (DRY) and Separation of Concerns are the yin and yang of Software Development

Examples of Separation of Concerns are MVC, MVP, HTML, CSS, JavaScript, (UI+Service+DAL).

SOLID Principals

3. The Practice

A feedback loop is needed (code reviews, pair programming)

Test Driven Development

Yield keyword

Additional Information

Great Series on Functional Programming

I ran across a great series on Functional Programming from Christopher Bennage. The articles are listed below.

I recommend giving this series a read if you are looking to learn Functional Programming.

Wizards of Smart Podcast

wizardsOfSmart

There is a new podcast in town that I have started listening to. It is called the Wizards of Smart and is hosted by Jonathan Birkholz (@rookieone) and Ryan Riley (@panesofglass) and has kind of a “Stackoverflow-ish” format in which they banter back and forth on a range of topics.

I believe it is a great resource whether you are learning application development or trying to keep up with the ever-changing field. Check it out.

^..^

Method Overloading

Polymorphism is one of the main characteristics of Object Oriented Programming (OOP). Put simply, it allows an object to behave in various ways depending on the manner in which it is used. For example, you could have a method execute differently based on the type and/or number of parameters passed to it. Method Overloading is what makes this example possible.  To accomplish Method Overloading, a developer can define two or more methods with the same name. Each method will take a different set of parameters.  The parameter combination or signature, is what the compiler uses to determine which method to use.

image

Good examples of Method Overloading in the .NET Framework include (but are not limited to) the Console.WriteLine() and Substring() methods.  You can pass different types to the Console.WriteLine() method and it will work because there are variations of the methods that will accept the different types.

image

C# Program

using System;
namespace MethodOverloading
{
  class Program
  {
     static void Main(string[] args)
     {
         MethodOverloadPlay(10, 3);
         Console.WriteLine("+++++");
         MethodOverloadPlay(5, 5, 6);
         Console.WriteLine("+++++");
         MethodOverloadPlay("SP");
         Console.ReadLine();
     }

     static void MethodOverloadPlay(int number1, int number2)
     {
         int result = number1 + number2;
         Console.WriteLine(result);
     }

     static void MethodOverloadPlay(int number1, int number2, int number3)
     {
         int result = number1 + number2 + number3;
         Console.WriteLine(result);
     }

     static void MethodOverloadPlay(string string1)
     {
         Console.WriteLine("Breaking Benjamin & Sick Puppies Rock!");
     }
  }
}

C# Listing on GitHub 

Result

method-overloading_result

The main advantage of Method Overloading is code readability. Programming languages that do not allow Method Overloading require the developer to create totally separate methods for each variation of the input.  Blackwasp Consulting states the following example: in the ANSI C programming language to truncate a value you would use trunc, truncf or truncl according to the data type being rounded.  In C#, method overloading allows you to always call Math.Truncate.

Additional Information

^..^

Stack Overflow Family of Sites

Jeff Atwood and Joel Spolsky formed Stack Overflow a while back. If you are a developer and have not been living under a rock :-) then you have most likely heard of it. I did not realize until fairly recently that there is now a “family” of Stack Overflow style web sites.

so sf su mso

I have found Stack Overflow invaluable as a developer and am anxious to dig into the other sites and see what they have to offer.

Until next time…

HDNUG – October/09 Meeting – Recap

I attended the Houston .NET User Group October ’09 meeting last night. There was a good turnout of about 75-85 people in attendance.

 hdnuglogo    

Announcements -

  • Next month Zain Naboulsi will be presenting on Windows 7 for developers
  • There is an upcoming ASP.NET User Group that will likely be on the 4th Tuesday of each month – no dates set yet

Main topic -

photo

Claudio Lassala gave a great talk titled Be a Professional Developer and Write Clean Code. Below are some of the points covered.

  • What is clean code? Elegant and efficient, can be read and enhanced, simple and direct, etc…
  • Computers do not care what your code looks like
  • Name variables so that you don’t need comments

          Instead of –

     //Setting employee’s first name
     string field1 = “Rhonda”
;

          Use this –

     string employeeFirstName = “Rhonda”;

  • If you have source control, there is no reason to keep code commented
  • NDepend – a good tool that provides metrics for your code
  • Functions should do one thing and do it well
  • Vertical Distance – Declare variables close to where they are used. There is no need to declare all variables at the top of the program.

Presentation Materials for Be a Professional Developer and Write Clean Code

There were a lot more great points, but I had to leave before Claudio was finished. He did a great job of explaining how bad code should be rewritten.

hdnug

Looking for a user group meeting to attend? Check out my Houston Tech Groups and Events page.

Until next time…

^..^

Houston TechFest 2009 – Recap

techfest1

I attended the Houston TechFest last weekend and I have to say it was a great turnout. According to the web site there were 858 people in attendance. There were 14 tracks containing 70+ sessions.

techfest2 techfest3

Below are the sessions that I attended and some notes I took along the way.

What’s New In Silverlight 3.0

silverlight

Presenter: Todd Anglin
This presentation gave a great high-level explanation of Silverlight 3.0 and Rich Internet Applications.

Silverlight is not (nor will be anytime soon) available for the iPhone. Apple does not allow this type of plugin.

High Points of Silverlight 3.0

  • GPU Acceleration
  • Out of Browser (Fit Client)
  • Search Engine Optimization (SEO)
  • Assembly Caching
  • Validation Templates
  • SaveFileDialog
  • Cached Composition
  • Network Monitoring
  • 3-D Support

What’s New in Silverlight 3.0 – Slides and Demo Code

Introduction to iPhone Development

apple-iphone

Presenter: Ben Scheirman
This presentation covered the requirements for developing on the iPhone as well as some syntax and frameworks.

Requirements

  • A Mac
  • X-Code (free)
  • iPhone SDK (free – limited to simulator)
  • iPhone Developer Program ($99)

Language – Objective C
Based on C, Dynamic, Object Oriented, Powerful

Ben provided a great primer on Objective C. I have to say, it is quite different from any syntax I have ever encountered.

[photo setCaption : @"Day at the beach."];
NSString* caption = [photo caption];

Some of the topics touched on in the primer

  • Multi-Input
  • Accessors
  • Memory Management
  • Header Files
  • Implementation Files
  • Categories (like extension methods)
  • Key Value Coding (like reflection)

Frameworks and Libs

  • Cocoa Touch
  • AddressBook
  • Camera
  • Accelerometer – Tilt/Gravity
  • Magnetometer – Direction
  • MapKit – Embedded maps
  • CoreLocation – GPS
  • CoreGraphics – High level graphics
  • CoreAnimations – High level animations
  • OpenGL ES – 3D graphics

Introduction to iPhone Development – Slides and Demo Code

Evolve Your Code Using Extension Methods, Fluent Interfaces and Expressions

dotnet

Presenter: Jonathan Birkholz
This presentation thoroughly covered the topics of Extension Methods, Lambda Expressions and Fluent Interfaces.

Points explored

  • Extension Methods – Methods added to existing types. They are static methods, but called as if they were instance methods.
  • Lambda Expressions – Anonymous functions that can contain expressions and statements.
  • Expression Trees – Representation of language level code in the form of data.
  • Expression Tree Visualizer – working implementation of a visualizer that can be run inside the Visual Studio debugger to view the contents of an expression tree.
  • Fluent Interfaces – Way of implementing an object oriented API (DSL) in a way that provides more readable code.
  • Single Responsibility Principle – A class should have 1 and only 1 reason to change.

Tools discussed

  • StructureMap – Dependancy Injection/Inversion of Control tool
  • Fluent nHibernate – Fluent, XML-less, compile safe, automated,  convention-based mappings for NHibernate.
  • AutoMapper – A convention-based object-object mapper.
  • NBuilder – Tool for rapidly creating test data. I am really interested in this tool…

Evolve Your Code – Slides and Demo Code

Developer <T>: Utilizing .Net Generics to Write Better Code

dotnet

Presenter: Shawn Weisfeld
This presentation provided a great overview of .NET Generics.

Generics are basically type-safe data structures that do not commit to a data type. This feature was introduced in .NET Framework 2.0/Visual Studio 2005.

Other points covered

  • Generic Contraints
  • Generic Lists
  • Generic Structs
  • Generic Guidelines
  • Performance

Resources provided

Utilizing .NET Generics to Write Better Code – Slides and Demo Code

Materials for all the sessions are being posted to the TechFest 2009 Content site.

The 2009 Houston TechFest was a great day of learning and I am already looking forward to next year. As always, the swag was pretty nice too.

techfest4

Until next time…

Follow

Get every new post delivered to your Inbox.