Hello fellow 3081 students and faculty. My name is Sam Barris and this is my first semester at the University of Minnesota but I transferred from Normandale Community College so I am actually a junior. I am majoring in Computer Science and I hope to find an internship for this summer. All right enough about me, let's get down to business.
In this blog entry I will discuss two things from our intended learning outcomes that I know well and have previous experience with, and two things that I hope to learn and improve on.
The first topic I feel I know well is "writing effective comments". Now I am sure many of you who read this will laugh at me for choosing this topic, seeing as how basic it is, but it is also an important one. Writing meaningful comments is just the same as showing your work on a math test; the teacher grading your test wants to see how you got your answers. Or in our case the person examining your source code wants to know how your program works or what each part does. Without comments a lot of your codes meaning can be lost, level with me here, sometimes even you can forget why you put a while loop here or what this variable represents. Comments are the only way of programmers showing their work. No matter what language I am programming in, C or Java are the only ones I've learned that I find useful, I always write comments describing complex areas in my code. If I ever need to look back on an old assignment those comments can be lifesavers if you forgot how your code came together. That is why I feel it is so important to write effective comments. Everyone needs to remember, it doesn't matter if you got all the right answers on your math test if the teacher doesn't know how you got them. This topic actually goes along well with the next area I will discuss.
The second topic I feel I know well is "writing loops, and code in general, that are easy to understand". Nothing is worse than looking at some source code that makes no sense to your and has no comments or documentation. It might as well have been written in Greek! I know my next example is extreme, but it really does fit with this topic. Can anyone tell me what this C program does?
#include
<stdio.h>
main(int t,char _,char *a)
{
return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86, 0, a+1
)+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a )&&t== 2
?_<13 ?main ( 2, _+1, "%s %d %d\n"
):9:16:t<0?t<-72?main(_,t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\,/+#n+,/#;#q#n+,/+k#;*+,/'r
:'d*'3,}{w+K w'K:'+}e#';dq#'l
q#'+d'K#!/\+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;#
){n\l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\ n'wk
nw'iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c
\;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\#'rdq#w! nr'/ ') }+}{rl#'{n' ')#
}'+}##(!!/") :t<-50?_==*a?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a+1
):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc \i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m
.vpbks,fxntdCeghiry"),a+1);
}
Feel free to check out the original posting at: http://www.funenclave.com/reality-bites/most-confusing-c-code-7690.html
I bet no one can follow it; it uses a lot of recursive calls and pointers. In the end all it does is print out the lyrics to "The Twelve Days of Christmas". This code actually won the International obfuscated C code contest. Getting back on track to the topic, I always write loops and code that I understand and write comments on anything I might find confusing or don't want to forget. If you can't understand your own code no one else will either. In a very similar idea to Occam's razor, "the simplest answer is most often the correct answer" whenever possible write code that is simple and easy to follow.
The first topic I feel I don't know well is "tools for automation, scripting languages and build tools". Throughout my few short years of learning programming languages none of my classes have had me use a software automation tool. However, they sound very useful and interesting, things like test automation, build automation, and documentation generators would help a programmer speed up the process of designing and producing applications. One of my questions about this topic would be how often are these automation tools used in "real world" business style programming and how much is done manually? I am always very interested in what kind of tools are out there to help us become better programmers. I hope this class will show us these kinds of tools and how useful they can be.
The second topic I feel I don't know well is more of a general objective, "be able to program at an intermediate level in C++". I am sure many of my fellow students will feel the same way as me here, unless perhaps you already know C++. I want to learn C++ and be able to create useful applications with it. These kinds of skills also need to be transferable to any future internship I would be going into. At the end of this class and the end of this semester, I want to have confidence in my programming skills and understanding.
