You know what I like about taking Part Time Studies computer classes at BCIT at night? The crowd is a little older, and they’re all already nerds.
I’m taking COMP1451 this semester, which is part two/continuation of COMP1409, “Introduction to Object Oriented Programming” For this class, we’ve been using BlueJ as the… well, I don’t want to call it a development environment, but it kinda is. It’s pretty cool, it’s great for illustrating concepts using Java, but it’s not really a full-on Java development tool.
We’re just over half-way through part 2 of the course and tonight the instructor introduced Eclipse. Eclipse IS a full-blown Java Development Environment, and we spent the evening learning (and re-learning) the differences between what we thought was Java and what really is Java.
One of the exercises we did was to use Eclipse to generate constructors and source code automatically, saving a lot of grunt work typing of really basic things. In BlueJ, one of the things you could do was hit ctrl+m and it would insert a new method at the cursor, complete with javadoc comments. You could fill in what you needed, take out what you didn’t and carry on.
* An example of a method - replace this comment with your own
* @param y a sample parameter for a method
* @return the sum of x and y
public int sampleMethod(int y)
// put your code here
I used that shortcut a lot, and even developed a little muscle-memory to ctrl-M every time I needed to create a new method. I asked the teacher if there was something similar in Eclipse to save a few keystrokes and she wasn’t sure. We poked around a bit in the Source menu before she said “well, I guess you’ll have to do it the old-fashioned way” and pointed at the keyboard.
I entwined my fingers, turned them inside out as if to crack my knuckles and said “A keyboard. How quaint…” I reached for the mouse, picked it and spoke into it like a microphone “Oh, Computer…” and without even imitating a bad Scottish accent, the instructor, the TA and the two guys on either side of me cracked up.
Someone later pointed out that that movie is 25 years old, but ya know what? Classics never get old.