Angel \”Java\” Lopez on Blog

November 27, 2013

TDD Rocks! (3) SharpBase in C#

Filed under: C Sharp, Google, Open Source Projects, Test-Driven Development, Video — ajlopez @ 4:46 pm

Previous Post
Next Post

You already know, I like to code models in memory. Some time ago (months? years?) I started a project to build an in-memory relational database, using C#. To practice TDD, I decided to start it again, from scratch, documenting the first steps of the process in videos. After showing my workflow, the work will continue with commits in my GitHub Account. The first video:

http://www.youtube.com/watch?v=N7zCTVZiWfo&feature=youtu.be

The code is at:

https://github.com/ajlopez/SharpBase

Notice I didn’t make “big decisions” before the coding. I still don’t implement what is a Row, no idea yet for index and other stuff, like column types. I only coded the first use cases, with a simple API: create a database with name, check if it exists, etc…

I used the test library that comes with Visual Studio (Professional, Ultimate), already integrated in the IDE. Maybe, I could use NUnit or other solutions, but I’m proficient with this approach.

The important thing is not the tool: it is the workflow. Write a test with a new example, compile it, then code it to get green result, refactor, write a new example/test again, and so on. Don’t be afraid of refactoring (internal changes in implementation) or redesign (change in exposed API). And there are also test code refactoring. In general, in the refactoring we can add the patterns we know, cut repeated code, etc. In my case, I push for not have a lot of upfront design. That is the way I use in my personal and professional projects.

I hope you can understand spoken Anglish 😉 (Angel’s English)

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
@ajlopez

2 Comments »

  1. […] Previous Post Next Post […]

    Pingback by TDD Rocks! (2) OStore With JavaScript/Node.js | Angel "Java" Lopez on Blog — November 27, 2013 @ 4:47 pm

  2. […] Previous Post […]

    Pingback by TDD Rocks! (4) SharpBase In C# | Angel "Java" Lopez on Blog — November 29, 2013 @ 2:09 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: