From: Morton Goldberg Date: 2007-09-13T20:10:42+09:00 Subject: Re: Filling individual cells in a grid On Sep 13, 2007, at 4:25 AM, Joop Van den tillaart wrote: > Morton Goldberg wrote: >> On Sep 12, 2007, at 5:36 PM, Morton Goldberg wrote: > >> Well, I made some minor changes so I test for convergence, and I >> found that it does converge and fairly quickly at that. I reach a >> fixed point in on the 7th iteration. Here is the modified code and >> the results. Hope it's what you expected. > > First of all, many thanks for your help to this point... Once again, you're welcome. > It's a bit hard to explain but when I have to invent the code all by > myself I sometimes cannot come up with the working code. In my head I > know what needs to be done but to actually get the code for it...is > just > hard. I'm not too familiar with all the right ways to write code > because > of my fair lack of programming experience...as I said it's hard to > explain but as you said yourself it took a while for you to get where > you are now so maybe you have a bit of an idea of what I'm talking > about. Learning a programming language has much in common with learning a spoken language. You must have extensive practice with it before you learn to think in it. In your case, I infer programming is a side issue -- your main professional interests lie elsewhere. That may mean you will never get the time to master Ruby to the point where think about a problem and some code for expressing it immediately pops into your conscious mind. Don't let that stop you, you can still write useful programs although more slowly than someone who thinks in the language. But you must keep practicing Ruby or you will loose it, just as one loses a spoken language if one stops using it. > Then for helping me out all this time, I just hope you have, maybe > only > a little bit, a feeling of reward when you are able to help someone > out, > by making use of knowledge you have over the knowledge of others (in > this case me ^_^ )... > > I have been pretty active in the 3d modelling scene and on that field > there are also many forums where I've been walking around (and > still do > actually) and I have made some contribution in these forums to help > others out, and in my beginning stages being helped. For me helping > out > others always gave a good feeling, and in many cases I learned > something > for myself too. The person who helps another with a technical problem always learns. That is one of the main rewards of helping. > The internet is great for offering and receiving these kinds of > help in > times when one is stuck. > > Long story short: many thanks untill this point and you won't be > forgotten ;) It sounds to me that you think my most recent code actually solves your layout problem. But I don't. By now you know I always have second thoughts. My second thought on the latest code is that it gives an artificially low score to cells on the edge of the grid, which probably biases the result in some undesirable way. I couldn't deal with that without knowing how such low scores should be adjusted, and that's a not a coding issue -- it's a problem specification issue. So you will have deal with it. You may decide that my concern about edge cells is unwarranted. But if you decide to adjust the edge scores, I will be happy to help you integrate your adjusted scoring system into the Ruby code should you feel you need such help. Regards, Morton