Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Problem with learning?

I am working hard to learn web design/development and have a dream of getting employed as one. I aim to study about 2-5 hours a day (as I am unemployed at the moment, it's quite easy). The problem is that I feel that I have some kind of a learning problem or just can't get the idea of programming around my head.

Learning HTML and CSS felt easy for me. Then my friend adviced that learning PHP would be very useful for a designer. I started the course and for the beginning, PHP seemed to be easy enough subject but then the difficulty level for me rises sky high. Suddenly I do not have any idea how to use PHP in web design. It's the same thing with books, at some point I hit a wall.

This kinda gets me down, because I was hoping to make a career out of this. I have had some bad luck in my previous career choices but I thought that this could be the one.

Any advice or other encouraging words would be valuable :)

7 Answers

You are probably looking at PHP the completely wrong way. PHP is a server side script meaning that the server executes the script and files BEFORE it gets launched to the browser. On the other hand the CSS and HTML is executed in the browser. Then again you have Javascript, which is probably the better thing for you to learn atm. which is also executed in the browser, but is still again a scripting language. Take a look at jQuery: http://jquery.com which is a framework for Javascript

sven molhuijsen
sven molhuijsen
7,091 Points

i agree with rasmus, its better to learn javascript and jquery first, after that you can try php, the basics of php are also very similar to js, so it's better to do javascript first, then jquery, and after that you can look for php

Mikko, I am with you in the same boat. You are pretty clear what you want. And that's the good news. You have the impulse. As anything in this earth nothing is easy. The problem starts with this technology that is pretty new so the only people who can teach us are the Genius, the Engineers "the techy guys" who are very bright and they know how to do it but not how to explaining their vast knowledge in a way where an academic process of traditional methodology can make us easy to understand as Math, Algebra or Calculus. Technology is changing everything as the way of teaching and we have to deal with this. For years I've looking a for a PHP book that can guide hand by hand to learn this language but so far none. You have to understand that php is a program language that is complex, not easy to learn, require a lot of practice, by the way this is the area where I am wright now. One of the suggestions that I get is this, don't try to memorize PHP you'll get eventually with practice. Javascript is a nightmare compare with php. You can learn java script and start with jquery but again demand a lot of time, dedication, practice and hit the wall many times. Here at the Treehouse, I found that this guys are very close to explaining the concepts almost in a traditional way but they lack of methodology and pedagogy. But remember technology is changing everything and we have to deal with what we have. You are in the right track. HTML, CSS, PHP, JQuery, Javascript and so on. One last thing take care of all those site that try to sell the promise, You will be a genius today.

Ed Quijano

Mike Baxter
Mike Baxter
4,442 Points

Have you looked at Larry Ullman's book on "PHP and MySQL"? I read the book and I'm now making things like analytics engines and time-tracking web apps. Eventually I'll get around to building a forum for my friend's fan-fiction project. The book covers just about everything you need to know for these things. I started with Treehouse, which was a great start, but I learned a lot more from Ullman's book. I might be a fast learner, and I have a fair amount of second-hand experience, but I would recommend the book. I read most of it once through, and then sat down for a few hours and re-read the book a second time through, which helped to solidify things a tremendous amount. It's kind of like a puzzle, trying to get enough pieces in your head at once to see the whole thing.

Mike Baxter
Mike Baxter
4,442 Points

Don't let your learning affect your dreams! Learning is just a continually changing pathway toward your dreams and goals. I've definitely felt this way with some subjects I've been learning, and I've also overcome those obstacles and got to a point where now I feel like I know what I'm doing.

My guess is you need to do a few things. First, don't allow yourself to think that you can't do it. You can do anything you set your mind to (within reason of course, and learning PHP is definitely within reason). Don't be so hard on yourself. You'll get there eventually. Enjoy the journey. Second, figure out how you learn things best. For me, I find that I like to study something and take notes, and then I like to sit down a couple hours later (but only a couple hours, before I start to forget things) and try to remember what I learned. If I find that I forgot something, then that's actually a bonus. It's so helpful to recognize when and where and why I forgot something, because then I can identify it an learn it. The danger in learning something is when you read and read and read, or watch videos, and you never do an inventory check on what you learned. That's why Team Treehouse is so good, it constantly makes you do an inventory check to make you realize that you learned something. Third, you want to make sure you can create the thing on your own. It's sort of the "quiz" or the on-the-job aspect where you have to sit down and use only the knowledge in your head to develop something. BUT HERE'S THE IMPORTANT PART: my step three has varying levels to it. Take for instance the "clear fix" from CSS. The first level is where you get to cheat a little bit. So I started writing some web pages and I knew that I needed clearfix, but I didn't know the exact code for it. But it was great because I knew why I needed it. I didn't get negative about my learning ability because I couldn't recall the exact code. It's easy enough to look something up, especially if you take notes—the most important first step is to understand the structure or paradigm or reason your doing something. From there you can go and learn the individual lines of code.

