Alex Baranosky
Alex Baranosky

Reputation: 50094

I'm a .NET Programmer. What are specific uses of Python and/or Ruby for that will make me more productive?

I recall when I first read Pragmatic Programmer that they suggested using scripting languages to make you a more productive programmer.

I am in a quandary putting this into practice.

I want to know specific ways that using Python or Ruby can make me a more productive .NET developer.

One specific way per answer, and even better if you can say whether I could use Python or Ruby or Both for it.

See standard format below.

Upvotes: 4

Views: 413

Answers (8)

Philip Fourie
Philip Fourie

Reputation: 117017

Embedding a script engine

Use of IronPython for a scripting engine inside your .NET application. For example enabling end-users of your application to change customizable parts with a full fledge language such as Python.

A possible example might be to expose custom logic to end-users for a work flow engine.

Upvotes: 2

Andy Gaskell
Andy Gaskell

Reputation: 31761

Learning a new language gives you knowledge that you can bring back to any programming language. Here are some things you'd learn.

Add functionality to your objects on the fly.

Mix in modules.

Pass a chunk of code around.

Figure out how to do more with less code: ruby -e "puts 'hello world'"

C# can do some of these things, but a fresh perspective might bring you one step closer to automating your breakfast.

Upvotes: 2

Philip Fourie
Philip Fourie

Reputation: 117017

Processing received Email

Python has built-in support for POP3 and IMAP where the standard .NET framework doesn't. Useful for automating email triggered tasks.

Upvotes: 1

Philip Fourie
Philip Fourie

Reputation: 117017

Cross platform

Compared to .NET a simple script Python is more easily ported to other platforms such as Linux. Although possible to achieve the same with the likes of Mono it simpler to run a Python script file on different platforms.

Upvotes: 1

Philip Fourie
Philip Fourie

Reputation: 117017

Less Code

I think productivity is direct result on how proficient you are in a specific language. That said the terseness of a language like Python might save some time on getting certain things done.

If I compare how much less code I have to write for simple administration scripts (e.g. clean-up of old files) compared to .NET code there is certain amount of productivity gain. (Plus it is more fun which also helps getting the job done)

Upvotes: 4

Tadeusz A. Kadłubowski
Tadeusz A. Kadłubowski

Reputation: 8363

Advanced Text Processing

Traditional strengths of awk and perl. You can just glue together a bunch of regular expressions to create a simple data-mining system on the go.

Upvotes: 2

Alex Martelli
Alex Martelli

Reputation: 882481

IronPython / IronRuby

IronPython in Action will do a better job explaining this (and exactly how best to use IronPython) that can possibly be accommodated in a SO answer. I'm biased -- I was a tech reviewer and am a friend of one of the authors -- but objectively think it's a great book. (No idea if IronRuby is blessed with a similarly wonderful book, yet).

As you want "one specific way per answer" (incompatible with SO, which STRONGLY discourages a poster posting 25 different answers if they have 25 "specific ways" to indicate...!-): prototyping in order to explore some specific assembly or collection thereof that you're unfamiliar with (to check if you've understood their docs right and how to perform certain tasks) is an order of magnitude more productive in IronPython than in C#, as you can explore interactively and compilation is instantaneous and as-needed. (Have not tried IronRuby but I'll assume it can work in a roughly equivalent way and speed).

Upvotes: 5

Tadeusz A. Kadłubowski
Tadeusz A. Kadłubowski

Reputation: 8363

Quick Prototyping - Both

In the simplest cases when firing a python interpreter and writing a line or two is way faster than creating a new project in visual studio.

And you can use ruby to. Or lua, or evel perl, whatever. The point is implicit typing and light-weight feel.

Upvotes: 1

Related Questions