Programming for the iPhone with a partner far away? - iphone

How can I program for the iPhone with my friend who lives very far away? After I fix something, do I have to send the whole thing over to him and again and again and again? Any ideas?
Thank you! :)

You some kind of version control system (Subversion, GIT or whatever) that will help you easily merge your changes.
If you change something your friend will just update his sources and will see your changes and vice versa. Using version control is also a good idea if you are the only programmer in the project as you can always easily revert your changes, always have the full history etc.

Use a SCM(Source Code Management) system. XCode has support for CVS and/or SubVersion, so you could set that up.

The minimum requirement is to make your code available from both sides and find a way to prevent conflicts. This is achieved with a SCM server. I have already successfully tried code.google.com and www.beanstalkapp.com with Xcode, but many others exist.
Moreover, you may need an issue tracking server. My personal choice is www.lighthouseapp.com which integrates with www.beanstalkapp.com. Also here many alternatives are available.
Finally, don't forget basic communication with phone and e-mail.

Use GitHub. They have excellent documentation and git is nice to work with for distributed work.

As others have mentioned, a Version Control System, I prefer git, but subversion will also work, and some form of communication. I'm sure you already have e-mail, and instant messaging might work, but I've found that communicating through some form of VOIP software increases productivity, such as Skype.

+1 for http://www.beanstalkapp.com, with http://www.versionsapp.com for posting and getting updates.

Related

Which version control systems will allow only one user to work on a file at a time?

I'd like it so when I check out a file no one else can edit it until I check it back in. Is there a version control system that allows me to do this? I currently use Subversion and I know it has the 'lock' feature but I want it to do that automatically without me having to request it on each file I'm working on.
You can do it in subversion. I'd recommend that you dont and instead learn how to merge. Here's some more information:
http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
There are lots of them.
Source Safe is notorious for not working any other way.
Serena Dimensions can be configured that way.
TFS will allow you to do an exclusive checkout.
Most source control systems will allow you to do this, some are built that way, other have the functionality in case it is needed.
However, if you are working in a team, doing this will only hurt progress. Being able to have many people work on the same file at one time is not only a time saver but is more efficient use of resources and speeds work along. You should only use exclusive lock in special circumstances, where you really can't have anyone else work on the file.
CVS
Clearcase
--
Typically modern VCSs seem to deprecate the lock model of development, preferring a merge model.
edit: SVN merging is - in my opinion - broken. Once you've used ClearCase/Mercurial/git merging... you'll learn that fast. :)
The old IBM "CMVC" tool works that way, I think. It makes me feel uncomfortable and vaguely sad to think about that however.
Peforce does something close.
Microsoft SourceSafe (yuck).
RCS uses locks as the main approach to managing edits. You check out the file, and if you intend to edit it, you lock it. You can force an override on someone else's lock, but if you do, you clobber their changes. See for example this best-practices discussion for more info.

Version control system for a small laboratory?

