-
Object-Oriented JavaScript
First a caveat: JavaScript is a prototype-based language, not an object-oriented language. Now that we have an understanding of that very important fact, let’s learn how to use JavaScript as if it were object-oriented. A few weeks ago, I was asked to teach a couple of my colleagues how to code with JavaScript. We’re building a cross-browser plug-in that’s meant to interface with an external device. The plug-in itself is written in C++, but the entire API is written in JavaScript. I was right at home, making API calls from within the scripts that drive the web-based UI. But my…
-
Consider the Source
Open source is fantastic because you can build upon the code of others. It’s also horrible because you can build upon the code of others. This means someone can take a well-developed plug-in, make one or two minor changes, and redistribute an almost identical system to yours while taking all of the credit. So, as many of us have said over the past week, whenever evaluating any open source system (whether it’s free or paid), you need to consider the source. Do you know of the developer? Do you know of the distributor? Have you seen good work from them…
-
Why Open Source?
This past week, several people related to the WordPress project have been discussing their motivations for working with free and open source software. There have people explaining the new business leads they get from being prominently listed as open source developers. There have been others lamenting the fact that free development is, by nature, free. But no one has really captured my personal reasons for working with open source systems. I do it because it feels right. I’m a self-educated developer. I went to college to study science, math, politics, and business. Aside from an intro to computing class I…
-
The Robustness Principle
Working in software, I get to learn a few rules that are specific to programming that can be easily applied to regular life at the same time. One of the more recent ideas is known as Postel’s Law: Be conservative in what you do; be liberal in what you accept from others. In programming, this is called the robustness principle and reflects the idea that computer interfaces should be able to accept many different forms of information but always give you information in the same way. Then, just about anyone can send something in to the interface, but you always…
-
Things Found in the Forest – Part 1
Dawn came too early for Chris. He rolled over in the tent and struggled to pull the sleeping bag over his eyes, hoping to delay the inevitable for a few more minutes. Morning meant everyone would be up, alert, and wanting to do something when all Chris wanted to do was go home. It could be worse. At least it hadn’t started raining yet and Chris would be able to get up without getting soaked in the opening of the tent. In any case, he hoped he’d get out of the tent dry. It never failed, even dry mornings started…
-
WordPress XML-RPC — MovableType API
Those of you paying close attention probably noticed that I neglected to list a couple of the MetaWeblog API calls last week. That’s because they’re duplicated by calls in the “wp” namespace, and I want to keep everything you can call with a “native” WordPress method in one group. Luckily, none of the MovableType API calls are duplicated, so I can do them all in one pass. mt.getCategoryList Function: Retrieve a list of all categories on the blog. Parameters: Blog ID – For use in multisite installations, typically 0 for single sites Username – WordPress username Password – WordPress password…
-
What Drives your Faith?
Years ago, I had a debate with a friend about the phrase “God fearing.” We were discussing the ides of forced conversions and whether or not they had the same value and meaning as willing conversions. My stance has always been that a willingly made decision is more heartfelt and sincere than one you’re forced into. My friend, disagreed … and we never really resolved the disagreement. More recently, we had a similar discussion in my Bible study. We were discussing morality and our concept of right and wrong – a distinction we’ve each learned over time based on lessons…
-
WordPress XML-RPC – MetaWeblog API
As odd as it may sound, WordPress’ XML-RPC system is built on others. This makes sense from a development standpoint – why reinvent the wheel when others have done such a great job? But it can be incredibly confusing and downright frustrating when you start working with the WordPress API and have to turn to metaWeblog’s or Blogger’s documentation to figure something out. The fragmentation of the API documentation is what turns many off from XML-RPC development at first. That said, the APIs are stitched together quite elegantly when you look at the server code. To make things simpler, we’ll…
-
Investing your Talents
On Sunday, we discussed the parable of the talents in church. It’s one of my favorite passages of scripture, both for the uplifting message about hard work and perseverance and for the convicting way it reminds me not to squander the gifts given me by God. For those of you keeping track at home, you can listen to the sermon online. In this passage, Christ tells the story of a man who entrusted his property to his servants while he went away. Two of the servants put his wealth to work while he was gone and managed to double what…
-
WordPress XML-RPC – Using the API
The most important thing to know about WordPress’ XML-RPC interface is how to send and receive data through it. The interface is turned off by default for security purposes, so when you’re ready to start using it, you’ll have to manually turn it on. Go to Settings » Writing and look for the XML-RPC option under “Remote Publishing.” Turn this on and you’re ready for the next step. Next, you need to make a point of knowing the address of your XML-RPC server. This is really complicated. You might not be able to find it. But take your blog url…