Monday, November 24, 2008

Interruptions...


Well, as mentioned before, sometimes life gets in the way of doing stuff.

Last Tuesday, it interrupted me again.

My wife and I foster kittens for a local cat rescue group. As we have found out, sometimes this is a lifelong (the cats life, hopefully not ours...) obligation.

We have four cats that, while technically not "ours", are going to be with us for (their) lives. Two refuse to have anything to do with being adopted out, two are insane.

Yes, insane. We have been fostering them since they were about 10 weeks old, and someone else was fostering them before that. It was a litter of six kittens. Four of them were normal. These two were afraid of people, and never got any better (we've taken in half-feral kittens from TNR projects that we have made into lap cats. Not these two...). I call them my "indoor ferals".

One of them, Tange (pictured above), has, for some reason, terrible gingivitis. We finally got her to the vet to get her teeth cleaned. Things were so bad, the vet wound up removing 7 of her teeth (poor kitty).

Because of this, she needs special food and medication until she heals. But, since we can't put on hands on her, we've had to put her in a playpen that we normally use to keep kittens so that we don't have to hunt her down and catch her twice a day. Of course, she acts about how you would expect...

So, I haven't had much time for the last week or so. I'll try to get back into it soon.

Monday, November 17, 2008

I can't see what I'm doing

Being an "old fart", I have special glasses to view a computer screen. Not my normal bifocals for both distance and reading, these are for "intermediate distance" like looking at a computer screen.

Today, I can't find them. Maybe the cats are using them...

In the mean time, go check out this mechanical computer that you might remember from the back pages of comic books when you were young (if you're an "old fart" like me...)

Friday, November 14, 2008

Sometimes I annoy my employer with my programming...

...but not the way you might think.

I'm not a Windows programmer. Most computers run Windows (or some "windowing" operating system, like OS/X or Linux). It's what people expect these days.

But I'm a luddite about computer programming. 640K was good enough for Bill Gates (just kidding... it's often attributed to him, but there are no citations). It's good enough for me. In fact, I almost never use more than 128K of RAM (the old DOS small memory model -- it's what my favorite C compiler generates).

And if you're programming for an old-style DOS computer, the Disk Operating System (DOS) and Basic Input/Output System (BIOS) are very helpful, but you don't have to use them. If you want to talk directly to the hardware, you are free to do so (just like an embedded system...)

I've tried to get my feet wet in Windows programming, but never could. I always wound up with something like "I want to call function _foo() here. What do you mean I can't -- it's not in my class inheritance!?!? And, despite what the manual says, the compiler won't let me call it classlessly. Grrr... time to drop this steaming pile of ****". Or, trying to do a simple system call, you need all sorts of funky constructs like "try ... catch" for error handling. Of course, you still need an error return, so your program knows if it can proceeded. But you still need to do tons of special error handling to satisfy Windows (and the compiler), on top of what you need to write to make sure your software works smoothly.

The upshot of all this is that, when working on an embedded system, chances are that you need to simulate the "other half" as well. It may be a simple potentiometer that varies the simulated input to the system. It is often a computer program that pretends to be another part of the embedded system. Or it could be a PC program that sends setup / calibration information to the embedded system.

When I need to write the "other half", I write it as a DOS program. It works. It's fast and (for me) very easy (I have about 20 years of software to draw on for snippets).

So, I now have a program that took me a day or so to write that lets me talk to / calibrate / whatnot the embedded system I'm working on. Great! Except for one thing...

When it's time for me to hand the project off to someone else, they ask me how to setup / calibrate / whatnot the system. What I use is my DOS program. I can give them a copy, but:

1) They don't like it (not pretty enough, I guess...)
2) Management does't like it (not corporate standards or something)


So, why not get the equivalent Windows program written? It can't be that hard, can it? It only took me a day or two, and I can give them all the algorithms, data structures, and whatnot.

But it never works that way. It often takes a couple of weeks to get the equivalent Windows program written. Sometimes they never do get it written.

And this is why my employer gets annoyed...

Thursday, November 13, 2008

What is "embedded"?

In looking at a computer, some systems are called "embedded". Looking at the hardware, some of them (like ATM's) could be a normal desktop system (though not in a standard case), and run Windows.

So, what makes an "embedded" system? It's the fact that the system is dedicated (or even specifically designed) to run a specific application. The ATM hardware is dedicated to running the ATM application. Or it could be a dedicated control board, like an Arduino.

It's not something that you can write a termpaper on, then fire up the latest FPS. It's a computer that is designed to do only 1 (or a limited number of) specific tasks, and they cannot be changed by the end user.

Monday, November 10, 2008

What is a computer?

As a side note: Well, I really do intend to update M W F. All I have to do is put life aside occasionally...

But, to continue my last post, the question of "what is programming?" leads into the question of "what is a computer?" and that gets to be a tricky little question.

Most people think that a "computer" is what they are looking at / using when they read this blog. But that doesn't even begin to cover what it is.

Looking back to the start of the computer age, you have systems like ENIAC (Electronic Numerical Integrator Analyzer and Computer) and the like, where you have a room full of vacuum tube electronics.

Or a modern microcontroller, the size of a a grain of rice!

And everything in between. How many people look at their TV remote control and think "computer"? You may not be able to program it, but someone wrote the software for it...

Professionally, I write software for very small embedded systems. And have a lot of fun doing it.

Tuesday, November 4, 2008

USA Election Day!

If you are in the USA, today (11/4/2008) is election day!

VOTE!

Monday, November 3, 2008

What is programming?

Before I talk (more) about programming and what I do for fun and profit, the question should be asked:

What is computer programming?

Back "in the day", I wrote in Assembly for speed and compactness, and in C for complexity. I, and the people I knew, looked down on people who though that putting numbers in a spreadsheet (in Lotus 1-2-3) were "programming".

But, if you look at computers today and what is being done with them, the real answer becomes "whatever is written that controls the operation of a computer". So, writing in C, or Assembly, or Java, or Cobol, or even writing a web page is programming, but posting on your blog (or Slashdot or Digg or ... is not.

But, this also leads into the next question "What is a computer?", which is the subject of my next post on Wednesday.