Settings

Theme

Learning to Program: How Should I Start on This Project?

12 points by lauraannmorris 15 years ago · 11 comments · 2 min read


Hi HN, I've come to the conclusion that I need to learn to program. (Know it's debatable whether bix/mkting folks should waste their time learning, but I want to learn anyway.)

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

agento 15 years ago

As much as I despise PHP, I think it's a valid language for taking your first steps in.

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.

karterk 15 years ago

You might want to read this article first: http://www.shubharamani.com/wordpress/?p=31

It 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.

swalkergibson 15 years ago

You should absolutely learn how to program! As someone who was in your position three years ago, I can categorically tell you that learning to program is one of the best decisions I have ever made. My suggestion is the following - try and find a friend who is willing to be your tutor. It will help you immensely to have someone there who presumably knows the ropes and can walk you through the process and answer questions in real-time. Programming, especially when you are learning, can be intensely aggravating and you can lose interest very quickly if you have hit a seemingly insurmountable roadblock and have no one to fall back on.

lauraannmorrisOP 15 years ago

Thanks so much for your feedback. To start, I'm going to follow @poisonpie´s advice and use GAE since I have some basic familiarity with Python. And will be sure to read up on how web hosting works -- hadnt even thought about that piece of the puzzle yet. And @swalkergibson will def be providing plenty of beer+pizza for a couple coder friends who've offered to help if I get stuck. Will let you know how it goes! Thanks again.

them0rtn 15 years ago

read the book "Java Head First" from OReilly http://www.amazon.de/Head-First-Java-Bert-Bates/dp/059600920... absolutely brilliant and funny at the same time!

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.

kplusd 15 years ago

Just a short note: I think that its just awesome that you want to learn how to program. (I assume that you are a girl). We need way more female builders!

Brewer 15 years ago

Assuming you want to save the data you need to look into databases. MySQL is tried and true, but NoSQL database (MongoDB, for example) are hot right now.

btc_man 15 years ago

You should start with Ruby, Rails, SASS for css, HAML for html, you should write your code in Aptana Studio, and deploy with Engine Yard or Heroku, Aptana has deployment wizards for both. Oh, and GIT for version control.

  • poissonpie 15 years ago

    I have to say that's a mouthful for anyone to learn when all they want to do is get a form up and running. I think it sets up a barrier to getting something going for a rank beginner.

    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)

    • dstein 15 years ago

        google app engine
      
      No beginner programmer should be doing anything on a cloud platform. You need to learn how to run a webserver locally first.
  • dstein 15 years ago

    I hope that was satire. He needs to learn how to write HTML forms by hand, and a script to process the submissions. In that case, Rails MVC + SASS + HAML would be an absolutely abysmal way to learn how to do it.

    Python and barebones html form processing would be the place to start.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection