Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Shachar Shemesh

Tzafrir Cohen wrote:


I'm not sure I agree with you regarding version control systems.

Specifically distributed version control systems make the common case of
a repository for the project simple. Unlike Subversion, you don't need
to set up a separate server.

  
You do not need to set up a separate server in subversion. svnadmin 
create ~/svn ; svn co file:///home/sun/svn is enough.

And it saves you a whole lot of time in saving ex1.c_1 , ex1.c_2,
ex.c.orig and such.
Has anyone compared git's performance with file:// based svn? I'm not 
sure that claim holds.

 I think that demonstarting simple linear workflow
(no branches, no remote repositories) with git, bzr or hg could be handy.

  
Guy has already responded with some shooting yourself in the foot, but 
I'll elaborate. Git makes it exceedingly easy to reach situations in 
which information is either actually lost, or is not technically lost, 
but is unreachable without searching in internal log files. The most 
problematic one to chance upon by accident is off branch commits (where 
you revert to an old version, make changes and commit them by mistake). 
I read somewhere an explanation of how to recover from this situation. 
It started by explaining how lucky he was to have spotted that that was 
what he did before he checked out another branch (if you do, the only 
way to find your commits is the afore mentioned internal log files). He 
then goes on to list the steps required to recover the file, and ends 
with viola! it's like magic, with a footnote stating that like magic 
means it is a list of arbitrary and hard to remember incantations in 
which getting the slightest thing wrong means a catastrophe.


At least the other case, where data is actually lost, is unlikely to get 
at if you only work with one repository[1].


In short, I'm with Guy on this one. Git is an extremely powerful tool, 
but it is only useful once you master the right way to tread and where. 
In other words - not a good choice for a novice[2].


Shachar

1
The rebase operation actually changes the history. After a branch 
rebase, the tree is reworked to look as if the branch has always 
branched off the new rebase point. This means that the precise tree 
layout before the rebase operation is no longer reachable. It is no 
longer possible to check out the version that compiled fine before the 
rebase.


I don't remember the precise details at the moment to say whether every 
rebase is like that, or whether it's only sometimes. I will say that, in 
my book, a version control that allows an operation that is not undoable 
is not a version control.


As I write this, it occures to me that this may actually be the precise 
same problem as the one I pointed above, and the previous end point for 
the branch is still in the repository, it just doesn't have a name, and 
if you know the commit's name, you can still check it out. That does not 
change my above statement - it is a no-no for a version control system.


2
In my opinion, also not a good choice for anyone who relies on 
centralized backups (like a commercial company), not a good choice for 
anyone who does not perform multi-commiters multi-versions development. 
In other words, there are very few cases, aside from the Linux kernel 
itself, where it IS a good choice. Also, I often find where even where 
it is a good choice (such as Wine, where an off trunk personal 
development branch might be long and convulted), it is not used properly 
(the development model does not support a git pull and multi commiters 
- only patch sending).


In the android case, it is the best choice available (multiple 
repositories, independently developed in parallel, with partial code 
sharing between them), but has significant drawbacks (no support for 
multiple repository checkouts, no support for partial tree checkouts) 
which are worked around with a wrapper tool.


--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Shachar Shemesh

Vadim Eisenberg wrote:


 Eclipse doesn't belong to the right tools, in my opinion.

 

Why Eclipse doesn't belong to the right tools ? My naïve 
understanding is that Eclipse is Emacs of the 21-st century – it is 
open source, customizable etc., similar to Emacs; in addition to being 
graphical.


Thank you! I was wondering why I hated Eclipse so much, and you have put 
your finger on it. It's exactly like a 21-st century Emacs.


Shachar

p.s.
I'm not so sure it is a bad idea to teach Eclipse. I think it's worth 
mentioning that eclipse exists, but to just point them in the right 
direction, and then teach the basics.


--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


[Haifux] OT: yes, I do want duplicates

2009-10-16 Thread Tzafrir Cohen
Slightly off-topic, but:

I noticed that messages from the recent discussion were only coming into
my INBOX and not into my haifux folder.

