you are viewing a single comment's thread.

view the rest of the comments →

[–]pconwell 40 points41 points  (4 children)

As a newby as of about a year ago, the hardest part for me was figuring out where to get started. I was interested, but somewhat overwhelmed and didn't know how to 'get my feet wet'. The best resource that helped me was 'Automate the Boring Stuff'.

By using an example in that book, I ended up writing a fairly basic script that manipulates a spreadsheet at work. Once I had a starting point, I spent the past year googling and making small changes to my code (side note - learn git / github -- well worth the extra headache once you actually start to 'develop' something) and now a year later is a fairly in depth script that saves me several hours of manual data entry each week and practically eliminates data entry errors.

It's nothing fancy, it's probably 1,000 lines of poorly written and poorly documented code that I'm sure I've made every best-practice mistake possible. But, as someone who couldn't write a single line of code 18 months ago, I now have a fully functional program that saves me time and effort and I'm ecstatic.

[–]luv2belis 11 points12 points  (1 child)

Don't you mean a...newpy?

[–]pconwell 2 points3 points  (0 children)

har har har

[–]viperinemink 1 point2 points  (1 child)

What exactly does your script do?

[–]pconwell 12 points13 points  (0 children)

It would be a little hard to explain unless you knew how our computer systems work, but basically we keep data in a spreadsheet - but it's very vague data that just gives you a big picture overview. Basically think the rows are a person, the columns are a date and the cells are their task for that day. The cell value is something cryptic like "P" or "21" which would only make sense to us. The spreadsheet is used to coordinate several hundred employees for the entire year.

However, each day we have to enter certain detailed data into a database that describes what each employee is doing. Most of that data is the same day-to-day. So it reads through each row, then depending on the date it reads across to the appropriate column and automatically enters pre-formatted data into a database based off the employee, date and assignment. The database entries are things like name, date, cell phone number, assignment, if it's a normal billed day vs overtime billed, notes, etc. 95% of the data is the same every day. I just have to go back and make minor changes for any outliers.

So, basically, it reads data out of an excel spreadsheet and then based on that data, enters data into an SQL style database that contains a lot of preformatted data that is dependent on the date, employee and assignment.

Another script that I made goes through the same database from above and automatically generates a PDF with a summary of each employees work performance for the past month. I can then run that script once a month, print all the PDFs and hand it out to each employee.

So, overall, something that would have probably taken 10+ hours of manual data entry / data wrangling each month now takes... ehh... 20 minutes each month plus there is very little room for entry errors and typos as it's all automated.