Archive for category IT

What a twitterer

The observant amongst you will have noticed that a new section has appeared on the right-hand side of my blog: Tweets. I've finally decided to join a site which, up to a few days ago, I'd classed as one of the most pointless aspects of the internet to date. I then read something interesting relating to work, and discovered that I may well have a use for Twitter after all. I often see things on the internet or pick up little snippets of information which I think are interesting enough to post on this blog, but not necessarily enough in themselves to warrant an entire post. This is where Twitter comes in. I'm not proud about what I've done; it's just a tool.

"What's happening?" - I'm asking myself that very question.

"What's happening?" - I'm asking myself that very question.

I'll be using it to highlight nuggets of fun / interesting / intellectual stuff from around the internet and life in general. These will then pop up nicely on the main page of the blog for you to glance at next time you're passing. I haven't activated Twitter on my phone, my email account, or wired it into my eyeballs, and I absolutely will not be tweeting things like:

  • "Just woken up. Lol."
  • "Having breakfast. Lol."
  • "Just seen a pigeon. ROFL"
  • etc, etc.

So that's it really. If you absolutely must, you can follow my feed at http://www.twitter.com/hwwilliams, but I'd recommend just keeping an eye on it through the blog. There's less chance of you becoming infected that way. Alternatively, you can bookmark the RSS feed for my Twitter thing (account? feed? notices? tweets? I'm too old to know the right word for this), which lives here.

Tags: , ,

WTF is an RSS feed?

I realised a few days ago how much the way I use the internet has changed since the widespread availability of RSS feeds, and thought it might be useful to do a post on why they're so good. So if you haven't got a clue what's so great about the little orange icon, read on…

RSS is basically a way for websites to provide their content in a standard manner. Nothing too exciting there; you get a list of 'articles' in a feed, with each one linking to the website page which it relates to. The 'article' in the feed can be either the full story from the website, or just a summary.

An example of an RSS feed - the "News" page of ukclimbing.com viewed in Safari

An example of an RSS feed - the "News" page of ukclimbing.com viewed in Safari

You can view RSS feeds in browsers, email clients or specialised RSS reader programs. All feeds are presented in a standard format – this will vary slightly depending on the program you use to view the feed, but is generally clutter-free and easy to use. You can tell whether a website has an RSS feed because it will either have a link somewhere on the page called "RSS", "Atom" or "Feed", or may show the RSS icon:

<strong>RSS icon.</strong>

RSS icon.

Alternatively, you browser may tell you when it detects that a page has an RSS feed associated with it. For example, Safari puts a little "RSS" icon in the right-hand end of the address bar, which I can then click on to view the feed:

The "RSS" icon in the Safari address bar. Clicking the icon lets me view the feed.

The "RSS" icon in the Safari address bar. Clicking the icon lets me view the feed.

The good bit about feeds is that they are updated automatically each time new content is added to a website. Using the BBC News as an example, we can see that the RSS feed for the front page shows us the news stories:

The BBC News main RSS feed.

The BBC News main RSS feed.

When the stories on the website are updated, the feed updates to reflect this. Next time you view the feed, the new stories appear at the top:

The BBC News feed a few minutes later - note the new articles are posted at the top.

The BBC News feed a few minutes later - note the new articles are posted at the top.

That's pretty interesting, because if you have a feed covering an entire website, you can see all the new content in one place, quickly and easily. You don't have to hunt through menus and check various sections of the site. But the real power of RSS, for me, is shown when you bookmark a feed. I have lots of RSS feeds bookmarked in the toolbar at the top of Safari:

Bookmarks (including some folders full of bookmarks) in Safari.

Bookmarks (including some folders full of bookmarks) in Safari.

Although they look just like normal bookmarks, the beauty of RSS is that each time a feed is updated, Safari lets me know by putting the number of new articles in brackets after the bookmark:

RSS feed bookmarks, showing the number of new articles after each bookmark.

RSS feed bookmarks, showing the number of new articles after each bookmark.

