Posted on April 5th, 2010 at 8:48am in
Code -
1 comment
Most everyone knows I’m not a Rails guy, and that’s probably never going to change, much to many of my colleague’s dismay.
I do, however, appreciate many of the features of Rails. The one on which I’m going to focus today is its built-in ability to show output in various formats.
My beloved framework, CodeIgniter, doesn’t have this capability built in, and in my development travels, I’ve handled API output in a variety of ways. All of them work just fine, but they really didn’t conform to the MVC architecture. API output, at least how I see it, should be sent to the browser through a view, just like any other sort of output.
A week or so ago, I created a helper that handled all the necessary API output stuff, including converting to JSON or XML. It worked just fine, but I found myself having to refer to the syntax a lot, every time I wanted to use it. It was just too cumbersome. And at about the same time, I began thinking how nice it’d be to use the familiar $this->load->view(); view loader method for APIs, too.
So, that’s just what I did. I took some of the logic from the helper and piled it into a one-size-fits-all view for APIs. It’s a little odd at first, when you look it it, since there’s a whole lot of code, which you don’t usually find in a view file, but, considering you never have to touch any of it directly, it works quite nicely.
I’ll post the code later on, but I just share my thoughts about this method of handling API output from CodeIgniter.
Posted on April 4th, 2010 at 10:24pm in
Business,
Reviews -
1 comment
OK, I was kidding about the top 10 part up there…
I’ve just read Tom Myer‘s book, From Geek to Peak: Your First 365 Days as a Technical Consultant, and I thought I’d share my comments about it.
Firstly, the book is written an a very fast-reading, snarky and entertaining style. It’s not textbook, but more a walk through of Tom’s personal experience in entering the field of technical consulting.
For me, this book wasn’t so much groundbreaking, as a total confirmation of what I’ve been doing so far with my company, Conflux Group. After reading through this book, I’m now more confident than ever that I’ve been moving in the right direction since I started my business last year, and formalized it this January.
As I continue on in my own endeavors, I’ll certainly be thinking back to the practical tips Myer provides for building credibility and visibility, finding new clients and diversifying, all things that I had in my mind, but have now been made more clear.
The one factor that does seem missing from the book is social networking. There is some talk about LinkedIn and blogging, but a future edition could certainly include some commentary on leveraging social networking giants like Twitter and Facebook. I see three main areas where social networking can be vitally important to a burgeoning consultant.
- Keep up in the game. As a technologist, it’s vitally important to know what the current trends in technology are and understand how and when to use various tools for your clients. Sometimes you’re given the chance to choose a solution, while other times the client tells you what they want you to use. Either way, it’s important to know what’s out there and be knowledgeable enough to give that all-important critical feedback as well as get the job done.
- Build a support network. We all get stuck sometimes. And we all need to joke around about our work sometimes. The unfortunate part about working alone, though, is that you’re doing just that — working alone. Social networking tools can help you stay connected with other people in your field to build casual relationships (and sometimes business relationships too) that can help you out when you’re stuck or need a break from the daily grind.
- Reel in new clients with your own 140-character wit and charm. Many clients may not be the most tech-savvy, and so, it may not be the most common place to build new client-consultant relationships, but it can’t hurt to try. I can say that my most steady client, another web firm needing additional development help, was found through Twitter.
Anyway, even if you’re not the reading type, I highly recommend you pick up a copy of From Geek to Peak for yourself if you’re even remotely considering turning your personal obsession with all things nerd into a profitable part-time or full-time job. If nothing else, it’ll be your small part help keep Tom and his wife Hope from going homeless.
Posted on March 28th, 2010 at 8:11pm in
Rambling -
6 comments
I just thought I’d give a brief update about things I’ve been doing and working on lately.
In no particular order, except that which they came out of my mind and into my fingers:
- Switched my blog over to use Disqus for comments. I’ve seen it used elsewhere, and I like the idea of integrating my blog with Twitter and Facebook. I don’t really get a lot of comments here anyway, so we’ll see how it goes. I did have one issue with the WordPress plugin for Disqus, thought. The import function, which is supposed to copy all your existing WordPress comments to Disqus did not work. If anyone has any ideas on what could be wrong, let me know. Everything looked good and it says it did it, they just never show up.
- Started playing with MongoDB. I’ve been hearing a lot about the NoSQL style databases, as we all have, and I’ve been curious about using them. MongoDB had fairly good documentation and looked like a pretty simple PHP implementation, so I choose it over some of the other options. I ended up using the 10gen packages for Ubuntu/Debian to install Mongo on my servers. You might note that the packages only support Ubuntu 9.04+.
- In the process of installing Mongo, I managed to bork my one server pretty bad, so I restored from a backup and created a new one for testing. After getting a testing server up I decided to take a big giant step and install Ruby on Rails to get started experimenting with it a bit more than I have previously. Until now, I’ve avoided it, as I don’t enjoy the copious use of command-line tools that are involved in Rails development and deployment. I’ve been known to call Rails proponent ‘commies,’ because of its highly-automated scripts. Luckily, in the last few months, as I’ve gotten used to running my own Ubuntu servers, I’ve become a lot more comfortable with the command line. So, I felt like it was time to give it another try. I installed Passenger in Apache, so it’s all set to go.
- After getting Mongo and Rails setup on a new cloudserver, I decided to make sure I could do it all over again. Being able to replicate my setup is pretty key to me, so I downloaded a copy of VirtualBox and dove into the world of virtualization, as well. So far so good; I now have a very similar Ubuntu 9.10 server running locally within VirtualBox. It seems like Virtualization has come a long way since I last used Parallels on my Mac. I always found that the virtual machine would bog down the rest of the system so much that it made the system fairly unusable. It doesn’t seem to be the case with the latest generation of virtualization software. It really makes me wonder about setting up a virtual cluster of servers somewhere… cuz you know, I need that much power.
- Client work out the ears. I incorporated my own development firm, Conflux Group, Inc., in January, and since then I’ve been quite busy doing client work. I feel like I’m off to a good start, having plenty of work to keep me busy every week, but I still would like to expand my client base, so as not to put all my eggs in one basket.
- New lens for my SLR. I’ve been thinking about it for a while, and I finally went ahead and got myself a new lens for my Olympus E-500 DSLR. It’s a bit of an odd camera, not too common, so lenses are a bit hard to come by. I settled on a Sigma 50mm f/1.4 lens. The results are beautiful, even with my lack of photography ninja skills.
That’s most everything for now. I hope to have more to say about my experiences with MongoDB and Ruby on Rails as I dig in further.
One final note. If you’re a CodeIgniter or ExpressionEngine person, you should definitely consider coming to EECI2010 in San Francisco this May. I’ll be there, along with my posse of nerdy counterparts hailing from all over. It should be a great time, and I’m really looking forward to it.
Posted on March 8th, 2010 at 7:48pm in
Code,
Web -
No comments
So, I’ve just updated my WordPress plugin to use my own homebrewed URL shortener, http://dpsh.me, when Tweeting about my new blog posts. How exciting!
It was a pretty quick little project to build the shortener a few weeks ago, and updating WordPress to use it was really easy too. I really should post the code somewhere.
Now, if Tweetie would just hurry up and release an update to the Mac client that includes custom shorteners like the iPhone client does.
Posted on March 1st, 2010 at 9:24pm in
Code -
No comments
Today I was searching around for a good vCard library to use for an application I’m currently building.
I came across a library by Carlos Alcala in the CodeIgniter Wiki. I wasn’t completely satisfied with the library as it was written, so I took the liberty of rewriting it to meet my own personal taste.
You can take it or leave it, but I’m quite happy with the result. I’m not going to go over it here in detail, as the comments are fairly self-explanatory, and a sample controller file is included, demonstrating various usage of the library.
Download CodeIgniter vCard Library .zip file