View Single Post
Old 12-15-2014, 10:29 AM   #253
Rizla
Member Retired
Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.
 
Posts: 3,183
Karma: 11721895
Join Date: Nov 2010
Device: Nook STR (rooted) & Sony T2
Quote:
Originally Posted by twowheels View Post
That's not what I was addressing with my comments, but that said, the previous programmers could have hard-coded assumptions about the sizes all over the place, making changes very difficult indeed. It is possible, and I've seen such bad code before.

Edit:

For example... if they passed around the values as ordinals indicating which one, rather than the actual size, such as "font_size = 3, margin = 1", then adding a new value would be very hard as the code everywhere (and it could be logic that is poorly duplicated in many places) expects the value to be one of 0...9 for font and 0..2 for margin (assuming 10 font sizes and 3 margin sizes -- I don't remember exactly how many there are, I don't look at the dialog very often). Adding intermediate sizes could be very difficult.

Given how the dialog is laid out, and how the original requirements were probably specified to match the current dialog I would not be the least bit surprised if the first developer coded it exactly like that as I've seen many people do that. As a system architect and lead developer, getting developers (even some with many many years of experience) to think of the problem in generic terms that makes for easily extensible programs in the future is something that drives me to near insanity.
Sorry, but I find your text a bit hard to read, which is why I didn't read it thoroughly before. I think what you're saying is the sizes are "effectively" hard-coded in the software rather than being simply passed via a function and therefore being flexible. I appreciate it's not true hard-coding, but I hope you understand what I mean.

I suppose it's possible. I had assumed Amazon would have used the most basic of good practices in their software. It's hardly rocket-science. I find it hard to believe that Amazon would do what you are suggesting. It flies in the face of common-sense software practice that has existed for the last thirty odd years.

Sorry, I can't believe they would do that. Why would they do that? It makes no sense. Perhaps I misunderstand what you're saying.

Last edited by Rizla; 12-15-2014 at 10:33 AM.
Rizla is offline   Reply With Quote