Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Im also making things like that for things that might happen only once. Just because if it does happen a second time I dont have to do shitwork again.
Colleagues make jokes about it because I try to automate to much. -
donuts238487y@Codex404 it's an art... + Cost analysis...
And just asking... Do I really want to do this manually or would it be better use of my time and make less pissed if I just wrote an app to do it. -
donuts238487yFor this one yes the whole task only might happen once but the sub tasks files) occur 10+ times in similar form (aka if.... else....)
So do I do it 10 times and promise myself this is the only time I will need it or do I have fun writing a program to do it and make myself feel better because I made my minions do it? -
donuts238487yThe nice thing about good programs is after you write it and a similar problem comes up you can either generalize it or copy it and use it as a template
-
mundo0349797y@billgates sure it is, but this grunt work is something I do twice a week, and I am just not willing to do it.
I make more mistakes and take way more time when doing it manually. -
donuts238487yhm thats a good reason... but then why isnt ur code faster than doing it manually.
My problem is i automate something... and then i get assigned the next blow up.... -
mundo0349797y@billgates it id faster, the slow part is writing it, maintain it, and adapt to fucking changes in the process
-
donuts238487yWriting - it pays off as N increases
Maintaining - write clean code, comments, usage docs
Changes - experience; modularize all components, separate the parts that are likely to change from the ones that don't. link them with interfaces so they can be swapped out easily,
basically the idea is is only a particular component needs changing, there's no reason any other part of the app should care or need to change -
donuts238487y@windlessuser I wrote a parser that reads all the Java files and extracts the path annotations info and some other info
Then I output all that into a CSV -
DRY applies for when you need to reuse duplicate code. This means that the incident must occur twice before you start considering DRY.
-
donuts238487y@cyberlord64 no it means don't do the same things over again more then once or twice... Especially if a computer is involved and u just take a moment to relive your basically repeating urself and think how to make the computer to do all the work
-
@billgates in order for an incident to be considered repetitive it has to have occured at least twice. Why would anyone automate a process which has occured only once in the past and never again?
-
donuts238487y@cyberlord64 because the giant task requires repeating small tasks N times and a time cost analysis says it comes out to about the same so why not?
-
donuts238487yAnd the whole point is most ppl think oh this is a one time thing... O wait I have a template from last time... O wait I remember now this is how you do it.... Wait yea we did it last year the instructions are in an email somewhere... Wait.... O crap I forgot a step... What was it again? ...
-
@billgates too specific usecase to justify generalisation. The rule of thumb is to only automate when the process is repetitive.
My boss just asked me for a cheat sheet I have that lists all our app server's paths.
The paths are attached as annotations throughout some Java files.
Anyway I send him the one I have but he asks if he could have an updated one.
Now imagine if I were like most monkeys and had made this cheat sheet by hand....
2 mins easy vs an(other) hour of grunt work
Why is it that I'm the only person on the team that writes utilities to automate boring grunt work while everyone else just does it manually whenever it needed....
Isn't DRY a core principle of being a developer?
I'm the only person that builds utility apps that automate frequent tasks that people keep asking us to do....
rant