If I click on the "Climbing" folder to see the bookmarks within it, you can see that Safari also shows me which feeds have been updated:

Bookmarked RSS feeds showing new stories in Safari.

Bookmarked RSS feeds showing new articles in Safari.

IE does a similar thing – it just highlights new stories in bold rather than putting the number of new stories after the title:

The RSS feed for this blog, bookmarked in Internet Explorer. New stories are highlighted in bold.

The RSS feed for this blog, bookmarked in Internet Explorer. New stories are highlighted in bold.

If I click on the bookmark to view the feed, and I get to see the new content. What that means is that the websites I'm interested in basically come and tell me when they have something new added. I don't have to trawl through all of my favourite websites each day to make sure I'm not missing anything, and I don't get exposed to any advertising because no-one advertises in their RSS feeds (yet!).

I've got loads of feeds bookmarked, with general news from climbing and biking websites, feeds which tell me when someone comments on this blog, feeds that allow me to see when any of my friends have been climbing, and to be told each time my uni mountaineering club website gets updated. You'll find feeds all over the place – you can be told about new posts in forums, for example. The key thing here is to let the internet come to you, instead of you having to chase around all over the place trying to keep up with what's going on.

So go on, try it out. You can view the RSS feed for this blog here. Alternatively, if you're only interested in one particular category of things I post, there are RSS feeds for those too (Gigs, Outdoors, for example). The stuff I've described above works exactly the same in Internet Explorer 8 (not sure about IE7), but I can't be bothered booting up the Windows machine to get the screenshots. If any of the above has just confused you, there's a decent guide to RSS on the BBC website here.

Tags: , , , ,

Java "Cannot find symbol" error

I've just tried compiling a project exported from one of our repositories. The export included some .class files, and when I tried to compile the project in Eclipse I got multiple error messages along the lines of:

cannot find symbol
Although this can be a classpath issue, I also found an interesting tip on a random forum. It essentially states that if you end up in a situation where existing .class files are older than your current source but have a newer file timestamp, you can get the above error.

The solution: delete any existing .class files and re-compile. It worked for me. :)

Tags: , , ,

Working with PDFs in OS X

I've just been playing around creating some eps files with gnuplot, and have subsequently had to convert them to PDFs for someone else to view. Turns out I wasn't aware of the following:

1) You can drag-and-drop pages within PDFs in Preview.app, to re-arrange the page order. You can also delete pages using the Edit menu (and add blank ones, if that floats your boat). More detail here.

Editing a PDF in Preview.app

Editing a PDF in Preview.app

I've also just discovered that you can use Cmd-R to rotate either a single page or all pages between portrait and landscape orientation.

