Jump to content
Botre

Which tools/plugins/libraries do you use for scripting?

Recommended Posts

Which tools, applications, plugins, libraries, frameworks, etc... do you use to plan, make, test, etc... your scripts ? ^^

 

I'm just using Eclipse right now but about to make the switch to IDEA, no special plugins or anything like that.

 

Looking for cool tips to improve my productivity, etc...

 

Peaceeee

Link to comment
Share on other sites

The only reason I would switch to IDEA is for the support of other JVM languages like Scala. Seeing how I rarely use Scala or Groovy, I didn't care much for wasting time getting familiar with another IDE. (I heard code completion was better? How about not being lazy? :P Code completion doesn't suck THAT bad on eclipse, especially if you specify your own templates)

As you know, I'm not a scripter, so I'm not sure what could be considered useful in that category. The way I see it, all scripts are pretty much the same at their core (from what I hear, you guys use some kind of node system?). Other than IDs and different conditions, what varies between scripts?

If you ask me, someone could create their own API specifically for scripting, but there's really no reason (since they should be included in the actual OSBot API, making any other scripting API obsolete).

If you informed me on some of the tasks you feel could be managed by an API but are currently not supported in the OSBot API, let me know and I'll see if I know of any handy libraries. But scripting seems too strict to even want a third-party API, let alone need one. There's really not that much to a script (from what I've seen), and everything you could possibly NEED is in the OSBot API. Why add the extra dependencies?

Edited by fixthissite
  • Like 1
Link to comment
Share on other sites

The only reason I would switch to IDEA is for the support of other JVM languages like Scala. Seeing how I rarely use Scala or Groovy, I didn't care much for wasting time getting familiar with another IDE. (I heard code completion was better? How about not being lazy? tongue.png Code completion doesn't suck THAT bad on eclipse, especially if you specify your own templates)

As you know, I'm not a scripter, so I'm not sure what could be considered useful in that category. The way I see it, all scripts are pretty much the same at their core (from what I hear, you guys use some kind of node system?). Other than IDs and different conditions, what varies between scripts?

If you ask me, someone could create their own API specifically for scripting, but there's really no reason (since they should be included in the actual OSBot API, making any other scripting API obsolete).

If you informed me on some of the tasks you feel could be managed by an API but are currently not supported in the OSBot API, let me know and I'll see if I know of any handy libraries. But scripting seems too strict to even want a third-party API, let alone need one. There's really not that much to a script (from what I've seen), and everything you could possibly NEED is in the OSBot API. Why add the extra dependencies?

 

The reason I'm making the switch to IDEA is to test how much and in which way my programming relies on Eclipse itself, what Eclipse is lacking and what Eclipse is good for.

 

Most use a state machine or node system indeed, when I meant tools and plugins I was talking more about planning/testing and optimization tools, nothing runescape specific tbh.

 

I know for example that there are ways to update a script during testing without having to export the JAR everytime, little time savers like that ^^

Link to comment
Share on other sites

The only reason I would switch to IDEA is for the support of other JVM languages like Scala. Seeing how I rarely use Scala or Groovy, I didn't care much for wasting time getting familiar with another IDE. (I heard code completion was better? How about not being lazy? tongue.png Code completion doesn't suck THAT bad on eclipse, especially if you specify your own templates)

As you know, I'm not a scripter, so I'm not sure what could be considered useful in that category. The way I see it, all scripts are pretty much the same at their core (from what I hear, you guys use some kind of node system?). Other than IDs and different conditions, what varies between scripts?

If you ask me, someone could create their own API specifically for scripting, but there's really no reason (since they should be included in the actual OSBot API, making any other scripting API obsolete).

If you informed me on some of the tasks you feel could be managed by an API but are currently not supported in the OSBot API, let me know and I'll see if I know of any handy libraries. But scripting seems too strict to even want a third-party API, let alone need one. There's really not that much to a script (from what I've seen), and everything you could possibly NEED is in the OSBot API. Why add the extra dependencies?

 

 

And cmon lets face it, IDEA just looks sexier too. ;)

  • Like 1
Link to comment
Share on other sites

I use a personally OSBot Helper API that has an event-node state framework and some common utilities that are used in virtually every script. If Guava wasn't already bound together with the OSBot API I would've added that independently too.

 

I also use the WindowBuilder plugin for Eclipse to make my GUIs, although I should really start using JavaFX.

 

 

Edited by lare96
Link to comment
Share on other sites

The reason I'm making the switch to IDEA is to test how much and in which way my programming relies on Eclipse itself, what Eclipse is lacking and what Eclipse is good for.

Most use a state machine or node system indeed, when I meant tools and plugins I was talking more about planning/testing and optimization tools, nothing runescape specific tbh.

I know for example that there are ways to update a script during testing without having to export the JAR everytime, little time savers like that ^^

I've heard people found no regrets in the switch. If you have time to get familiar with a new IDE, then by all means, explore.

