Archive for January 6th, 2010

Revisiting old code

Wednesday, January 6th, 2010

At work, I’m fixing an old-ish application.  It’s a web app, originally written in 2000, last updated in 2003.  It’s amusing to see these old codes.

<tr>
  <td align="center" width="50%" nowrap>
    <font color="#0000ff" size="3">
      <strong>
        <a href="summary.php?id=" target="_top">
        <?php print $type; ?> Summary
        </a>
      </strong>
    </font>
  </td>
  <td align="center" width="40%" nowrap>
    <font color="#0000ff" size="3">
<?php
if ($type <> "P")
{
?>
      <a href="detail.php?id=<?php print $id;?>" target="_top">
      <strong><?php print $type; ?> Detail</strong>
      </a>
<?php
}
else
{
  print "<strong>&nbsp;</strong>\n";
}
?>
    </font>
  </td>
</tr>

Holy cow, the font tag? Which half of it does not work anyway? (The font color gets overridden by the <a> tag’s default color.)  And what’s this line 24?  Using PHP’s print tag to print straight HTML code… that’s not so bad.  But using <strong> around the &nbsp;.  That’s absurd.  And too many <font> and <strong> tags and such – those should be handled with CSS, especially because this is a part of a tabular data.

Man, old codes are scary.

Not to mention, the entire PHP code for the whole app was a huge mess.

Posted in Uncategorized | No Comments »

Kinpira – another recipe

Wednesday, January 6th, 2010

Since I get at least some positive responses on recipe posts, here is another one.  I made this tonight, and it’s delicious.  I just bought 4 burdock roots just the other day, so this is a perfect dish for me.  And it’s a perfect side dish I can put in my packed lunch.  It’s good warm or cold.

kinpira

Ingredients

  • Burdock root – 1
  • Carrot – 1
  • Soy sauce – 2.5 tbsp
  • Mirin (sweet cooking sake) – 2.5 tbsp
  • Red chili powder – 1/4 tsp
  • Vegetable oil – 1 tbsp
  • Sesame seeds – 1tbsp
  • Dashi – 50ml

 

Preparation

  1. Cut budock root and carrot julienne (see the picture)
  2. Heat up a pan well, on high heat
  3. Add oil, then heat it well
  4. Add chili powder, and mix well
  5. Add vegetables, and quickly sauté
  6. Add soy sauce, mirin, and dashi, and cook until half of the liquid evaporates – it doesn’t take long
  7. Stop the heat, and sprinkle the sesame seed

 

Notes

  • For vegetable oil, I use extra virgin olive oil.  Some people use regular vegetable oil, or sesame oil.
  • For dashi, I used the different dashi I used from the ozoni recipe.  This powder dashi is much handier, especially for small quantity like this.  I also use this dashi for miso soup every day.
  • The original recipe I used calls for 4 small whole chili peppers to be sautéed first, until they turn black.  I couldn’t find these tiny, hot chili peppers locally, so I substituted it with chili powder.  There’s some room for experiment in this area.
  • Sesame seeds are optional.  But it’s good for your health, so why not add it?  For extra goodness, you can have the sesame seed toasted lightly, then have it ground.  Now it won’t look as good, but it brings more flavor, and it’s easier to digest.

Posted in Uncategorized | 2 Comments »