tags:

views:

104

answers:

4

I'm a php web programmer. I want to know if there are common web problems that web programmers face for which there are unorthodox and effective solutions.

As an example, I'm making a simple website of user generated profiles. A user can store a whole bunch of information that range from first high school to when he first went to a baseball game. Instead of making 50 columns in the database for form data I never intend to search/query against, I simply serialize the form data - serialize($_POST) - and save it in the t_user.general_info text column. This simplifies my database because I don't need atomicity on such mundane data. At any time in the future, I can unserialize() the data to see it all again. I think if I were back in school, teachers would dis-approve of this. But hey, it's fast and practical!

I'm wondering if there are other simple tricks of the same nature in web development that will help me save time.

Perhaps someone can post a link for me to study?

+1  A: 

Too important and broad to be considered tricks, but by far the most practical principles that every programmer should use to save time are KISS and YAGNI.

Jason
+1  A: 

A common and never ending problem for web programmers is getting your page to load faster, and Yahoo has compiled a great list of things you can do to make your web pages load faster. They even have a great firefox plugin called YSlow that does most of the analysis for you.

mmrobins
+1  A: 

You can use selenium to record manual web page browsing, and have it played back by a script.

This means you don't need to step through the same sequence of pages over and over to find out what went wrong.

http://seleniumhq.org/projects/ide/

cartoonfox
+1  A: 
  1. If something does not display right, validate! I mean why look for mistakes yourself if there is a programm telling you the most glaring errors?

  2. Use Firebug! It is a tremendous time-saver. If something does not look quite right, just edit the live document in Firefox and if you like the results, commit to source. This is just one of the many helpful features. Firebug also helps you optimizing the loading speed of your page.

  3. Use the new debugger tools of Internet Explorer 8! I find them helpful. Use them early and regularly besides Firebug.

  4. Use HTML 5! It works very well already today. Try it out, you will be surprised. Usually, as we all know, something bleeding edge has quirks and surprises, but in my experience, HTML 5 is an exception.

nalply