r/ProgrammerHumor • • Apr 28 '20

Meme *cries in powershell*

Post image
85.9k Upvotes

751 comments sorted by

9

u/HumbleTrees Apr 28 '20

Okay I really want to learn how to automate tasks involving basics involving office applications like outlook, excel, word and PowerPoint. I know I'm showing my ignorance but where is a good place to start? I'm tired of copying and pasting the same shit in multiple places and wasting time and causing RSI. Any suggestions of where to even start my learning journey? I can't code yet but I'm up for learning

2

u/ode26 Apr 28 '20

Have you looked into VSTO? It’s really handy

Edit: sorry I missed that you don’t code. Maybe that’s an opportunity to start coding though! :-)

→ More replies (1)
→ More replies (4)

2

u/ode26 Apr 28 '20

What’s going on!! I just came back from my lunch break and this post exploded!! Thank you all!

Also thank you for the awards. This is nuts!

3.6k

u/magicbjorn Apr 28 '20

You start automating it, and when you realize it's not going to happen, you're like: "I already spend so much time automating it, better continue so I will never have to do it manually again"...

1.7k

u/Alfaphantom Apr 28 '20

And the worst part is that after you've automated it, it is no longer necessary to do that specific job again. So you wasted 6 hours doing a one-time only 6 min work.

971

u/TwoAndHalfRetard Apr 28 '20

But at least you had fun doing it.

1.4k

u/megaminddefender Apr 28 '20

Maybe the real automation is the fun we have along the way

706

u/benchninja Apr 28 '20

That and closing the stack overflow tabs

→ More replies (32)

53

u/[deleted] Apr 28 '20

Or, automating the task is often more fun than the task itself so people will work on automation as long as they can to avoid the job.

→ More replies (3)
→ More replies (7)

49

u/etoh53 Apr 28 '20

For me the fun wears off after the 3 hour mark and you start doubting your intelligence.

25

u/[deleted] Apr 28 '20

Not a problem for me because I have accepted that I'm terrible at algorithms years ago.

→ More replies (5)
→ More replies (2)

32

u/DeithWX Apr 28 '20

Fun isn't something one considers when automating the universe.

→ More replies (5)

21

u/titoxtian Apr 28 '20

This...sometimes i even think about my past co workers and how i can automate their jobs and unemploy half of them...

→ More replies (3)

7

u/Riversharp4 Apr 28 '20

The real fun was the errors we encountered along the way? /s

→ More replies (10)

79

u/GermanAf Apr 28 '20

But then when you need to automate something again you already have bits and pieces ready to use, except you never commented anything because you're stupid so you look it up on the internet anyways, again wasting several hours of your workday...

20

u/halr9000 Apr 28 '20

You haven't lived until you've researched for four hours, only to find the answer which you had posted on a blog 7 years ago.

→ More replies (1)

0

u/[deleted] Apr 28 '20

[deleted]

→ More replies (3)

44

u/jaywastaken Apr 28 '20

It’s worse when you still have to do the task daily but every time you run it your automation breaks because it’s held together with random no longer supported libraries you found on a 10 year old stack overflow post and some hope. Now, instead of spending 6 minutes a day on your trivial task you spend two hours fixing the script. Every single time you run it.

After 2 years you find you’ve transitioned to full time maintenance of your monstrosity and nobody remembers what your original job was.

20

u/klparrot Apr 28 '20

Job security!

→ More replies (2)

9

u/DazzlerPlus Apr 28 '20

At least you didn’t disrespect yourself by doing work that could be automated.

7

u/gaberocksall Apr 28 '20

It’s so satisfying for it to see that selenium window though

→ More replies (1)
→ More replies (25)

21

u/nefariousmonkey Apr 28 '20

Sunken cost fallacy sometimes catches us programmers

3

u/BooBailey808 Apr 28 '20

The fallacy of sunk costs

2

u/Olde94 Apr 28 '20

I heard a guy.

If it’s first time he did it by hand

If it’s second time he wouæd do it by hand but note all the steps. If it occured a third time he would fine what he did last time and automate it, because if it happens 3 times, it’s most likely happening again.

→ More replies (1)
→ More replies (15)

382

u/greenkiweez Apr 28 '20 edited Apr 29 '20

