Archive for May, 2008

Don’t Look at the Rock! (0)

If you're new here, you might want to check out the RSS feed so you can keep up with my ramblings from the comfort of your own reader.

… because if you look at the rock, you’ll run right into it. I promise. Let me explain…

The Story

I recently took a 5-week whitewater kayaking course. Kayaking is a blast. It can be very dangerous (despite what Into the Wild might have you think), but it’s complete and total fun and exhilaration once you get the hang of it. Nothing beats spending a day on a wild and scenic river. You’re peaceful, relaxed, and quiet one minute and the next minute, adrenaline is screaming through your veins while you’re screaming through a rapid. On the first few trips, though, we (the students) kept running into everything. That’s to be expected when you don’t even really know how to paddle straight in moving water, but even once we got the hang of that we still kept running into stuff.

The instructor would tell us, “There’s a big rock on river right. Be sure to squeeze left of it, or you’ll get stuck.” So we’d start paddling down the rapid, spot the big rock they told us about and try our best to squeeze to the left of it. Then we’d run smack into it. Almost every time. No matter how hard we tried to avoid things, we kept running into them. Then they told us a secret, and after that I didn’t run into the big rocks anymore (that’s not to say I didn’t flip or take terrible lines down the rapids. I did. But I didn’t run into anything they told us to look out for).

The secret didn’t involve any paddling trick, some weight-shifting maneuver, or how to lean the right way (all of which are actually important). The trick they told us was this:

Quit looking at the rock. If you look at the rock, you’ll hit it. Know the rock is there, but instead of looking at it, look where it is you want to go instead. If you look where you want to go, you’ll go there, and you won’t hit the rock.

They were right. We were concentrating so hard on the rock that we unconsciously steered the boat right for it. The harder we tried to avoid the rock, the more likely we were to run into it. Once I stopped looking at the rock and focused my attention on where I wanted to go, my skill improved dramatically, and I had a lot more fun. And I stopped running into the stuff they told us to look out for. Finally I was going where I was trying to go instead of getting stuck on obstacles.

The Moral

I think the parallels to life are pretty obvious. When you’re working at something — be it a business, school, a hobby, or a personal goal — there will be big rocks that you’ll have to avoid. The key is to not look at them, not dwell on them. If you spend your time thinking about them, you’ll run right into them. Instead, just know they’re there. You don’t want to be oblivious to them, but don’t dwell on them.

Focus your attention on where you want to go, and you’ll stop running into the obstacles and start moving in the right direction. You’ll get a lot better at whatever it is you’re doing, and you’ll have a heck of a lot more fun, too. I guarantee it.

Got a good story about running into stuff (metaphorically or not)? Like to kayak? Have other advice? I’d love to hear about it! Just leave a comment below.

Working with 960.gs (4)

There’s been a lot of talk in the intarwebnets recently about the benefits of CSS frameworks. I insist on hand-coding, but I really don’t like working with CSS (particularly haggling with a certain 6th edition browser that starts with Internet and ends with Explorer) so I’ve always like the idea of a structure to make it easy for me, like a GUI framework for desktop apps. I’ve looked into some of the more popular, like Blueprint and YUI, but haven’t liked/used either for whatever reason, though I’ve always liked the concept.

Then, I decided to make this site, and I didn’t use any framework. I started with a pre-made theme and smashed, manhandled, sliced, and diced it until it was something kind of like what I wanted. I had floated div’s, crazy margins, and all manner of other hacks for whipping the stylesheet into submission. I got it working and I wasn’t really with how messy it was, but I didn’t have time to do anything about it with final projects and final exams taking up all of my time. Now that the semester is over, I decided to re-do it.

I decided on 960.gs after reading a blog post about it (wish I could remember where, so I could send some link love). I looked into it and found a professional, well-developed framework that had some good ideas that I was interested in, so I decided to give it a try. Boy am I glad I did. It took only a little more than 2 hours, and it looks better than it did before. Here’s a quick overview of how to use it:

Downloading and Installing

There really is no “installation”. You just download the ZIP file, and extract it into your CSS directory (or your theme’s CSS directory if you’re using Wordpress). Presto! Working framework. I changed the folder paths around a little bit, but you can really use it without changing anything.

The ZIP file comes with a lot of stuff to help you design with the 960 system, including “PDF grid paper, templates for Fireworks, OmniGraffle, Photoshop & Visio, and CSS framework with demo HTML”. I only used the CSS files, which is all you need for coding your site. The system comes with 3 CSS files.

  1. 960.css - Sets up the grid system, the 12-, and 16-column containers, alpha, omega, and prefix. This file is necessary to the grid system.
  2. reset.css - “Initializes” the system so that all margins and paddings are 0, outline is 0, etc… This file is necessary to the grid system.
  3. text.css - Sets the font sizes including headers, adds margins to lists, etc… This file is not technically needed for the system, as far as I can tell.

Also, the CSS files are very lightweight, and won’t add any significant loading time to the page, which is something that other frameworks struggle with.

Using it

The system is based around a 960 pixel-wide grid (hence the name). The grid system is a great way to produce good designs without a lot of overhead (Smashing Magazine’s got a great article about grids). You have the option of dividing the 960 pixels into 12 or 16 columns. 960.gs uses the following classes to structure the page:

  • container_XX is used in the outermost box to determine how many columns. You can use container_12 or container_16.
  • grid_XX is the bread and butter of the system. XX is for how many columns you want the block to be. For example, grid_10 will be 10 columns wide. The exact pixel width is determined by how many columns you’ve divided the grid into.
  • prefix_XX allows you to add in blank columns before a block. XX specifies how many blank columns you want.
  • alpha is for if you have children blocks. If you do this, you’ll want the first child to have no margin on the left side. alpha makes that happen.
  • omega is similar to alpha, except that it gives no margin on the right side. Use it for the last child.

That’s it. All you have to do is apply classes to boxes. It’s that simple to use. In the outermost container, decide how many columns to use. Then, all you have to do is add classes to your elements to lay them out on the page. It couldn’t be any easier.

Some gotchas

The padding problem: This isn’t really a problem with the framework. It’s just standard CSS, but it’s good to know. If you want one of your grid_XX cells to have padding, you can’t apply the padding directly to the cell, since that padding will add to the width of the cell, throwing off the grid. The way to pad the grid cells is to add another, non-grid_XX cell inside it and pad that one. The sample code uses <p> for that purpose, but I’ve used <div>. It doesn’t really matter.

The width problem: What if you want your grid to be more or less than 960 pixels wide, or you want it to be fluid? You choose another framework. The framework is named 960 for a reason. It’s 960 pixels wide, and short of hacking the CSS, there’s nothing you can do to change that. However, as detailed on their site, 960 pixels is a great width. From the site:

All modern monitors support at least 1024 × 768 pixel resolution. 960 is divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 64, 80, 96, 120, 160, 192, 240, 320 and 480. This makes it a highly flexible base number to work with.

Summary

I’m very impressed by how easy the system is to use, even for a CSS-klutz like me. The class-based layout design makes it extremely easy for me to translate the ideas in my head into CSS code without having to fiddle around with fragile floating and margin-ing.

I haven’t used the system in the most ideal or pure way (see the sidebar in particular), but the overall layout of the site is done totally with 960.gs. It worked perfectly. I didn’t have to hack their files to get it working like I wanted it to. It just worked as advertised, and made me happy.

I didn’t use the other files that came with the package, like the Photoshop template or the PDF paper since I already had the site designed, but I’ve looked at them, and they allow you to design exactly how the page will look, and when you code the site, I’m sure you’ll see it stays true to the design.

Thanks, Nathan Smith, for the great CSS system. You’ve made my life easier, and I appreciate it!

Freelancers Are Like Session Musicians (0)

There seems to be two ways to make money working for yourself doing development, and they have parallels in the music industry (bet you never would have guessed).

The first way is to start a company. Get a co-founder or two, find a great idea, do some magic, then become fabulously rich. It’s just like starting a band, really. Find a couple of other musicians, create a great sound, do some magic, then become fabulously rich and famous. If it works, it’s awesome. You get rich, you get famous, and it’s all a piece of cake. Except your chances are slim to none. The chances you’ll found a tech company worth billions are about the same as your chances of founding a #1 rock band.

The other way to make money on your own doing development is by freelancing. Chances are, you won’t make a billion dollars doing freelancing, just like the chances are you won’t be world-famous being a session musician. However, there’s much less risk, you control your destiny, and you make a reliable and good living.  And if you want, you can grow your freelancing until it becomes a good-sized business or consulting firm.  You’ll be sustainable in the meantime, and you’ll start making the big bucks with a few years of hard work instead of one or two living in a box wishing on a star.

Then again, you might even turn your freelancing business into a billion-dollar company. After all, Jimmy Page, Luther Vandross, Duane Allman, and Slash started out as session musicians. It wouldn’t be too bad to end up like them (minus the drug addictions and crazy clothes/hair), would it?

Got something to get off your chest? Leave a comment!

How to be Great (0)

You can do it!So you want to be the next Michael Jordan? Pablo Picasso? Bill Gates? Béla Fleck? Yoda? In the last article, I talked about the importance of having something in your life that you strive to be great at. I also promised that I’d tell you how you could go about improving at whatever it is that you’ve chosen. Well, here we go…

There are a ton of things you can choose to do, and I can’t give you a formula on how to be an expert at all of them (actually almost any of them). But, there are a few things you always do when starting out, and some ways to keep improving that apply to almost everything. I’m just trying to get you pointed in the right direction, hand you a map, and maybe help you bum a ride.

The number one way to get better at something is to DO IT!

Besides that, there are a couple of ways to get better at something:

  1. Learn about it. How can you get great at something if you don’t know anything about it? You will learn a lot by doing, but there are some things you can’t teach yourself (or won’t know to teach yourself).
  2. Get cultured. Whatever it is you’ve chosen to do, there’s most likely (read: most certainly) someone else who’s doing it too. In fact, there are probably a lot of people doing it too. Every activity, no matter its popularity, has a community, and this community has its own culture. This culture is invaluable for quickly getting yourself up to speed (and making great friends).

The culture surrounding an activity is a fantastic way to dive in and get your mind tuned to what it is you’re trying to do. The best way to get involved in the culture is to go to events (be they jams, races, etc…) and joining clubs. Any time and place you can find a group of people interested in the same thing is a great time and place to start getting cultured.

Mostly, though, I want to discuss where to find knowledge. You’ve got two main sources of information for new topics (besides people themselves): books and the internet. Books are usually more professional but can be pricey, while the internet makes no guarantee of quality but it’s (mostly) free, and there is a ton of great information.

Books are the classic way to learn about things. You’ve probably used books to learn about things your whole life, and there’s a reason for that. They’re great! They contain tons of information, they’re well-organized, and they’re professional. If you’re willing to spend a little money, you can get great information from a book. Plus, there’s something you just don’t get from looking at a screen that you do with a book, where you are literally holding knowledge in your hands.

The best place to get books about anything is Amazon. They literally have books on every topic you can think of. Want to paint, play banjo, play tennis, learn to program computers, run a marathon, or invest in stocks, or learn to do everything? Amazon’s got you covered. A quick search should turn up a great list of books.

There’s also the For Dummies series that covers a lot of common topics and is very good.

The internet is a phenomenal resource. There is an immense amount of information at your fingertips if you know where to look. Where might that be, you ask? List time!

  • Wikipedia The online free encyclopedia contains pages about literally everything you could wonder about, and then some. Check the bottom of the pages for links to external sites to dig deeper.
  • Google Google knows everything. If there is knowledge on the internet, you can find it with Google. I mean it. Everything.
  • Forums Do a google search for “[insert topic here] AND forum” and you’ll find the online hangouts for the community you’re interested in. People post questions, get answers, complain, praise, and generally talk about whatever it is you’re trying to learn.
  • Blogs Blogs are fast becoming great authoritative sources of information about niche topics. There are several great places to search for blogs about specific topics, in addition to appending “blog” to any Google query, but the best way to discover new blogs on a topic is to follow links in the blogs’ “blogrolls”. These are usually the author’s favorite blogs, and usually lead to great stuff. Within 2 levels or so into this “link network”, you’ll probably know about all the major blogs in your niche. Subscribe to their feeds to get great information on a regular basis.
  • Social Networks A big trend on the internet is social networks that target niche interests. Find one in your topic area, and you’ll have a great network of people to learn from.
  • Social Bookmarking Sites These are sites where users submit links to various things that usually get voted on. Search one for your topic. Often, the most popular posts are mega-lists of resources on a certain topic. The best ones are: del.icio.us, Digg, and Reddit. del.icio.us is likely to contain a broad range of interests, whereas Digg and Reddit will be slanted toward technology topics.
  • EDIT: MIT OpenCourseware is a phenomenal place to learn about new things. MIT has published a large amount of free lecture notes, exams, and videos for a lot of the classes they teach. It’s like going to MIT from home, and not having to worry about passing! If what you want to learn is something they teach, you really can’t beat this content, besides actually enrolling at MIT. I can’t believe I left this out when I first posted this, but now you know!

Using books and the internet, you can learn just about everything there is to know about whatever you’re trying to learn. But, again, the best way to get good at something is to do it, do it some more, then do it until you dream about it.

Did I forget any great places to get information? Are there better ways to start getting great? Want to get something off your mind? Let me know in the comments.

Here’s to being great!