Let me give you another example. I've been reading a lot of stuff on iOS programming, but I know there's a lot I can't recall of the top of my head. I know there are a lot of function names I can't remember and so on. But I don't let it bother me, because I know I'll learn them soon enough just by using them. My main goal right now is to get far enough in the book to get the big idea of what's going on, to get an understanding of how the author says iOS apps should be made. I'm taking notes as I go, mostly in the form of questions I have, and then I can go back later and hit the checkbox next to a question if I know the answer. Any question that doesn't have a check next to it, I know I should look up the answer for in the book. But I also know that when I'm programming something, I'll have time to look back into the book if I forget something, so what I'm mainly going for now is understanding how things fit together—I want to know where to look for answers. I know I can't possibly learn every line of code at once, but I know what I can learn. I can learn where to look for the answer when I forget something.

Probably the biggest way to learn something is by doing it. If you get stuck, be sure to look back at the book or video or whatever you're learning from.

So that's all about learning, what about PHP itself? How does PHP fit into web design?

PHP fits into web design because you can break things down into smaller parts. For instance, I recently set up a website that uses PHP. I have one PHP script that connects to my database, I have another PHP script that checks if a user is logged in, I have another one that handles the menu-bar of my web page, I have another script that handles the content of my page, and then within that I have a bunch of graphs—each of those are individual PHP files. So if you're asking how PHP fits into design, then a good portion of it is in terms of "modular" design. What I mean by that is breaking things down into moduals so you can easily work on one part (or reuse a part, like a menu) without having to change the whole page. For instance, if I wanted to add another graph to my page, I could write a separate file and test it out all by itself. I could make as many mistakes as I want on it, and no one would ever see it, because it's not a part of the page, it's a separate file. When I finally get it working properly, I can then go and include it in my page. All the user sees is that a shiny new graph has been added. So that's the "modular" aspect of using PHP in web design. Another aspect would be that you can make things happen programmatically, which can mean a number of things. Usually it means you have a "variable", meaning something that can change from one case to another, such as a user_id, and the whole page changes as a result of changing that one variable. So imagine Facebook has what are essentially templates of a page, but you just change the user_id variable and suddenly it's my page instead of your page. PHP also allows you to interact with a database so you can handle security and make sure that users can't see other people's pages, or to make sure that someone doesn't have access where they shouldn't. That's another aspect of PHP design—controlling the flow of the page, or controlling which things a viewer is able to see. There's a lot more, but I think that might be enough to get you back on track.

I hope this helps! Let us know if you have more questions. Don't give up, you'll get it soon enough!

Whoa dudes, thank you so much for your great answers!

I was actually thinking that I might have the wrong viewpoint going on here. It feels that I am FORCING myself to learn and that rarely works in anything. Maybe I'm stuffing a bit too much to my head at the moment, but I'm trying to make the most out of my free time.

Mike, that's some golden stuff right there. Thank you!

Mike Baxter
Mike Baxter
4,442 Points

Glad I can help! I've found that writing down questions for myself as I learn something is incredibly helpful. If I don't write down questions, I feel like I didn't learn anything. And it's not really the act of writing down questions that helps so much, I think it's more of that I can go back and read the questions and then all of a sudden I realize that I actually learned something, because I'm able to answer the questions. So the questions reveal to me that I learned something. If I didn't have the questions, I wouldn't realize how much I learned. It can be a great confidence booster. Fortunately, Team Treehouse already has a lot of great questions set up, so you can go back and review things you previously knew. If you miss a question, don't let it get to you, just go back and try to figure out why you didn't learn it in. (For example, were you tired and you rushed yourself on that part?) It can be really powerful to realize why you didn't understand something. It's nearly as good as understanding something in the first place.

Yes Mike, I scanning the book at B&N. And has interesting concepts and a good process to learn. Basically I learn some basics elements from Smashing WordPress by Thord Daniel Hedengren third and fourth edition. As well David Powers with a book title PHP Solutions: Dynamic Web Design Made Easy, Second Edition, and PHP Development with Dreamweaver. This guy is pretty good. Very basic, beginners teaching.

I was just going to ask the same question,as at times i get stuck but reading mikes answer put a lot worries to sleep.so thanks Mike and thanks Mikko

Mike Baxter
Mike Baxter
4,442 Points

Glad my answer could help you, John!