2) If you're a fan of the command-line, there's a built-in script to join multiple PDFs. I originally found it on this blog (turns out they're investigating protein misfolding and aggregation, small world). Basically, you can find the script at the following location (all one line, obviously):

/System/Library/Automator/Combine PDF pages.action/Contents/Resources/join.py

If you want to add the path to your .profile file, don't forget to put it in quotes otherwise OS X will baulk at the spaces. To use the script, just go like so…

~ $ join.py -o output.pdf input1.pdf input2.pdf ... inputN.pdf

I'm not suggesting these are particularly life-changing pieces of news, but I wasn't aware of them so thought I'd spread the love.

Tags: , , ,

Phorm / Webwise exclusion

There's been a lot of fuss recently, even in the mainstream media, about Phorm and its Webwise service. The system is implemented by ISPs and replaces adverts in web pages with different ones "targeted" to your browsing habits. This is done by keeping a list of the websites you visit, and using the contents of those sites to determine what things you like and don't like. It's led a short but exciting life: initial trials by BT which were undertaken without the consent or knowledge of users have been suggested to be illegal by various different parties and are now being investigated by the CPS. The Information Commissioner's Office have stated that the service should be opt-in, not opt-out, and after not receiving a timely response from the government about whether the service breaches privacy laws, the EU are now suing the UK over the issue. Over 21,000 people signed a number10.gov.uk petition asking the government to ban it's use. Big names such as the Wikimåedia Foundation (the people who run Wikipedia amongst other things) and Amazon have opted out, and the Open Rights Group has written to others like Yahoo, eBay and Microsoft, urging them to do the same. Even the Privacy Officer of Facebook, who haven't got the greatest record on privacy, have suggested customers contact their ISPs about phorm. Phorm have admitted editing their Wikipedia entry to take out some critiscisms, and some anti-adware and anti-virus firms have reported that they will detect Phorm as adware or spyware. There's a good run-down of events over the past year on the BBC.

According to the Phorm site Webwise is currently being used or assessed for use by BT, TalkTalk and Virgin Media. Phorm state that the process is anonymous. They provide an option on the Webwise site to turn the service off on a connection-by-connection basis, and have recently stated that if you turn off the service then none of your traffic will go through their servers (previously it still went through, they just promised not to do anything with it). The service does not insert ads into pages at random, it only replaces ads which are already there.

So why should you care?

As an ISP Customer
While you may not care whether anyone monitors your browsing, you should at least be aware that it's happening, and you should know what's happening with the data. There will always be the argument that those with nothing to hide should have nothing to fear, but your data is your property. People and companies shouldn't be able to do with it what they want, whenever and however they want, and without informing you. It's explained in more eloquent terms than I can manage at badphorm.co.uk.

To see if your ISP is currently using Webwise, visit this pageon the Webwise site and click the 'You Can Choose' link on the left-hand side. You can opt out of the service from this area too, apparently.

As a Webmaster
Running a website, I want to be in control of what visitors see on my page. Even if I run ads (which I don't), I want to target those to specific areas and products or services. Phorm / Webwise takes that control away from me, and means that my site is serving up things over which I have no control. I also don't like the idea of all traffic for a sizeable portion of my audience being routed through the Phorm servers – I don't know what they are doing to link that information with data about the individual users and their browsing habits. I have nothing to hide, I just think it's silly to assume that you can just analyse the traffic of thousands of people and websites for your own business gain, without informing them or making the process entirely transparent.

Anyway, to opt out of the service, check out the instructions here. It basically entails sending an email with details of the request (i.e. the domains) to website-exclusion@webwise.com. You'll then receive an email from Phorm confirming that the domains will be excluded within 48 hours. Although this link comes from the BT Webwise site, my understanding is that the exclusion should apply across the entire Webwise system regardless of the ISP your visitors are using.

Tags: , , , ,

Objective-C / iPhone – Apple docs

Over the past few days I've started working with Objective-C, coding for the iPhone. I've not used Obj-C before, or indeed C/C++, so I really am starting from scratch both with the language and the platform. Going through the bookmarks I've amassed over the last 72 hours, most of them are from the Apple site. As the major backer of Objective-C globally, they have lots of documentation relating to the language. You'll need to register for an ADC account, which is free, and there's then a wealth of information available to you. I don't normally dig straight into documentation, preferring to work with online tutorials, but in this case I found the Apple reference docs to be by far the clearest. Their tutorials also explain why you're doing things, whereas a lot of others tell you what to type but don't give any justification for doing it. So below, is a list of

While Apple have loads of good documentation available, trying to wade through it all on their site is a bit of a nightmare (even just the iPhone reference library is huge), so I've compiled a list of what I found the most useful documents for a first-time Objective-C / iPhone developer. The descriptions are all Apple's too.

Objective-C

  • Objective-C Tutorial
    This document introduces the Cocoa application environment using the Objective-C language and teaches you how to use the Xcode Tools development suite to build robust, object-oriented applications.
  • Objective-C
    This document both introduces the object-oriented model that Objective-C is based upon and fully documents the language.

iPhone

  • iPhone Development Guide
    This document describes the iPhone application development process. It also provides information about becoming a member of the iPhone Developer Program, which is required to run applications on devices for testing.
  • Your First iPhone Application
    This tutorial shows how to create a simple iPhone application. It is not intended to give complete coverage of all the features available, but rather to introduce some of the technologies and give you a grounding in the fundamentals of the development process.
  • Foundation Framework Reference
    The Foundation framework defines a base layer of Objective-C classes. In addition to providing a set of useful primitive object classes, it introduces several paradigms that define functionality not covered by the Objective-C language.
  • UIKit Framework Reference
    The UIKit framework provides the classes needed to construct and manage an application’s user interface for iPhone and iPod touch. It provides an application object, event handling, drawing model, windows, views, and controls specifically designed for a touch screen interface.
  • iPhone Human Interface Guidelines
    Read this document to learn about the range of application types you can develop for iPhone OS and the human interface design principles that inform all great software. In this document you also learn how to follow those principles as you design a superlative user interface and user experience for your software.
  • Featured Sample Code
    – Use the code and design from these samples to inspire your own development. This is a list of featured sample code. A complete list is available in the iPhone Reference Library.
  • All Sample Code
    – All the available code samples, not just the featured ones.

Programming Tools

  • iPhone OS Developer Tools
    Xcode is Apple’s suite of development tools that provide support for project management, code editing, building executables, source-level debugging, source-code repository management, performance tuning, and much more. Xcode is not the only tool you use though, and the following sections provide an introduction to the key applications you use to develop software for iPhone OS.
  • Interface Builder User Guide
    Interface Builder is a visual design tool you use to create the user interfaces of your iPhone OS and Mac OS X applications. Using the graphical environment of Interface Builder, you assemble windows, views, controls, menus, and other elements from a library of configurable objects.

Tags: , , , ,

AVG LinkScanner – just say no!

In the past, I've used the free version of AVG anti-virus on a variety of machines both at home and at work. It always worked well, and was updated frequently. However, it's now on my List Of Things I Shouldn't Use.

The latest and greatest paid-for version of the software includes a feature called LinkScanner. This is designed to prevent infected websites installing malware on users' machines. A noble cause, but the manner in which it's carried out seems a little over-zealous. Basically, when a page is loaded, the LinkScanner feature will visit every link on the page and check whether it's classed as an infected malware site or not. It doesn't matter whether you subsequently click those links or not, they are all visited as soon as you open the original page. That means that every site linked to from that page has to serve up a page, using up bandwidth and costing them money, and also registers a page 'hit'. This is despite the fact that, in reality, no-one has really visited the page or seen it. If you're like me and have Google set to return 200 results at a time, then 200 websites will get these fake hits and bandwidth use for a non-visit.

Increased traffic on Wikipedia Watch (Copyright Wikipedia Watch 2008)

This has been spotted by The Register, OSBlues, and Wikipedia Watch, all of whom noticed funny things going on with their web stats, i.e. massively increased hit numbers to pages which shouldn't really be getting them. There's plenty more information and linkage on the OSBlues post.

One original fix was to redirect traffic based on the User Agent, but AVG have now altered the User Agent of LinkScanner to match IE6. That means there's no way to differentiate between real people and traffic from AVG's LinkScanner. They say that's because they're trying to simulate real user clicks as closely as possible to try and detect fraud. However, it's causing headaches for people left, right and centre as it messes up their web stats and chews through their bandwidth. AVG have stated that you "can't make an omlette without breaking eggs", but this seems completely excessive. There are currently 20 million users of AVG 8, with a further 50 million on version 7 with a potential upgrade to version 8. 

I can see what AVG are trying to do, but I don't believe it's fair for them to foist this onto webmasters without any kind of get-out clause. We should be free to manage our servers and bandwidth as we wish, and to monitor our users effectively, and for LinkScanner to masquerade as a normal user is out of order. Some users are already turning off LinkScanner and urging others to do so. Others are advising how to install AVG without the LinkScanner component (see comments here). Personally, I won't be touching AVG again, and will be advising all my friends who have it to either remain on v7, or to switch to Avast!

EDIT: It appears AVG have seen sense.

Tags: , , , ,

Eclipse Ganymede / PHP / SVN

The Eclipse Foundation yesterday released the latest version of the Eclipse IDE, named Ganymede (press release). This is the first attempt at synchronising the release of a new version of the IDE with new versions of plug-ins and 23 of the ~90 registered plug-ins have managed to come up with new releases alongside the main IDE.

Eclipse Ganymede splash screen

I use Eclipse for a few different things, including writing in Java, HTML, JavaScript, PHP and LaTeX. I downloaded and installed the JEE version of Eclipse, which obviously supports Java straight out of the box, along with HTML and Javascript (which you can now format automatically). However, in the Europa release of Eclipse I use the PDT project plug-in to support coding with PHP. The PDT set of tools isn't included by default with Ganymede. Unfortunately, the current release doesn't work on Ganymede, and there are no plans to release a new version until 15 September 2008. That means I'm going to have to stick with Europa for PHP until then, and I'm inclined to just use it for everything, rather than have two versions of Eclipse going on my machine. EDIT: Sasha has posted a comment linking to this page on the PDT Wiki, which details how you can get Ganymede playing nicely with the current version of PDT.

I haven't even tried to installed TeXlipse yet! EDIT: v1.2.0 of Texlipse installed OK, and will highlight syntax and show document outlines correctly. However, I've not been able to make it compile anything. A colleague at work had the same problem with Texlipse and Europa, while I never did, so this might be machine-specific.

First impressions of Ganymede are pretty good anyway, with the main exciting feature being built-in SVN support through the bundled Subversive plug-in. Well, to a degree at least. Before I could connect to our repository here at work, I had to install an SVN Connector from the following update URL in Eclipse:

http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/

I initially tried the JavaHL connector, but then actually read the documentation on this page, which states that JavaHL is "win32 only". So, I subsequently installed the SVNKit 1.4.something release (1.5.0 is available, but is an RC not a full version) and everything worked fine.

New view of Subversion repository through Subversive

First impressions of Subversive are good, with the software automatically knowing which folders are trunks, branches, tags, etc., and setting icons accordingly. I've not yet done any merging, but there seem to be big GUI improvements there over the previous SVN plug-in I was using (Subclipse). Subversive seems to be playing fine with our SVN server in general.

There's a good summary of the changes in Java on the Eclipse help site. For example, "Code clean up on save" lets you perform certain actions each time a file is saved, such as formatting the code, and removing trailing whitespace. There have been loads of improvements to Content Assist (the bit that tries to auto-complete code for you), which I won't detail here, but they're worth looking at. There's now a "Template for adding JUnit 4 test methods", although I've not tried it yet. In fact, there's so many improvements I'm going to just give you that same link again, and urge you to check it out.

So overall, Ganymede seems pretty good, and there are definitely some features in there which I think will prove useful. Roll on September and the availability of PHP in there, and I'll be a very happy bunny.

Tags: , , , , , , , , , , , , , , ,

Adobe Bridge installs Opera

I double-clicked on a PHP file the other day, hoping to edit it in Eclipse. However, a funny thing happened – it opened in Opera. That's not necessarily funny in itself, but it is when you consider that I've never installed Opera. I use Safari, and since installing Leopard I haven't yet had to test any websites with other browsers. A quick investigation showed that Opera was actually installed as part of Adobe Bridge. Click the image below to see the Opera binary sat happily in a sub-directory of the Bridge installation.

Opera browser sat happily in the Adobe Bridge folder

My initial thoughts were that it would be something to do with displaying help, but according to a couple of other blog posts and the comments in them (example), it seems to be used to preview how things will display on mobile devices.

I can't say it's really the end of the world as far as I'm concerned, I just thought it weird that I wasn't asked or told about it during the Bridge install (at least, as far as I know I wasn't!). But anyway, if Opera has turned up on your system without your knowledge, maybe that's why!

Tags: , , , , ,