Topic: Issues with errors in code...and more errors in code :( (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=29844" title="Pages that link to Topic: Issues with errors in code...and more errors in code :( (Page 1 of 1)" rel="nofollow" >Topic: Issues with errors in code...and more errors in code :( <span class="small">(Page 1 of 1)</span>\

 
paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-06-2008 14:37

Guys I need some advice here... well I've been havinga bit of trouble here recently with teh project Ive been working on. Its been very haphazard and right now I'm having to bear the brunt of relentless complaints form my boss on little errors that prop up now and again. The issue is that well we have a working version which is quite very much a working stable beta of the project I've wokred on.. its terribly old and I'm working on newer version day to day. The issue is that now and then little errors prop up - which isn't abnormla but again in many places I've noticed that either I seem to find teh same errors propping up in the same places again or that a module which is perfectly working seems to all of a sudden after I work on it some how act up weird again for a different reason.

Counting the number of people involved in the design, analysis, testing, programming and deployment of this project including myself leads toa grand total of... one...so its kinda a hard situation. The problems are largely due to the fact that once I finish a module my boss would require a little alteration to whats been finished and somehow more often than not after that 'little alteration' which normally gives way to more equally 'little alterations' it results in something going wrong with my functioning moduel.. and that too ONLY at the time of testing by my boss... which is weird.. or maybe I'm too lax in testing and seem to feel everythings ok a bit too soon..

I would really appreciate any advice on how to organise the work so that atleast errors are minimised and plus is there a free versioning system out there for php mysql based projects .. something like source safe.. I'm kinda tired of creating new versions by hand and then trying to synchronise...

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-06-2008 14:47

WOW! You're not using a versionning system Seriously, look into Subversion ( aka SVN ) and SVN 1 click setup if you want to get started quickly.

Never say immediately Amen to any request. Mention that it will take some time to analyse how to model, implement and test the request and that it will affect the roadmap of the project. Doing so is more professional and prevents you from rushing features in and bloating your code and data model.

Also, try to create unit tests.

Oh and get yourself an issue tracker, like Trac which integrates with SVN, and require people to use it for it's the only way to seriously keep track of issues, bugs, regressions, ... and do a triage.

One more thing : Before a scheduled release, do a code freeze by branching, and only merge back the patches that are deemed critical before release.


Hope that helps,



(Edited by poi on 01-06-2008 15:02)

argo navis
Bipolar (III) Inmate

From: Switzerland
Insane since: Jul 2007

posted posted 01-06-2008 15:16

Yeah, definitely :

quote:

The problems are largely due to the fact that once I finish a module my boss would require a little alteration to whats been finished and somehow more often than not after that 'little alteration' which normally gives way to more equally 'little alterations' it results in something going wrong with my functioning moduel..



This is what happens when scope of the project is badly defined at startup : because your boss certainly doesn't understand many things about technology.
You cannot bring this up "boldly", though, what you should do is :

- find a time to talk when he is calm, and favor that calm with your attitude (eg. kiss up a bit, not too much, just be "cool")
- bring up the talk (shows you want to propose a solution)
- say something like "upon further analysis, the testing phases are too short to warrant stability of those patches : what we should do is define mid term goals
for changes together clearly, assess possibilities and analyse properly, and define clear area of improvement, implementation/test/golive phases,
and stick to that"

On a subconscious level, the more you show fear, the less you express self confidence, the more the guy is nervous :
the outcome of this situation, at worst, is not life threatening, so breathe, and take action to regain control of the situation - it may be as subtle
and simple as the above to put the project back on the right track - but you have to be confident you CAN handle it,
avoid pointing out past problems and frame the discussion around some new positive directions.

Hope that helps too,

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-07-2008 08:48

Great advcie but again I was wondering considering that I'm the only programmer around - wouldn't using a versioning system like the ones you've referred me be a bit of an unnnecessary overload? Its been a while since I've worked with source safe. The thing is that the situation is such that we have three copies of the web app - one which is in official use, one which is for test purpose and on upon which I'm working on....

argo navis
Paranoid (IV) Inmate

From: Switzerland
Insane since: Jul 2007

posted posted 01-07-2008 09:02

No overload : commodity. Storage is cheap, learning SVN is easy, losing track of what you do at any given point results in confusion.
Avoiding confusion at a small expense == what you want here (I now even version each and every single step of anything I do, including PS files, whatever).

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-07-2008 09:24

paritycheck: Using a versioning system will save you all the hassle you last mentionned in your first post. Also it makes it possible to revert, add commit comment, you can get an RSS/ATOM feed with the commit comments ( useful for other members of the company/team ), ... you can check the history of the commits, compare versions, merge, ... there's just no reason to not use a versionning system on anything bigger than say 20 lines of code.

Using Tortoise SVN, SVN gets integrated into Windows' explorer. You don't even need to think one bit to use SVN.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-07-2008 10:34
quote:

there's just no reason to not use a versionning system on anything bigger than say 20 lines of code.


there's no reason not to use a versioning system on anything you write.
Heck, I'd have my emails in Mercurial if I wasn't receiving a metric ton of spam each day...

And a good versioning system makes it so simple to move changes from one 'branch' to the other...

(and on the same note: unit tests. Unit tests. Unit tests. Then you actually have a chance to catch
when a little change over here breaks something over there.)

Mercurial has a 'divide and conquer' extension (I'm pretty sure git has it as well, and there's certainly
something for svn out there). You take your broken feature, give it a version where it was still good,
and one you know it to be broken, and it recursivly zooms in to where the error was introduced...

so long,

->Tyberius Prime

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-07-2008 10:42

Also as for the different environments ( dev, test, staging, production, ... ) they are all just a branch name and a revision number. As simple as that.

And some web hosts provide SVN and significant storage. That may not be a bad idea to get a domain and hosting just to get a personnal SVN accessible from anywhere. Just protect it with an HTTP AUTH and you're done.

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-09-2008 10:53

Uh I don't wanna sound like a noob here.. but its been a while since I've used sourcesafe. Basically what I would need is a way to maintain versions and be able to rollbackl to prior versions shoudl anything go wrong. But... I don't seem to understand well how to get this all set up so that I can integrate it with dreamweaver.... please guys.. I've installed tortoisesvn... but its going way over my head ... I woudl appreacite it if someone would tell me how to set it up.. and how to integrate it... pretty please

(Edited by paritycheck on 01-09-2008 10:55)

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-09-2008 11:41

The subversion book makes an excelent read - chapter 1,2 and 4 should get you up and running.

What poi explained is nice to have, but not necessary for a start.
You create a repository somewhere on your machine, do a 'checkout', create the basic 'usual directory structure' (branches/trunk/tags) in it,
add those & commit, hten you copy your current working directory into trunk, add the files to the version control, commit again,
now you move your old working directory out of the way, and do a new checkout of just the trunk into that directory.

Ever after you basically have 'edit, test, commit with meaningful message' cycle in daily usage,
perhaps working in different braches at the same time,
and using the merge functionality to convert changes from one branch to the other.
(SVN merge isn't the most usefull in the 'verse... but it's pretty useable anyhow).

Uh... read the book. It's way more clear than I manage to write here.

so long,

->Tyberius Prime

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-09-2008 12:01

.... yeah well actually what I've done is that I've downloaded tortoise SVN and installed it.. so what it does is that I create a folder... ok and then once I've done that.. I right click it and I have the option to turn the folder into a repository. Ok now once I get that done.. I can select my code stashed somewhere and using the import function now integrate din the windows environment - import that to the repository..

However where I'm stuck is trying to integrate it with dreamweaver . I downlaoded an extension for it SVN4DW but it makes little sense.. its nothing much like what VSS was... although its been a looooooooong time since I've worked in VSS...

How do I integrate the SVN into dreamweaver.. and if that is even possible? ANd how would I be using it then?

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-09-2008 12:27

Ok I found a plugin for tortoiseSVN or rather just SVN... its freeeeee yipee , its called subweaver but I keep getting a weird error if I try to do anything? Could someone please tell me in a simple sequence what I would need to do to get started.. how would I revert to old versions of projects etc...

Man I feel so noooooob....

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-09-2008 13:14

Using Tortoise SVN, reverting is simply done in the explorer by a right-click > TortoiseSVN > Revert, or might want to right-click > TortoiseSVN > Update to revision ... and specify a revision number.

Sorry I don't use DreamWeaver but it must be similar using subWeaver.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-09-2008 14:18

personally, I don't do version control right out of my text editor... I simple drop into explorer (or more recently, the command line, TortoiseHG is only slowly coming along))...


revert means 'throw away changes' (and that's what poi told you).

What you want to do is either an 'update to revision [number'], or a 'checkout of revision [number]', where the later is done in an empty directory (creating a new working copy), and the former modifies the current working copy.

Seriously, if you find subversion to be different from your VSS experience, the book is the way to go (I believe VSS required you to 'check out' files before working on them (ie. only one person could work on any file at a given time). Subversion doesn't work that way.
You 'check out' working copies (ie. all files), but they aren't locked in the repository. Rather the commit will fail, requiering you to make an update and possibly a merge, and then commit with the changes from the other person integerated.

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-09-2008 14:26

Hmmm interesting well... the thing is that I'm not so sure what to do from my dreamweaver IDE in terms of version control and whether I nee dto do somethings out of dreamweaver for it. like lets say I have a project that woudl like to be put on version control..

For starters I create a repo directory in windows... and using tortoiseSVN I make it into a repository

WHere do I go from here?

I.e. how do I import my project into this folder

How do I check in and check out changes
ANd then how do I rollback to older versions.. its basiclaly I would like some hands on how to do help here... I know it sounds like I'm asking for being spoon feeding but the fact is that even when I used VSS it wasnt very intensive on my part i.e. I never set it up or so.. that was always some one else .. all I did was just check out, change, check in, commit and thats just it...

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-09-2008 14:40

To check out, just right click on a folder > SVN checkout...

To check in/commit, just right click > SVN commit... . if there is sub files/folders that are not added in the repo yep, you'll get a prompt to add them if you want, and of course there's a textarea to enter the commit comment.

Once you have checked out, and want to get the latest version, right click > SVN update.


HTH,

TP: Oh yeah, VSS lock files by default. It's possible to lock/release files in SVN and certainly other versioning systems.



(Edited by poi on 01-09-2008 14:40)

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-09-2008 16:08

And read the book - it's all in there! (or do a quick google for 'svn tutorial') .


poi: None of the distributed systems support locking - how could they, without a central repository

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-12-2008 08:08

Yipee I got TortoiseSVN to work.... finally got how to commit and revert to older versions... After hacking around for two days doing the same thing over and over again getting nowhere... I took your advice and actually.. read the book... doh ain't that just like me... tryin out new toys without consulting the manuals or docs under the assumption that I can take it...

From now on note to self... if a manual exists for a product its definitely for a reason...

Thanks again you guys for the great help and support ..

(Edited by paritycheck on 01-12-2008 08:08)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu