How to justify using a scripting language in a project

I have a specific project in which I want to use either the scripting language + C, or as an alternative to a 100% Java solution.

The program adapts an outdated system for use with other modern systems.

Basically, I have little choice as to which language I can use. I have C / C ++, Java 1.4, and I also compiled Lua for this environment.

The program performs screen-scrolling and deals with a large number of lines. This part of the code is heavily modified.

Most of the developers in my company use C, so my initial project was to write some parts in C and use Lua for the part that processed the lines and changed frequently. I was told: "You have to justify your use of the scripting language." Therefore, I redesigned my design using 100% Java, and I was told that Java would not have sufficient performance. You have to do it all in C.

I don't control lasers or do image processing - just some screen scrapers. I still have to provide a rationale for using anything other than C - so what rationale can I provide?

+4
source share
13 answers

Estimate how much time (time == money $) each decision will make. This should help.

+9
source

You can crack the prototype in some things, such as Perl, Python, or another script language, and show how easy and fast it can be done.

+4
source

The big advantage of the built-in script language is the ability to check and change data while the program is running.
In terms of speed, IMO Lua is the number one choice among game developers, and this is because it is quick and easy.

(you can embed Lua in no time, and you won't even notice it there;)

+3
source

You need to justify this in terms of the cost of implementation in C (time / money) compared to the costs in a higher level scripting language. I would give a couple of examples / scenarios to demonstrate potential savings.

You seem to be working in a rather conservative environment. Please note that people may be interested in introducing an unknown technology that they do not understand or do not have experience. For this reason, you may wish to: a) introduce something well known and documented; b) do not initially use any esoteric functions. I hope you can demonstrate that they can return to this, and moving forward, raise it.

+2
source

My suggestions:

1) Think about a few string operations that you will need to do during the scrambling process. Write them in C and then in Lua. I wrote examples at one point, which were 30-40 lines of C compared to 1-2 from Lua.

2) Try quickly prototyping some aspects of your system in Lua and then in C to compare and compare. Only you can determine if this prototyping time is acceptable for your manager or not.

3) Find a like-minded person (or two or three) in your team to show examples and conversation points. They can help you if you need to do a design review.

4) Be prepared to accept that while you may have a very good design decision, this may not be right for your organization. Not everyone wants to learn or try something new. If a bunch of "enemies" need to use or support your project, you can discover more problems than its value.

+2
source

In this case, you can also argue for higher reliability, since string processing in C is cumbersome and often leads to programming errors (buffer overflows, etc.).

+1
source

The rationale (if true) is that Java is faster for what you do. (Isnโ€™t it? - As Martin said, try prototyping it in Python and evaluate how long it will take.)

0
source

FROM

The program performs screen-scrolling and deals with a large number of lines

Perl would probably be a better option if you had this as a choice.

0
source

I think that the price angle will probably always lose based on the fact that your group has current C experience, so the savings are offset by the cost of learning a new language.

More convincing for me (as someone who had to make these compromises in the past) would be flexibility and speed of response to changes. C needs to be compiled and deployed, while you can dump a new python script into your environment in 10 seconds. If the mutable pages change, it seems that your development and deployment environment should be consistent with this flexibility, which means the scripting language.

By the way, the argument โ€œJava is slowerโ€ is supplanted only by people who are stuck in C. It's not so long ago, and there are many independent tests that prove this.

0
source

Demonstrate the ease of adding new ones (or custom ones) by letting your application load and run a bit of script at runtime compared to the normal development and development cycle.

0
source

Parsing strings, HTML, XML, etc. slow no matter what language you use.

There are many free components for your problem, so the cost of the tool is not a problem.

Parsing lines and screen scripting is one of those problems where your understanding of parsing requirements is constantly changing and takes a long time to stabilize. Therefore, you need to write software to clean the screen, try it, fail and learn, and you will need to do it quickly.

Your best bet anyway will be Perl and Ruby. Perl is legendary for parsing strings. Ruby is good too, and it has a library for cleaning the screen, for example ( scrAPI ).

The business case for Perl or Ruby is low cost (free tools) and significantly reduces development time. Using a scripting language allows you to quickly make and check changes to your cleaning software until you fix it. If you can go from code change to test in 10 minutes using C / C ++, you can do the same with Perl / Ruby in about a minute. Long-term, which can lead to cost savings of 50%.

0
source

Future extensibility.

If you use a scripting language, you can expand your project in the future at a much lower price.

0
source

Configuration. Lua was created as a configuration / data description language. Your program can also work in the same way as the C core, and then configuration through the lua interface. How much you leave the configuration is up to you, but it can change over time.

0
source

All Articles