Are Your Standards Up To "Code"?

20 Sep 2018

When learning new programming languages from different professors, you start to get a feel for how they want you to format your code. For example, when making a function, Professor Ravi wants his students to have the curly brace on a new line by itself, whereas some professors really don’t care about your format as long as you complete the task. This was actually true for me because when I was working on Java I never really cared how I formatted my code, the real objective was for me to complete the task, that was until I reached ICS 211. Working on the homework for that class wasn’t too hard of a task, the main difficulty was trying to figure out what was wrong with my code. Yes, I understand that Java tells or hints at you what the problem is but trying to trace your code was something that I could not do with my formatting at that time. The indentations for my code was off, there was no spacing in my function calls or with my functions in general. You could say that my code was fairly confusing to look through and I started to notice that it was a big problem because I would get confused after looking through it or tracing it too. Thus began me focusing on more of my coding style and less on completion.

Over the past week, I’ve been working with a new editing software called IntelliJ and Eslint, both are really good to use and I enjoy it. But I don’t really enjoy some aspects of the formatting, like having to put a space between the closed parenthesis and the open curly brace or having to make a new line after a closed curly brace. It’s these little nitpicks with the editing software that I don’t generally like, it’s possible that I don’t enjoy it because as of now it’s a hassle for me to get used to this coding style or maybe I just miss using my old editing software (which is atom). No matter what the reason is, I still should learn how to use different editing software so that I can expand my knowledge and be prepared when I’m put into that situation. I also feel that this can help me improve my formatting by picking out all of the little things that I forgot to type(although it might be a little annoying).

The main part of using IntelliJ is to have those pesky red error signs and try to have that green checkmark. As mentioned before, When I started using IntelliJ I had a sense of irritation only because my code wouldn’t work due to not having that space in between the parameter and curly brace or not pressing enter after a semicolon to create a new line. It was these small formatting mistakes that were causing my code not to run and it’s frustrating but is it bad to have those mistakes? No, it certainly isn’t bad to have those errors, it’s actually good that you have errors than having no errors. I perceive that red error as a way for the computer to tell me “this formatting is wrong you should try it like this”, for a person like me who’s somewhat bad at formatting and has a tough time learning new programming languages it’s good to have IntelliJ notify me right then and there if somethings wrong. Once you have that green checkmark it feels rewarding that you were able to have your code running.