help -- persuade my boss to adopt ruby 
Author Message
 help -- persuade my boss to adopt ruby

Hi Ruby Lovers,

I have a tough task need your help. I try to persuade my boss to adopt
Ruby in our project. The project is actually a re-construction of very
very old current system. during these days, we've been reading and
documenting the old system. A chance of promoting Ruby arose. I just
wrote a small program which replaced a now malfunctioning C program. The
C program is about 300 lines long, however my ruby program is:

File.open("output.txt","w+") do |f|
    File.open("input.txt").each_line do |line|
        fld=line.match(/.{4}(.{3})(.{6})(.{3}).{17}(.{6})/)
        f.print fld[0],"-",fld[1],"-",fld[2],fld[3]
    end
end

Now the headache is, they are pretty much determined on Java. I need to
write a Java version of the above program, just to show them: 1. how
simple a ruby program comparing to Java; 2. My selling point is that
when use ruby to program, you can concentrate on business logic, no need
to care about language issues, like variable declaration, close file
handle etc.

Can any Java programmers help?

Thanks!
Shannon



Mon, 30 May 2005 04:36:12 GMT  
 help -- persuade my boss to adopt ruby
Quote:

> File.open("output.txt","w+") do |f|
>     File.open("input.txt").each_line do |line|

       ^^^^^^^^^^^^^^^^^^^^^^
The file will be left open after the loop. It will eventually be closed
when it is GC-ed, or you can do

       File.open("input.txt") do |in_f|
         f.each_line ...



Mon, 30 May 2005 04:42:35 GMT  
 help -- persuade my boss to adopt ruby


Quote:
>Hi Ruby Lovers,

>I have a tough task need your help. I try to persuade my boss to adopt
>Ruby in our project.

Yes, this can be a very tough task indeed and it really depends a lot on
whether your boss has the technical ability to undertand the issues or
whether your boss is just set on a solution/language because it's
currently in vogue.  The former type you can probably deal with, the
latter... well, it'll be an uphill battle.

 >The project is actually a re-construction of very

Quote:
>very old current system. during these days, we've been reading and
>documenting the old system. A chance of promoting Ruby arose. I just
>wrote a small program which replaced a now malfunctioning C program. The
>C program is about 300 lines long, however my ruby program is:

>File.open("output.txt","w+") do |f|
>    File.open("input.txt").each_line do |line|
>        fld=line.match(/.{4}(.{3})(.{6})(.{3}).{17}(.{6})/)
>        f.print fld[0],"-",fld[1],"-",fld[2],fld[3]
>    end
>end

>Now the headache is, they are pretty much determined on Java. I need to
>write a Java version of the above program, just to show them: 1. how
>simple a ruby program comparing to Java; 2. My selling point is that
>when use ruby to program, you can concentrate on business logic, no need
>to care about language issues, like variable declaration, close file
>handle etc.

>Can any Java programmers help?

I'm not a Java programmer, though I wrote a few Java programs when it
first came out ('96?)

Any idea why Java is the preferred language for this application?
Is it an in-house app or is it a web app?  Who (and how many) will be
developing the app?  If it's just you developing it then Ruby may make a
lot of sense, but if it's a whole team then your management is probably
worried that you're the only one who knows Ruby.  You could always make
the case that if you use Ruby they'll only need you to develop the app
since it'll be so much easier than doing it in Java but your coworkers may
not appreciate that argument ;-)

Phil
--
"Or perhaps the truth is less interesting than the facts?"
Amy Weiss (accusing theregister.co.uk of engaging in 'tabloid journalism')
Senior VP, Communications
Recording Industry Association of America  



Mon, 30 May 2005 05:01:43 GMT  
 help -- persuade my boss to adopt ruby

Quote:



>>Now the headache is, they are pretty much determined on Java. I need to
>>write a Java version of the above program, just to show them: 1. how
>>simple a ruby program comparing to Java; 2. My selling point is that
>>when use ruby to program, you can concentrate on business logic, no need
>>to care about language issues, like variable declaration, close file
>>handle etc.

>>Can any Java programmers help?

>I'm not a Java programmer, though I wrote a few Java programs when it
>first came out ('96?)

>Any idea why Java is the preferred language for this application?
>Is it an in-house app or is it a web app?  Who (and how many) will be
>developing the app?  If it's just you developing it then Ruby may make a
>lot of sense, but if it's a whole team then your management is probably
>worried that you're the only one who knows Ruby.  You could always make
>the case that if you use Ruby they'll only need you to develop the app
>since it'll be so much easier than doing it in Java but your coworkers may
>not appreciate that argument ;-)

