Live data from Hacker News

Learning to code kept me sane when I was a diplomat

vikparuchuri.com

11–20 of 51 posts

Re: Learning to code kept me sane when I was a diplomat

#11

> I decided to write a program that clicked on things. I cringed a little. I'm glad he's learned enough to know now that this is not the right approach.

The problem of course would have been interacting with the second DB considering the fact that it was a "separate program" as the author states. If the program wasn't offering an interface to interact with it outside of the GUI and especially if it wasn't making any network calls upon querying (although hacking network calls could have been quite difficult for a beginner) I am not sure how the process could have been done differently.

Re: Learning to code kept me sane when I was a diplomat

#12
The biggest problem is not the lack of code and automation.

The biggest problem is that apparently Guyana allows the US embassy to search their criminal records system:

> Search a different database with a separate program (“DB2”) for criminal and other history

So either Guyana allows the US wholesale access to its criminal records system or the US systems gather this data more or less illegally from somewhere.

edit: downvotes? seriously?

Re: Learning to code kept me sane when I was a diplomat

#13

This is a fantastic article and illustrates a HUGE problem in government systems, where data gets aggregated, but not associated.

I had a government job and my boss loved me for doing automation stuff. All of the documentation and data requirements seemed to be written as though a person had to manually do everything -- like they expected a human brain to be making decisions at every step of the process.

It just reeks of a lack of care not only for the power of automation systems, but disrespect for the people who have to do that work. Design your processes in such a way that easy stuff can be done easily and important stuff can be done by people who have some authority.

This is my biggest (personal) problem with bureaucracy. "You have to do it this way because it's the only way _I_ know how to do it, and I don't care if you know a better way, because you don't get paid enough to have good ideas."

Re: Learning to code kept me sane when I was a diplomat

#14

The biggest problem is not the lack of code and automation. The biggest problem is that apparently Guyana allows the US embassy to search their criminal records system: > Search a different database with a separate program (“DB2”) for criminal and other history So either Guyana allows the US wholesale access to its criminal records system or the US systems gather this data more or less illegally from somewhere. edit:…

I have no idea what DB2 was. It's my understanding that every country in the world wants to know the criminal history of anyone asking for a visa for any reason (the host country may ignore that history, if it believes the crimes were politically motivated). And it's my understanding that INTERPOL allows countries to get at least some criminal records information. And there is clearly some system in place for countries to make extradition requests -- which would require some criminal history information.

So it's not clear to me that the US must have wholesale access to Guyana's criminal records system, or that it must be illegally gathering data to populate DB2.

Even without INTERPOL, I would expect countries to have treaties to share some criminal records information. If Guyana is trying to capture a criminal, clearly it's in Guyana's interest to ask countries to help prevent that criminal from fleeing.

Re: Learning to code kept me sane when I was a diplomat

#15

The biggest problem is not the lack of code and automation. The biggest problem is that apparently Guyana allows the US embassy to search their criminal records system: > Search a different database with a separate program (“DB2”) for criminal and other history So either Guyana allows the US wholesale access to its criminal records system or the US systems gather this data more or less illegally from somewhere. edit:…

I have no idea what DB2 was. It's my understanding that every country in the world wants to know the criminal history of anyone asking for a visa for any reason (the host country may ignore that history, if it believes the crimes were politically motivated). And it's my understanding that INTERPOL allows countries to get at least some criminal records information. And there is clearly some system in place for countri…

> It's my understanding that every country in the world wants to know the criminal history of anyone asking for a visa for any reason

I'm actually fine with that. And if I ever apply for a visa, I gladly sign a waiver allowing the respective country to request the data from my country. But I am not fine with any government in the world being able to research my criminal record without authorization! Push, not pull.

> If Guyana is trying to capture a criminal, clearly it's in Guyana's interest to ask countries to help prevent that criminal from fleeing. There's a system for this: take away the criminal's passport and don't let him out of the country. That's a job of regular Guyana border police.

edit: oh, and who guarantees that (e.g.) the US respects expiration dates? In Germany, records have to be entirely wiped after certain dates (5-20 years, http://www.gesetze-im-internet.de/bzrg/__46.html) - but I highly doubt that the US respect this and just keep the data instead.

Re: Learning to code kept me sane when I was a diplomat

#16

The biggest problem is not the lack of code and automation. The biggest problem is that apparently Guyana allows the US embassy to search their criminal records system: > Search a different database with a separate program (“DB2”) for criminal and other history So either Guyana allows the US wholesale access to its criminal records system or the US systems gather this data more or less illegally from somewhere. edit:…

Just to clarify, we weren't accessing any Guyanese databases. And as far as I know, nothing illegal was going on.

Re: Learning to code kept me sane when I was a diplomat

#17

> I decided to write a program that clicked on things. I cringed a little. I'm glad he's learned enough to know now that this is not the right approach.

Clicking on things is the primary and often only interface that most Windows programs support. And frankly it can be much easier to script some actions with something like Java's Robot class than to dig through the cesspool that is MSDN trying to figure out how to get the same simple things done with the overly-complicated and poorly documented COM interfaces that might or might not exist.

Also, I'm not sure which is more embarrassing, having to write code to interact with the GUI or having to write VBA code.

Re: Learning to code kept me sane when I was a diplomat

#18
post #16

The biggest problem is not the lack of code and automation. The biggest problem is that apparently Guyana allows the US embassy to search their criminal records system: > Search a different database with a separate program (“DB2”) for criminal and other history So either Guyana allows the US wholesale access to its criminal records system or the US systems gather this data more or less illegally from somewhere. edit:…

Just to clarify, we weren't accessing any Guyanese databases. And as far as I know, nothing illegal was going on.

How else could you then search for the criminal history of Guyanese citizens? Did the Guyanese government push all their data to the US?

Re: Learning to code kept me sane when I was a diplomat

#19
Before you knock on "writing code that clicks things" remember that on Windows clicking things is the primary if not solitary interface to most of the system. Even the administrative interfaces are secondary to the visual interface. A lot of programs don't offer an API available to outside processes.

The most important thing about any program is correctness: does it work and do what it is supposed to do. The only thing cringe-worthy about having to script GUI interactions is that fact that the operating system and environment requires it.

Re: Learning to code kept me sane when I was a diplomat

#20
post #3

The article shows an interesting illustration of the disconnect between programmers and normal computer users. Like the author says at the beginning, any experienced developer knows that automating interaction with a GUI is a crazy idea. It's a painful, fragile way to move data around. But to the author and anyone who's done data entry, it's an improvement to their workday that demonstrates the power of programming.…

> all the ones that start by demonstrating how to do basic arithmetic in $LANGUAGE and go on to a detailed explanation of $LANGUAGE's object system.

the fact that i knew exactly what you're talking about as soon as i read it is pretty good evidence that you're right.

the best tutorials i've ever seen are ones that start with a moderately complex program and step through it line by line, explaining in plain english why things are being done. this is how both human beings and computers parse programs, so i'm not sure why a tutorial writer would do it any other way!

i think the current trend of embedding documentation within your program as markdown on github is a pretty close approximation of that.

Post reply on HN