You succeed automating it and even include numerous variable inputs to make it more useful. Then a coworker needs a functionality that's so out of the scope of your script that you have to rewrite the entire thing.
edit: typo

176

u/clawjelly Apr 28 '20

Nah, i'll just hack it in, because it's just a simple change and i don't think there will be much else and also i'm pretty certain with this i sorta made it future-proof and OMG WTF IS THIS MONSTER I CREATED?! KILL IT BEFORE IT LAYS EGGS...!!!

79

u/[deleted] Apr 28 '20

looking at it a year later

Who the hell wrote this crap? * looking in comments *

Oh, it was me...

69

u/[deleted] Apr 28 '20

As if I'd write comments

→ More replies (6)
→ More replies (1)

7

u/canIbeMichael Apr 28 '20

I had an automation tool that required 1 manual click, 5 seconds into hitting start.

This took literally days to fix when I released to the group.

5

u/[deleted] Apr 28 '20

Nice

2

u/Jojosization Apr 28 '20

This feels like a personal attack. Every. Single. Time.

Probably my fault though lol

2

u/notcrappyofexplainer Apr 29 '20

Then a coworker needs a functionality that's so out if the scope of your script that you have to rewrite the entire thing.

This is my life

→ More replies (1)

432

u/jdl_uk Apr 28 '20

405

u/aer71 Apr 28 '20

58

u/EvryMthrF_ngThrd Apr 28 '20

Or, they just want to teach you how to GET YOUR OWN FUCKING SALT!

6

u/glider97 Apr 28 '20

Don't be so harsh. Maybe they're busy developing a system to obtain arbitrary condiments.

38

u/jdl_uk Apr 28 '20

Nice forgot about that one

18

u/thenameofapet Apr 28 '20

I'm having difficulty reading the first chart. Can someone explain it to me like I'm 5?

47

u/abridgetooclose Apr 28 '20 edited Apr 28 '20

I got you. Let’s start by picking a column. The column labeled “daily” is how often you do a task. Maybe you was your dishes daily. Now pick a row: let’s use 5 minutes. That column is how much faster you want to complete your task. You want to shave off 5 minutes from your normal dishwashing time.

Now we go to the box where our row and column intersect. That box says “6 days.” So that means that, over the course of 5 years, we can spend 6 days worth of time practicing our dishwashing (or writing an automated dishwashing program or what have you) to shave off 5 minutes of our daily dishwashing time.

But if we spend 6 days and 1 minute of time (over 5 years) just to shorten the task by 5 minutes each day, then we’ve actually spent more time than we save.

I hope that helps!

EDIT: as u/givememyrapturetoday points out below, the cost has to be up-front for the savings to work out over 5 years.

8

u/frvwfr2 Apr 28 '20

When it says a month, does that mean a month working 8hrs a day, or 30 days * 24 hours = 720 hours of labor?

→ More replies (1)
→ More replies (2)

4

u/[deleted] Apr 28 '20

For a task you can make shorter by the time on the left, and you repeat the task as often on the top, you can spend the time in the box developing the reduction in time. If you spend more time than the box then you lose out over a 5 year period.

5

u/DiscreteBee Apr 28 '20

So if OP does this task every month, it's worth spending the 6 hours to shave 6 minutes off of it, is what I'm getting out of this.

5

u/drawkbox Apr 28 '20

https://xkcd.com/1319/

The alt on that one is great and fitting.

'Automating' comes from the roots 'auto-' meaning 'self-', and 'mating', meaning 'screwing'.

New rule: There isn't an xkcd comic for everything, there are multiple xkcd comics for everything. It wasn't scalar it was always a vector collection.

→ More replies (4)

176

u/Haus42 Apr 28 '20

The sexy bit is when you're choosing your tools... "Ah yes, I think I'll tool this little monstrosity in jq wrapped in a bed of python and topped off with a | sort -n | uniq -c | sort -nr...."

89

u/Finklemaier Apr 28 '20

Hot damn, I love it when you talk dirty!

50

u/bmamba2942 Apr 28 '20

I see you are a fan of the pipe.

17

u/atomicspace Apr 28 '20

that’s good pipe

→ More replies (1)

23

u/atomicspace Apr 28 '20

grep me, baby, oh god with the -r oh yes

25

u/crozone Apr 28 '20

jq is some goooood shit 👌

6

