Live data from Hacker News

“Don’t Reinvent the Wheel, Use a Framework” They All Say

mogosselin.com

41–50 of 94 posts

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#41

Earlier quoted context omitted.

This attitude leads to a world full of crap, where everything crashes all the time and is slow like hell, while still costing megadollars. We don't ask doctors, plumbers or auto mechanics to "just get the job done". We ask them to do it right.

Doctors and auto mechanics routinely use tools and abstractions that they don't fully understand. (Not sure about plumbers.) For example how many doctors know how a CAT scan works? They trust that the machine is doing its job correctly, and focus their expertise on interpreting the results. And a lot of auto mechanic work today involves reading codes off the car's electronics and looking up the fix. Do you really thi…

Actually the entire point of professional education and training, then certification for roles such as those you cite is that they must have an understanding of their tools and the principles behind their use. They are also intended to keep that understanding up to date throughout their careers and the continuing education requirements of licensing support that.

The difference between a repairman and a mechanic, in classical terms, is that a repairmen fixes things with tools someone else made, and a mechanic can make tools. They must understand how machines and tools work, and a doctor (of medicine, a physician) is supposed to have general knowledge of the functions of the body, of the diseases and ailments that effects, and the technology currently available to try to help.

In the Django example up thread (or typical newbie Rails app, etc) an "app" is quickly spawned that the dev may not how to secure, update to new requirements, internationalize, or make perform fast enough to useful.

Somewhere in these mixed metaphors is a discussion about the difference between programming, computer science, and software engineering ..

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#42
post #2

There seems to be this puritanical view that beginners should always learn a low-level language because it's good for the soul or something. Which is bollocks. To take the Java example because I'm more familiar with it, if I want to develop a simple Web application with a single form in Java, yes I absolutely do want to install Spring, Spring MVC and Hibernate. If I'm doing this to learn Java with a view towards usin…

I do.

I worked on a few large scale java web apps and regularily had to find and fix performance issues. I'm not sure if it would have been possible for me to easily dig into GC internals or find bottlenecks in Spring itself, without some lowlevel understanding.

So first of all you need some kind of lowlevel understanding to understand a GC. Hell I've talked to Java guys that couldn't explain the difference between stack and heap.

And you need to be able to support the "few tens of megabytes of libraries" (which surprise, are not just a few tens of lines of code) for real projects. If shit hits the fan and you can't google the solution, you need to dig into the framework code.

Which is (I think) is why the OP sais, don't use a framework if you couldn't code it yourself.

Sure you can work yourself top down the stack, but chances are (from my experience with others) that since Spring just works (in most cases) and for small apps never really have to deal with the GC, they think it's okay to not understand that stuff.... until shit hits the fan.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#44

If you write without a framework and you want to create robust programs, you're going to spend a lot of your time learning to deal with deficiencies of the web which you wouldn't have to worry about if you were learning native mobile or desktop development. Do we really want to force people into learning how to wrangle strings from an field into valid dates or how to manually CSRF proof their forms to do basic web-de…

Well I think that a beginner should try to do this by hand at first. Not necessarily in a production application, but to learn how it works. The difference between Web development and desktop development is the HTTP protocol which is responsible for security issues and other behaviors (sessions, cookies) that you need to understand if you want to build solid applications. Just the difference between client and server…

If somebody wanted to learn Desktop GUI programming we wouldn't usually tell them to learn the low level APIs for drawing rectangles on the screen or manually handling keyboard input, we would point them to a framework and widget toolkit for the platform.

The point of a good framework should be to pave over the cracks like double submit bugs, since they are not really things than anybody should be wasting brain cells on.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#45
post #39
post #25

What I think is missing from most of these discussions is an acknowledgement that people, in general (including developers), learn differently . In this context : you're either comfortable not knowing, or you're not. What I mean by this : some of us are comfortable not knowing how X system works (temporarily, of course). Some of us can start building things with a web framework and gradually gain understanding from t…

>However, others (and I include myself in this camp), are completionists. Abstraction is an annoyance, and not knowing is like an itch that needs to be scratched. I think this a common fallacy that many developers fall victim to. Our entire modern lives consist of using things we don't understand, by this logic you should also not fly in a modern aircraft because I am sure you don't fully understand how they work. Be…

> refuse to drive your car

If I were engineering a car or a service tightly integrated with one, I would be pretty interested in knowing how cars works.

> If you are your boss whose money is being wasted because someone refuses to use a time saving abstraction

That's a bit out of context, don't you think? The article was making a claim regarding how beginners should learn web development - not how businesses should be run.

However, since you bring it up - in my experience misunderstood abstractions are at the root of many, if not most, security vulnerabilities. Trusting the system without understanding it is often quite irresponsible.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#47
post #39
post #25

What I think is missing from most of these discussions is an acknowledgement that people, in general (including developers), learn differently . In this context : you're either comfortable not knowing, or you're not. What I mean by this : some of us are comfortable not knowing how X system works (temporarily, of course). Some of us can start building things with a web framework and gradually gain understanding from t…

>However, others (and I include myself in this camp), are completionists. Abstraction is an annoyance, and not knowing is like an itch that needs to be scratched. I think this a common fallacy that many developers fall victim to. Our entire modern lives consist of using things we don't understand, by this logic you should also not fly in a modern aircraft because I am sure you don't fully understand how they work. Be…

If I was flying in an aircraft I would expect the pilot to have at least some understanding of how/why it stays in the air!

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#48
post #2

There seems to be this puritanical view that beginners should always learn a low-level language because it's good for the soul or something. Which is bollocks. To take the Java example because I'm more familiar with it, if I want to develop a simple Web application with a single form in Java, yes I absolutely do want to install Spring, Spring MVC and Hibernate. If I'm doing this to learn Java with a view towards usin…

One of my first full PHP projects was a WordPress site. I was very inexperienced at the time, but I remember being frustrated at the concept of the Loop, sub-queries, template overrides, and the like. IMO beginners should work without frameworks so that they know what's part of the language and what's part of the framework, especially when the framework has its own idioms and opinions about proper development.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#49

I look at this in 2 ways. One is "Learning how something really works and understanding the core" and the other is "Creating production ready applications with a tested abstract magical tool". Frameworks are great to create production ready apps in no time even for a novice. But on the other hand, they have too much magic at times. Take for example, this code in Python/Django: user = User.objects.create_user('name',…

The problem is how do we define "from scratch", the common definition seems to be "Whatever I had to do when I started".

Even if you throw out of the ORM and go with writing SQL queries by hand, do we need to understand how the database will parse the SQL, how it stores the data on disk and how it executes the query?

The main reason to understand SQL when building a web application is really that the ORM doesn't provide a full abstraction due to the differences between the relational model and the OO model. If we could solve that then we could happily never use SQL again.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#50
I agree with the sentiment but not with his categorizations. For me, a library is something you call that does not impose an overall structure or set of processes on your code. You call it and control it while a framework calls you and imposes flow and structure on your code.

This is why frameworks aren't great for beginners to learn on. So many decisions are taken a way from them they don't gain an understanding of what is really happening.

jQuery is a DSL which makes it a bit tougher to categorize. You can use it as a library, but in general it will end up taking over more of your application structure and flow control if you use it well.

Post reply on HN