I got to turn this:
<?php $i=1?>
<?php query_posts('category_name=Projects2&showposts=3&orderby=rand'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php if($i==1)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
elseif($i==2)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
elseif($i==3)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
else
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php } ?>
<?php $i++; ?>
<?php endwhile; ?>
<?php wp_reset_query();?>
<?php query_posts('category_name=Projects2&showposts=3&orderby=rand'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php if($i==1)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
elseif($i==2)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
elseif($i==3)
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php }
else
{?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
<!--content end--></div>
<!--set set1 end--></div>
<?php } ?>
<?php $i++; ?>
<?php endwhile; ?>
<?php wp_reset_query();?>
Into this:
<?php query_posts('category_name=Projects2&showposts=3&orderby=rand'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
</div><!--content end-->
</div><!--set set1 end-->
<?php endwhile; ?>
<?php wp_reset_query();?>
<?php while (have_posts()) : the_post(); ?>
<div class="set set1">
<div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
<div class="content">
<a href="#">
<?php $values = get_post_custom_values("image"); ?>
<img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
</a>
</div><!--content end-->
</div><!--set set1 end-->
<?php endwhile; ?>
<?php wp_reset_query();?>
Needless to say, my client will no longer be outsourcing to India.
#1 by Hector Virgen at June 3rd, 2010
If I got paid by the number of lines of code I write, I’d go with the first one.
#2 by Lauri at June 21st, 2010
Found your blog via your Stack Overflow account, the title of this post made me laugh.
Having just enjoyed a nice dinner I picked up from an Indian restaurant nearby, I must conclude that besides lines of code in their software (apparently), some of them also exaggerate the amount of cilantro in their cooking!
#3 by vineeth at October 21st, 2010
Making a remark to a country on basis of some coding done by some particular individuals is very cheap… its frustrating when i come across such comments u may not know if that coding was done by a college student ,, and not a professional
#4 by Avi at November 3rd, 2010
I see (in the blink of a second) that you had to do a *lot* of work to squeeze the code
Some Indian (student perhaps) fooled your client and you (apparently) double fooled him ..
#5 by Yisrael Dov Lebow at May 30th, 2011
Re #3
I have come across awful code that also came out of india, a professional outsourcing company. I don’t know if it is representative of all Indian coders, or all outsourcers or just bad luck.
#6 by Yisrael Dov Lebow at May 30th, 2011
BTW the pictures don’t work any more
#7 by Junaid Atique at June 13th, 2011
Well Indian coders bid for a project that is, for example, worth of $100, $20. There is so much poverty in india that they only want work regardless of its efficiency. They are ruining our efficient industry, I must say…
#8 by Rafi Hecht at August 17th, 2011
INDIA = I’ll Never Do It Again