Showing posts with label tech talk. Show all posts
Showing posts with label tech talk. Show all posts

Tuesday, July 07, 2015

Trigger Pulled And Deed Is Done

I left my bike and shoes/helmet/pack/gloves out overnight Sunday, as well as a bunch of clothes I put on the line to dry, expecting yesterday to be sunny... I noticed a cloud on the way home, figured maybe a ride wouldn't be smart, then realized I might not even beat the rain home - almost made it built not quite. Anne had already grabbed my laundry and brought it in, but the bike stuff got a bit damp.

Either way, no ride yesterday, so last night was the night I installed Ubuntu on Anne's old MacBook Pro - it was so old it could no longer get any software upgrades, but the hardware itself still worked fine, and this was something we'd been planning for a while. She'd already backed up all of her files, so I basically overwrote the entire drive, no more Mac and hello Linux.
Looks good, though it will probably take a bunch of tweaks before everything's "just so." If I like what I see I might also upgrade my laptop.

Friday, June 26, 2015

Well, That Escalated

Though I can't say it escalated quickly... You might remember those programs I wrote a few weeks ago, to automate some task at work that I didn't really have to do more than once or twice (but it was a good, fun exercise). Well, I added some things to it, namely the ability to print output as an AutoCAD command script, to draw the defining lines and arcs of my tubes, and as an AutoLisp program, to generate a 3D model of the completed set of tubes. (See the picture below, where my program's results were run through AutoCAD: script on the left side, and lisp-based model on the right.) Anyway, that was an evening of coding here, a few hours on the weekend there...

After I got that working, I thought it would be a good idea if I could access the program via web browser, in other words turn my programs into a CGI script -- what I actually did was write a shell script to act as a "wrapper program " for my other programs, and accessed that via CGI. Some more weekend time burned, some learning curve here and there (I also cleaned up the programs themselves, added error checking and made them more robust in general), and my little extra project worked!

It is up and online, and you can check it out here --  though the input might not make sense if you're not familiar with the problem (which I've been deliberately vague about), and the results are not very useful without AutoCAD. But there it is, and I've been playing with it at work, just to watch how quickly it runs -- seconds, instead of half a day to do it "by hand" -- and how quickly the results draw themselves.

Thursday, May 14, 2015

It Took A Village

Morning weigh-in: 194#, 12% BF

I have a CAD puzzle or problem at work, bending groups  of tubes in 3D to achieve a certain configuration. It's not hard but it's tedious, and involves a lot of iterative trial and error for each tube - and there are dozens of tubes in each configuration. It takes me about half a day to work through one full configuration, and there are a whole bunch of configurations to look at...

I figured out a way to automate the process, but we don't have access to any real computing power here (we're not allowed to have any programming capabilities, and the most advanced math package available to me is Excel). So, what I did was write a C program at home, using only the typically available libraries, and once it ran correctly I put it on my SDF shell account and compiled it there. Now I log into SDF from my phone and run the program to get my results. It's like I'm using my phone as a calculator; it's (barely) less tedious than my other method, but the process is now moving much faster.

Jumping through hoops FTW!

Wednesday, May 06, 2015

Procrastination FTW

Back when I did that header calculation program, I needed some routine that would do linear interpolation of stress values based on values stored in a database. My eventual solution at the time was to use a function within the C program itself to get the values from the database and do the interpolation, but this bothered me because I thought the database itself should calculate and return the interpolated value. I looked everywhere for how to do this, but found nothing online (other than offers to show me how for a fee).

Then Monday came, with a nice sunny afternoon (perfect for a bike ride), and my accounting class final looming, and a thousand other chores crowding in on me, and I sat down and learned how to write stored procedures for MySQL, then wrote a linear interpolation function.

So once again, I solved a fairly trivial, non-problem problem, simply by having more urgent tasks on hand to blow off. The function works great, too.

Monday, June 30, 2014

I Guess I Don't Really Know Jack After All

