[Haifux] advanced of programming in Linux

Shahar Dag dag at cs.technion.ac.il
Mon Nov 2 14:02:47 MSK 2009


Hello all

mix & match is just a buzzword.
we need a real example that shows that 10 minutes of shell scripting will save half a day of programming.
(no, grep -v is not an example)

as for scripts & Windows
Windows have many scripting capabilities. It is true that we mostly ignore them (maybe becase they are complicated)
1. batch files
2. visual basic scrips (if you know how, you can use any dll in the system to do a job for you)
3. power shell
4. and of course cygwin

make can be run on windows & even if you create source dependencis, you still have to handle the dependency on header files. The problem (almost) does not exist in IDE environment (which is the windows way)

Valgrind is an execelt tool (and it helped me a lote) but it is relevant only for languages that do not have memory manegment (C, C++, ...). Java programmers can laugth all the way to the dedline

Sorry, please think harder and come out with somthing more convincing

Thanks in advanced
Shahar Dag

  ----- Original Message ----- 
  From: Orna Agmon Ben-Yehuda 
  To: Vadim Eisenberg 
  Cc: Haifux ; Shahar Dag 
  Sent: Monday, November 02, 2009 11:55 AM
  Subject: Re: [Haifux] advanced of programming in Linux


  I think the strong point is "The Unix Way", which is a mix and match of tools, each good at doing a specific thing, by using shell , pipe and make. Linux did not invent "The Unix Way", but like other FOSS, it provides more options for the mix and match. Indeed many Unix systems are closed source, and the Unix Way works there, too (better than it would work on Windows, I expect). 

  A point specific to Linux and Intel/AMD is valgrind, with which I nowadays solve memory issues within seconds of programmer time. Solving similar problems before I had Linux took me weeks sometimes (for a code I was not familiar with, of tens of thousands of lines), and sometimes I just gave up.


  On Mon, Nov 2, 2009 at 11:16 AM, Vadim Eisenberg <vadim.eisenberg at gmail.com> wrote:

    I would like to present some points of a devil's advocate (some smart students can raise these counterclaims during the lecture) :

    1.       You can run batch files also on Windows (it for sure is less convenient than shell scripts on Unix, but it is not impossible)

    2.       You can use Ant instead of makefile (it is also less convenient than makefile + shell scripts, but is still possible)

    3.       You can use Perl on Windows

    4.       UNIX remark: I guess all the tools you mention pertain to Unix also, so in general you provide points for learning Unix tools, not necessary Linux ones. In particular, you probably can use them on cygwin on Windows.



    In general, my suspicion is that anything you can do in Unix, you can do also in Windows,  but in a less convenient/less productive way. 



    I hope not to make anybody here angry by providing such heretic remarks.



    Regards,

    Vadim



    From: haifux-bounces at haifux.org [mailto:haifux-bounces at haifux.org] On Behalf Of Orna Agmon Ben-Yehuda
    Sent: Monday, November 02, 2009 10:51 AM
    To: Shahar Dag
    Cc: Haifux
    Subject: Re: [Haifux] advanced of programming in Linux



    I often see people spending approximately an hour each time, trying to understand why their change was not included in the executable. The answer is usually - because they forgot to insert the source into the list of sources in the makefile. When I show them how to automatically create a list of sources and compile them all, with the correct dependencies, the problem is forever solved.

    I use a makefile to build Haifux's site automatically in two languages, while compiling lists of lectures in different pages.

    I use make to properly build latex files, including the second pass required for bibtex.

    I use make ,diff, head to create automatic tests (regression tests) for various programs, compare them automatically with previous results, and produce a report of added capabilities, lost capabilities, changes requiring the attention of a professional.

    I use make and perl to create parametric sweep runs (batch runs with different input parameters in each run). I specifically use here the inherent quality of make, to work according to the date of targets, so that if the parametric sweep was disturbed in the middle, only runs older than the executable and input file are re-run.

    2009/11/1 Shahar Dag <dag at cs.technion.ac.il>

    Hello



    To extent Elli's question:

    We try to convince our students that programming on Linux is easier / faster relative to Windows, so they better learn how to work with Linux.



    We claim that using the build in shell commands and pipes we can compose a solution for complex problem (almost) without programming.



    Can you point us for real life examples that prove our claims? 



    Thanks in advanced

    Shahar Dag
    System & Software Development Laboratory (SSDL)
    Computer Science Department
    Technion - Israel Institute of Technology
    Haifa, Israel
    Tel. 972-4-829-4880
    Fax 972-4-829-4878


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







------------------------------------------------------------------------------


  _______________________________________________
  Haifux mailing list
  Haifux at haifux.org
  http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20091102/690bad9b/attachment.html 


More information about the Haifux mailing list