A couple of months back I wrote two articles singing JavaScript’s praises from a programmer’s point of view (JavaScript – Much more than Java’s Mini-Me & Hidden JavaScript). In the last one I hinted that there would be a follow-on article showing a darker side to JS. This is that article, just a few months later than I’d planned. Unlike the previous two articles this one is not really aimed at programmers, it’s aimed at anyone who surfs the web.

JavaScript (JS) can be used to really enhance usability on the web. We all like having drag and drop capability on the web, we like the way AJAX lets pages only refresh the bits that need to change instead of whole pages, and we even like those cool JS transitions and graphic effects. A lot of people refer to these things as Web2.0, but I’m not going to. I prefer to think of Web2.0 as being about community involvement rather than any particular technology. It’s a frame of mind not a software version! You can have Web2.0 without JS or AJAX. The key point is that we are all getting used to the enhancements JS can bring to the web environment. But there is a cloud on the horizon and it is growing.

The sometimes controversial security expert Steve Gibson has been warning us about the dangers of browsing with JS turned on for years now. In the beginning people ridiculed him, but his views are gaining more and more acceptance as the dangers start to become real rather than theoretical. I think the recent MySpace JS worm and the release of proof-of-concept code for a JS port-scanner by SPI Labs have really started to focus people’s minds on the dangers of JavaScript.

[tags]JavaScript, JS, XSS, Security[/tags]

Read more

Tagged with:

I’m pretty sure this is useless on most versions of Linux because the default DHCP plugin that comes with the Nagios Plugins distribution has this functionality and seems to work just fine everywhere except on RedHat-based distros like RHEL, Centos and Fedora Core. On these systems the default plugin does not seem to work and fails to detect any DHCP servers. This plugin is different to the one I gave instructions for before which tests whether a particular DHCP server is answering requests, this plugin finds rogue servers, it will not alert you if any of your actual DHCP servers are down. Hence, you should probably install both. This plugin is not very polished, it is rough and ready but I know it works on RHEL4. If you’re running a different system you may have to do some minor tweaks but this should serve as an excellent starting point none-the-less.

[tags]Nagios, DHCP, RedHat, RHEL, CentOS, Fedora, Linux[/tags]

Read more

Tagged with:

I’ve often complained that students don’t get taught the important stuff they’ll need for programming in the real world when they study for computer science or even software engineering degrees. I was pretty sure I’d brushed up on my Java enough that I had all I needed to write Java code in the real world but I was proven very wrong over the weekend when I spent literally an entire day on what turned out to be one line of code. The problem was that I had a gaping hole in my understanding of how the JVM works and how programs can interact with it, I was totally ignorant of the power of Class Loaders.

Read more

Tagged with:

Java going Open Source is old news at this stage but it’s taken me a while to digest. Ideologically I think it is a great move, I’ve always been a little annoyed that Java was not GPL or similar. So it’s good for me as an Open Source fan, but is it also good for me as a Java Programmer? That’s what I’ve been trying to figure out for the last few days and in the end, I think it is.

[tags]Java, Sun, Open Source, GPL[/tags]

Read more

Tagged with:

I’ve been a CVS user for years but have spent most of those years cursing its short-comings. The main reasons I stuck with CVS despite this were:

  • Lock-in – there is a lot of code in both my personal CVS repository and the one for the EVE project. If it ain’t broke …….
  • Maturity – CVS has been around for donkey’s years. The code is stable, people know how to use it, and there are loads of tools and tutorials out there. Subversion is a lot newer and still changing.
  • Inertia – it took a lot of poking and prodding over the years to get people using CVS, people don’t want to have to start the learning curve all over again!

I’ve been reading about how great subversion is for ages but had never quite gotten round to trying it myself. The reason I hadn’t tried it was because I’d never had an excuse to dedicate scarce time to it. However, a few weeks ago people in work started voicing an interest in Subversion so I took that as my cue to finally give it a go.

[tags]Source Control, CVS, Subversion, SVN[/tags]

Read more

Tagged with:

Hidden JavaScript

Filed Under Computers & Tech, Software Development on October 27, 2006 | 2 Comments

This is the long over-due follow-up article to JavaScript – Much more than Java’s Mini-Me which I want to get published now because I’ve just started another JS article that I think needs to come after this article. I want to finish evangelizing the good things about the JS language before I take a look at JS’s dark under-belly. The next article has the working title JavaScript and AJAX on the Web – a Liability? and should be out within a week (at least that’s the plan).

In my previous JS article I discussed fundamental language features that JS has that give it the ability to do things many other languages just can’t. These features give the programmer extra tools that the common high-level languages like Java just don’t have. In this article I won’t be looking at anything as earth-shattering as that, I’ll just be looking at some nice features JS has that tend to get over-looked by JS programmers.

[tags]JavaScript, JS[/tags]

Read more

Tagged with:

On OS X you can run a JARed Java App by simply double clicking the .jar file. This works but it has a few downsides. For a start you can’t keep the app in your dock so you can launch it easily and you also can’t easily launch it with things like HimmelBar. Secondly it will always have the Java JAR icon and if you’re running a few Java JARs this can get very confusing. What you really want is the same Java App but wrapped inside an OS X App. Examples of this would be the OS X version of jEdit. If you have the Developer Tools (XCode) installed on OS X this is trivial to do. If you don’t have the developer tools installed you’ll find and installer for them on your OS X DVD.

[tags]OS X, Java, Application[/tags] Read more

Tagged with:

Struts has support for indexed properties in its form beans. In fact, it has support for both simple and complex indexed properties. Ironically I have been able to find lots of documentation online to explain the more complex situation but none for the simpler one. I have been able to find documentation on using arrays of beans is form beans but not of arrays of simple literals like strings and integers. And I’ve done a lot of googling on the matter. Having the ability to have an array of strings in your form bean is a very handy feature. This is a very handy thing to be able to do and you’d be right to assume that it should be simple, and it is simple, it’s just not documented anywhere I could find (and I spend a lot of time looking). So, to help others who might be stuck with the same problem here is a worked example that should make it all clear.

Read more

Tagged with:

Something that has annoyed me for a long time is that JavaScript is looked on by many people as just being a stripped down version of Java. You take Java, you take out most of the features and you get JS. This is completely wrong. The two are two completely different languages which follow different paradigms. One is Hard Typed and Object Oriented, the Other is Loosely Typed and Object Based. To give you an idea of just how different the languages are I would say that Java is to JavaScript like C/C++ is to Perl. I.e. they are completely different languages in just about every respect but their syntax is superficially similar.

Far from being a stripped down version of Java, JS is in many ways a more powerful language and is certainly more feature-rich. And I’m not talking about little conveniences that make programming a little easier but major features that make some things all but impossible to do with Java but which JS does simply and naturally. In this article I’m going to look at some of these features. While I was writing this article, I came up with many less dramatic advantages which JS has over Java, which just make things easier with JS. Initially I had also included those in this article but they made it too long for the modern attention span. Instead, I’m compiling them into a separate article with the working title Hidden JS which I hope to publish within the next week or so. The inspiration for this article was a post by Joel Spolsky entitled Can your programming language do this? which details one of the advantages JS has over Java.

Read more

Tagged with:

Something I’ve always had a lot of trouble with is developing good colour schemes for web pages. (The fact that I’m rather colour blind does not help matters!) I generally end up falling back to a mono-chrome scheme where the site just uses many different shades of the same single colour. This works but often leads to sites that look a little boring. I need to skin a new web portal at work that I want to make look good and professional to speed up it’s adoption so I decided I just had to get to grips with this colour thing. There is no magic quick fix but here are two links I found in-valuable and that I’m sure will also be a great help for others trying to get to grips with this:

Tagged with:

« go backkeep looking »