KBD

Keith Devens .com

Saturday, March 20, 2010 Flag waving
Follow the path. – me
← Movie takebackThe Ultimate Weblogging System →

Daily link icon Wednesday, July 30, 2003

The perils of shared servers

It bugs me that we have people like this writing code that (potentially) has to run on the same server as mine. Sigh.

← Movie takebackThe Ultimate Weblogging System →

Comments XML gif

127.0.0.1 (http://abulman.co.uk/) wrote:

I wouldn't worry about it much, with the semi-colons at the end of the 'for' lines, he's mainly just counting to 270 eight or nine times.

∴ 127.0.0.1 | 30-Jul-2003 1:01pm est | http://abulman.co.uk/ | #2586

Keith (http://www.keithdevens.com/) wrote:

The larger point is that he doesn't have a clue what he's doing, which is dangerous.

A lot of times, people do really dumb things like nested loops doing SQL queries in the inner loop (which is really bad). And the tables won't have indexes to boot. They'll include() files by typing in their domain names, like include("http://foo.com/include.php"), rather than simply include("./include.php"), which makes apache do a network request for each include.

So the issue isn't just what this particular code happens to do... For instance, I'm not even sure that he didn't mean to select the sum from the database 270*9 times, that he doesn't have 270 fields in each of his tables, nor how many tables he has that he's selecting from.

Keith | 30-Jul-2003 1:17pm est | http://www.keithdevens.com/ | #2587

63.247.131.116 (http://abulman.co.uk/) wrote:

All true, all the more reason I'm glad I run my own systems.

∴ 63.247.131.116 | 30-Jul-2003 1:34pm est | http://abulman.co.uk/ | #2590

Ben (http://www.trollscript.de/blog) wrote:

Perhaps someone should explain to him how GROUP BY and JOINs work. No, better not, he should look it up himself. Smiley winking
As long as he's still getting parse errors, I wouldn't worry too much. But if he advances and tries out what happens with infinite loops... you can only hope that he's smart enough to do his testing on a local system.

∴ Ben | 31-Jul-2003 2:57pm est | http://www.trollscript.de/blog | #2601

Mean Dean (http://www.healyourchurchwebsite.com) wrote:

Ah, cut-n-paste programming. My favorite.

We should find out where this guy works. While I agree with Ben, this is definately a SQL solvable situation, I'm wondering if this guy really needs tables A through I? I'd be curious to know why there are so many tables with the same field in all of them.

∴ Mean Dean | 1-Aug-2003 4:20pm est | http://www.healyourchurchwebsite.com | #2608

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.116s.

(Used 8 db queries)