A Little Background

I'm 28 today, and I've never had any formal training in software development, but I do have two higher education degrees equivalent to a B.A in Public Relations and an Executive MBA focused on Project Management. I've worked on those fields for about 6 years total an then, 2,5 years ago I quit/lost my job and decided to shift directions. 

After a month thinking things through I decided to start freelancing developing small websites in WordPress. I self-learned my way into it and today I can say I run a humble but successful career developing themes and plugins from scratch for my clients - mostly agencies outsourcing some of their dev work for medium/large websites.

But sometimes I just feel that not having studied enough math, or not having a formal understanding of things really holds me behind when I have to compete or work with more experienced developers. I'm constantly looking for ways to learn more but I seem to lack the basics.

Unfortunately, spending 4 more years in Computer Science is not an option right now, so I'm trying to learn all I can from books and online resources. This method is never going to have NASA employ me but I really don't care right now. My goal is to first pass the bar and to be able to call myself a real programmer. 

I'm currently spending my spare time studying Java For Programmers (to get a hold on a language everyone says is difficult/demanding), reading excerpts of Code Complete (to get hold of best practices) and also Code: The Hidden Language of Computer Hardware and Software (to grasp the inner workings of computers).

TL;DR 

So, my current situation is this: I'm basically capable of writing any complete system in PHP (with the help of Google and a few books), integrating Ajax, SQL and whatnot, and maybe a little slower than an experienced dev would expect due to all the research involved. 

But I was stranded yesterday trying to figure out (not Google) a solution for the FizzBuzz test because I didn't have the if($n1 % $n2 == 0) method modulus operator memorized.

What would you suggest as a good way to solve this dilemma? What subjects/books should I study that would get me solving problems faster and maybe more "in a programmers way"?

EDIT - Seems that there was some confusion about what did I not know to solve FizzBuzz. 

Maybe I didn't express myself right: I knew the steps needed to solve the problem. What I didn't memorize was the modulus operator. The problem was in transposing basic math to the program, not in knowing basic math.

I took the test for fun, after reading about it on Coding Horror. I just decided it was a good base-comparison line between me and formally-trained devs.

I just used this as an example of how not having dealt with math in a computer environment before makes me lose time looking up basic things like modulus operators to be able to solve simple problems.

In your case, as you're self-taught and already have what seems to be a good, healthy and no-BS approach to learning. Still some suggestions...

Practice Makes Perfect

I think you should dive into progamming exercises, like the:


Project Euler,
the classic 99 Prolog Puzzles (just as good for any language),
TopCoder,
Google Code Jam,
and so forth.


Even grab the past exam questions of known universities around you, or of local (or remote) programming competitions. For example, we have a nice one in France for aspiring high-school programmers is called Prologin, and it does provide every year a good series of head-scratching puzzles (probably French only though, sorry, but that's the sort of things I mean).

For more: Where Can I Find Programming Puzzles and Challenges?

Classic Books and References

We could also recommend a very long list of amazing books, but I'd say the Zen answer is that there's no single right way to Enlightenment.

It would be hard to tell you which ones are top of the list. So keep reading a ton of stuff to learn general pitfalls to avoid and best practices to follow, as you are correctly doing now.

For more:


List of Freely Available Programming Books
What is the Most Influential Book Every Programmer Should Read?
What Books Should Everyone Read?
What Papers Should Everyone Read?
What Videos Should Everybody Watch?
or even Where do You Start When You Have an Interest in Computer Science and Programming?
Become a Programmer, Motherf*cker (Pardon his French ;) His tutorials and lists of resources are worth it)


Pushing the Limits

Also, look for head-scratching material, like:


Hacker's Delight by Henry S. Warren,
Matters Computational by Jörg Arndt.


Not necessarily to be taken as an example of things to do nowadays, but worth trying to figure out what the hell is happening in there.

Peer Systems are Motivational

You may also want to lurk around (and get involved in) the following communities to improve your skills incrementally by being confronted to others.


P.SE, naturally,
StackOverflow,
CodeGolf.SE,
CodeReview.SE,
or even the crazy folks at CS.SE (or specialized ones like Crypto.SE),
or many, many others SE or non-SE community sites.


Part-Time Education

If you don't have the time or motivation to engage in another 4 year course or something similar (which may not even be necessary or rewarding anyways, and expensive), you could consider looking for teaching material online. Of course, these are not limited to computer science.

Thanks to the original MIT OpenCourseWare effort, there are now tons of universities that followed suit, and you can find a lot of university-level course material for  free. It's not always easy to navigate and read through it on your own, but some are pretty well done. To start from the ground up and go pretty high up, consider also looking at the Khan Academy.

Some go a bit further, and offer real online-courses for free, where you similarly have access to the course's material, but where they also provide paced lectures and regular self-assessments. For instance, visit Coursera or Udacity.

Most of the above often publish their lectures on Youtube or iTunesU, so you'll find plenty of material if your thirst for knowledge wasn't already quenched by all the previous links.

If you want something that provides a closer experience to the "real" university, you can consider remote universities, which also allow you to work part-time, but require you to follow the pace, and to have both self-assessments and end of year exams (sometimes on-site), like with the OpenUniversity and its international variants.

Passion Keeps You Going


Find a pet project: create your own or join one or more existing software projects and contribute.
Code, code, code. And then code some more.


(and get enough eyeballs looking at your code to criticize you and hqve different perspectives)

The French say:


  C'est en forgeant que l'on devient forgeron.


Keep doing what you're doing, and eventually you'll be an expert. Takes time and work.

See also I'm Having Trouble Learning for more suggestions.



PS: Though it's a very controversial tool for interviews, and doesn't help to identify good candidates, I do often use FizzBuzz to at least weed out the incredibly "bad ones". So get crankin' on this practicing thing! :)