I'm a grad student in Electrical Engineering, and my lab has various projects related to ultrasonics. We have lots of code to perform simulations, but right now our situation is such that any given script has ~5 different versions. In addition, one person might develop code to simulate wave propagation, while another needs that code to perform a different simulation. This results in code being emailed back and forth quite a bit.
I suggested version control to my advisor, and she says that she likes it, but doesn't have time to manage a VCS, so it would have to be set up in such a way as to require as little maintenance as possible. Obviously, we're not releasing software to the public, so it doesn't matter if the internal structure is unconventional.
Most of the lab are not professional coders, but we all need to write MATLAB code as well as some other stuff. So, I don't expect the users to be so good about clean commits and the like, so it would be good for everyone to have their own "workplace" or something like that. But to be honest, I've only ever used version control for 3 people at once, so I'm not sure how to set this up.
So I am asking what is the best way to do this. I have only used Subversion, but I wonder if that is the right choice. We need a system that would (sorted by importance, descending):
require little maintenance
be easy to use and learn, since not everyone has used version control
have shell integration (we all use Windows XP)
be easy to set permissions and give everyone their own workspace
be easy to set up and get running
So, (1) What VCS is the best choice, and (2) how should we structure it. Thanks for the help.
We use subversion and love it, for its simplicity, easy of use, integration into the shell environment and the ability to not just version, code, but also specification documents pdf's and other resources we have.
As for structuring it, try and use your logical structure, as close as possible. Keep it simple :)
I see no reason why you should look further from Subversion. Although, for extra little maintenance you could check GitHub (since it is hosted solution, so no worrying about backup, servers etc) but there are hosted Subversion repos as well.
Especially if you're already familiar with it, so you can bring others up to speed and get extra credit :)
Once completely setup subversion should require very little maintenance, it's model is simple to apprehend, it is integrated in the shell, it supports ACLs which work just fine and it's setup is well documented.
you can setup subversion in a webserver, integrate it with a windows domain for auth if needed (otherwise you have to add/remove users, change passwords on the svn server)
You could also go the distributed vcs way, with hosted solutions no server setup, but to get that across your user's mind is gonna be way more difficult than svn. Not to mention getting it across your own head first.
Unless you have complex, fast-paced, parallel development models, I wouldn't recommend dvcs, I would stick to SVN
I agree that subversion is a very good choice.
But you can also consider mercurial: it's easier and it also has a tortoise integrated interface.
I would recommend www.assembla.com. They offer paid subscriptions but for academic projects you can apply for a free pro account.
I have used it for my academic projects and was 100% satisfied by the ease of maintenance, up-time and simplicity
The far easiest way is to use Subversion. But to get it to work the most easiest way (under Windows) you should definitely use TortoiseSVN.
After installation it works right within the explorer is just one right click away from usage. Maybe one of your guys should take a deeper look into the whole documentation to give help if needed. All other guys should take a look into the Daily Usage Guide for a first start.
Also you should take care about how you structure your repository!
Subversion has too many limitations related to the "always online + central server" model.
I would strongly recommend using a distributed version control system.
From the three main ones Git, Mercurial, Bazaar; in my experience Bazaar is by far the easiest one to use and setup.

How should we tackle a big change in our application?

