I changed
code from script- to class-based & now all my tests are broken. I guess this = why proletariats hate object orientation. *hides*
-
Show this thread
-
Also, I'm actually being serious. I need to to redo all my tests.
3 replies 0 retweets 4 likesShow this thread -
Replying to @o_guest
If you use a refactoring approach you can keep working code as you gradually change. First struct->class, then each function->method 1 by 1.
1 reply 1 retweet 3 likes -
Replying to @jamespjh
I think you need to explain this a little more. Sorry!
1 reply 0 retweets 1 like -
Replying to @o_guest
instead of changing to your desired structure in 1 go, find a path of *tiny* changes to get there, fix tests after each. Known to be safer.
1 reply 0 retweets 3 likes -
1 reply 0 retweets 2 likes
-
Replying to @jamespjh
Ah, gotcha and thanks. So thankfully it's not that much code so it was only a single class that needed to be made and now I have converted
1 reply 0 retweets 2 likes -
the tests and am adding new ones. So far all work.
1 reply 0 retweets 3 likes
I think what I have learned from all this is that converting to class is very useful and I should have gone OO earlier. I have actually kept
-
-
the script way — just for fun. Although I might delete it just to keep the repo tidy.
0 replies 0 retweets 2 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.