I don't really do much with video with my computer, so it's not something I've looked into, but while we were in Durham we had some DVD's we wanted to watch (some episodes of Foyle's War, and also Moonrise Kingdom), and our room's DVD player wasn't cooperating so we watched them on on my laptop, which has the biggest screen of the ones we brought down.

The program I used is called LinDVD, which I think is the only remaining part of a defunct, early 2000's attempt to make a Windows-like consumer Linux; LinDVD is not what plays video files -- and in fact has no provision to just open a file and play it, you put in a DVD, and LinDVD plays it, and that's that -- and I normally use something called Totem to play an ordinary video file.

Anyway, we watched the movies, no problem, but then I went to use Totem and it crashed on startup. Uh oh -- did I break something by using LinDVD? No idea, so I tried some other video players (Gnome Mplayer, which is a GUI wrapper around the regular command-line Mplayer program, then Mplayer itself) and they also hung up pretty much at startup.

I started to think that there was something wrong with my codecs: they might have been corrupted by a recent automatic upgrade, so I removed and reinstalled them -- no change. Strangely enough, LinDVD still worked fine (it might have its own codecs), as did Kino, a video editor I have.

The next thing I do is try to put on some music -- and Rhythmbox, my music player, also hangs on startup. I try mplayer again and look at the error messages it writes to the console, and sure enough there's some problems with ALSA, the "advanced Linux sound architecture."

Linux has a very convoluted sound system, and this is another area I haven't really studied up on. Suffice to say that once upon a time, sound was controlled by something called OSS, which then got mostly supplanted by ALSA, which in turn got superseded by PulseAudio, but they all are still there, running and interoperating, not so much in layers like the network stack, but more like a mish-mash.

I'm not sure what LinDVD does, but I'm pretty sure that Kino uses OSS rather than ALSA, so I think I'm getting somewhere. What I try to do next is, remove and reinstall ALSA and PulseAudio. No results, and there seems to be nothing about this problem on The Google, unless you count messages like "your system is way out of date, you should upgrade."

A word about Ubuntu: they make new versions of their distribution about once every six months, which basically become obsolete (that is, unmaintained) within a year or so. They also put a version every two years or so, designated LTS (long term support), which is maintained for about 3 to 5 years. I've used the version 10.04 LTS distribution for years, and it's now near end-of-maintenance; I've resisted upgrading because the next LTS version changes the desktop in ways I don't like, so I'm not exactly bleeding edge in my Linux technology.

I'm basically out of options, and am now resolved to upgrade -- which means backing up my data and configurations, and making a list of all the software I installed outside of the Ubuntu system, just in case... Somewhere in this mess I also made the mistake of removing LinDVD with the intention of reinstalling it, only to find that it's not part of the Ubuntu package universe, and in fact it's not available unless you're say Dell, and planning on shipping it with your computers. D'oh!

There are ways to deal with LinDVD issue as well as the upgrade mess, I just have to jump through the hoops, and I'm working my way up to it, when an upgrade of ALSA pops up in the Update Manager. It basically took 45 minutes to run and upgraded the entire sound system.

I look at the Ubuntu website, and they say that this would basically be the last update for 10.04LTS -- and was meant to be a fix for problems in a previous update (I read that between the lines) which I took to be the planned last update for 10.04. I noticed that it also installed something called jack (yet another component of the sound architecture), this was probably what they were trying to introduce in the broken update. Basically, all my uninstall/reinstall moves just kept reinstalling the broken system; it was not corrupted in my machine per se, but in the software repositories...

So now I have my video and music back, though not DVD's at least not the ones with encryption/DRM, since I guess the only program that had that was LinDVD, and distributing the decrypting package is a legally fraught proposition in the open software world. I'm working on it, and meanwhile I now have a third volume control app (for jack, which I know even less about than the other sound components on my system). I'll skip upgrading for now...

UPDATE: After writing this, I got to thinking about watching DVD's again, so I went online to one of the video player program's websites, and they had some decoding files which are apparently less encumbered. I downloaded and installed what I needed, and sure enough, it worked! Better yet, I can use my ordinary video players, and no longer have to worry about re-installing LinDVD. I just finished watching The Matrix, the only DVD I own and an ironic choice to watch on a computer...

It's kind of funny how 15 years can really date something: The Matrix is still a cool movie (as long as you refuse to acknowledge the existence of the sequels), but 9/11 kind of made watching buildings explode a little less fun, and recent mass shootings put a different spin on the gun fetish scenes. I just finished reading a series of cultural essays, jeremiads really, in a book from the nineties called Commodify Your Dissent (I got it in a Durham bookstore), and the whole book was an indictment of The Matrix's themes and imagery before it ever got filmed...

Saturday, February 01, 2014

Three Front Followup

Happy Candlemas-mas! Judging by the weather forecast, Puxnatawney Phil may have some bad news for us tomorrow...

Anyway, some updates:

My running continues semi-apace; I managed to follow my program exactly for exactly one week, then I took the next week entirely off (snowstorms and bitter cold made good excuses). This past week I got back in the game, but I'm not quite back to my program yet. I'm doing a half-marathon in late April, and it's going to be here sooner than I'd like. Meantime, I got my Turner back, with new Hope disk brakes, though I have not gone on a ride yet -- maybe early tomorrow morning, before the chili contest? We also we got in a few XC ski sessions in the past few weeks, and we signed back up at the gym. The pieces are there, I just have to put them in place.

Next up, the jukebox project came together like clockwork, but then we had some Internet problems and the router got rebooted, and when things came back on the NAS and the Raspberry Pi couldn't talk to each other: I had them configured to refer to each other by their IP addresses, which got reassigned when the router restarted. Easy enough to fix as long as I'm around to do it, but not the ideal solution, so (after going through a few hoops, like installing avahi on the Pi), I can now refer to the NAS and the Pi by name. Shut things down, started them up, and it all worked no problem. I've really enjoyed playing with networks and  multiple machines, something I know almost nothing about, and now I think Ill come up with some more Pi projects like a local web server, a print server, and maybe even a weather station (something I've been thinking of doing for years).

