• CADOP5

    Happy Ides of March! Watch your backs, and remember: the day ain’t over ’til it’s over…

    I took a graduate-level computer-aided design course in college — way back when CAD/CAM/CAE was really not a consumer-grade product — and a good part of the course was about optimization. I happened to think about that the other day when I was idly browsing through various Python modules (the way one does), and I ran across a genetic algorithm package.

    Genetic algorithms had their own vogue a few decades back, but that long-ago was long after I left college. Still, playing with it got me to reminiscing about the the things we did way back in school, and about the program we used and our professor (Dr Michael Pappas, who was its author), so I Googled him and the program.

    Dr Pappas passed away in 2015 — I found his obituary. He was a major player in the computer-aided and biomedical engineering worlds, and was the co-inventor of the artificial knee, among other things. I knew he was a big deal back in the day, but I guess I never realized how big a deal he was. (He had a pronounced limp and a seriously deformed back/hip, so I suspect he had some skin in the artificial joint game.) He was fairly intense, and was one of those guys who always seemed on the edge of blowing his stack, though in fact he was always decent and patient with us students. That was one of my all-time favorite classes…

    The optimization program itself was called CADOP5; it was written in FORTRAN and it was a bear to use. (I remember him telling us, at the start of the course, that we needed to start working now on our optimization project, because it couldn’t be finished in a day, or a week, or even two weeks… I was probably the only one in the class to get an A on the project, and I wasn’t even able to find the optimum solution — though I was able to say why.) When I searched for CADOP5, I didn’t find much except this thesis at NJIT. The program given in that paper was a refinement called CADOP8; I might have met the student working on it at some point, but he had his PhD by the time I took the course with Dr Pappas.

    I really did like that class a lot, and its professor, and in fact tried to get Dr Pappas as my thesis advisor, but I got some behind-the-scenes stonewalling from one of his other students/assistants (it took naive me about a year to realize that maybe I’d been undermined), so did my thesis on linkages under Dr Sodhi, and the rest is history — or at least, water under the bridge.

    Back to the Python genetic algorithm: I downloaded it and wrote a little program to test it. It was amazingly easy to use, like all things Python, but it seemed pretty slow to me. (High computation cost? Slow convergence? No idea.) There are many other optimization critters out there in the Python ecosystem, I wonder how they would stack up against that one particular genetic algorithm module, or against those ancient CADOP programs for that matter.

    Anyway, something from the Wayback Machine: this and this are what I was writing fifteen years ago, maybe a month or so before I met Anne.


  • The Corliss Comes Alive

    Happy Pi Day! Here is that post about the steam engines.

    The National Museum of Industrial History has a few gigantic, spectacularly beautiful old restored steam engines, some of them even in operating order. I’ve seen the steam exhibit before, but I have been meaning to go back to the museum to see it again, because my friend Donna’s father just helped restore a new one they got. (George is a retired woodworker and very handy.)

    That new, and newly restored, addition to their collection is a Colt-Baxter “portable steam engine,” patented by a guy named Baxter and manufactured by Colt Firearms as a way to diversify after the Civil War. The Baxter was “portable” in the sense that it was only as big as a big barrel rather than building-sized; it ran at about 15 psi steam pressure and put out about 10 horsepower, was built to run a belt drive, and was ideal for powering small factories, machine shops etc — they sold maybe 300,000 of them over the years. (I learned all this at the Museum on Sunday, and on the Internet yesterday…)

    The museum had a demo day Sunday, where they would power up their Corliss engine — the biggest steam engine they have, and beautifully restored — using compressed air. I figured I’d kill three birds with one stone by riding the Iguana over for a test ride, watching the Corliss in action, and seeing the new Baxter engine on display.

    Here’s a video I made of the Corliss:

    At about 19 seconds into the video you can see what makes a Corliss engine a Corliss: the spider-web of levers running off a central rotating plate are what control the steam valves that feed the pistons. This engine was used to run a water pump; I’m pretty sure that the black part (the front) is the steam engine end, and the green part at the back is the water pump.

    And, here are a few photos I took of the Baxter:

    Colt-Baxter Steam Engine

    (Along the wall in the background, you can see some belt-driven machines on loan from the Smithsonian, drills and lathes and such, that the Baxter would have powered.) The Baxter had its own furnace/boiler built into the lower section, with the piston inside the top of the “barrel” and the bulk of the machinery on top.

    The museum had a few other exhibits, including a few small model engines running, as part of the demo, and one final surprise for me: the Baxter engine was operational! They didn’t have a fire running inside it, it was all compressed air like the Corliss, but here is a video of the operator starting it up:

    In all, a banner day!


  • Walkabout

    Anne’s been gone all week, in Denver helping Emmi with Iris while Kyle came here to do some real estate transactions. He went home Friday, and I’ve been living the bachelor life this weekend. I’m right now waiting for Anne’s much-delayed flight to arrive; I’ve got a little time to kill so here’s another post…

    These are some pictures I took on a walk a few weeks ago. I was just rambling around, on Sand Island and across the Lehigh bridges, no special agenda but I did get a few nice photos, mostly of the river and of Monocacy Creek.


  • Getting Ready For Spring

    I’m prepping for the upcoming Road Scholar rides later this month, and part of that means getting the Iguana back in shape. There’s not much to do really, but I did replace the handlebar grips and the chain. (As an aside: when did quick links — excuse me, “power links” — become so hard to use?) The chain was “stretched” (i.e. worn) a bit but not too much, so I did not expect to need to change out any more of the drivetrain — the wear manifested mostly as a bit of lateral flex, which I suspect messes with shifting. Chain and new grips took me maybe a half hour or so to replace; I did it about a week ago and took it on a few short test rides, and everything seemed in order. Sweet!

    Fast forward to last Monday, when I went out with Anne to do a reconnaissance of the Allamuchy RS route. We didn’t quite prepare ahead of time: I wanted to bring the Kona but couldn’t fit it either on the roof rack (not without an adapter I couldn’t find), or on the rear rack with Anne’s touring bike. D’oh! I put the Kona away and put the newly-refurbished Iguana on the roof rack, and off we went, only 45 minutes late…

    We got to the start and got riding, and within a mile I had issues with the chain skipping on the rear cogs — a sure sign that I should have replaced the cassette. No matter, I was able to find some gear combinations that worked, and the ride itself was very enjoyable — Anne had never done this ride, and I was glad to see she really liked it.

    Our ride:

    As soon as we got home I ordered new chain rings and a new cassette. They arrived Friday and I put them on yesterday — after running over to Doug’s, to borrow some tools I could not find in the basement mess, and today I rode it over to the Museum of Industrial History on Southside to watch them run their steam engines.

    But that’s for another post. For now I think the Iguana is running great.


  • Iris Update

    Not much to say, but here’s a bunch of Iris photos from February. Enjoy! You can almost see her growing, day by day and week by week.


  • Through The Trees

    Well, it’s over: I got it out of my system.

    I don’t even remember why, but I’d been thinking about trees lately (the comp-sci/data structure kind), and that slowly built into a mini-obsession. B-Trees, R-Trees, indexes, recursion… I found myself reading old programming books and Wikipedia articles until I was just about ready to go insane. In all of this, I was itching to find some little project to use them, and couldn’t come up with much more than “build one and look at it,” until I ran across the Wikipedia article for backtracking algorithms…

    Enter the Christmas Gift Exchange.

    Anne’s (large) family does a gift exchange every year, so that rather than everyone buying tons of stuff for everyone else, each person only buys presents for one other family member. (Kids are exempt, they still get tons of presents from everybody.) This keeps things more manageable, and more affordable for the givers, and it tends to make the gifts more meaningful too. Gift givers get their people assigned randomly, and who you’re buying for is supposed to be kept a secret until the exchange at the Christmas party.

    The usual selection process happens after Thanksgiving dinner, when Anne and her sisters put everyone’s name in a hat, and someone pulls names to match against the list of participants. So far so good and pretty random, but there are other considerations: spouses maybe shouldn’t buy for each other, ditto parents and children, or someone ends up buying for the same person several years in a row — the “selection committee” would re-do a selection if the original draw seemed really unacceptable. Then we all get our slips of paper and start our shopping.

    I end up thinking off and on (usually just after Thanksgiving),that this rigamarole could and maybe should be automated, especially in light of the need to keep things random while also avoiding unacceptable giver/receiver combinations. I thought of a few ways that it could be done, and eventually started thinking of this as a problem in graph theory, where each participant could be considered a node in the graph, and each possible gift exchange would be an edge connecting between giver and receiver. Then maybe the problem could be looked at as a problem in traversing the graph, and the solution might look something like Dijkstra’s Algorithm. That was all well and good, but I don’t know enough graph theory to even be dangerous.

    But thinking in those terms made the problem look like it could be handled with tree structures and some kind of recursion, and when I happened across that Wikipedia article something clicked. Hmmmm…

    I wrote a python script to hold some data structures (mostly dictionaries of name lists); once I got that down, the rest came pretty easy: how to add constraints , how to recurse through the backtracking algorithm, etc. I added a few bells and whistles and, surprisingly, the whole thing worked like a charm.

    The most ironic thing about the project is that my results were originally the full set of all possible solutions, saved in a tree structure as nested lists, but once I got the tree obsession out of my system I abandoned that to just return the first randomly selected solution.

    (Actually, that’s not the most ironic part. The most ironic thing about this is that it will never be used — the selection “rigamarole,” as I called it, is actually a fun and much-anticipated part of the holiday rituals.)


  • Recent Reads

    I am currently reading three books:

    Foster (by Claire Keegan), is about a young girl who is sent to live with another family. The book isn’t a long one (I’m about halfway through); it’s very well written, and a sweet story (so far), but there’s a growing feeling of foreboding, of another shoe about to fall… Anne recommended this to me after she read it. Interestingly, the story takes place in Wexford, Ireland, where some of my ancestors came from, and where we spent some time on our honeymoon.

    Cloud Cuckoo Land (Anthony Doerr) is another recommendation from Anne. I just got it from the library last night on my tablet, so I’m only a few pages in but I’m already liking it.

    The last book is a loan from Jeff. Evening in the Palace of Reason (James R. Gaines) is about the fateful meeting between Johann Sebastian Bach and Frederick The Great, the generational and cultural clashes represented by that meeting, and the resulting creation of A Musical Offering. It’s a great story, but the best part of this book is the background material: digressions, biographies, histories of musical theory, the Reformation…

    I keep moving from one to the other, to the other. They’re all great.

    Some other recent reads:

    Still Life by Louise Penny, the first novel in her Inspector Gamache mystery series. Anne loves these books, and so do several of her friends and they’re always talking about them, so I thought I’d give the first one a try. The book was pretty good, and I can see why people like it, but I have to say I’m still not a fan of mysteries — especially here, where the author’s head fakes, misdirection, and general control of the information flow was a bit on the clumsy side. I’ll probably read the second one eventually (where the author may hit her stride a little better), but I’m making no promises about the entire series.


  • Some Musical Interludes

    We just got back from Godfrey Daniels on the other side of the river, where Anne participated in an old-time music jam — a bunch of crusty old characters playing fiddle and banjo, mandolin and dulcimer, and Anne on her violin, and me as the only audience. (Jeff F showed up later in the evening with his violin.) I knew pretty much none of the songs, but it was a real pleasure to listen to everyone play.

    I myself did not get to play today. I was supposed to be playing duets with Donna, but as I was getting ready I found my cello horribly out of tune, and when I tried to tune it one of the strings broke. (It turns out, Donna couldn’t make it anyway, so it wasn’t that much of a disaster.) I took my cello to Montero Violins, where the woman talked me into a full set of new strings — they were rather old and starting to sound dead — which put me back a good chunk of change, but it had to happen sooner or later. (I also got a lot of good advice on the care and feeding of my cello, so that helped make it worthwhile.)

    Saturday night we went out to a concert in Easton with Jeff and Kristen. Two full string quartets — the amazing Emerson Quartet, who are actually disbanding after this year so we were lucky to see them, and the younger but also incredible Escher String Quartet. Tey played a whole bunch of combinations, quintet and sextets, and ended with this amazing Mendelssohn Octet. It was an amazing night, capped off with a quick trip to Porters.

    So that was my musical week!


  • Eyeball Kid

    So I started seeing a dermatologist last spring, not long before our big Alberta trip. He gave me the once-over — I even got a biopsy — and recommended a new eczema medication called Adbry. It’s something you take by injection every two weeks, with an initial double dose which you have to redo if you mess up your dosage schedule, so I held off on the new medication until we got back.

    It took about a month to kick in, but then it really started working — I have no idea of the how’s or why’s, but my life was like “eczema? what eczema?” This was the most effective eczema treatment I’d ever had, and one of the best things in my life.

    Until it wasn’t.

    Adbry has a known side effect, affecting about 8% of the people who take it, which causes them to get conjunctivitis (aka “pinkeye”), and I won that lottery: starting sometime in November my eyes started getting itchy, and irritated, and really red. (Again, I have no idea of the mechanism, but it was like all my eczema problems were taken from my skin and transferred to my eyeballs…) At first it wasn’t too bad, but then the constant watery eyes started to affect my vision, especially for things like reading, and the irritation made sunlight, or even bright lights, uncomfortable. I saw the dermatologist, and he referred me to my eye doctor. The eye doctor initially tried some milder treatments, which were OK but not 100% effective so he put me on steroid eye drops, and they seem to be doing the trick. I am now tapering off the drops, and going for weekly eye exams — steroids come with their own set of issues. Meantime, I discontinued the Adbry.

    I had a problem, I took that stuff, now I have two problems… the eczema is kind of manifesting again, but it’s not all that bad yet, and the dermatologist may have another treatment recommendation for me when I seem him in a few weeks.


  • Fun With Networks

    So the other big news, that I didn’t actually talk about last week, is that Emmi and Kyle are looking to move back East — specifically, they are moving to Bethlehem in the spring. Awesome news! But that also means a lot of work, as they must now shop for a home long distance…

    We’re helping where we can, looking online for suitable houses, searching the neighborhoods for new “FOR SALE” signs, etc, and we went on a walk-through of one hot prospect the other day with the realtor. Emmi & Kyle participated on Zoom, and I documented the walk-through on video.

    That all worked out pretty well, but when I got home I saw my video file was pretty big, like 2.5 GB, too big for regular email, so I tried sharing it to Google Drive. I clicked the link, and it said “uploading” but there’s no progress indication, and more than an hour later it’s still hanging fire, so I canceled the upload. I figured I could just put it on my laptop and move it from there, but the USB cable was wonky and won’t connect data; I tried moving it via FTP but the file is on my auxiliary memory card and the server wouldn’t access it. Cue that song about the hole in the bucket…

    So now what?

    Well, I’d set up an SMB share on my laptop a while ago, so I can share things from the laptop to other devices on the network, but it was deliberately set up to be read-only for guest accounts — I don”t want people to be able to come along and dump arbitrary files onto my computer. What I forgot I did though, and remembered in the heat of this debacle, is that I’d also made the share read/write for an authorized regular user (like, say, me with my regular login and a password) — hmmm, maybe I’ll give that a try. The SMB connection on the phone was set up to be anonymous, so I had to change a few settings, but after that I was able to move things easily from either the phone or the laptop over to the other. I tested it on that big video file, which took some time to transfer but it worked fine, and then I just uploaded the file in the usual way to Google Drive. Easy peasy!

    (I also made those changes to my tablet settings, so I can share files the same way there.)