News for hackers. Stuff that matters.
Re:Ask HN: What's a promising area to work on? by Mister_Snuggles on Tuesday October 22, 2019 @01:11PM (#21326108)
One of the most useful programs I made at my last job was an automated letters program.

We had a whole slew of standard letters that we'd send out, most of the time requests would go to the typing pool (yes, this was a thing) that were basically "Do letter ABC for client XYZ", where letter ABC was a standard thing that always went to the same recipient.

I built a screen in our system that let you tell it to request a letter (only the simple letters, obviously), it would pull the relevant data out of the client file and write the request out as an XML file. On the other side of things, a VB6 program would watch a folder for those XML files to appear and go through OLE Automation (as it was called back then) to make Word fill in the letter, print it, print an envelope, and save the result in the client's folder.

This kind of thing is an absolutely incredible time saver.

Re:Ask HN: What's a promising area to work on? by mring33621 on Tuesday October 22, 2019 @01:30PM (#21326345)
A whole lot of valuable business software is essentially domain-specific or workflow-specific mail merge.
Re:Ask HN: What's a promising area to work on? by Mister_Snuggles on Tuesday October 22, 2019 @01:42PM (#21326537)
I've never thought about it that way before, but you're absolutely right.

Another "domain-specific mail merge" that I built was a tool to pull summary data out of the client financial records and populate specific fields in some off-the-shelf income tax software.

That was a terrible tool to write and maintain. The tax software's import feature didn't actually work correctly. I reached out to the vendor and the response was basically "Works for us", so doing it the right way wasn't an option.

Instead, I used VBA to blindly enter data into the program using SendKeys[0]. Maintaining the program was a case of tabbing through and counting the number of times I had to tab. Enter first name, tab, enter last name, tab three times, enter address line 1, etc. Next year when the forms in the tax software changed I'd have to add/remove tabs in the appropriate places, sometimes input stuff in a different order, etc.

As a program, it was horrible, horrible code. As a useful tool for the business, it was incredible. It saved a ton of time and the staff that used to do this by hand, in addition to doing actual work on the more complex files, were incredibly happy.

Overall, it was completely worth it.

[0] https://docs.microsoft.com/en-us/office/vba/language/referen...

Re:Ask HN: What's a promising area to work on? by folkhack on Tuesday October 22, 2019 @01:57PM (#21326701)
> SendKeys

Holy cow why didn't I know about this 6 months ago =|

VBA is something I have had to reluctantly learn. It's a horrid/ancient language. Sorry if someone gets offended at that but to someone who uses a lot of modern development languages/tools it's just very very difficult with near-zero "nice to haves"... you just end up taking this huge lib of code around with you with functions like "inArray" etc.

> As a program, it was horrible, horrible code. As a useful tool for the business, it was incredible.

That's something that's rough for us engineers but can be hedged with great documentation, both inline and and otherwise =)

Re:Ask HN: What's a promising area to work on? by alexhutcheson on Tuesday October 22, 2019 @03:07PM (#21327399)
Is anyone aware of a good resource to learn VBA? All the resources I've seen online are either tutorials for very quick hacks, or assume you have 0 programming knowledge. I would love a "VBA for people who are familiar with at least one other programming language".
Re:Ask HN: What's a promising area to work on? by BubRoss on Tuesday October 22, 2019 @04:05PM (#21327990)
You don't have to learn VBA to do this, you can just include windows.h in C and call the SendKeys function.
Re:Ask HN: What's a promising area to work on? by dividedbyzero on Tuesday October 22, 2019 @05:57PM (#21328855)
There's also java.awt.Robot – I've used it a lot for similar things, really neat if you already have Java/Scala code for getting the data to fill in.
Re:Ask HN: What's a promising area to work on? by alexhutcheson on Tuesday October 22, 2019 @05:17PM (#21328580)
I'm interested in scripting stuff in Excel.
Re:Ask HN: What's a promising area to work on? by conductr on Tuesday October 22, 2019 @07:47PM (#21329665)
I’d recommend learning at least one other programming language, then use the tutorials.
Re:Ask HN: What's a promising area to work on? by tudelo on Tuesday October 22, 2019 @02:43PM (#21327167)
Do you use AutoHotkey ever?
Re:Ask HN: What's a promising area to work on? by folkhack on Tuesday October 22, 2019 @02:58PM (#21327307)
Yep! Sparingly but for some Windows-based tasks you can't beat it. Also it's a solid solution that has great support/devs behind it so it definitely has a home in my toolbox!
Re:Ask HN: What's a promising area to work on? by aswanson on Tuesday October 22, 2019 @03:12PM (#21327440)
I abhor VBA as much as any sane person but this sounds so useful.
Re:Ask HN: What's a promising area to work on? by basch on Tuesday October 22, 2019 @02:06PM (#21326810)
Which is actually a terrible step backwards when it comes to interchangeability and iteroperability.

You have data in a database, you flatten it into a non structured document, send it, and then the other end uses data entry to add it to a database. What should be the realm of EDI/CrystalReports/Blockchain take your pick, instead everyone wants to interchange data in the pretty human readable format, as opposed to just rendering it that way for humans while also communicating the raw structured data.

Re:Ask HN: What's a promising area to work on? by menacingly on Tuesday October 22, 2019 @04:26PM (#21328164)
This is sort of like saying it would be a step backward to drop humanoid robots into an office and let them take over tasks. A large part of the problem is that right now, a lot of the interfaces for performing work are optimized for humans, so automation that uses those interfaces is drop-in
Re:Ask HN: What's a promising area to work on? by dividedbyzero on Tuesday October 22, 2019 @06:03PM (#21328915)
If you build things like that, you probably don't have authority or leverage to rebuild everything from scratch, and even if you did, it might be much costlier to disrupt an inefficient web of human-computer-paper interaction that works reliably and that everything else has adapted to.