NYCPHP Meetup

NYPHP.org

[nycphp-talk] Advice on setting for testing server

lists at nopersonal.info lists at nopersonal.info
Thu Aug 27 18:02:14 EDT 2009


Kristina D. H. Anderson wrote:
> Hi Bev,
> 
> Another good tip someone gave me is to train yourself to automatically 
> back up any file by adding the date in format _20090826 to the filename 
> before you edit or overwrite it, and that way you can always roll back 
> your files and have a day by day history of the code.
> 
> Again like with your log file, it will grow and soon you will have 16 
> different copies of each active file on your test server.  But it's 
> simple, free and most importantly EASY TO INSTALL :)

Hi Kristina,

LOL, yep, that type of revision control is definitely the easiest to
install! I've actually been using that method for years with HTML files,
but I'm finding it to be a PITA when working with PHP.

One reason is that when I have a lot of files with similar names it's
far too easy to select & edit the wrong one (even though I keep a
/_trash dir in an attempt to manage the older stuff).

Another reason is that if I haven't been working on a project for a few
days, it's hard to remember what I was doing with a particular version
of a file unless I also add some sort of description to its name. So I
end up with things like customer_edit_dd_filter_2009-08-26.php and
customer_edit_table_sort_2009-08-26.php. Ugh.

Last but not least, because of my inexperience, it's rare for me to only
have one version of a file on a given day. So even without the
descriptions added to the file names, I'd still end up with things like
customer_edit_2009-08-26.php, customer_edit_2009-08-26_2.php,
customer_edit_2009-08-26_3.php, and so on. It gets REALLY confusing.

Luckily, I make weekly backups to an external drive, so I've never made
a mess that I couldn't recover from, but still...I've wasted a LOT of
time trying to figure out where I was and get a file back to a usable
state, you know? I think it's definitely time for me to buckle down move
on to some sort of VCS--I figure however steep the learning curve might
be, it can't be worse than the amount of time I've already lost on
manual recoveries.

> And in terms of tracking "to do" items, I just keep a text file in each 
> active project in which I keep detailed notes and to do punchlists and 
> etc.  

Thanks, that's a good idea. I tend to make my lists on paper, sticky
notes, or a whiteboard. (I especially enjoy ripping sticky notes off my
monitor and tossing them in the trash when something's finally done
*grin*) But now that you mention it, it would probably be better to have
an electronic file so I can go back & review steps I took on any given
project to see what I did and how/if I might improve things.

> I lack patience for stuff that is needlessly complex as I've always 
> been a "brute force by text editor" type of programmer.  I just try to 
> follow the "KISS" method, and avoid as many hazards as possible.  And I 
> would certainly hesitate to hold myself out as a "productivity guru" -- 
> I tend to work in fits and starts and be insanely productive some days, 
> and then other days it just isn't really working for me so much...

I prefer simplicity too, but I freak out when my files start getting
messy because I have a hard enough time keeping my thoughts organized
when working with PHP & MySQL. I wish I could keep my apartment as
orderly as my files... ;o)

> Love Ajai's suggestion for XDebug but fear the installation 
> documentation may be my undoing! :)

Same here! Thanks again for your help.

Bev




More information about the talk mailing list