Author: ccornutt

Speaking at Dallas TechFest 2010 – Building a Web Service API

Just a heads up for all of those in the Dallas/Ft. Worth area – there’s a great one-day event coming up this Friday (July 31st) blending PHP, .NET, Java, new media, Joomla and WordPress into one packed day of sessions – Dallas TechFest 2010 at the University of Texas at Dallas.

I’ll be giving a session called “Building a Web Service API” from 10:30 – 11:45am in the PHP track. Here’s a summary of the session:

When is a web application more than just a web application? Hook up an API and you’ll see! I’ll walk you through the basics of what an API is and the concepts behind it as well as key pieces of technology you can use to create both the client and server. There’s a focus on PHP but other languages and tools will be touched on as well.

There’s still time to register for the event – tickets can be purchased for an early bird price (ending today) of $50 or $60 at the door. You can see the full list of sessions here.

Joind.in Articles – Import & WordPress

I’ve been slacking a bit and haven’t posted these two articles/tutorials written up by Lorna Mitchell about using the Joind.in site in two different ways – importing your event’s information in and a handy WordPress plugin she’s whipped up to show some of the latest information from the site’s API.

  • Importing Data into Joind.in
    “As a conference organiser I work extensively with the site joind.in, which allows attendees to comment on sessions at a conference. Recently the site has also started supporting sessions with both times and tracks, making it indispensable as a way of keeping track of all the sessions during an event. The only downside is entering all the data into it!! Joind.in does have some import functionality, which I recently rebuilt to reflect the timings and track changes, however this only accepts XML at present, so there is still some preparation work to get your data ready to import.”
  • WordPres Plugin for Joind.in
    In case anyone thinks I’ve gone joind.in crazy after already writing about its import functionality this week, I really haven’t. Its just that some months of pulling a few things together have finally bourne fruit and so I can actually write about them now they are done! The good news is that this includes a plugin for wordpress, which pulls data from the joind.in website. You can find its official page on the wordpress plugin directory here: http://wordpress.org/extend/plugins/joindin-sidebar-widget/

Many thanks to Lorna for writing these up! It’s always great to see something you’ve worked on be well used by the community that has contributed so much back to it. Want more information on Joind.in and what it has to offer? Check out the About page or send an email to me personally – i’m always happy to answer any questions!

The times, they are a-changin’

Let’s get the exciting part of this post out of the way first – as of today I will be leaving Atmos Energy and will be starting at JWT on Monday the 19th!

I’ve been with Atmos for what seems like forever – this is my eighth year here – and I have grown so much in those years. I’ve come from a developer that barely knew OOP and couldn’t design pattern his way out of a paper bag to someone completely different. If you had asked me back in 2002 if I’d be writing articles, running an open source project and have had a few speaking notches under my belt, I would have thrown an Oracle manual at you (which was all new to me at the time). I’ve learned about best practices, fought my own battles with both code and things more on the human interaction level (I hadn’t worked in a large office before this) and have come a long way as a developer.

Atmos has provided me with an environment to make all of this possible – they’ve been receptive to my requests for training and conferences and for letting me try out new things and technologies. I’ve done things here that I can’t say I’ll so at other companies like write applications to interface directly with gas systems and work with huge customer databases (1.5 million customers over 13 states).

Unfortunately, over the last months I’ve become more and more aware that I’ve grown a bit too comfortable in my current skills. You know how it is – you do the same kinds of things over and over (and over) that you get used to doing that thing and not so much developing the applications you know you could. This is a big reason why I’m making the move. I’ve been doing the “gas applications” for a good while now and I wanted some place where I could stretch back out and really get back into a more real form of development. I think that JWT can offer me that so I’ll be starting there two weeks from today.

Thanks to all of you who have supported me in my job hunt, it definitely means a lot! Oh, and if you know of any good PHP developers (Oracle experience a plus) in the Dallas area looking for a job – let me know. I know recommendations would always be appreciated!

Are You an Olympic Developer?

The Olympics have just started and I can’t help but look at those competing and liken them to the development work so many of us do. What’s the same, you ask? How could an international sporting event of the best of the best possibly connect with the work we do behind our keyboards? It’s simple – it’s all about being the best.

Olympians work most of their lives (if not all of them) trying to become the best at their sport that they can be. Some of the figure skaters have even been paired since they were little kids and know each other’s moves as if they were their own. They have honed their craft down to the point where they know in the first thirty seconds of a routine or race how well it’ll turn out in the end. They know the result because they know themselves. They’ve worked hard to get to where they’re at and they know that to compete on this new level, they’ll have to step things up and do even more than their best.

It’s easy to see how this relates to us, the software developers (or managers of these developers) all over the world. There’s no excuse for you to not look at things on a more global scale and try to be the best you can possibly be. Sitting in your chair and being comfortable in the knowledge you learned five years ago isn’t enough. Don’t lull yourself into thinking that, just because you know your current codebase, you’ve done all you can. Get out there, look at what other developers are doing and hone those skills. There’s tricks that you can learn from the best and tools that you can use to hone your own development work into a razor sharp edge that can cut through any problem and push you up into that next level of development.

Who knows…you might just find something you can apply that could make you and your development soar to new heights and help you feel the rush that you did when you were first learning a language – flying headfirst into the unknown, unsure about what was to come and where you might land.

Don’t be afraid. Take the risks. Become the best you can be.

Adventures in Git (Merging)

Starting out with a new version control system is always a unique experience. Half of your time is spent crossing fingers and hoping that you didn’t just cause irreparable damage to your repository and the other half is time spent pouring over manuals and Google results to try and get just the right commands so that the worst case (hopefully) never happens.

For a little bit now, I’ve been playing with git (due to my pet project, Joind.in being moved and open sourced over on github. It’s a different sort of experience than I’m used to coming from a CVS and SVN world where there’s one server and everything you do goes through that. Git’s different in its distributed nature and it takes a bit of getting used to – some of the core concepts are a bit different since, essentially, your clone is a full copy of the repository (and is a repository all to itself). It’s a little strange and I don’t think I fully have a handle on it yet, but I’m getting (gitting? yeah, had to throw in a pun somewhere) there.

In the meantime, I came up against something today I hadn’t had to deal with on the project. Previously, the Joind.in source was on a SVN server hosted on another machine. I had some other developers working with me on it while I was over there, and most of the changes were pretty easy to integrate with few conflicts. I’ve gotten used to handling merges in SVN, but since git’s “total repo” method is a good bit different than SVN’s approach, it took a little doing to figure out how to merge in changes from a forked repository on github and integrate them back into the master. I (finally) got it to cooperate so I wanted to share the steps I took to get it working. I know this isn’t the only way to make the merge happen, and probably isn’t even a true merge, but it got the job done.

In this example I’m going to be merging changes from Lorna Mitchell’s fork of the code back into the main line.

First off, for the impatient folks in the front row, here’s the full list of commands:
[php]
mkdir lorna
cd lorna
git init
git remote add lorna git://github.com/lornajane/joind.in.git
git remote add joindin git@github.com:enygma/joind.in.git
git pull joindin master
git checkout -b lorna/master
git pull lorna master
git add path/to/file.php
git checkout master
git status
git commit -m’Merging in the changes from the fork’
git push –dry-run –repo=joindin
git push –repo=joindin
[/php]
ul.mlist li { margin-bottom: 6px; }
Want a bit more? Alright – here’s the explanation for the steps above:

  • Start with an empty directory: You don’t have to do this, but it made me a bit more comfortable to keep things out of my working copy.
  • Go into the directory and make it git-controlled with the “git init”
  • Set up some aliases: This just makes things easier to refer to down the line. In this case we’re setting up aliases for the “joindin” and “lorna” repositories to point to the remote sources on github
  • Get the main line of code: Do a pull to get the master line of code from the joindin source
  • Create a branch: When you use the “checkout” command for git, you’re moving between branches. In this case, the “-b” flag tells it to make the branch too since it doesn’t exist. Our new “lorna/master” branch is created.
  • Pull in Lorna’s code: With the new branch in place, we can pull down the fork’s code and push it into the branch (the master line from her fork). This is where the fun starts. If you have conflicts that pop up, this is where you’ll see them. They’re easy to fix, though – the technique’s similar to other version control systems and you basically just delete what’s wrong.
  • Add the fixed files: There wasn’t a “resolved” command like SVN has that I could see. The only thing I saw was to “add” the files back into the commit once they’re ready to go.
  • Switch back to the master: Move back over to the master branch (of the “joindin” repo) by doing a checkout on it
  • Check your status: Use the “git status” command to see what’s going on and if there’s anything else that might need to be done before the commit.
  • Commit!: You’re ready to commit the changes to the master branch. Issue the commit and fire away. Remember, this is all local until you do the push, so if something freaks out, you can always start over.
  • Now push!: If all went well, you’re going to end up with an integrated version of your repository and you’ll be ready to push. The “git push” command also has a –dry-run option use can use if you want to check before you make the leap. The –repo option is used to defne which repo you want it applied to.

So there you go – it’s a little tricky, but not too bad once you know the steps. This was just a simple merge, so I know there’s more to it in the future, but I suppose I’ll work on that when I get there. Hopefully this helps someone out there!

An Interesting TEKX Promotion…

Thinking about attending a PHP conference anytime soon and looking for an offer that you can’t refuse? Check out this interesting move from the MTA folks (the group that puts on the “tek” conferences each year) for attending the TEK-X conference in the spring. The regular ticket price after the Early Bird pricing time has passed checks in at $1,000 USD per ticket. For this low, low price you get full access to the conference – tutorials and sessions for the full time of the conference. What? You don’t think that’s a good deal? Well, good – because that’s not the deal I’m talking about.

If you’re one of those folks that don’t really care about what the schedule might eventually hold and just want to reserve your spot for the conference, check out this (quite frankly, amazing) deal from the MTAers for next year’s TEK-X conference – sign up before January 6th, before the schedule is announced, and you’ll be rewarded with a 35% discount. That’s a full attendance pass for the whole week for a fraction of the cost – $650 USD. If you were planning on attending the conference anyway, it’s a win win.

There’s only one catch – there’s only 50 of these passes up for grabs so you’ll have to get in quick if you want to snag one, you’ll need to sign up quick. It’s an interesting idea from a group that’s always been keenly aware the pulse in the PHP community. Personally, I think it’s an excellent idea and only reinforces the fact that they know their target audience…PHP community members that are out there to support the community, regardless of the event. It’s nice to see a company putting so much stock in the community itself and not just in the appeal of the discount (not that it’s a bad thing!)

Microsoft Web Dev Summit 2009

See my pics from the event here!

I had the opportunity this past week to go back up to Microsoft for the second year to attend the Microsoft Web Developers Summit. The event brings together a wide range of people related to web development in the PHP community. This year the group was made a bit more diverse because of the inclusion of a few members of some of three communities of PHP-driven applications: WordPress, Joomla and Drupal. It made for a nice mix and, really, for what I think was one of the more interesting parts of the event (but more on that later).

Over the three days we were there, presentations were given from groups all around the company including the Web Platform Installer folks, the IIS team, the SQL Server team and a pretty cool showing from the Bing group on their mapping offerings. Showing off the products seemed to, usually, be a secondary mission for most of the groups though. Out of the number of sessions crammed into each day, most of them were either the PHP community talking to Microsoft (in the form of free-form discussions) or the Microsofters sitting down and really talking with us and asking questions about what we were doing and how they can help us do it better.

In my opinion, these discussions were worth the cost of the whole conference alone. Last year’s conference seemed a bit more chaotic and less structured. There was a lot of miscommunication (it seemed) and several things that we, as a community, weren’t terribly interested in. This year was leaps and bounds over that in terms of both quality and planning. The sessions that weren’t the discussion times were mostly relevant and almost everyone that represented MS seemed to know at least a little bit about what was going on in the world of PHP (with the exception of the ASP.NET folks but really, they sort of have an excuse – they were very happy to get the answers to their questions, though).

Leaders make all the difference in events like this and we had some of the best – our own Cal Evans helped to keep things on task and get the conversation jump started when it needed it, Karri Dunn (the ringleader and organizer) did an excellent job of making sure things were moving along smoothly and that we were able to talk to other groups in the company too (even those not involved in the summit), Josh Holmes (evangelist extraordinate) who has really jumped into the PHP community feet-first and has become one of our key voices back to Microsoft in general and, last but not least, to the leadership within the PHP community – the represenatives from WordPress/Joomla/Drupal, the core developers, the user group leaders and general community members.

A major thank you to all of you (including those I haven’t mentioned that made the event a success) for taking the MS Web Dev Summit up to the next stage in its evolution. I love the direction the event is heading – don’t lose that momentum and don’t lose touch with the PHP community. Last year everyone took their planes home and there was some random communication between MS and us via emails/twitter/etc but most of the connection was dropped. This year there’s already an effort underway to keep those lines open and to make a real dialogue between the web-related groups of each side flow. This, in my opinion, is a real deal-maker. It’s one thing to have a company that brings you up to talk with them for a few days and that’s it. It’s a whole other thing to have one that’s really excited about what’s going on with you and your community and wants to engage you and get input on their next moves.
Web Platform Installer (WebPI). I seriously hope they consider some of the suggestions we gave them as to its future and what we thought could really make it more than it is without sacrificing the simplicity it already has.

Is it a Developer’s Responsibility?

Last night, several of us were treated to a dinner as a part of this year’s Microsoft Web Developer Summit (great dinner, by the way – Anthony’s in Kirkland, WA). Seems like there was just about a one-to-one ratio at one point of MS employees to PHP developers attending. It was interesting to see how this played out in conversations and in the general flow of the evening.

At the table I was sitting at there was a MS rep from the Windows team, Ani, who was pleasant, engaging and genuinely seemed interested in what “this PHP thing” was all about. Some of her questions could have been answered by a few trips to Google, but overall it was good to see the interest level from someone not in the usual web bubble PHP normally operates in. There were a few great debates that came out of her questions with the most memorable being about SEO. She had asked about our take on it and if it even played a part in the work that we did. Most at the table were of the opinion that, if it’s going to happen, it was someone else’s job – the responsibility of the front end folks as a part of making the site “pretty”.

This and another comment about application structure got me thinking…with a lot of the sites out there going with an MVC pattern for their structure, does this mean a sort of SEO-friendliness is already built in? I’m not talking that black magic, voodoo stuff that lots of firms pass off as SEO consulting. I mean the good placement of data, good content and a well though out site structure. By default, MVC makes this last one super simple. For most frameworks, it’s just a built in part of their routing to make search-engine friendly URLs. Of course, it’s still up to you to fill those URLs with good meaningful content, but it’s a start.

So, do we as developers still have a responsibility to create an application that will, in the end, make more sense to the outside world and to the major search engines? Should we step outside of our bubble and branch out into the wider ecosystem of the application, making sure that what we’re doing fits with the whole?

The Myth of “Good Code”


There’s an interesting dichotomy in software development – anyone wh has spent any amount of time in the field knows it all too well. There comes a point in every project where you have to make a choice – good code or fast code. Sure, you’ll get those “sweet spot” projects that’ll let you work on the “good code” side of things for as long as you’ll need (maybe a personal project?) but more often than not, you’re going to fall on the “fast code” side of the line. It’s sad, really it is.

Every good developer knows that the world could only benefit from having more “good code” in the world. Applications would not only do what they’re supposed to to but they’d do it well and have better performance while doing it. Things would flow smoothly through the paths the user laid out in the planning stages and everything would be magically delicious. Right? Sadly, even when you have the time to make the “good code”, it’s still not that good.

First off, throw out those personal projects – the timelines of those don’t really apply anyway. You can hack away at a framework you’re developing for years and only get most of the way done with it. Unless it gets some kind of larger following, chances are people aren’t going to be putting the pressure on you to make updates and add new feature. The whole realm of personal project timelines is an interesting one – maybe something I’ll look into later on. For now, though, we’re going to focus on software someone else wants you to write. This is where the major part of the problem is – it’s someone else’s timeline, someone else’s thoughts you’re trying to put into code.

I can’t tell you the number of times that I’ve been working on a project and have hd nothing but the best of intentions of how it was going to turn out. I’d planned out the pieces, worked up descriptions of the objects involved and laid out how they’d all integrate together. The code was well-structured and was something that could be both easy to maintain and simple to expand – that is until the customer decided to get involved.

If you’ve worked on any kind of larger project for any length of time, you know the cardinal rule – the customer never knows what they want. Even when they say they do, show them a demo. Their minds will freak out with new possibilities and new features that were never even conceived of in the first versions you’ve developed. Now, this isn’t so much of a problem if you have the customer/client reined in to keep these sort of things under control, but if you don’t…let the bad code pour in.

It never fails – at least one of the new features that the customer proposes as a “strongly like and might need” for this version will go against the code that you’ve already written. I don’t think I’ve ever heard of a project that was able to augment what they were doing mid-stream (yes, even you agile folks) to accomidate every request the customer could make. Some things are easy, but most of these sort of changes are hard.

This is when it gets very hard to keep that “good code” in place. It takes a lot of practice and skill to keep things flexible enough to make the impact of these sort of changes minimal. Writing good code from the beginning is easy – making that good code stick through to the end is hard.

How hard are you willing to work to keep that code good?

Photo credit snappED_up

Having Companies Involved in PHP (why not?)

After this year’s ZendCon, there’s a question that’s been sitting in the back of my mind, bugging me to come up with a good answer – what role should companies take in the developer community ecosystem? The problem with the question is simple, though, because no two user group situations are the same.

I’ve heard things from both ends of the spectrum on this one. Some groups prefer to keep the companies away from their groups and rely on the support of those that make it up (much like a lot of the general PHP community) and there’s others that swing far to the other side and want any and every company that could potentially help them out to come walk through their door. The tricky part comes up when you get into that gray area in the middle. Some groups want help when they need it, but don’t want a company coming in and using that same influence to change the course of the group or to try to leverage it for their own purposes (“sure, we’ll help you out with that if…”).

So, what I want to hear from all of you – where do you think companies fit in our corner of the world in the PHP community? There’s several large ones out there that can and do contribute and others that don’t…which is the right blend and, more importantly, what can we do to help the situation?