Hacker News new | ask | show | jobs
by yen223 4468 days ago
I was in your boat. I studied mechatronic engineering in school. Going from command-line,fizz-buzz-style programming to web development is a huge undertaking, not least because there are so so many concepts in web dev that you probably weren't exposed to. If you were like me, you probably didn't have software engineering experience - I'm going to guess that you aren't using version control. (No offence intended - I'm drawing from my own experience here.)

If you're dead set on going into web development, the first thing you need to understand is how the web works. You should be able to understand, at least on a superficial level, what happens between the time you type a url into the address bar of a browser, and the time the website appears in your browser. Get yourself familiar with HTTP requests.

Other people might tell you not to rely too much on external libraries. I'm going to tell you to the opposite. When you're starting out, and your goal is just getting a webapp, any webapp, out, you should use high-level frameworks that do a lot of hand-holding for you. That means jQuery on the frontend, and Django on the backend. Django is better that Flask here because it forces a code-organizational style, it hides a lot of advanced concepts from the user, and it's generally dead-simple to use.

Eventually you'll want to outgrow those frameworks though - Django is a bit too limiting for my tastes. But save that thought for the future.

1 comments

You raise a good point, but why would it necessary to understand how the web works, but not necessary to understand what happens when you make a database request? Or how ORM works? Or how to loop through an array? All these things are equally important, I think.

I agree with your point that if you want to get any webapp out the quickest way possible, you can use a framework. But if you want to get into web development, a deeper understanding of all processes is required, because at some point you'll get stuck.

If you're going to use a framework, I also recommend Django. For the points mentioned above, but also because it has far better documentation than Flask.

EDIT for clarification: Look at it this way. If I want to learn Chinese, what would be better for me: a) I learn some phrases that are socially acceptable in certain situations but I have no idea what they actually mean b) I learn Chinese from the ground up. It won't be pretty for a long time to come, but at the end of the road I know exactly what I'm saying

I'd go for plan b, even if it takes longer.

Database requests, ORMs and for loops technically are part of "things which happen between the url and the view" ;). More to the point, they certainly are all equally important, but web requests was slightly more difficult because that wasn't covered in the engineering course.

Whether a top-down approach is better than a bottom-up approach to learning, that's debatable, I'd grant you that. My experience tells me that going top-down is better, because practical high-level skills are more useful than theoretical low-level knowledge. It's the same way knowing how to drive a car is more useful than knowing how an engine works. If the OP decides halfway that web development is not for him, at least he'll still know enough to be able to build a functional webapp, which can be a boon to whatever profession he chooses next.

> b) I learn Chinese from the ground up. It won't be pretty for a long time to come, but at the end of the road I know exactly what I'm saying

That's not really how people learn languages -- not to become fluent, anyway. Think about how children learn to speak. They copy adults, get feedback, and eventually put it all together without understanding why it works until later.