And finally, on the cello front, I took my first lesson this past Tuesday. Pretty awesome, I'm on my way -- I can already (almost) play "Twinkle Twinkle Little Star!"

Sunday, January 26, 2014

Another New Gizmo

In the ongoing saga of our music-delivery system, I was forced to conclude that I would not be installing SqueezeServer on my new Seagate Central anytime soon -- word was that the Central was a bit underpowered for what I wanted, and more talk on the Internet made it sound like a pretty daunting task anyway -- so I went with Plan B: I ordered a Raspberry Pi.

This is a small, DIY- and education-oriented device, basically a minimal computer motherboard with nothing else -- memory is through an SD card that you supply, and input/output is through USB (keyboard & mouse), video/HDMI, and Ethernet jacks -- but it's a fully functional computer for all that, and it runs several flavors of Linux. Best of all, it cost about $40 when I got it from Amazon.

Of course, that price is predicated in your not needing anything else, such as keyboard or mouse or video monitor, or SD card, things could get expensive really fast otherwise. I thought I had everything I needed, then took an inventory of the basement, and found that my spare keyboard had a PS2 connection rather than USB, and the spare monitor has neither video nor HDMI input. Uh-oh... I could run the pi monitor through the TV, so I didn't need that, and since I was going to use a new SD card anyway I grabbed an extra Ethernet cable while we were at Staples, and tried to find PS2-to-USB adapters. Unfortunately the ones they had cost around $20 -- sorry, but I'd seen them online for two bucks, and a whole new USB keyboard could be had for less than $20. Not gonna happen. I ordered a new keyboard, $10 on Amazon.

OK, I had to wait for the keyboard, but I could at least get on with the task of setting up the memory. This turned out to be time-consuming but pretty simple: download the "image" file and burn it onto the new card. So at that point (Friday afternoon) I had everything I needed except that damn keyboard.

My real purpose for the pi required talking to it via ssh over our local network. All I really needed, once things were up and running, were the Ethernet cable and the memory, but for some reason I believed that I needed to start the pi up and configure it to allow ssh. A closer reading -- or to be honest, an initial reading -- of the instructions revealed that ssh was on by default, so I plugged the pi into the power and the Ethernet port, and sure enough I could log in from my laptop. I immediately canceled the keyboard order...

Installing the SqueezeServer was pretty straightforward as well, and took me only a few minutes more. Now we can control the music from our laptops or smart-phones, but we don't need the laptops on anymore to have the music play.

There are a lot of fun/educational projects for the Raspberry Pi on the Net, but most of them look pretty lame, and my pi (not the most powerful of computers in the first place -- but what do you expect for $40?)  has a real job to do, so I don't expect to be playing too much with it after this. Just set it and forget it.


Sunday, January 19, 2014

Keep Those Caissons Rolling, Oh Yeah

Morning weigh-in (Thursday): 191.5#, 16% BF
Morning weigh-in (Friday): 191.5#, 16% BF

First week of running down: four runs for a total of nine miles, with just better than a 12- minute average overall. Fifteen weeks to go...

