14 replies [Last post]
mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Was this information Helpful?

Hi,

I'm looking to start programming for Drupal (which i guess means PHP) but I dont have any experience. How did ya'll start programming?

Also what do you think I should do first to start? Just get a PHP book and then a drupal one?

How long is the learning curve you think?

Thanks for your time!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Where did you learn to program? Torgoz, CPill, Ryan, other u

Ahh, I love this question. Eye-wink

I started programming in BASIC on our Commodore 64 back in elementary school. I stuck with it, migrating to QBasic and QuickBASIC for quite a while (using it all the way up through college in hobby apps). I sprinkled in some C to work on MUDs, and after graduating from college I took a correspondence course in Java to stay on my parents' insurance. Most of my non-work code is done in FreeBASIC, one of the newest and certainly the slickest open source BASIC compiler. (Of course, it's no longer so basic...) If you're in the mood, you can check out my latest arcade game competition entry called SECTOR SHOCK.

PHP just sort of happened for me. I basically knew how to program, so I just dove into PHP when Andy asked me to start fixing things that broke or were "defective by design" on our osCommerce site. I picked up the basics of web development there and then jumped into Drupal with a bad module written in 4.6. Dabbled in 4.7 with hobby sites but really got to work on 5.0 when it came time to start Ubercart. So it's all been a learning experience... making me the absolute worst person to answer your question. Evil

For me it helped that I already knew how to code and just had to learn a few new conventions. From the ground up, I guess I'd recommend exactly what you said. Without a considerable amount of time or interesting projects for you to learn module development from, getting the Pro Drupal Development book is probably the way to go. I even here Olav is writing a German Drupal book that features some Ubercart in it. Eye-wink That's probably less code and more administration, though.

Also, as much as I hate the site's design and spamminess, w3schools.com usually has some good intro tutorials. You might breeze through the PHP tutorial before forking out the cash for a PHP book. If you learn the basics, you can use php.net as a function reference and never have to buy a hard copy.

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Ryan wrote:I sprinkled in
Ryan wrote:

I sprinkled in some C to work on MUDs

I miss MUDs. Sad

That was my intro to programming and also how I learned to type....and also where I learned that Swedish people say hihihihi to laugh and okej for ok.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
cYu wrote:I miss MUDs. That
cYu wrote:

I miss MUDs. Sad

That was my intro to programming and also how I learned to type....and also where I learned that Swedish people say hihihihi to laugh and okej for ok.

lol @ hihihihi. I had a somewhat similar experience when an Argentinian used ajajja to laugh. Smiling

If you ever just wanna poke in one, I modified the Rom2.4b6 codebase running End of Time MUD about 6 years ago or something. I can't remember really. (It's since been greatly improved, mostly to give it a nice Final Fantasy theme/feel.) I still have an imm on that place and pop in once every few months just to say hey and see what cool code they have running. Sticking out tongue

It's eotmud.com:4000.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: cYu wrote:I miss MUDs. That

MUDs? QuickBASIC? C++??? You guys are nerds!

