Everybody is calling themselves software engineer :), why ? maybe it sounds cool, maybe engineering is a good thing... In the hearth of engineering, there is calculation, planning, timing and costs. For example if you ask a contractor to build a house in your property, it is very likely that before everything begins, you will ask the contractor how will the project take, how much money will it cost, even maybe the project phases.
It is the same with software engineers, if somebody claims:) to be a software engineer; he/she should be able to answer questions like how long will this project take, how many lines of code is expected, how much will it cost, what are the project phases , how many bugs is expected etc...
If you take software engineering class probably you have learnt how to calculate these, if not, you can start from PSP. When i was talking with one of my friend about why an engineer should answer those answers; my friend disagreed with me and told me developing a software is not like constructing a house or manufacturing because in these engineering areas, they have automated tools, and processes. It is amazing that most developers i have met; either dont use the tools that will help them to automate the stuff, or havent heard of them.
Things have changed since my c++ development days, i am now wanna be a .net developer, who try to become a good programmer. I read about good programming practices, and try to copy the best techniques in my codes. I have won some nice tools from Inland Empire .NET user group. I really love these tools so far, such as ReSharper from JetBrains (a must have tool if you are using Visual Studio), CodeSmith (a nice code template generator), SubSonic (which is a free ORM), SVN, TortoiseSV.
Some of these tools and some others will help you to automate the programming tasks, and will help you to come with a good expected time for your projects. The very recent tool i got is code smith, it is only my second day i am playing with this tool and start liking it already :)
I created one template right away that will help to me create a class faster. How? When i create class, i try to put a heading signature at the top of the class which gives information such as, class name, date created, author, tasks , history. Before codesmith my method is: saved a small template file, and for each class i generate i copy back from the template and modify it. After code smith, i created a template which has properties, after you fill in the properties u get ur class :) Below is my simple template (hey before you critisize my code, dont forget i am learning codesmith :))
Here is my simple template
<%--
Name: C# Basic Class
Author: Volkan Uzun
Description: Basic C# class with comments
--%>
<%@ CodeTemplate Language="C#" TargetLanguage="Text" src="" Inherits="" Debug="False" Description="Generates a C# class with comments at the top." %>
<%@ Property Name="StartedBy" Type="System.String" Description="The first coder creates this class." Default="Volkan Uzun"%>
<%@ Property Name="VersionNo" Type="System.Int32" Description="Starting Version Number" Default="1000"%>
<%@ Property Name="Description" Type="System.String" Default="Description of the class" Description="Description of the class"%>
<%@ Property Name="ClassName" Type="System.String" Default="" Optional="False" Description="Class Name"%>
<%@ Property Name="Accessor" Type="AccessType" Default="Private" Optional="False" Category="Options" Description="Class Accessor"%>
<%@ Property Name="ProjectName" Type="System.String" Default="Project Name" Optional="False" Category="" Description="Project Name" %>
<%@ Property Name="Namespace" Type="System.String" Default="" Optional="false" Category="" Description="Namespace for the class" %>
/*
<Author> <%=StartedBy %></Author>
<Date><%=DateTime.Now.ToShortDateString()%></Date>
<ProjectName><%=ProjectName%></ProjectName>
<ClassName><%=ClassName%></ClassName>
<StartingVersion><%=VersionNo%></Date>
<Description><%=Description%></Description>
<History>
<Version No="<%=VersionNo%>">
<Action>File Created</Action>
<Notes></Notes>
</Version>
</History>
*/
namespace <%=Namespace%>
{
<%=GetAccessor(Accessor)%> class <%=ClassName%>
{
public <%=ClassName%>()
{
}
}
}
<script runat="template">
public enum AccessType
{
Internal,
Protected,
Public,
Private
}
public string GetAccessor(AccessType access)
{
string result = "private";
switch (access)
{
case AccessType.Internal:
result="internal";
break;
case AccessType.Protected:
result="protected";
break;
case AccessType.Public:
result="public";
break;
case AccessType.Private:
result="private";
break;
}
return result;
}
</script>
After you fill the properties you get this as a generated template:
/*
<Author> Volkan Uzun</Author>
<Date>7/12/2008</Date>
<ProjectName>Project Name</ProjectName>
<ClassName>Test</ClassName>
<StartingVersion>1000</Date>
<Description>Test class</Description>
<History>
<Version No="1000">
<Action>File Created</Action>
<Notes></Notes>
</Version>
</History>
*/
namespace ACM
{
protected class Test
{
public Test()
{
}
}
}
Now i am reading how to create DAL from a database using codesmith, which i am sure will help me to write faster, better code :)
what do you use to automate you coding ? Are you really software engineer? Do you know when a project will be completed before you start it ?
Tags: