mIRC Homepage

How long does it take you to write a script?

Posted By: Cyrex

How long does it take you to write a script? - 16/07/04 06:23 PM

I was just curious about how long it takes scripters out there to complete a large, complex, script? Does it take you hours, days, months?
Posted By: xxxYODAxxx

Re: How long does it take you to write a script? - 16/07/04 06:41 PM

depends on the script wink usually hours, then days weeks months to debug/perfect.. depending on the functions laugh my "baby" is a constantly ongoing project ask anyone that knows me... hehe
Posted By: Watchdog

Re: How long does it take you to write a script? - 17/07/04 12:59 PM

Quite easily months. When you account for the fact that you have to work, eat, sleep and damage the Doulton occasionally you will spend months on and off writing a full script.
Posted By: Danthemandoo

Re: How long does it take you to write a script? - 17/07/04 09:16 PM

to write my bot, its taken about 2 years, we even threw him a 2nd b'day party. However, its continous development, so i work on him (its a him) whenever something needs adding or fixing.

I would estimate i've spent about 100 hours on it in total, but he runs from information pasted from a game, and the format the information is in keeps changing, so that accounts for a lot of the time spent.

He has over 4,000 lines of mIRC script btw grin
Posted By: Cyrex

Re: How long does it take you to write a script? - 18/07/04 03:08 AM

That must be a real good bot using all that code..
Posted By: Danthemandoo

Re: How long does it take you to write a script? - 18/07/04 03:21 AM

i could probably get the lines down to about 1500 if i used pipes ( | ) but i hate using them, i perfer the old

Code:
on *:text:!blah:#:{
  if (somethin == somethinelse) { 
     do this
  else { 
     do this instead
  }
}

as opposed to

on *:text:!blah:#: { if (somethin == somethinelse) { do this } | else { do this instead } }

But yes, he is a damn good bot if i do say so myself grin
Posted By: landonsandor

Re: How long does it take you to write a script? - 18/07/04 06:16 AM

Genuinely curious - what's wrong with:

Code:
on *:text:!blah:#:{
  if (somethin == somethinelse) {  do this }
  else {  do this instead }
}


That would shrink the lines down WITHOUT using pipes. End of genuinely curious questioning of your apparent wonderful bot's coding smile smile
Posted By: Watchdog

Re: How long does it take you to write a script? - 18/07/04 10:11 AM

It looks awful. Apart from that not alot as it would still work correctly.
Posted By: landonsandor

Re: How long does it take you to write a script? - 18/07/04 10:49 AM

Really? Do that many people really prefer:

if (whatever) {
command
}

over

if (whatever) { command }

that much?? I would have thought (and if you're right, incorrectly) that the first seemed.... I dont know............... to add unecessary space to a file but of course to each their own smile
Posted By: listner

Re: How long does it take you to write a script? - 18/07/04 11:21 AM

I tend to use both methods myself. I normally use the longer method because most often I use multiple commands. If I only have one line then I use the short method.

The main idea for me, is to keep it 'readable'.

Listner
Posted By: Kelder

Re: How long does it take you to write a script? - 18/07/04 12:11 PM

For me it just depends on the situation. I always try to keep the horizontal scrollbar away, and that's with the editor using less than the complete screen width. And for multiple commands, it's always commands on new lines, except for some while ($regex(%a,\w)) { inc %i | echo $regml(1) } oneliners smile
Oh, and the last example is bad coding grin

if ($blah) do this
if (blah) { do that }
if (test) {
one long or multiple commands
}
if (very long test) $&
some long command
Posted By: tidy_trax

Re: How long does it take you to write a script? - 18/07/04 04:26 PM

I hate using pipes, so I use if statements like this:

if (statement) { only one line of code to do here }
elseif (other statement) {
multiple lines of code
to do here
}
Posted By: Danthemandoo

Re: How long does it take you to write a script? - 18/07/04 08:36 PM

i find the way i do it much neater, much easier to read and a hell of a lot easier to debug.
Its also easier to see if you accidently forget a { or }

Just saw i missed one from my above example blush
Posted By: tidy_trax

Re: How long does it take you to write a script? - 18/07/04 10:33 PM

I find it neater also, but i find it wastes a lot of space if you're writing a big script.
Posted By: Watchdog

Re: How long does it take you to write a script? - 19/07/04 08:22 PM

that much?? I would have thought (and if you're right, incorrectly)

I don't recall mentioning how many liked a particular style - all I said is that I don't like having opening and closing braces on the same line. Therefore no-one is right or wrong.
Posted By: Watchdog

Re: How long does it take you to write a script? - 19/07/04 08:24 PM

There is no waste of space. The number of characters in the script doesn't change so the saving you make vertically is consumed horizontally.
Posted By: tidy_trax

Re: How long does it take you to write a script? - 19/07/04 08:38 PM

I'd rather have a script with fewer lines, even if it means more characters.
Posted By: Artwerks

Re: How long does it take you to write a script? - 20/07/04 01:45 AM

Sorry, I didn't took the time to read the whole thread, but it's mostly a personal answer.

The last addon I coded took me 5 months to code (and it's not already finished, I'll had some more things in the next year), but I had to go to school, and also, I didn't spend all my free time coding it. My addon was quite a big thing (it's now 1250 lines and 52k of codes), and also, it was hard as I had to respect multiple protocols, and also, I had to support a lot of connections (it's a MSN Messenger client for mIRC which I called MSNMIRC, for information, a link to my website is now available in the "More Info" section on this website.. thanks to Tjerk, it was a hard work, but it's worth it I think). So I think you could get a script done in 6 months if you code when you're bored, you make an all-around script with lots of features and you don't make it too difficult. The one I'm coding now with a friend, I'm giving me a year before the release, as I'm coding something quite big with a new theme engine supporting emoticons and a lot of other features.

If you think you can support coding a script for several months, go ahead, you'll be proud when you'll release it and get feedbacks from people who downloaded it. Just one tip: make it customizable for the user.. everybody likes to have a script work the way they want!
Posted By: Doqnach

Re: How long does it take you to write a script? - 21/07/04 08:11 PM

I usually script everything on seperate lines... and when I have a function done I would shrink it alot, also using pipes sometimes...

saves me alot of scrolling :-]

but while scripting I try to write it out as much as I can cause it's better to read it then...
Posted By: zack

Re: How long does it take you to write a script? - 24/07/04 06:29 AM

I've been writing the same bot for the last 4 years. It is currently on version 34.64.17754.146736146b3.1.
© 2022 mIRC Discussion Forums