" /> Status for Andrew DeFaria: April 2007 Archives

« March 2007 | Main | May 2007 »

April 30, 2007

GPDB Enhancements/Fixes

  • Implemented gpdb_deleteSiteDomain
  • Modify site almost functionally complete
  • Looking into how to do what MySQL does with it's limit clause in Oracle
  • Changed List Projects at Site to be paged
  • Changed how Projects are displayed
  • Added most of the Project update page
  • Change some of the logic on login/logout
  • Change gpdb_putClearcase to set a global as to whether the record was added/updated or nothing changed.
  • Changed gpdb_add_vob.pl to:
    • Report better the number of Clearcase vob records added or not.
    • Add an UNKNOWN project for the site it's running at (if needed)
    • Properly select the appropriate UNKNOWN project

April 21, 2007

Why MS Word is a bad HTML editor

  • Described a little bit about why MS Word is not a good HTML editor

LeGrand, Christina wrote:

Larry, thanks for the great feedback! I have made the last three changes listed here - to the wording in the "Just the FAQs" section, the "ITS in the Customer Success Story, and the URL in the LDM docs section. Great catches! For the first two suggestions, all secondary titles are Arial 11, so I am not sure why they look different in your Outlook, but I believe you that they do. If anyone knows of how to prevent this, please let me know!

The proper way to "prevent" such things is to use the proper way to do such things. To do this one should follow the standards and then validate (as Regan said to Gorbachev "Trust but verify").

HTML headers should be done with the "H" tags of which there are H1 - H6. IOW one should not be putting any kinds of font information such as Arial nor point size in there. Such presentation information is best left to the eventual reader, who may not have the font you've chosen nor want Wingbats in Pink at 24 point!

However if you must code in a layout that's what CSS is for.

In any event Word, which this was made with, is an absolutely horrible HTML editor! And I shall now show you some of the reasons why. I hope you'll enjoy this ride as much as I will...

First off MS Word created HTML pages contain a lot of bloat. What Word does is include styling information at the beginning of the document to cover MS Word "styles" then applies "styles" to the layout. This is done, AFAICT, to attempt to get the web page to look "just like it did in Word". In a sentence - It's bad web design and bloat to your web pages let alone often non-standard and should be avoided at all costs.

Here is the beginning bloat:
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 11">
<meta name=3DOriginator content=3D"Microsoft Word 11">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C78350.D624B260">
<link rel=3DEdit-Time-Data href=3D"cid:editdata.mso">

<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
  
</style>
<![endif]--><o:SmartTagType
 namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"City"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PlaceType"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PlaceName"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"place"/>

<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PersonName"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
  
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState=3D"false" LatentStyleCount=3D"156">
 </w:LatentStyles>

