Ptocheia.net

Recent

Archive

Friends

Userinfo

Other Sites

VA Roper Art & Design

Writuar: Unleash your Writing Animal!

What I eat, apparently.

Salami Day

Spin the Globe!

Facebook

Myspace

September 2015

    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

rss feed

GeoURL

Valid CSS!

 
?

Log in

ptocheia [userpic]

Graveyard.css, or Where I’m Putting Old Code Out to Pasture

April 25th, 2013 (08:55 am)

So I’ve been doing a lot of code cleanup as of late. Meaning I’ve been going through a rather large CSS file and trimming the fat, not to mention doing a bunch of theming changes. I really hate commenting things out as a regular practice, as it looks ugly and still takes up space. Now and then, sure, but when you’ve got hundreds of lines of code in a single file all commented out, I just can’t deal anymore. And, sometimes I realise there’s a bit of code that I dumped a month or so ago that I’d like to find again. In theory, version control should save the day. Course, looking at my commit messages in Git is all like “Fixed layout on landing page!” with changes to a bunch of different files (yeah, I’m super organized).


I’m doing some fairly major reskinning in an area of a site right now, and while there’s code I’m perfectly happy to just delete, there are some styles that I get paranoid I might regret sticking on the ole chopping block. Also, I’m paranoid of someone above me down the line getting reminiscent for a certain look that I killed off. So I came up with the idea for graveyard files. I’ve got a file, graveyard.css, where I’ve started pasting in CSS classes I no longer have a need for, but am not ready to just delete yet. Graveyard.css isn’t loaded by any page, it just hangs out in the CSS directory with the rest of the files and keeps them company. It caters to my natural packrat instinct, and helps cut down the anxiety that comes with deleting several hundred lines of code.


I’ll be starting a graveyard.js pretty soon as well, as I’ll be cleaning up from some functionality that’s been disabled. And, because every JS directory needs a spare closet.




Originally published at Ptocheia.net

Reply   Link

Travel!

Peru 2007

Florida 2006

Camping in Western VA & WV 2006

Florida 2005

Quizzes

How sexy are you?

What pisses you off?

What kind of goth are you?

What's your sexual perversion?

Discover what your fortune holds for you!