97 karma · joined July 13, 2008
I wouldn't generally use it to design code that hadn't been written yet. There's a lot you only discover once you get something working, and that needs to inform the design.
That's an extremely cogent observation about capitalism, but it would be just as relevant in a discussion about FP and OO, or about team social dynamics. Across the board, I see people doing better work when they spend less time seeking philosophical consistency and purity, and more time responding to real observed situations.
It obviously doesn't work well for you, so I strongly recommend not doing it.
Why is it so terrible that people are playing with interesting, creative, sometimes crazy new ideas, and sharing their results?
That said, it certainly depends a lot on context. My team at work has tried full on switch-every-ninety-minutes Promiscuous Pairing a couple of times. Once, it worked really well: everyone started knowing the code much better; we got more done; we spent less time stuck and confused and more time producing quality software. Another time, it was a nightmare: everyone felt rushed and confused; it seemed like we were constantly being interrupted; we never felt like we were getting anything done.
I'm not entirely sure what made the difference. Our going explanation is that, the second time around, we had a higher baseline level of interruptions already, so the constant switching just added stress and made it impossible to focus. We haven't tried switching that aggressively since then (although we've been considering it lately, as the circumstances seem better for it--that's why it's on my mind right now). On the other hand, it's still rare for us to switch less than once a day, and that's been absolutely great.
As you say, it's perfectly possible to build a good community if you're willing to put some work into it. People who run community-oriented sites mostly know this by now.
But a lot of sites pick up communities accidentally. Blogs tend to have comments enabled by default. Adding a forum to a site sometimes seems like a simple idea that will make users happy. Social networking features seem like a must have for some kinds of web apps, even if they aren't the main focus. And of course, these accidental communities inevitably decay until the reek of them spreads through the whole site.
I think a lot of people are remembering that they didn't actually want to run communities in the first place. They added community features because it was the path of least resistance, and now that they've seen where it leads, they're turning them off rather than sinking a lot of effort into making them work.
I'm pretty happy with the development, personally. The communities I like are going to stick around, and as for the others, well, there are more than enough places to have flamewars already.
(Disclaimer: I turned off comments on my own blog a couple of months ago. It's made me a happier person, but I may be projecting just a bit.)
I started using IntelliJ a few years ago, when I came onto a Java project after several years using vim and Python, and I'm convinced it made the transition a lot less painful.
The difference between IntelliJ and Eclipse may be smaller than it feels to me now--IntelliJ is what I'm used to, after all, so using Eclipse involves adjusting to a subtly different interface--but I'd still say it's worth a try. There's a free version, so there's not really anything to lose.
Operations on collections:
List<String> result = new ArrayList<String>();
for (String word : words) {
result.add(word.toUpperCase());
}
return result;
Accessor methods: private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
And arithmetic on user-defined types: new Dollars(15).plus(new Dollars(25)).times(new Percentage(80))
This bulky, uninformative, junk code is a real barrier to readability, and these are just simple examples. Sure, it's possible to work around it, and to keep the badness contained, but it still means time wasted for anyone who needs to maintain it.We started writing some code in Groovy on our large Java project at work a few months back, and it's been a revelation. Groovy feels like a bit of a hack in all kinds of ways, but we're still delighted with it, because being able to say:
return words.collect { word -> word.toUpperCase() }
or: String name
or: (new Dollars(15) + new Dollars(25)) * new Percentage(80)
just makes it _so much easier_ to see what's going on at a glance. Maybe if I were on a different sort of project -- one where I spent less time maintaining old code, or working with collections of data -- reducing boilerplate would seem like less of a big deal. As it is, though, it has seriously improved my quality of life. If Xtend can bring that kind of improvement to more people, I'm all for it.I can make sense of the IE bug: "" doesn't start with a protocol, like "http://, so it's not a full URL. It doesn't start with "/", so it's not relative to the server root. Therefore, it must be a relative URL, and the browser tries to download the image named "" in the same directory as the page.
But the Safari and Chrome problem baffles me. To have happened in Safari, Chrome, and Firefox, it must be a pretty straightforward mistake, but I just can't see it. Anyone else have guesses?
(Safari and Chrome admittedly use the same rendering engine, but still, Firefox doesn't.)
1) I've found that potential bugs, and design problems, are often easier to spot at a lower level. Because of this, I've started using more integration-y tests to build out my initial implementation, and more unit-y tests to fill out additional details.
2) I've found the GOOD use of mock objects: when I have a class that wants to expose its data by calling a method on a narrow, well-defined interface, rather than by providing it through a getter, I'm happy using a mock version of that interface.
I wouldn't advocate it as The One True Testing Dogma, but I thought I'd share it in case you find it useful.
That said, I stand by "not requiring that knowledge". Java's behavior is understandable without having to know about value and reference semantics. That doesn't mean it doesn't require any knowledge. Specifically, I think it requires two points: (1) Variables are just names, so reassigning a variable doesn't change anything else in the system; (2) When you call a method on an object, you might change that object.
In support of this: I've also been doing a lot of interviews recently. In my (admittedly limited) experience, the people who have had trouble with Java's parameter passing behavior are more experienced developers who've done a lot of work in other languages. Their confusion isn't from Java's behavior, it's the caution about pass-by-reference that they've brought over from C and C++. I don't really see junior people making this mistake. So I suspect having just a little knowledge of the value vs. reference issue makes Java harder to understand, by bringing up new and confusing possibilities.
But, like I said, my experience is limited. If you do see new developers being confused by this aspect of Java (or Python, Ruby, or other languages with similar semantics), I'd be interested to hear about it.
Alternately, it could mean: "I was reading LiveJournal five minutes ago, and haven't quite finished switching over to the Hacker News house style." ;)
Java sets up an environment where the parameter passing behavior just isn't surprising. If you've been programming in Java for a little while, it's very easy to have an intuitive feel for how parameters will act, without having to go back to theoretical principles.
Knowing about the theory behind pointers, pass-by-value, and pass-by-reference will still make you a better programmer. But Java's a stronger language for not requiring that knowledge.