Fix: logging into the mailman web interface and setting Avoid duplicate
copies of messages? to No.

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Vadim Eisenberg
guy keren wrote:
 you can mention memory leaks if you want - but students don't care about them 
 so much, because it doesn't break their programs.

Starting from the Winter 2008-2009 semester, the memory leaks are checked in 
Matam (Introduction to Systems Programming) course and 1 point is reduced for 
each leak. The check is done automatically, using, guess what, valgrind. So the 
students in Matam actually care very much about the memory leaks.

Vadim

-Original Message-
From: haifux-boun...@haifux.org [mailto:haifux-boun...@haifux.org] On Behalf Of 
guy keren
Sent: Friday, October 16, 2009 9:47 AM
To: Eli Billauer
Cc: Haifa Linux Club
Subject: Re: [Haifux] [W2L] Call for lecturer + Linux guru

Eli Billauer wrote:
 guy keren wrote:
 

 what - no valgrind?

 I stand corrected. A quick demonstration of valgrind (show how it 
 detects memory leaks and access to unallocated/uninitialized memory) 
 is in place. It's definitely something handy for a student, and it's 
 so simple to use.
 
   Eli
 

i think the best demo for valgrind would be:

1. this step should be done at home: write a program that has a non-obvious 
problem with corrupting its memory (make sure that when you run it, it actually 
crashes)

2. the next steps will be done during the demonstration: show it to the people 
(the source, how the program crashes, and how you fail to find the problem even 
when the crash is done inside gdb)

3. show them how you find the bug within seconds using valgrind.

you can mention memory leaks if you want - but students don't care about them 
so much, because it doesn't break their programs. they do care about memory 
corruption if it indeed causes their program to crash.

--guy
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread boazg
it seems that on t2 (now called stud) you can use not only file:/// but also
svn+ssh://, with only a student account. in that case i agree that
subversion is much better than git for this purpose.

as for the question of why do you need version control for something as
simple as MATAM, it really makes a huge difference from my experience. it
saves alot of the ok i did this now you do this and the crap we messed up
let's hope there's a backup of this in my inbox and lets you focus on the
work. while some students may be skeptical, this IMHO will become a killer
app and a must for many students and may give us an upper hand.

On Fri, Oct 16, 2009 at 10:05, Vadim Eisenberg vadim.eisenb...@gmail.comwrote:

 guy keren wrote:
  you can mention memory leaks if you want - but students don't care about
 them so much, because it doesn't break their programs.

 Starting from the Winter 2008-2009 semester, the memory leaks are checked
 in Matam (Introduction to Systems Programming) course and 1 point is reduced
 for each leak. The check is done automatically, using, guess what, valgrind.
 So the students in Matam actually care very much about the memory leaks.

 Vadim

 -Original Message-
 From: haifux-boun...@haifux.org [mailto:haifux-boun...@haifux.org] On
 Behalf Of guy keren
 Sent: Friday, October 16, 2009 9:47 AM
 To: Eli Billauer
 Cc: Haifa Linux Club
 Subject: Re: [Haifux] [W2L] Call for lecturer + Linux guru

 Eli Billauer wrote:
  guy keren wrote:
 
 
  what - no valgrind?
 
  I stand corrected. A quick demonstration of valgrind (show how it
  detects memory leaks and access to unallocated/uninitialized memory)
  is in place. It's definitely something handy for a student, and it's
  so simple to use.
 
Eli
 

 i think the best demo for valgrind would be:

 1. this step should be done at home: write a program that has a non-obvious
 problem with corrupting its memory (make sure that when you run it, it
 actually crashes)

 2. the next steps will be done during the demonstration: show it to the
 people (the source, how the program crashes, and how you fail to find the
 problem even when the crash is done inside gdb)

 3. show them how you find the bug within seconds using valgrind.

 you can mention memory leaks if you want - but students don't care about
 them so much, because it doesn't break their programs. they do care about
 memory corruption if it indeed causes their program to crash.

 --guy
 ___
 Haifux mailing list
 Haifux@haifux.org
 http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux

 ___
 Haifux mailing list
 Haifux@haifux.org
 http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux




