Single-User Mode |
It was a common occurrence for Jaroslaw F.s brother, Andrzej, to call him for help. Andrzej worked as a data-entry specialist for the Polish Ministry of Employment, while Jaroslaw was part of the ministrys IT department and moonlighted as a Python programmer.
One day, Jaroslaw answered another call from Andrzej. No sane person can do this job, Andrzej started. There just arent enough hours in the day.
Hours in the day? You enter data and run reports using web software. Its not that difficult.
No, you dont understand. The ministrys starting a new labor force program, and Im in charge of the data entry. But there are too many records to enter by hand.
Andrzej, Im really tired of this, Jaroslaw said. Im going to write you a script to help with your work, and in exchange you dont call me at work for six months. Deal?
Jaroslaw had never actually seen the software Andrzej used to enter data. Just getting to Andrzejs department required signing an authorization form at the front office, then a half-hour wait until his supervisor gave the go-ahead. But Jaroslaw knew writing the script for his brother wouldnt take very long.
Andrzej showed Jaroslaw to his desk and opened a browser. The web application looked current circa 1998, as if someone mocked up a Windows GUI in Internet Explorer 4. There were rows and rows of grey tabular data, text set in black Tahoma. Next to each cell was a button marked Edit.
You press the button to edit each cell, which takes a few seconds to load, Andrzej said, demonstrating. Each cell, and every row, must be entered one at a time
Surely theres a bulk import somewhere. Jaroslaw scrolled down the page, looking through buttons labelled Income Report and Demographic Report. There was nothing marked that looked remotely like a bulk import feature. How long does it normally take you to enter a row?
Five minutes. I usually get about 10 records an hour. There are 400 records, and my boss needs them done by the end of Sunday. That left five days. I still have reports to run while I do this. Thats why I need your help.
Okay, Jaroslaw said, cant you get someone to help you with this? Five people entering data would mean itd get done in a day.
Even if we had that many people to spare, there cant be more than one person entering data at a time. The system would crash.
Jaroslaw chuckled. Oh, come on. No web application forces a single user to enter data.
A year ago, we tried using two people at a time, Andrzej whispered. A whole dataset was corrupted. It set back the departments mandate by six months, and my last supervisor was fired because of it. My new supervisor wont tolerate any further delays.
A CRUD-like web interface, with no parallel data entry allowed, it seemed deliberately designed to make one persons life miserable & and that person was Andrzej.
Its a good thing I work in IT, Jaroslaw said. Because what you need is a tailor-made import script, and Im the one who can write it for you.
First, Jaroslaw installed Python on Andrzejs computer. If Jaroslaw were about to exploit the ministrys applications, he wanted to use a language he was familiar with. Next, he entered a few sample rows from the dataset Andrzej was burdened with. He logged every HTTP request the web application made, making a list of calls his script would need to make. Finally, he converted the Excel file the data came in to .csv so his script could consume it. It was tedious, but not as tedious as Andrzejs burden.
Let the script run overnight, Jaroslaw said. If anyone asks, tell them I did this on my own initiative. It should be done by morning.
The next morning, Andrzej himself went to see Jaroslaw in the IT department. He looked relieved. You just saved me four days of manual data entry.
You can use it on other datasets, Jaroslaw said. Just convert the files to .csv and pass in the filename as an argument from the command line. And make sure no one else is entering data while its running.
Thanks, Andrzej said. So, call you in six months?
Jaroslaw shook his head. This ones on me. I had no idea what torture they put you through until you showed me.
[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!
| Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |