A Good Coding Day
Trying to explain to non-programmers what it is like to write code is really difficult. When I am struggling with a problem, I often describe it as having writers' block, but that really isn't a good description. Often I am doing a lot of writing, it just isn't working the way I want it too. When things aren't working the way you expect, it can be really frustrating, and I could end up writing whole features that I end up throwing away. There are also times when I just can't get the logic I want to be settled in my mind. At these times, I would imagine it is more similar to writers' block. Usually getting away from the code for a little while will allow me to approach it from a different angle, and come up with the logic that I like.
For the past few weeks, I have been working on setting up a new application that will be using Asp.Net Core. This will be my groups' first Core application, and I am in charge of setting up the project and building the authentication and authorization scheme as well as the user management administration section. I mentioned some of the issues I was running into with authorization in some of my earlier blog posts, but I have gotten past those now.
I usually go through phases when I am working on a project. The first phase is the research and design phase. In the case of the authorization scheme, I had to learn how the new methods worked and how to adapt them to our environment. The next phase is building all the pieces for the feature or area of the application. The final phase is where you wire everything together and test with the full user interface. The description of these phases is a little broad, but it is the general idea of how things flow.
As far as the end user is concerned, the only thing they can see and understand is the UI. As long as that works the way they want, the code that drives it is unimportant. It is almost impossible to explain that a dozen lines of code in a single method took a week to get working, and the hundreds of lines of HTML took hardly any effort at all. I guess that is what keeps me employed, so I shouldn't complain too much.
When I get to the phase where my logic is all working, and I am just building and testing one piece after another watching features come to life one by one, the satisfaction is almost overwhelming. When I have spent a day writing really good code, I come home excited and try to tell my friends and family about something cool, and they look at me like I am from another planet. Fortunately, I have a few friends who write code who I can share concepts with over a beer at the pub, but it would be nice if I didn't have to feel like an alien so much.
This week has been one of those weeks where I am on a coding high. I figured out my authorization issue, I built a working structure for the application, and I am building a really cool user administration section that will be easy to reuse in other projects going forward. With every project I do, I try to incorporate something new and improve on previous designs for components I am reusing. Since this project is using a brand new architecture, and I have to redesign everything, it is a perfect opportunity to incorporate all the best practices I have learned into the base structure of the application.
Watching all the pieces come together and work the way I want them, reminds me why I love what I do so much. I am just wired to build things and make processes more efficient, so being a solutions architect is the perfect job for me.
I think it's like building an invisible machine. We get a whole Lego-box of different kinds of invisible gears and rods and springs, etc. which can be included by typing their names. And way they are organized line-by-line, plus punctuation, controls how the parts are connected together. And then, like a machine, it does what it does. Mouse clicks and keystrokes go in. And stuff gets printed, or drawn on the screen, or updated in your account record, or ordered from Amazon. And, like a machine, it just works, or it doesn't. :-)
ReplyDelete