One more thing that I thought of as I sent this to the ng...

That last line was intended to be funny, but here's something to consider:
If there are multiple developers in your group try to build a coalition -
find others in your group who might appreciate Ruby and start teaching it
to them.  In fact you could use the code example you gave to open the
conversation by showing how you did it in Ruby and asking them how they
would do it in Java (or whatever their favorite language is).  That way
you're learning a bit of Java while teaching a bit of Ruby.  Hopefully
your coworker will notice how much shorter the Ruby code snippet is
compared to his Java solution and he'll say "hey, what language was that
written in again?  Ruby, eh? Looks kind'a cool.  So where can I find some
info..."

If it's just you trying to persuade the boss that Ruby is the language to
use your boss can just write you off as a crackpot (which is
unfortunately all too often what bosses do to visionaries) but if
you've got other developers in your group on your side then it's more likely
that your boss will take it seriously.

Phil
--
"Or perhaps the truth is less interesting than the facts?"
Amy Weiss (accusing theregister.co.uk of engaging in 'tabloid journalism')
Senior VP, Communications
Recording Industry Association of America  



Mon, 30 May 2005 05:15:29 GMT  
 help -- persuade my boss to adopt ruby

Quote:

> Hi Ruby Lovers,
> [...]
> [... push ruby instead of java ...]

Heyas.

One problem I really do see if you are competing with a ``smart''
language against java, is that the *SMART* about the language is
actually what is putting it backwards. Face it, Java was designed
for the ``average'' programmer, while ``smart'' languages are
designed to give you the freedom to write ``smart'' programs.

``smart'' programs is in the end what the one who will use the
program will want, on the other hand, your boss will always want
to be able to groom or develop the program even if ``a bus rolls
over you the other day'' or he decides to throw you out.

That is why java often is the language of choice over ``smarter''
languages like one of the ML Family (Ocaml e.g.), Erlang, Haskell,
Lisp or scheme, ruby ...

They can just replace one ``idiot'' programmer with one other ``idiot''
programmer (or even take a good one - java doesn't *force* you to be
average), in the end it's just easier to get someone to program in
java than to get someone who'd be able to do the same (in shorter
time, less LOC, less bugs etc. etc. etc.) in a ``smarter'' language.

What you need to do to boost ruby is not show the ``smart'' functions
of ruby. What you need to do is demonstrate how the code is its own
documentation, how readable the code is, how easy to understand even
complex things are. THEN they will consider ruby. Not if you show them
the ``perl'' strenghts: writing big things in ``just one line''.

When you have code which is shorter than java code, and, without any
documentation at all, will mostly be understood even by managers if
you present a little function or so, not littered by language characteristics,
but by expressive power, then you have a much better chance to promote
Ruby.

Never forget that for a manager, it's not only the technical issues to
decide what language to support for his project. He'll *always* have
the thought "what happens if he leaves us ? Will we be able to easily
find a replacement for him ? will the others of the team fully understand
the application" and stuff like that.

Furthermore you must cultivate a culture of using ruby in your surroundings,
so even if they don't choose ruby now, you can say in a year, hey, ten people
have been using it for a year for ALL KINDS of stuff! And then all will nod.
And it's shorter and easier to read! And then all will nod. And then your
manager will frown, and ask you how to write "ruby".

Hope that helped,

-Martin Weber



Mon, 30 May 2005 06:12:20 GMT  
 help -- persuade my boss to adopt ruby
Hi Phil,

You are absolutely right. What they fear is that:

1. Currently only I understand Ruby.
2. Java is in vogue. They want the language to be there after 10-20
years...

I am currently writing a small introduction letter to my boss...

Shannon

On Thu, 12 Dec 2002 06:41:39 +0900

Quote:





> >>Now the headache is, they are pretty much determined on Java. I need to
> >>write a Java version of the above program, just to show them: 1. how
> >>simple a ruby program comparing to Java; 2. My selling point is that
> >>when use ruby to program, you can concentrate on business logic, no need
> >>to care about language issues, like variable declaration, close file
> >>handle etc.

> >>Can any Java programmers help?

