Ask HN: Which is harder Front end or Back end?
This is a two part question, I want to get a friend into Web development should I start him off with the Frontend side(HTML, CSS Javascript) or Backend side(PHP, JAVA, PYTHON) of things?
Which is harder and why? is Web development hard in general?
And which is more fun and joy to work on? if you had to pick one particular side to start off in and build a career out of because is fun which side would you favor?
52 comments
[ 2.2 ms ] story [ 687 ms ] threadBoth can get difficult and being an expert requires lots of training. However, I believe that frontend is easier and more fun for starters. With little skill you get something on the screen, with more skill you can make some really sweet stuff. If you can hook in some existing API it's easy enough to do a dynamic site.
the back end just needs to work as intended. The details can be pretty much any combination of things..as long as it works.
I think I know what you're trying to say - front end work is easier to justify to a client because he/she can easily "see" what you did.
But your statement that front end is "harder" and that the details of backend implementation don't matter are patently false. Let me guess, you're a fronted developer right?
"don't matter are patently false"
okay. I'm going to go to my boss and ask him if I should use an array or a linked list for this part of my project. He won't care. He does care if it works and if it works well. The actual details don't really matter to him.
However, if I show him an admin interface, he will have all kinds of opinions on where things should go and how they should function.
Developers have much more of a say in the back-end, which makes things easier. Especially when the people making the decisions have almost no experience in the matter.
What's the most complex backend stuff you can think of? Perhaps Google or Amazon level engineering? There's simply no equivalent of that on the front end.
TL;DR I'm pretty sure the majority of the PhD's at Google are not writing CSS.
If your friend enjoys visual feedback/things then it would follow that they would probably enjoy front-end work better, however if they enjoy problem solving and tend to be more logical in their thought process, the back-end may be a better fit.
And asking which is more "fun and joy" is as silly as expecting an insightful answer as to whether football or soccer is more awesome.
My one piece of practical advice: learn JavaScript. With its massively growing presence on the backend, it's on of the few cross-cutting skills you can have in web dev.
That's a very loaded statement. If this were a forum for the physical sciences (as opposed to computer science), that would probably be analogous to saying "Android is easier to develop for than iOS" or "Java is easier than C#" (both of which would easily start flamewars on HackerNews)
If we're targeting the frontend and assuming OP's friend has limited experience programming, there's a benefit to learning the same (flawed) language in both the back and frontend, instead of learning two languages. Even if that one language is flawed.
I've shared code between Node and the browser using Browserify [0], and it's pretty easy. Page size can take a hit if you use modules that are meant for the backend and have large dependency graphs, but even then it could be worth it.
[0]: http://browserify.org/
As you go deeper and get exposed to more concepts, it's only natural to specialize in either backend or frontend.
YMMV
I didn't answer the "fun" part because it's not so great a leading indicator of career direction. Both sides have significant depth and breadth in terms of technical challenges and skill.
But this is a question about personal preference. Different people have different strengths and weaknesses, different personalities, etc. We cannot answer for your friend. The best approach would be to gain a broad exposure to all layers of the stack, not just "front-end" or "back-end", but also the databases, servers, networking, and all those pieces that comprise the modern Internet. Any one of them might spark an interest and a passion.
1. Think of a small project (one you could do in a weekend)
2. Architect it as a backend API + frontend consumer.
3. Explain the architecture to him at a high level.
4. Teach him Python/Ruby with bottle.py/sinatra, make the API.
5. Teach him HTML/CSS, make the layout.
6. Teach him Javascript, call the API and manipulate the DOM.
Facebook's React.js [0] could be great for a beginner. Even though it's another library to learn, it's conceptually simple and has a very small surface area. Components (optionally but usually) have a number of properties and (always) a render() method which renders the component to the page. There's more to React than that, but that's enough to get started.
[0]: http://facebook.github.io/react/
I wouldn't throw a framework like Angular, Ember, or Backbone into the mix right away though. They have a lot of moving parts.
The thing I like about React is that it's just a view layer, and can be a very simple one at that. A beginner could start putting things on the screen very quickly, then pick up a framework or larger app architecture later on. Not only is it a way to get started quickly, but the core concepts of a view layer learned through React would be applicable in larger frameworks.
Nothing seems to be replacing the need to code backend any time soon.
That's my argument for learning backend: frontend coding is unnecessary and an affectation of the current industry.
"Modern" front end development will often involve build processes - gulp, browserify, whatever - that will introduce a barrier for entry.
Likewise if your friend wants to get into, say, C# development, you'd be much better off with a Visual Studio environment.
That's not to say that either of those are necessary, but I'd suggest that they are the norm for developers in those areas.
Alternatively, work with something like Sinatra and plain old HTML/CSS/JS - your friend could get a sense of one of the simplest methods of creating web applications.
So - it depends. Because there are so many choices, I suggest you find out their interests first. Is it visual? Then maybe they'd prefer frontend. Is it in the overall architecture of an application? Then maybe they'd prefer the backend?
That seems to be the way things have gone and are going, and I don't see that changing any time soon.
Regardless of which path you take learning solid algorithm and software engineering skills will help with any development you do, frontend or backend. Consider your friend might not even care about web stuff too, perhaps they'd rather make games or mobile applications.
You should then after the 30 day trial be able to judge his passion by how far he gets. If he doesn't even complete the first chapter, then you would have wasted your time trying to teach him something he has no interest in.
I believe the way to introduce someone to web development is by teaching them something that has a tangible reward - e.g. design a static web page you can host, or have the ability to edit the HTML/CSS in a CMS or e-mail template.
My opinion is that anything is hard if you have no idea what you're doing. The biggest factor I've seen that determines if someone can become a competent programmer is passion.
Some people really like working front-end and doing all types of things to make a page load quickly in all browsers/look good or whatever, and some people like working on the back end and getting it up to 10kqps ro something.
I like back end but that's just my personal taste. Let your friend be good at what he's good at, I think the job market wanting both skills right now if that's the reason your friend is trying to learn web development.
And don't forget the whole world of non-web programming :)
When you're into something, it's not hard, it's challenging. Figure out what fits your friend's personality. Trying is a good way to decide. A good friend of mine thought he was more of a back end guy. Gave it a try and realized that front end was his calling.