It’s about to be a brand new year. As 2017 ticks over into 2018, it seems like a good time to look back and review what we’ve been up to. ConTabs only really got underway quite late in the year and it’s no way near finished, so let’s call this an interim review. Still, we can see where we are, how we got here, who we met along the way, and where we might go next.
As I write this, it’s late in the evening of the 31st of December. It’s blowing a gale outside. I’m on the sofa with a (rather flatulent) dog, but otherwise alone. My son is in bed and my fiance is working a night shift. In other words, it’s the perfect time to get a bit reflective. So let’s get stuck in…
What ConTabs looks like now
var table = Table<Planet>.Create(Planets);
table.TableStyle = Style.Heavy;
table.Columns.FormatString = "###,###,###0 km";
table.Columns.Hide = true;
table.Columns.FormatString = "0.00 days";
table.Columns.LongStringBehaviour = LongStringBehaviour.TruncateWithEllipsis;
table.Columns.LongStringBehaviour.Width = 45;
Running it produces this…
# Name # DistanceFromSun # OrbitalPeriod # Fact #
# Mercury # 57,909,227 km # 88.00 days # Mercury is the smallest planet. #
# Venus # 108,209,475 km # 225.00 days # Venus is the hottest planet. #
# Earth # 149,598,262 km # 365.24 days # Earth is where we live #
# Mars # 227,943,824 km # 693.50 days # Mars is also often described as the "Red P... #
# Jupiter # 778,340,821 km # 4343.50 days # Jupiter is the largest planet. #
# Saturn # 1,426,666,422 km # 10767.50 days # Saturn is best known for its fabulous ring... #
# Uranus # 2,870,658,186 km # 30660.00 days # Uranus became the first planet discovered ... #
# Neptune # 4,498,396,441 km # 60152.00 days # On average Neptune is the coldest planet #
In this demo, we’re using the following features:
- Styling, to change the characters that make up the table
- Format strings, to change the way numbers are displayed
- Column hiding
- Long string handling, to truncate strings too long to display
The original aim of being able to generate tables with two lines of code still holds true, but now we have a lot more flexibility when we need it. The column-related features in particular are motivated by a desire to facilitate consumption of data types that exist for other purposes, without the need for throwaway intermediaries.
Another principle is extensibility. Where possible, consumers should be able to implement their own versions of built-in functionality. This is exhibited by the styling system, which provides simple means to tweak the predefined styles, or to specify something entirely new.
At this point, it’s important for me to doff my cap to a few people who’ve made valuable contributions to the ConTabs project:
- Lukáš Novotný (aka Kukkimonsuta) came to my rescue when I was struggling to get .NET Standard and Nuget to play nicely together.
- The GitHub user known variously as rahl0b10 / geekmdio implemented functionality to throw an error when ConTabs can’t find any public properties and has been an active contributor to some design decisions.
- Patrick Smacchia at NDepend was kind enough to grant me an NDepend license, which has been really valuable in my quest to keep the code clean and maintainable. (More on this below.)
Huge thanks to all three of you. I really hope our paths cross again in 2018. As we’ll see, there’s plenty to do…
What’s on the roadmap?
There’s still plenty of functionality left on the table. The list of issues on GitHub is pretty complete, but the big ones are probably:
- Changing column headers
- Arbitrary ordering of columns
- Alignment of data within columns
There has also been talk of a new “builder syntax”, which looks as though it might be a more pleasant way of constructing tables.
All told, there’s plenty to keep us busy and new contributors are always very welcome. (If you’re interested, see our guide for contributors.)
What have we learnt along the way?
As I said in my initial blog post, ConTabs has always been at least partly an opportunity to learn about some aspects of modern .NET development. In the blog series so far, we’ve covered:
- Cloudy continuous integration with AppVeyor, using Git commits to trigger builds, run tests, and execute other payloads…
- These payloads can include OpenCover and coveralls.net, which I used to send code coverage data to Coveralls.
- The challenges of publishing a .NET Standard package to NuGet and a correction based on assistance I received from the community on Reddit.
- Using NDepend to perform static analysis on ConTabs, which has allowed me to identify and correct a number of issues with the code.
Future ConTabs blog posts
Looking ahead, it’s hard to know exactly what shiny things will grab my attention, but I have a few ideas. For a start, I consider my inability to get code coverage data into NDepend to be a bit of a loose end. I’d also like to write a little more on the topic of the .NET ecosystem – focusing on .NET Standard and how it fits in with .NET Framework and .NET Core. Finally, I’m hoping to be able to write about ReSharper at some point too (fingers crossed!)
In other words, this review does not signal the end of either ConTabs development or blog posts in this series. 2018 is going to be a great year – watch this space!