antfarmar / Unity-3D-Asteroids

A simple Asteroids clone. In 3D.
The Unlicense
65 stars 15 forks source link

Refactoring: New Screenwrapper Implementation #31

Closed antfarmar closed 8 years ago

antfarmar commented 8 years ago

I have implemented a more stable and robust screen wrapper, found in commit 48b988d.

I pretty much wrote it quickly to get the ideas out of my head and onto the screen. It therefore has minimal regards for readability, although not entirely. So far it is 1 large Update method.

It works well :+1:, but readability & flow could be improved. Some duplicated code may exist as well.

So I will be improving on it's current state as time permits, mostly by refactoring it to make it read like prose.

antfarmar commented 8 years ago

A preliminary refactoring: commit 9fe5b93 Screenwrapper.cs

antfarmar commented 8 years ago

My general attitude towards writing readable code is changing: :+1: :grinning:

These bad habits may have been a by-product of casually participating in timed coding competitions (TopCoder, HackerRank) and coding challenges (Project Euler, Rosalind Project), where solutions are written hastily or just simply solve one-off problems and don't require maintenance or revisits.

Large software projects with several team members is a different discipline entirely, and should be approached as such.