views:

252

answers:

9

All my programming has been done on my own. Sometimes I'll work on a project for months and months, only to learn a new technology that makes it obsolete. I wrote hundreds of lines of Javascript AJAX before learning jQuery. I think I need to start looking at some open source, professional code, but I'm overwhelmed with where to start, how to set it up, etc. I'm mainly focused on web development now, PHP, Javascript, jQuery, etc. But general answers are fine too.

+7  A: 

It sounds like you are struggling to keep track of current practices in the industry. I would recommend subscribing to some software blogs.

Howard May
+2  A: 

The best 'general answer' is not to worry too much about finding other people's code to read, but rather to never assume your code, or your approach to a problem, is the best. A developer with a very basic understanding of programming can turn out a large amount of functionality--but will likely do so in a very manual, tedious fasion. An advanced developer will understand the tools and approaches and select the best that fits.

...So the best answer really is to find possibly alternative solutions for the problem your working on, research each until you understand how it works and what advantages it offers, and discard most of them--one of those "enjoy the journey, not the destination" quotes kind of fits in here.

STW
On the flip side don't assume that *other* people's code/approach is the best (or even correct).
Aardvark
Perfectly correct; I still find solutions to problems I haven't dealt with before and think "this is it" only to find out they're flat-out wrong or laughably old approaches to the problem
STW
A: 

There may not be one single place for "professional" code. I generally learn by looking for specific code solutions. There are plenty of places to find code, but there is no guarantee that the code there is good.

mcandre
+6  A: 

I don't really know what looking at "professional code" is going to do for you. Depending on how long ago you wrote all of the javascript ajax code, I would say that if anything that'll make you better at using jQuery. You actually understand the fundamental roots of what is occuring.

You should find a few blogs that interest you and follow those and continue what you are doing. It totally doesn't sound like you are a fish out of water...

RSolberg
+1 for jQuery plug
Allain Lalonde
+2  A: 

i think frameworks are a great place to start.

you've found jQuery which is a javascript framework. take a look at some of the plugins and sites that use it. with javascript you can view the source and see what people have done.

All of these have active communities that you can follow and plugins/extensions that you can browse through.

Hope that helps. Josh

Josh
Well, the spirit of your answer is quite right but they're all PHP based. There's a lot more out there.
Noufal Ibrahim
A: 

G'day,

Irrespective of what codebase you start looking at, I'd highly recommend getting a copy of Diomidis Spinellis's excellent book "Code Reading" (sanitised Amazon link).

It'll help you with techniques to quickly see what the code is doing "under the covers".

HTH

cheers,

BTW Good luck!

Rob Wells
A: 

@Josh, I have never been exposed to blueprintcss, so thanks! It looks great.

I have one more to add to your list; I am using it in several projects right now. It is called Uni-Form.

From their website:

Uni-Form is an attempt to standardize form markup (xhtml) and css, "modularize" it, so even people with only basic knowledge of these technologies can get nice looking, well structured, highly customizable, semantic, accessible and usable forms.

Here is the link: http://sprawsm.com/uni-form/

I hope that is helpful as well, I have modified several taglibs such that these forms happen all the time.

@Eliyahu, to respond to your original question, it's kind of like asking a chess grandmaster to make you a grandmaster too. Being a professional programmer that produces high-quality code and stays within constraints takes experience.

You are on the right track! Asking for help & advice on a community site like this is a good strategy. I agree with what others have said about picking a blog or industry news aggregator to keep up with. For example, I do mainly Java development. Every morning I checkout what's happening on theserverside, javalobby, and infoq. These are just a few of the countless sites like them that are out there.

As far as books are concerned, the holy grails for me include:

Keep it up!

Greg
A: 

Looking at open source code can be a good way to learn as you and others have hinted. One thing that I did when I first started out was to look at the code of an open source app that I actually used every day as an end user (it was a forum app in my case). Since I deeply understood how the application worked from a user's perspective, it wasn't too hard to see the big picture of the the codebase as a whole. A little context goes a long way in reading code.

Daniel Auger
A: 

I wouldn't try to learn everything from just reading other peoples code.
There are three general things. Try to read a lot look at some questions and answers on stackoverflow for an exampel. Even if you don't have that problem at the moment if you don't understand the frameworks they are talking about google them. This will give you a bigger picture what is used out there and how things play together.

The second thing is try to find local user groups you can search on websites like meetup.com as an example to find people that are willing to meet and talk about projects and problems. Join them there is no faster way then regular direct conversation.

The third thing is try to find some kind of code review strategy. If you are working on your code alone all the time there are certain some bad habits you don't know you have and some good ones other people want to learn about. So even if it is trough the internet find people who look at your code and give you comments about it.

Janusz