Live data from Hacker News

Why I Hate Frameworks (2005)

factoryfactoryfactory.net

401–407 of 407 posts

Re: Why I Hate Frameworks (2005)

#401
post #277
post #59

Yes, the state of the industry is a hot mess, but I'm not sure this article rings true. Failing to leverage good frameworks is as big a problem as over using the bad ones. I would point to Rails as an example of an appropriate framework (and Laravel if PHP is your jam). The trouble is so many others are bad, incomplete or defunct, but I don't think the answer is the golang mantra of 'we don't need no stinking framewo…

Laravel is prime example of a bad framework trying to reinvent the language, educating young developers to use it and its ecosystem and to never get out of the stranglehold. I'm not sure what made you think it's an "appropriate" framework, it's literally antipattern on antipattern and it's not even the worst thing, neither is the fact it's 10x slower than anything else out there - what's worst is the blatant lying, b…

I don't know the php ecosystem well at all. I just didn't want to come across as 'Rails is the only one true way'. Lots of php folks seem to love it, and it derives a lot from Rails, so I thought it was a fairly safe shout out. But, it is HN after all, so no opinion can be put forth without and equal and opposite negative reaction.

Re: Why I Hate Frameworks (2005)

#402
post #109
post #59

Yes, the state of the industry is a hot mess, but I'm not sure this article rings true. Failing to leverage good frameworks is as big a problem as over using the bad ones. I would point to Rails as an example of an appropriate framework (and Laravel if PHP is your jam). The trouble is so many others are bad, incomplete or defunct, but I don't think the answer is the golang mantra of 'we don't need no stinking framewo…

I'm not sure I'd describe the golang community's attitude as a complete write-off of frameworks. I don't think I personally know a Go developer who doesn't use some sort of web framework (I personally use Echo, for example). Rather I think it'd be better phrased as "frameworks should use simple abstractions and methods as often as possible", which the language naturally pushes people towards imo. I believe this cause…

I agree with your more nuanced take on the golang community's position. I still think that a fully realized framework is, in general, a better starting point for the vast majority of projects. Part of the problem is that such frameworks are few and far between. I'll stick to the Ruby community: I know developers I respect who really like Sinatra, which would be more akin to a microframework. It is their go to starting point, but when I go to work on their projects I very quickly find myself straying out of Sinatra's capabilities into things that are fully baked into Rails. I then have to spend time pulling that capability into Sinatra, which is not how I like to spend my time as an application developer. There are many frameworks that are positioned as 'elegant' or 'focused' when they are simply incomplete in the face of real world development and teams end up having to either cobble together disparate micro-framework or rebuild basic capabilities to get to a fully realized app. I would argue that is not time well spent and that everyone thinks they are super good at creating solid, performant, extensible, well documented code, but they are not (statistically speaking) and by then it is too late and others have to live with their junk for years, or worse yet they all bail because now they know hot-framework-x and board the recruiter train to their next salary bump.

Re: Why I Hate Frameworks (2005)

#403

Earlier quoted context omitted.

NB: I've further tweaked my scripts (and titlecasing) which results in a few minor changes to the results, though the above list remains highly illustrative. I think I've spammed this thread enough for now ;-)

Nice work! Thank you for taking my feature requests to heart :)

This is the fun of posting my work publicly. Someone will pick it apart, and then it's a challenge to see if I can address the concerns.

