An odd post about, well... I really don't know
Tags: ramblings, programmingart, cleancoding
Published: 2019-05-21 15:19:24

So I'm at a fun place in my professional life. At the tender age of 52, I've started looking for what I want to do when I grow up. Making a career isn't as important as it was when I was 20 or 30. The kids have moved out, and living expenses are suddenly far less than my income. I never thought I'd say that.

I write code for a living using my preferred programming language, it's summer, and there's ice-cream just across the street from where I work. Without the hassle and stress of career goals and deadlines, I'm pondering my options and opportunities.

One thing I'm doing is reading and blogging about clean coding. Well, I read about a lot of stuff, but concerning tech and computers, it's mostly about clean coding. That's an exciting field in programming, and I'm trying to learn all I can by, oddly, teaching it to other people. Or perhaps that's not so odd after all; teaching is about talking about stuff, discussing stuff and generally thinking about stuff. And I think a lot about clean coding.

One cool thing about clean coding, I think, is that it's about writing clean code (duh), and to me, clean code is beautiful code. I've always been more interested in the code itself than in the functions of whatever program I'm currently working on. That's probably why my hobby projects never get finished. My oldest one is going on close to 30 years and surely 20 editions (I say editions because I usually start over rather than continue on the previous version when I get into the mood to work on it).

So, beautiful code, what is that anyway? I don't know, but I think it's like the feeling a painter or a musician gets when the current piece of art is finished. I bet they can't really say why that piece is suddenly done. It just feels done, feels right, somehow. When I get that feeling, I know the code is done. The program might not be, it seldom is, but the code is done and I usually don't touch that code again. I just let it sit in a repo on Gitlab waiting for better times.

Sometimes, before I do the final commit (which I don't really know is the final commit at the time) I show my code to my wife. She understands none of it, but she likes the indentation. She likes the waves of the program structure, and I agree, getting that waving indentation line is really satisfying. As is getting all the statements, variables, class names, method names etc correctly camel-cased, white-spaced and, you know, just exactly right.

I have never printed and framed a piece of code, but thinking about it I'm sure one could do a really nice painting from a piece of nicely indented and well-written code. When I talk on the subject of clean coding, I like to say that a well-written program is like prose. (It's not my saying, I picked it up from the book Clean Code. I just like to say it). So how would a painter paint a piece of prose? I have absolutely no idea (just as I have no idea where this post is going).

I wonder what programming language is the best for that kind of programming art. My preferred language is Pascal, and Pascal makes for a really nice visual experience. More so than C# in my humble opinion. c++ is just messy to me, Java too but perhaps less so than c++. HTML and CSS (if those can be called programming languages) are very hard to format nicely, I think. Assembler has a nice line to it, those vertical columns appeal to a sense of order. SQL and its various dialects and procedural languages don't go well at all with the artfulness of programming, even though stored procedures can be rather cleanly written (except for MS SQL Server procedures, since MS choose a very odd way of doing if-begin-end).

I started rambling about growing up and going over what I've just written, it seems I have some ways still to go before I find out what I want to do when I grow up. But there seems, at least, to be options and opportunity. Hopefully, there are for you, dear reader, as well. Options and opportunity, that is, of whatever is in your future.

But whatever you do and whatever happens, always write beautiful code!