magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Archive for ‘May, 2006’

I’ve been asked this question about a googilian times, and so thought it worth a blog post.

So how exactly do you get rid of annoying (browser) popups on your computer?

h3. Turn off windows messenger service.

This is typically disabled by default, but it’s worth checking. I believe some ISP’s will even filter this traffic out – some don’t The windows messenger service allows computers on a network to send each other messages, however it doesn’t stop spammers sending you messages. Turning it off though is quite easy, as “this article(itc – How to Disable Windows Messenger Service)”:http://www.itc.virginia.edu/desktop/docs/messagepopup/ shows.

h3. Download a Spyware finder

Many nasty programs that for unknown reasons aren’t caught by virus checkers can be responsible for causing popups. Lukcily the two best programs for finding and removing them are free. “AdAware personal”:http://www.lavasoft.de/software/adaware/ and “SpyBot”:http://www.spybot.de/ both do a great job. AdAware is my current favorite purely because it has a slightly nicer interface.

No matter which one you download, make sure you update it, then run a scan, and remove anything it finds. I’d suggest running this once or twice a week

h3. Make sure you run Windows Update.

Assuming you’re running Windows XP the latest service pack 2 includes a firewall which may help things. The updates will also fix security holes in applications like Internet Explorer which will allow spyware to be installed in the first place. If you don’t have Windows XP, consider a free personal firewall like “ZoneAlarm(Free, Personal Firewall)”:http://www.zonelabs.com/store/content/catalog/products/sku_list_za.jsp?dc=12bms&ctry=US&lang=en&lid=nav_za

h3. Stop using Internet Explorer.

IE has some security holes which can allow dodgy programs (likely to cause popups) to run on your machine. Instead consider getting “Firefox”:http://www.mozilla.com/firefox/ or perhaps “Opera”:http://www.opera.com/ and using those instead (both are
free). These browsers also have code to stop websites from trying to open new windows when you browse to their sites.

h3 Get an up to date anti-virus program

If you don’t want to buy something, grab “AVG Free”:http://free.grisoft.com/doc/1. If you want a commercial one, I can recommend “Panda anti virus”:http://www.pandasoftware.com/. Make sure which ever program you’ve got is set up to scan often and automatically download updates.

h3. Change your OS

An extreme measure! I run both Windows and OSX – I’ve taken the steps above and don’t get any popups on my Windows machine, but I’ve never had to worry about popups at all on OSX. Moving to OSX probably isn’t an option for most people, but if you are looking for a change you might want to consider it. As an aside there has yet to be a single documented example of a virus in the wild affecting a computer running OSX. That’s not to say it won’t happen, but compared to the number of Windows viruii out there it can be considered the safer option.

NYPD Blue

You heard me right. After years of being ignored by the only people with the rights to show it (thanks Channel 4), the Best Cop Show In The World Evar, “NYPD Blue”:http://en.wikipedia.org/wiki/NYPD_Blue, is back on in the UK – this time on UK freeview channel “More 4”:http://www.channel4.com/more4/.

Now I only hope that unlike the West Wing we haven’t missed a series, and that we’ll get to see series 10 through to the final 12th with some regularity, rather than the gap of a year or three that we’ve come to expect from it’s treatment at the hands of channel 4 thus far.

When connecting to a database from Java, it’s very handy to tag your connections. When tracking down performance issues and monitoring at a database levels, being able to seperate out your program’s connections (which could come from a variety of machines). Most database drivers allow you to specify a program name when creating your connection.

With SqlServer, you can specify a program name “on the query string(The MS SQL Server Driver – connection properties)”:http://edocs.bea.com/wls/docs81/jdbc_drivers/mssqlserver.html#1074599 of your JDBC connection. However with Oracle it’s not quite as simple. I spent ages trying to track down how to do this with Oracle, but it seems that where Oracle is concerned useful documentation lies behind expensive consultants or registration screens. Eventually resident database guru (thanks Jason) sent me a snippet of code which does exactly that, and I’m blogging it here for prosperity (and for consumption by the Google spider).

This code opens a connection with the name Test. By querying the database’s @v$session@ dictionary view we can see each connection from our application (by the way, good luck searching
Google using a $ in a search term). @v$session@ exposes a variety of information – including the program name. The final lines of the code prints out the program name of every session currently connected to the database, helping confirm that the snippets code has worked.

class SetProgram
{
  public static void main (String args [])
       throws SQLException
  {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());

    java.util.Properties props = new java.util.Properties();
    props.put("v$session.program", "Test");