Next up is the bike: my new brakes came in, so I dropped off the Turner at Cutters yesterday to get them installed. (My refurbished brake is not ready yet, so it'll go directly onto the singlespeed when the time comes.) We did a towpath ride this afternoon, Anne on her mountain bike and me on the 29'er (with flat pedals), first ride in a while. I need to get the road bike up to snuff too, but that's not as urgent, and doesn't involve much more than clean/lube/adjust.

I also dropped off my XC skis at the nearby ski store for repairs; I expect I'll be getting new bindings, and they should be ready before the end of next week.

On the computer front, it doesn't look like I'll be able to add Squeeze Server to my new NAS, so I ordered a Raspberry Pi which I'll set up for music server duties, plus whatever other things I may come up with.

Saturday, January 11, 2014

Got A New Toy

The Setup: My laptop runs Ubuntu Linux, which has an automatic update feature, part of what's known as the "package manager" for installing/updating/removing software. It's usually very handy, but the other day it was running and couldn't finish what it was doing: most of the updated packages did just fine, but one was listed as "broken," and there were bunch of error messages, which didn't resolve when I followed the instructions for fixing it, and didn't resolve by just leaving the thing alone, letting the next automatic maybe fix it for me (I initially suspected that the updated package itself, as it was sent to me, was what was corrupt).

So the next update didn't help, and I took a harder look at the error message. Basically it said that there was a problem with a perl script (technically, a perl "module") needed in some way or other. I don't know much about perl, and I didn't know that the package manager system even used perl, but some googling of what looked like  important parts of the error message (mainly a problem with something called a "bareword") led me to forums where others were asking about similar messages in various contexts; these discussions led me to believe that the perl script in question had been corrupted.

So, the next step was to find the script on my laptop and open it -- gedit couldn't open the file, which might indicate a problem, but emacs handled it fine, though it showed a bunch of non-printing characters here and there -- and then search the internet for the same file. I compared the two: the non-printing characters weren't supposed to be in there, so I fixed my file to look like what I found online. I ran the package manager again, and the offending package installed just fine...

But how and why did that perl script get corrupted? I hadn't messed with it, and couldn't figure why something would poop gibberish into the middle of the file unless the disk itself was starting to go bad. Uh, oh.

To make matters worse, the package in question was an iupdate of the kernel, the little program that makes the rest of the computer work. What if my fix didn't solve the problem but only masked it; if the update failed without saying so and the kernel somehow became corrupt, rebooting could break my system. I couldn't let my computer shut down until I figured out what to do if things went wrong.

An Interlude: Anne's back has been slowly getting better since she pulled a muscle a few weeks ago, but she currently prefers to sit on an exercise ball because it less uncomfortable than regular chairs. I was home yesterday by myself, playing around with the weights, when I saw the exercise ball over by the dining room table and decided that I should add it to my routine... I started doing crunches on the ball and I heard a sudden  crunch-pop sound -- I'd pushed the ball up against some knitting needles and put a hole in it! Great, I just broke Anne's only chair.

Out I went to the local sporting goods store, where I got a replacement ball. No big deal, but the stores next door were a Best Buy and a Staples, and I thought well, while I'm here...

The New Toy: I went into Staples, determined to get some form of backup system for my laptop's drive. Big external drive, tape drive, whatever. I did some looking around, and some discreet Internet research while in the Mass Storage Aisle, and decided to get a Seagate Central NAS. Three terabytes of storage, wifi connection and provision for multiple users, and it was said to be fine with Linux; my only remaining question was how it would work with the Squeezebox. I go up to the help desk with the empty box ("display container only, ask for assistance") where they couldn't answer my question but assured me that returning it would be OK if things didn't work out. Then they go to get me one, and -- they don't have any in. Oops!

Oh well, I go next door into Best Buy (where I bumped into a co-worker, who was having trouble returning a broken phone -- let's hope it's not foreshadowing) and purchase the 2-terabyte model sitting on the shelf.

Epilogue: There's not much to tell -- installation basically meant turning the device on and plugging it into the router, configuration was done using a web browser interface and it was beyond simple; and backing up my laptop was really easy using luckyBackup and an ssh connection, though it seemed to take forever. (I'm not sure how fast things are supposed to be, but 125 gigabytes took about 14 hours.)
The only downside so far other than the speed -- if that's even a problem -- is the poor integration with the Squeezebox Touch. I think I can live with that for now, and may solve it by installing squeezeserver on the NAS, if its brain can handle the extra load.