> >I'm not a Java programmer, though I wrote a few Java programs when it
> >first came out ('96?)

> >Any idea why Java is the preferred language for this application?
> >Is it an in-house app or is it a web app?  Who (and how many) will be
> >developing the app?  If it's just you developing it then Ruby may make a
> >lot of sense, but if it's a whole team then your management is probably
> >worried that you're the only one who knows Ruby.  You could always make
> >the case that if you use Ruby they'll only need you to develop the app
> >since it'll be so much easier than doing it in Java but your coworkers may
> >not appreciate that argument ;-)

> One more thing that I thought of as I sent this to the ng...

> That last line was intended to be funny, but here's something to consider:
> If there are multiple developers in your group try to build a coalition -
> find others in your group who might appreciate Ruby and start teaching it
> to them.  In fact you could use the code example you gave to open the
> conversation by showing how you did it in Ruby and asking them how they
> would do it in Java (or whatever their favorite language is).  That way
> you're learning a bit of Java while teaching a bit of Ruby.  Hopefully
> your coworker will notice how much shorter the Ruby code snippet is
> compared to his Java solution and he'll say "hey, what language was that
> written in again?  Ruby, eh? Looks kind'a cool.  So where can I find some
> info..."

> If it's just you trying to persuade the boss that Ruby is the language to
> use your boss can just write you off as a crackpot (which is
> unfortunately all too often what bosses do to visionaries) but if
> you've got other developers in your group on your side then it's more likely
> that your boss will take it seriously.

> Phil
> --
> "Or perhaps the truth is less interesting than the facts?"
> Amy Weiss (accusing theregister.co.uk of engaging in 'tabloid journalism')
> Senior VP, Communications
> Recording Industry Association of America  



Mon, 30 May 2005 06:42:00 GMT  
 help -- persuade my boss to adopt ruby
Unfortunately, people rise in management by NOT making waves...
Quote:
> Hi Phil,

> You are absolutely right. What they fear is that:

> 1. Currently only I understand Ruby.
> 2. Java is in vogue. They want the language to be there after 10-20
> years...

> I am currently writing a small introduction letter to my boss...

> Shannon



Mon, 30 May 2005 07:00:28 GMT  
 help -- persuade my boss to adopt ruby
Don't feel bad.  I'm stuck with writing stuff in KixStart.  Ugh!  Damn
Windoze environment!

Mark (MSCE) <-- ug!

Quote:
> -----Original Message-----

> Sent:      11 December 2002 23:00


> Subject:   Re: help -- persuade my boss to adopt ruby

> Unfortunately, people rise in management by NOT making waves...

> > Hi Phil,

> > You are absolutely right. What they fear is that:

> > 1. Currently only I understand Ruby.
> > 2. Java is in vogue. They want the language to be there after 10-20
> > years...

> > I am currently writing a small introduction letter to my boss...

> > Shannon

NOTICE:  This e-mail and any attachment(s) may contain confidential and
proprietary information of Goss International Corporation and/or its
subsidiaries and may be legally privileged. This e-mail is intended solely
for the addressee. If you are not the addressee, dissemination, copying or
other use of this e-mail or any of its content is strictly prohibited and
may be unlawful. If you are not the intended recipient please inform the
sender immediately and destroy the e-mail and any copies. All liability for
viruses is excluded to the fullest extent permitted by law. Any views
expressed in this message are those of the individual sender. No contract
may be construed by this e-mail.


Mon, 30 May 2005 07:02:48 GMT  
 help -- persuade my boss to adopt ruby

Quote:
> Don't feel bad.  I'm stuck with writing stuff in KixStart.  Ugh!  Damn
> Windoze environment!

> Mark (MSCE) <-- ug!

What is KixStart?  (I'm a Linux guy, so I wouldn't know).

Daniel Carrera
Graduate Teaching Assistant.  Math Dept.
University of Maryland.  (301) 405-5137


Quote:

> > -----Original Message-----

> > Sent: 11 December 2002 23:00


> > Subject:      Re: help -- persuade my boss to adopt ruby

> > Unfortunately, people rise in management by NOT making waves...

> > > Hi Phil,

> > > You are absolutely right. What they fear is that:

> > > 1. Currently only I understand Ruby.
> > > 2. Java is in vogue. They want the language to be there after 10-20
> > > years...

> > > I am currently writing a small introduction letter to my boss...

> > > Shannon

