Hello world

Aside

Hello, and welcome to my personal website. I am a Web Developer specialized in WordPress development. I work with Automattic (well, starting really soon!), building various things on WordPress.com and other web products. I am located in Vancouver, BC. People call me Joey for short. I’m an avid coffee drinker, dog lover & enthusiastic traveler. Feel free to browse through existing blog posts; I’ll be posting more soon!

Querying Posts Without query_posts

Reblogged from Developer Resources:

Click to visit the original post
  • Click to visit the original post

Here at WordPress.com, we have over 200 themes (and even more plugins) running inside the biggest WordPress installation around (that we know of anyway!) With all of that code churning around our over 2,000 servers worldwide, there’s one particular WordPress function that we actually try to shy away from; query_posts()

If you think you need to use it, there is most likely a better approach.

Read more… 1,404 more words

Really good explanation of why you shouldn't use query_posts; a function I know I've used in the past but definitely stay away from now :)

Joining Automattic

Status

I’m extremely happy and excited to announce that I’ll be joining Automattic, the makers of WordPress.com, and many other cool products. As of next monday, I’ll be an Automattician (yes, that’s the real term for an Automattic employee) as a Code Wrangler, working with many aspects of the WordPress.com codebase – I’ll share any details I can once I get the ball rolling.

In the next few weeks, I’ll migrate this site (whatever new form it will take since I will no longer be promoting my services) to WordPress.com (want to eat my own dog food).

If you’re interested, they’re still hiring (developer and non-developer positions!), so you should check it out.

If you’re arrived here looking to hire someone to help you with a web project, I’ve got a great list of recommended consultants, agencies and resources, here.

WordCamp San Diego 2012

I’m happy & proud to get the opportunity to speak at WordCamp San Diego on March 24th 2012. The event sold out in a mere 12 hours, so I can’t even tell you to come check it out, unless you already have a ticket! But, the weekend should be a huge blast :)

The talk I am giving is about using the version control system Git; best practices, case studies and various workflows when using it with WordPress. In the spirit of open-source and of git, I am doing a bit of an experiment with it. The whole talk is getting prepared on GitHub. That means both the outline and the slides are available there as I prepare them. The idea is that you (everyone/anyone) will collaborate by asking questions you want answered ahead of time, bringing suggestions, corrections and amendments along the way.

Here’s how you can collaborate:

  • Take a look at the github repository
  • Take a look at the work-in-progress completed slides — these were continuously updated/rebuilt each time I updated them, and since they are just an HTML page, you can revisit them anytime you want.
  • Open an issue on github for any issues, questions, comments, recommendations, etc…
  • Specifically, I want to know what kind of experience you’ve had with Git (versioning plugins, themes, private client sites, working with core, etc.), what challenges you’ve faced (and how did you overcome them), what workflows do you have, what questions using git do you have, etc.
  • Fork the repository and submit a pull request if you want a specific change incorporated
  • If you’re uncomfortable using git/github, feel free to comment on this post or send me an email at info@jkudish.com (or via the contact form on this site) instead

That’s the idea, no idea if it will work or not. I think the presentation can be that much better with some feedback from the community, but if not, I promise not to disappoint you (too much) either way.

Let me know your thoughts!

Why and how I use Sublime Text 2

My Friend Richard was asking about different software and code editors on twitter last night. I mentioned Sublime Text 2 and how much I love it, to him; and he asked me for more info about it, so I decided to write a blog post about it instead of going and back & forth on Twitter.

So for those who don’t about it yet, Sublime Text 2 (ST2) is a cross-platform (yes it works on OS X, Windows and Linux) awesome code editor with a bunch of productivity tools and geeky goodness but without the huge overhead of typical IDEs (aptana, netbeans, etc…). I was a Textmate user until I switched over to ST2 about 4 or 5 months ago. The transition was seamless since ST2 looks and behaves in similar ways to Textmate and also supports Textmate bundles out of the box. Nonetheless, ST2 is infinitely more powerful than its predecessor.

Some of my favorite features/shortcuts of ST2 are:

  • The project sidebar
  • ⌘+P (ctrl+p on Windows/Linux) to open any files in the current project
  • ⌘+shift+p (ctrl+shift+p on Windows/Linux) to perform special actions
  • Automattic code completion using tab/return
  • Great search+replace support
  • Automatic docblock creation and recognition
  • Updated daily or every other day (as long as you use the development track [which you should] & it never crashes yet has awesome small additions)
My Sublime Text 2 Setup

My Sublime Text 2 Setup

Richard also asked me about which extensions I used and how I had it configured, so here’s my setup:

Finally, I’d like to point you to this indispensable ST2 Tips & Tricks article on NetTuts.

One of my favorite things to discuss with fellow developer are the various development environments and set-ups, so please share in the comments! What code editor do you use? If you use ST2, what’s your setup like?

Log Deprecated Notices Extender

If you’re a WordPress developer, then there’s a few developer tools you should have under your belt. One of those is the Log Deprecated Noticed plugin by Andrew Nacin. If you don’t know about it, it’s a plugin you run on your development environment (you have one of those, right?) as opposed to the production environment. From the plugin’s description:

This plugin logs the usage of deprecated files, functions, and function arguments. It identifies where the deprecated functionality is being used and offers the alternative if available.

One of the great features of the plugin is that it shows you how many (if any) new notices/log entries you have, allowing you to quickly see if you’ve used a deprecated function. It does so by adding a little badge (a la updates) right next to it’s menu (which is under Tools). However, since WordPress 3.3 and the fly-out menus, the badge is no longer persistent since the Tools menu isn’t going to be open very frequently, as shown here:

To solve this, I set out to write a plugin that extends the Log Deprecates Notices plugin and adds a link and counter to the new improved toolbar in WordPress 3.3+, like so:

The plugin is available on github and the WordPress.org repository.

Eventually, I’d also like to add the following features to the plugin:

  • Update the counter with some kind of callback, so that if a call to deprecated function is made after the toolbar loads, it still counts the new notice.
  • Add deprecated log info to the Debug Bar plugin

Any questions, comments, recommendations, let me know!

Always logged in, using mu-plugins

I’ve decided to start posting handy/helpful code snippets here [Idea/inspiration from Bill Erickson].

So here’s my fist snippet! It allows you to remain always logged in when developing sites (Warning: do not use this on a production site!)

I like to put this code in the special mu-plugins folder that way it always runs. We hook into ‘admin_init’ and ‘init’ function, check if we’re logged in, and if not, logs us in. Change the 1 in the get_userdata() function to match the user ID that you want.

Again, don’t use this on a production or even staging site. It’s only meant to be used in a local environment, where you are the sole developer/user of the site (since it always logs into the same user). Use it with caution, you’ve been warned!