Toad World® Forums

Source control question


#1

So we all go to employers or clients who already have some form of source control software, usually something we hate, but we’ve all worked with the good, the bad and the ugly.

I just started working for a client that has no source control methodology in place. Another part of the company is using TFS. I’ve never heard of it before, but I think it’s from M$ so it’s probably just renamed VSS which I’ve heard is crap.

Given a choice I’d use Subversion, but that’s just good for source control, not concurrency control. We have developers spread all over (they are in NJ, I work from home in TN) working on different stuff, but starting to have package overlap and it’s just a matter of time till someone craps on someone else.

Since they don’t have any standard set yet, if I present a proposal that would work, especially if it’s cheap (and preferably free) they will be happy to not have to make a decision and will probably follow my lead.

If you have a choice, what would you use? My main concern is concurrency. Anything will work for source backup and history.


#2

Morning all,

I just started working for a client that has no source
control methodology in place.
I did that! Ended up getting permission to use Subversion on my own PC
with a local repository on a flash drive. Worked for me for a while.
However - as expected - some scripts went away all by themselves from a
production server and strangely enough, the backups included the
directory they used to live in, but somehow not the contents.

I had the Unix Guru go back over 18 months of backups and each was the
same, the directory was there but the contents were not. It was a hard
directory as well, not a sym link. Oh hum.

Luckily, on my USB drive, I had the scripts!

Management were “eternally” grateful and I was tasked with setting up a
repository that all departments could use and Subversion client was
installed by one and all. Life was good and very few conflicts were
detected.

Given a choice I’d use Subversion, but that’s just good for
source control, not concurrency control.
Now I’m puzzled. In what way is it not good for concurrency? First of
all, lots of developers can check out a file, unlike some other VC
systems where the first one to check out locks the file until committed.
Not a good way of working as far as concurrency is concerned.

When Subversion allows lots of people to edit the same file, the
problems come at commit time. Many concurrent changes will be committed
with no conflicts, if the changes are made in different parts of the
file. (You edit the top and I the bottom, no worries.)

The conflict arises when you and I both edit the same part of the file.
And there is no VC system that can prevent that - how would Subversion
determine that your change was right and mine wrong just because you
committed first? It simply cannot.

If your system is such that many people, in many places, can update the
same file(s) at the same time, then conflict is likely to occur but it
will only be avoided by allowing one person the ability to edit the file
at any one time.

Even under a non-version control setup, allowing you and me to edit the
same procedure code at the same time is going to result in lost changes
and so forth. It’s a bad thing!

We have developers
spread all over (they are in NJ, I work from home in TN)
working on different stuff, but starting to have package
overlap and it’s just a matter of time till someone craps on
someone else.
Unfortunately, that’s the nature of the beats in the way that multiple
people are allowed to edit the same stuff at the same time.

Since they don’t have any standard set yet, if I present a
proposal that would work, especially if it’s cheap (and
preferably free) they will be happy to not have to make a
decision and will probably follow my lead.
Subversion is good for centralised repositories. Merging and branching
is good - once you get your head around it - and so on. Git is another
that allows a central repository to be used, but cloned out by all the
developers who work locally and commit changes to their cloned copy of
the central repository and then, at some point, push their changes back
to base.

There can be a central repository manager who collects all these
“pushes” and applies them to the central repository one by one and s/he
will have to manually resolve commit conflicts just as often as a
Subversion developer would have to do. This is how the guys and gals at
QT Software use Git - we can all clone their repository and any changes
we make are pushed back, but not applied until accepted as being valid.

Both Git and Subversion allow concurrent working for as long as the
overlaps don’t hit the same area of the file(s) in question. When that
happens, you get conflicts that simply have to be worked out manually.
There is no known VC system that can resolve a conflict without human
intervention.

If you have a choice, what would you use? My main concern is
concurrency. Anything will work for source backup and history.
Subversion - but only because I’m familiar with it. Git looks good (I
have the book from O’Reilley -
http://www.amazon.co.uk/exec/obidos/ASIN/0596520123/ref=ox_ya_oh_product
) but it also looks strange as it works differently. There’s an online
Git book as well http://book.git-scm.com/book.pdf that might give you a
decent overview.

HTH

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#3

Sorry, an additional URL for you on Git:

http://progit.org/book/ is the online version of APress’s Pro Git book.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#4

i like the “push model” to update public repository with your updates
conversely anyone wishing to update their local copy can then “pull” from the
public repository
this scenario works well with peer-to-peer