-- 

Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html  -
If God had wanted man to play soccer, he wouldn't have given us arms.
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Doron Tal
I tend to agree that git is somewhat complex for the novice. It takes awhile
before one feels comfortable working with git. SCMs in general, are not
considered
core learning material, so most student will prefer to avoid wasting
their
time to earn the required expertise.

Having said that, for the experienced git users, there is not reason to lose
their work, even in the case of some mistake.
For example, most problems can be recovered using:
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#recovering-lost-changes

Another, less powerful tool, but good enough for immediate disaster recovery
is the ORIG_HEAD reference.

--doron

On Thu, Oct 15, 2009 at 11:38 PM, guy keren c...@actcom.co.il wrote:


 the problem with git, is that it's very easy to shoot yourself in the
 foot. giving it to students, who might accidentally reset their
 repository into losing their code, is not a very good idea, if you don't
 have time to give a proper explanation plus warnings.

 --guy

 Tzafrir Cohen wrote:
  On Thu, Oct 15, 2009 at 09:13:58PM +0200, Eli Billauer wrote:
  OK, I think this is a good time to express my view regarding the
  Development tools lecture. It's purpose, as I see it, is to give the
  students a nice start with the right tools for developing code, as
  needed for their exercises. If their experience is good, they'll stay.
  If not, they'll soon use the alternatives.
 
 
  If you want to give a lecture about any other subject, as a
  Stay-in-Linux or mainstream lecture, by all means come forward. But
  let's try to get some focus on the initial lecture.
 
 
  Correct me if I'm wrong, but a student is not likely to go beyond a
  project which runs on a single platform, having a few source files, and
  with no more than two or three persons involved. Hence autotools are
  irrelevant, and so are version control systems. Tarballing all sources,
  and sending to your partner with comments, is as much version control as
  you need in these situations.
 
  I'm not sure I agree with you regarding version control systems.
 
  Specifically distributed version control systems make the common case of
  a repository for the project simple. Unlike Subversion, you don't need
  to set up a separate server.
 
  And it saves you a whole lot of time in saving ex1.c_1 , ex1.c_2,
  ex.c.orig and such. I think that demonstarting simple linear workflow
  (no branches, no remote repositories) with git, bzr or hg could be handy.
 

 ___
 Haifux mailing list
 Haifux@haifux.org
 http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Ohad Lutzky
I tend to disagree about git being too complex. I currently have three
students (in a military setting), which have never used any form of version
control before, and have been taught basic usage of git - init, add, commit,
log, diff, remote, and pull. I've received no complaints as of yet. As long
as you're not doing rebases or working with multiple branches (which are
much more complicated to do in SVN, and useless in the situation at any
rate), the data loss problems mentioned above don't exist. Git gives the
added bonus of being able to work offline, which is indispensable for a
student on a laptop.
-- 
Man is the only animal that laughs and weeps, for he is the only animal that
is struck with the difference between what things are and what they ought to
be.
- William Hazlitt

Ohad Lutzky
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Tzafrir Cohen
On Fri, Oct 16, 2009 at 10:05:14AM +0200, Vadim Eisenberg wrote:
 guy keren wrote:
  you can mention memory leaks if you want - but students don't care about 
  them so much, because it doesn't break their programs.
 
 Starting from the Winter 2008-2009 semester, the memory leaks are 
 checked in Matam (Introduction to Systems Programming) course and 1 
 point is reduced for each leak. The check is done automatically, 
 using, guess what, valgrind. So the students in Matam actually care
 very much about the memory leaks.

... which are detectable by valgrind :-)

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Tzafrir Cohen
On Fri, Oct 16, 2009 at 01:35:09PM +0200, boazg wrote:
 it seems that on t2 (now called stud) you can use not only file:/// but also
 svn+ssh://, with only a student account. in that case i agree that
 subversion is much better than git for this purpose.

git works just as well with git-over-ssh repositories. Alternatively you
can also use the http method to provide a public repository off t2 from
your homepage :-)

(Just make sure to 'chown +x .git/hooks/post-update' At least here -
Debian Lenny - this makes a repository run the required
git-update-server-info)

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Orna Agmon Ben-Yehuda
How about a regular haifux slot, dedicated to source control applications wars?

