September 2008
Monthly Archive
Tue 23 Sep 2008
Posted by Frank Kim under
WebNo Comments
This is from my friend, Chris Weekly.
I think it is necessary for us to be precise when we talk about “security popups” as there are many different kinds.
Some of these are always preventable, some are unavoidable in certain scenarios, all vary according to the browser version and its user config.
Anyway here’s a kickstart:
- SSL Certificate Warnings (various) - Triggered on HTTPS URL’s on domains with an expired or self-signed certificate.
- Insecure Content Warnings - Triggered on HTTPS URL’s when the page contents embed references to HTTP resources (images, iFrames, stylesheets or scripts).
This is preventable by proper JSP/taglib usage. Note it is ok for links to use http:// even in https:// pages as they’re not automatically followed.
- HTTPS to HTTP Redirection Warnings - Triggered when an HTTPS request triggers a redirect to an HTTP URL.
This is unavoidable in some scenarios but should be avoided by design whenever possible.
- HTTP/HTTPS Switch Alert - Triggered when simply navigating from HTTP to HTTPS or back.
This is out of our control, but most browsers don’t have this on by default, and users tend to turn this global setting off after seeing it once or twice (on any site) as it’s so common and harmless.
- Content not under this site’s control (New) - Apparently resulting from the recent Microsoft security patch.
I believe this is triggered by scripts which are not on the same domain as the page requested.
This is most likely to arise w/ 3rd-party tracking pixel-related scripts. Needs more investigation.
Update: I may have made an incorrect assumption that it related to recent MS security updates; it might instead be triggered by attempts of javascript on one domain to interact w/ the page on another domain. Which script and whether this is in fact the root cause of #5 is TBD.
There are others but I think these are the main ones we’ve been dealing with lately.
Thanks,
Chris
Thu 18 Sep 2008
Posted by Frank Kim under
PerforceNo Comments
Perforce branching is pretty simple.
Say you want to create a branch called
//depot/fkim/foo
First you would add it to your client.
//depot/fkim/foo/... //fkim/foo/...
Next you would do an integration from where you wanted to cut the branch.
p4 integrate //depot/work/foo/... //depot/fkim/foo/...
Then you would submit the integration and the branch will be created and updated in your client work space.
p4 submit
Thu 18 Sep 2008
Posted by Frank Kim under
WindowsNo Comments
Windows NTFS has a nice but relatively unknown feature called NTFS junctions. It is like hard links in Unix except it is only for directories. Microsoft has a KB article about it which points to several utilities. However I have been using Mark Russinovich’s junction tool exclusively.
Using Junction
Usage: [-s] <directory or file name>
-s Recurse subdirectories
If you want to create or delete a junction, use Junction like this:
Usage: [-d] <junction directory> [<junction target>]
To delete a junction specify the -d switch and the junction name.
Here is an example of using junction. Note that the order of arguments is opposite of the Unix ln command.
> junction foo d:\docs\foo
The above example will create a junction called “foo” in the current directory. This junction will point to d:\docs\foo.
To do the same in Cygwin:
$ junction foo `cygpath -aw /d/docs/foo`
One tip is to use the DOS dir command. It will display <JUNCTION> instead of <DIR> in directory listings for junctions.
Mon 15 Sep 2008
Posted by Frank Kim under
ATGNo Comments

Photo taken by Stephen Laham.
Mon 1 Sep 2008
Posted by Frank Kim under
Java SENo Comments
To create a Java method with a generic return type one can write a method like this.
protected static T evaluateExpression(String tagName, String attributeName,
String attributeValue, Class expectedType, Tag tagRef, PageContext pageContext)
You can learn more at this Java Generics FAQ.
Mon 1 Sep 2008
Posted by Frank Kim under
Java SENo Comments
I thought this article, Effective Java Collections, was excellent. Here is the summary of the article.
- Use the isEmpty() method of the collection.
- Avoid returning
null to mean an empty collection.
- Create an empty collection using
Collections.empty***() methods.
- Iterate through collections using the foreach form when possible.
- Use the proper collection, Collection, Map, Set, List.
- The left side is always an interface! (So is the return type of methods.)
- If you’re explicitly casting, chances are something is wrong. Use generics.