Re: [Discuss] php dev's code with warnings and notices
On 07/26/2014 08:11 PM, ma...@mohawksoft.com wrote: A properly configured and developed web site with no warning would probably only serve static web pages. Really? I've written code that produces no warnings or notices and I don't consider myself particularly exceptional at programming. I've written code that does have warnings and notices and feel I'm just being lazy. ...ask why you shouldn't be worried by the errors. See if they are aware of them and understand what they are before you cast judgment. Is there any valid technical reason for having warnings and notices in the php code? My gut tells me people are just being sloppy. Includes that don't exist and the like. If there are situations that need to be tracked I don't think the error log is the correct place to put it. Like John said about flooding the log. Heh, I'm used to being a loner. This team stuff is hard! - Eric ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] php dev's code with warnings and notices
Another reason to track down log messages is performance. I've seen PHP code that inadvertently logged a message on each iteration of a loop. When we removed the message, the web site performance *doubled* (i.e., page render time dropped by half). -- Dan Barrett dbarr...@blazemonger.com ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] php dev's code with warnings and notices
On 07/27/2014 12:22 PM, Daniel Barrett wrote: Another reason to track down log messages is performance. I've seen PHP code that inadvertently logged a message on each iteration of a loop. When we removed the message, the web site performance *doubled* (i.e., page render time dropped by half). Good point! We are having performance issues which I have to figure very shortly. Thanks, Eric ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] Verizon getting out of being regulated
MBR m...@arlsoft.com asked: Where does ATT provide landline service? They don't seem to be in Arlington. In San Francisco just like in Cambridge/Boston area, Comcast rules for broadband. But there are three other companies with broadband offerings: ATT DSL (uverse), Astound.Net (aka RCN before the California operation was split off), and Monkey Brains. That last one is a Shore.Net-like local ISP that managed to hang on through all the myriad shake-outs. Landlines are provided only by ATT (which bought out the baby-Bell PacTel years ago) so I'm sure the copper's getting ripped out here too. Time Magazine this week has an interesting graphic showing how the Internet industry's consolidation is accelerating. Comcast is about to swallow Time-Warner, the second-largest cable-modem provider. Regulators who are supposed to protect consumers against industry monopolies won't bat an eye as they approve this merger and all the unsavory business practices that go with it, ostensibly because the consumer-side services of the two companies don't overlap geographically so consumers won't lose any choice of providers. The whole net-neutrality debate is pretty much lost already; politicians hear only one side of the story (from Comcast and TW lobbyists) because voters in general have little concept of what it means. According to this article, 50% of the USA Internet market is now controlled by the top 30 ISPs. Consolidation is continuing to increase. -rich ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] php dev's code with warnings and notices
Eric Chadbourne asked: The code they have submitted works, but it has a bunch of warnings and notices in the logs. I personally think this is sloppy coding. My question is, how strong a stand should I take on this issue? I have the senior role but I am also the new guy. I've recruited a team of Ruby coders over the past year, and despite the green-fields status of the project (brand-new code-base) we found over 6000 exceptions in the code the first time we ran a tool called Rubocop to look for syntax sloppiness. We got one intern for the summer, a strong-willed Stanford sophomore, so I put him on the task of code cleanup. A couple days later, he pushed back with this very coherent argument: if you have me touch 150+ files but don't have full unit-test coverage, aren't you asking for more trouble than this cleanup is worth? My suggested response was that we gate the build pipeline with a Rubocop check (along with other static-analysis tools) for all newly-modified files, ignoring problems with the older files. Ultimately, we wound up just in the past few days opting to accept all of the intern's cleanup; we'll fix whatever logic problems crop up. But the team's still not fully convinced we've made the right choices. My suggestion for you, Eric, is to ignore the problem unless you have management buy-in (and a reasonable level of team consensus) to do the following: * Implement a unit-test code coverage tool that reports all lines that aren't covered by unit tests, if you don't have that in place already, and run it at least daily if not every build; * Get the test coverage well above 50%; * Block all code check-ins that worsen the problem (i.e. implement a static-analysis gate). Gating code check-in deserves its own post; there are git hooks, Jenkins static analysis scripts, etc; team members always have strong opinions about when to run what tools against which files during the development process. And no two people seem to agree on the integrated development environment (IDE) choice. -rich ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] php dev's code with warnings and notices
Eric Chadbourne wrote: The code they have...has a bunch of warnings and notices in the logs. I personally think this is sloppy coding. My question is, how strong a stand should I take on this issue? Part of this is going to depend on how practical it is to achieve no warnings in PHP code. I don't know the answer to that. But if you are accustom to achieving no warnings in your own PHP code, then yes, I'd agree this is indicative of sloppy code. Compiler/interpreter warnings can be a great tool for spotting problems. One of the first things I do in web browsers used for development is enable strict mode in the JS engine. I do likewise with MySQL. 'use warnings' (or the equivalent achieved through other means) is stock boilerplate for all Perl code I develop. I'd never deliver Perl code that triggers warnings. But Perl also gives you tools where you have fine gained control to override warnings in situations where the best solution to a problem is to bend the rules a bit. With JavaScript, that's a different matter, as not all browsers agree on what constitutes a situation warranting a warning. And there are some warnings, like function doesn't always return a value that can seem superfluous. As the senior developer, I'd definitely recommend setting the example by delivering code free of warnings, and cleaning up the code you happen to be touching for other purposes to eliminate warnings, but what you are facing is a cultural problem, rather than a technical one, and that can take time to change. If you're the only one submitting clean code, and your coworkers aren't on board with the value in doing likewise, you may find it to be a futile effort. -Tom -- Tom Metro The Perl Shop, Newton, MA, USA Predictable On-demand Perl Consulting. http://www.theperlshop.com/ ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] Seeking information on binaries called entities and fixup
Do they work on the old server but not on the new server? Or do they fail on the old server as well? If they work on the old server, then you can run them on some sample input and compare the input with the output to see what is being changed. If it's just mapping html entities, it should be easy enough to recode it in perl or python. On Sun, Jul 27, 2014 at 11:08 PM, Bill Horne b...@horne.net wrote: I'm moving the Telecom Digest to a new server, and I'm seeking information about a binary named entities, and one named fixup. I've found them in a script that processes emails into html pages for publications, but the script's author isn't available, and neither is working. AFAICT, entities is supposed to replace ASCII characters with HTML Entities where needed, and I don't know what fixup is supposed to do. All suggestions welcome. Bill -- E. William Horne William Warren Consulting 339-364-8487 ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss -- John Abreau / Executive Director, Boston Linux Unix Email j...@blu.org / WWW http://www.abreau.net / 2013 PGP-Key-ID 0x920063C6 2013 / ID 0x920063C6 / FP A5AD 6BE1 FEFE 8E4F 5C23 C2D0 E885 E17C 9200 63C6 2011 / ID 0x32A492D8 / FP 7834 AEC2 EFA3 565C A4B6 9BA4 0ACB AD85 32A4 92D8 ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss
Re: [Discuss] php dev's code with warnings and notices
On July 27, 2014 at 2:26 PM Rich Braun ri...@pioneer.ci.net wrote: Eric Chadbourne asked: The code they have submitted works, but it has a bunch of warnings and notices in the logs. I personally think this is sloppy coding. My question is, how strong a stand should I take on this issue? I have the senior role but I am also the new guy. [ stuff omitted] * Implement a unit-test code coverage tool that reports all lines that aren't covered by unit tests, if you don't have that in place already, and run it at least daily if not every build; * Get the test coverage well above 50%; * Block all code check-ins that worsen the problem (i.e. implement a static-analysis gate). What is a static-analysis gate? (Routine search revealed nothing.) peabo ___ Discuss mailing list Discuss@blu.org http://lists.blu.org/mailman/listinfo/discuss