Friday, October 2, 2009

Finding Middle Ground

Surprisingly this post will have nothing to do with the fact that it is 5:00 am and I've been programming all night.

I seemed to be having trouble finding middle ground in terms of code readability now. I just don't know how readable I should make it vs how compact and clean it should look. For example, the code in assignment 1. The backspace code Fardad wrote for us to be used in assignment 1 (which btw is broken, because it will corrupt the string if you press the backspace key when cursor is at the beginning of the line (curpos = 0 and offset = 0)(I'll remove this upon request since A1 is individual)) is about 9 or 10 lines of code, but I rewrote it to be less lines even though it included an addition condition statement (to fix the broken code) and I don't know if I have really impeded on the readability of the code. I won't post it due to the nature of the assignment but I know its gonna pester me while I write the code. Any general tips would be appreciated ^_^

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete