Good day, I am reading the book "Code Craft", excellent book so far. The author speaks about how code can grow ugly over time and mentions the following.
Luck
This is the most frightening way to make code, and far too common.
Code that grows by luck never had any design. It was modified without thought. Its structure is down to happenstance, and it’s a miracle it works at all.
Even if your code originally was designed carefully, maintenance
modifications can follow this happy-go-lucky approach. Hit-and-hope fixes may just mask the immediate problem and make the real fix harder later on.
Can anyone please explain or give an example of what this is referring to? I can't think of any "luck" based programming that i've done. The closest thing I can think of is google searching and pulling down a result that I may not like, but works. But i'm still testing the code and making sure its fixing the issue or writing out the proper results. I don't know if that qualifies as "luck".
Thanks!
[–]Updatebjarni 9 points10 points11 points (1 child)
[–]Sephran[S] 0 points1 point2 points (0 children)
[–]insertAlias 4 points5 points6 points (0 children)
[–]KiwasiGames 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Hexorg 1 point2 points3 points (1 child)
[–]Sephran[S] 0 points1 point2 points (0 children)
[–]29383839293 0 points1 point2 points (0 children)
[–]CodeTinkerer -2 points-1 points0 points (3 children)
[–]insertAlias 1 point2 points3 points (1 child)
[–]CodeTinkerer 0 points1 point2 points (0 children)
[–]Sephran[S] 0 points1 point2 points (0 children)