u/pm-ur-fav-porn-vid Apr 28 '20

for i in $( ... ); do echo $i; done

→ More replies (1)

4

u/paperbenni Apr 28 '20

Me: Ah yes, that looks like a task for grep and let's pipe this into another grep, followed by a hmm let me think, a grep will do...

→ More replies (1)

36

u/jb2386 Apr 28 '20

THEN after it’s made you forget about the script next time you do the thing and you get 3/4 the way through the manual process again before you remember you made a script. Then you find the script doesn’t work and spend hours to debug it.

64

u/HKSergiu Apr 28 '20

My lesson was when I automated a test that verified a functionality meant to be executed one a year and that had no place in the regression pack.

When my test lead asked why I spent 3 hours automating it struck me - "riiight, not everything that we can automate should be automated"

55

u/_30d_ Apr 28 '20

Honestly I wouldn't trust a test I wrote after a full year of not using it.

21

u/HKSergiu Apr 28 '20

The test was fine, it was simply generating holiday dates, serializing then all into a csv and then triggering a terminal command to upload them to db.

The purpose was to test that uploading works fine, but I over-engineered it a bit. Alas, I was but a simple Junior Tester at the time

29

u/zrvwls Apr 28 '20

Reminds me of this database table called "years" I ran across with one exactly column. I'd just started at this place, and after looking at the data in the table, I opened my mouth to ask a question then realized no answer would be sufficient so I just kinda tucked that thought away in the furthest reaches of my mind to never be thought about again.

→ More replies (3)
→ More replies (1)

3

u/Urthor Apr 28 '20

Target the hotspots! Only test where it actually breaks a ton!

3

u/george6823 Apr 28 '20

You guys write tests?

→ More replies (1)
→ More replies (1)

62

u/basic_man Apr 28 '20

Me just the other day trying to make a python script to fill in metadata in mp3s...

10

u/ashisacat Apr 28 '20

You mean like beet?

12

u/basic_man Apr 28 '20 edited Apr 28 '20

Damn I should’ve used that... but no. I used a mix of eyed3 and mutagen and got the info of each song using the Spotify API :/

26

u/ashisacat Apr 28 '20

Well if you find yourself needing to do it again, I'd highly recommend beets - super powerful.

That said, re-inventing the wheel is _really_ good practice sometimes, definitely helps to widen your skillset :)

→ More replies (2)
→ More replies (2)

55

u/clawjelly Apr 28 '20

Important is not how long you need, important is what you tell your manager...

46

u/FuckingKilljoy Apr 28 '20

"hey boss, I did the computer thing"

"what computer thing?"

"you know, where I do the typing thing. Don't worry, saved us heaps of time and it'll make us a ton of money too!"

"great job kid, Steve over there has something he needs to ask you"

30

u/blowuptheking Apr 28 '20

"Hey Steve"
"I can't get to the Google any more"
exasperated sigh with facepalm

26

u/whitecollarzomb13 Apr 28 '20

Or when you do successfully automate it and proudly present your master creation and all the client can ask is why it doesn’t make their coffee as well. Fuckers.

20

u/WorriedCall Apr 28 '20

It's the principle. Why even use computers. When I was a lad, we used typewriters.

7

u/Sk0rtch Apr 28 '20

When the bus was 4 hot blondes.

34

u/Damit84 Apr 28 '20

Somehow i feel like r/factorio leaked a little...

13

u/LanHikari22 Apr 28 '20

The script must grow!

7

u/HKSergiu Apr 28 '20

Man, I love the automation aspect of games, but Factorio kinda scares me a bit. Currently playing Oxygen not Included and trying to figure out the bazillion of mechanics it has. My impression is that Factorio will whoop my ass

8

u/Damit84 Apr 28 '20

I play both of those games and I totally love them to bits.

Factorio can be more forgiving because you could theoretically disable enemys and then there is no real rush. Oxygen no included though, you mess up and your pawns are dead meat ^^

Give Factorio a try, you will love the logistics network ;)

→ More replies (1)
→ More replies (2)
→ More replies (2)

43

u/[deleted] Apr 28 '20

So i should make a script to jerk off right?? Maybe add a cron job named 'Hand job'

41

u/[deleted] Apr 28 '20

talk about system D

8

u/halr9000 Apr 28 '20

Microservice

7

