FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Only Allow exec in CLI
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Only Allow exec in CLI [message #179209 is a reply to message #179205] Tue, 25 September 2012 13:46 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Tim Streater wrote:
> In article <k3s5u9$9hl$1(at)news(dot)albasani(dot)net>,
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
>> Tim Streater wrote:
>
>>> No checking of result codes required or error handling needed?
>
>> Yes. If they fail. they fail gracefully. and they leave errors in
>> their logfiles.
>
> Are they independent of each other then, such that they could be run in
> parallel? Or are there failure modes for program x that would mean you'd
> not want to run x+1 etc ??
>

The are quasi autonomous.

The data gathering parts stuff semi real time data in a database,. which
if it fails simply uses the previous value and copies it into 'latest'

i.e. it's of the form.

get last from database
If new data, overwrite it, else leave it
put it back in new database entry.

That was written first to get the data into the database way before
other code was written to summarise it and graph it

I kept it separate because I did not want to risk the data gathering
operation whilst I wrote the analysis and presentation stuff. Bugs in
that, that cause crashes, do not corrupt the data.

It was a context specific decision. The sort of thing Jerry simply
doesn't understand. Its not 'The Right Way' but in this case I felt it
was the optimal way.

Mutatis mutandis, the code could have been written in PHP or C. I chose
C because I am more familar with its way of handling errors. And it has
slightly better tools to deal with things like timeouts on sockets and
so on.

In short the two languages are pretty equivalent : PHP has better screen
output tools and HTML specific tools - the ability to spit out raw HTML
without 'printf' -ing it is the one reason I use it.

But I hate its sloppy typing. Its a hacker's language.





>> And because C has better tools, they can be deigned to fail gracefully.
>
> What tools are you referring to?
>>> In your case you have 4 lines of code and run 4 executables. In my
>> app I > have some 11,500 lines of PHP and still run just the 4
>> executables.
>>>
>> I rest my case :-)
>
> <smack> :-)
>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advice for Literature on PHP-Based Web Development Business Models
Next Topic: Count how many times a value occurs in an array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 01:54:49 GMT 2024

Total time taken to generate the page: 0.05134 seconds