Shawn Stratton PHP Geek

4Apr/11Off

Reading List for Aspiring PHP Developers

A few years ago I started buying tech books on every subject I had a remote interest in.  While I still have yet to read all the books I've had an interest in, I've read many specific to Web Development and I have some recommendations to those who are just starting out.  I'll break this down into sections, I'll be starting with Basic PHP & MySQL and then branch into specific subjects.  Reading these books will NOT make you a rockstar developer, but it wont hurt your ability to become one.  If this post turns out to be of value I may convert it to a Page at a later point, I'll also be linking to all of these via Amazon.

Getting Started -

Advanced PHP -

These cover various topics, please pick and choose on what you feel you need to learn. Exceptions are starred and bolded

Front-End -

Database (MySQL) -

Database (Document/NoSQL) -

Operations -

Advanced Programing Topics -

Contributing to and/or Extending PHP

  • C Programming Language by Brian Kernighan and Dennis Ritchie (Awesome book that will teach you enough C to be dangerous)
  • Extending and Embedding PHP by Sara Golemon (Best Extension writing book out there, downside is it's a bit dated and the author has yet to do another edition)

That should be enough of a list to keep anyone busy reading for a few months (if not at least a year or so.)  By all means if you have a book you recommend, list it with the name of the author in the comments and give a short blurb about why.  I'll be watching the comments and I'll add in where applicable.

Tagged as: , , 5 Comments
10Jan/11Off

Git (or my take thereof)

Git Logo
(Image used under Creative Commons License.  Artwork by Azizash http://azizash.deviantart.com/art/GIT-Logo-95183398)

Flame Wars and Religion

So I'm probably going to start a flame war here, mostly because SCM is a highly religious topic, we each have our own beliefs and theories and philosophies and pragmatics, that I'm sure we're all willing to discuss until well after the apocalypse.  I'm merely hoping to share my feelings and maybe get some feed back and correction.  First let me start out by stating my main topic: If you have to ask is it for me then Git is not for you, no I'm not an elitist, nor do I think you're not intelligent enough to grasp Git or it's benefits, but if you have to ask on whether you should use Git then it's simply not for you yet.  Please don't follow the rest of us lemmings (yes I know they really don't commit mass suicide) over the cliff and dive off  just because everyone else has told you Git is teh awesome!!!

My Usage of Git

Ok so keep in mind, I've been using Git now for almost a year, predominantly with a wonderful addition called Git-SVN and where I wasn't bound by SVN with a branch manager called Git-Flow.

Some of the things I love about Git are:

  • It's blazing fast.
  • I can branch without having to wait and re-integration is usually painless.
  • I can rewrite history (interactive rebase) before I push my commits to SVN (git svn dcommit) or when I've really really flubbed up.
  • I can stash changes and move them to another branch without difficulty.
  • For a console cowboy, the fact that git log automatically uses less is heaven.
  • There's plenty of documentation out and about.
  • I have a million and one ways to shoot myself in the foot.

Some of the things I dislike:

  • I have a million and one ways to shoot myself in the foot.
  • Documentation that's out and about is very religious and usually primarily focuses on one or two ways to use Git.
  • Way too many cli flags to remember.
  • No clear cut solution for a central "master" most solutions involve promoting a headless peer to master status.
  • Poor support for non Unix based distributions (yes Windows I hate you and I'm looking at you but this time it's not really your fault.)
  • Poor IDE integration (EGit/JGit aren't all that great.)
  • A certain elitist air about Git within the Git community

My perceived problem of Git

The real issue I take with Git is simple, it's too complex to serve as a good fast, flexible, and usable tool for most people and companies. Most people, using SVN, are content with updating a branch and committing their changes, this is usually done by:

svn up
svn ci -m "Message"

The equivalent in Git is:

git fetch | git pull
git add [File Handles] 
git commit -m "Message"
git push (If using a central repo)

The problem here is complexity and choice, now not only do you pull (fetch & merge)  but you can also fetch & rebase which takes your branch back to what it was originally, adds the new, and then reapplies your changes, and this doesn't even cover what happens if your branch isn't setup to track where you want to pull from or cherry picking.  Nearly every example using git vs. svn is the same, there are a bunch of choice, new commands to add, and ways to deal with the problems your own choices create, plus now you have to keep track of multiple sources, that may or may not be up to date.  If you really want to complicate matters, start adding multiple branch merging, pull requests, order of merges,  bisecting branches, and the issues interactive merges can create.

The benefits of Git

I wrote earlier that Git gives me a million and one ways and I showed how that complexity really can screw you up if you're not aware of it or capable of handling it.  The reality is though, SVN (and CVS by extension) is completely inflexible, slow, and basically not powerful to handle most large projects with multiple developers and versions/features.  I've personally found great use with Git as a personal repository pushing to SVN (using Git as a client) because I prefer to branch off a stable branch when developing new features (rather than polluting a stable branch) and committing at any minor milestone.  Further some of the tools out there for Git (Github) are completely awesome for social development. If you have the time and capability of learning Git completely, it's a very powerful tool to wield, perhaps with a dual edge since it seems rather easy to slice yourself if you just foul up a little.

A pragmatic approach

My proposed solution is a simple one, merge some of the functionality from Git with some of the philosophies of SVN.  What do I mean by that?  Well, Git is a very powerful tool written for Kernel development (that should say everything about why it's as complex as it is) I would suggest merging a good chunk of it's functionality with the existing (and proven) philosophy of SVN, this includes simple commands without difficult to understand required switches or varying functionality defined by switches, then take the distributed system and apply on top of the existing model of a centralized server.  To further dig in, I think distributed nodes with a centralized main repo (that's enforced) where the main repos consistency is enforced to the nodes.  Maybe this would be better, maybe it wouldn't be, but from my perspective it makes a lot more sense.

A solution for now

Currently you can use Git as a SVN client, maintaining a local repository of the remote SVN repository using git-svn.  By using the tools this way, you still get the best of both worlds, only major issue left is that there isn't full compatibility with Git and SVN and it takes forever to update a SVN repository especially when branching/tagging is involved.  If, however, you are comfortable with using Git as a central repo (detached head for example) then I strongly recommend using Git-Flow (Awesome Blog entry about Git-Flow) it'll ensure your branches have some sort of sanity.

Conclusion

While Git is an awesome powerful tool, it can be overwhelming for someone who doesn't appreciate all of the functionality or the time spent learning the functionality and the underlying philosophies.  If you are mulling over using Git and are uncertain, please don't do it just for the sake of saying we/I use Git.  If you have a real need, and don't mind the additional complexity, you'll wonder where this tool has been all your life, otherwise you'll just be pulling your hair out and considering what you were thinking.

Filed under: PHP, Tools 2 Comments