Year in review 2013

A good developer never stops learning and challenging themselves. The moment you stop doing this, you become irrelevant. There’s a whole post of that kind of talk in the future.

That said, looking back on 2013, it was hand’s down the year I experienced the most personal growth as a developer, and for the first time, I feel completely confident in my own abilities and skills.

There is still plenty of room for growth, mastery, speed, efficiency, etc., but for the first time I don’t feel like a bumbling idiot every time I need to build something, or fix something, or go hunting bugs in ‘production’ code.

I’m not building my own open-source libraries yet, or even the types of WordPress plugins that are going to be used by the masses. I am however solving problems quickly and efficiently, in multiple languages, extending frameworks, plugins, etc.

My biggest weak point at the moment is a strong understanding of  some of the deeper aspects of Javascript. I get the basics, I can do a lot with that. I need to become a lot more familiar and comfortable with things like promises, closures, and event paradigms.

Cheers to a new year of solving problems for  a great organization, using a multitude of operating systems, languages, frameworks, and open-source code.

Freddy

Mysql str_to_date

If you don’t provide a separator to mysql’s str_to_date function it will sometimes confuse the numbers you’re sending it with a different part of the date than what you intended.

 

Javascript seems to be the future…

Lots of apps built with Javascript http://backbonejs.org/#examples

Also, I think it’s super awesome that some traditional companies are embracing technology like a start-up. Regardless of how you feel about Wal-mart’s business practices, it’s cool to see a behemoth like that embrace technology – http://walmartlabs.github.io.

LinkedIn’s iPad app structure broken down, they make good use of local storage – http://engineering.linkedin.com/mobile/linkedin-ipad-using-local-storage-snappy-mobile-apps

iScroll4 – http://cubiq.org/iscroll-4

http://underscorejs.org/

http://brunch.io/

Platform targeting javascript build tool – http://walmartlabs.github.io/lumbar/

Cool site creation tool, similar to what I was thinking about doing with Zurb’s Foundation – http://salon.io/howitworks

 

Excellent learning tool – http://javascriptissexy.com/learn-backbone-js-completely/

HTTP access control (CORS)

if ($request_method = POST) {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Methods “POST”;
        add_header Access-Control-Allow-Headers “Authorization”;
        add_header Access-Control-Allow-Credentials “true”;
        add_header Content-Length 0;
        add_header Content-Type text/plain;
        return 200;
    }

Register Activation Hook not working

No, this is not like the several other dozen posts I read of people struggling with the WordPress register_activation_hook, but almost.

I spent an hour trying to figure out why, despite following numerous instructions and troubleshooting steps, that this would not work.

Some setup details:

OS – Windows 7

Server – Xampp’s portable lamp stack

The core WordPress files are all in Xampp’s C:\xampp\htdocs while the theme and one of the plug-ins is being symbolically linked into the web server directory. This is because I have all of my code that is under Git control in one place, and I just symbolically link it into wherever I need it to run.

Initially I thought it was because I was using Windows. I even found a bug ticket from 5 years ago saying register_activation_hook doesn’t work on Windows because of path separators. That ticket had long been in the fixed state though and I didn’t see any more recent ones.

I did some quick debug echos of where php thought everything was located and sure enough, because it is symbolically linked into the wp-content/plugins folder, it was interpreting the plug-ins existence as being in the Git folder and not the server folder under all of the rest of the WP stack.

Some piece of this (still under investigation), made it impossible for the register_activation_hook to fire. It has to be isolated to the register_activation_hook function in the wp-includes/plugin.php file. As soon as I made it activate on the init action, everything worked. As well as, installing this plug-in on a linux server without using symbolic links, the register_activation_hook worked.