Using Code We Don’t Understand [Reparations]

I took my previous post down. It wasn’t fully fleshed out, and it unfortunately centered on students, when in reality I suppose I really meant programmers and developers in general. I was misleading in two ways with the previous post, and I’d like to clear it up before continuing.

Firstly, SLU’s Computer Science Department is awesome; I can’t state this enough. They’ve got great people doing great things, and I’m ecstatic to be included in their ranks. The students are more than prepared to work in the local industry, or even continue their education with a post bachelor’s degree. It seemed like I was taking pot-shots at our student body, or at our program. My sarcastic use of a ‘click-bait’ title like “C# Shouldn’t Be Taught In College,” and a reference to my proximity to students, painted a very direct attachment that all the negative things in the post were regarding those students, and SLU’s program. This wasn’t intended, and isn’t true. I understand that C# is primarily used in the ‘Project Courses’ at SLU, and some readers may have thought I was also knocking those classes. You are wrong; those classes are necessary, and fantastic. The Professor responsible is a close friend of mine that I treat like a brother. He continuously helps students achieve goals of getting internships, and has always been there for me.

Secondly, even though I wrote several times that I thought C# isn’t a bad language, and that Visual Studio isn’t a bad tool, I believe some readers still interpreted the post as a big fat slam on C#. For one last time, I think C# is a fine language, and Visual Studio a fine tool. It isn’t my favorite language, I don’t think it is the best language ( PYTHON \m/ ), but it has it’s place, and does it’s job well enough. I use it daily to manipulate data in Active Directory.

Before I continue, I want to throw one last something out there. When you read this post, or any of my posts, take it as my opinion. Nothing here is politically or personally fueled. The purpose of these posts are to broadcast my thoughts and to have a good discussion with others. I enjoy having friends and colleagues discuss the topics, and debate the issues. As super-suave and intelligent as I am, I can’t know everything and have every perspective. I enlist the perspectives of others to help me gain a better understanding of my surroundings, the industry, life, and pumpkin pie. Do not misuse these posts in some attempt to call me out on what you think I am saying about my work, my friends, my abilities, etc… I was pretty upset at the overall fallout of the previous post, because I didn’t think it was necessary to state my love for SLU. I wouldn’t be working there if I didn’t believe in what we are doing. I felt misunderstood. This post, especially the above clarifications are not the result of pressure from anyone, other than myself. Being misunderstood is a horrible feeling, and I hope that I’ve been specific and direct enough now so that this post won’t be misunderstood.

Now on to the actual topic; the previous post revised.

I realize that I aimed at students in the last post; unfortunately, that was a result of many a long-night without sleep. That post was developed over several months. Every few days I’d add another sentence, redact some section, just a little here and there. I suppose that over time I knew what I wanted to say more and more, but conveyed that feeling less and less as I haplessly added words.

The post was originally started when speaking with a friend about DataTables, almost 3 years ago. The short and sweet of it was that I was new to MVC# and had no idea about DataTables. I asked a friend who had considerably more experience for help. To my dismay, my friend could only use ReSharper, or a custom library he had written to manipulate data; he couldn’t just write it using Vanilla C#. This troubled me. He no longer understood what some of the tools he used daily were actually doing anymore.

So, we’ve all used code that we don’t understand. Academically, it’s important to understand how data structures and algorithms work, and to granularize each part to gain a better understanding. This helps establish fundamental knowledge that will eventually be needed to solve more complex real-world problems. But, past a certain point, we don’t need to write everything from scratch. Someone, somewhere, has written a better, more widely used and accepted, List.Sort(). It was included in the language, and there is virtually no practical reason to not use it if you already know what it does, and how. Truthfully, this is abstraction.

“In computer science, abstraction is the process of separating ideas from specific instances of those ideas at work.” – Wikipedia

We may never see C#’s or Java’s List.Sort() code, but we know when used the result is a sorted list. We know what it does, and most likely we know how it does it. But what if we didn’t know how it accomplished this? Surely, we could still use it; the big takeaway from abstraction is that we don’t necessarily need to know what the code is doing, just that given some input (or not), something happens (or doesn’t), and something is returned (or isn’t).

Visual Studio’s ability to generate pretty much everything, sans business logic, in a program, is awesome and great for development shops. But it might be bad for students and for employees of those shops. All I really am suggesting is that at some point we need to know what and how Visual Studio (and other IDEs like it) is generating what it generates. It’s possible to develop applications with no knowledge of how databases work, with never deploying the database, or even designing one. But we shouldn’t avoid databases like the plague! There is importance in knowing how they work, and practically how to use them. SLU does a fantastic job of covering their (data)bases in that regard, but what about when students graduate? It is easier to have the code generate the database for you, but I still believe their is some value in building one from scratch every so often. This is just one example, but just think about all the things VS does for you. Do you know everything that it is doing behind the scenes?

Your thoughts?

3 comments

  1. John D'Oriocourt says:

    I do not know everything VS is doing for me behind the scenes and I don’t have a long enough lifespan to learn it all.

    Know the positives and negatives about what you are working with, but there is no real need to dig into it unless you are having issues with it (namely, performance). Trying to learn the ins and outs of everything you are using leads to a complete stall in development. A paralysis by analysis type of situation.

    Also, how deep do you want to go? Is being able to reproduce in pseudo-code or some other abstraction good enough? Or do you need to be able to do it in native code? If it’s managed code, how much should the developer understand about how the virtual machine handles code in various environments? What about breaking that down further by being able to understand the code that the compiler produces? What about going even further into the actual bits? Or the physics behind how CPUs or other hardware function?

    • MG says:

      Good comment!

      I don’t expect developers to know everything that their tools do. That’s like saying roofers need to know how shingles and nails are manufactured. But in that analogy, I think that developers are like the architect, more than the roofer or concrete guy. They should know enough about everyone’s job to direct them efficiently. My concern lies in that as tools get better, and the magic methods there within get better, developers could be left behind because of their dependence on those tools.

      There are worlds of differences between a developer creating a web-app and one creating a compiler. It isn’t necessary for the web-app developer to know the underlying mechanics of the tool. Though, I think having a rough idea of what the auto-code is, and how it was produced is important, primarily because maybe one day it won’t do that anymore. Maybe one day the VS install gets corrupted, and you don’t have time to reinstall it, and you need to create a Controller, but the button that did that doesn’t work anymore… That developer should know how to navigate around that problem.

      As far as ‘how far do we go’… I think it depends on the job. If you are a software developer that exclusively creates web-apps in C#, I would suggest that having a working knowledge of VS and IIS is most important. Probably knowing how IIS interacts at the server level would be good too, but that isn’t really a developers job.

Leave a Reply