Crappy programmers

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Both of you, naughty...
Image

Ninja, for you...
Image Image
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

The Ninja Space Goat wrote:This really goes against my beliefs, but I censored it for you wft. :evil:
Eck!

I think that is worse. 8O

His nipple is SMILING at me!

My eyes! My EYES!

:twisted:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Smiling Nipples... I think I thought of that name for a band once.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Image
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Welcome to the world of a PHP freelancer :P

So many times have I had to fix "something simple"...

Here is what I do...

Explain, sure it's a trivial fix once I find it, but that might take time due to the poor design, etc...

Also, know that, the code base is poorly designed and written and every fix is actually an adhoc hack, which will likley cause more bugs in the future.

At this point you may want to refer him to a non-biased third party PHP developer, to get another opinion...
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

Ninja,

You have completely and forever changed perception of a :D. Man, that's one of the most perverted :D I've ever seen. Your nipple didn't bother me at all. It was mosly the facial expression of my boss when he walked by and stared at your avatar for a minute. Any and I mean any explanation that this was a PHP board was pointless. Don't get me wrong I didn't get in trouble but I think my boss liked your striking pose. Keep looking for an email.

~w
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

When i see posts from people that are stuck with some crappy code... I always wonder where the good code is? So many people claim to write good, maintainable code... Yet noone ever seems to find that code...
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

timvw wrote:When i see posts from people that are stuck with some crappy code... I always wonder where the good code is? So many people claim to write good, maintainable code... Yet noone ever seems to find that code...
Sniff... Image I try...
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

I think a lot of it comes down to individual style. What is neat code for one person is messy code for another. What is readable for one person is illegible for another. What is necessary for one person is a waste of bytes for another.

In general, if you look at any big script that is not written by yourself, you always find yourself thinking "Why has he indented it like this?". "Why hasn't he split that long string onto multiple lines?". etc. etc.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

GM wrote:I think a lot of it comes down to individual style. What is neat code for one person is messy code for another. What is readable for one person is illegible for another. What is necessary for one person is a waste of bytes for another.

In general, if you look at any big script that is not written by yourself, you always find yourself thinking "Why has he indented it like this?". "Why hasn't he split that long string onto multiple lines?". etc. etc.
That isn't what I'm talking about... let me post some of the code I have to deal with hang on...

Code: Select all

<?
 echo'<style type="text/css">
<!--
@import url("../normal.css");
-->
</style>';
//require_once("./projfunc/data_func.php");
require_once("alerts.js");
require_once("./projfunc/selqueryPage.php");

//include ("style.css");
function redate($date)
{
	$data=explode('/',$date);
	$mm=$data[0];
	$dd=$data[1];
	$yyyy=$data[2];
	$newDate=$yyyy."-".$mm."-".$dd;
	
	return $newDate;
}



//$compid=$_REQUEST["conum"];
//$numrows=$_REQUEST["numrows"];
//$typedev=$_REQUEST['typedev'];
//$zoning=$_REQUEST['zoning'];
//$F=$_REQUEST["F"];


//Start Pagination process				

$approve=$_REQUEST['approve'];

if(!isset($_GET['page'])){
	$numrows=$_REQUEST['numrows'];
}else {
	$numrows=$_GET['numrows'];
}
if(!isset($_REQUEST['numrows'])){
	$numrows=10;
}else {
	$numrows=$_GET['numrows'];
}
if(!isset($approve)){
 $approve="NO";
}else {
	$approve=$_GET['approve'];
}
if(!isset($_GET['page'])){
	$page=1;
}else {
	$page=$_GET['page'];
}

$from=(($page*$numrows)-$numrows);
//echo "from=".$from;
//echo "numrows=".$numrows;
 $compInfo=propList(0,100000,'',$typedev,$zoning,$compid,$approve);
$Tmemdata=count($compInfo);


