Bridging The Gap Between Linux And Windows.

Can't we all just shut up?

There are a lot of ways to connect Linux and Windows together: Cygwin, VNC, even Chrome RDP works. But what if you had to do something real specific, like recording a window on the Windows desktop from a Linux command line?

Well, I went down that well, and hit the bottom pretty hard. But, I came back up with nickels, and I’m going to share those nickels with the world.

What was I talking about again? Continue reading “Bridging The Gap Between Linux And Windows.”

C++ Code Snippet – File Locking

I program applications that run on IBM AIX servers at work. Multiple people will be running different instances of my programs, and if any of my programs are writing to a file at any time, it could become problematic. For example:

  1. Person 1 runs MyProg, which opens MyFile.txt, which contains the text “Hello, World.”
  2. Person 2 runs MyProg, and also opens MyFile.txt, which contains the text “Hello, World.”
  3. Person 1 now makes edits to MyFile.txt and saves it, so now it reads “Hello, World. Beautiful day today!” He exits the program.
  4. Person 2 then makes his edits to MyFile.txt, which reads “Hello, World. Person 1 is a jerk!” and saves.
  5. Person 1 gets fired.

Because there’s no locking, data can get overwritten without anyone noticing.


6. Person 1 goes outside and finds (what's left of) his bike

Continue reading “C++ Code Snippet – File Locking”