Yes, a bit specific, but I need to store some links!
This blog entry doesn't discuss any code, because I ended up doing very little work on the software. I was busy running it, and the app tends to take over the UI, making programing difficult. For the most part, it functioned as expected, but a couple things changed in how I actually used it.
I added a text box to restrict scanning for MXD files to a subdirectory. This new feature allowed me to set the source root and destination root directories, and then type the subdirectory to be processed. The text box could also be left blank.
I used this feature a lot.
It was looking pretty grim for the file copier. The main problems were twofold:
First, the app sometimes crashed on bad data. The Windows crash-reporting dialog box came up, and all work stopped until it was dismissed.
I'm finally running that program I've been writing. For the most part, it was "bug free" inasmuch as the different parts ran their test cases correctly, and it runs fine on a small subset of data. Of course, it's not like I ever really learned the system completely, so there are a lot of situations that I'm not handling (or even aware of). Moreover, because the users probably don't use all the features of the software, it's not likely that a complete solution is necessary. No project is debugged "enough" until it operates on real data, in a real situation.
It's going to be a lesson about recursion. It's strictly beginner level.
I don't have any code today, because I was working the polls yesterday, and spent most of today's worktime tuning that file copier. I hit a big problem because of some confusing, mis-coded loops. Here's the scenario in pseudocode (I don't want to fire up the Windows box just to get this code).
for each item in collectionA
if type of item is Layer then
else if type of item is LayerGroup then
for each subItem in item
This article discusses debugging a function by rewriting the code.
I'm not sure what I did wrong here, but, my first version of this function didn't work. The function returns true if the current time is withing two time spans. This code was written in a rush, without really thinking about how to do it, because it seemed pretty straightforward. The code, however, was a mess (and embarassing).
Private Function itIsTimeToWork() As Boolean
' Get the two start and end times, and determine if we're within
' the intervals.
For some reason or other, I didn't get an email response from the client on this gig*, and the week was hectic, so instead, I just worked on making the UI a little nicer. VB has a lot of controls, including a background threader, some standard dialogs, and a serial port. This is giving me a real "Rip Van Winkle" feeling, having been over in Unixville for a while.
(* It was lost in my huge email pile. My bad. No matters... the program got a nice facelift.)
This document explains some terminology used on other pags.
- A technology layered on OLE that supports a method, IDispatch(), that executes method calls by name (by a string argument). IDispatch() solved the problem of scripting languages being late bound, and not able to handle multiple interfaces. ActiveX also covered other technical things, but the IDispatch feature is relevant to this topic.
- A group of classes. The classes generally work together, and form a namespace. Analagous to a Java package. The .NET assemblies are analagous to the Java class libraries.
- CLR, Common Language Runtime
- A "virtual machine" that executes programs coded in CL, a platform-neutral assembly language produced by compilers. The CLR is also called a "managed environment" because the virtual machine takes care of many runtime issues like allocating memory.
I'm bummed out, because a tutorial about events, delegates, and multithreading that I wrote got lost. There was some database problem on the server, and the text didn't get saved. It just compiled information from the last blog entires, but, it was pretty good. Oh well, I must forge on with this little project.
The latest really good news is that the threading stuff is working. I also added a little time-checking feature so that the batch processor will work for a while in the evening, take a break while backups happen, and then work again in the early morning.
Again, I didn't do much hacking. Yesterday really took it out of me, and I slept a lot (finally). Instead of hard stuff, a few simple things got done.
Copy URL+ is a great extension for [Firefox] that helps you create links to web pages. Instead of copying the URL, it lets you copy the URL-plus-title. Not only that, with a tweak, you can have HTML copied to your clipboard. It's a must-have for any blogger, writer, whatever.
I didn't hack today. Too much stuff going on, so, I did a lot of hanging out and stuff. I did manage to get a little reading done, and found a neat little feature.
A Type List is a way to let your class operate on different data types. For example, if you created a Tree class, a type list could specify that it's a tree of Oranges, or a tree of Integers. Of course, if you just made it a tree of variants, and used variants everywhere, then it wouldn't matter.
My unexpected excursion in to .NET programming has been leading me to learn a lot of little things that are new to me. I'm chronicling them here as an assistance to others doing the same, and to get some personal insight into how I learn these things.
Last night was spent reading a bit more about ADO.NET. There was a very good MSDN article, Best Practices for Using ADO.NET, that gives you an overview of how to use ADO.NET. It's best to read it after getting some experience with ADO from another source.
For the past week or so, I've been learning VB.NET (emphasis on .NET) to do what I thought a perl script and a little VBA was going to knock out. I'll be blogging a little bit on what I learn, as I learn it. To catch up on what's happened so far, see: /node/376 and the parent nodes.
This area of the site was getting really chatty, so I've removed it from the Software book, and moved it under DIY notes. The remainder of the experience will be put on the blog. Consider all the material on this page obsolete.
I was asked to help migrate a large batch of ArcMac GIS files to a new server. The problems: the files contain references to other files, and all those files must also be copied. Also, these files are mixed in with other files, not pertinent to GIS, on a single server. To manage growth, it's necessary to move the GIS files out.