Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I tried doing tutorials but it is unorganized and unstructured, where can I learn PHP from beginner to master? I'm looking for a site like www.w3chools.com, but somehow I feel it is incomplete, specially when it comes to more advanced functions.
I know some basics but I wouldn't be able to for example make a secure online webstore, and I seem to be stuck at this point, how / where should I proceed?
I started 7 years ago. In my personal experience, your road to programming will look something like this:
HTML -> CSS -> Javascript -> PHP/MySQL
[Insert other web script language
here] -> "Desktop Languages"
For HTML (and CSS), I started by using a graphical editor at (then freewebs.com) webs.com that allowed me to add code snippets. I used some random GeoCities site (may it rest in peace) to look up things. Now, use Google or Bing.
Then, I got Jeffrey Zeldman's book, Designing with Web Standards. I followed through the book, typing out the code in notepad. Try to understand what the code does.
Do yourself a favor, use Notepad++ or Programmer's Notepad. They support automatic tabbing for neater code. It will make you a better and more sane coder in the long run.
Another thing I used to do was look at people's code by right clicking in my browser and hitting "view source".
This only gets you the HTLM/CSS after the PHP has been run and the Javascript before it was run. Google Chrome is good for analyzing scripts because of the debugging capabilities. (Don't worry about that yet though.)
Javascript was an adventure back then. Now, we have jQuery. Start with that or a similar framework. This can be researched online. I have never bought a Javascript book. I do have an ancient one from Visual Quickstart that I used to learn what a method looks like. Beyond that, the particular book in question is
an outdated rag.
To learn PHP/MySQL you can get a book. The two languages are often put together so finding books that show you how to use them in tandem should be a snap. I used O'reilly books for PHP.
I don't like the online PHP reference so much, because when I'm testing I don't always have internet. I use a virtual server setup on my machine. Look into that when you are ready to start learning PHP and MySQL.
The last thing to remember is that web standards are always changing, but don't get too crazy about it. when I started, XHTML was all the rage and now everyone is talking about HTML5. I still use XHTML as do many others. It goes to show that things move at different paces for everyone.
Good luck, I hope I helped!
EDIT: Geoff Adams pretty much sums up my post - Play around the invest in books. And, it will take time. I'm till nowhere near perfect.
Getting to 'mastery' is going to take a lot of effort, time and work. You can't become an expert by simply reading tutorials - the best way is to learn by doing. Get to grips with the basics, then play around. Once you're more comfortable, invest in some books.
If you're looking to build a complex system then you might be better using an off-the-shelf alternative. Try Googling around for various e-commerce systems (Magento is in vogue at the moment) and Content Management Systems (CMSes) before you decide to reinvent the wheel.
Read this book
also keep going through those tutorials (XHTML, CSS, Javascript) and try out everything you learn as you learn it.
I love the apress books so perhaps Beginning PHP and MySQL: From Novice to Professional, Third Edition might be for you? Do you have a development background?
You may want to look at picking up a book at your local book store or look at grabbing one off Amazon.com. I haven't found really good PHP web resource to learn from. Usually I just do a quick google search on topics I'm trying to code.
Another option is to just dive in and start building applications. I've found that the best way to learn PHP is to learn as you go. Once you have a grasp on the basic syntax and how to move around the code, then you can pick up a book at look at OOP topics as well look into Frameworks such as Zend, CakePHP, etc.
Are you absolutely set on learning PHP? If you are, then buy a good book - there's several mentioned here that are actually ok - but please, learn the security aspects from the start. There's more than enough PHP developers in the world who are writing insecure code (I used to be one of them, so I'd know).
Practice is key though; I've been programming in PHP now for about 6 years, and I'd consider myself fairly competent (I passed my Zend PHP5 Certification a couple of months back), but I still find functions I've never seen before.
A tip - don't even think of looking at Zend Framework, Magento or anything like that until you're comfortable with the basics. If you do, you'll definitely struggle; they use some advanced concepts which even I find it hard to wrap my head around at times.
Alternatively, you could learn something else...
The book recommendations are great. "Mastery", though, comes only from practicing your craft. If you want to learn PHP, you need to build many sites, with PHP (and HTML, CSS, Javascript, MySQL, etc.).
To have confidence that you can build a secure online web store, well, you need to build one. Maybe you can find a company that will pay you to learn. Maybe you will find a colleague to mentor you through it. Or maybe you'll have to dig into books, multiple web sites, and some poorly written "integration guide" from a payment authorization provider. My first time through I was nervous. The second time it went a little quicker. And the third time I felt confident enough to estimate how long it would take.
I'm not trying to be difficult or flip. I just feel that "learn by doing" may be the only way to learn much of this stuff.
Please allow my intro to properly define the scope of my question:
I'm still very new to the programming world. This all started for me when I had an idea for a software program, but no programming experience. I ended up going the outsourcing route to get the program, and after almost a year, we do have it live and functioning.
This specific program is written with php and is 100% web-based. We're using lots of ajax, jQuery, etc.
Now a year into it, I have been learning and learning wherever I can (lots of learning here!!!) I'm mainly focusing on Java now to build up to Objective-C and the iPhone fun (probably like 99% of all other newbie programmers out there).
I'm really learning so much, and one of the biggest things I'm learning about is proper commenting and scalability.
I'm seeing now that this job we just finished is very sorely lacking in both those areas. I am wanting to add and build upon this program, and not only do I not have much experience, but I'm seeing that it's really hard for me to even get an idea about the functions without these comments...
So my question is-what is the best course of action to begin to pick up the pieces on this program? A full re-write is out of the question, and I don't think is needed.
I'm sure this is not the first time some newbie programmer, software developer has been down this path...what do others do here?
Is it common for a programmer to come into a project very far along and then "clean up" the mess in order to make things move forward productively?
If this is the wrong place for this question (and I understand it may well be) can someone point me to where this would be more appropriate?
Thanks!
Joel
We call it "refactoring" and it's an important part of programming.
First, you must have a rock-solid set of automated tests. Usually we have unit tests that we run with a unit testing framework.
http://www.testingtv.com/2009/09/24/test-driven-development-with-refactoring/
Then you can make changes and run the tests to confirm that nothing was broken by your changes.
In some cases, you have to "reverse engineer" the tests around the existing programs. This is not very difficult: you have to focus on the interfaces that are "external" or "major" or "significant".
Since you're reverse-engineering, it's hard -- at first -- to determine what should be tested (because it's an important external feature,) and what should not be tested (because it's an implementation detail.)
I'm really learning so much, and one of the biggest things I'm learning about is proper commenting and scalability.
First, I'm curious what you've learned about "proper commenting" as this varies drastically. For some, it's documenting every class and function. For others, it may be documenting every line of code or no code at all.
After having gone through some of the different phases above, I'm with Uncle Bob Martin who, in Clean Code, says that you document decisions, not what the code does. The code itself should be readable and not need documentation. By adding comments describing behavior, you've created duplication that will eventually become out of sync. Rather, the code should document itself. Using well-named functions and variables help describe exactly what the other intended. I'd highly recommend Clean Code for a full discussion of these concepts.
As for scalability, it's usually something that you want to build in. Scalability might be a function of good design, or a proper design for the requirements, but poor design will make scalability a nightmare.
I'm seeing now that this job we just finished is very sorely lacking in both those areas. I am wanting to add and build upon this program, and not only do I not have much experience, but I'm seeing that it's really hard for me to even get an idea about the functions without these comments...
I see this as an indicator of one of two things:
That the code isn't well written. Yeah, that's highly subjective. -OR-
That you don't yet fully understand everything you need to. -OR-
A little bit of both.
Writing good, intention-revealing code is hard and takes years of practice.
So my question is-what is the best course of action to begin to pick up the pieces on this program? A full re-write is out of the question, and I don't think is needed.
As other posters have mentioned, Refactoring. Refactoring is the process of changing code to improve readability and usability without changing functionality. Get a good book on refactoring, or start reading everything you can online. It's now a critical skill.
Is it common for a programmer to come into a project very far along and then "clean up" the mess in order to make things move forward productively?
Unfortunately it is. It takes a lot of diligence to avoid falling into this trap. Try to make your code a little bit better every day.
I don't know about this being the wrong place or not, but I'll answer as I can:
Is it common for a programmer to come into a project very far along and then "clean up" the mess in order to make things move forward productively?
Yes, in my experience this is very common. I have been doing contract work for over 10 years, and I can't count the number of times I've had to come in and clean up something hastily put together to either make it scale or to be able to add functionality onto it. This is especially common when you outsource the programming to another company, the incentive there is to get it working and out of the door as quickly as possible.
So my question is-what is the best course of action to begin to pick up the pieces on this program? A full re-write is out of the question, and I don't think is needed.
I don't know that there is a "good" answer to this question, the only thing I can tell you is to take it one method at a time and document what they do as you figure them out. If you still have access to the people that initially wrote the program you can ask them if they could give you documentation on the system, but if that was not included as part of the original work spec I doubt they are going to have any.
I'm really learning so much, and one of the biggest things I'm learning about is proper commenting and scalability.
As you have found on your own, proper commenting is important, I'm not convinced on the importance of building scalability in from the beginning, going by the YAGNI principle. I think that as any program grows it is going to go through growing pains, whether that is scalability or functionality. Could someone have built twitter from the start with the kind of scalability in mind that it currently needs? Possibly, but there is the very real possibility that it would flop.
Is it common for a programmer to come into a project very far along and then "clean up" the mess in order to make things move forward productively?
It's definitely common for pretty much EVERY programmer :)
Having said that, remember the IIABTFI principle. If It Ain't Broke, Don't Fix It.
Understanding how the program works and what the pieces are is useful.
Trying to improve it without a specific goal and a business purpose in mind is not.
The big question is how well is the program currently running meeting the needs of those that use it? While it may not be the best looking code, it does work which may mean that you end up doing 101 refactoring exercises around it to get enough of the basics down to make other changes.
While you may be able to ask the original writers of the program, this can be a possible sore spot if they think it is awesome and you think it is crap, for example. It is an idea and one that should be carefully analyzed a bit before one goes and ends up burning bridges because they think you can't appreciate their genius in what was done.
Often this aren't done in an optimal way and so as one learns better ways to do things, things are done in better ways. There is a limit to that of course, but I'd start with the idea that you have some refactoring lessons to help get the basics of the app under your belt and then start putting in enhancements and other stuff to see what was really done in the end.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have this idea for a website that's been floating around my head for quite sometime now and now have finally decided to get to work on it. Due to the nature of the project and my experience I am getting comfortable with the idea of running it as a PHP+MySQL application on an Apache server.
This is my first time doing web programming of any sort(I have a background in sysadmin and mainframe systems coding) and I am pretty unsure of what practices to take into consideration so that I don't find myself undoing/redoing things later in the project. Considering all the flak the language has taken on StackOverflow(which can be seen here and here) it would be nice to have a set of common mistakes to watch out for for a beginner like me. I did find this thread outlining things to avoid in PHP but most of the points made little sense to someone like me who's just setting out in PHP.
Do you have any suggestions, tips or tutorials outlining common gotcha's in the language which might come back later in the project demanding entire rewrites.
For what it's worth I am currently working my way through Programming PHP(O'Reilly) and PHP in Action(Manning).
I was in a very similar position a couple years ago, having come from a NOS background myself.
I actually started with PHP and MySQL for dummies. Once I had absorbed the knowledge contained therein, I hit the Web (I used SitePoint a lot, like Boushley recommended) and I read a couple of O'Reilley's book on the subject.
Once thing I will tell you, is that if you want to streamline your understanding and your efficiency, I have found great success with a number of MVC frameworks(CodeIgnitor, CakePHP, etc). If you have no idea what MVC is, I recommend finding out. Now that I use MVC, my code is easier to understand, modify, troubleshoot, etc.
And honestly, half of the learning in PHP is running into those common mistakes and learning from them. Its hard to appreciate those 'common mistakes' until you make them.
Don't worry about HOW you are going to learn, just START leaning!
If I could give you one piece of advice, it'd be to use a framework - they will make your life so much easier. They take away all the repetitive code from programming websites, handle security concerns and abstract lots of things, as well as make you build your website using a pattern such as Model-View-Controller.
I highly recommend the CodeIgniter framework for it's simplicity, power, great documentation and ease of use, but there are plenty of other good frameworks too. There are lots of questions on SO on this so have a quick search. There is a fantastic introductory screencast on CodeIgniter (soon to be a series) from BinaryCake, so check that out here.
I hope that's helped! If you have any PHP concerns, feel free to message me - it's my area of expertise (along with CodeIgniter) and I love it!
While still developing, have all errors show up:
ini_set('display_errors', '1');
error_reporting(E_ALL | E_STRICT);
Can save a lot of time (in case of say, typos in variable names). Change this when it goes live to not display or only display "real" errors depending on the type of site and security levels involved (you don't want everyone to know paths and variable names and such..).
Find a variable/function naming convention (under_scores vs camelCase vs..) that suits you and stick to it. Also, classes go in the /class directory, includes in /inc etc. Both these make it easier to understand your own code years from now. Oh, and the same goes for coding style, I guess: choose one and stick to it (indentation, bracket style, ..).
Comment your code :-) Personally I also have a little log at the end of longer files that shows when I did what and why. Each addition is timestamped, and the same timestamp is also in the comments behind the change itself, as the line number on which it sits can easily change. Similarly, in an included file containing a bunch of functions, I have the list of function names in a comment at the top of the file, with a one-line description behind them.
Finally on security (though this should really be your first concern ;-) ), treat all user input as suspect. That's POST & GET data, cookies, user-agent string, search strings - anything that is supplied by the browser. It's trivial to change cookie data or change/add form items.
Read up on SQL injection & XSS attacks, and look at PHP's relatively new data filter functions: http://php.net/manual/en/intro.filter.php
Google any of these to get some good reading
Don't use register_globals
Turn off magic_quotes - escape all user entered input in SQL statements
Escape any user entered input printed with htmlspecialchars()
Plus a lot more... These are some common things to watch out for though.
There are a number of great websites out there with lots of tutorials. One that comes to mind is Site Point. They'll try their best to sell you a book or two while your're there, but they do have some decent articles. This article for instance discusses some common security blunders in php.
http://www.sitepoint.com/article/php-security-blunders/
They have lots of them...
http://www.sitepoint.com/search/search.php?ps=10&q=php&submit=Search
Also a nettuts.com has a load of tutorials an things of that nature. They're more all across the board though.
http://nettuts.com/
And I think pretty much everywhere you look you'll see the common ones like watch out for register_globals, magic_quotes...
one good book to look at that is also free to download here covers beginner to advanced PHP techniques and is good way to learn good standards :)
Use a framework and use Object Oriented Programming
Books are great for learning additional languages, but for your first one, a good video tutorial is a great way to go!
Register for a Lynda.com account (google: lynda trial) and sign up for as many one day trials as you need (or be a good honest person and purchase a week). They have a pretty good beginner and advanced PHP series of video tutorials which are (IMHO) a great way to learn your first language.
A tip: If you can start programming Object Orientedly from the get-go, you will save some time in the future and learn good practice from the start, luckily the advanced tutorials cover this!
Here's a link: http://www.lynda.com/home/DisplayCourse.aspx?lpk2=435
I've never taken this particular course (when I learned a few years ago, it was different), but I just recommended this to a friend (who was just starting), and he really liked it!
Hope this helps!
If you're new to programming in general, A database backed web application is likely to be a bumpy ride. You will probably be programming in at least two, real programming languages, PHP and SQL, and if you're going to do anything of modest complexity, JavaScript too. Keeping them strait will be rough, because they are all quite different.
Just to warm up to programming, you might want to start instead using a more focused learning excercies, such as working through the Euler Project problems, or Code Kata.
Either way, Try to pick up good habits wherever you learn about them, including the popular suggestion here of using an MVC framework for the heavy lifting.
My understanding is that asking for a work sample is a good way to determine if someone has the skillset you are looking for, as some people just interview well. So I want to ask potential developers to write some sample code for me.
I'm looking for ideas on what kind of small project would be something they could do in an hour or two, and would show that they have a good grasp of OOP, good coding practices, etc. And what to look for once they finish - how to evaluate it fairly and usefully.
For context, I'm a small business owner, interviewing prospective developers, for PHP development on internal projects. I can code PHP but am not an expert (some of the work is refactoring code I've written to be better structured and consistent), and so I'm also looking for what to look for when evaluating the samples, given that I'm not a trained or super experienced programmer.
Especially for people who have done hiring of this type before and used this method.
I was also thinking I could give them some code to refactor, and see how they do on it. Has anyone ever given a refactoring test as part of the hiring process?
Clarification:
I'm not talking about coding during an interview. I'm talking about coding instead of an interview. For context the inspiration for this question came from this article in FastCompany about how work samples are better predictors of job success than interviews:
Why It May Be Wiser To Hire People Without Meeting Them
http://www.fastcompany.com/magazine/136/made-to-stick-hold-the-interview.html
I would create a not necessarily good application and embed some bugs. I would come up with some simple functionality to be added to the program.
Does the applicant find some bugs?
How does the applicant's code integrate into the existing code?
Does the applicant get stuck on something that doesn't really matter?
Does the applicant adapt to the coding standard of the existing code?
After this exercise, discuss the code with the applicant. This may be more valuable than the actual code.
NOTE: with regards to #bpapa answer I would make sure that problem is novel and obviously not to be used in production.
Personally I would refuse to do this when asked. An interview is one thing, and doing programming questions on paper to asses technical knowledge is fine, but actually writing some kind of application for somebody is billable and I wouldn't do it for free. Even if it only is supposed to take an hour.
I think you should focus more on what the person has done in the past, and ask technical questions that you know the answers to (since you said you have limited PHP knowledge and want a PHP developer).
I would heed Joel's advice that giving homework assignments for interviews just weeds out the best programmers (paraphrased from his book). The better programmers have a lot of options and so won't want to go through the exercise of a programming assignment. They just won't apply. That will leave you with the mid-competency people. Unfortunately, in my experience those are the ones most likely to try to look better than they are and if you aren't an expert yourself, the ones most likely to mislead you.
Here's an alternate option. Have them point you at some work they have already done. Not necessarily the code, but the site. During the interview, ask them questions about how they coded it. What data structures did they use? How were the classes or functions organized? What problems did they have to overcome?
Then as traditional programming questions in the interview that they could answer for you ont he spot. This way you can gauge their understanding and their syntax. The two don't have to be the same question.
If you are not an expert then I would suggest you be careful about trying to evaluate other developers. You should probably figure out a better way to assess the dev skills of someone else if you are not that comfortable with your own level.
I am not sure there is a good solution for you.
I'd make the coding samples very straightforward and not have it take an hour or two. Simple coding exercises that take a few minutes should be sufficient - combined with other discussions about best practices, frameworks, design questions, etc.
I like the problems at streamtech. They are pretty easy and can often be done in rather short time, but they show that the applicant is capable of structured thinking and translating this to structured code.
As for evaluation---I would use this as an opportunity to learn. Do the problem yourself first, then compare to the applicant's code. Look up any constructs that you don't know, then ask yourself which version is more obviously correct.
I think the best thing you can do is try to have a real expert sit in on the interview with you. Hire a third party if you need to. I'm not sure it's possible to be able to give a quality assessment of someone who is a more experienced developer than yourself.
The other thing to consider is that really good developers may pick up on the fact that they are more experienced than yourself, and if you indicate that you are one of the developers it may actually put them off (not trying to be offensive, I just mean in the context of you implying that you are not very experienced.)
Give them an address or such as a plain text file and ask them to create a simple script to turn it into XML. I used that once and it worked wonders.
If you want to test them on the spot, ask them to reverse a string. From an organisational standpoint, perseverance, determination and enthusiasm are just as important as being technically adept, IMHO.
Well, everyone seems to be discouraging the coding effort for an interveiw. I'll disagree with the disagreers. To answer your question--if you want an example of what to have them code--drop a simple calculator on the table in front of them and ask them to write a program to create the calculator virtually. Give them half and hour and see how far they get. Some may finish in that time.
Have you ever tried pair programming before? Two people sit down at one machine, they share keyboard and mouse, and talk about what they're doing as they go. I think this is absolutely the best approach, because it will, eventually (after everyone's panic subsides), really indicate how well you two work together.
If you're not a great programmer, this person should be able to teach you and put you at ease. If they're not that good, but you work together well, that might be more desirable than a brilliant but unpleasant person.
At the end of the session, just delete your work. No big deal.
I've never been a part of the hiring process... but in interviews I've done, I was asked once to implement a doubly linked list, and another to work out an algorithm, the classic, how many integer points within a given shape, in this case three points forming a triangle, once in O(n^2) and then again in O(n).
I don't think the way to do it is to make them program something, but to make sure they know how to figure it out. You give them a problem or ask them a question, and tell them to think out loud, and observe their thought process. This doesn't exactly show if they have clean code, but depending on the problem it gives you insight as to wether or not they know what their talking about.
Having a small, well defined task can help you take examine people on a level playing field with a relatively small investment of time on their part. You don't need something complicated to see what people can do.
In the past, I've asked people to write a small web application that exercises a few fundamental concepts. We keep the particulars of what the application is supposed to do really simple.
I would also try to avoid tasks that require a lot of supplemental knowledge (viz, don't ask them to solve a problem from your particular problem domain).
Edit:
Regarding "small, well defined tasks": What I try to shoot for is something that includes a very thorough description of some simple business logic as part of a larger programming task. For example, one of the programming assignments I've given in the past involves setting up a simple Java web application and implementing a few features. We made sure to describe thoroughly how the features were supposed to work to remove ambiguity. This was for a couple reasons:
The point is really to see if the candidate can build a simple application from scratch, not to see whether they can guess correctly about what we want.
If you define the task really well, you get to see more about how thorough someone is with the type of work that they're likely to be doing in a business situation.
We wanted something flexible enough to give to candidates at varying levels of experience.
I should note here that I think programming assignments are most effectively used to check for competency. If you give a really hard assignment, or one that isn't well-defined, odds are that you're not going to get results that tell you what you want to know (unless you're testing specifically for how the candidate handles difficult assignments or ambiguity).
I argree with bpapa about it being an interview instead of a test run, maybe instead consider asking some questions about how they would undergo certain talks to do with the programming...
I once had to sit a Visual Basic MCP exam at the end of which they didn't even bother to give me the result.
Happily though when I asked the question as to whether I would be given the result I was sitting at the Commit/Cancel screen.
So I hit cancel thanked them for wasting my time and walked out.
To answer the question:
For PHP, I think a shopping cart, address book and forum would be good projects. Those usually cover a wide spectrum of web-programming topics - sessions, registration, database, form processing and authentication.
Personally speaking:
It looks like you looking more of an architecture person than a coding guru. I wouldn't penalize the applicant because he cannot come up with the name of an obscure function or need to refer elsewhere. The key thing is that he has the initiative and know where to look (heaven knows how many times I need to look up PHP.NET). A good question for an architecture guy, IMHO, is to tell him you have a data-set, but you have three different ways of displaying them and each view has different operations. If his answer is just a gigantic SWITCH-CASE, then he may be the wrong choice.
Usually weak programmers does not understand recursion pretty well, that's from my observations as far as now, now this does not have anything to do with PHP directly and probably a recursive factorial or fibonacci series wouldn't be a big deal, but let's say to load a tree control with data from a database with some parent-child relationship might be a good sample.
Also as you're not an expert as you said, think off something you can handle confidently.
It usually depends on the language you are hiring for. For example, when I went and gave an interview for PHP, I was asked to write a blog script, using custom MVC framework, whereas when I interviewed for an opening as a JS dev, I was asked to code a certain plugin in jQuery. Its more dependent on you are hiring the guy for ultimately. You dont want to ask someone to write you a music recommendation engine and then have him work on a payments gateway processor.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I myself am one of these types of coders, who never learned coding in a formal setting, but am instead, self-taught by the use of copy and paste scripts, and pre-authored works available through GPL projects and premium software's(which is often the way commerical script companies show you how to change, or update code in their script ie. "Copy & paste this on line 234, etc..")... this are my beginnings.
I don't understand how what I do works, but I am getting good at what I do with code, though I feel because of my informal learning methods, that I lack in knowledge, some of the really simple, but necessary principles of web coding in general(the ins and outs of servers, browsers, etc). I feel as though I have started from the inside of understanding code, the practical side.. and lack the basic fundamentals, and theorized understanding of what I am doing.
I also know quite a few others who are the same, who started learning in the same communities as I, and are pretty much at the same point as me... Feeling as though something big is missing from the picture.
I see the lacking in my discipline when I attempt to use PHP authoring tools, which I find very challenging to understand... and this is becoming a downfall on the time frames in which I complete my projects(having to hand code everything). I also find it difficult to ask for help at times, for lack of the specific language that comes with programming, and being able to use the right words to explain the intricacy of my problem.
I was a hairdresser by trade, I worked as a bartender, and hotel manager, I'm a business consultant by profession. I've been learning web development slowly now for 3 years, and I have taken on quite a few commercial projects over the past 2 years, but I'm obviously feeling some lacking in my skills & overall knowledge.
Basically, Id like to ask any experienced coders who've had similar beginnings to give me an idea on how I can adapt my coding disciplines to be more effective and productive. What would someone with such an informal understanding of programming want to seek to learn, and understand. What are the things I must know as a programmer... and what is a basic overview of the whole picture???? Feel free to direct me to articles
Any help is always appreciated.
Lea
Edit: Just to give a round up of my actual capabilities. I am a programmer, I do author my own code from scratch.. and sell my work. I can write PHP functions, and classes, use mysql, have a good working understanding of html & css, and am very good in the design aspects(web graphics), and am learning javascript/ajax/jquery, as I am using jquery in most of my projects. Thanks for all of the answers so far!
Realise that "copy and paste programming" is not actually programming, despite the name. The act of "programming" is figuring out how something should work, and what code is needed to make that work. Therefore, when you copy and paste some code, it is someone else who did the programming. This isn't a bad thing necessarily, as you shouldn't always need to write code yourself. But to call yourself a programmer, you do need to have written the code yourself.
You will want to start humble. Don't try to write a large complex application as your first step into programming. There is a good reason why most people who are taught programming are first taught how to print "Hello, world". This is because there is a lot more that you will need to know than just what code to use - you need to know where code execution starts and how it flows, and that sort of thing. You need to be able to look at the code and step through it mentally, knowing where program execution will go next, so you understand how it will work.
Take a tutorial or course in programming. There is so much free stuff online. Do not trust any tutorial that just gives you large chunks of code, make sure it forces you to actually come up with some code yourself. Do exercises such as sorting strings, calculating fibonacci sequences, and the like, and "echo" or "print" the results. Learn about conditional statements (like "if") and the "for" loop and play with these to do various things.
GUI or forms programming is more complicated; make sure you know the fundamentals of the language before you go looking through any API or framework documentation to see what the language can do. You'll need to know how execution flows, how to write functions, what types of variables you can use etc before you can effectively use an API or framework anyway. It is boring not being able to do cool graphics or forms and sticking to basic text or number processing, but you have to walk before running. Make sure you are doing, not just reading. When you learn about something new like the Array type, the "while" statement, try it out. By actually doing it, you'll "get it" a lot faster than just reading a book or website and you may be more likely to remember it.
Read books about programming. Some people say you should learn C before you learn anything else. I don't necessarily agree, but if you do learn C then the book to read is "The C Programming Language" by Kernighan and Ritchie. Many programming books are very interesting but either not suitable for beginners, or aren't going to teach you how to actually begin programming. This one is an exception.
Use a decent text editor with syntax highlighting and line numbering. That's all you should need. A big IDE that also does code completion and the like is not necessarily helpful at the learning stage. Don't spend too long choosing one or setting it up. If you don't already have one, just get Notepad++ (if you're on Windows) and be done with it. If you don't like it you can change it once you get more proficient. Or if you've already paid for Microsoft Visual Studio then use that, but don't go out and get it just for the sake of learning a language. Avoid falling into the trap of spending all your time sharpening your tools and no time using them.
The easiest and fastest way to do this? Find a mentor, or a set of mentors. Not necessarily a real-life mentor, they can be offline, although a real-life mentor is more practical.
You can find these people when you participate in local software development communities, e.g., forums, or user group meetings. Frequent these places, both offline and online; the amount of knowledge that you will learn is immense, not to mention the benefit of being able to bounce ideas off of other people.
Code Complete and Pragmatic Programmer are likewise excellent book suggestions above. I suggest you go with Code Complete first, as it tackles on how to make your code sensible and elegant, which you certainly can use immediately.
Goodluck!
We all learn differently, so don't feel handicapped because of the way you've entered the field.
I guess the simplest, easiest thing I can suggest would be to get yourself a PHP book (seeing as that's what you're familiar with right now) and start from there to build up confidence.
In your spare time, just create some very small basic apps to practice without any pressure. Then take on a language like Python, Java or .NET.. depending on what takes your fancy. With a language or two under your belt, then you can take on books like Code Complete, which will cover some of the more esoteric areas of software development.
Good luck, this is a profession where you really never stop learning.
in case you're interested to becoming a better programmer, i must recommend that you read the pragmatic programmer, don't worry, it's not a full text of codes which will make you pull your hair out but useful lessons which can only be distilled from years of programming experience written in an easy to read but still very informative kind of way :)
I'm not at all convinced that the premise of the "Copy & Paste Generation" is any kind of new phenomenon. Only the tools are available to a wider audience now than before.
If you want to really hone your skills, it might be worthwhile to take some classes, either at a local community college or in a self-directed learning environment through the use of some of the many, fine online resources or books
I believe Code Complete is another book along the same lines of the Pragmatic Programmer that has already been recommended.
I have been your situation before, senior year of high school in an internship I "learned" c and shell programming mostly via copy and paste, and later on at various times when I may have been in a similar situation with specific technologies.
My recommendations:
Take a class at your CC. The one you want is the one that is the prerequisite for the advanced programming classes. They probably also offer a "I've never touched a computer before" level class but this one won't be the formal prereq for the follow on classes. This will probably be in Java.
Work your way through one of the better programming books that includes exercises. Kernighan and Ritchie's C Programming Language is a classic. This would be my recommendation because C is similar enough to PHP to be familiar, but different enough that you will be able to keep them separate. I say this even though you will probably never write a single line of production C. Paul Graham's ANSI Common Lisp is also a suitable choice.
If you are really hard core and have the dedication, you can try Structure and Interpretation of Computer Programs, by Abelson and Sussman. This is the book used in the first programming course at UC Berkeley ( http://webcast.berkeley.edu/course_details.php?seriesid=1906978389 ) and at MIT ( http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/CourseHome/ ). This may be too difficult to attempt outside a school environment. It's designed for bright young students with nothing to do but study and with the regular opportunity to get tutoring from grad students. I include it only for completeness.
I would avoid any web programming books. You already know web programming. I get the impression that you are feeling like you are hitting a bit of a wall, and looking at a way around or over that wall, rather than trying to go directly through it.
I would advise against looking into any web oriented book because it will not give you the big picture, it will describe technique only as they apply to web programming. The important things to understand are how a computer actually operates, the difference between the stack and the heap, pointers, the basics of garbage collection, recursion, and it'd probably be helpful to understand at least extension mechanism. I mean, if you understand shared libraries on Unix, or DLLs on Windows, or classpath and jars on Java, or how to create a library in PHP, Ruby, Perl or Python, any one of those will be fine. It's just the concept of loading outside code that's important.
Take a look at The Structure and Interpretation of Computer Programs and see if you think it would help.
Copy and paste programming refers to using the same code several places instead of putting it in a function or class. If all you do is modify existing source code while following a howto guide, what you do is not called programming, just copy and paste.
What you need to do is read a book on programming, whatever you feel your level is. If you feel its copy and paste level, you should start with a beginners book. Forget everything you think you know, read and follow the book. When you've finished you can remember some of the clever code(?) you noticed during your C&P days.
Mastering any skill takes time, but if you keep at it you'll become better. There is nothing inherently different about programming in that sense. Exactly how you learn best, is a highly individual matter, so it's really hard to give any meaningful advice on that. In my experience, combining different types of learning (practical experience, being around other programmers, reading books, formal education etc. etc.) in even-sized doses works better than just pursuing one type of learning (Such as formal education).
You might find these readings interesting, if you don't know them already:
http://www.norvig.com/21-days.html
http://softwarecraftsmanship.oreilly.com/wiki