News for hackers. Stuff that matters.
Re:Why I hate frameworks (2005) by zeveb on Tuesday October 04, 2016 @11:04AM (#12636065)
This article really clarified it for me when I first read it (along with another I can't find, about libraries & frameworks; all the ones I've googled are too recent to be right), and helped me realise that what I want to do is write code that calls, not code that is called. I want to own main().

As an aside, I really miss Joel on Software and the similar high-quality blogs which existed in the mid-2000s. It seems like Twitter, Facebook and Medium have sucked all the air, the life, the joy and the quality out of online presence and discussion. I know that there are still a few holdouts trying to keep things going, but … it seems to be a losing battle.

Re:Why I hate frameworks (2005) by geebee on Tuesday October 04, 2016 @12:06PM (#12636531)
I hope nobody minds if I run with your "aside" a bit.

I miss the JOS blog a lot as well. It influenced me a lot over a decade ago. It presented a very optimistic view of the field and career path of a programmer, with good writing, interesting tech viewpoints, and humor. There was also less tech blogging back then.

I really liked Joel's vision of what a software developer should be, especially what the working conditions should be. I feel he embraced the concept of being both a professional and, frankly, an adult.

http://www.joelonsoftware.com/articles/FieldGuidetoDeveloper...

My lament is that I really do think tech instead doubled down on what I feel is kind of a childish, "young people are just smarter" attitude, with giant open offices, back visibility, low autonomy,

The vision JOS presented is one that I can embrace. I'd encourage young people to go into software development if I thought they had a future similar to the one presented in this blog. That version of a tech career is still there, to an extent, but unfortunately, tech seems to have moved more strongly away from it over the last 15 years. I can't encourage young people to go into a field with giant open offices, back visibility, limited autonomy, office retreats to dave n busters. I suppose there's a subset who like this, but my impression is that a huge number of developers, a group that most certainly includes developers recently out of college in their 20s, find this cultural world to be a disappointment.

Re:Why I hate frameworks (2005) by IsaacL on Tuesday October 04, 2016 @06:29PM (#12640121)
I read Joel's blog back in university, this must have been around 2010. I was very inspired and I remember binge-reading his archives during several late night coursework sessions in the CS lab.

This seems to have been around the time the hipster-tech culture started taking off in a big way. I graduated right in the middle of it, and looking back, I realise I'd taken for granted that the professional tech world would follow Joel's more adult way of thinking. Instead we have a cult of youth. No planning (under a misguided interpretation of "lean"), minimum processes (under a misguided interpretation of "agile"), no knowledge of design patterns (TDD supposedly makes this obsolete), weird fake hipster quirkiness (but omg don't make any jokes about killing ex-girlfriends, or Anil Dash will put you on an industry blacklist).

Re:Why I hate frameworks (2005) by sotojuan on Tuesday October 04, 2016 @03:33PM (#12638616)
I definitely see where you're coming from when saying the tech /startup industry has moved away from being "adult". I get not wanting to be an Office Space cubicle farm, but there's a good balance between that and what we have now.
Re:Why I hate frameworks (2005) by TeMPOraL on Tuesday October 04, 2016 @01:41PM (#12637484)
> and helped me realise that what I want to do is write code that calls, not code that is called. I want to own main().

It took me a while to clarify this in my head, but I feel exactly what you wrote here - I want to own main(). A framework is something that calls your code. A library is something you call. I avoid frameworks whenever possible.

Re:Why I hate frameworks (2005) by oxymoron on Tuesday October 04, 2016 @02:46PM (#12638137)
I also very much agree with this. I think it might be a sign of something deeper, though. When I design a library, I keep in mind that it might be used in a variety of contexts applied in a multitude of styles. In contrast, when I author a framework I expect the users to adhere to the principles of the framework. Whoever owns main() gets to dictate the terms.

For a beginner or intermediate developer, this might be a relief. Once you reach the level where you have a good intuition for how to do things well, your primary focus will be the minimizing of complexity, and I can never shake the feeling that frameworks stand in contradiction to this goal. After all, they were designed for maximum generality, but are the abstractions envisioned really the ones you require?

That's not to say that everyone should embark on a journey to build their own 50kloc framework. You might want to consider skipping the framework if 500 lines of compact, well-designed and thoroughly documented code can do the same job, though. And you can still use libraries for the truly complex parts.

Re:Why I hate frameworks (2005) by greenshackle2 on Tuesday October 04, 2016 @02:15PM (#12637850)
Ah, yes that clarifies a problem I've had trouble with too. I work with a complicated framework, and I often end up having to explain why a seemingly simple change to x is actually complicated, even if I'm looking at the code for doing x right now and could trivially make the change.

x is at the bottom of a framework, the top of which I didn't code or fully understand, so I'm not sure exactly who's calling this code under what conditions - I have to read and analyse an edifice of code to make sure the change is safe. Or just do the change and hope the integrated tests catch any breakage.

Re:Why I hate frameworks (2005) by quantumhobbit on Tuesday October 04, 2016 @01:53PM (#12637621)
I like this definition of libraries vs frameworks by who owns main() too.

I've always said that libraries add functionality to the language, whereas frameworks are half-assed DSLs.

Re:Why I hate frameworks (2005) by m_mueller on Wednesday October 05, 2016 @01:46AM (#12641788)
What about frameworks that let you keep main, but require to take over your build system? I admit I'm guilty of one of those as well [1], but only because I don't see a more simple solution in terms of usage.

[1] https://github.com/muellermichel/Hybrid-Fortran

Re:Why I hate frameworks (2005) by TeMPOraL on Wednesday October 05, 2016 @05:55AM (#12642661)
To me this looks closer to library than framework, by the virtue of augmenting your code instead of hijacking the control flow completely.
Re:Why I hate frameworks (2005) by swah on Tuesday October 04, 2016 @11:11AM (#12636122)
Yes, and the BoS forums had something great going as well.

The ones from this list at some point were great: http://blog.fogus.me/2011/03/27/the-long-lost-art-of-thought...

Re:Why I hate frameworks (2005) by matthewking on Tuesday October 04, 2016 @05:51PM (#12639828)
I too miss BoS forums, never really found another community like it, HN and /r/programming are ok but they don't quite cover the "programmer AND in business" demographic that BoS captured so well.
Re:Why I hate frameworks (2005) by r_smart on Tuesday October 04, 2016 @11:37AM (#12636317)
I'm right there with you, missing this blog. I sometimes see it on my bookmarks bar and click it just to see if something has been added, but nothing ever is. I didn't find his blog until towards the end of its life, but it taught me so much, and was a joy to read.
Re:Why I hate frameworks (2005) by marcosdumay on Tuesday October 04, 2016 @01:32PM (#12637394)
> I want to own main().

You can say the same in an article on "Why I hate compilers", or OSes, or web servers.

This article is more about a way to design software than about frameworks in general. It just happened that Java web frameworks were all designed that way by the time.

Re:Why I hate frameworks (2005) by zeveb on Tuesday October 04, 2016 @02:36PM (#12638046)
I don't think that you deserve to be downvoted; you make an interesting point. Obviously an OS is a sort of framework; so too is a web server which calls one's code (I'll be honest, I don't quite get your point about compilers — can you elaborate?).

But good examples of both OSes & webservers offer pretty simple interfaces (I'm thinking of Plan 9 as an example of a good OS, and Go's http.Handler as an example of a decent HTTP interface). In both cases there's one entry point (a single designated function), with a reasonably well-defined API to query the environment in which it's called.

Re:Why I hate frameworks (2005) by marcosdumay on Tuesday October 04, 2016 @03:03PM (#12638332)
A compiler will also rewrite the entry point of your program, and probably just call your main() from another place.

Yes, it's all about reasonable, documented and well defined APIs. If your framework has those, it won't get in your way.

If you framework lacks those, it will get in your way with an intensity that libraries just can't match. But frameworks do not pose a completely new level of problems, your compiler, server or OS will create just as much trouble.

Re:Why I hate frameworks (2005) by sotojuan on Tuesday October 04, 2016 @03:40PM (#12638680)
The worst part about Medium is that it helps make terrible "Why You Should Use X Tech and Tech Y is Dead" posts by inexperienced people actually be read and posted on HN. In the mid 2000s no one paid attention to those.