Acronyms

I have been reading about Object-oriented programming because I have had to do quite a bit of that for my project lately. I came across this link:

en.wikipedia.org/wiki/Don’t_repeat_yourself

and decided I wanted to talk about it.

What could I possibly be trying to evoke here?

D.R.Y. stands for “don’t repeat yourself.” In this context it is related to the idea that when one codes, one should abstract repeated lines of code into singular functions, ideas, or groups, which can then be evoked when needed and if changed, would affect all instances of its use.

For example, if I wanted to print out the contents of a list to the console, I might use some kind of loop to print each item in said list line-by-line. I might end up in a situation where I need to print out that list again, or perhaps print out a different list instead. I could, if I were being lazy, just repeat the printing loop in my code every time I needed it to happen. However, that would not be very D.R.Y. of me!

Instead, I might write a function to handle printing lists line-by-line for any time that ever comes up. Inside this function I could house the printing loop and all I’d ever need to do to use it would be to call the function and pass the list I wanted printed. Now my code is visually simpler, and if I ever needed to change how I wanted my lists printed, I’d only need to change the function I wrote, rather than every time I wrote out the original abomination.

I am now evoking another word, please bear with me.

The chosen antithetical concept to D.R.Y. is W.E.T. which is very shocking, I know. This acronym was retroactively created to be a sort of supervillain for D.R.Y. to fight. It commonly stands for “write everything twice” but has been known to take on other sayings all with the same sentiment.

It evokes all the worst and sloppiest coding practices one could think of. That being said, it could find its way into even the most well meaning and clean code. How? If a project is large enough where you can’t see everything all at once, you can easily begin to recreate processes that have already been written. Making sure to not repeat oneself also requires a conceptual understanding of what one’s program is trying to accomplish and how it is doing so.

I don’t expect you to get this one.

Perhaps an addendum or asterisk to apply to D.R.Y. would be A.H.A. which sounds like someone getting an idea. This one stands for “avoid hasty abstractions” which in my mind essentially means that one should be mindful and deliberate any time they are going to compartmentalize something in their code.

I could write a new printing function for every kind of structure I end up using, but that, in a way, is kind of repetitive. What if, instead, I made one king sized printing function that could figure out what I gave it, and printed it out the right way? And what if, later, even three months later, I realized that the kind printer function just wasn’t cutting it? A.H.A. also implies that one should always be open to refactoring their code if it will make things better and neater in the long run.

Quite a lot to think about from three little acronyms!

Creative Expressions

As I begin my project responsibilities, I find myself in the uncomfortable position of having to make art.

Terrible, isn’t it?

One could make an argument that building the foundation of a piece of software, no matter how simple, is a sort of art form. You must decide on a vision for the piece and execute it. This, I am told, is what people call “creativity.”

Ultimately, what I am getting at is a strange mental fork-in-the-road I am experiencing. The project I am working on is a game, which is meant to be entertaining. The code I am working on currently is meant to be functional. I have, in my mind, been separating the two ideas. I am either working on functional code, which feels like building a bridge, or adding to the game story, which feels like writing a book. It is dawning on me that thinking of both of these things as different entities might be a mistake.

Do all tracks lead to Artsville?

I think the block comes from the amount of confines I am working with. For example, if I am creating a new class to represent story item objects, I have to adhere to the pretty strict standards for how to create, represent, and use a class and its associated functions. Not much room for action and adventure there, is there? On the other hand, if I am crafting a sort of short form description of the immediate player environment, so long as I stay within the reasonable bounds of the overall narrative, the world is my oyster!

My world, as it were.

I think it is fair to say that both ventures, coding and writing, require some creative thought. Perhaps I will get some value out of trying to be more free and creative with my coding (within reason) and likewise I will get some value out of being more controlled and strict with myself with my writing. Only time, and hopefully this project, will tell.

Doom and Gloom

It is a really good thing that I don’t believe in portents, symbols, or signs because the start of this term has been an exercise in difficulties.


It feels a bit early in the semester to even begin talking about anything too technical (I don’t even know what project I’m going to be working on yet), but I can touch on something that I have been thinking about lately: stress, and dealing with it.

Within the list of public domain images tagged with “stress”, I found this, which I thought was funny.

I did not have electricity for five days leading up to (and partially including) the first day of the semester. Incredibly, this made it difficult for me to use my computer. The major issue with the (at the time) new status quo was that I go to school on my computer.

This stressed me out.

Luckily for me, I had a trip planned for the weekend before class started. A friend of mine was getting married in Humboldt county, and I had the honor of being one of his groomsmen. All I needed to do was get there! So I rented a big dumb truck to get me and four other attendees all the way up there and back. Naturally there was going to be heavy rain, flooding, and road closures to contend with during the two entire days of driving I was going to do.

This stressed me out.

Between driving, rehearsals, and the actual wedding, I pretty much had no down time. The final injustice the cold, uncaring Universe gave to me was having to work on the first day of school. As with all Monday’s since time immemorial, it was an unpleasant slog of a day. The only good news I received that day was that the power was back on. This allowed me, at 7 pm, to finally log into canvas, skim the course material, and see that I had three things that needed to be done before midnight.

This stressed me out, greatly.

Pretty much how I looked before I began evaporating.

A younger me might have lost it right there. Perhaps he would have dropped the class, and decided to try his luck next semester, or found something unimportant that really needed a deep clean. Thankfully for me, older me (who is also regular me), while exhausted and probably very stinky, was too tenacious to be put off by all the stress. Naturally, once I got to sorting out what needed to be done, and you know, actually reading stuff, I found that there was very little to be particularly worried about.

In the past, stress has caused me to do all kinds of silly things. The most unhelpful one being: procrastinating heavily. I had to remove this part of myself to get through this degree program, and I did. I wouldn’t have gotten this far if I hadn’t. Instead, if I ever felt myself slipping back into old habits, I would make myself work on whatever was in front of me, and worry about the implications and ramifications of the rest later. This generally works out quite nicely, probably because doing something is (shockingly) better than not doing something.

Many things leading up to this term stressed me out. However, after years of overcoming stress, I have begun to welcome it. No electricity? Time to start playing the phone charge rationing game. Bad weather road trip? I’m sure not every road has flooded. Last minute homework? Watch me do a “first day of CS 467” speed-run.

CS 467 Module 1|World Record Any% Speedrun 1:21:33 [Xbox 360]

I’m sure whatever project I get assigned will be full of challenges to overcome, and personally, I’m pretty excited to overcome them.