</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-alt:Verdana;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.newslettertitle, li.newslettertitle, div.newslettertitle
	{mso-style-name:newslettertitle;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.newslettertext, li.newslettertext, div.newslettertext
	{mso-style-name:newslettertext;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.newsletterheading, li.newsletterheading, div.newsletterheading
	{mso-style-name:newsletterheading;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.newsletterbullet, li.newsletterbullet, div.newsletterbullet
	{mso-style-name:newsletterbullet;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
span.EmailStyle22
	{mso-style-type:personal;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;}
span.EmailStyle23
	{mso-style-type:personal;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
span.EmailStyle24
	{mso-style-type:personal;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
span.EmailStyle27
	{mso-style-type:personal-reply;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>

<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
  
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->

</head>
  
Now wasn't that fun? :-)

After creating all that crud we are now able to apply it to our content. Here's the part that does the heading:
<p class=3Dnewsletterheading =
style=3D'mso-margin-top-alt:0in;margin-right:
0in;margin-bottom:4.0pt;margin-left:0in'><span =
style=3D'mso-bookmark:OLE_LINK1'><span
style=3D'mso-bookmark:OLE_LINK10'><span =
style=3D'mso-bookmark:OLE_LINK11'><span
style=3D'mso-bookmark:OLE_LINK12'><span =
style=3D'mso-bookmark:OLE_LINK2'><span
style=3D'mso-bookmark:OLE_LINK3'><strong><b><font size=3D3 =
color=3Dblack
face=3DArial><span =
style=3D'font-size:12.0pt;font-family:Arial;mso-bidi-font-style:
italic'>DesignSync Documentation Has Moved</span></font><span
=
style=3D'mso-bidi-font-style:italic'><o:p></o:p></span></b></strong></spa=
n></span></span></span></span></span></p>
OK, not you tell me - where's the Arial 11 point in there?

I'm sure you've enjoyed the above exercise...

Oh, and how does this look in "straight" HTML?
<h2>DesignSync Documentation Has Moved</h2>

Turning on HTML for Exchange/IMAP

  • Described how to configure Exchange's IMAP server to server out HTML

I had worked on this before but I just want to document it here. I use Thunderbird and connect to Exchange servers via IMAP. Here at TI I was only getting plain text from the IMAP server. I was speaking to a friend of mine who managed an Exchange at a prior company we worked together at. I used TB and IMAP back then too and did not have problems with HTML'ized email from Outlook users:

Andrew DeFaria: In any event I'm nore interested if you have an answer to my question regarding Exchange/IMAP.
Andrew DeFaria: How do you configure Exchange to sent HTML email to IMAP?
Ron Van Scherpe: as far as imap goes,
Ron Van Scherpe: we don't use it here.
Ron Van Scherpe: but lemme check something
Andrew DeFaria: I could have sworn that while at Salira I used TB and IMAP to your exchange server and when Outlook users sent HTML'ized email I saw it in TB as HTML'ized.
Andrew DeFaria: Here at TI all I get from the IMAP port is just plain text. Seems to me that this might be an Exchange setting....
Ron Van Scherpe: yes..it's a server setting.
Ron Van Scherpe: they must have it set for plain text only because you have 3 options..
Ron Van Scherpe: plain text, HTML or both.
Ron Van Scherpe: we have it set to both here
Ron Van Scherpe: and we did at Salira.
Ron Van Scherpe: they're taking an MS approach
Ron Van Scherpe: they don't want HTML rendered hacks
Andrew DeFaria: HTML rendered hacks will happen more often in Outlook than TB is my guess.
Ron Van Scherpe: login in to the Exchange server
Ron Van Scherpe: open up ESM
Ron Van Scherpe: expand the server so that you see the Protocols...
Ron Van Scherpe: right click on the iMap virtual server and select properities
Ron Van Scherpe: click on the message format tab and select rendering type
Ron Van Scherpe: you'll have to restart the imap server
Andrew DeFaria: Great! And thanks! I'll send this along...
Andrew DeFaria: I owe you a beer (that is if they agree to it and implement it...)
Ron Van Scherpe: $50
Andrew DeFaria: OK a case!
Ron Van Scherpe: heh

April 18, 2007

Oracle limit clause

  • Modify site almost functionally complete
  • Looking into how to do what MySQL does with it's limit clause in Oracle

Oracle limit clause

Found this ugly workaround for MySQL's limit clause:

select * from (
  select rownum as limit, t.* from (
    select * from <table> where <condition>
  )
t) where limit between <lower limit> and <upper limit>

Hey it works....

April 13, 2007

Deleting Site Domains

  • Implemented gpdb_deleteSiteDomain

As we know, in GPDB there's very little in the realm of editing or validating of data. We've seen this with IP ranges where we let any old data in, including invalid IP ranges (let along the fact that the whole concept of IP ranges identifying sites is flawed to start with).

But as we can also see a site may have multiple domains (e.g. Dallas has many).

Site domains are implemented as their own table with the Site ID as the key and the "extended fields" of domain, IP range lower and upper being the data files.

-- site_domain_map: Table to map multiple domains to sites
create table site_domain_map (
  id                number      (10)    not null,
  domain            varchar2    (256)   not null,
  ip_range_lower    varchar2    (15),
  ip_range_upper    varchar2    (15),
  foreign key (id) references sites (id)
);

But nothing stops the user or worse yet, a script, from adding more than one site domain that is exactly identical! So we can have, for example, two site domains for Dallas that have the domain name of "dal.design.ti.com".

As if that is not enough a real problem come when one attempts to delete. Let's say somebody added a second "dal.design.ti.com" Site Domain, notices the mistake and wants to delete the extra one.

Currently the code deletes site_domain_map entries using the following SQL statement:

DELETE FROM SITE_DOMAIN_MAP WHERE ID = 1000007 AND DOMAIN = 'dal.design.ti.com';

This would delete both dal.design.ti.com entries, not just one.

I think the answer is to implement some validation such that people cannot add a second Site Domain of the same Domain name. Of course, this leaves the question is it considered legal to have two dal.design.ti.com Site Domains with different IP ranges. Which brings up the idea of validating not only a single IP range, but that no IP ranges overlap!

April 10, 2007

testcc.pl

  • Created testcc.pl. This script creates a test vob, test view, makes elements, checks them in, out, modifies them, checks them in again and compares! Basic Clearcase sanity testing...

April 9, 2007

Convert Dallas/Licensing/Solaris 10 testing

  • Changed gpdb_convertuk.pl to open and use the new Dallas database
  • cclic_report.pl reporting everybody as "UNK". Tried to run this in debugger and it just worked! Hmmm... Is this a cron problem? Running again tonight
  • Rick got the Jackson filer to mount to dslabcc01 however while I can create the vob storage area I cannot mount the vob!