DEV Community

Cover image for Dipping into something done properly
Marco González L.
Marco González L.

Posted on • Updated on

Dipping into something done properly

A few weeks ago I made a decision that I kinda do regularly: dip my feet into something new just for the sake of it. Actually it's not that regularly and it definitely isn't just for the sake of it, nevertheless I did it, I liked it and I want to keep on going. Anyway, isn't curiosity the fuel of every programmer ever?

Previously on All my circuits

I have an IT technical degree —or something like that, career naming is weird among countries— where I was taught mostly old technologies, except for one thing that never gets old: how to learn. That's how I got into many programming languages during my studies until I graduated, and then… well, getting jobs isn't that easy, especially when you're actively avoiding to work on-site on the only —massively bloated and crowded— big city that your country has. But I digress.

During my career I had a stint with C# and ASP.NET as an assignment that lasted a couple of weeks, nothing particularly memorable or spectacular, and I kinda regret that it was that way because I was somehow expecting to meet with those techonologies, C# in particular. Since I was a kid I hoped that one day I would make a Windows application, no matter how small and irrelevant it might be, so it was quite underwhelming to have had such an unremarkable assignment, which I aced by the way.

However, and years after that situation, I decided to try again and rekindle my relationship with C# and Windows applications development. So far I've developed mostly Wordpress-based web applications, so I had to prepare myself for an unforgettable luncheon of steamed docs… thing that happened a couple of weeks ago when I decided to dip my feet again into C# and try to accomplish something more than just a Hello World.

The Combat Scenario

Briefly: I'm working on a non-profit community TV network on my hometown as chief technician and IT support. My tasks are many, as we're a really small team that tries to accomplish pretty much every imaginable task that a TV network has. Among those many tasks, daily programming is one of the most important. Every single day at 17:45 the channel's programming begins, with different shows beginning at their specific times during the programming run. Basically, a playlist.

Now, as our resources are scarce and we have little to no specialized equipment for this, the programming runs from a PC with the beefiest video card you could acquire 6 years ago, using vMix as our playout and mixing software. So far, so good.

But I had a major inconvenience: when I was making those playlists I had no clue about when were those shows being played nor when they ended. All I knew was that the playlist started at 17:45 and that shows lasted between 12 seconds to 2 and a half hours, but I had no way to know if a show was coming out at 18:00 or 19:30, or ending at 20:30 or 20:34. Something had to be done.

In the beginning I was using an online time calculator which was kind of effective for the time being, but my mind was split between knowing which show was next and how much time I had to fill until the next show airs. It was a slow and cumbersome process which I had no way to explain to someone else.

But, programmer as I am, I knew I could fix this issue with a little application…

A c#ild was born

I knew I couldn't fix this with yet another Wordpress plugin, so I thought that finally the time has come to revisit C# and its powers to be harnessed and vanquish this problem once and for all. So there I went to chew some docs, regain some confidence with a simple Hello World, and come with the Holy Grail that will save us all.

But facing myself with a programming language that has its own ways of doing things, it was a steep learning curve to overcome. Mostly because, as a Wordpress developer, I never had to deal with classes so heavily before. Or strong typing, because C# and PHP are hugely different monsters. Even XAML is enormously different when compared to HTML and CSS… so there I was, looking at this giant monster from below, googling pretty much every thought that crossed my mind with IntelliSense as my trusted copilot.

Eventually, after hacking my way through Big Shell, alert phases were called out and I was walking out of Arsenal Gear, victorious: vMixListMaker was born. Now, 3 weeks into production, my life as a programmer and also as a programmer is way easier than before.

The part where the main title makes sense

As it's been told here on dev.to many times before, working code is better than no code. But now that code is working, well, it's time to improve it. My code is hacky, borderline garbage, but it needs improvement, mostly because I want to add features to what now seems like a small and irrelevant Windows application. In other words, I'm asking for help.

While developing this little app I saw many articles about MVVM (Model-View-ViewModel) and its wonders, about Test Driven Development being the coolest way to develop nowadays, and that many people still use Windows 7 on their vMix rigs and won't be able to run the app because it's a Universal Windows Application.

So I ask for help, not for pull requests or anything, but to point me in the right direction. So far I've learned a couple of things about how to program in C# and UWP, but I want to learn more about how to implement a MVVM solution, about how to develop using TDD, about how to decouple some logic from my app and make it available to two different versions of the same tool, so I can develop a Windows 7 WPF app alongside the current UWP version.

Check out the code in my GitHub repo. I'm open to suggestions about how to improve my code, best practices and libraries. Everything is welcome.

I've seen many theorical articles, but now I need to see examples, exercises, walkthroughs, documentation. I want to learn to develop properly in C#, best practices and recommendations. Because once you get to code, you've got to code well.

Thank you so much in advance. I really, deeply appreciate it.


Cover photo by Markus Spiske on Unsplash

Top comments (0)