tags:

views:

385

answers:

8

I am completely new to programming - my interest lies in PHP & MySql for building a dynamic web application for Military Band Administration purposes. i.e. General info and social networking for members + added functionality for the management team to communicate effectively.

OK so the question - as I learn more about PHP there are terms used that I do not understand that must come from a common basis of familiarity between all languages i.e. "stack overflow" appears to be an obvious one - "using too many recursive functions may smash the stack" is another.

So is there a book (a primer perhaps) about programming in general which allows someone like me to have a better understanding of what all this means?

Bear in mind I am 57 years old (young) and am really just starting out.

Steve

+1  A: 

To get a good understanding of the inner workings of computer hardware and software in a very readable (not too technical) manner, I can recommend Code,The Hidden Language of Computer Hardware and Software by Charles Petzold.

The later chapters in particular talk about some of these more general programming concepts that are present in most programming languages. The earlier chapters focus on more the history of the computer and software, so not as relevant to your question.

However it's not a large book so the reading it all should be interesting/useful anyway.

There are better books if you are looking for an introduction to PHP/MySQL programming specifically, however if you want more general knowledge about how software and hardware works, Code is great.

Ash
Code is a great book, one of my favorites, but I thought it might be a little too low-level for someone interested in learning PHP and MySQL.
Bill the Lizard
I agree as far as learning PHP,MySQL, but I thought a book about "programming in general" would mean something more then just an intro. to PHP.
Ash
Code's really not about programming in general, it's about computers and how they communicate using...well, codes.
Bill the Lizard
Bill, sorry, it certainly is. For example on page 273-276 of Code, Charles describes the concept of a Stack as well as I have ever seen. The whole of Chapter 15 is on Bytes and Hex, Chapter 20 on ASCII, Chapter 23 Fixed and Floating point numbers etc.
Ash
That's 3/4 of the way into the book. Three pages out of 382. The other chapters you mention are on data representation, not programming. Petzold doesn't even mention high level languages until the last two chapters. It's a great book, it just doesn't answer the OP's question.
Bill the Lizard
+2  A: 

Well it is not book about PHP but I think a book like "Learn to program" from the Pragmatic Bookshelf might be useful for someone in your situation.

Julien Grenier
+9  A: 

Wikipedia is probably your best resource for general information on programming terminology. A large segment of their community overlaps with the programming community, so tech-related pages are normally very accurate, educational, and up to date. See their pages on stack overflows and recursion as examples.

Also, PHP.net is the best place to learn about PHP specifically, but skip the main page and go straight to the tutorial if you're just starting out.

Finally, I highly recommend the book Head First SQL for learning about databases. All of the examples in the book use MySQL. The entire Head First series is great. I hear they have a PHP book as well, but I haven't read that one.

Update: Head First PHP & MySQL is now available.

Bill the Lizard
A: 

I'm not sure if there's one book that'll teach you "The Fundamentals of Programming." The only way I know of learning all these things is simply practice. Get a PHP tutorial and start building things. Always keep your mind open to learning new things. When you find a better way to do something than a likely very inefficient hack you put together from incomplete knowledge, then use it and learn it and integrate it into your knowledge... after a few years of this you'll be golden.

Claudiu
+4  A: 

