Re: About speed
- Posted by ken mortenson <kenneth_john at ya?oo?com> Jun 03, 2008
- 592 views
Jeremy Cowgar wrote: > However, I know certain things will cause slow downs. Now, I develop the first > time not using those certain things. I certainly understand this. A programmer should learn from experience and develop good habits that usually means writing faster code to begin with. > Many people > say, refactor, refactor, refactor. Oh no!!! Your function is more than 3 lines > long!!! Refactor!!! What? You have nested loops!??!?!? Refactor! Make more > functions. Parrots make bad programmers too. I once had a loud discussion with a fellow programmer right outside the owners office not long after I hired on at a company. He was telling me about how 5 staff programmers had spent six months figuring out how to do something and that I was doing it wrong. It turns out I had written something that was functionally equivalent to what they'd spent 2.5 man years (yes, I know the man years are not quite accurate, they did do other things during that time, but still it took them six months) I did it in an afternoon, but I'd written it with inline code instead of factoring out certain tests. There is something to be said for, "do it because that's the way we do it." but I've always felt a bit of thought and reason should occasionally be injected (in small enough amounts so that no one gets hurt of course. I did end up factoring out the tests because that was better. Speed wasn't really an issue because it was plenty fast for it's purpose, which was field level validation. Oh, my boss did call us into the office to tell us he liked the energy level. That was strange. He was always talking about building cathedrals instead of bricks. > Going back and fixing speed issues should be done when you've done a good job > programming and it's still too slow. You're right. That's all I'm saying as well. You make a lot of sense, Jeremy. I expect we will continue to be apart on some of the details. "Science is the belief in the ignorance of experts." - Richard Feynman