what would happen if you desired a higher authority to overwrite their changes?
oldGuru pulls the entire working copy of a Database and is working on updating
on encryption salt (from 256bit to 512bit encryption)
CollegeKid jumps in pulls the same repo and downloads and applies whiz-bang
encryption which he will use in his new whiz-bang webapp
at midnite CollegeKid pushes whiz-bang changes encryption into the public
repository
7am oldGuru finds conflicts galore when he tries to checkin his new encryption
salt (as CollegeKid has rewritten the entire tree)
anyway to resolve this scenario?

thanks norm!
Martin Gainty


Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n’êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l’expéditeur. N’importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l’information seulement et n’aura pas n’importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


#5

Hi Martin,

what would happen if you desired a higher authority to
overwrite their changes?

Well, for example, I have pulled the entire QT source code into a local
git repository on my home workstation. Any commits I do go into my local
repository. When I have (hypothetically) completed work on my new
feature or bug fix for QT, I push my changes back to the main QT
repository.

They are not pushed into the repository until a guru at QT Software has
checked it out (using my repository) and approved it for use. Then he
will push it.

When software wonderkid comes along and tries to push his changes back,
he will/may get conflicts and will have to merge my changes into his,
then resolve the conflicts. Or, the guru will decide that perhaps this
isn’t a good idea just yet, and create a branch for wonderkid’s new code
which can be merged at a later date - as desired.

Have a look at push/pull/merge and conflicts in the git books online for
better details that I can give, I’m just an interested bystander with
git at the moment. I’m not sure I like it yet. Subversion, on the other
hand, is better for me and my needs.

The problem/difference is simple, while git lets you work offline etc,
you have a complete copy of the repository and its history locally
installed. With this setup, you can commit and so on as much as you
like. With Subversion, you commit back to the central repository -= so
if you are offline, you cannot commit.

Git is best for distributed development. Subversion for all the rest.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#6

Sorry Norm, I guess I wasn’t clear enough with my verbiage.

What I meant by concurrency control is how do I know if someone else is working
on the package? In a company I worked at where they used a LAMP stack and we all
had a fully functioning copy of the website running on our development machines
this was not an issue. We checked out the entire Subversion trunk and true to
documentation Subversion took care of the rest. Another developer and I played
dueling developers when we were both working on a core package. Sometimes even
the same procedure within the package. Subversion just handled it brilliantly
with only one manual conflict resolution, which it made even that pretty simple.

What I meant is that in an Oracle environment with a package in the single
database instance, we can’t have multiple developers editing and compile a
single package simultaneously. That’s what I meant by concurrency control.
In ClearCase or StarTeam (or any other “traditional” “lock the
file” variant) I can tell someone else is working on the package because
the file is locked. Without some sort of signaling mechanism that is
unmistakable and immediate (that lets out email since I can’t wait for a
dozen people to respond “not me”) how do we maintain package
integrity?

I’m sold on Subversion because I used it with glowing results in a LAMP
stack, but it won’t address the package control/concurrency issue.


#7

Hi Chris,

Sorry Norm, I guess I wasn’t clear enough with my verbiage.
That’s usually my problem!

What I meant by concurrency control is how do I know if
someone else is working on the package?
Aha! Got you.

Configure Toad to prevent compiling objects directly in the database.
Then use a Subversion repository to hold the centralised copies of the
scripts to create the package etc that you need to duel over.

Toad will not allow you to open a connection, send a package to the
editor and compile it unless you have either loaded it from disc first
or, save it to disc before compiling. If all developers use that option
and have the folder checked out of Subversion, then you can happily use
Subversion to manage conflicts as best it can.

View->Toad Options->Execute/compile->Allow compiling when source loaded
from database (unchecked).

Once you have this in place, and it’s what I use even for my own
scripts, you cannot inadvertently compile something directly into the
database if the source was loaded from the SB or wherever. This can help
prevent compiling the wrong code in the production database!

It’s going to take discipline of course, these things often do, to get
all the developers configured correctly and to get all your code checked
into Subversion too, ready to be checked out and used.

I’m sold on Subversion because I used it with glowing
results in a LAMP stack, but it won’t address the package
control/concurrency issue.
I use it because it “just works”.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#8

But that still won’t stop us from overwriting each other if we are working
in the same package. If you and I both check it out of the repository… I
add a procedure and compile. You add a procedure to your copy and compile. My
procedure just disappeared from the database. I get frustrated and recompile.
Now yours just disappeared. I have no way of knowing why. You have no way of
knowing why. We just keep wiping each other out.

SVN would handle the merge flawlessly at the source level, but we’re still
whacking each other on the head in the database.

A configuration requirement won’t work with this bunch. If they had any
discipline and professionalism they wouldn’t be operating an IT department
without source control to begin with so I can’t rely on something that can
be changed or overridden that I don’t have the authority to mandate or
control.


#9

Configure Toad to prevent compiling objects directly in the database.

Ahh… my preferred working layout is each developer has their own
environment to work in rather than a central environment. A central environment
still exists for initial “sys” type testing once the developer has
completed their testing in their own environment.

how do I know if someone else is working on the package

This would be called communication. Without communication you’ll never
know. The communication can take many forms. The one I would recommend is having
coding standards which every developer follows. The standards must include
proper commenting. For example, a “history”/“change
log”/“whatever” section at the start of the script
identifying:


#10

even worse when the source-control administrator is never accessible (as in the
opposite side of the planet)
you could alleviate any anxiety by granting yourself read/write/execute and
delete privs to SYS

i found this documentation helpful on merges of external vendor libraries
http://svnbook.red-bean.com/en/1.0/ch07s04.html

Martin Gainty


Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n’êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l’expéditeur. N’importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l’information seulement et n’aura pas n’importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


#11

Yes, I agree with separate environments when that is feasible. In a previous
employer the database and application were realistic to allow that, but that was
a different kind of shop (non-Oracle) with only a few developers all sitting
within conversational distance of each other. Now I’m working on a large
database such that having a copy for each developer isn’t feasible and
although we only have half a dozen developers on this project we’re in
three different states.

Communication sounds good on paper, but sending out an email ‘who is
working on X’ isn’t really feasible either. How long do you sit on
your thumbs waiting for a reply?

As much as I like the Subversion way of doing it, I can’t help but admit
that ClearCase, StarTeam and many of the other source control things that I
despise did have the advantage that we could always tell who was working on a
package when they had it checked out.


#12

Hi Chris,

But that still won’t stop us from overwriting each other if
we are working in the same package. If you and I both check
it out of the repository… I add a procedure and compile. You
add a procedure to your copy and compile. My procedure just
disappeared from the database.
Possibly, which does make it sound as if you are back to square one -
Duelling Developers! However, when I do my stuff, I have my SVN workbox
where my scripts are checked out into, I have a development database
that I use, and nobody else.

I do my development, you do yours, never the twain shall meet until we
update & Commit back to SVN. If all is well and we have avoided each
other, SVN copes and we get a nice merge of your code and mine. If we
have walked all over ourselves, SVN complains and we get a conflict to
resolve between us.

Regardless, eventually, we end up with two developers work in the same
package. The source that was committed into SVN is the “one true source”
that will be applied to the Test, QA and production databases at release
time.

The problem is getting each and every developer to use their own
personal Oracle database for development. But then again, surely Oracle
XE is useful in that respect being free of charge?

Just a thought.

I get frustrated and
recompile. Now yours just disappeared. I have no way of
knowing why. You have no way of knowing why. We just keep
wiping each other out.
I truly expect that if my code vanished then your’s did, (repeat as
required) that eventually one of us would hit the email button asking is
anyone is working on such and such a package and if so, to desist!

SVN would handle the merge flawlessly at the source level,
but we’re still whacking each other on the head in the database.
So avoid the database. Developers develop in isolation, same as where
they do their editing!

A configuration requirement won’t work with this bunch.
Haw about a big stick with a nail through the end? :wink:

If they had any discipline and professionalism they wouldn’t be
operating an IT department without source control to begin
with
Ah well, I consider myself to have discipline and (some) professionalism
and I have worked in many places that had no version control of any
kind. Although I was just a minnow in these establishments, I soon
became a big enough PITA that we ended up using a VC system - and
suddenly all was (almost) hunky dory. (And some manager took all the
credit!) I’m talking about large UK banks here as well as smaller
software houses.

In fact, the software house had no development/release/qa system at all!
The code was live and evolving all the time and any customer who logged
a fault usually found that it couldn’t be reproduced in house as we no
longer had that version of the code that was released! Go figure.

so I can’t rely on something that can be changed or
overridden that I don’t have the authority to mandate or control.
It sounds like you need to get approval for XE to be used by developers
for personal development and to make you releases directly from the SVN
repository?

Good luck - it will be an uphill struggle, I suspect most managers and
“keepers of purse” will decide that the company has managed well so far
without all this new fangled stuff like version control and development
databases. :frowning:

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#13

#14

att1.dat (43 Bytes)


#15

Unless you develop straight to production, I think you’d want to make a
copy of your dev environment local to your laptop.

Toad’s Data Subset Wizard allows you to bring down a percentage of data,
so you could grab 5% and just have a 5GB database to develop in.


#16

Morning Wim,

Sounds good. Leaves me one question. How do you get a
developer environment? Make a copy of production? Change the
paths where needed in configuration? But what if the
production database is already a 100 Gb? (and my laptop has
a 60Gb hard disk… )
What we used to do in the dim and distant past, in another job, was to
have everyone keep their own small developer database for testing of
fixes/changes we did individually. These databases were all kept up to
date with the production structure, but not necessarily all the data. It
worked fine.

Changes would be unit tested by the developers and then applied to the
almost full sized test database sitting around for this very purpose.
Then QA got their hands on it, and the changes were tested against a
full sized QA database before going live.

The developers handled the changes to their own databases and a
dedicated team did the main test and QA databases etc, production was
“untouchable” for us mere mortals.

Recently here, I helped a colleague who doesn’t have a development
database but has a test and a production. He didn’t want to run new
scripts etc in test because that is the one his users use to test out
bits of the application they are unfamiliar with, etc, like a
playground. He needed a development database so I installed XE on my
desktop (with full authority from the licensing people!) and loaded up
an export of the production database to run the new scripts against.
There were problems, obviously, but we fixed them and got a good clean
end to end run of all the scripts for the latest development work. Very
satisfying.

In this case, we were able to take a full copy of the database because
it’s less than 4 GB of data and XE fits the bill perfectly in that case.
Bigger databases - I have one or two in the terabyte range - won’t work.
In that case I’d be looking to take an extract (using Toad of course) of
a small percentage of the database (Production or test as appropriate)
and load that into XE for development work. After all, when developing
code you don’t really need the full sized database. If I need to do some
performance checks, I can export production stats and import them into
XE, if required, and get my explain plans “sort of” optimised. (Given
the difference in hardware and OS between my desktop and the production
server, this will only give me a clue to potential problems!)

My little XE database does get refreshed quite often, depending on what
I’m working on this week!

Now, given Chris’s problems with Duelling Developers (can I hear banjo
music?) the above will help prevent the developers trashing each others
code when compiling into the same database, but - as with a lot of
situations - will cause problems when applied to the test database where
all changes have to be applied eventually. For exactly the same reason,
one developer’s changes will not include another developer’s changes, so
the scripts that get applied to the test (and from there, production)
database must come from a Subversion repository because if they do, the
changes will have been merged by SVN on commit and if any conflicts
occur, they will have been manually resolved by the duelling developers.

Now, hopefully, the two developers will realise that an SVN merge of
their changes may actually break things, so when they get the finally
agreed merge of both sets of changes, a compile and unit test against
their own database would be a good idea. Then the testing
team/QA/whoever can be informed that (a) a conflict arose and (b) it has
been resolved and © we’ve both tested it again and all appears well.

I’m sure that there will be cases where you have a procedure with nested
procedures, or a package, and one developer changes a nested procedure
and another changes the code that calls it. Depending on the changes,
Subversion will not see a conflict and will happily merge the two sets
of changes which might result in code that doesn’t work.

Subversion does have pre and post-commit hooks that can be used by an
automated system whereby any file that is checked in is compiled against
a standard database to ensure that what the developers - duelling or
otherwise - are checking in doesn’t break stuff.

It would solve Chris’s problems if Subversion had a pre/post-check-out
hook to do something whenever someone checks out a file, but it doesn’t.
However, with the joys of open source, someone somewhere might add it
in!

I think those are problems I must solve myself, because of
the fact that it all depends on what I’m doing. But I like
to hear someone else thoughts on this subject.
See above! :wink:

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#17

Morning Chris,

Communication sounds good on paper, but sending out an email
‘who is working on X’ isn’t really feasible either. How long
do you sit on your thumbs waiting for a reply?
True. As long as you have to rely on some human somewhere doing
something manually, you might find delays and long waits!

As much as I like the Subversion way of doing it, I can’t
help but admit that ClearCase, StarTeam and many of the
other source control things that I despise did have the
advantage that we could always tell who was working on a
package when they had it checked out.
I have never used any of those I’m afraid, so I can’t comment. However,
in the last 5 minutes I Googled for Subversion +“Who has checked out a
file” and found three links, of which this one came to light:

http://www.ryandesign.com/svnhookdispatcher/

I haven’t looked myself at what it does, but it appears to be the very
thing you want in SubVersion - who has checked out what!

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#18

Yeah, I’ve seen something like this at a previous employer. They somehow
had a hook into the repository so that any check-in info got displayed on an IRC
channel so you had a good idea what people were up to. Unfortunately it could be
distracting with dozens or even sometimes hundreds of messages per day, and many
of them not related to “my” project etc. and of course the biggest
problem is that if you reboot or something reinstalls or for whatever reason you
lose the IRC channel then you don’t see those updates.