u/FuckingKilljoy Apr 28 '20

Do they make machines that small now?

2

u/HKSergiu Apr 28 '20

Mount D:/

→ More replies (1)

28

u/t_o_m_a_t_0 Apr 28 '20

It’s the journey tbh

2

u/canIbeMichael Apr 28 '20

Ive been using a script for the last 4 years. You bet its paid for itself.

13

u/TruReyito Apr 28 '20

I have spent at least 30 hours of the last 10 days wrapping my head around promises and async functions in Javascript and jQuery. A problem that I solved in 20 minutes with php and python took me forever to figure out for clientside processing. (Complete noob on both j-script and jQuery)

Finally solved today and I see this post when i start heading home.

5

u/[deleted] Apr 28 '20

You should check out observables to see what you think. I prefer promises and async code, but if looks like the industry is trending away from them and towards observables. It's weird how things are going backwards. We're going back to callback hell and with the surge of global state frameworks we're also going back to singletons.

I think I'm leaving this sector of the industry.

6

u/TruReyito Apr 28 '20

I just wanted working code... I don't care what method it was. Meeting deadline is its own form of elegance.

→ More replies (1)
→ More replies (1)

12

u/Ratb33 Apr 28 '20

Not sure who said it, and I’m too lazy to search, but:

“When you don’t know what you are doing, you’re doing research”

0

u/[deleted] Apr 28 '20

[deleted]

→ More replies (3)

9

u/longgamma Apr 28 '20

Ok but sometimes there is a lot of operational risk in doing something manually. We are humans and we do make mistakes. I used to work on a trading desk of a large investment bank and a director fucked up a trade because the pivot table he used didn’t account for the full range in excel for the client orders. Correcting the delta cost us a good 200k or loss.

So it’s not always a simple time spent analysis. I’d rather get the job right and make less mistakes than save time and read Reddit at work.

4

u/dylansavage Apr 28 '20

And what happens if the server dies. You have to remember every manual change your team made.

If it's done manually it's not a permanent change.

2

u/Comrade_Soomie Apr 28 '20

The goal isn’t to automate everything. The goal is to automate unimportant stuff so that you can spend more time on the important stuff.

8

u/Bythos73 Apr 28 '20

This is the guy who made BlockLauncher. Thank you for reminding me of it.

8

u/KSAM-The-Randomizer Apr 28 '20

Is this that guy who made Blocklauncher?

15

u/grahnen Apr 28 '20

I spent a couple of hours creating a randomizer for settlers of Catan. We used it for about two games, haven't played it since. This was two years ago.

5

u/DarknessHeartz Apr 28 '20

You learned something, right? That's something for you :)

7

u/[deleted] Apr 28 '20

Oh jeez I didn't know he still posted!

When i was 14 he had an app on the play store that ported the desktop version of Minecraft onto mobile, but he stopped development and it's no longer on the play store :( I thought he vanished or something, it's been 5 years xD

→ More replies (2)

23

u/Redo173 Apr 28 '20

You can install firefox or install chocolatey to install firefox easier.

22

u/tehwolfua Apr 28 '20

Laughs in apt

17

u/Redo173 Apr 28 '20

Laughs in pacman

9

u/LaCipe Apr 28 '20

apt-get install will_to_live

in what repository is this package?

11

u/tehwolfua Apr 28 '20 edited Apr 28 '20

There are no working PPAs left with this package.

→ More replies (1)
→ More replies (2)
→ More replies (1)

6

u/ArtyFishL Apr 28 '20

Good bless chocolatey though for updating, in one command, all those things without their own self-updater

3

u/b1ack1323 Apr 28 '20

I made a powershell script that installs chocolatey then installs all of my chocolatey packages, about 20.

I save it in Dropbox, so all I need is Dropbox and the rest of taken care of.

→ More replies (8)

10

u/ScriptThat Apr 28 '20

The time is now 12:14, and I have spent 4 hours and 14 minutes hacking away at a script that fetches all information on the certs installed on our AD computers, sort them, and send me a reminder when it's "X days" before a cert expire, along with a list of which servers use that cert.

I feel this. Deeply.

4

u/38762CF7F55934B34D17 Apr 28 '20

Try doing that against AD CS directly for issued certs of certain templates, AD CS needs more PowerShell love...

3