if($numrows=="all"){$numrows=100000000;}
$Tpages=ceil($Tmemdata/$numrows);
echo"<table width=800 class="bodycopy" cellpadding=7>
            <tr>
                <td>Select a Page<br />";
if($page>1){
	$prev=($page -1);
	
	echo"<a href="".$_SERVER['PHP_SELF']."? page=".$prev."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2"><<Previous</a>&nbsp;";
	
}
for($i=1;$i<=$Tpages;$i++){
	if(($page)==$i){
		echo $i."&nbsp;";
	}else {
		echo "<a href="".$_SERVER['PHP_SELF']."?page=".$i."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2">$i</a>&nbsp;";
	}
}

if($page<$Tpages){
	$next=($page+1);
	echo"<a href="".$_SERVER['PHP_SELF']."?page=".$next."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2">Next>></a>";
}

echo"</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align=RIGHT><a href="search.htm" ><img src="..\\images\\newsearch.gif" border=0></td></tr></table>";

//end paganation process


//echo $from.",".$numrows.",".$typedev.",".$zoning.",".$compid.",".$approve;

echo '<form name=compsearch method="post" action="">';
if(!$compInfo=propList($from,$numrows,'',$typedev,$zoning,$compid,$approve)){
	echo'<TABLE width="800"  class="bodycopy"  border="0" cellpadding="7">
  <tr><td>Sorry, There are no unapproved properties at this time. <br> <br>
       Would you like to see a list of all properties?<br><a href="complist.php?approve=YES"><img src="../images/viewprop.gif" border=0></img></a></td></tr>
       </table> ';
}else{
        echo'<TABLE width="800"  class="bodycopy"  border="0" cellpadding="7">

                     <tr>

                     </tr>
                    
           <TR>
               <td>
               <b>Address</b>
               </td>
               <td>
               <b>Type Development</b>
               </td>
               <td>
               <b>Reference Name</b>
               </td>

               <td>
               &nbsp;
               </td>
               <td>
               &nbsp;
               </td>
               </tr>';
        foreach ($compInfo as $data){
          $compid=$data['cell_0'];
          $add_id=$data['cell_9'];
                 echo "<tr>";
                 echo "<td align="LEFT">".$data['cell_4']."</td>";
                 echo "<td align="LEFT">".$data['cell_1']."</td>";
                 echo "<td align="LEFT">".$data['cell_5']."</td>";


echo'			<TD align="RIGHT">
				<a href=./PropEditEntry.php?compid='.$compid.'&F=2"><img src=".\images\edit-approve.gif" border=0></img></a>
				</td>
				<TD align="RIGHT">
				 <a href="javascript:confirm_ex(\'./PropDeleteEntry.php?compid='.$compid.'\',\'Clicking OK will permantly\n\n Remove this data, ARE YOU SURE YOU WANT TO DO THIS???\');"><img src=".\images\deleteprop.gif" border=0></img></a>
				</td>
				
			</tr> ';

echo "
                     <tr>
                        <td>
                         &nbsp;
                        </td>

                     </tr>
                    ";

        }
 echo"     <tr>
                <td>

                  Would you like to see a list of all properties?<br><a href="complist.php?approve=YES"><img src="./images/viewprop.gif" border=0></img></a>
                 </td>
             </tr> ";
 echo' 
	</table>';

echo' </form>';
}
?>
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

you call that crappy?! Ha!!!! i'd rejoice for that code..latest batch of code I had to work on I offered the guy a refund half way through just because I didn't want to do it anymore.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

I would start to cry if someone made me work with something like that.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

That's nothing, didn't you see my post in the I hate osCommerce thread?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

yea, that was insanely crappy jay. This is not the worst of it, but it's what I am working on right now, so I posted it.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

jayshields wrote:That's nothing, didn't you see my post in the I hate osCommerce thread?
oh
my
god

that's the worst that i've ever seen. i might even cry lol

also on the OS Commerse thing, there is Zen-Cart. it's better but not by much. it's what i'm working with now and i'd rather would have written my own *god*
Post Reply