현재 사용 중인게.. 2개 사용해 본건 5개밖에 안되네요 --;;
http://www.dotnetjunkies.com/WebLog/richardslade/archive/2005/10/29/133481.aspx
'programming > c#' 카테고리의 다른 글
정규식 컨닝페이퍼~ (0) | 2005.11.03 |
---|---|
C# coding guideline (0) | 2005.10.22 |
열거형 클래스 예제 (0) | 2005.10.22 |
현재 사용 중인게.. 2개 사용해 본건 5개밖에 안되네요 --;;
http://www.dotnetjunkies.com/WebLog/richardslade/archive/2005/10/29/133481.aspx
정규식 컨닝페이퍼~ (0) | 2005.11.03 |
---|---|
C# coding guideline (0) | 2005.10.22 |
열거형 클래스 예제 (0) | 2005.10.22 |
FxCop라는 프로그램으로 내가 만든 프로그램을 분석해 보면서 나온 내용들 정리
재미 있는 점은 Microsoft에서 만든 SqlHelper도 FxCop에서 제시하는 Rule을 어긴게 종종 보이네요 ^^''
발견된 건 무지 많은데... 공감도 가고 이해도 가고 수정도 했던 부분만 간략히 정리하는 중이다..
<<Performance Rule>>
- Properties should not return arrays
이유 : 비록 readonly 속성이라도 넘겨받은 배열의 값을 변경할 수 있기 때문
해결책 : clone해서 넘긴다.
- Do not initialize unnecessarily
이유 : CLR이 생성자를 실행하기 전에 모든 fields를 기본값으로 초기화를 한다. 대부분의 경우 생성자 안에서 field들을 기본값으로 초기화 하는일은 중복된 작업이다.
해결책 : 생성자 안에서 기본값으로 초기화하는 코드를 삭제
<< Usage Rulse >>
- Non-constant fields should not be visible
이유 : read-only가 아닌 static field 상수는 쓰레드에 안전하지 않으므로..
해결책 : read-only로 만들거나 public을 제거하여 노출하지 않는다.
<< Design Ruls >>
- Abstract types should not have constructors
이유 : 추상 type의 생성자는 상속받은 type에서만 호출할 수 있으므로 추상 type은 public 생성자를 갖으면 안된다.
해결책 : public생성자를 protected 생성자로 변경
?? : 그다지 공감가지는 않는데... 어짜피 추상 type의 객체를 바로 만들 수가 없는데...
10가지 .Net용 무료 개발 툴 (0) | 2005.11.03 |
---|---|
열거형 클래스 예제 (0) | 2005.10.22 |
.NET Test Driven Development의 모든것... (0) | 2005.10.03 |
public class Requester
{
private readonly int _requestLoginType;
private readonly string _requestLoginTypeName;
public static readonly Requester USER = new Requester(1, "USER");
public static readonly Requester GAME = new Requester(2, "GAME");
public static readonly Requester ZONE = new Requester(3, "ZONE");
private Requester(int requestLoginType, string requestLoginTypeName)
{
_requestLoginType = requestLoginType;
_requestLoginTypeName = requestLoginTypeName;
}
public override string ToString()
{
return string.Format("{0}:{1}", _requestLoginType, _requestLoginTypeName);
}
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (obj.GetType() != this.GetType())
{
return false;
}
return GetHashCode() == obj.GetHashCode();
}
public override int GetHashCode()
{
return _requestLoginType;
}
}
C# coding guideline (0) | 2005.10.22 |
---|---|
.NET Test Driven Development의 모든것... (0) | 2005.10.03 |
The 30 Minute Regex Tutorial (0) | 2005.10.03 |
뭐.. 왠만한게 다 될꺼라는 생각은 갖고 있지만... 레지스트리 조작하는 코드는 첨 보네요..
혹시라도 쓸 일이 있을지 몰라 소개합니다.
출처 : http://codebetter.com/blogs/sahil.malik/archive/2005/09/13/131900.aspx
사용자 계정의 defalut language 문제... (2) | 2005.11.14 |
---|---|
데이터베이스 관련 면접 질문... (0) | 2005.08.12 |
SQL Server와 Oracle의 병행제어 알고리즘의 차이 (5) | 2005.04.20 |
MVP인 어떤 분이 정리해 놓은 TDD 관련 자료들입니다.
지금까지 본 내용 중 제일 많은 양이 아닌가 싶네요..
출처 : http://codebetter.com/blogs/darrell.norton/articles/50337.aspx
출처에 가면 있는 글 입니다.
----------------------------------------------------------------------------------------
Lessons Learned in Software Testing by Cem Kaner, James Bach, and Bret Pettichord.
Pragmatic Unit Testing in C# by the Pragmatic Programmers Andy Hunt and Dave Thomas, the preview chapters (one, two) look good.
Managing the Testing Process by Rex Black – highly recommended by John Robbins.
Test Driven Development: A Practical Guide by Dave Astels, we've got this at work and it is very good although the examples are in Java.
Test Driven Development: By Example by Kent Beck. My comment: can we please move away from the stupid money example.
Test-Driven Development in Microsoft® .NET by James Newkirk, a developer on the NUnit project. Awesome book. (get all the code from the TDD workspace on GotDotNet)
Software
csUnit - open source testing framework
NUnit - open source testing framework
mbUnit - unit testing similar to NUnit, from a Microsoft employee
ZaneBug - unit testing which includes interesting enhancements for performance metrics, etc.
.TEST - commercial automated unit testing software
HarnessIt - commercial testing framework
Unite.NET - commercial unit and integration test software
X-Unity - commercial testing framework
NUnitAddin - Visual Studio add-in, currently has command-line interface (I hear Jamie Cansdale is working on a GUI with red/green bars)
NUnitASP - test web sites by interacting programmatically with the controls on the web page. Now supports authentication as well as several other new features! Also see my NUnitAsp Tips and Best Practices.
NUnitForms - allows you to test Windows Forms in a manner similar to NUnitAsp (you get to interact with the form elements programmatically). It even includes a recorder application!
RUnit - runs NUnit test harnesses in ASP.NET.
TestRunner for NUnit - an NUnit add-in for Visual Studio .NET. See blog post.
VSNUnit - an NUnit add-in for Visual Studio .NET. See blog post.
Mock Objects
DotNetMock
EasyMock.NET
MockObjects
NMock
POCMock
Web sites / columns
Applying Patterns to Software Testing - Brian Marick
Bret Pettichord's Publications on testing
Brian Marick's writings on software testing
Cem Kaner's articles on testing
James Bach's articles
ObjectMentor's Test Driven Development articles
TestDriven.com web site, general purpose portal that includes various languages, testing tools, and articles.
testingReflections - a hub for Software Testing knowledge and information
Test Driven Development Column Dave Astels
Test Driven Development Yahoo! group
Pages on the c2 wiki:
Blogs
Antony Marcano has a software testing focused blog.
Benjamin Mitchell has an excellent XP and Agile category including lots of TDD
Brian Marick's blog is all about testing
James Newkirk, lead developer on NUnit and now Microsoft employee, has an excellent TDD blog.
Jamie Cansdale, creator of the TestDriven.NET addin for Visual Studio, has a blog.
Jay Kimble has a TDD category
Jens Winter has a TDD category
Jonathan Cogley has a TDD category
Jonathan de Halleux - the creator of mbUnit
Roy Osherove has a Test Driven category
Siva Rama Krishna has a blog devoted to software testing
Steve Eichert has a TDD category
See my Test Driven Development category
Unit Testing articles
Adventures in C#: Using NUnit - Ron Jeffries
Advanced Unit Testing: Parts 1, 2, 3, 4, 5 - Marc Clifton
An Initial Investigation of Test Driven Development in Industry - Laurie Williams and Boby George
Best Practices: Test Driven Development
Charles' Six Rules of Unit Testing - Charles Miller
Contractual Test Driven Development: Combining Test Driven Development and Design By Contract - Dave Chaplin
csUnit Tutorials - a group of related tutorials on csUnit, including one on how to port from NUnit
Developing Automated Tests using NUnit2 with VB.NET - Dave Chaplin
Effective Unit Testing - Tim Burns
Endo-Testing: Unit Testing with Mock Objects - Tim Mackinnon, Steve Freeman, Philip Craig
Debugging .NET with NUnit - Paul Kimmel
Fun with Unit Tests-Testing Abstract Classes - Roy Osherove
Interview: XP Pioneer Stumps for Test-Driven Development - Jon Udell on InfoWorld
Introduction to Test-driven Development with NUnit and the NUnit Add-in - Roy Osherove
An Introduction to Test-Driven Development (TDD) – code examples are in C# and Delphi using csUnit.
An Introduction to Test-Driven Development (TDD) using Visual Basic.net – code examples in VB.NET using csUnit.
NUnitAsp article - Melwyn D'Souza and Sarvesh Damle
NUnit V.2 For People Who Can't Cook - Markus Kalina, not the latest version of NUnit
Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing - James McCaffrey
Putting Test Driven Development into Practice - Jimmy Nilsson
TDD with NUnit and C# - PowerPoint presentation by Jonathan Cogley
Test Driven Analysis and Design - Jason Gorman
Test Before You Leap Into Development - Jon Udell on InfoWorld
Test-Driven C# : Improve the Design and Flexibility of Your Project with Extreme Programming Techniques - Will Stott and James W. Newkirk
Test Driven Development - ObjectMentor's write-up on TDD
Test Driven Development - Scott Ambler, chap 11 of his Agile Database Techniques book
Test Driven Development and Acceptance Testing - James Grenning
Test-Driven Development, A Conversation with Martin Fowler, Part V - Bill Venners on Artima.com
Test Driven Development and Web Services - Peter Provost, uses NUnit
Test Driven Development in .NET - Peter Provost, uses NUnit
Test Driven Development in Enterprise Integration Projects - Gregor Hohpe and Wendy Istvanick
Test Driven Development using NUnit - Jason Gorman
Test First Guidelines - Sean Shubin
Testing ASP.NET Applications with NUnitASP and NUnit - Justin Gehtland
Testing for Programmers - Brian Marick, very very good!
Unit Testing and Test-First Development - on MSDN
Unit Testing Database Code - Richard Dallaway
Unit Testing in .NET - Charlie Poole, 79 PowerPoint slides
Unit Testing in .NET - Justin Gehtland
When Do You Stop Unit Testing? - Gordon Weakliem
Work Guidelines: Test Driven Development
Working backwards - James Newkirk, Robert C. Martin
Write Unit Tests - Nick Smith in Visual Studio Magazine
Writing Automated Browser Tests using NUnit and IE - Dave Chaplin
Refactoring
Books
Refactoring: Improving the Design of Existing Code by Martin Fowler – excellent
Refactoring Workbook by William Wake – very good
Refactoring to Patterns by Joshua Kerievesky – forthcoming book, see the web site
Software
C# Refactoring Tool – $110 for 1-9 licenses, $99 for 10 or more
C# Refactory – $99 first license, $50 each additional, 30 for $549
dotEasy – currently free
FlyWheel – $449
Resharper – use a username and password of eapuser, pricing not set
Visual Studio – will include refactoring in the Whidbey release, due in 2005
Web Sites
Agile .NET Development – Refactoring - by Jason Gorman, C# tutorial on refactoring
Fowler Refactoring Example - by Dave Veeneman, a C# translation of the 'Starting Point' example in Chapter 1 of Fowler's Refactoring book
Refactoring Home page – a portal on refactoring maintained by Martin Fowler
Refactoring Yahoo! group
Refactoring with Martin Fowler – Artima interview by Bill Venners
The Process of Database Refactoring – by Scott Ambler
Refactoring Refactoring – article by Robert X. Cringely that questions refactoring
Pages on the c2 wiki:
Have I missed anything? If so, leave me a link in the comments and I'll update this page on a regular basis. Also, I will start to leave comments on the article to give you more of an idea of what the article contains (to add value, you know). If you want to add a brief synopsis, just leave it in the comments.
열거형 클래스 예제 (0) | 2005.10.22 |
---|---|
The 30 Minute Regex Tutorial (0) | 2005.10.03 |
DAAB의 버그(??) (1) | 2005.08.09 |
처음 공부하는 사람이 보기도 좋고, 레퍼런스로 활용해도 좋게 정리를 잘 해 놨네요.
출처 : http://www.dotnetmonster.com/Uwe/DirItem.aspx/Articles/NET-Framework/The-30-Minute-Regex-Tutorial
.NET Test Driven Development의 모든것... (0) | 2005.10.03 |
---|---|
DAAB의 버그(??) (1) | 2005.08.09 |
ConnectionString 모음 (0) | 2005.08.09 |
팀장님이 적당한 질문들 만들어 보라고 해서 찾아봤습니다. ㅋㅋ
다들 한 번 대답 해 보시죠~~
Q: | |
A: | SQL stands for 'Structured Query Language'. |
Q: | |
A: | The SELECT statement lets you select a set of values from a table in a database. The values selected from the database table would depend on the various conditions that are specified in the SQL query. |
Q: | |
A: | The INSERT statement lets you insert information into a database. |
Q: | |
A: | Use the DELETE statement to remove records or any particular column values from a database. |
Q: | |
A: | The SELECT statement in conjunction with DISTINCT lets you select a set of distinct values from a table in a database. The values selected from the database table would of course depend on the various conditions that are specified in the SQL query. Example SELECT DISTINCT empname FROM emptable |
Q: | |
A: | You can sort the results and return the sorted results to your program by using ORDER BY keyword thus saving you the pain of carrying out the sorting yourself. The ORDER BY keyword is used for sorting. SELECT empname, age, city FROM emptable ORDER BY empname |
Q: | |
A: | You could use the COUNT keyword , example |
Q: | |
A: | The GROUP BY keywords have been added to SQL because aggregate functions (like SUM) return the aggregate of all column values every time they are called. Without the GROUP BY functionality, finding the sum for each individual group of column values was not possible. |
Q: | |
A: | Blob and Clob. |
Q: | |
A: | Having clause is used only with group functions whereas Where is not used with. |
Q: | |
A: | Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined. Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster. |
Q: | |
A: | Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table. Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS. |
Q: | |
A: | Self join is just like any other join, except that two instances of the same table will be joined in the query. |
출처 : http://www.allapplabs.com/interview_questions/db_interview_questions.htm
T-SQL로 레지스트리 조작하는 방법 (0) | 2005.10.08 |
---|---|
SQL Server와 Oracle의 병행제어 알고리즘의 차이 (5) | 2005.04.20 |
Identity가 걸린 pk 컬럼에 Clustered Index 생성하는 것에 대한 고찰... (2) | 2005.04.13 |
DAAB(Data Access Application Block)를 이용해 application을 만든게 있는데, 몇가지 문제점이 발견되었다.
1. connectionString을 넘기면서 호출하는 method를 사용할 경우, 거의 대부분 문제 없이 수행되다가 아래와 같은 에러가 간혹 발생하는 경우
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection (SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at System.Web.SessionState.SqlStateConnection..ctor(String
sqlconnectionstring)
1번의 경우 아직 정확한 해결책을 찾지 못했지만 오늘 가장 근접한 내용을 찾았다
링크는 http://geekswithblogs.net/gavin/archive/2004/09/21/11482.aspx
2. 아래와 같은 메소드들을 호출하면 connection 연결이 안되는 문제
SqlHelper.ExecuteNonQuery(_connstring, CommandType.StoredProcedure, _spName, _arParms)
SqlHelper.ExecuteReader(_connstring, CommandType.StoredProcedure, _SPName, _arParms)
SqlHelper.ExecuteDataset(_connstring, CommandType.StoredProcedure, _spName, _arParms)
2번의 경우 connetionString이 아닌 connection object를 생성해서 연결한 후 넘기면 문제가 해결 되었다.
DAAB를 실전에 사용하시는 분들은 꼭 주의하시길...
The 30 Minute Regex Tutorial (0) | 2005.10.03 |
---|---|
ConnectionString 모음 (0) | 2005.08.09 |
(수정).Net 개발자라면 꼭(?) 사용해야 하는 툴 (0) | 2005.06.21 |
http://www.connectionString.com 보다 나은 듯
출처 : http://www.codemaker.co.uk/it/tips/ado_conn.htm#SQLClientManagedProvider