26 ms·
A framework, usually, must predict ahead of time every kind of thing a user of it might need to do within its walls. The one thing not mentioned in the article
by userbinator 7y ago
A framework, usually, must predict ahead of time every kind of thing a user of it might need to do within its walls.
The one thing not mentioned in the article is that the above line of thinking is almost guaranteed to lead to an insane level of abstraction, which was parodied in this classic article from nearly 15 years ago:
http://web.archive.org/web/20141018110445/http://discuss.joelonsoftware.com/?joel.3.219431.12 http://web.archive.org/web/20141018110445/http://discuss.joe...
(Sadly, that site is gone, but the memories live on...)
Addendum: to see this in practice, one needs to look no farther than Spring, the famous Java framework:
https://docs.spring.io/spring-framework/docs/current/javadoc-api/ https://docs.spring.io/spring-framework/docs/current/javadoc...
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html https://docs.spring.io/spring-framework/docs/current/javadoc...
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/support/AbstractAnnotationConfigDispatcherServletInitializer.html https://docs.spring.io/spring-framework/docs/current/javadoc...
- wetmore 7y agoThe repeated joke about killing your ex-girlfriend did not age well.
- itsajoke 7y agoThat was supposed to be a joke!? I don't think Hans Reiser got that it was a joke either.
- oh_sigh 7y agoI doubt it landed well in the early 2000s either
- RandyRanderson 7y ago"did not age well" - that's ageism and I'm offended.
- gherig4 7y agoWhat's wrong with it?
- umvi 7y agoIt's no longer vogue to joke about murdering women
- stormdennis 7y agoIt's practically suicidal.
- mewpmewp2 7y agoJoking about murdering men on the other hand is cool, so we can just direct our humor sense a bit.
- ianmcgowan 7y agoI think the same thing every time reading this otherwise-excellent post. I don't think we should attempt to erase history, but it is super jarring, at least for me. Was it ever actually funny?
- stormdennis 7y agoIs there somewhere you can check what is or isn't funny?
- pfarrell 7y agoEverybody nowadays is inplementing HumorSensorFactoryFactory to define their own rules for what’s inbounds.
- ivalm 7y agoNo, real people use EmotionSensorFactoryFactoryFactory. Why limit yourself only to HumorSensorFactory objects?
- ljm 7y agoYou really need the MaybeEmotionSensorFactoryFactoryFactory to avoid getting NullPointerExceptions when applying to psychopaths. An AbstractEmotionSensorSensorFactory would be required to unwrap that.
- goatlover 7y agoJava really did a number on the respectability of OOP, but at least it's good for learning and laughs.
- newsbinator 7y agoThere is, but the spec changes every 3 ~ 12 months, so you have to keep rechecking and going back to edit.
- 7y ago
- ngngngng 7y agoI hope, one day, that we look back on the "woke" over-analysis of the last few years and say "That didn't age well."
- finnthehuman 7y agoThis too shall pass.
- ngngngng 7y agoI don't have as much faith as you. I believe being "woke" is one of many things filling a void left behind by religion as more and more people find that void needing to be filled. I can't see that changing anytime soon.
- DougBTX 7y agoIt feels increasingly odd to work in exclusively male teams when there is no obvious biological reason why that would be. Possibly the casual “kill the ex-girlfriend” jokes contribute to that. I mean, some people really think like that, so it isn’t a purely innocent joke.
- suzzer99 7y agoYou mean like the Honeymooners where Ralph Kramden's running joke was that he was going to cold-cock his wife? Or do we not want to go back that far?
- GuiA 7y agoDark humor is just not professional, and many people expect the content they interact with on HN to be professional in tone.
- setzer22 7y agoI don't think that's ever been funny. What's that, standup comedy for psychos? It's that kind of joke that at best will make you look like a moron and ruin the mood... It's especially sad since the post is otherwise interesting.
- teddyh 7y ago> What's that, standup comedy for psychos? You’ve got it backwards. No “psycho” would consider it funny; they would just consider murder something normal one could conceivably do with a hammer. There is nothing funny about it, to them; it’s just normal. The murder joke was only funny to those people who consider murder something utterly unthinkable. It is its very outlandishness which creates the humor. If it is no longer considered funny today, it can mean a few things: Either more people now believe that there are more “psychos” than they thought previously, or an extraordinary number of people have turned into “psychos”. Or possibly both.
- mperham 7y agoThere are lots of edgy, ironic white supremacists these days. Masking aggression with humor is an age-old tactic.
- teddyh 7y agoYou can only mask outrageous things as humor if they are so utterly outrageous as to be virtually unthinkable. If they become only slightly plausible, they become no longer funny. Therefore, if jokes about murder are no longer funny, it’s because people no longer believe that murder is as likely to be unthinkable as it used to be. This is why I think that masking outrageous things as humor is a losing strategy. Either it is funny, in which case the thing being masked with humor is so outrageous as to be completely niche, making the secret signal irrelevant, since so few people recieve it. Or, the thing is such a relatively common stance to make it no longer absolutely unthinkable, which makes it no longer funny, which removes the mask. (Also, how do “white supremacists” fit into this? The original joke was about murdering an ex-girlfriend. This might possibly be generalized into misogyny, but I fail to see the connection to white supremacy. Please don’t fall into thinking that all people who hold opinions which you don’t like also hold all other opinions which you don’t like.)
- overgard 7y agoPretty sure murder was taboo back then also. The only difference is people are much more eager to virtue signal these days by finding offence wherever they can.. Edit: to explain my position a bit, what I observe with people that are easily offended is that they can't seem to separate what the character is saying from what the overall piece is saying. Just for example, think of The Office. Michael Scott says a lot of horribly sexist and homophobic stuff right? And we as the audience frequently laugh at it. But I don't think anyone in their right mind would say that The Office is sexist or that the audience that watches it is. Because we understand that the humor is that Michael Scott is saying something really inappropriate but he's also clueless and naive. In this piece, the salesman character makes a dark joke. That is part of the character of the salesman, along with other aspects that are revealed. If you personally don't find it funny -- maybe you just don't like dark humor -- hey, I won't tell you you're wrong, humor is always subjective, but I don't see anything offensive about this. It's not advocating for violence it's simply adding a weird dark personality quirk to an already very weird character. What I find with the easily offended crowd is all they look for is "bad thing involving a protected group in here? OFFENSIVE!" and completely ignore the actual context of everything else. It'd be like if you took a "that's what she said!" joke from The Office and completely ignored the context of Michael Scott's character.
- avl999 7y agoThe interesting thing is that Joel is actually gay so he probably specifically went out of his way to not offend the sensibilities of his readers and the culture at large at that time by using "girlfried" as opposed to "partner". Moreover dark humor has its place. Indeed 2 of the biggest comedies of the last 20 years used exactly this kind of humor (Seinfeld and The Office). Even to this day some of the most acclaimed comedies have humor in this vein (Veep and Curb Your Enthusiasm for eg).
- phkahler 7y agoThat was good. I still use the Joel Test to evaluate companies.
- thomk 7y agoDid you ever see his YouTube channel? It has exactly one video and it is awesome: https://www.youtube.com/channel/UC65NUFfqjWn3y02kYYl9nSQ https://www.youtube.com/channel/UC65NUFfqjWn3y02kYYl9nSQ
- euoia 7y agoThat’s amazing, thank you. Is Google Sheets still missing the table functionality from Excel? It’s the first time I’ve seen this and it looks great. Normally I’d be forced to create a new “sheet”. On a side note, Joel is using Excel for Mac and I was wondering at what point it would beachball, which it does around 42 minutes.
- leeoniya 7y agohttps://projects.haykranen.nl/java/ https://projects.haykranen.nl/java/
- Koshkin 7y agogetInstrumentableClassLoader() Return a ClassLoader that supports instrumentation through AspectJ-style load-time weaving based on user-defined ClassFileTransformers. Oh man... I admire the people who have invented this. But at the same time I feel sorry for those who have to use this in order to earn their living.
- thomk 7y agoStuff like that always makes me feel like someone has turned off their logical reasoning and they are just basically creating code that fills in some personal mental gap that somehow 'completes the set' of the things they are working on at the moment.
- smitty1e 7y agoI always figured that Java folks were - paid per class - sought to reduce the number of executable lines per class to 1.
- AmericanChopper 7y agoBut that’s just OOP in general. You can choose a language that defaults to not using OOP-style abstractions, but then people will question why you choose python/node/ruby over a proper language like Go (or whatever else)
- mewpmewp2 7y agoI will be honest and tell them it is because these are more productive and I enjoy being productive
- AmericanChopper 7y agoHow productive you are with any particular tool really depends on what you’re trying to do with it.
- 7y ago
- zests 7y agoMost of those crazy looking Spring classes aren't used by users and are just used internally by the framework developers. Of all the complaints people have about Spring, I've never heard "these classes are too abstract" or "these names are too obtuse." There was maybe one instance where I had to deal with obtuseness like that. Definitely not the norm.
- inopinatus 7y agoAfter X11 and Spring, the Maximum Abstraction Task Force shifted to focus on infrastructure, which is why your Java Virtual Machine processes are now running as a uniquely allocated user ID in a container scheduled by a control plane on a pool of OS instances separated by the hypervisor service of a dynamically sized cloud placement group.
- infogulch 7y agoAll of which end up getting allocated to a single 56 core cpu.
- keanebean86 7y agoEven the CPU adds at least one layer of abstraction. Spring JVM Container OS hypervisor x86 Real CPU instructions Electrons Unknown EDIT: formatting
- monadic2 7y agoYou might as well say “i don’t believe sledgehammers make good hammers”.
- sidpatil 7y ago"If you wish to make an apple pie from scratch, you must first invent the universe." —Carl Sagan
- stiray 7y ago... but at the end you get perfect apple pie that is exactly tailored to the ecosystem, doesnt suffer from overdesign, bloat, is baked to perfection and its taste is from heaven. The only question is if you can afford hiring a few gods for the task or you are rather satisfied with whatever falls off a truck and in reality is completely uncapable of inveting universe (or even capable of baking). At the end the customers digestive problems are those that do matter. And you can get sued for food poisoning. I personally love apple pies and am just not satisfied with plastic taste of supermarket frozen, microwave oven heated "products". “When you want to hurry something, that means you no longer care about it and want to get on to other things.” ― Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance
- Kye 7y agoAll you have to do is run the simulation forward enough until sentient life develops and becomes the universe. Then you can bake any pie you like.
- niftich 7y agoSpring class names are the stuff of legend, but most of those classes you wouldn't deliberately use in your application. They're there so Spring can layer up its own functionality feature by feature. The only problematic part about this is when these class names leak into error messages, and the level of indirection becomes difficult to follow. The way you use the core inversion-of-control framework people often just call "Spring" is you take your homegrown, doesn't-depend-on-Spring business logic, you make a config file, and if you're not executing it a servlet container, you make one entry-point class to start it all up [1]. There other projects under the Spring umbrella, and some of them are meant to be called from your code. Like Spring JDBC for database access, whose framework-like nature is apparent, yet in terms of its usage pattern, it resembles a library [2]. [1] https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans https://docs.spring.io/spring/docs/current/spring-framework-... [2] https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#jdbc https://docs.spring.io/spring/docs/current/spring-framework-...
- pscanf 7y agoI agree in theory, but in practice I've found it very hard to keep Spring (Boot) out of my code. Part of the blame I think falls on Spring's DI container, which is "too good". It makes it easy to pull in any bean, even the wrong one, which means developers have to be disciplined managing how beans depend on each other, and you end up with controllers returning entities. Of course, any codebase turns into a mess if you're not disciplined, but my impression is that developers tend to be less careful when working within the confines of a framework like Spring because it gives them the false sense that they can do no wrong. Recently I started a side project with Spring Boot (after all I like the framework), trying to organise it following Uncle Bob's Clean Architecture approach, which aims to isolate the core business logic of an app from its implementation details like database code and external interfaces. The core turned out pretty well isolated, but the rest is all Spring. Database access? Spring Data. External interface? Spring MVC. Communication with external services? Spring RestTemplate. I'm not saying it's bad, it's actually awfully convenient, but it's not so easy to swap out - say - Spring MVC for http4k, so you end up with Spring being everywhere. Which again, not a bad thing, just something to consider.
- diehunde 7y agoI prefer to read articles like the one you linked. They feel honest. If you don't like something you don't have to say "but yeah for this specific case it's fine, or if google is behind then it's alright..." just to be more correct and avoid comments from haters. I don't mind if you are a junior dev or Joel Spolsky. You should always write with confidence, especially when it's an article about an opinion.
- juped 7y agoI kinda want to make a Spring class name generator now.
- Qerub 7y agoSomebody already did that for us others to enjoy: https://github.com/achin/boss-work-manager-configuration https://github.com/achin/boss-work-manager-configuration, running at http://java.metagno.me/ http://java.metagno.me/
- edem 7y agoSpring is not a good example. If you're a seasoned Java developer you look at an `AbstractDestinationResolvingMessageTemplate` and you just know what it does. I'm not kidding. Spring used to be a bad example yes, but not anymore. They really put the thought and work into fixing its design. Right now I can write an app __completely__ independent of Spring. In fact that's what I'm usually doing. You can do Clean Architecture with Spring now. Please keep your facts straight.
- oreally 7y ago> If you're a seasoned Java developer you look at an `AbstractDestinationResolvingMessageTemplate` and you just know what it does. I'm not kidding. This claim is so bad. You could look at the name AbstractDestinationResolvingMessageTemplate and the useful information they would be gaining is that it's a message template. They would still not know how to use it; they'd still have to do an additional step like checking the documentation on its usage etc. The amount of useful information to text is small and it doesnt help.
- edem 7y agoI didn't say that you would know how to use it. You don't need to know, the framework uses it. What I said is that you would know _what_ it is if you ever get an exception from that class. I'm 95% sure that all those people complaining about Spring never read the reference documentation. I did, and whenever I bump into a problem I have an idea about how to solve it. Besides reading it only takes a few days and you're set for years. Why do anybody expect to be able to work with a technology if they don't bother reading the documentation? This is like complaining about not being able to drive a car when you sit down in the seat without training.
- oreally 7y agoWhat's your definition of 'know'? It's very common to have surface level knowledge of the class only to dive in and see that it does something else. So do you 'know' the code as well as you thought so? Probably not. Fact of the matter is you can't magically 'know' everything about a class based off a class name. And this includes your 'seasoned Java developers'. You're throwing out some very large assumptions as well.
- mping 7y agoI remember the Rails people making fun of the Spring stacktraces vs the Rails one (being much shorter). Guess what, a couple of years later Rails has the same layers of abstraction
- finnthehuman 7y agoIt was always an argument about fashion. It just wasn't in fashion to admit that out loud at the time. The conclusion was "the rails-not-java club is best" and then everyone worked backwards to find believable reasons why. At the impromptu pitch meetings "minimalism vs. complexity" took off. Now that the rails club is out of fashion and the k8 club is in. Well, we'll invent reasons that over-engineering is better than deployment automation that "just" sticks a .jar in a .deb and apt-get upgrades a handful of non-virtualized servers colocated at a local datacenter.
- iso947 7y ago> Sadly, that site is gone Probably because the author has a weird obsession with murdering women
- sixhobbits 7y agoI have a vague memory of a similar parody article which I've never been able to find again. IIRC it was in Ruby and he imported all libraries into a "god" object that could do absolutely anything. Anyone know what I mean?
- arethuza 7y agoMy comment in that discussion from ~15 years ago was based on experiences with a project that I "inherited" - 30,000 Java classes and interfaces, 20+ layers of abstraction, team of 30+ people working for a long time. And most importantly, it didn't actually work! I actually "finished" it to the point of a working system for the customer with real customers in about 5 weeks by ignoring most of what they had done - required a handful of classes and JSPs. Probably distinctly under-architected but it worked and was built on for a number of years after.
- gombosg 7y agoThe problem with over-engineered projects... our team inherited a project that was designed by some architects in an ivory tower and implemented by some other engineers. It was quite complex (message queues, multi-threading, async etc.) so that it would be 'scalable' yet crushed under the slightest load, customers were experiencing delays during peak hours. We removed about a quarter of the code (some intermittent queues & components), nothing changed in terms of functionality. Now we're removing more code and switching over to less complex data structures to fix the delays. Maybe a complete rewrite would have been better after all, who knows. I'm not a very experienced developer. I like to ship stuff and get projects done in reasonable time and a "YAGNI" attitude. Let's just rewrite stuff and introduce more abstractions when it actually hurts and a refactor is in scope. On the other hand, I see a tendency that if you give projects (it could be a greenfield project or some maintenance) to a team of, say, 6 developers, then they will just 'create work' for themselves, filling up the todo list with items which may lead to an over-engineered project that could have been easily be done by 3 people within the same timeframe. If you have some good reads/stories on this topic, patterns to watch for, I'd appreciate if you shared them.
- majewsky 7y ago> Let's just rewrite stuff and introduce more abstractions when it actually hurts and a refactor is in scope. This is a very good attitude, but I would like to tack on a second part to it: Instead of designing your code to be infinitely extensible in all directions, make it easily replaceable instead. It's impossible to anticipate every future requirement, but certain choices will make it easier to deal with a new requirement as it pops up. One of these things is unit tests. If you have some gnarly business logic with tons of edge cases, you really really want a good test suite because it enables you to add new edge cases with confidence.
- jonathanstrange 7y agoI wouldn't mind frameworks if they actually had what they claim to offer. Nowadays so many frameworks don't even deliver, they have those nicely looking webpages and come with advertisement after advertisement of their features (even if they aren't sold!), and then when you look closely at the source code or API docs, half of those features are vaporware. This is more than infuriating, it can actually cost you a lot of time if you're not careful about evaluating the framework.
- commandlinefan 7y agoI can’t even figure out what Spring is claiming to offer. The only benefit of Spring is that you can move what ought to be compile-time exceptions into the runtime.
- a1369209993 7y ago> http://web.archive.org/web/20141018110445/http://discuss.joelonsoftware.com/?joel.3.219431.12 http://web.archive.org/web/20141018110445/http://discuss.joe... "Right. Fuck you. Fuck your lack of hammers. Fuck your factory factory factories. And fuck your store. If you decide to pull your head out of your ass, I'll be over here, duct-taping a rock to a stick so I can actually hammer a actual nail into a actual piece of wood." I'm reminded of the HGttG scene regarding the display department.
- a1369209993 7y ago> duct-taping a rock to a stick so I can actually hammer a actual nail into a actual piece of wood. Note to anyone actually trying this: if you have a drill, drilling a hole in a piece of wood and sticking the stick (preferably dowel) through works better; if you need more weight, attach the rock to one side of the head, and a coin or other patch of metal to the other. Also (if you have the space for it): adopt a lathe/smelter/set of chemical-refining glassware/etc today!
- d0m 7y agoIMHO, the framework vs library debate is similar to the inheritance vs composition. Inheritance: You must predict how people will use your class. Make a mistake and they're screwed and need to resort to all kinds of hack. (Like frameworks) Composition: People will use your class if it fits their needs. They can easily wrap the code, tweak or simply discard it. (Like libraries)