tag:blogger.com,1999:blog-2807403883562053852.post8811456087656692894..comments2024-03-27T08:40:31.785-06:00Comments on Clayton Cramer.: McCabe Cyclomatic Code Complexity MeasureClayton Cramerhttp://www.blogger.com/profile/03258083387204776812noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-2807403883562053852.post-23676490953233241812013-06-22T17:08:34.582-06:002013-06-22T17:08:34.582-06:00Why is it there is never enough time or money to d...Why is it there is never enough time or money to do it right the first time, but there is always time and money to do it two or three more times when the stuff hits the fan and the product doesn't work? I've worked in embedded automotive software for 25 years, and the software is as bad as I've ever seen it. Not helped by loads of offshore tadpoles laying turds in the code, and cycling in a new batch of tadpoles every 3 months. If I see another goto in C code I'm going postal...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-70934864533977501992013-06-21T22:52:25.273-06:002013-06-21T22:52:25.273-06:00I have yet to see a huge mess factored into multip...I have yet to see a huge mess factored into multiple functions that is harder to understand than the original. At a minimum, factoring means that you have some idea what different blocks were supposed to do, and often lets you get a high level definition of what the function is supposed to do.<br /><br />I suppose if the refactoring was done badly, it could make it worse.Clayton Cramerhttps://www.blogger.com/profile/03258083387204776812noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-75847032039899437492013-06-21T22:44:42.825-06:002013-06-21T22:44:42.825-06:00It's easy to take a large function and to brea...It's easy to take a large function and to break it into smaller pieces, but making the result easier to understand doesn't necessarily follow.<br /><br />A function containing a huge mess of tangled code can be hard to follow, but having a huge mess of small functions can be even more difficult to follow.<br /><br />Finding the right abstractions that will cleave a complex problem along lines that make the result easy to understand and to maintain is not easy.<br /><br />Which is why it happens so rarely.<br />jdegehttps://www.blogger.com/profile/01495457567906071678noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-86021115207629448732013-06-21T11:46:07.006-06:002013-06-21T11:46:07.006-06:00The first page isn't a hangman's noose?The first page isn't a hangman's noose?Clayton Cramerhttps://www.blogger.com/profile/03258083387204776812noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-39518550070222123632013-06-21T09:02:06.520-06:002013-06-21T09:02:06.520-06:00Yep. Been there myself. There's a decent book ...Yep. Been there myself. There's a decent book on the subject: "Working Effectively with Legacy Code" by Michael C. Feathers. Rob Crawfordhttps://www.blogger.com/profile/03010767328260010949noreply@blogger.com