    // Connect to the database
    Connection conn =
      DriverManager.getConnection ("jdbc:oracle:thin:user/tiger@localhost:1521:xe",
				   props);

    // Create a Statement
    Statement stmt = conn.createStatement ();

    // Select the PROGRAM field from the V$SESSION table
    ResultSet rset = stmt.executeQuery ("select program from v$session");

    // Iterate through the result
    while (rset.next ())
      System.out.println (rset.getString (1));
  }
}

h3. Specifying program name with C3P0

When configuring this value using the “C3P0(C3P0 – Java database connection pool)”:http://sourceforge.net/projects/c3p0 connection pool, if you want to specify properties like @v$session.program@, you cannot configure login and password using the normal @setPasword@ or @setUser@ methods as it gets its knickers in a twist. Instead you’ll have to place those in the properties object which you pass to the connection pool using the @setProperties@ method on @ComboPooledDataSource@.

This is worth noting, as where @setUser@ and @setPassword@ will be JDBC driver agnostic, the properties bundle passed in isn’t – or more correctly, the properites themselves aren’t.

Amazon web evangalist Jeff Barr will be “giving a talk(Unixdaemon – Jeff Barr in London)”:http://blog.unixdaemon.net/cgi-bin/blosxom.pl/events/aws_jeffreybarr.html on their webservice offerings at Westminster University on the 15th of May. Unfortunately I’ll be unable to attend – I’d of liked to pick Jeff’s brains about “S3”:http://www.amazon.com/gp/browse.html/002-7839271-9683254?node=16427261 off the back of my “recent post(magpiebrain – Is Amazon S3 the first tier 0 Internet service?)”:http://www.magpiebrain.com/blog/2006/03/21/is-amazon-s3-the-first-tier-0-internet-service/ – but I’m sure it will be an interesting event.

If you want to attend make sure you contact organiser Dean Wilson (email: dwilson at unixdaemon.net) so he can let you know of any changes. I’ve added the event to the London 2.0 calendar too.

I suspect this post has a very small audience, although I suspect that goes for the blog as a whole. Anyway, what follows is a step by step instruction for using Outlook 2003 to read your Lotus Notes email.

h3. Assumptions

This has been tested and works for Windows XP, Lotus Notes 6.5.4 (although the MS bridge should work for Release 5 and up), using Outlook 2003.

h3. Download the Microsoft Conntector

It’s “available for free(Microsoft.com – Outlook 2003/2002 Add-in Notes Connector)”:http://www.microsoft.com/downloads/details.aspx?FamilyID=8EBBBA59-5F17-4E52-8980-C4F0DFA92D65&displaylang=en from Microsoft. It states it works for Outlook 2002 and 2003, for use with Notes release 5 or 6.

h3. Uninstall Microsoft hotfixes

It seems that Outlook 2003 security fix “KB892843”:http://www.microsoft.com/Downloads/details.aspx?familyid=1D156043-B041-4305-8442-3C4E3B832788&displaylang=en stops the connector from installing properly. Unless you remove it, you’ll get the error @”Unable to open your default e-mail folders. The server is not available.
Contact your administrator if this condition persists@. This hotfix is also included in some roll-up fixes, so I suggest you remove any and all Outlook related hotfixes. These hotfixes only affect the installation of the connector, so you can re-run Windows Update afterwards.

You can remove hotfixes from the Add/Remove program dialog – just make sure you have the @Show Updates@ checkbox ticked. The Outlook hotfixes will be listed under Microsoft Office.

h3. Install the connector

Shut down both Notes and Outlook. Double click the connector and follow the on screen instructions

h3. Set up Outlook to read your notes email

Start Outlook up. Select @E-Mail Accounts…@ from the @Tools@ menu. Select @Add a new email account@, click @next@, and select @Additional Server Types@ and click @next@ again. Depending on your configuration, you’ll be presented with several server type options. We want @Microsoft Offie Outlook Connector for IBM Lotus Notes Domino@. Click @next@. You’ll now be prompted to exit Outlook before the new account will be active.

Outlook should pick up your notes file automatically.

h3. Re-install the Oulook Hotfixes

As you wouldn’t want to forget that, would you 🙂

Anyway, that should be it. You’ll now have a slightly more usable way of accessing and sending you email, as well as working with calendars and your todo list. Note that you’ll be unable to read all notes email – those sent with high encruption levels (the ones you can’t send to non-notes email accounts and that can’t be forwared) will not show up, but you should get told that they can’t be transfered by the connector.