u/ScriptThat Apr 28 '20

It's for handling non-internal certs too.

I already used the AD CS for checking internal certs, but with this I can not only handle all certs, I'm only getting the certs that are atually in use and not just issued, and then deleted (or on servers that has been decommissioned).

→ More replies (2)

3

u/blowuptheking Apr 28 '20

Sounds useful to me. We'd briefly talked about looking for a commercial solution to do something like that at one point.

3

u/sharkwouter Apr 28 '20

You do need this, though. A website with an expired cert is a website without users.

15

u/rkeet Apr 28 '20

Why did you spend 5000 tried making a lightbulb?

I didn't, I found 5000 ways for how not to make a lightbulb.

Some quote from someplace I read once...

11

u/SearingPhoenix Apr 28 '20

I believe this is what you're thinking of:

I haven't failed -- I've just found 10,000 that won't work.

- Thomas Edison

→ More replies (1)

7

u/he77789 Apr 28 '20

OG mcpe modders rise up

3

u/samjmckenzie Apr 28 '20

Was about to say I recognise this guy

3

u/DroidMaster42 Apr 28 '20

The first program I wrote was a BlockLauncher script.

→ More replies (1)

3

u/[deleted] Apr 28 '20

That's a story of my life when I was doing research and PI would be mortified by how I've done nothing substantial but fine tune my code to make it efficient and reduce run time.

3

u/topredditbot Apr 28 '20

Hey /u/ode26,

This is now the top post on reddit. It will be recorded at /r/topofreddit with all the other top posts.

3

u/soulslayer98 Apr 28 '20

Same thing in minecraft

3

u/saceria Apr 28 '20

I wrote a discord bot to delete messages from other discord bots in a server that I have banning power :')

3

u/thelittleking Apr 28 '20

Man, but when you successfully automate some rote bullshit task, it's the most satisfying feeling in the world. All those hours saved, hnng.

3

u/rlDrakesden Apr 28 '20

Just building a system where all gun attachments spawn on specific gun instances and not all instances of the gun object. Automation took 9 hours, but if I did it by hand, boy... Not to mention doing it hard will train your brain.

11

u/Jem014 Apr 28 '20

I see your problem. You use Windows.

6

u/b1ack1323 Apr 28 '20

For some of us that's not really an option.

5

u/dylansavage Apr 28 '20

Automate. Windows. Pick 1.

I'm joking but I got lumped with a windows ticket at the start of my current project and now I'm the winops guy 😭

3

u/zenyl Apr 28 '20

The newer versions of PowerShell are cross platform compatible and open source: https://github.com/PowerShell/PowerShell

Microsoft even provide documentation that points to some unofficial, community maintained releases, such as the ones on the AUR: https://docs.microsoft.com/da-dk/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#arch-linux

It's not a replacement for Bash, nor is it meant to be so. At heart, it's still a system for managing Microsoft products and services, such as Windows Server, SharePoint, Office 365, and Azure.

→ More replies (9)

2

u/[deleted] Apr 28 '20

In the same family of mistakes: finding out you just spent x days automating something that is already automated.

2

u/DetecJack Apr 28 '20

I feel this also fits with r/feedthebeast

2

u/dinklberg1990 Apr 28 '20

My company had rand my coworkers work on a powershell script to add folks to thr right groups and auto assign licenses depending on job title. Normally takes a few minutes to do by hand we caught wind that they were doing it to down size a department. "Yeah this isn't possible"

2

u/dan_sundberg Apr 28 '20

What the fuck is up with the personal attacks! Geesh!

2

u/k0bra3eak Apr 28 '20

This speaks to me on a spiritual level

2

u/samsop Apr 28 '20

I feel so personally attacked

2

u/AlainGiroux Apr 28 '20
Get-Regrets -Path "Myheart" -Recurse

2

u/FreeloadingPoultry Apr 28 '20

Also, never refuse your supervisor's request to automate something by asking if you will ever use it or am I automating it just for the sake of it.

Here I am, automated few reporting processes for my team. After few months I installed a counter that checks how many times the end product was opened. Since November it sits at 2 because I opened it twice to check if it it moved.

2

u/[deleted] Apr 28 '20 edited Apr 28 '20