On Fri, Oct 16, 2009 at 5:30 PM, Ohad Lutzky o...@lutzky.net wrote:
 I tend to disagree about git being too complex. I currently have three
 students (in a military setting), which have never used any form of version
 control before, and have been taught basic usage of git - init, add, commit,
 log, diff, remote, and pull. I've received no complaints as of yet. As long
 as you're not doing rebases or working with multiple branches (which are
 much more complicated to do in SVN, and useless in the situation at any
 rate), the data loss problems mentioned above don't exist. Git gives the
 added bonus of being able to work offline, which is indispensable for a
 student on a laptop.
 --
 Man is the only animal that laughs and weeps, for he is the only animal that
 is struck with the difference between what things are and what they ought to
 be.
 - William Hazlitt

 Ohad Lutzky

 ___
 Haifux mailing list
 Haifux@haifux.org
 http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Shachar Shemesh

Doron Tal wrote:


Having said that, for the experienced git users, there is not reason 
to lose

their work, even in the case of some mistake.
For example, most problems can be recovered using:
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#recovering-lost-changes
I have to say I am even more worried than I was. It says there that any 
standard maintenance will destroy that data permanently. That is, 
actually, worse than I thought. To me, that is a must never happen 
situation.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Shachar Shemesh

Ohad Lutzky wrote:
 As long as you're not doing rebases or working with multiple branches 
(which are much more complicated to do in SVN, and useless in the 
situation at any rate), the data loss problems mentioned above don't 
exist.
Not true. The problem can happen if you just check out a commit which is 
not at the head of a branch (say, because you were doing regression 
testing), and then perform a commit. No branching required.
Git gives the added bonus of being able to work offline, which 
is indispensable for a student on a laptop.
True, but it steps up the complexity considerably. Well, you step it up 
to begin with when you say that publishing your work requires two stages 
(three if you count the add) - commit and then push. This means that 
for several people working on one repository, you would usually try to 
simplify things by telling them to git add + commit + push. Then, when 
you try take the laptop away, you find that you split an operation that 
used to be atomic, and the complexity comes back.


True, working with a centralized repository means that this is downright 
impossible, but I still maintain that working offline is no novice task.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] [W2L] Call for lecturer + Linux guru

2009-10-16 Thread Ohad Lutzky
I specifically didn't teach them checkout, for this exact reason... Yes,
warnings about these things are in order when you're using git.
(Specifically we have always mind your current branch and rebasing is  a
destructive operation, but also you can always fix these things if you
notice early enough, early enough being a rather loose from my experience).
On the specific matter of non-branch commits, git does some work to actively
warn you when you do so, but I think this could be improved.
I still believe that with warning on those two issues, git is simple enough
to use, and that the ability to work offline is well worth it.

On Fri, Oct 16, 2009 at 9:53 PM, Shachar Shemesh shac...@shemesh.bizwrote:

  Ohad Lutzky wrote:

  As long as you're not doing rebases or working with multiple branches
 (which are much more complicated to do in SVN, and useless in the situation
 at any rate), the data loss problems mentioned above don't exist.

 Not true. The problem can happen if you just check out a commit which is
 not at the head of a branch (say, because you were doing regression
 testing), and then perform a commit. No branching required.

  Git gives the added bonus of being able to work offline, which
 is indispensable for a student on a laptop.

 True, but it steps up the complexity considerably. Well, you step it up to
 begin with when you say that publishing your work requires two stages (three
 if you count the add) - commit and then push. This means that for several
 people working on one repository, you would usually try to simplify things
 by telling them to git add + commit + push. Then, when you try take the
 laptop away, you find that you split an operation that used to be atomic,
 and the complexity comes back.

 True, working with a centralized repository means that this is downright
 impossible, but I still maintain that working offline is no novice task.

 Shachar

 --
 Shachar Shemesh
 Lingnu Open Source Consulting Ltd.http://www.lingnu.com




-- 
Man is the only animal that laughs and weeps, for he is the only animal that
is struck with the difference between what things are and what they ought to
be.
- William Hazlitt

Ohad Lutzky
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux