Live data from Hacker News

Ask HN: Was everyone's first web development experience extremely difficult?

news.ycombinator.com

1–10 of 17 posts

Ask HN: Was everyone's first web development experience extremely difficult?

#1
I started reading Hacker News about two years ago (freshman year in college), and I was instantly motivated to start coding. I decided to major in EE, and I've done well in my C/C++ programming classes. I also picked up Python and R for some work on personal projects.

However, almost all of my coding has been limited to the command line. Although its been fun, I've been interested in designing a web-app for a while. Some of the posts on Hacker News make the process sound so easy, so I finally built up the motivation to start.

I decided to use Python as a backend, since I know that language best. I chose Flask as my web framework because it's supposed to be one of the simplest frameworks for Python. Unfortunately, I'm struggling to understand proper file structure and basic features such as blueprints, forms, models, and controllers. Most Flask tutorials go over these terms too quickly for me to properly understand them.

I wanted to manage users on the web-app, so I needed a database. I picked SQLite. Just like with the frameworks, I had to pick a solution without even understanding what the solution was doing. Fortunately, SQLite and databases haven’t been as difficult to pick up as Flask.

To control my web-app’s appearance, I picked up HTML and CSS. The tutorials on w3schools were nice, but I couldn't imagine building an entire app manually. And then I came across Bootstrap! It's an extremely helpful framework, but again, it's another tool I've had to learn.

One feature I wanted was interactive graphs, so I went to JavaScript. Codecademy helped me with the syntax, and I eventually found the Highcharts library. This has been the easiest tool to learn due to their comprehensive documentation.

Learning these tools individually is tough. Making them work together is even tougher. The posts on Hacker News make the web development process seem so easy. Was everyone's first experience this rough?

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#3
It seems to me that you are on a library / framework binge. > I chose Flask as my web framework because it's supposed to be one of the simplest frameworks for Python. > And then I came across Bootstrap > I eventually found the Highcharts library

My take on this: You do not need frameworks and tools as a beginner. Start simple with a server side scripting language to perform the logic of reading and writing to the database. (I started with PHP). Once you have that figured out, each scripting language can talk to a database either using drivers or plugins or a module that can be found (Again, I began with MySQL). Write simple logic to read and persist data. And build from there. This could be any language or database solution, my choices were what happened by chance when I began part-time work as a web developer.

Without breaking down a large app into smaller pieces, you'll be overwhelmed. Once you learn one server side programming script/language and data store logic, you can explore frameworks. Again, there are many frameworks out there, so choose one based on your need - not because it is "cool" or the shiny new thing out there. StackOverflow is your friend.

Also, this: > The tutorials on w3schools were nice

Personally, I would not recommend W3Schools -> http://www.w3fools.com/

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#4
There's a popular viewpoint I think from Malcolm Gladwell's Outliers[0] that could possibly be summarised as "any non-trivial skill takes at least 10,000 hours of practice to approach mastery." I think this applies especially to programming[1].

I can still vaguely remember a time, many years ago now where I just couldn't get my head around a garden variety "for" loop. Now I wonder what was so hard to understand about it. Many times over the years since those early "for" loops I have often felt that I wasn't really making any progress at all in grokking this programming thing. I look back now and in fact that was an illusion generated by a localised point of view. In fact I was making progress the whole time, just slowly enough that at times it didn't feel like it.

I probably came at things from a fairly opposite place to you, I started with the web. I started with HTML and CSS and kind of worked backwards. But regardless of where you start, there will always be challenges to your understanding. IMO, one thing that marks a promising developer is the ability to be comfortable with feeling like an idiot while you're learning something new but continuing to persevere, because the need to learn new things happens so often in our relatively young industry. In my experience, few people truly are able to be comfortable with this feeling, but those who are able can surmount amazing obstacles.

So don't get discouraged if it feels like you're not making progress. Stick with it, you will. It just won't seem like it at the time.

As you've experienced, the MVC pattern is still very much in ascendance in the web dev world. I would suggest that you invest in a couple of good books (if available) or lengthy tutorials on the framework of your choice (if available). If neither of these things are available, that may be a sign that you should choose a different framework. :) Don't invest in too many books though, because you'll find they date quite quickly and eventually it will become more efficient to just search for what you need on a case-by-case basis. But to get a good grounding, dropping a bit of coin can be a good thing in the early stages of learning a new technology.

0. http://en.wikipedia.org/wiki/Outliers_(book)

1. http://norvig.com/21-days.html

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#5
"A journey of a thousand miles begins with a single step"

It looks like you're starting out too big. If you want to get started with web development, I really would advise against using a backend MVC framework, a front end framework like Bootstrap AND interactive graphs with Highcharts/Javascript for your first app. I guarantee you will be put off by using them because you won't know what it is they do. Frameworks and libraries are great for increasing productivity, but horrible for actually learning. You don't start learning Chinese by reading Sun Tzu in Chinese, you start by learning to say 'hello', right? This goes for frameworks too. Eventually you'll need them, but now is not the time.

If you want to be a decent web developer, it's essential that you learn how things work from the beginning. Frameworks don't teach you that. I really suggest you try to build a simple app from the ground up. Nothing fancy, just a simple time tracking app, personal page or something. Or start with just a static HTML/CSS page. Add a database/server side later when you get the hang of HTML/CSS. Done? Begin sprinkling some jQuery in it. By this time you can begin thinking about frameworks.

It's a long road, sure. But if you begin small there's a much, much better chance of mastering web development. Just make sure to steer clear of W3Schools. They don't have nice tutorials, okay? It's like saying 'I went to McDonalds and they had this really great gourmet meal...'

The web is littered with tutorials about web development. Some free, some paid, some old, some new. Pick your poison, see which one works for you. If you need some guidance and extra motivation to push through (because you're paying for it!) I can recommend Treehouse (www.teamtreehouse.com). Well worth the $25 a month. Good luck!

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#6
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.

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#8
post #6

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…

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.

Re: Ask HN: Was everyone's first web development experience extremely difficult?

#10
post #2

In my experience, Ruby on Rails is the fastest and most efficient and intuitive way to develop web applications. Give it a try!

For sure...

Buy the Learn Web Development with Ruby on Rails by Michael Hartl(http://ruby.railstutorial.org/ruby-on-rails-tutorial-book)

It makes everything make sense. :-)

Post reply on HN