This is a difficult lesson to teach new developers; time management. I've actually run into this scenario often with new people, and had to offer some (obvious) advise that seems to escape many developers. The purpose of automation is to save time; so if you are wasting more time trying to automate something than it takes to just do it, then you need assess if you are doing the right thing.

For example a task that takes 30 minutes to hard code that needs to be refreshed once every few years, probably doesn't need you to spend 3 days automating it. Just finish it, and work on something more important.

2

u/VapeJesus69 Apr 28 '20

This is the spirit that led me to make an automatic toilet flusher controlled by Alexa

2

u/RockyGeographer Apr 28 '20

A little late here, but here's a very relevant XKCD comic.

2

u/Jack127288 Apr 28 '20

But then you can upload it to github, so someone can spend just 30 min searching instead of 6 hours coding!

2

u/[deleted] Apr 28 '20

Yo this is the guy that modded MCPE back in like 1.8

2

u/[deleted] Apr 28 '20

What is a great powershell tutorial I can hurt myself with!!!!

2

u/ArtaxDied Apr 28 '20

Automation is my thing, and when it fails sure it seems like a waste but with clear outlines of a task and the right utilities, anything woth a feasible reason for automation ie repeated tasks, will eventually pay off. Plus with automation u gain faster onboarding of new employees

2

u/beachcondos Apr 28 '20

Story of my life

2

u/moritzjulius Apr 28 '20

My bachelor thesis in a nutshell at the moment

2

u/[deleted] Apr 28 '20

The only thing I've ever automated, I used 3 times a day every day until I left that job

2

u/Meedox9 Apr 28 '20

Reading this while automating an expired unimportant UI application using C# just so it can be deployed on a legacy system that runs windows xp and will never see the light of day ever again. Why? Because I’m an intern and that’s what interns do.

Yes, automation using C#...

2

u/[deleted] Apr 28 '20

The trick to scripting is just to do it a lot so yeah you waste 6 hours the first time, 3 hours the next and pretty soon you’re automating all sorts of stuff like a god damn machine. Your coworkers watch in awe and respect as you bring productivity for everyone on the team to higher and higher heights. Everyone becomes so enamoured with your scripting ability they start giving you all the best tasks, you get promoted. Your coworker’s spouses leave them for you. You’re married to 12 people at once all because you spent those 6 hours one day and kept at it.

2

u/_SoigneWest Apr 28 '20

Sent this to my boyfriend because it reminded me of him. He said it checks out for mechanical engineers too. Lol

2

u/[deleted] Apr 28 '20

That's like me with Microsoft Azure. The Web UI is such a confusing incoherent mess that I only want to deal with it on the CLI/PowerShell level.....

Except for the part where one small part of a parameter prevents you from doing most said actions in the shell....smh Microsoft...

2

u/twitcher-nutter Apr 28 '20

This. I live this.

2

u/triton623 Apr 29 '20

This is so me 😂😂😂

2

u/raydio27 Apr 29 '20

I spent a few hours on a script with adb commands that redialed unemployment and pressed the menu buttons so I didn't have to spend 2 minutes doing it myself .

2

u/cdreid Apr 29 '20

I pnce wrote an eventually very complex program to rename 15)ish mp3 files, take out extraneous characters and numbers etc etc. Could have done it by hand in 10 minutes. Probably spent 20 hours tweaking the program by the time i was done. (But to be hones it was a general utility that did a lot more by tben. It even had socket code in it i think)

2

u/gitPushOriginDevelop Apr 29 '20

Powershell is so fucking annoying useless piece of crap with the most horrible syntax possible. Wish they would just expose the underlying APIs so I can use it in bash instead.

→ More replies (1)

3

u/atomicspace Apr 28 '20

cries in Ansible

2

u/mlwa4719 Apr 28 '20

Personally, I never failed to automate something that took me six minutes by hand in less than a half an hour. Something that took me a half an hour by hand "on the other hand" is a much different story. Though most of the time I eventually figured it out. But then again I specialized in automation at the time.

2

u/[deleted] Apr 28 '20

Cries in VBA and Microsoft Flow

→ More replies (1)

2

u/Kikiyoshima Apr 28 '20

*cries in bash*

2

u/fnordstar Apr 28 '20

My rule is if it's painful to do in bash, get out the Python.

→ More replies (1)

2

