00:00
00:00
MSGhero
Free time is nice time.

Nick @MSGhero

Age 30, Male

Somewhere in the North

Joined on 12/15/10

Level:
17
Exp Points:
2,848 / 3,210
Exp Rank:
19,855
Vote Power:
5.85 votes
Rank:
Police Sergeant
Global Rank:
6,514
Blams:
456
Saves:
937
B/P Bonus:
12%
Whistle:
Normal
Trophies:
6
Medals:
661
Supporter:
11y 4m 25d
Gear:
3

Comments

I generally equate elegance with conciseness, so when I'm coding I generally try to stick with the simplest/shortest solution. That means that I'll avoid factoring things out into reusable generic functions until I can actually save lines by doing so. I find that doing this lets you pick out which parts of the code are naturally similar, which in turn leads to more natural code reuse and organization, versus guessing that a generic function with a generic interface will be useful, even though you are currently using it in one place.

So I do start from inelegant code, but I clean it up as I go as I see fit, and generally, I try to avoid committing messy code. Then again, at my job, my coworkers place no value in rewriting code for the sake of making it better, so if I (or more often, one of my coworkers) commit bad code, I'm pretty much stuck with it. I hate my coworkers.

I would hate to have a programming job. Other people's code ugh.

I'm noticing in this refactor, some places I tried to make a very generic function. I look at them now like "Why does this exist?" I was probably trying too hard.