But that's okay, so am I Smiling It seems like we have a lot in common. My first experience was also in GW-BASIC, I learned it in 6th grade elementary school, on IBM PS2's (we had Apple II's in the classroom but those were mainly for playing Pic-a-dilly and Oregon Trail). At home I found out that our Tandy 1000 TL-3 (which ran on DOS4 and the Windows-ish UI software called "DeskMate") also had DOS and GW-BASIC, later versions it was just BASIC, but I wrote some of my first programs in that. To say that I was "stoked" when I found out you didn't have to type line numbers for each line would be a nerdly understatement. "You mean I can just start with 10 and keep hitting enter???"

I found out that Michael Crichton, one of my favorite authors (Jurassic Park had just come out in paperback), had also written a book about computers called Electronic Life. With that and another book that had some code examples, I was able to get a bit of a grasp on elements of programming and computers in general. Needless to say, I was hooked from there.

I actually took some QuickBASIC classes in high school, doing some fairly low-level work, nothing complicated like hit detection or anything like that. I don't even remember what it was anymore, truthfully. My father tried getting me to learn C, but I became bored with it (all I really had was a book and a bunch of 3.5" floppies with the dev software on it..) but soon turned towards doing more design-based work, animation and graphics, that sort of thing. That's what I actually got my degree in, a BFA in Graphic Design, and I worked mostly as a layout designer and web developer.

However my job forced me to start picking up more programming again, learning some ASP where it was necessary, and eventually I had to learn PHP, so I picked up as many books as I could and went through as many websites and web tutorials as I could. There's still a lot I don't know, but I like having the O'Reilly books within arm's reach, since sometimes php.net can be a little bit ambiguous and hard to navigate to find exactly what you need.

So I guess you could say I'm "mostly" self-taught, which isn't always a good thing because as I said, I'm still learning a lot, and things change so quickly in this field that it's sometimes really tough to keep up!

Anyways - good luck with your endeavour. If there's one thing I can say about programming for websites is that it's more satisfying than any other work I've done, including the design stuff.

--
Help directly fund development: Donate via PayPal!

daniel.s's picture
Offline
Joined: 10/10/2007
Juice: 87
Re: Where did you learn to program? Torgoz, CPill, Ryan, other u

IBM have some resources here:
http://www.ibm.com/developerworks/views/opensource/libraryview.jsp?topic...

and here:
http://www-128.ibm.com/developerworks/library/os-php-read/

They have some good tutorials. I'd say go for something that doesn't cover working with a PHP framework first, and then you can move on to some Drupal tutorials.

More of the recent IBM tutorials cover programming with CakePHP, one of the more popular PHP frameworks. I think that using CakePHP can give you a pretty good grasp of MVC (Model-View-Controller) programming - which Drupal won't.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Where did you learn to program? Torgoz, CPill, Ryan, other u

Oh, man. Before this post, I had almost forgotten how I started to learn programming.

It was back in 5th or 6th grade, and I had always been interested in computers. I had found some old "3-2-1 Contact" magazines with the BASIC programs, so I would read those and figure out how they worked. That's as far as it went because my family didn't have a computer at the time, much less a compiler. Eventually we did get a computer, and I bought "C for Dummies" which came with a CD with a compiler on it. Later I got a C++ book, and never wrote a working program. Smiling

Freshman year of high school , I took the Intro. to Programming course, which taught PASCAL. For most of the semester we had substitute teachers, so it's amazing I learned anything. Especially since I didn't program again for 5 years. In college, I had to take the Intro. to Programming course for my major, and I remembered how much fun I had back in the day. This time it was taught in Python, and I still remembered the concepts from my high school class, so I breezed through most of it.

A few more classes and a graduation later, I got a job working on a restaurant equipment website.

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 916
Re: Where did you learn to program? Torgoz, CPill, Ryan, other u

The learning curve for PHP I think is pretty low. It took me a summer to become completely familiar with it but, like pretty much everyone else here, that might because I had ~10 years of experience with various programming languages before PHP. PHP is a good starting language for people since its not a compiled language and has very loose type checking; you'll hit a lot less errors that tend to frustrate new programmers.

How to start learning?

Get a copy of Wampserver (assuming you're a Windows environment) & jEdit (that's what we use here to develop code but there are other editors out there that do PHP syntax highlighting). Once you're running Wampserver & jEdit you can create PHP scripts that you can run from your web browser on your local machine.

Bookmark http://api.drupal.org/
The Drupal API pages and the links in the Relevant references block contain about every reference I used to develop for Drupal (if you're using Firefox you try search http://mycroft.mozdev.org/ to add these sites to your list of Firefox search engines).

Once you're familiar with the basics of PHP you might want to try opening up drupal modules to see how they work.

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Wow thanks guys!

Thanks for all your comments! I have a PHP book here and WAMP i'll definitely download so i dont have to keep re-uploading to a server thats a huge help. I was actually looking at doing that.

Here's a quick addon question. You all have been saying that you started learning the basics and then got into PHP. Will learning PHP teach me the basics? Or since it's an easier language would i miss out on those things?

I hope to be an uber-developer soon, so lets hope i pick up on this quickly!

Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Do you need to learn Basic first before learning PHP?

When they say Basic, they mean "BASIC" which is a "beginner" programing language (which is not to say that BASIC can't be used for real life programming, just that BASIC is a good language to start with)

You don't need to learn BASIC first. Some people would argue that in fact you shouldn't learn BASIC first since it can result in learning bad coding habits. You should focus on learning PHP first. Once you are familiar with PHP, then you should start learning the specifics of Drupal and get familiar with MySQL and how PHP (and Drupal) interact with a SQL server.
Best of Luck,
Andy

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
...and PHP encourages good

...and PHP encourages good programming habits? LOL! (not trying to pick on you Andy, I just find that hilarious! Laughing out loud )

<tr>.
Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Re: ...and PHP encourages good

You're right TR, I was trying not to start a flame war over "good" programming habits and or which programming language is best. I think we could argue these points indefinitely. I was just trying to explain that "BASIC" is an actual programming language, not a set of basic programming skills of some sort. I am aware that I was painting with a broad stroke, and that I inferred PHP teaches good programming habits (not true). I deserve to get picked on for that.
Peace,
Andy

mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Re: Re: ...and PHP encourages good

Is there a good language that would teach good programming habits (for beginners of course)?

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Re: Re: ...and PHP encourages good

That's a can of worms you don't want to open! For your purposes, the most importing thing is to choose a language, any language, and use it for a specific project. That is, don't just play around with it and try out some of the examples. Pick a task and accomplish it. Having a concrete goal will force you to solve problems with the language, and that is the fastest way to gain understanding. Since you've stated that you want to start programming for Drupal, decide on a module you want to write, get the "Pro Drupal Development" book and a beginning PHP book, and start working on writing that module! There are plenty of other contributed modules you can use as examples - sometimes it's easier to start by modifying what others have written rather than creating something from scratch.

<tr>.
torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: ...and PHP encourages good

Agreed! The "Pro Drupal" book is a great one to get, and the "Annotations" module example they start with is an excellent and invaluable introduction to the way Drupal works!

--
Help directly fund development: Donate via PayPal!