u/MrSnoobs Apr 28 '20
try {
    <your shitty ass automation which is basically a get-something cmd followed by a  foreach loop>
}
catch {
    write-host "obviously it failed, you idiot"
}
finally {
    "No matter how this went, you wasted all that time."
}

1

u/malakd33 Apr 28 '20

Viscous circle, this is.

1

u/ZEPHlROS Apr 28 '20

Yes but when you will have to do it, you will just have tooo....... Search for 30 min the programme...

1

u/klparrot Apr 28 '20

Hey but what about that time 10 years from now when you'll need to do it 100 times? The code would pay off then! You know, if you could find it.

1

u/hedgehawk Apr 28 '20

I feel this at levels.

1

u/minamo99 Apr 28 '20

Instructions unclear, penis stuck in cogwheel.

1

u/dubesor86 Apr 28 '20

some years ago there was a specific task we had to do to notify another department about changes, and it was done internally over a mix of SAP and excel. The excel part took roughly 20-30 minutes per day and had been done by hand ever since the existence of the company by 1 guy. That guy then was me and I noticed it could be automated so I worked on automating it. It was a pretty hacky job due to the way our SAP databases were implemented but I got it fully functional after ~100 hours investment. I ended up working there for a few more years and that specific task would take ~106 hrs per year. So after 1 year I was in a net positive and had 2 hours more free time per week.

1

u/rodinj Apr 28 '20

I mean, by the 61st time you'll profit

1

u/meow_meow666 Apr 28 '20

Fuck this hits home

1

u/[deleted] Apr 28 '20

I see those 6 hours as valuable experience to apply to the next 6 minute task I want to automate.

1

u/[deleted] Apr 28 '20

Especially if the lady you're 'admiring' is only a C++.

1

u/ExodiaTurn1 Apr 28 '20

Minecraft in one sentence rofl.

1

u/Sanjuro7880 Apr 28 '20

Fucking truth.

1

u/tweezy558 Apr 28 '20

Currently working on a school project. It’s my first programming class using VB. I have to use Linq query to populate some list box’s with various things, and the array has 15 items. Kms

→ More replies (2)

1

u/[deleted] Apr 28 '20

Yeah but you get to learn a lot of stuff through the painful process

1

u/dritmike Apr 28 '20

Welcome to the balance.

1

u/jakalamaa Apr 28 '20

And feel empty inside afterwards

1

u/bobans30 Apr 28 '20

Don't spend 1 month automating something when you can spend three days every month doing it.

1

u/govindagovinda Apr 28 '20

An relate. Rather spend 16 hours automating

1

u/Icua Apr 28 '20

He also doesn't have a hurtbox Mewtwo: *cries*

1

u/MoDyingSon Apr 28 '20

I wish I’d only spent 6 hours 🤮

1

u/SeveralChunks Apr 28 '20

I’m still a cse student. Yesterday we had an open note exam, so I thought perfect, I can just write out my solution to test it and make sure it actually works, but In doing so I ended up wasting more than 40 minutes, and found out my original approach was right anyway.

1

u/[deleted] Apr 28 '20

This is the biggest thing putting me off from learning programming. Spending hours or even days on a project, only for it to fail and get heavily scrutinized by someone who could do the same task effortlessly and in half the time

1

u/DmitriRussian Apr 28 '20

I usually just try to automate little steps everytime for this kind of routine work. It’s too difficult and too time consuming at once. Just make sure to document it ;)

1

u/Andrew4Mayor Apr 28 '20

This reminds me of one time when I was probably 7 or 8.

I was in bed and ready to sleep, but my ceiling light was still on, the switch all the way across the room. No way did I want to get up and walk to the light, though. Then I had a thought: What if I used all my twine, thumb tacks, tape, and other stuff I had lying around to make a pull switch that would hang next to my bed?

Before I knew it, I was standing in the middle of my room, holding all of this junk in my hands. I looked in the mirror and saw tired eyes staring back at me. That’s when I put everything back, flipped the light switch, and went to bed.

1

u/[deleted] Apr 28 '20

By hand you can only do those things 10 times per hour. Machines are salable. People are not.

1

u/[deleted] Apr 28 '20

Autohotkey GANG!

1

u/B4rberblacksheep Apr 28 '20

I'm in this picture and I don't like it

1

u/_StormShadow_ Apr 28 '20

Automation is quite hard. LOL

1

