Hi,first of all, thanks for your interest in "Samsung Tools" project, which is rather slack at the moment (along with the whole project "Linux On My Samsung"). The main reason is that I've lost interest, I'm starting to dislike Samsung products, and it just does not feel right to waste my time to fix their products.

The "Samsung Tools" code is far from perfect, it was written in a fast way to make it usable in short times. In fact, the first thing in my TODO list was code refactoring (which I never did for the said lack of interest).

That said, I was looking at your changes, they seem good to me except for some "simplifications" you did which in result make the code harder to read, and I prefer readability over the syntesis.

voRia, I just wanted to draw your attention to this post. I tried many times to contact some developers of some python projects. They just ignores any additions.After all. Can you accept my addition request to your jabberID? We can talk in it about code parts that you don't like and take a solution

If user look at code, he should know python or basis of programming. Python as original is easy to understand. Making program slower for better reading is a bad tone. Need a average of it. All web-developers doing optimization of their code: they using 1/0 instread of true/false in js. they using obfuscation and something else.

voRia wrote:

I don't use jabber anymore, I completely moved to my google account (GTalk/Hangouts).You can contact me there or by email.

So, accept GTalk addition. I using both: jabber & gtalk. GTalk is almost jabber, it based on xmpp protocol.

Making program slower for better reading is a bad tone. Need a average of it. All web-developers doing optimization of their code: they using 1/0 instread of true/false in js.

While I don't use python myself, I must say that I object to that statement.

As Knuth himself said1:

Donald Knuth wrote:

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil

Your code does indeed have the advantage of making the code more compact, which would have been worthwhile in the bad old days of 25-line terminals. Today we can all afford to see 100+lines of code at a time, and compact code is no longer a necessary boon. (And if you have a clever enough editor it can probably be folded away.)

At the same time - don't make any premature pronouncements on performance without running the code through a profiler! Modern compilers are pretty clever at optimization, and I'm pretty sure that using '1/0' instead of 'true/false' won't result in different machine code.

@mrDoctorWho:I agree with you on your last example, it's just a banal error from my part, writing code too fast without taking a proper look at it afterward. There was other code in that if-else block which I removed later and I forgot to remove the if-else block itself.

Yet, this example does not prove your point, the previous code snippets posted are not errors, they are good and perfectly readable as they are.Also, I don't think optimization is that much important here: samsung-tools does a very simple job and it's not crucial to be as fast as possible. On the other hand, code readability allows me (and you ) to easily work on the code.

_________________

Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum