Tuesday, June 12, 2007

Five Secrets of the Lazy Hacker

Most of us know what a hacker 'is', or at least think we do; the image of some sweaty nerd who is anything but a healthy weight banging away at the keyboard and doing God-knows-what to our computers. Really, it's just someone who is so damned determined to get Result A that they're willing to do Task B, even if it means voiding a warranty or rooting around in the binaries to find out how to do it. Since at least some of making a webcomic means controlling the webpage it's viewed on, learning to be a Lazy Hacker can be quite useful:

Lazy Hacker Secret #1: Never code for yourself what someone else has already put out on the Internet.
We don't mean theft, either. If you want to find a way to put Twitter into an image so you can have it in your forum sigs, guess what: Someone at TwitterSig already did it for you, albeit you might not like the image. Likewise, using templates for MySpace, Blogger, and other paste-and-bakes is already quite possible, and so it shouldn't be an issue to find one (or better yet, find one you can customize).

If you can only find close-but-not-quite what you want...

Lazy Hacker Secret #2: Grok the Code that's already There.
You should know what clean, commented-out code looks like when you see it, because it actually makes SENSE to read it. If you're not working from code that's already pristine, make it pristine. Tabbing-in nested portions and spacing out your work isn't just nice to read, it's essential to learning anything. Lazy Coders don't make their code easy to read because they don't want you to read it, so it'll be up to you to figure out how to clean it up.

Of course, sometimes you just don't want to read about that damned stylesheet any more than you have to, so...

Lazy Hacker Secret #3: Compartmentalize Repeated Code.
You'll need to learn some php, but we're talking very minimal php, and this is talking about actually coding stuff. A fun thing to understand about PHP is that it not only allows for code execution, but it also allows for object-oriented coding, even when all you're doing is regurgitating HTML. Between the choice of designing a header that has to be copy-pasted across umpteen pages versus telling each page to retrieve from "header.php", and then only having to change one file versus umpteen whenever you want to create a change . . . well, that's not just Lazy, that's downright clever.

But now we've just asked you to learn a little trick to make your life easier! That's okay, because since you're trying to be Lazy, obviously you should...

Lazy Hacker Secret #4: Only Learn What You Need Right Then.
Just because it's not the way you were taught in school doesn't mean it still won't work. When it comes to HTML, CSS, PHP, and all the other Alphabet-soup languages, you should only seek out the parts that get the job done; you'll understand those bits easier, and even if it doesn't make sense, at least you know what works. Language references are just littered across the internet, and picking up the few bits you need from each one should be easy, right?

Once you've done this much legwork, and you're still stumped, it's time to use the last Tip...

Lazy Hacker Secret #5: Know Who to Ask.
When it comes to simple HTML questions, it makes sense to ask your peers first. If you feel you need more advice, forums for programmers and books on the stuff are meant to be used. As long as you sound like you've done at least a little research, most geeks will gladly either give you the next few steps, or soundly correct you (but give you the right answer anyway).

Caveat: Make sure the question is worth their time. You don't ask Linus Torvalds what the 'ls' command is, and trying to jump the hierarchy of expertise makes you look dumber for asking and also makes it less likely others will answer.

A little effort goes a long way with a Lazy Hacker, and while it won't make you a complete programming guru, at least it'll be enough to make what you've got look worthwhile.

Labels: , ,

1 Comments:

At March 22, 2023 at 4:53 PM , Blogger Steve Smith said...

Wow what a post this is truely a great information.


Buy Bomber Jacket With Hood

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home