Testing has gotten pretty standard too, although there is a few things you should keep in mind. JUnit is easy to learn and easy to use, but doesn't support mocking (as far as I know/have looked). Mocking allows you to test in TRUE isolation, by creating mocks of dependencies that are needed, rather than including the dependencies in your tests. Mocking libraries exist, such as Mockito.

Due to the nature of scripts, it's impossible to implement any true management system (such as the ones supplied in JMX). If you were to use a profiler, such as VisualVM, to view the running details of the bot's process, the resources used from your script will most likely be hard to properly distinguish from the resources used from the bot client. Profiling tools are useful, but be aware that you're testing the entire process; you might wanna come up with your own strategy for profiling in this situation (or look online for an existing solution. Embedding smaller applications into larger ones is actually pretty common)

A problem all Java devs come across is how to properly benchmark. Simply creating a timer to measure the elapsed time of execution is not suitable for Java. You need to account for the VM warm-up, as well as optimizations performed by the compiler. Caliper is a great framework for micro benchmarking (benchmarking small units of code) in Java. Seeing how scripts aren't too complex (for now...), I doubt you'd need to explore past micro benchmarking.

Do you know what will help you more than tools? Programming advice, of course!

I've noticed my strategy for creating applications has changed quite a bit within the last couple of years. People tend to have their own systems, while others don't have systems. My system grew into a TDD (test driven development) mixed with DbC (design by contract). I start by writing out the actual logic of my application, keeping in mind that I should be programming to interfaces. Writing the logic first helps wrap my mind around what is going to be needed, as well as what isn't. TDD encourages the bare minimum. "Good code is not code which nothing more can be added to. Good code is code which nothing more can be taken away" - One of my favorite quotes :) DbC ensures I keep coupling low by having objects interact through abstractions rather than directly.

Don't do what is not needed - that's a very important aspect of programming. Rather than trying to find things to add to your scripts, see how much you can take away while still keeping it's integrity ("ban-free", easy to use, ect..). Unless you NEED something, don't worry about it. It applies all through-out programming. It's actually the reason why people have troubles with design patterns; they try to force it in their code, when really they exist to solve specific problems

Edited by fixthissite
Link to comment
Share on other sites

I used to use Eclipse, the Switched to NetBeans because of better code format and UI and some other features.

Then somehow I switched to IntelliJ because of GitHub integration and some other great features.

IMO, I recommend Intellij, Community or Ultiamte, both are great, but Ultimate looks sexier lol.

 

UKF

Link to comment
Share on other sites

I've heard people found no regrets in the switch. If you have time to get familiar with a new IDE, then by all means, explore.

Testing has gotten pretty standard too, although there is a few things you should keep in mind. JUnit is easy to learn and easy to use, but doesn't support mocking (as far as I know/have looked). Mocking allows you to test in TRUE isolation, by creating mocks of dependencies that are needed, rather than including the dependencies in your tests. Mocking libraries exist, such as Mockito.

Due to the nature of scripts, it's impossible to implement any true management system (such as the ones supplied in JMX). If you were to use a profiler, such as VisualVM, to view the running details of the bot's process, the resources used from your script will most likely be hard to properly distinguish from the resources used from the bot client. Profiling tools are useful, but be aware that you're testing the entire process; you might wanna come up with your own strategy for profiling in this situation (or look online for an existing solution. Embedding smaller applications into larger ones is actually pretty common)

A problem all Java devs come across is how to properly benchmark. Simply creating a timer to measure the elapsed time of execution is not suitable for Java. You need to account for the VM warm-up, as well as optimizations performed by the compiler. Caliper is a great framework for micro benchmarking (benchmarking small units of code) in Java. Seeing how scripts aren't too complex (for now...), I doubt you'd need to explore past micro benchmarking.

Do you know what will help you more than tools? Programming advice, of course!

I've noticed my strategy for creating applications has changed quite a bit within the last couple of years. People tend to have their own systems, while others don't have systems. My system grew into a TDD (test driven development) mixed with DbC (design by contract). I start by writing out the actual logic of my application, keeping in mind that I should be programming to interfaces. Writing the logic first helps wrap my mind around what is going to be needed, as well as what isn't. TDD encourages the bare minimum. "Good code is not code which nothing more can be added to. Good code is code which nothing more can be taken away" - One of my favorite quotes smile.png DbC ensures I keep coupling low by having objects interact through abstractions rather than directly.

Don't do what is not needed - that's a very important aspect of programming. Rather than trying to find things to add to your scripts, see how much you can take away while still keeping it's integrity ("ban-free", easy to use, ect..). Unless you NEED something, don't worry about it. It applies all through-out programming. It's actually the reason why people have troubles with design patterns; they try to force it in their code, when really they exist to solve specific problems

 

Good read,

You should post more on these forums.

Link to comment
Share on other sites

I used to use Eclipse, the Switched to NetBeans because of better code format and UI and some other features.

Then somehow I switched to IntelliJ because of GitHub integration and some other great features.

IMO, I recommend Intellij, Community or Ultiamte, both are great, but Ultimate looks sexier lol.

 

UKF

 

You do know Eclipse has support for Git repositories right?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...