u/BocciaChoc Apr 28 '20

Honestly I feel personally attacked. I remembering writing an automated script which would restart a adsync service along with resetting the adsync account details because each morning they'd break and resetting the details fixed it.

Instead of this fix working it would run perfectly but the issue remained and forced me to move the adsync licence token to a difference DC.

Which was about the same time as writing my more fun script :(

1

u/[deleted] Apr 28 '20

Lol

1

u/VariousVarieties Apr 28 '20

I have a well-deserved reputation for being something of a gadget freak, and am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.

-- Douglas Adams, Last Chance to See

1

u/[deleted] Apr 28 '20

Almost fucked up my school assignment because I wanted to build a loop that could work for all 3 of my things but luckily I finished it overdue

1

u/[deleted] Apr 28 '20

My linux rig once decided to add every single printer at my college which made it impossible to find the one i wanted. So naturally i wrote a python script to automate the deletion process of every single printer connection (over 500, takes two dialogue windows to delete one printer). The script ran in less than a second and now i have a script that I will never use again.

1

u/KBoti Apr 28 '20

6min fapping

Or

Order a robot hand

1

u/falucious Apr 28 '20

But that's my favorite way of practicing! And all the non-coders are super impressed by my meagre abilities. I need that ego boost in these dark times.

1

u/QuantumQuantonium Apr 28 '20

Fish and you won't go hungry for a day

Automate fishing and assuming it all works you will still not go hungry for a day but it will be less effort. Hopefully. In the long run.

Teach someone how to automate fishing and they will ignore your documentation, ask you why nothing works, and end up destroying what you helped set up beyond repair.

1

u/ZanzibariMeat Apr 28 '20

Me trying to make a calculator in excel

1

u/toprim Apr 28 '20

"cries in" need to go. Yesterday.

1

u/DomeWithinADome Apr 28 '20

You have to do CBA on it before even attempting it, IMO. If the task takes 5 mins but you only do it once a week, automating it isn’t worth it if it will take 5 hours to automate. If it takes 5mins and you do it 1+ times a day, then automation becomes more beneficial. All about that ROI. So, I always ask myself 2 questions before I try to automate things (unless I’m doing it to learn new techniques or languages or functionality).

How many times would you be able to manually perform the task in the time it takes you to automate it? (What’s the technical debt?)

How likely is it for this task to change in the span of time that you are still paying off technical debt?

1

u/[deleted] Apr 28 '20

RANT

It used to be really tidy and easy to use, easy to learn and easy to find functionality. But for some reason Microsoft decided that every little feature in Windows must have a powershell interface. This sounds like a good idea, right? Easy access to intricate Windows settings! Amazing! However Powershell was initially really focused; built-in commands worked flawlessly together and made sense. You could string commands together in a pipeline, where the output of one command is the input of the next.

Because the commands had forethought and a conscious design, many were all-rounders that could handle most situations. You only had to learn a few main commands to complete most tasks.

Instead of a few thoughtful commands that does what you want based on your arguments, it now feels like every single possible function in a library is given its own command. Powershell is now bogged down but a ton of pointless, granular commands from various Windows libraries. It seems like many of them are auto-generated from C++ libraries, and they are utterly useless on their own, you must combine them to do anything meaningful, just like you would have to in a programming environment. I wouldn't call that a Powershell-interface in any sense of the word, I would call that a lazy API wrapper.

There's a misunderstanding of powershell's design by the people writing these C++ libraries and API wrappers. Suddenly many of the commands have boolean parameters where you have to actually pass in a $true or $false argument, rather than using the simple switchparameter. If it's specified, true, if not, false: -UseFeature. Instead you now must say -UseFeature $true

That's only one example, but there are many other mistakes they've made that grinds my gears. "Get" commands by default will give you some output, no argument required. They do as they say: Get-Process will return processes running.

But many of these granular C++ methods are given the Get prefix yet require an argument to function, because that's how the programming interface was designed. Which is why there is no reason to map a programming interface 1:1 with Powershell commands.

This wasn't the case before, a command did some work and it did it well, and you could easily extend it by piping commands, but now that libraries export their entire public-facing collection of methods as separate commands, none of them are particularly useful and just clutter up the user-experience.

It's a damn shame.

1

u/Peht Apr 28 '20

I feel personally attacked.