The simplest thing was to just do an SVN status which told me if anything in my
local repository was different from the main repository and then I could do an
update if I saw the need to refresh my local repository.

But that was in a Perl (non Oracle) environment where I would just bring down
updated sources. It still doesn’t address two people compiling the same
code in the database, which is what will be happening here.

Also, in that case anyway, we checked out the entire “trunk” of the
repository, pretty much a necessity in a Perl/HTML site where code is spread
over numerous directories and libraries, worked the code we needed and committed
when we were done and ready to promote to the test box from our personal/local
development boxes. In that case, knowing who checked it out was meaningless
because everyone had everything checked out, but because we each had a LAMP
stack with a fully functioning copy of the web site on our local machines it
didn’t matter. We weren’t working on the same machine, exactly as
you are now suggesting.

I suppose it possible that scenario “could” work in a reasonably
stable environment using XE, but this client is a real wild west show of
constantly changing structures. It’s partly understandable because they
are in the process of migrating from SQL Server to Oracle and they are
addressing lots of key flaws in the original SS data structures as well as
trying to implement some consistency and standards along the way. When the
environment is a bit more stable that approach might work, but for now instead
of having one developer make a change and fix anything invalid you would have
multiple developers needing to make changes on multiple environments and
updating or resynching the updated source. I can’t see that being
particularly time efficient or well received.

As usual, relying on humans to follow the rules and procedures when it’s
infinitely simpler to ignore or bypass them just isn’t a recipe for
success.

Thanks for everyone’s insights.


#19

After all, when developing code you don’t really need the full sized
database.

It’s been my experience when Developers do that they end up not fully
testing their code. Having a full-sized real-life database is great for
performance testing/tuning, but is actually a hindrance to proper developer
testing.

I’m sure we can all agree that the developer is responsible for testing
every single line of code s/he authors. I’m sure we can also agree that
the developer is responsible for knowing exactly what’s going to happen
with that code when a piece of information travels through it.

Consider the situation where you have 500 million rows of data, but none of them
have triggered that rare path which exists in the code. When the developer runs
their code over the real-life production data – which is missing that one
rare transaction – they end up not testing that rarely-used coding path.
What’s worse is they trust they’ve done a full test because they
can’t imagine a path missing from those 500 million transactions.

In my humble opinion, it’s far better for the developer to generate their
own transactions based on the nature of their code then to trust in the
production data. For example, let’s say I have the following IF statement:

If customer_age

… ticket_cost = cost_table.less_than_six

Elsif customer_age between 50 and 105 than

… ticket_cost = cost_table.senior

Elsif customer_age > 105 than

… ticket_cost = cost_table.ancient

Else

… ticket_cost = cost_table.standard

End if;

I think we can agree in such a scenario the customer age over 105 years old is
going to be quite rare. It’s possible that the full production database
has not actually registered such a transaction. As a result, the developer
relying on the production database would not fully test his/her code. However,
the developer who creates 5 records (always remember that null value) that will
run down each of the logical paths will be able to fully test their code.

In short: when developing, to properly test code, a record for each path –
including any exception handling – is far more important than having the
full production database available.

When one finally wants to confirm performance, quantity becomes important.

Hint: A Cartesian Join is a wonder tool for the developer to quickly compile a
full set of all possibilities. Let’s say the if structure is testing 3
values, instead of just one:

If customer_age
brunette then…

You form your specific values for each variable:

Customer_age – requires 5 values (2, 16, 55, 109, null)

Customer_gender – requires 4 values (male, female, unknown, null)

Customer_hair_color – requires 4 values (blonde, brunette, redhead, null)

Cartesian join those values and you have a 100% complete set of every possible
combination that could go through your code. The developer will know exactly how
their code will behave in any situation the data puts it through. If
you’re into security testing of your code as well, you can easily create
invalid data to pass through it.

Roger S.


#20

Communication sounds good on paper, but sending out an email ‘who is
working on X’ isn’t really feasible either.

How about my suggestion about commenting your code? You don’t have to send
out emails in that case. All you have to do is look at the top of the script to
see who overwrote your changes.

If you’re in a shop where the developers are uninterested in any form of
communication, then all I can say is: Good Luck!

It’s in the developer’s best interests to work together so they will
likely comply even if the “standard” is unofficial between the
developers and not a company policy.

It sounds to me like you want a technological measure that will only ever allow
a single individual to change a given file. How about management organizing the
work load so they never assign a given file to more than one individual? If
that’s impossible, then sooner or later you’re going to be faced
with a situation where two of you need to make changes to the same code under
tight deadlines and you will have a choice: