- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Touché.
On the other hand, when you know not everyone else is as passionate, you still have a chance ;)
And, between "funny" and "interesting", I know which one I'll pick any day -- passion is great.
And if the ACID 'I' sounds uninteresting to you, some of your code surely deserves to stand atop the very frist comment ;)
Admin
Wikipedia is a huge asset, surely the main reason I think a good smartphone and 3G are good.
Look at the talk page for mysql, there is already something about that subject and clearly noone wants to see those updates made...
Admin
If one is not in any position to pick the tools one uses, then it would be prudent for any engineer to learn the limitations of the tool to ensure that none of those limits are exceeded. I will wholeheartedly agree: use of a particular language, tool or environment etc. it not in itself a WTF, but making non-robust tools available for easy use by non-technical personnel definitely is.
This discussion about MySQL is a prime example of this. Without knowing about the limitations on triggers, and without familiarising myself with the ACID compliance (DB admin is not within my main field of expertise), I would have been blissfully ignorant about all this.
However, knowing that more than 32 levels of trigger are a Bad Thing on MySQL, I am a wiser man.
Having said that, my intuition already informs me that 32 levels of trigger is probably a WTF however you cut it.
Admin
tl;dr it's not enough to provide the pieces, you need someone else to have completed the jigsaw.
Admin
And when there are merge conflicts, it does a 2-way diff (yours and the other branch), instead of a 3-way diff (adding in the common-ancestor revision) which sometimes makes it hard to figure out what changed without extra work.
Finally, git has little concept of revision history for individual files, preferring to work instead on the entire repo. So I can't easily get a list of the last 5 changes to a single file, or diff the current version against the previous version. I have written scripts to do this, but I don't think I should have to.
Admin
32 levels is MSSQL and no it is not necessarily a WTF to have them. (mysql is the other problem)
I do agree that I haven't yet found a good reason to model anything using trigger chains expanding further than 32, but it makes sense that there would be extremely complex systems for which the best logical model would make extensive use of triggers.
Admin
Perforce (sorry again for sounding like an ad) lets multiple users check out the same file at once. When submitting (i.e. "committing" in git terminology), the first one in has no issues. The others, when submitting are told that the file changed. They then issue a "resolve" command to merge the changes (using a 3-way diff to deal with conflicts) and re-submit once everything is merged satisfactorily.
So your sequence ends up as: Sync A. Sync B. A edits. B edits. Submit A. Submit B - generating error Sync B - informing B about changes that need to be resolved Resolve B - merging the diffs Submit B - which now succeeds
All this using a centralized server.
Git does the same thing, except that you get the errors and have to perform the merges at "push" time instead of at "commit" time.
The ability to have multiple people editing files at once is critical for any project of non-trivial scope, but the feature can be implemented using centralized servers as well as with distributed systems.
Admin
Looks like you read the page. It's all a matter of subject knowledge:
There is no jigsaw, the information is right there without any modification IF you know the subject.
Admin
The same prof also recommended learning either vi or emacs. That was a great course.
Admin
This reminds me that "The only numbers that make sense are zero, one, and infinity." I can't remember where I first heard it, but I found a reference:
http://www.catb.org/jargon/html/Z/Zero-One-Infinity-Rule.html
Gee, I guess URLs really do make the system think it's spam.
Admin
Robert Ainsley: Bluff Your Way In Maths (a.k.a. The Bluffer's Guide to Maths): "You will be expected to be something of a professional mathematician at university, and you should choose your image accordingly. There are three sharply defined groups of university mathematicians which we will number 0, 1 and \infty (the numbers 2 and 3 do not, of course, exist in university mathematics)."
Admin
O worked in one shop where the code was label prog.old, prog.new, prog.bad. The really hard part was finding the correlation between source and binaries. I instituted simple version control ( whatever came native in Unix, don't remember what is was ) and life became sane.
Admin
Admin
Great article... please post some more on various software engineering topics :)
However i got some serious questions.
Can anyone give me a good example where "Branching by Rule" would feel like the right thing to do? I can only come up with "Branching by Exception" examples.
The author seems to dislike distributed source control a little but i had one scenario in the past where i wished i had it and i would like to hear your thoughts. Let's assume i'm on the train (no internet connection) and i want to work on two tickets. I got all the code and environment set up on my laptop so i'm good to go.
With a distributed source control system i would finish the first ticket and commit it locally with some appropriate meta information to close the ticket too.
With a traditional source control system i can either fix both tickets together and commit them together or i could create two branches in advance one for each ticket just to avoid mixing those two together which seems like alot of overhead if they are just small bugfixes.
What are your thoughts on that? How would you approach this situation?
Admin
Admin
Admin
You are correct about git having little concept of individual files. The upside is that it makes it easy to follow code that is moved around between files. This does not however make it hard to follow individual files. Are you are running an ancient version of git? It has been easy to track file changes for years.
Admin
As a rule of thumb, you should Branch By Rule when most of the releases are considered exceptional under Branch by Exception. There are a lot of scenarios for this, but here's one: 50 developers split into 6 teams that maintain a large, application that's released on a monthly basis. Each team would work on a feature that's planned for a release 2-, 3-, 4-, 5-, or 6-months out.
I'm more frustrated by the buzz and excitement about it. The "delayed merging" and "easy shelving" has existed in propietary systems (Perforce, Accurev, etc), and could have easily been added to Subversion clients.
Heck, Subversion could have even added the one benefit of distributed systems (offline history viewing), but instead, we just started from scratch again with Git/Mercurial/etc.
It's like sea mammals: one step forward (underwater, woo hoo!), several steps back (no gills).
Admin
For viewing the last 5 changes to a specific file, try git log -n 5 -p filename.txt
Admin
I agree that developers dont know SQL, and that mysql isam is not ACID.
But access is not bad, its only a tiny database.
Except that outlook uses access (its a variant of blue jet that access use), and it work good (when you dont have more than 2GB database of craper emails, then you need exchange).
Also, the windows instaler uses access to install the entire windows, office, and visual studio, and whatever uses msi installer, uses the red jet, its a variant of blue jet.
Access (JET) is full ACID compliant, except when you have more than +-512 locks (limited by filesystem), it will broke. It suports SQL also. Crap is what people has done with it. partly because classic asp and "webdevelopers" that think they can use a database, these people ruins everthing to shit.
People like to blame thinks that they dont know. I use JET to store temporary transactions when my (of my client) central sql server goes off-line because of lan/net problems (cheapo equipment, and eletromagnetic interference). For this purpose its is very god at it.
I agree also that JET is useless for most softwares, because its so simple and limited. But you cannot consider a knife to be a worse thing if you need to cut a tree.
Sorry, my english is poor, its not my native.
Admin
By "documentation" in the context of "what ought to be stored in the document version control system", we are talking about standalone documents, which are written either by or for the customer, which define what the application is supposed to do in the first place. It consists of things like invitation to tender, project initiation documents, purchase agreements, project plans, records of meeting minutes, technical architecture documents, business requirements, technical requirements, migration strategies, UAT strategies, and so on.
I would be prepared to agree that writing it in Word (and Excel) is "wrong. Way wrong" except that in order to be able to do business with our potential customers at all we need to be able to generate and receive documentation in such a format as the customer is prepared to work with. In every single project in which I have been involved, at least some documentation is written using Word and Excel.
Nasty as this is, it is a business truth which is ultimately futile to try and circumvent.
Here endeth the lesson.
Admin
No, seriously Access IS a WTF, it has numerous fails and you just said it's not acid compliant either, it's under windows (lol ?? windows server is a WTF too) and you have numerous less limited alternatives.
Admin
Admin
Fixing old systems is not the Open Source Way. Start by assuming everything made before now is utterly compromised and kludged by well meaning but clueless engineers trying to fix fundamental problems that simply can't go away without rearchitecting.
Sometimes it is even true.
Gills are awesome if you're not endothermic. Otherwise, they're a bit like running your blood supply through a pair of bloody great heatsinks.
Tuna and sharks and probably other species have some sort of awful hack in the form of clever heat exchangers that let them have a body temperature a couple of degrees above ambient (which enables them to be a bit more energetic than other species) but it isn't going to be any more than a half-arsed attempt at fixing a fundamental problem with the architecture ;-)
Sea mammals on the other hand get to be quite adaptable to a range of temperatures and environments, they can be very effective predators and they get to have penetrative sex. That's a bit of a killer app, as I'm sure you'll agree.
Admin
You could ask yourself what would Wally do? Wally would do nothing other than write status reports for 18 months. Or you could do what a friend did back in the day, write status reports while working a contract job under their noses (Double Tap).
Admin
Alright you win ... damn OSX. Is there really anything that could compete with it ??
Admin
Looking back on it, I think the reason I stuck with it so long was that I was actually enjoying the challenge, and it appeared at the time to be an opportunity to add some proper quality. Unfortunately that sort of relentlessness eventually takes its toll and you change your attitude towards it.
Admin
Wouldn't it be great to have a place where the Git/Maven/Hibernate/you name it fanboys would not pollute everything with their belief confessions?
Lack of meaning in your work? Finally something you feel you are ahead with?
That alone make me dislike Git (not too mention its terrible user interface, the lack of handling empty folders, partial checkouts, and pushes,... )
Admin
I've worked on both proprietary and open-source projects, and I've had to submit patches to someone else and hope they're ultimately included in the shipping product (and fix them and resubmit if they're rejected) in both cases. It's called code review, and proprietary developers do it too.
The main difference between open-source and proprietary development that I've seen is that proprietary products have multiple standards for quality and use different standards on different branches in the same SCM repo. If a customer is paying for an ugly hack, they may get such a hack in their branch, while the same patch might be rejected by the main product team--but that's just like any patch for an open-source project that gets shipped in a product somewhere, but isn't merged upstream.
It's possible to set up a DVCS as a drop-in replacement for a non-distributed SCM, but doing so wastes the opportunity to do process flow improvements that DVCS can enable. Since a DVCS 4th-dimension object can physically live anywhere, there's no reason why integration, build, QA, production, custom development services, and major product revision branches can't have their own repos with stars of users around them--and plenty of reasons why they shouldn't all necessarily share one giant churning burning repo, no matter what SCM you're using.
No one should start a new project on SVN today. Subversion doesn't just need a central server with excellent network connectivity--it needs a central server 150 to 200 times the size of the equivalent git server for program source code, and that server needs a low-latency network link to its users as well as a high-bandwidth one. If you have a large product, that kind of waste puts stress on every system near it, from storage to backups to IT hardware budgets to network operations staff.
Admin
Isn't it advisable to avoid shiny-new-toy syndrome when it comes to source and revision control?
Admin
The distributed systems preserve individual local changes because each person works with a local copy. Effectively, every client is a separate "shelf" branch.
A centralized system can do the exact same thing if every developer creates his own private branch. He can periodically merge the parent into his branch, similar to a "git pull", commit his changes to his branch without conflict, and then merge his changes back to the parent, resolving conflicts, similar to a "git push".
Same functionality, different command sequence. This applies equally well to any VCS that allows developers to easily create/merge branches at will, whether they are distributed or centralized.
Admin
WRT viewing changes, what I'd like to do is what I frequently did with Perforce. Over there, I could type "p4 diff foo#4" and it would show me the diffs between the current version and the fourth commit on the current branch.
"git log -n 5" shows me the most recent five commits, but not the diffs.
I wrote a perl script to give me the functionality I like. My "gitediff" script allows me to type "gitediff foo.c#-5" which will copy the fifth-most-recent commit to a temporary file, launch emacs with that and the current file, and start an "ediff" to let me compare them.
The script for this was not hard to write, but it wasn't trivial either. It does a "git log" to get the commits for a file, and numbers them. Then it counts the number of edits provided as an argument to get the commit ID string for that revision, then does a "git show" to extract the file before handing it off to emacs.
It's about a 230 line script for producing all kinds of diffs using git:
gitediff foo - compare foo against the latest committed version (HEAD)
gitediff foo#<ver> - compare foo against a specified version
gitediff foo#<ver1>#<ver2> - compare two revisions of foo
where <ver> may be either an integer - representing a sequential commit on the current branch, or a negative integer - representing the most recent "nth" version, or a git commit string.
I had to write the logic for this because the built-in syntax is repo-based instead of file-based. For example, HEAD~5 shows the file as it was in the fifth-most-recent commit, even if the file in question didn't change since then. In contrast #-5 (in my script's syntax) represents the fifth-most-recent change to the specified file, even if that change took place hundreds of commits ago.
If people are interested, I can post this script for others to enjoy. Or maybe people can point out an easier approach to the problem.
Admin
Isn't it advisable to always avoid the shiny-new-toy syndrome unless there is some justifiable benefit excluding "it's new" and "it's shiny" ;). Guess that's why i'm still happy with xp. With CVS->SVN there was some real benefit. With SVN->GIT i guess it depends on the project.
Admin
In other words, you can write Fortran in any language.
Admin
Except COBOL, which of course isn't powerful enough.
Admin
Which I suppose is part of what your script does. So you're right, git doesn't provide the best tools for that sort of thing.
Admin
merge.conflictstyle
config variable to "diff3", or rungit checkout --conflict=diff3 file
. You can: `git log file`, `git diff HEAD^! -- file` (see git-log manpage for details on history simplification wrt former).Admin
Are you being deliberately dense? It truly isn't the same thing.
You do not have to do that merge. It's possible to have multiple anonymous branches (at least with mercurial, and I'd assume for most others, too).
Yes, it is possible to get the same end result with a lot more work by the users, and assuming that they always follow this pattern. But that's the problem. No one really does (it's just not the way humans function). It's a case of a tool making a common problem easier to solve. So far, I'm not aware of a centralized VCS that does it.Admin
TRWTF is "WTF is this article doing on the TDWTF?"
Admin
Admin
In short: using feature branches allows you to select which features to include in next release, and which are to be postponed.
"Delayed merging" and "easy shelving" is only a subset of workflows that DVCS allow.Also Subversion made some design decisions which cannot work in distributed system, like global revision numbering (requires central numbering authority), and some bad design decisions, like "branch / tag is copy" (following Perforce AFAIK)... which makes branch deletion and merging complicated, and tags next to useless.
Starting from scratch (like in case of Git) was the only sensible choice.
Admin
I don't know what you meant by ", and pushes,..." there.
Admin
It is not the same thing, as you are not forced to push after each one commit.
Or how will centralized system solve this: I am far away from workplace (maybe on my vacation in other country) with my NB set up, but without (reliable/usable/any) internet connection. There is a big problem with deadline soon after my leave ends, so there is no time to solve it AFTER return to work, but there is a time to connect to company net before that deadline.
The problem consist of couple small unrelated subproblems.
With git I would simply make a branch for every such subproblem, work in the branch, make a lot of commits, evetually even merge all those branches together in the end. Then after return to work, I would just merge master from server, resolve conflicts (if any) and push back - maybe only seconds of work.
With centralized VCS I would probabelly be stuck on the same start with making all those branches, not talking about unability to commit in those branches. (and to eventually undone some bad decisions as VCS allow, when it works).
Just because of missing connection I am effectivelly losing better half of the functionality of VCS on centralized systems.
Admin
Your distribution is simply creating extra branches behind the scenes. There are no semantic differences.
You talk about your git solution being to create a bunch of branches for your tasks. Centralized systems all allow this. I do it all the time. And when you're done with a branch, you merge it back to the parent, which will make you resolve conflicts.
As for "not forced to push after each commit", why does that change antying? The server maintains all the branches (including the ones you create while working). It won't conflict with anything else unless others start working with your branches. The only potential advantage here is not needing the network bandwidth at commit time.
You seem to be hung up on the fact that some centralized systems make it difficult to operate with hundreds or thousands of branches in flight at once. I know that some of the most popular free ones (like CVS) fall over and die under those circumstances, but that's a problem with specific products, not with the concept of a central server.
Distribution lets people commit changes while disconnected from the network, and this is useful for many applications, but it doesn't create any other capabilities.
Admin
And I can create how many branches I want and do not polute the shared system with them.
But only if you have good connection Only if I am online. While in DVCS it simply does not conflict, regardless on what others do or do not. Which allows me to commit as often as I need, whithout caring about resolving some conflict. And modify as much files as I need without making problems to all others. Also the problem with concept is the connectivity, the space wasted on server and the difficulty of arranging safe cooperation of many developers working at the same project at one time It also allows people to share the changes in more ways, that are possible (or acceptable) in centralized VCS.Some things can be "emulated" in centralized VCS with a lot of unnecessary work, but usually the centralised VCS are ment to solve different and restricted problem.
Admin
Lets say (as happened to me) that there are three programmers working on one system. Then they deside to part, so two will continue on the system and the third will fork the system as different project. They diveded the company they formed and went away.
In DVCS the third simply removed one line of his configuration and was free.
In VCS the third should setup new server (including the need for HW to run it), copy over the full project with all history and then change the configuration to the new server.
But lets continue: then the second parted with the first and had to undergo the same task.
But later the second and third formed another pact and wanted to continue developing together, while keeping their respective history.
In DVCS it just needed one address to configuration and that was all for the setup. I do not know, how to manage that simply in centralized VCS.
Admin
There is a built-in diff-tool in MS Word (since it can/could do versioning on its own), so if your versioning system supports calling third-party diff-tools, it shouldn't be any problem having the document in source control.
Admin
666000 - using Excel as a database.
Admin
This is quite possibly the most ridiculous argument in favor of DVCS I've heard to date. DVCS saves a few hours off of the untold hours needed to dissolve a business?
If this is your workflow, then you're not developing software. You're hacking.
There's nothing wrong with hacking, but it's a different world than commercial software development.
Admin
If I remember correctly, then parting the company took less effort, than to setup SVN archive. A less working time too.
But the point was not leaving company, the point was easy forking and merging projects. Could happen even without company to start with :)