Matthew Brown

+ Follow
since Apr 06, 2010
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matthew Brown

Remember that the first version of Java didn't include generics.  My speculation is that this was a compromise to be able to write general purpose array handling methods.

If you couldn't assign all arrays to an Object[] reference, then how (in the absence of generics) would you write a method like Array.sort that can sort anything you want without having a different method for every class?  
Then you meant to have JTextField rather than JTextArea?
7 years ago
I suspect there will be a universal pattern just as soon as we've managed to ensure all people are identical :-).
7 years ago
We can't see the code for FrameAnalyzer, but the first thing that leaps out is that you don't appear to do anything with the file you select, other than display its name. You don't read the file anywhere. And FrameAnalyzer.getWordCount() doesn't seem to have any way to tell what it's counting.
7 years ago
I love fresh mackerel. Tinned, not so much. To be honest, that probably goes for almost any fish.
7 years ago

Winston Gutkowski wrote:

Paul Clapham wrote:Didn't you use the passive voice in the underlined part there?

You see how pernicious it is?

Have you heard of the "by zombies" rule? If you can add "by zombies" after the verb and it's still grammatical, it's in the passive voice.

These make "sense", and so are passive:

"Mistakes were made by zombies"
"It's used to hide the subject by zombies"

These do not, and so are not:

"We made mistakes by zombies"
"They use it to hide the subject by zombies"

I suspect it isn't foolproof, but it's cute.
7 years ago

Winston Gutkowski wrote:

Stephan van Hulst wrote:That reminds me, I have a really bad habit of writing "it's" when I meant to write "its".

Yeah, it's a funny one that: contraction > possession.

It's not that strange when you realise it's a possessive pronoun - you wouldn't write "hi's" and "her's", would you? Or "him's" or "he's", for that matter. It's just that in this case the pronoun almost matches what you'd get if you appended "'s" to the original pronoun.
7 years ago

Campbell Ritchie wrote:I hope you are feeling better. I lived at Newport Pagnell a long time ago and had a job at Fenny Stratford and cycled via Woughton‑on‑the‑Green when it was a village.

Woughton-on-the-Green still feels fairly village-y (at least, it did last time I was there). Nice pub
- used to be our regular after-cricket drinking location.

Off-topic? What topic? Oh...sorry.
7 years ago

Stephan van Hulst wrote:I think that's because there is a much weaker link between English writing and speech in the first place. In most European languages, you can look at the word and you know how to pronounce it, even if you haven't seen it before. With English it's a lot harder. One of the well known examples is "Tough" vs "Though" and "Through".

I used to live in Milton Keynes. There were three nearby villages/districts called "Woughton", "Boughton" and "Loughton". Completely different pronunciations - if I remember it correctly they were Wuffton, Boreton and Louton (to rhyme with "cow-ton").
7 years ago

Brian Tkatch wrote:The musical forte comes from Italian, but the strong forte comes from French.

But we speak English :-). The etymology doesn't always determine the pronunciation (or even meaning!). The OED has "fort" as an older pronunciation.
7 years ago

Ryan McGuire wrote:One funny extension of this is when "me" is actually correct but the speaker uses the sonically less pleasant "I" because they mistakenly believe that "I" is correct. e.g. "When you finish the report, please send a copy to Janet and I."

I like the description of that sort of mistake as "hyper-correction" (the Wikipedia page on the term has this as the first example).
7 years ago
There's one phrase that doesn't annoy me, but I can't help notice whenever it's used. Because it is almost always misused.

"Come to fruition"

Fruition is a process. So this is exactly the same mistake as "rise to a crescendo" (the crescendo is the rise, not what it's rising to). It should be "Come to fruit".
7 years ago

Fred Sc wrote: I thought I had put the constructor in line 35.

Yes, you've added a constructor. It takes 4 arguments. You then tried to create use it using only three arguments.

Constructors aren't special in this respect - it would be the same with an ordinary method. If it expects 4 arguments then you need to call it with 4 arguments.
7 years ago
Hi Fred. Welcome to the Ranch!

So you're getting an error about a constructor. This is the only use of a constructor on that line:

tempArray is a String[], so tempArray[0] (etc) is a String. That means that this is trying to use a constructor ListOfPeople(String, String, String).

So what constructors does ListOfPeople have? You've got a ListOfPeople(String) and ListOfPeople(String, String, String, String). Does either of those match the one you are trying to use?
7 years ago