> NOTICE:  This e-mail and any attachment(s) may contain confidential and
> proprietary information of Goss International Corporation and/or its
> subsidiaries and may be legally privileged. This e-mail is intended solely
> for the addressee. If you are not the addressee, dissemination, copying or
> other use of this e-mail or any of its content is strictly prohibited and
> may be unlawful. If you are not the intended recipient please inform the
> sender immediately and destroy the e-mail and any copies. All liability for
> viruses is excluded to the fullest extent permitted by law. Any views
> expressed in this message are those of the individual sender. No contract
> may be construed by this e-mail.



Mon, 30 May 2005 07:06:10 GMT  
 help -- persuade my boss to adopt ruby

Quote:
> Hi Phil,
> You are absolutely right. What they fear is that:
> 1. Currently only I understand Ruby.
> 2. Java is in vogue. They want the language to be there
>    after 10-20 years...

It's been in vogue since release (which someone else in the list said
was probably 1996). That's 6 years of vogueness.

May as well argue for straight C or Perl. C's been in vogue for 20-30
years and Perl's been in and out of vogue for around a decade. Ruby's
new and untried.

I'd like to see Ruby be more widely used. You just need to be able to
show your boss that it won't vanish in a year or two, when someone
writes Peridot or Opal.

I'd love to have $WORK convert from Perl to Ruby, but I'm having enough
fun getting them to use more Perl 5 features than Perl 4.

cheers,
--
Iain.



Mon, 30 May 2005 07:09:32 GMT  
 help -- persuade my boss to adopt ruby

Quote:
> Can any Java programmers help?

Well, my experience my help a bit though I don't know the task
completely to make a final conclusion. I've been studying Ruby for about
a week and it already has brought first results. I'm a Java programmer
and our projects had to be localized into another language. The task was
to synchronize translation of string resources (coming from different
sources), to filter it (preventing double translation), to split
translated words among not translated, to merge manually put strings
with others came from dictionaries and so on. So even for our management
the task didn't look as a piece of cake. We had 3 different formats of
strings + a number of dictionaries - about 10-15 input files and 20-25
outputs. I was advised to learn Perl but since I'd read about Ruby in
the past I decided not to loose a chance to practice. I finished all
scripts in a day and all of my colleagues were very impressed by the
results. The script did all the job bringing unimaginable report/log
outputs. Playing with the scripts is really pleasure - I can carry out
very crazy dream of the translators in a few minutes. I have to confess
that writing it in Java would take at least 3 times more working time
and the program wouldn't be so flexible to satisfy new requests. Now I
think how to add a GUI level to let translators work with all data on
their own.

Hope this story can help your boss to estimate your idea.
Roman

P.S. It seems to me that for medium tasks it's faster to write in Ruby
than to persuade:-)



Mon, 30 May 2005 07:10:33 GMT  
 help -- persuade my boss to adopt ruby
Heh.  It's a scripting language for Windows written by some dude at
MicroSoft... A screwy version is included in the resource kit for NT and
2000.  I use it for writing logon scripts (and I don't care what those
idiots at MicroSoft say, logon scripts are the best way to get the job
done...) and other scripts to automate stuff in a windows environment.  It's
a bout 5000% better than using a plain old .bat file, and about 5000%
cruddier than using Ruby.  

Actually, it's called Kixtart... check out the site if you are interested...
http://www.kixtart.org/

I'd much rather become a full linux head, than do Windoze.  However, they
keep paying me.... so...

Mark

Quote:
> -----Original Message-----

> Sent:      11 December 2002 23:06

> Subject:   Re: help -- persuade my boss to adopt ruby

> > Don't feel bad.  I'm stuck with writing stuff in KixStart.  Ugh!  Damn
> > Windoze environment!

> > Mark (MSCE) <-- ug!

> What is KixStart?  (I'm a Linux guy, so I wouldn't know).

> Daniel Carrera
> Graduate Teaching Assistant.  Math Dept.
> University of Maryland.  (301) 405-5137


> > > -----Original Message-----

> > > Sent:    11 December 2002 23:00


> > > Subject: Re: help -- persuade my boss to adopt ruby

> > > Unfortunately, people rise in management by NOT making waves...

> > > > Hi Phil,

> > > > You are absolutely right. What they fear is that:

> > > > 1. Currently only I understand Ruby.
> > > > 2. Java is in vogue. They want the language to be there after 10-20
> > > > years...

> > > > I am currently writing a small introduction letter to my boss...

> > > > Shannon

