Skip to content

Instantly share code, notes, and snippets.

View ccdschool's full-sized avatar

ccdschool

  • CCD School
  • Hamburg, Germany
View GitHub Profile
@ccdschool
ccdschool / wordwrap_refactored.cs
Last active March 31, 2016 15:45
Quellcode zum Artikel über die Refaktorisierung
using System;
using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
[TestFixture]
public class WordWrap
{
[Test]
public void testErzeugeZeilen() {
@ccdschool
ccdschool / wordwrap.cs
Last active March 26, 2016 19:28
Refactoring exercise taken from the Kata Word Wrap
using System;
using System.Collections.Generic;
class WordWrap {
static string[] Erzeuge_Zeilen(string[] worte, int maxLineLength) {
List<string> lines = new List<string>();
var i = 0;
var line = "";
while(true) {
@ccdschool
ccdschool / hexdump.cs
Created August 5, 2015 13:00
Hexdump console application to be refactored
using System;
using System.IO;
using System.Text;
namespace hexdump
{
// source: "C# von Kopf bis Fuß", O'Reilly, see also https://app.box.com/s/a9n6kipfdonr5yeo44ha
class MainClass
{
public static void Main (string[] args)
@ccdschool
ccdschool / csvviewer.cs
Last active August 29, 2015 14:25
CSV Viewer to be refactored
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Sample data: https://www.census.gov/econ/cbp/download/index.htm