Learning to Program: How Should I Start on This Project?
I have a pet project that I’d like to build, but could use your help determining which language is best for me to start with and what online resources I should prioritize. Should note that I’ve done some homework here: I took MIT’s Intro to Computer Programming (Python) class via Udemy and I completed the Rails for Zombies tutorial.But, while I can go through those exercises OK enough, I’m stuck when it comes to putting it all together and building something useful… that’s where I could use your help.
I want to be able to build a form with multiple data entry types that automatically emails certain groups of people based on data submitted. Simple, yeah? (I hope.)
Any recommendations on where to start with this project? Know Railscasts has a series of episodes all about forms … but is that better for this project than Python or some other language/set of resources?
Thanks in advance for your help – know the “how do I learn to program” question gets asked quite a bit around here… Laura
11 comments
[ 4.8 ms ] story [ 36.8 ms ] threadIt summarizes some of the challenges you will face as you go about building your vision into an actual product.
The hardest part is getting started, and it's great that you have already crossed that bridge. I know a lot of people on HN here will disagree with me - but if you want to just dip your feet and start hacking around - PHP will be a very nice option for you. PHP is rather simple and will allow you to start building things and getting basic stuff like how the web works (HTTP requests, responses, page loads etc.).
As mentioned in the article, you also need to know a decent amount of HTML and CSS for basic formatting of your page. Or, you can find a template (plenty online) which you can modify.
Finally - if you want to do something like emailing people etc. - it involves learning a bit about how web hosting works. This is another place where PHP might be helpful as most web hosts support PHP by default.
There is no one true way to go about learning stuff. Be prepared to be patient and learn by exploring rather than trying to read tutorials and trying to get a hang of everything at once.
My personal suggestion is to go with Python on google app engine. Use a simple text editor. The implementation is simple and has slightly less "magic" going on than Ruby on Rails. Once you've got it running in GAE, you'll have a better understanding of the request/response cycle and an appreciation of getting variables from forms manually. Then do the same project in Rails (or Django if you prefer Python). Once you understand the manual approach of dealing with forms, you will have an appreciation of what's going on behind the scenes when Rails magically does some processing for you.
After that you can iterate again and add to your skills learning about SASS, HAML, finding the "perfect" IDE etc.
Start as simply as possible, learn a little about what is going on behind the scenes, then grab tools that help you automate the boring bits.
In fact, if you didn't already know some Python and Ruby on Rails, I would suggest just hacking out some nasty PHP to get up and running (simply because it is so widely supported and saves a lot of deployment hassle when you just want to get the thing working)
Python and barebones html form processing would be the place to start.
why java? because you have to learn the basics. So better learn the pain-in-the-ass-way as your program basics, then you will understand why ruby is better ;) because if you learn ruby first, you dont know why it is better than other program languages.
From your post it's not easy to tell what you're exactly having trouble with, but I suspect it's a general feeling of being lost.
Be aware that for your project you probably need to read up a bit/learn a little of the following:
- Programming basics: Variables, types, expressions and statements, control flow (loops, if/else)
- Web development basics: HTML and CSS to build your pages, a little knowledge about HTTP can't hurt either (GET vs. POST for you form, maybe Basic-Authentication). PHP will take care of the gritty details here
- Not sure if you want to store your forms in a database. If you do, you'll have to look for a php/mysql tutorial. There should be plenty around the web.
- Finally you need to set up some kind of development environment. WAMPserver comes with everything you need. On Mac there's MAMP, which is easier in the beginning than setting it up on your own.
Don't expect this to go fast. There's a lot of reading and playing around involved. If you start enjoying this and feel comfortable in PHP, you should look for a different language though. While PHP is comfortable to learn and good for first steps, I think it's actually counterproductive to try to build anything bigger with it.
The PHP ecosystem is poised with mediocrity and bad code. While it's actually possible to write good code in PHP, it's hard to find examples of good programming and the languages horrible design makes it actually difficult (though not impossible) to express yourself well and write good code.