8

!rant

Guys, Im curious, what you would say about situation if you are in need of some quite simple tool and you write it but becouse you need it today, not tommorow, you just dont give a heck about all the fancy stuff and (lets say for php) you start to write all in 2-3 files like you was back beginner?

Or you just nope out of situation?
Do you refactor that when you bored just becouse this cant be on my disk, noone can see this abomination?
Or you delete after usage (only to relaize 5 minutes latter you need it back :P )

Im curious your opinion.

PS.
nope, if you came to bitch about any of opinions even opinion "well, i wouldnt give a fuck and just not do it", go away and get lost.

E: typo

Comments
  • 4
    Is it a tool anyone other than me will ever use or see? If no: Fuck it up good
    If yes: Actually write good code
  • 1
    @kescherRant

    No, noone will ever see. You need to perform certain task that manually will take you.. too much time.

    IDK, examples are like... bulk file renaming according to some logic, maybe scrapping website from elements with certain class or whatever, maybe hitting up X servers via telnet, droping in few bytes, disconnecting, whatever your temporary one time use need might be.
  • 6
    To be fair... The faster you develop the tool to perform a task that takes too long - the better.

    So, in a nutshell - I wouldn't care even if it's written in a single file since... well, it has one job and the job is meant to be for me. As you said - you need it now, not tomorrow, so why to spend hours on structuring the shit out of it if you won't be delivering on time? :)

    Also, you can always come back and refactor... There's no shame in prototyping things that are ugly.
  • 2
    I do that all the time.
    But I don´t delete it afterwards.
    I store it all in a private repo.

    Don´t wanna know how many little command line tools are flying around in there.

    Just last week I needed a way to modify A LOT of projects in a Visual Studio solution at once.
    So I´ve written a command line tool to change what I need.
    One method (main) one parameter (path to solution file). That´s it.

    It´s somewhere in that repo now.
    Probably won´t ever see the light of day ever again...
  • 4
    I've got some nasty hack jobs of scripts that I wouldn't be too proud off if seen by others, but damn do they remove hours out of my day, actually a handful are the backbone to production systems, if it ain't broken don't fix it right?
  • 3
    @C0D4 Exactly... It saves you time so does it really matter how ugly it is? No. It does not.

    As long as it does the job and nobody will work on it OR it's designed to do an exactly one job forever - you should not care how ugly it is.
  • 3
    @kescherRant
    @C0D4
    @RadiatorTwo
    @potata

    Thx. I was curious becouse I know few purists who won't accept it or will try to hide it and like defend it from outside (I mean not "ye, but its terrible temp script" but I mean "nooo, I havent done that, not guilty until proven").

    And this approach is shocker for me, and was curious am I weird or just few people that I know.

    TBH I agree with ya all.

    Sometimes I will remove temp scripts if they are too specific (ie. follow certain logic to rename certain files) but usually I have them in "tmpscripts" folder ;)

    Thx guys, have a good day.
  • 2
    Nope I don't really care about anything but the end result.

    Usually I throw them under a utilities folder or if it's a framework, they're inside a big ass testController.

    You're not alone
  • 0
    Who has time to work on old code that still works and nobody will ever see?
  • 2
    I once had a case in my company where we got a huge data log file from a customer. Line based ASCII with raw hex data. The issue was already escalated to management, a telecon was scheduled for noon, and we needed to visualise the data - but we didn't have a suitable program.

    So I was asked whether I could hack something together. Clean code went out of the window, the only question was whether I could do it within two hours.

    The result was a totally dirty C program with no structure, and also no error handling at all, but it spat out a CSV that I could import into Excel for making the required graphs.

    Oh and I had been at the dentist in the morning where they had fixed a tooth root inflammation, but the pain was still there, and painkillers would have numbed me down too much to do that kind of coding, so I just had to ignore the pain.
  • 1
    @Fast-Nop

    Feel sorry for you with the last paragraph :(

    Hope your teeth will be fine
  • 0
    well, i wouldnt give a fuck and just not do it
Add Comment