betweenGo

Archive for September, 2008

Browser Security Warnings

by on Sep.23, 2008, under Web

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:

  1. SSL Certificate Warnings (various) – Triggered on HTTPS URL’s on domains with an expired or self-signed certificate. 
  2. 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.
  3. 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.
  4. 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.
  5. 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

Share
Leave a Comment more...

Perforce Branching

by on Sep.18, 2008, under Perforce

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
Share
Leave a Comment : more...

NTFS Junctions

by on Sep.18, 2008, under Windows

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.

Share
Leave a Comment more...

ATG Prius

by on Sep.15, 2008, under ATG

Photo taken by Stephen Laham.

Share
Leave a Comment : more...

Java Method with Generic Return Type

by on Sep.01, 2008, under Java SE

To create a Java method with a generic return type one can write a method like this.

  protected static <T> T evaluateExpression(String tagName,
      String attributeName, String attributeValue,
      Class<T> expectedType, Tag tagRef,
      PageContext pageContext)

You can learn more at this Java Generics FAQ.

Share
Leave a Comment : more...

Effective Java Collections

by on Sep.01, 2008, under Java SE

I thought this article, Effective Java Collections, was excellent.  Here is the summary of the article.

  1. Use the isEmpty() method of the collection.
  2. Avoid returning null to mean an empty collection.
  3. Create an empty collection using Collections.empty***() methods.
  4. Iterate through collections using the foreach form when possible.
  5. Use the proper collection, Collection, Map, Set, List.
  6. The left side is always an interface!  (So is the return type of methods.)
  7. If you’re explicitly casting, chances are something is wrong. Use generics.
Share
Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!