We have this huge application that has 18 projects in our source control (VSS).
Whenever we are working on small changes everything is fine because each developer has a set of a few files checked out to himself, and hopefully no one is going to need them until they are checked in (in about 4 to 8 hours).
But when we want to work on big changes a developer keeps so many files checked out for some days and make it hard for others to do their assigned tasks.
Here's a scenario for example:
Last week we wanted to implement a feature that will fetch every list in our application using a paging mechanism. Therefore we should change the UI, business and data access layers.
There's a developer assigned to this task, she's checked out a lot of files, and she's blocking other tasks.
How should we plan to develop these kind of features?
Switch to a better Version Control System. VSS suffers from design issues and its hard lock principles. Subversion is available for free and can be used for large scale application development. Branching and tagging are cheap operations and there is no hard lock.
Your company will definitively live better with Subversion. Try it out!
Server Easy to setup on what system ever (Windows/Linux)
TortoiseSVN Client for Windows that integrates within Windows Explorer
SVN Manual Read at least the first few chapters
There are many other alternatives but VSS is a pain in large scale development. As there is a better free solution available, why stick to a vendor?
If upgrading to a real VCS isn't an option right now, have the person doing the major feature download a local copy of everything and then make his changes outside of version control. Merge it all at once (over a weekend or something in case it gets complicated).
This doesn't help the developer who will need version control while making the "big changes"
Well, you do what you gotta do with the tools you've got. He could always install a modern VCS like git which works locally. Just check the entire baseline into git (minus history) and go.
VSS sucks, migrate to a real SCM, microsoft will probably help you seamlessly upgrade to TFS which doesn't have this problem. Or migrate to any one of FOSS SCMs like subversion, but the transition will probably be harder (but may be cheaper).
Have you considered sharing and branching? Also, you can allow multiple checkouts with users who have experience. In your case of making a large application change, I suggest labeling then creating a branch. If something happens to "big changes", you will not the production version. You can make your quick fixes in the released code then merge them into "big changes" once it is ready. Check the help topic "Sharing and Branching".
Use a version control system that works in merge mode (optimistic), not in lock mode.
Merge mode is optimistic is that it assumes changes will usually not be made in the same place. If it happens in the same place then it is usally easy to resolve.
An example of a version control system that can work in merge mode is CVS. It is outdated now, but others exist.
SVN is the answer to your problems. I have used it and its a breeze to learn/work with it. But there are a few new kids on the block. Try GIT. I have been hearing a lot about it althought havent had a chance to try it
VSS is just an old story, we use Subversion (server) and TortoiseSVN (client) now. (That's just based on our preference)
By the way, migrating to other version control / source control - only - will not solve your team issue. The problem is about communication. If she can't communicate with the others and stay with her habit (working with a lot of files without checking them in), she will put your team down, you must let her know how to work with team using version control. If not, she will put you into "Merge" problems when using Subversion. ^^
You already got the advice about changing to a usable VCS.
Above that, you and the developers should train to break the big changes into smaller ones. I'd consider about 10 commits per day and full time developer a normal rate. It makes the locks much less painful.
The principle should be: make the smallest possible change that brings you toward your desired state and works (as in the software compiles and passes all tests).
In the case you sketched out. Adding a parameter to one layer, and changing all calls to that layer (possibly with a dummy value) would be one change. Actually using that value, would be another change.
This should result in much less files locked for a much shorter period.
Long-term, you'll want to migrate to another VCS. As others have mentioned, consider either open source or TFS if you want to stick with MS. (We use TFS, but I'm not going to sing its praises - it's OK.) As AMissico mentioned, branching will help with any VCS that supports it. Learning to use branching effectively is not trivial, and will require study and/or training.
Continuous Integration will also help. TeamCity is what we use, and it's relatively simple to set up. See FeatureBranch.

Git client on the iPhone, possible? How?

Is it possible to embed git in the iPhone app? Only in a passive mode, i.e. to be able to read commit messages (with date and user) and diffs given some online git repository in order to present it in some readable table views?
I'm one of the co-authors of cocoagit, which is currently an unfinished implementation of the core git functionality in Objective-C. There has not been much activity in the last 6 months. Unfortunately, it is not far quite far enough along to do everything you need. We can read commits, and have preliminary support for cloning repos, but we can't do diffs yet. Geoff and I would both like to have more time to work on it again, but in the meantime, we would gladly welcome any contributions.
Alternatively, I second the recommendations of previous posters to consider using github, or building your own web service to provide the necessary data.
Git (the command-line client) has been ported to jailbroken iPhones.
It would be easier to write a webapp that generated iPhone specific formatted output. Anything is possible on the iPhone, but to get an App on it you have to pay the $99 to join the club and then run the gauntlet of the Approval Process. A web app doesn't have to be approved by anyone.
It would be possible if you could statically compile the required git functions into your executable. It would require cloning the repository to the device’s disk though.
I’m not sure what your use-case is, but using a hosted website such as GitHub, or making your own web service if that is not possible, would likely be more sensible.
Not sure if this github client for iphone would offer any pointers
http://github.com/schacon/igithub/
It is definitely possible. The BugBranch app does this. According to the about section of the app, it uses libgit2 and objective-git.
You've got a couple options:
1) Get git(1) cross compiling for ARM and the iPhone and then embed them.
2) Use Dulwich and write a small tool you can drive with NSTask that does what you need (don't link your code directly to this or copy their implementation -- it's GPL). This is likely easier than option 1.
3) Write a web server which does what you need and then have your iPhone client access this.
It really depends on what you're doing, why you're doing it, and what infrastructure you've already got set up which option will be the best. For instance, if you already have any sort of server component already (e.g. for push notifications) I would recommend option 3.

Expression Web Source Control Integration?

Does anyone know if Expression Web (and Blend, for that matter) has any form of direct integration with source control?
Right now that's about the only real downside we've discovered in a couple days of using it. But it's a big downside.
Quick edit:
Yes, we're currently using the demon spawn Source Safe. (For the record, with the size team and projects we're doing, it actually does suffice and has caused us no pain outside of the occasional build hiccup from lack of transacted check-ins.) However, I don't care a whit about Source Safe itself -- I'm trying to find out if there's any way to get the Expression products to integrate with ANY source control system, whether it be Team Foundation Server, Subversion, ANYTHING. (And yes, we are looking to move away from VSS eventually. If only to stop other Stack'ers from laughing at us. :) )
Yes, there is now TFS integreation available for Blend 3: http://blogs.msdn.com/unnir/archive/2009/03/17/team-foundation-server-support-in-blend-3.aspx
I tried to bear with you.....but I just can't do it! I think the time has probably come for you to unshackle yourselves from sourcesafe!
Install subversion, and life will be all good again.