Coding with Jesse

PHP vs. Ruby on Rails: Update

It's now been six months since I announced I had switched from PHP to Ruby on Rails. Reader Richard Wayne Garganta wrote me to ask:

So, now that you have worked with rails a while - are you still in love with it? I tried it a while back and found out my biggest problem was deployment. I have considered returning to it. Your opinion?

Originally, I decided to start using rails because I was getting bored doing server-side development. I asked myself, why was it so much fun to program in JavaScript, but so boring to program in PHP? I figured it might be the programming language itself that was boring me, so I took a stab at learning Ruby on Rails.

Ruby is a really great dynamic language that is fun to work with (though somewhat tricky to get used to). Rails is a great framework, especially when it comes to using ActiveRecord to simplify working with complex data models. I think that Ruby on Rails is a great way to build a complex web site.

Rails also makes it much easier to set up tests (which I was pretty lazy about) and have separate development and live environments. There's a lot of great solutions to common web development problems that makes Rails a lot more fun to work with, especially on big projects.

Eventually I realised that server-side programming in Rails, while a bit easier and more fun, was still server-side programming. Even though I didn't have to worry about writing SQL and building forms, the types of problems and challenges were basically the same as in any server-side language. I realised that even a new language and framework wouldn't change server-side programming altogether. At the end of the day, I still have a lot more fun coding with JavaScript, Ajax, CSS and HTML.

Lately, though, I've been having a lot more fun coding simple templates using PHP. There's something kind of simple and sweet about making a page dynamic by just by putting a few lines of code in a standalone template. MVC is the only way to build a large site or application that is easy to manage, but if you're doing something simple, it's definitely overkill. It's no surprise that the 37signals and Ruby on Rails web sites run on PHP.

So the moral of the story? Use Ruby on Rails for applications, use PHP for simple web sites, and don't use either of them if your passion is client-side development. :)

Published on May 15th, 2007. © Jesse Skinner

Wanted: Ajax Developers

I'm starting to get really swamped with work, and it's about time I started looking for some great talent to help me out with cool projects like FlickrCash.

Here's what I need you to be:

  • You're a self-employed individual (no teams or agencies, please).
  • You're freelancing full-time (at least 20 hours per week).
  • You are an expert in JavaScript, Ajax, CSS and XHTML.
  • You're always doing your best to produce work that is valid, accessible, and uses JavaScript unobtrusively.
  • You're at least familiar with jQuery. (You don't have to be an expert because jQuery is easy to learn.)
  • You're very experienced programming on the server side, especially with PHP and MySQL. Ruby on Rails experience is helpful too.

If this sounds like you, drop me a line and let me know. Please give some details like where you live, how long you've been freelancing, what kinds of projects you like to work on the most, what your hourly rate is, etc. I'll be in London for the next week but I'll email everyone back as soon as I can. Thanks!

Published on April 18th, 2007. © Jesse Skinner

jQuery tutorial on IBM.com

I wrote a jQuery tutorial which was just put live on IBM DeveloperWorks today: Simplify Ajax development with jQuery.

I discuss a lot of the core functionality and philosophy of jQuery, including an introduction to writing plugins. So if you've heard of jQuery but haven't really decided if you want to use it, or if you've started to use it and want to see what it's capable of, I think you might enjoy the article.

Published on April 11st, 2007. © Jesse Skinner

Freelancing: First eight months

It's now been one year since I started freelancing, eight months since I announced I was doing it full-time, and exactly six months since I did a two-month review. And wow, I've learned a lot in the past six months. Let me share with those of you thinking of freelancing or already doing so.

  1. Schedule in time for long-term projects

    This has bit me in the ass more than once. It's one thing to say that long-term projects deserve attention, it's another to physically schedule them in. Your clients will need quick fixes and other maintenance, and they may not want to wait until you have some "free time" (which doesn't exist as a freelancer). I'd recommend pencilling in a few hours per week for any long running projects, whether the client anticipates a need for it or not. Besides, it's better to have extra time than not enough.

  2. Schedule in time for family, friends and yourself

    I don't know about you, but my family and friends (especially my mom, dad and girlfriend) need help with their websites. And I always promise to help out, but assume I'll do it in my "free time" (again, it doesn't exist). Well, that just doesn't work. Even if I don't get paid to help, I need to book them in just like any of my other clients, otherwise they'll be the first people I neglect even though they're most important to me in "real" life. My own projects get neglected even worse, something I definitely have to improve on.

  3. Try to find a good daily routine

    Even after eight months, I haven't quite figured this out. I've tried working all at once when I wake up, working before I go to bed, or working in small chunks throughout the day. Some days it feels like I've worked all day even though I get nothing done. Other days I get a ton done but feel like I haven't done anything. I'm still trying to figure out which times of day to work for optimal productivity, but this remains elusive.

  4. Stay focused on your speciality

    When I started freelancing, I agreed to work on anything that came my way. Granted, I was worried about finding enough work to fill my time. Nowadays, I can keep busy with just JavaScript and Ajax projects (Ajax being my speciality), and end up turning down other projects (hint: heavy server-side development). I highly recommend figuring out what it is you do best and enjoy doing best, and stick to that as much as possible. Nobody benefits when you work on projects you don't enjoy.

  5. Try not to overcommit yourself

    Man, I say I've learnt these things, but they keep getting me time and time again. I hate to say no to people and try to give the best service I can. And unfortunately, when combined with optimistic time estimates, this can really be overwhelming. If something seems like it will take 25 hours, you can probably assume there will be at least 5-10 hours of stuff you're not thinking about, so try and factor that in. If you don't, it'll be your weekends and evenings that pay for it. Let me repeat my mantra: it's better to have extra time than not enough.

  6. Learn to relax and have fun, even under stress

    This has saved me from having a nervous breakdown at least once or twice. Even if you're completely running out of time, overworked and overstressed, the best thing you can do is take a deep breath, put your shoulders back, do what you do best and try to have fun. Your work and your health will suffer if you try to work faster than normal to meet a deadline. Nothing can make you work faster than your natural pace, so just enjoy the work as best you can.

  7. Find a tax accountant as soon as possible

    Tax accountants are very smart, knowledgeable people, and they'll be able to give you advice on all sorts of financial topics. If you're like me, you'll spend hours reading tax advice on the web, only to feel like you might be missing something important. Rather than waste your time trying to master the art of tax jujitsu, find a great accountant and relax. Chances are you'll want one eventually anyway, so the sooner you do it the better.

  8. When taking time off, get off your computer

    As I mentioned, I often spread my work out in chunks throughout the day. Unfortunately I spend all the time in-between reading blogs, chatting with clients on IM or surfing the web. At the end of a long day, I feel like I've worked the whole day even though my billable time is just a few hours. The only real way to relax and refresh is to get away from the computer, whether it's just washing dishes, watching a movie, or leaving the house.

  9. Learn when to charge fixed rate or by the hour

    This is something I struggled with when I started freelancing, but now the difference is clear to me. If I'm doing something quite small and tangible, where I can picture all the steps involved, then I'm happy to charge a fixed rate. You always take a gamble with a fixed rate. Sometimes it takes you half the time you estimated, sometimes longer. It's best to over-estimate (ie. factor in the unknown) when doing a fixed rate. Also, new clients tend to like a fixed rate because they don't yet trust you, and a fixed rate minimizes surprises.

    For longer term projects with many unknowns, where you'll be expected to fix bugs, and where the whole project is fairly open-ended, hourly is the only way to go. This way things are the most fair for everyone. The client only pays for the work you do, and you get paid for every minute you work. It's still important to remain transparent and communicate how many hours you work, and always ask before doing something billable that wasn't explicitly requested.

  10. Honesty and trust are at the centre of freelancing

    When a client hires a freelancer, they're not sure what to expect, whether they will get ripped off, or somehow be tricked into spending too much. It's very, very important to build trust with a client, and the only way to do this is by being completely honest and transparent. This means admitting when you make mistakes, explaining how you spend your time, and not lying about the number of hours worked. On the other hand, if you're (painfully) honest, your clients will be more than happy to put their faith in you to deliver.

    Being honest also means managing expectations. If you think you'll have to miss a deadline, explain this as soon as you suspect it, and be honest about why you're behind schedule. If you're going to have things finished early, say this as well. Otherwise, next time when you're (only) on time, your clients will be disappointed because they expected that you'd be early.

  11. Working for a reduced rate in exchange for ownership

    This is something I've had to struggle with since I started freelancing. As a freelancer, most of your clients will be very small companies or independent entrepreneurs, and very often they will be looking for a partner to help build their company. This can be tempting. What if this company becomes the next big thing? What if you say no and miss out on a million dollars? It's important to really look at the numbers and what's being asked of you. If you would normally charge $1000 for the project, and they want you to work at half price in exchange for 10% of the company, what they're really doing is selling you 10% of the company for $500. Ask yourself if you'd pay $500 for 10% of the company even if you weren't the web developer (or whatever).

    Also very, very important is to get this agreement in writing, and this means answering a lot of questions. What happens if you stop freelancing? What happens if they decide they don't want you involved any more? Is the ownership conditional on how many hours you work per month? If the company gets successful, are you willing to be involved with it full time? It's easy to have entrepreneurial dreams about people getting together to create something great and get rich, but reality is very unpredictable, so make sure you can answer all these questions on paper before you agree.

It's been a really great time freelancing, despite the occasional stressful moment. I don't think I could ever go back to working full time for a single company, having to be at an office 40 hours per week. I choose how many hours I work per week (typically 25-30), I choose when to work them, and I choose where to work. I choose which projects I work on, and I choose how much money I want to make. I wouldn't give up this flexibility for anything. I highly recommend freelancing for anyone thinking about taking the plunge.

Published on April 8th, 2007. © Jesse Skinner
<< older posts newer posts >> All posts