I also made myself a rescue disk, and when all my pieces were in place, system backed up and disk where I could reach it, I crossed my fingers and rebooted. That was about an hour ago, and it was a total anticlimax: everything was fine.

Doug and I were talking a week or so ago about smartphones and tablets, and the thrill -- for a little while -- of getting a new app to play with, how it's almost like a sugar buzz. The last two days were like that for me; it was as exciting as my first thumb drive.

Tuesday, December 31, 2013

That's Notta My Boat

Running the year down, this post gives me one more than last year's low of 44 posts, not great but at least I'm trending in the right direction...

That program I was working, you know the one that was "finished?" Yeah, about that... I decided to add a few more features, mainly getting material properties from a database. This meant learning how to "do" databases, such as MySQL, hence that book Learning MySQL.

Getting off the ground proved to be remarkably difficult, I had a lot of trouble just starting the program and connecting to the database engine (the mysql daemon runs on my machine as part of the system) -- it didn't help that I apparently had already played with MySQL some time in the past, set a password and then forgot it. Luckily, it was easy enough to guess, and once past this learning-curve road-bump it was smooth sailing, in fact using SQL is so easy I'm now surprised it had me intimidated.

Right now I'm doing some experimenting with the API for C, before my next big step, which is to build a materials database -- a small one, just a few common materials  with their temperature-dependent properties -- in preparation for re-doing the materials portions of the header program.

Anyway, Happy New Year! See you in 2014.

Monday, December 30, 2013

Four Books

By the way, Merry Christmas everybody!

Also by the way, I've been posting lots of pictures to Flickr. I don't think I'll make my goal of getting my photos up to date by the New Year, but I suspect I'll be done with our Ireland photos by the time I go back to work on the 6th. Enjoy! And stay tuned for more...

I've been trying to teach myself a few now computer skills lately, and my main teaching resource has been O'Reilly Publishing. I got myself Learning Java about a month ago, and have been working my way through it, then the other day I got myself Learning MySQL, then my mom & dad got me Learning Python (freakin' huge book) as well as Learning PHP, MySQL, JavaScript, & CSS.

I think I'll be busy at my laptop for the next several months at least...

Thursday, November 28, 2013

Being Thankful

Don't want to get too earnest here, but do I have a lot to be grateful for -- don't worry, there won't be a list! Sometimes though, it's good to just register in your mind how good you have it...

Remembrance Of Skills Past

I didn't really have a reason to do this, but I decided to see if I could get that program to run on my SDF shell account. It shouldn't be too hard, SDF is pretty similar to my home computer, but since my program makes use of the Mini-XML library (non-standard,  and not installed on SDF), I would have to find a way to get that installed -- without administrator rights, and without messing with any part of the SDF system outside my account's little turf. This also shouldn't be difficult, I'd done similar things before, but I just didn't remember how.

Here's how: In my home directory I made my own "bin" and "lib" directories, then I downloaded and unpacked the compressed mini-xml files, and then did the configure/make process with my home directory as target. That got the new libraries installed in my "lib" directory.

The next step was to download my program code and make the file. No problem, though I changed my Makefile to know about my lib directory.

The final step -- the one I forgot, and the one that took a while to find with a Google search, since most instructions assume you have root access and are doing things in the standard way -- is to set the library search path to check my personal lib directory as well as the others:

LD_LIBRARY_PATH=/my/home/directory/lib:$LD_LIBRARY_PATH

(I also put that in my profile and exported it.)

Anyway, it worked like a charm, and now I can play with my program anywhere I can access SDF -- like my phone, thanks to ConnectBot and much to Anne's chagrin while we were out last night...

(Hopefully, if I need to remember how to do something like this again in 10 years or so, or if someone else looks for a solution to the same problem, this will come in handy.)

The Book Of Lists

Here's a list of the books I'm reading:

The World Until Yesterday, by Jared Daimond
The Victory Lab, by Sasha Issenberg
Pattern Recognition, by William Gibson
The Year's Best Science Fiction (30th Edition), ed by Gardner Duzois

On deck:

Thirteen, by Richard K. Morgan (a loan, so I better get it finished)
The Game of Thrones series (also  a loan)

Recent Music:

Lately I've been downloading music I hear on Radio Paradise, so recent acquisitions include Younger Brother, Alt-J, VAST, and Beth Orton.

This is in addition to recent efforts to round out my collection: the B-52's, Radiohead, Negativland, Big Star, Midnight Oil, and the Stereo MC's.

Also: Australia's Triple-J brought me to Seth Sentry and Art vs. Science.

Reviews of all the above to follow, eventually. Maybe.

Happy Thanksgiving, everyone!

Saturday, November 09, 2013

Coffeeshop Ramblings

I'm sitting in "The Joint," a somewhat new coffee place in Bethlehem, opened by friends, and local restaurateurs, Bill and Tabitha. It isn't all that new anymore, but I got out of the habit of hanging in cafes after I left Easton, and when Wired closed I really lost the habit, so this isn't my usual Saturday routine -- let's call it, if not quite "new to me," then "outside my usual third-space options." Anne probably eats lunch here once a week though, and I can see why: I just got a sandwich, and it was excellent.

Blogging Will Be Somewhat Light Last Quarter My usual habit for years was to blog during lunch at work, usually just a few short paragraphs a day, but trying for every day. They eventually blocked blogs at work, and blogger.com, but I found a way to email posts from my Gmail account, and so the lunchtime posts continued, more or less, for quite a bit longer. Within the past few months, though, they started blocking Gmail as well at work... I guess if there were a will there'd be a way, but my blogging interest has waned, and so I haven't done much to find alternatives.

What's (Been) Up: Well, Anne and I spent much of the post-Ireland summer training, and we ran the VIA Half-Marathon in early September. I came in around 2:30, and Anne beat me by about 15 minutes. Once again, something I had a great deal of trepidation about, but when it was over I was glad I did it -- I may even do another one, but not for a while. One bad side-effect was that the biking suffered during the training period: I just didn't feel like going out for rides in the afternoon/evening after getting up and running 5 miles extra-early in the morning. Luckily, my cardio didn't suffer, though my technical skills sure did.

After the run I made a push to get my bike mojo back, doing a number of MTB rides in Jim Thorpe and other places, and having some fun watching the change of seasons from inside the forest.

Also: Just before the half-marathon, Anne and I got in one pretty big bike ride, a cycling tour to Philadelphia. Our original goal was Rehobeth Beach, but we had such a miserable time in the NJ towns south of Trenton (creepy and depressing, weirdly impoverished, no places to eat, skeevy motels, and on and on), and we realized on the second night that we'd have just enough time to cross the state, touch our destination and come back through the misery zone, that we changed plans and went to Philly. Great idea (though the ride through Camden was hot and unpleasant), and we spent two nights there, avoiding some rainy days and visiting with Ben & Jaime. The home trip was a bit tough, about 70 miles in one day (remember, we were fully loaded with touring stuff, clothes and camping gear etc), with hills. I was glad to be home!

'Puter Time: Remember that program from work that I was trying to understand? Well, the biggest problems with it were that it was written to accept data from punched cards -- no lie, it's that old, and the data formatting was never updated -- so the input format was cramped to the point of obscurity to fit in 80-character chunks, and major parts of the program were huge hodge-podges of nested IF blocks and GOTO statements mainly to parse that data, so I decided to look into rewriting these parts (in the original FORTRAN), and that eventually snowballed into rewriting the whole thing in C, taking XML data as input and producing output similar to the original program, but in a somewhat improved format. That's been going on for months, maybe for the whole past year, and lately I've gotten to the point several times where it was mostly done, except for maybe a bit of tweaking here and there... Well today I basically realized that it was done, it worked exactly right and did everything that the original program did, and more. (I added other connections, like our newer weld styles, and organized the program so that other new styles could be added easily, an impossible task with the old program.)

So now that I have it, what am I going to do with it? Not much! I've tried the program with a bunch of example projects, as well as some test cases (to see how well it handles bad data), and I'll probably play with it at home, using actual real world examples from work, but that's about it. I realized that I don't want to show it to anyone at work, because to show it -- show the code, that is; I don't think the program would run as-is on the machines at work -- is to basically give it away, and I think it'd be pretty hard to get them to pay me for this thing I did in my spare time. (I'm fine doing it for nothing, as long as I consider it an at-home professional development learning experience, but if it's to be used in a production environment I'd expect to be renumerated.) I'm also sure that the actual programming could be a lot better, and despite what I said about completeness, it's really not ready for prime time -- it matches the core FORTRAN  program, but there's no user interface, and no database lookup of material properties, things that we have at work thanks to a sort of "wrapper" program that prepares jobs for and runs the core program. Maybe that can be something I can work on now.

Meantime, I'm hanging out here, about to get my next cup of coffee. I'm on my own for the weekend, as Anne is off with her sisters and sister-in-law at a knitting convention. I went out last night with Doug & Lori, and Scott S; we went to Black & Blue, and had so much fun I think I might stay in tonight. I'll probably try to get in a ride somewhere tomorrow, as well as some autumnal yard work -- did I mention that Anne and I just built a shed? Well, she built it, but I helped...

Monday, June 24, 2013

Re-Re-Re-Thinking

OK, here's the situation...
 
A few weeks ago a friend asked me about the kind of GPS / heart rate monitor I was using, and I sent him a fairly long email about my choice of the Garmin Edge 705, its suitability for biking but not for other things (I think he's looking for something to use with running), and why I went with the 705 rather than the newer Edge 800. My reason: "I went with the 705 because its data files are basically XML while the 800 uses binary files."
 
What that means is that the 705 produces output that is basically alphanumeric text, readable/editable by any text editor or word processor. Granted, the text is a bit hard to follow, but the basic idea is just a version of extensible markup language, like:
 
<SomeTag>
    <SomeSubTag>
        here's the data
    </SomeSubTag>
    <SomeOtherSubTag>
        here's more data
    </SomeOtherSubTag>
</SomeTag>
 
It's structured almost like an outline, except instead of numbers and letters for headings and subheadings, there are named "tags" like <Track> and <HeartRateBPM> and <Location>. A little bit of patience and you can find your way around most XML-based files, and there are also may programs and tools that recognize XML and can work with it as structured data.
 
By contrast, the (binary) file created by the Edge 800 is something that isn't in any human-readable format: it's just a bunch of ones and zeroes, meant to be read and understood only by specially designed programs. (Other examples of binary files would be things like image files, or MP3 music files.) In other words, I couldn't just fire up a word processor and look at my ride data, and -- more to the point -- I couldn't put together my own simple programs to find or extract data from the files, at least not easily.
 
This decision, to go with the text-using 705 rather than the binary-file 800, was one I made a few years ago, when I needed to replace an earlier Edge 705 that I'd lost on a ride. Partly it was because I would be getting an exact replacement of what I'd already had, but my main reasoning was ideological, as in "Information wants to be free!" I wanted to see my data without anyone's help.
 
After writing my friend though, I got to thinking about my decision, and realized that my reasoning really didn't carry much weight: after one or two experiments, I almost never actually looked inside my data files, or analyzed them with my own home-made programs. I would upload my ride data to the Garmin site, or use standard training software like everybody else. Being able to "look under the hood" of my data files was a nice option, but I no longer had the desire, or need, to actually do it.
 
Until...
 
Anne and I did a road ride a week ago on Saturday, and for some reason the Garmin website wouldn't recognize the data, and neither did any of the training software. Uh-oh. I Googled the problem and found out that sometimes the Edge 705 doesn't correctly record certain pieces of data, and so one of individual data records was screwed up and the file was "corrupt." The solution is easy: just remove the offending record -- you'd lose one second or so of ride data, but otherwise the file would be as good as new. I opened up the file in Emacs, found and removed the offending record, and things worked fine from then on. So OK, maybe it is useful! -- though it would be even more useful if the 705 didn't create corrupt files.
 
Since I've had the "new" Edge 705 for a few years now, and since I also have a spare, after someone found and returned the one I'd lost, the question was mostly academic, but we did a ride yesterday in Jim Thorpe on some rocky, overgrown trails (we did Green Blaze), and my Garmin popped out of its mount somewhere along the way. When I noticed it was gone I considered going back to look for it, but it could have been anywhere, under rocks or in the brush, at any point along a 10 mile section of trail, so forget it man, it's gone. So, now I'm down to the spare GPS and a handlebar mount that I no longer trust -- and the Edge 800, and the even newer Edge 810, both have a better mount -- and binary file be damned, I think it's time for an upgrade, especially since they stopped making the 705.
 
"Chi Wên Tzu used to think thrice before acting. The Master hearing of it said, Twice is quite enough." -- The Analects

Saturday, April 06, 2013

Daffodils

Here I am on the front porch, waiting for my birthday party - my 50th birthday party - to start, just chilling, watching the flowers bloom and trying a little experiment: I'm blogging from my phone using the dedicated app.

It's a bit laborious despite Swype, and the laptop is stored away until after the party, so I'll catch you on the Flipside...

Sunday, January 27, 2013

Sunday Night Wrap-Up

So here I am, relaxing after an awesome Sals ride, and listening to the song that made me a Democrat: Temple of the Dog's "Hunger Strike." (Well, that and a book: Carlyle's History of the French Revolution. And the '92 election.)

I'm also blogging this while using a new (to me) browser: Chrome, the one marketed as Google's browser. I'd been getting more and more frustrated with Firefox crashing all the time -- it seems to have a lot of trouble with video, though strangely not with YouTube -- and Googling the problem seems to show a lot of people asking the same questions, and getting what I consider a runaround, like: "are you using the latest version? have you tried using safe mode?" and other bullshit like that. (The questions run the gamut of technical sophistication too, from "my Firefox crashed" to "the culprit seems to be X_ShmPutImage," which is what I'm getting when I look at the crash report.)

It got so I could reliably crash Firefox by going to certain websites, mostly news sites where a video might be playing when you get there, and I finally had enough. Chrome was pathetically simple to install, and it loads my favorite sites quickly and seems to display them correctly; I'm not sure I like the bare-bones look of the browser itself but I figure I'll get used to it. Maybe there are extensions, add-ons or other eye candy that I can use to gussy up the place.

Anyway, the rest of my weekend:

Friday morning found us going over in Easton, where I picked up my car -- finally! -- and we went out to breakfast. The place we ate was a bit of an experiment, and it was decidedly meh so we're probably not going back but I'm not going to name it here... Anne took off for work, and I, after some errands, took off to go skiing at Blue Mountain. This was the first time I'd gone skiing in years, and it didn't come back immediately but it did mostly come back -- I stuck to the easier slopes, and left after about an hour and a half, when the after-school crowd started coming in.

Yesterday we were in Jim Thorpe, a family get-together at Anne's mom's house. We started with White Russians and a viewing of "The Big Lebowsky" and finished with pinochle, Anne and me vs her brother Joe and his wife.

This morning we got up, not particularly early but we went for a run before breakfast, 2.68 miles in 28 minutes, for a 10:34 average pace. For some reason I was hurting, it was a tougher run than usual for me. Some breakfast and some at-home BS (Anne had to go into the office), and I rallied in time for my ride at Sals.

Which, as I might have mentioned, was awesome. There was packed snow on the trails, but traction was surprisingly good -- which was good because I found myself really depending on good traction, just about the same time I would realize I was on an icy rock, more than once today. I wasn't riding particularly well today, the weeks of slacking have taken their toll, but the riding did not feel too difficult, and the trails, and just being in the woods, were extremely pleasant. I ran into Joe G, on foot with his dogs, talking with Rob L who was riding some fully rigid singlespeed. They were the only people I saw, though there were tracks everywhere, even relatively unused trails were covered -- I tried to take a nonstandard route, but nothing looked very out-of-the-way today.

Sunday, January 13, 2013

Fun with CAD

I kick myself sometimes for doing this, but after a long day of engineering at work I like to relax -- by playing with engineering software at home. I recently found this program called FreeCAD, and once I got it up and running I've been having a lot of fun trying to get things done, or at least drawn, using it.

A View Of The Tee In The CAD Program
This first picture is something I slapped together pretty quickly, a reinforced forged tee like one we might use on a header. I used cylinder and cone primitives to make the tee body, another set of cylinders to cut out the inner parts, put in some critical fillets, and then sketched out the bore used it to create a shape to cut the end preps. This all seemed pretty straightforward, especially creating and combining the 3-D shape primitives.
The Tee As Seen On A Drawing

I then used the drawing creation utility to start a drawing. I got a nice side view (except that one line wouldn't show up), and added a projection. I have no idea (yet) how to add dimensions or text. The problems may be me, or it may be that FreeCAD isn't quite done yet.

What hasn't been so successful is creating bent tubes and pipes. I've been drawing the tubes in QCAD -- I've been using it for a while, and just sprung for the professional version -- then trying to import them into FreeCAD and turn them into 3-D objects, with very little luck. There are several laborious ways to make tubes, but none that just convert from polyline to tube the way I want.

We'll see how it all works out.