> > NOTICE:  This e-mail and any attachment(s) may contain confidential and
> > proprietary information of Goss International Corporation and/or its
> > subsidiaries and may be legally privileged. This e-mail is intended
> solely
> > for the addressee. If you are not the addressee, dissemination, copying
> or
> > other use of this e-mail or any of its content is strictly prohibited
> and
> > may be unlawful. If you are not the intended recipient please inform the
> > sender immediately and destroy the e-mail and any copies. All liability
> for
> > viruses is excluded to the fullest extent permitted by law. Any views
> > expressed in this message are those of the individual sender. No
> contract
> > may be construed by this e-mail.

NOTICE:  This e-mail and any attachment(s) may contain confidential and
proprietary information of Goss International Corporation and/or its
subsidiaries and may be legally privileged. This e-mail is intended solely
for the addressee. If you are not the addressee, dissemination, copying or
other use of this e-mail or any of its content is strictly prohibited and
may be unlawful. If you are not the intended recipient please inform the
sender immediately and destroy the e-mail and any copies. All liability for
viruses is excluded to the fullest extent permitted by law. Any views
expressed in this message are those of the individual sender. No contract
may be construed by this e-mail.


Mon, 30 May 2005 07:11:49 GMT  
 help -- persuade my boss to adopt ruby

Quote:

> Hi Phil,

> You are absolutely right. What they fear is that:

> 1. Currently only I understand Ruby.
> 2. Java is in vogue. They want the language to be there after 10-20
> years...

> I am currently writing a small introduction letter to my boss...

I have given two presentations on Ruby at my work. It was received much
better than I anticipated. I used to get "Only you know Ruby", to
which I would respond, "Any programmer here after 2 days will know
Ruby better than they currently know Perl". After seeing the code
in two presentations, I think they are beginning to believe this
bit of truth.

--
Jim Freeze
----------
Osborn's Law:
        Variables won't; constants aren't.



Mon, 30 May 2005 07:34:10 GMT  
 help -- persuade my boss to adopt ruby
What do you mean making waves? Confused...

Shannon
On Thu, 12 Dec 2002 08:00:28 +0900

Quote:

> Unfortunately, people rise in management by NOT making waves...

> > Hi Phil,

> > You are absolutely right. What they fear is that:

> > 1. Currently only I understand Ruby.
> > 2. Java is in vogue. They want the language to be there after 10-20
> > years...

> > I am currently writing a small introduction letter to my boss...

> > Shannon



Mon, 30 May 2005 07:36:16 GMT  
 help -- persuade my boss to adopt ruby

Quote:

> Hi Ruby Lovers,

> File.open("output.txt","w+") do |f|
>     File.open("input.txt").each_line do |line|
>         fld=line.match(/.{4}(.{3})(.{6})(.{3}).{17}(.{6})/)
>         f.print fld[0],"-",fld[1],"-",fld[2],fld[3]
>     end
> end

You might try something like the following.  It has been tested on a sample
file of my own design...  There may be better/more compact/idiomatic ways
to do this...

Although this example is slightly more complex than the ruby example, this
should not be the only reason to choose ruby over java.  Think carefully
before you choose.

# File:  ProcessFile.java

import java.io.* ;
import java.util.regex.* ;

class ProcessFile {
  public static void main(String[] argv){

    try {
      File f_in  = new File("input.txt");
      File f_out  = new File("output.txt");
      String line ;
      Pattern p = Pattern.compile("(.{4}(.{3})(.{6})(.{3}).{17}(.{6}))") ;

      LineNumberReader in = new LineNumberReader(new FileReader(f_in));
      PrintWriter out = new PrintWriter(new FileWriter(f_out));

      while ( null != ( line=in.readLine())) {
        Matcher m = p.matcher(line);
        if ( true == m.find()) {
          System.out.println(m.group(1) + "-" + m.group(2) + "-" +
m.group(3)+ m.group(4));
        }
      }
    } catch ( Exception e ) {
      e.printStackTrace();
    }
  }

Quote:
}



Mon, 30 May 2005 07:45:11 GMT  
 
 [ 196 post ]  Go to page: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

 Relevant Pages 

1. Data Modeling/Object Modeling (was Re: [OT] RE: help -- persuade my boss to adopt ruby)

2. Help me please to persuade my bosses

3. Trying to persuade your boss?

4. Selling ruby to my boss

5. HELP - tk and adopted windows.

6. BOSS help

7. BOSS Files - Help Needed

8. Please help me convince my boss!

9. Help me convince my boss...

10. BOSS problem, Help!?

11. help with BOSS troubles?

12. Need Help with Boss -- clarification

 

 
Powered by phpBB® Forum Software