3 ms·
It gets absurd very quickly. Anyone who programs like that is a bad programmer. That's the fact. It's nothing to do with the language being used.
by axod 16y ago
It gets absurd very quickly.
Anyone who programs like that is a bad programmer. That's the fact. It's nothing to do with the language being used.
- gdulli 16y agoBut you can't deny that each language has a culture that promotes a certain set of practices and styles. If this article had been written about Python instead of Java, no one would have understood what the author was trying to say because it doesn't fit the Python culture.
- ciupicri 16y agoYou're right. The author does mention: The biggest complaint I have with many Java developers is that they develop a whole bunch of really bad habits.
- axod 16y agoI have never cared about, or taken notice of any 'culture'. I agree that some programmers do, but I think you only pay attention to 'culture' if you don't really know what you're doing. These are the programmers that copy and paste code from google and ask questions on stackoverflow all day. Just read the damn language spec/APIs. A programming language is just a tool. You can use it as you wish to. There is absolutely nothing inherant in Java that suggests you should create a mess of Singletons Factories etc. And if you're a good programmer - you won't. Our job as 'hackers' is to not do things the 'accepted way'. To think outside the box. To go against 'accepted wisdom'. That's kinda the point. So just because some idiot in a cube somewhere creates 18 Factory classes an hour in his IDE, and somehow that's become "accepted wisdom" about how Java should be used, it doesn't have any bearing whatsoever on how you use it. I'd like to think we're all better programmers than that here.
- cynicalkane 16y agoFor my short (<3 years) professional career, I've lived almost entirely in Java. I write in better languages for my hobby projects, but working on those you solve different kinds of problems. This heavyweight Java stuff is everywhere. DriverManager. Security SPIs. Hibernate. Spring. EJBs. JNDI. You cannot do enterprise work in Java without running into this culture. And just like poisonous people will poison you, so do poisonous design patterns. I was hacking on a Clojure project, and writing a data access layer, and without thinking started writing a factory-based indirection layer for abstraction purposes before realizing I didn't need one...
- gdulli 16y agoCulture exists and can't be ignored, but that doesn't mean you have to be a slave to it. I find the most (perhaps only) annoying thing about Python the thinking that leads to the zombie-like refusal to deviate from PEP 8 and other habits/styles that are considered "Pythonic." And the need to defend yourself from (or ignore) the inevitable criticism that you face as people bikeshed over details that are completely orthogonal to the quality of your code.
- axod 16y ago> "Culture exists and can't be ignored" Yeah it can, why can't I ignore culture? I download a tool, and use it as I wish to within my company.
- andrewcooke 16y ago> why can't I ignore culture? In practice, it's very hard to do. Try living in a foreign country for a time.
- shortlived 16y agoIn my experience that is not true. There is a huge expat Russian population outside Boston, many of whom live in their own bubble of language and culture. The same goes for American expats living in Russia.
- andrewcooke 16y agoSure, but that's not really arguing against what I'm saying is it? There's enough of them to transplant their own culture over there. That's not the same as being "culture free".
- limmeau 16y agoYou can of course ignore a language's culture, but then your code will look and feel surprising to other programmers who are familiar with the language and its culture. If you're the only person who will need to maintain the code, fine.
- ebiester 16y agoFrankly, that's almost a tutorial for Spring, it's only missing the container. I've dealt with enough co-workers to know this isn't hypothetical. There's a slow backlash against this kind of thinking, but it's slow. 5 years ago, I was told that singletons and utility classes were always evil because they were "unmaintainable.) On the other hand, I've been in situations where the factory/pluggable architecture was the right decision, especially in consultingware where you build the product for your first client, then you go after an RFP that's "pretty close" but don't want to end up maintaining two, and three, and seven code bases which often have the same bugs. That's the problem this pluggable architecture solves. If you have 7 clients paying you a million bucks to have exactly what they want (out of a market of... say 25-100) and 50k a year in maintenance, this makes sense. Most of the time, though, YAGNI.
- jimbokun 16y ago"I agree that some programmers do, but I think you only pay attention to 'culture' if you don't really know what you're doing." Or work with people who don't really know what they're doing. Or have to maintain or modify their code.
- generalk 16y agoI have never cared about, or taken notice of any 'culture'. I agree that some programmers do, but I think you only pay attention to 'culture' if you don't really know what you're doing. False. If I'm starting a company around a product built with Rails, it behooves me to stick to cultural norms (in Rails' case: TDD/BDD, Continuous Integration, so forth) because otherwise it's difficult to find good developers that will work on the product. Our job as 'hackers' is to not do things the 'accepted way'. To think outside the box. To go against 'accepted wisdom'. That's kinda the point. That's not the point, it's just usually a means to an end. As you say, doing effective work in a Java shop requires either writing better Java, or using a language like Clojure. But in some cases it's faster to go with accepted wisdom rather than combat it, even if we disagree. In some cases, shockingly, the accepted wisdom is beneficial. Ignoring cultures around languages out of hand is arrogant, brash, and probably wrong. If after you've examined the culture you find you don't agree, that's completely different. You can only think outside the box once you've examined the box.
- sophacles 16y agoMinor nit: One can think outside the box at any point by accident. To purposefully think outside the box, or to be able to qualify the degree of outness, one must know the box, its contents, and its boundaries. I point this out, because I've been bitten by not checking for this in people only to find they have no idea what they did right that one time, and most everything else they've done is just crap.
- inoop 16y agoI wonder whether the article accurately reflects the Java culture, or non-Java people's view of it.
- ianl 16y agoHowever, it's still seems to be a trend in almost everything related to enterprise java based software. Couldn't they just use memorization by passing a hash map in a tail-recursive method and save on a few hundred lines of code?
- francoisdevlin 16y agoYou're missing the grain of truth to the article, which makes it absolutely hilarious & tragic at the same time.
- axod 16y agoPerhaps the difference then, was that I read through the article thinking "WTF would you do that" and "eugh that code looks rubbish". I'm guessing some other people were thinking "Oh how true! Java is such a bad language" which I think is a shame. Not particularly to Java, but to themselves. If you think it's Java's fault when you write utter crap in it, you're not a very good programmer to start with. Languages don't force people to write bad code.