<div dir="ltr">Thank you Chris, Your point is well taken. Clearing the warnings has not been a top priority. When working on back end code, we are giving priority to security issues first, then functionality (trac issues and features), and if we have time we work on cleaning up the code. With 6.1 and 6.2 we have overhauled the client code. On the server side, however, we still have some legacy code. And as you noted, many undefined variables are source of warnings . We are working our way through these with each update. <div><br></div><div>Regards,</div><div>Sreenivas</div><div class="gmail_extra">
<br><div class="gmail_quote">On Fri, May 15, 2015 at 7:27 AM, Ramchandani, Narayan (DPC) <span dir="ltr"><<a href="mailto:Narayan.Ramchandani@sa.gov.au" target="_blank">Narayan.Ramchandani@sa.gov.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-AU" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My two cents – for what it’s worth.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If a function generates warnings, and lots of them – it highlights a deficient attitude on part of the programmer who wrote the code. This does not relate to the hard work put in or the gratitude owed to the developer – this fact only takes into account coding standards and software quality.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I wholly agree with Chris here – who has dared to take a courageous stance against poor coding practice –NOT against any programming approach/methodology/design pattern. I can understand if there are blaring errors in a fraction of the code, but if there are many (<b>Warnings: A message informing of danger) – </b>apparently in a<b> </b>single function - and<b> </b>we take a couldn’t-care-less attitude towards it – it shows poorly on the project quality – and that’s the issue being highlighted.<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It’s true that “</span><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">A man who never makes a mistake will never make anything.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">”, but the point here is to focus on quality that is being released en-masse. If we as open source software developers do not care (as much as we should) about the quality of software we release – this is only going to leave an ugly legacy for the future. Only when we face our shortcomings do we (become better people and) build better code – one line at a time.<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Narayan.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a> [mailto:<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a>] <b>On Behalf Of </b>Hamono, Chris (DPC)<br><b>Sent:</b> Friday, 15 May 2015 11:03 AM</span></p><div><div class="h5"><br><b>To:</b> <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br><b>Subject:</b> Re: [Vtigercrm-developers] <RANT>When coding do not turn off warnings!</RANT><u></u><u></u></div></div><p></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Alan<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Absolutely agree. But vtiger would not be producing “avalanches of warnings” if these had been addressed earlier. <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My subject line says it all, <b>When Coding</b> do not turn off warnings.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">All I am trying to do is make sure people START using good coding practices. It will take a long while for the code to catch up.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">With respect to patches…<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A major source of many of these warnings is the to_html() function, weirdly it is called on every element returned by the DB. I assume this was an early attempt at solving some sort of security issue. <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Fixing it means removing it from the DB code because it is not a good security solution and then dealing with the warnings it generates<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">When I asked for why it is used I get no response. As such I don’t know whether I should tackle it.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My question about fixing the charts issue was met with “sure we will consider your patch” even though it is a resolved problem.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If the devs were more open with their open source perhaps these things would be patched.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">And yes that’s why I tried out Yetiforce I assume Blazej will gladly accept patches. But it is nigh on impossible to switch gears this late in the project. Perhaps the next project.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Chris<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a> [<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">mailto:vtigercrm-developers-bounces@lists.vtigercrm.com</a>] <b>On Behalf Of </b>Alan Bell<br><b>Sent:</b> Friday, 15 May 2015 6:28 AM<br><b>To:</b> <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br><b>Subject:</b> Re: [Vtigercrm-developers] <RANT>When coding do not turn off warnings!</RANT><u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:12.0pt">well there are development settings and production settings for a reason, the idea is you develop with errors turned on, then turn them off for production. It would be rather nice if vtiger wasn't such a complete avalanche of warnings, it would make development easier. I want to see errors I caused, much better than staring at a blank white screen and guessing what the problem was! "Patches welcome" is a fair response to this kind of thing, it isn't hard to address most warnings, someone just has to get on and do it.<br><br>Alan.<u></u><u></u></p><div><p class="MsoNormal">On 14/05/15 21:55, Błażej Pabiszczak wrote:<u></u><u></u></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p>I completely disagree with you. All good security practices, which I have got familiar with, clearly describe principles for displaying errors. A user should only see errors handled by the application. Other errors such as sql, php, apache shouldn’t be visible and I don’t think there are any arguments against it.<u></u><u></u></p><p>Not a single application is ideal, but displaying errors is a serious breach of security and should never happen. A good example are websites with web server errors [e.g. 403, 404] that should be also handled by the application [should have its own error pages] because hakers can get information about software and its version from the default websites for server errors.<u></u><u></u></p><div><p class="MsoNormal">---<u></u><u></u></p><div><p class="MsoNormal">Z poważaniem / Regards<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"><strong>Błażej Pabiszczak</strong><u></u><u></u></p></div><div><p class="MsoNormal"><em>Chief Executive Officer</em><u></u><u></u></p></div><div><p class="MsoNormal">M: <a href="tel:%2B48.884999123" value="+48884999123" target="_blank">+48.884999123</a><br>E: <a href="mailto:b.pabiszczak@yetiforce.com" title="Mail do Błażej Pabiszczak" target="_blank">b.pabiszczak@yetiforce.com</a><u></u><u></u></p></div></div><p> <u></u><u></u></p><p>W dniu 2015-05-14 03:02, Hamono, Chris (DPC) napisał(a):<u></u><u></u></p><blockquote style="border:none;border-left:solid #1010ff 1.5pt;padding:0cm 0cm 0cm 5.0pt;margin-left:0cm;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">A note to developers, vtiger, yetiforce or otherwise.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">If you must recommend turning off php warnings in your code. You are doing it wrong!<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I cannot make this point strongly enough.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">There is a reason all compilers and interpreters spit out massive amounts of warnings. It’s because these warnings indicate where your code is SLOPPY.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">By ignoring those warnings you are potentially coding security risks and buggy code. uninitialized variables are the most common source of warnings and also the most common source of bugs.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">So if you tell users they must turn off warnings it’s a sign that the code is poorly written.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Chris<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><span style="font-family:"Courier New"">_______________________________________________<br><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><u></u><u></u></span></p></div></blockquote><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br><u></u><u></u></p><pre>_______________________________________________<u></u><u></u></pre><pre><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><u></u><u></u></pre></blockquote><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div></div>