I knew my first attempt was quick-and-dirty. It took a few minutes to improve that a lot, a few hours to track down numerous other issues (mostly involving title-casing exceptions, and adding more terms to that script which should either not be titlecased (e.g., "DNA", or which are mixed-case (e.g., iPhone), or which are ambiguous and should be treated differently in different cases (e.g., "us", which might be a first-person plural pronoun, or an abbreviation for "United States").

For the latter, I determined that "US" appearing either immediately after "the" or at the start of a title was virtually always the United States sense of the string. I've enshrined that in `titlecase`, though there are probably some other terms that tend to occur before or after the term which could be used to further disambiguate, say, "US Congress", "US Senate", or "US Law", for example. The additional gain from those is small.

If I were writing an AI then it might incorporate those weights, but this is just a simple sed script...

Re: Why I Hate Frameworks (2005)

#404

Earlier quoted context omitted.

NB: I've further tweaked my scripts (and titlecasing) which results in a few minor changes to the results, though the above list remains highly illustrative. I think I've spammed this thread enough for now ;-)

A list with a link to the most-commented post would be really cool for, uh..., other people who might not have seen them all.

That would involve Real Work.

The simplest route to that for now would be to search the titles via Algolia, sorting by popularity. I could I suppose gin up the URLs for that, though as I've already noted, I think I've spammed this particular thread enough with long-list comments. (HN prizes intellectual curiosity, and whilst a few tables might meet that criterion, I think I'm pushing the limits.)

The difference between my data & analysis and Algolia is that Algolia doesn't itself report on either front-page-specific items, or on stories which have been repeated. But given a list of front-page stories, or repeated-front-page stories, you can search Algolia ... to surface all instances of those stories. The front page will in general have

If you're suggesting I list the URLs themselves directly ... as I'm working with the archive data, I don't have that readily available.

My current workflow is, roughly:

- crawl (or update) the front-page archive

- rerender the captured HTML as plain text, using w3m's `-dump` flag

- parse that text into a tagged multi-line-per-record format with the raw title line, parsed title, date (and several sub-element parsings of that), site ( as reportedd by HN), points, submitter, comments, and (artefact of the original question I'd sought to answer) any US cities or states mentioned

- create various reports and abstracts based off of that. "hn-titles", "date summary" (mostly the parsed data arranged on one line for easier awk processing), cities (US and "globally significant") and US states reports, etc.

Conspicuously absent in the parsing (3rd step) are both the full article URL, and the HN post URL.

I've got those, in the raw HTML, but I'd need to go through that and parse the original which up until now has been Too Much Work given what I can do with what I have now.

And if you're wondering how many votes are required to make the front page, here's a summary, by year, of the univariate stats for votes for the 30th story per page, that is, the lowest-ranked:

  Year: 2007 (days: 300)
  n: 172, sum: 427, min: 1, max: 6, mean: 2.482558, median: 2, sd: 1.131546
  
  Year: 2008 (days: 366)
  n: 172, sum: 1442, min: 2, max: 16, mean: 8.383721, median: 8, sd: 3.181337
  
  Year: 2009 (days: 365)
  n: 172, sum: 3493, min: 7, max: 55, mean: 20.308140, median: 20, sd: 6.398405
  
  Year: 2010 (days: 365)
  n: 172, sum: 6582, min: 20, max: 59, mean: 38.267442, median: 39, sd: 8.689477
  
  Year: 2011 (days: 364)
  n: 172, sum: 10312, min: 28, max: 89, mean: 59.953488, median: 61, sd: 13.266858
  
  Year: 2012 (days: 366)
  n: 172, sum: 12492, min: 31, max: 150, mean: 72.627907, median: 74, sd: 17.430260
  
  Year: 2013 (days: 365)
  n: 172, sum: 14354, min: 44, max: 184, mean: 83.453488, median: 82, sd: 21.248547
  
  Year: 2014 (days: 363)
  n: 172, sum: 14513, min: 5, max: 131, mean: 84.377907, median: 85, sd: 19.878349
  
  Year: 2015 (days: 365)
  n: 172, sum: 14770, min: 19, max: 332, mean: 85.872093, median: 70, sd: 47.614140
  
  Year: 2016 (days: 365)
  n: 172, sum: 19451, min: 29, max: 352, mean: 113.087209, median: 97, sd: 61.186786
  
  Year: 2017 (days: 365)
  n: 172, sum: 21843, min: 36, max: 588, mean: 126.994186, median: 103, sd: 76.123514
  
  Year: 2018 (days: 365)
  n: 172, sum: 23678, min: 27, max: 430, mean: 137.662791, median: 111, sd: 80.183359
  
  Year: 2019 (days: 365)
  n: 172, sum: 23138, min: 31, max: 491, mean: 134.523256, median: 116.5, sd: 76.338079
  
  Year: 2020 (days: 366)
  n: 172, sum: 25700, min: 23, max: 551, mean: 149.418605, median: 127.5, sd: 89.049755
  
  Year: 2021 (days: 365)
  n: 172, sum: 28075, min: 50, max: 507, mean: 163.226744, median: 134.5, sd: 90.869361
  
  Year: 2022 (days: 365)
  n: 172, sum: 27565, min: 40, max: 409, mean: 160.261628, median: 139.5, sd: 76.489698
  
  Year: 2023 (days: 172)
  n: 172, sum: 27805, min: 43, max: 616, mean: 161.656977, median: 129.5, sd: 97.531724

Note that the first three years were pretty low (min = 1, mean = 2.48, for 2007), but goinng back 5 years a story with > 23 points could have made the front page. There are also a few days with (This is my first time seeing these particular stats, another analysis I'd been thinking of doing for a while. I had calculated the delta between 1st and 30th ranked stories going back some time. Also the variance by day of week, which is also fairly significant.)

Re: Why I Hate Frameworks (2005)

#405

Earlier quoted context omitted.

Why doesn't "Why I Hate Frameworks" appear in your list? From dang's post it looks like that exact title has appeared 8 times? Possibly related: have you considered making your aggregator ignore punctuation and case in addition to the year indicators?

Not all appearances are front-page appearances. And my very quick & dirty shell one-liner requires precise text matches. "Why I Hate Frameworks" does appear six times on the front page, though with case and phrasing variants which mean that an exact text match won't pick it up: Why I Hate Frameworks Why I Hate Frameworks Why I hate frameworks (2005) Why I Hate Frameworks [dupe] Why I Hate Frameworks (2005) Why I Hate…

s/uppercases words/titlecases phrases/

That is, it takes text in some aRbiTRArY casing and AppLIEs pAttErNs to crEatE stanDArD TiTle casE preSenTation.

Above line run through the script:

That is, It Takes Text In Some Arbitrary Casing and Applies Patterns to Create Standard Title Case Presentation

(It's not perfect, but works remarkably well. Occasional hand-tweaks are required, and in bulk operations the results are usually appropriate.)

Re: Why I Hate Frameworks (2005)

#406

Earlier quoted context omitted.

Same in Poland - none of my friends who did their required internship at studies was ever actually taught anything. It was always just "do your job, don't cause problems". And for free. Of course. My uni literally bans us from being paid. If we do, they won't acknowledge it as internship.

"My uni literally bans us from being paid. If we do, they won't acknowledge it as internship. " Could there be any explanation for such a rule, that is not corruption and exploitation? I cannot think of any.

I have no idea. It is what is is... :/

Cynically it feels to me like it's just a nice way for the companies nearby to get free labor.

My assumption for that is just that it's just supposed to be an internship somewhere where our focus would be to study and thus we shouldn't get any benefits from it, but I've never heard of it working that way. It was always in IT here just being an unpaid junior.

Re: Why I Hate Frameworks (2005)

#407
post #399

Earlier quoted context omitted.

What's a good framework from your point of view? Or do you prefer to not use any framework and instead write your own one on the fly because you're probably going to do it a lot better with all the best practices and no bugs and great documentation?

Why would you imply I tried to say anything against frameworks in general? My comment was specifically about Laravel because it was singled out as a great framework. To indulge you, about good frameworks: Symfony, Aphiria. Aphiria in particular because it's small, cuts down on repetitive tasks and doesn't reinvent the language with things like "Macros" or abuse of Reflection or mishandled patterns like singletons - a…

So, what I said.

Micro frameworks that don’t do more than routing. I’d love to see those beautiful reinventions of the wheel people do when using “simple” frameworks for email, ORM, validations, authentication, authorization, cli commands, translations, error and performance reporting, etc etc.

Post reply on HN