Why it's fun to know a scripting language.

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

gorcorps

aka Brandon
Jul 18, 2004
30,741
456
126
Yeah never automate too much of your job. You're basically making it that much easier for the company to get rid of you. A company's #1 priority is to find ways to get rid of people so they can maximize profits. They'll lay off people in a heart beat if it does not affect productivity, thus, profits. You always want to look busy and be needed.

I remember an article from a while back saying that often times people are passed up for promotions not because they themselves aren't qualified, but that they don't have a suitable replacement for themselves that management would trust. That's why there's a lot of high level executives that live by the "work myself out of a job motto", where the company is comfortable replacing that person enough to move them up when the time is right. If you want to play games to make your job seem more difficult go ahead, but I certainly don't want to work in the same cube for the rest of my life... so I won't do that.

Personally if I felt I had to hide the stuff I've made to make my life easier just to keep my job, I'd be looking to leave the company anyway. I can't imagine working in that kind of environment, where I'd be scared to show my innovations in fear of losing my job. Fuck that
 

Red Squirrel

No Lifer
May 24, 2003
70,561
13,801
126
www.anyf.ca
I remember an article from a while back saying that often times people are passed up for promotions not because they themselves aren't qualified, but that they don't have a suitable replacement for themselves that management would trust. That's why there's a lot of high level executives that live by the "work myself out of a job motto", where the company is comfortable replacing that person enough to move them up when the time is right. If you want to play games to make your job seem more difficult go ahead, but I certainly don't want to work in the same cube for the rest of my life... so I won't do that.

Personally if I felt I had to hide the stuff I've made to make my life easier just to keep my job, I'd be looking to leave the company anyway. I can't imagine working in that kind of environment, where I'd be scared to show my innovations in fear of losing my job. Fuck that

Sure if there are promotions available but if you're at a job that you're happy with then you want to just keep it.

Say you work at a factory and your job is to put the covers on top of bottles and you find a way to automate it, now they don't need you anymore. In this economy promotions are rare, companies are trying to get rid of as many people as possible and outsource as much as possible, not create jobs that pay more.

You don't want to purposely try to do things for job security though, like if you're a programmer you still want to comment your code and follow process. :p But don't go above and beyond if it could lead to automating your job.
 

Jeff7

Lifer
Jan 4, 2001
41,596
20
81
That's why you don't comment your code.
Expert-level.


Example:
This program renders a generic RPN expression in ray-traced animated GIF form. The expression in spatial variables x and y is specified on the command-line with the required resolution, and an animated GIF showing a fly-around of the resulting surface is output to stdout.

A snippet of code:
Code:
#define o(a,b,c,d) a##f b##f c##f d; a##g b##g c##g d;q--
#define Z(z)if(*j==z)
#define c(z,p) Z(z){y;v p##=r;o(b,[q-1]=b,[q] p b,[q]);}
#define y q+=t;t=0
#define r w[q]
#define v w[q-1]
#define w(a,m,f) Z(a){y;r=m(r);q++;o(b,[q-1] = -b,[q-1]*f(r)+0*b,[0]);}
#define A(p,w,o) for(p=0;p<w;p++)_(o)
#define P(a) for(a=Z;a<Z;a++)
#define _ putchar
typedef double o;
typedef char z;
o A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y, E_, w[20], bf[20], bg[20],x=-1.3/8,p,d,l=0,h=4e-3,f,m;
z e[17] = "FKE<<gMAQUDIYO9\"=", *k, *j; o g(o p, o d){int q =-1,t=0;j=k;while( *j ){c(45,-);Z(100){y;q++;r=v;q[bf]=bf[q-1];q[bg]=bg[q-1];}Z(42)
     {y;v*=r;o(b,[q-1]=r*b,[q-1] + v*b,[q]);}Z(44){t=0;q++;}Z(116){f=v;v=r;r=f;f=bf[q];q[bf]=bf[q-1];bf[q-1]=f;f=q[bg];bg[q]=(q-1)[bg];bg[q-1]=f;
 
Last edited:

SketchMaster

Diamond Member
Feb 23, 2005
3,100
149
116
Funny you guy talk about automating yourself out of a job, because I'm trying to do that. My current job could easily be replaced by some good planing, a solid process, and a butt load of scripts. There are some things that I would not automate just for safety sake, but it would leave me with a ton of spare time.

I've already done some cross team work, and been told I could move up/over to another team to help them out with more interesting stuff. To make the full-time move I just need to get the daily grind handed off to a computer, and only check in when something needs hands-on work.
 
Last edited:
Oct 25, 2006
11,036
11
91
Funny you guy talk about automating yourself out of a job, because I'm trying to do that. My current job could easily be replaced by some good planing, a solid process, and a but load of scripts. There are some things that I would not automate just for safety sake, but it would leave me with a ton of spare time.

I've already done some cross team work, and been told I could move up/over to another team to help them out with more interesting stuff. To make the full-time move I just need to get the daily grind handed off to a computer, and only check in when something needs hands-on work.

The feeling of doing a months work of work in under 5 minutes is amazing.

Gives me more time to nef.
 

andylawcc

Lifer
Mar 9, 2000
18,183
3
81
i use excel extensively but thought i could do better. in a nutshell, will scripts (like PERL) automate literally anything? if so, where should I start?
 

WhoBeDaPlaya

Diamond Member
Sep 15, 2000
7,415
404
126
i use excel extensively but thought i could do better. in a nutshell, will scripts (like PERL) automate literally anything? if so, where should I start?
A good scripting language (Perl, Ruby, Python, etc.) is like duct tape :)
 

Childs

Lifer
Jul 9, 2000
11,313
7
81
i use excel extensively but thought i could do better. in a nutshell, will scripts (like PERL) automate literally anything? if so, where should I start?

I would assume you just need an Excel module to parse and write the data. If you have no experience in perl, I would suggest python or ruby, although I have never tried modifying Excel files in either. Just a quick google search shows there are xls/xlsx modules for perl, python and ruby.

Free starter Python class from Google:

https://developers.google.com/edu/python/
 
Last edited:

gorcorps

aka Brandon
Jul 18, 2004
30,741
456
126
Sure if there are promotions available but if you're at a job that you're happy with then you want to just keep it.

Say you work at a factory and your job is to put the covers on top of bottles and you find a way to automate it, now they don't need you anymore. In this economy promotions are rare, companies are trying to get rid of as many people as possible and outsource as much as possible, not create jobs that pay more.

You don't want to purposely try to do things for job security though, like if you're a programmer you still want to comment your code and follow process. :p But don't go above and beyond if it could lead to automating your job.

Guess it depends on the company... a bad company will look at how you automated your job and say "good, now we don't need you anymore". A good company will look at it and say "look at what he did, let's see if he can do it again" and now you're asked to work your cost savings magic in other areas.
 

mikeford

Diamond Member
Jan 27, 2001
5,671
160
106
The old wisdom on a new project was spend 50% of your effort writing tools to support the tasks. Course now a lot of tools exist ....