It sounds like you're missing some of the fundamentals covered in a computer science program. Not to worry, the information is readily available. You don't have to pay someone to teach it (though it's sometimes nice). Wikipedia's computer science entry isn't too bad for highlighting the major fields you're likely to encounter. Topics that are good to know:

  • Discrete math (Helps to understand formal logic, algorithmic complexity, probability)
  • Programming fundamentals (sounds like you may have a good start on these)
  • Data structures (Store and manipulate your data in an appropriate way for a task. For instance, why use a hashtable versus an array versus a linked list? From your list, the stack in a stackoverflow is a data structure.)
  • Algorithms (Manipulate your data structures in the most efficient way possible or at least know the cost. From your list, using too many recursive functions to "smash the stack" is an algorithmic choice.)
  • Computer Architecture (Understand what's really happening to your code after it's compiled or interpreted.)
  • Networks (Learn protocols, what happens to your software when it wants to talk to a machine it's not running on)
  • Comparative Programming Languages (PHP is just one way to skin a cat. Learn why its designers made the decisions they did and gain exposure to alternatives.)
  • Operating Systems (Knowing how hardware interacts with your software is good but it's probably more important to understand how it interacts with its operating system. File systems, process management, memory management, security)
  • Formal Languages/Theory of computation (Models of computing, grammars [used to validate and interpret code], limits of computing. Typically not used day to day as a software engineer. Then again, regular expressions finally made sense after this class.)
  • Software Design and Life cycle Methodologies (Be deliberate about designing, coding, testing, releasing, and maintaining your software.)

As far as books, I'd start by checking a trusted school's computer science program reading.

Stanford offers a set of classes online for free: http://see.stanford.edu/see/courses.aspx

MIT lets you download course materials for free: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/

Check youtube for computer science related lectures.

If you want something less school-focused, a quick search on Amazon with any of the topics above will give you results with user reviews.

Obviously, taken together, this list isn't really an introduction. I'd start with a topic that sounds interesting and jump in.

Corbin March
A: 

It's been a couple years since I read it, but Programming PHP did a nice job of introducing the fundamental programming concepts along the way. It didn't do much for helping understand more advanced concepts, like MVC (which is rare in the PHP world), it things like arrays, functions, callbacks, classes, etc, where covered.

acrosman
A: 

I like Corbin's comment, but I'll take the opposite approach.

Basically, with systems today, you really don't need to know all of the low level details of systems. Really, you don't.

If you find this stuff interesting, the entire internet is at your disposal -- and simply let you inner muse guide you through either necessity or simple curiousity. You can go as deep or as high as you want.

The truth is, computing today is simply SO fabulous that the project you want to embark upon is just a perfect opportunity to learn more about the arcane world of computing. The fact that folks can get as far as they can "without having a clue" is testament to how far the field has advanced. It's a good thing.

Is it a good thing to understand the process soup to nuts? Sure. Do you actually NEED that understanding to be productive and get useful results out of your time investment? No, you don't.

And, as you progress, if you actually enjoy this work (you well may not), the field goes as broad as you want.

Computing today is like "Home Depot". You can do it, we can help. There are hundreds of forums and thousands of pages of documentation, books, blogs, and discussion available for most any topic.

The key thing to focus on is simply getting your task done. Don't worry about getting it perfect, don't worry about "doing it the right way", don't "engineer" it. Just hammer bits together until you get something close to resembling what you want to get done using whatever you happen to find or intuit yourself. Because that's the easiest way to find out what you don't know, and how to not do things in your application. Try it and see.

You will be blinded by options, techniques, patterns, frameworks, etc. Not only is there "more than one way to do it", there are HUNDREDS of ways "to do it". Ignore the hundreds, and focus on the "doing it", however seems natural to you.

And don't let the yahoo's in their ivory towers poo-poo your questions, or shred your design. Unless their name is "Babbage" or they were cutting gears for the artillery computers back in WWII, we're all standing on the shoulders of giants here, and we all started somewhere. Honest criticism should always be welcome, but some folks seem to be beyond being able to offer that and instead resort to belittling.

I marvel at the applications I've seen "hacked", "butchered" and "OMG'd" together that folks get real, practical use out of -- and that's the real name of the game.

Good luck on your journey. Success in all your endeavors.

Will Hartung
A: 

Learning is quite individual, so your mileage may vary, but I find that asking questions in public fora is very helpful. If you don't know a lot of the topic it's easy to ask the wrong questions, or somehow focus on the wrong things. Getting direct feedback from someone more experienced usually helps with that. PHP is blessed in that it has a very large and friendly community. Further, a lot of its users are amateurs or inexperienced programmers, which means that there is a culture of asking basic questions about terminology and the like. I suggest that you tap into this source.

One place to start could be at sitepoint, but there are other places

troelskn