Reading and using common code between two separate Programs.

My understanding so far.


This is my first write up so I ask you not to be to harsh if it sucks.

I'm not a blogger by any means, so this is a conscious spew of what I think about something, in this case its the Readability of code (I know I just summed up what a blogger does but there is a standard in blogging that I won’t hit) and how shared common resources (more code) between programs can at one stage be a short-cut but later in the life cycle of programs, becomes a problem.

So I just started an internship where I just started using C#, having already studied and used Java and C++ the transition to C# wasn't difficult at all…..BULLSHIT. If somebody has told you this before, its a pile of crap, the transition is not simple as a matter of fact if you have the mentality that it will be simple because you know some Java or another Object Oriented programming language, it will be difficult, you HAVE to treat C# as it’s own language, otherwise you will have a false idea of what it is and how it works, you will attempt something that is relatively easy in Java but you cannot complete in C#. Even when you are reading this and you are thinking

“Well of course? how dare someone treat C# any other way, why would you even begin to look at it in any other way?”

well if you have 1-3 week(s) to learn the better parts of a language or the parts of the language that the company uses, in my case C# and the classes involved with handling data between databases and C# using SQL and using the correct data structure in order to complete tasks, I can guarantee the intimidation of the situation will force you to think any way about it that works best for you (or what you think works best for you).

So you've barely studied this language, you have a week or 3 to do so, and after that week you’ll be updating code that also happens to be confusing, un-commented code and the classes used throughout the code are also classes used in another program, so one will always work whiles the other does not, you realize that after the countless amount of times that you have clicked on a class name and pressed F12 in order to find out what a class does and where it becomes involved in what you are working on that a lot of the time, people build code that’s hard to change and unnecessarily complicated. When you are reading their code its literally like taking a scoop of spaghetti out of a pot and individually separating each piece of spaghetti and finding out, without touching, the characteristics of the spaghetti (the length, width, radius or whatever) and then every time you go to study the next piece of spaghetti you have forgotten what you had learned from the last piece because both are so similar, the classes of a program are the pieces of spaghetti in a pot. Some are ready to fall apart and some are still going strong. Like bad taste you find errors and depending on how good the last coder was and when edited the code you might find that the spaghetti tastes bad, and some of it is gone off or out of date.

However, finally, after all of the debugging and breakpoints and all of the checking and following method calls like a Rat Race you manage to understand the program, you matched word to meaning and now you’re ready to code and update what needs to be updated. But you would only be a fool to believe that now everything’s going to work and run smoothly, that the explainable, commented code that you have added will run smoothly with whatever was already coded before, and you’d be right, you would be a fool to think that that was the case. See you forgot that the code that is causing the problem is the code that should not be changed because another program uses these classes, so now you have become the little guy up in the top right hand corner there, the pug that cannot play the violin because he lacks in having an opposable thumb just like I lack in the knowledge of how to change what should not be changed to match the updates necessary in the code I have added to a program that should be stabbed to death be it an organism, rather than a file sitting on a hard drive.

The term overcomplicated would lack the anger I feel towards the code I am currently reading. No matter how good your intentions are, sometimes they don’t matter because you can’t even change what you need to for the greater good.

And I love it at the same time, it’s mentally challenging, it’s the kind of problem that sits with you until its fixed. The one that you know you can fix but instead you would rather do a write up about the entire experience, but that’s because at the end of writing this blog, after thinking about the program that much, I know the best way to fix it (I think). I always find myself referring to this comment made by a man who seems to know exactly how to think and nurture the mind,

“A black belt doesn't mean anything. The meaning is in the journey“ — Gunnar Nelson.

I don’t care about the fact that I'm about to fix this problem, what matters is what I've learned in the process of it all.

Email me when Anthony publishes or recommends stories