Saturday, November 29, 2008
Wireless (portable) MP3 Player
Pictured here is a mock up of my "eternally in progress" MP3 player. It's 3x2 inches.
This time it is based on a TI MSP430 + 2.4Ghz wireless module (EZ430-RF2500T), a Sparkfun MP3 breakout board and a rechargeable CR2032 Lithium Ion 3V 250mAh button cell battery.
Two jacks: up top is the headphone / line-out jack and below is the power charger module jack.
Up on the right is a micro-sd holder for MP3 files.
The unit is controlled via wireless (player controls and status).
I am estimating battery life at around 8-10 hrs of play.
(And, yes, for those of you with sharp eyes, the proto board needs to be isolated from the battery holder because the topside of the board is one continuous plane and would short out the positive oriented holder.)
Thursday, October 23, 2008
Compromises
It's a bit early to make 2009 New Year resolutions, but I am posting this to remind myself of one (professional) resolution I plan to make: No more compromises.
This doesn't mean that factors won't be considered. What I produce professionally (technically) will be indeed affected by time, monetary costs and, of course, family needs. But, the feeling that I may have compromised a design or solution due to technical decisions is something I want to put behind me.
If I were to produce a technological product in 2009, it will be the *best* product I could have produced, given time, monetary costs and family needs.
I look around at the stuff that I use and like (e.g. Tivoli radios, byerdynamic headphones and Grado headphones, sennelier oil pastels, copic outliners) and I see them as the wonderful products. They are just things, but as things go, they give me pleasure.
I make things. It is what I do, and I don't do enough of it. However, I also accept too many compromises (either out of indifference, tiredness, or even incompetence on my part). I have to stop that.
This doesn't mean that factors won't be considered. What I produce professionally (technically) will be indeed affected by time, monetary costs and, of course, family needs. But, the feeling that I may have compromised a design or solution due to technical decisions is something I want to put behind me.
If I were to produce a technological product in 2009, it will be the *best* product I could have produced, given time, monetary costs and family needs.
I look around at the stuff that I use and like (e.g. Tivoli radios, byerdynamic headphones and Grado headphones, sennelier oil pastels, copic outliners) and I see them as the wonderful products. They are just things, but as things go, they give me pleasure.
I make things. It is what I do, and I don't do enough of it. However, I also accept too many compromises (either out of indifference, tiredness, or even incompetence on my part). I have to stop that.
Tuesday, August 12, 2008
AWK based AFT redux?...
I've been maintaining the current incarnations of AFT in Perl for over 10 years now. I haven't updated the code base in almost 2 years now. I can't brag that is is bug free, but it certainly is stable (at least in some interpretation of that word).
Every few months I get a question (or two) from new users of AFT. I have no idea how many people are using AFT, but it is part of the Debian and FreeBSD software archives so it is very easy to download and install on those systems.
This search indicates that there are at least folks out there using a mostly unchanged AFT to publish documents to the Web. (They haven't bothered to remove the default advertisement).
I'm pretty much completely out of touch with Perl these days, so I am not very motivated to improve or extend the current AFT. The codebase has grown complicated and I wince at some of my awkward Perl techniques.
However, I do have a very decent corpus of AFT documents. I still use AFT to do general purpose documentation and then there is the previous mentioned cache of AFT documents that can be found through Google.
If I were to analyze this corpus, would I find a simpler subset of AFT that would do for most uses? And, if I identified that subset, is it time for a rewrite?
Frankly, I would probably do such a rewrite in AWK (or GAWK). I'd keep it simple and maybe make it a little more modular (shell pipes?). I would probably drop the Windows support (although it would still run under cygwin).
Regarding modularity, I'd probably develop it to run in two phases:
That would be sweet :-)
Every few months I get a question (or two) from new users of AFT. I have no idea how many people are using AFT, but it is part of the Debian and FreeBSD software archives so it is very easy to download and install on those systems.
This search indicates that there are at least folks out there using a mostly unchanged AFT to publish documents to the Web. (They haven't bothered to remove the default advertisement).
I'm pretty much completely out of touch with Perl these days, so I am not very motivated to improve or extend the current AFT. The codebase has grown complicated and I wince at some of my awkward Perl techniques.
However, I do have a very decent corpus of AFT documents. I still use AFT to do general purpose documentation and then there is the previous mentioned cache of AFT documents that can be found through Google.
If I were to analyze this corpus, would I find a simpler subset of AFT that would do for most uses? And, if I identified that subset, is it time for a rewrite?
Frankly, I would probably do such a rewrite in AWK (or GAWK). I'd keep it simple and maybe make it a little more modular (shell pipes?). I would probably drop the Windows support (although it would still run under cygwin).
Regarding modularity, I'd probably develop it to run in two phases:
- A single AWK script to produce
- An intermediate markup for Phase 2.
- Or vanilla HTML for quick view or incorporation into a larger HTML/CSS framework.
- A translation from intermediate markup to HTML, LaTeX, etc.
- Similar to what I have now with the current AFT.
That would be sweet :-)
Wednesday, August 06, 2008
High Level Languages for Prototyping
I want a high level language to try out ideas. Often the ideas I am interested in draws on things such as concurrency, symbolic computing, pattern matching, etc. I don't need a production capable language. This is just for fiddling around with -- a prototyping language if you will.
Tcl and Awk were my prototyping languages of choice for the past 10-15 years. Before that it was Forth and a little bit of Lisp.
However, I have found that I have five criteria for such a language now. The first three are firm, the last two are desired qualities:
Logo is nice, but has too many incompatible variants. StarLogo meets #1, but it looks too busy (especially StarLogo TNG).
Item 2 sounds a bit ridiculous, but for languages that aren't bound by performance needs, I don't see why I should be trapped in 32/64 bits. I'll never forget the time, back in 1984, when I typed (fact 120) in Lisp.... oooh.
I've been meaning to learn Mozart/Oz ever since I read CTM a few years back. It's a wonderful book. Maybe if I concentrate *real* hard and drop my other CFT projects, I could pick it up again. :-)
Tcl and Awk were my prototyping languages of choice for the past 10-15 years. Before that it was Forth and a little bit of Lisp.
However, I have found that I have five criteria for such a language now. The first three are firm, the last two are desired qualities:
- Supports concurrency (lots of little processes/tasks) seamlessly.
- Seamless support for Bignums. I don't want to think about silly limitations of native word sizes.
- No fencing in (multi-paradigm support is a must!)
- Interactive. I don't want to do a edit/compile/run cycle for simple things.
- Portable. I want to install it everywhere.
Logo is nice, but has too many incompatible variants. StarLogo meets #1, but it looks too busy (especially StarLogo TNG).
Item 2 sounds a bit ridiculous, but for languages that aren't bound by performance needs, I don't see why I should be trapped in 32/64 bits. I'll never forget the time, back in 1984, when I typed (fact 120) in Lisp.... oooh.
I've been meaning to learn Mozart/Oz ever since I read CTM a few years back. It's a wonderful book. Maybe if I concentrate *real* hard and drop my other CFT projects, I could pick it up again. :-)
Sunday, July 27, 2008
Down with Crap!
Down with crap devices! An aside: My kids came home from watching Wall-E with free crappy rubber encased disposable Wall-E watches. Ah, the irony.
We don't need more crap devices. I am less interested in the new tech gadgets. I want permanent tech. I want tech that helps people. You know, stuff that saves lives and makes our lives less miserable.
I want tech that reduces my reliance on the power grid. I want to reduce my electric bill, not increase it.
I don't want a PC in my router. I want my router to be a router. I want it to work without a lot of flashing lights. I want it to consume very little power. I want it to go to sleep at night until it gets activity coming from within my home network.
I want a GPS tracker that lasts (at a low fix rate) months or years on a small non-proprietary battery.
I want an e-book reader that lasts over a year on one charge.
I want to come to grips with the fact that battery powered devices that require recharging on a daily basis are part of the energy grid. There is no free ride. It takes power to make power.
No, wait a minute. I've got it.... I want personal tech that can be effortlessly recharged through solar power.
I still use my 22 year old Cassio CM-100 calculator. It does hex/octal/binary/decimal and boolean operations. It runs off of solar power. I've never had to think about replacing a battery or plugging it in for recharging.
We don't need more crap devices. I am less interested in the new tech gadgets. I want permanent tech. I want tech that helps people. You know, stuff that saves lives and makes our lives less miserable.
I want tech that reduces my reliance on the power grid. I want to reduce my electric bill, not increase it.
I don't want a PC in my router. I want my router to be a router. I want it to work without a lot of flashing lights. I want it to consume very little power. I want it to go to sleep at night until it gets activity coming from within my home network.
I want a GPS tracker that lasts (at a low fix rate) months or years on a small non-proprietary battery.
I want an e-book reader that lasts over a year on one charge.
I want to come to grips with the fact that battery powered devices that require recharging on a daily basis are part of the energy grid. There is no free ride. It takes power to make power.
No, wait a minute. I've got it.... I want personal tech that can be effortlessly recharged through solar power.
I still use my 22 year old Cassio CM-100 calculator. It does hex/octal/binary/decimal and boolean operations. It runs off of solar power. I've never had to think about replacing a battery or plugging it in for recharging.
More MCU Fun.
I've been looking into the new MSP430F5xx. It looks really nice. I ordered the development kit. Now I have to figure out what to do with it. ;-)
/todd
/todd
Tuesday, April 29, 2008
New Literate Programming Hack: Knit
I can't really use CWEB or other disruptive Literate Programming tools at work. I want some of the benefits that Literate Programming brings, but I can't take the baggage (at least not at work).
Yet, when I code in a LP style, I tend to be much more precise and correct. My code does tend to be less buggy. I think it is because it forces me to really think about my code in such a way that I want to be able to explain (and understand) every variable and every line. After all, the code becomes something I have to talk about, not just pump out. Do I really need a variable here? Do I really understand how that library macro works?
So, a couple of nights of hacking and I have yet-another-pitiful-LP-inspired-code-markup technique. I call it Knit.
It is written in gawk and embeds its own documentation in the source code comments. I hope to have some C examples soon.
Yet, when I code in a LP style, I tend to be much more precise and correct. My code does tend to be less buggy. I think it is because it forces me to really think about my code in such a way that I want to be able to explain (and understand) every variable and every line. After all, the code becomes something I have to talk about, not just pump out. Do I really need a variable here? Do I really understand how that library macro works?
So, a couple of nights of hacking and I have yet-another-pitiful-LP-inspired-code-markup technique. I call it Knit.
It is written in gawk and embeds its own documentation in the source code comments. I hope to have some C examples soon.
Monday, April 28, 2008
New Knuth Fascicles..
With Donald Knuth being trashed fairly recently on reddit and various blogs (mostly due to a recent interview), I realized that I haven't perused his site in a while.
Oooh. More fasciles!
In particular, I'll be trying to digest some of this one tonight.
(I am a huge fan of his work. Literate Programming is my all time favorite technical book. I read it back in 1992 and it has completely screwed me up for life. I read it whenever I get burnt out and need some inspiration. It has always been my model for excellence for both it's content and style.)
Oooh. More fasciles!
In particular, I'll be trying to digest some of this one tonight.
(I am a huge fan of his work. Literate Programming is my all time favorite technical book. I read it back in 1992 and it has completely screwed me up for life. I read it whenever I get burnt out and need some inspiration. It has always been my model for excellence for both it's content and style.)
Wednesday, April 23, 2008
A half dozen uses for a Motion Sensing Accelerometer
So, you've got yourself an accelerometer...
1. Who walked off with my XXXX?
2. Handheld XYZ gadget's screen is facing down on the table. Turn off what cannot be seen.
3. My car is housed in a long time parking facility (I'm out of the country for a few months). Who moved it, and when?
4. Can't acquire GPS (or Comm Satellite) with a patch antenna when the patch isn't oriented correctly. Why waste the power?
5. No. Nobody simply bumped into or moved my bike out of the way. Ack! Somebody is riding away with it!
6. Out on a nice hike. Oops, I've fallen down the slope and can't get up... or.. OH MY GOD: I'm being thrashed about by a bear.
Okay, so #6 is a bit far fetched....
1. Who walked off with my XXXX?
2. Handheld XYZ gadget's screen is facing down on the table. Turn off what cannot be seen.
3. My car is housed in a long time parking facility (I'm out of the country for a few months). Who moved it, and when?
4. Can't acquire GPS (or Comm Satellite) with a patch antenna when the patch isn't oriented correctly. Why waste the power?
5. No. Nobody simply bumped into or moved my bike out of the way. Ack! Somebody is riding away with it!
6. Out on a nice hike. Oops, I've fallen down the slope and can't get up... or.. OH MY GOD: I'm being thrashed about by a bear.
Okay, so #6 is a bit far fetched....
Thursday, April 03, 2008
When is Forth no longer Forth?
If you follow Forth, you know that Chuck Moore is continually reducing what he considers to be Forth. But, I am intrigued by this 1991 article by Frank Sergeant.
I have a desire to do Forth on the MSP430, but there isn't a lot of memory. Even Forth expects more memory than most of the smaller MSP430s have available. There are commercial Forths that run on MSP430s, but what they offer is unclear.
I am trying to build a Forth-like language that will not only offer a tethered solution to MSP430 app development (run an interactive development environment on the PC that "controls" the MSP430), but have one that can save the results of tinkering as actually target code for the MSP430. I am taking the VM route (mainly because I don't have the CFT bandwidth for assembly). The C coded VM will have a target size of 2-4K and should execute the Forth bytecodes emitted by the PC based interactive development environment.
Just another CFT on the vine...
I have a desire to do Forth on the MSP430, but there isn't a lot of memory. Even Forth expects more memory than most of the smaller MSP430s have available. There are commercial Forths that run on MSP430s, but what they offer is unclear.
I am trying to build a Forth-like language that will not only offer a tethered solution to MSP430 app development (run an interactive development environment on the PC that "controls" the MSP430), but have one that can save the results of tinkering as actually target code for the MSP430. I am taking the VM route (mainly because I don't have the CFT bandwidth for assembly). The C coded VM will have a target size of 2-4K and should execute the Forth bytecodes emitted by the PC based interactive development environment.
Just another CFT on the vine...
Tuesday, March 25, 2008
Maplefish Labs
Sunday, March 16, 2008
The Quiet
This is a long post of little interest.
About an hour ago, I read to my two five year old girls. We read Jon Muth's Zen Shorts. I don't know if they really enjoyed it, but it was a quiet read. My wife and nine year old son are out of town.
The watercolor artwork of the book was soothing and provided an easy transition to bed time. While I read, from the kitchen Yo-Yo Ma could be heard playing the works of Ennio Morricone. The music was both spectacular and relaxing. This collection of soundtracks always seem to quiet the girls. They seem to know that when classical music is heard, bedtime is nearing.
They drifted off to sleep a half an hour ago. There were no final protests, only a question about whether tomorrow will be Tuesday. No, sweeties, Tuesday is the day after tomorrow.
It is evening. The earlier part of the day was about family. The girls played hard and could not be convinced to help with house cleaning. They behaved their age, as expected.
The morning was rainy until about 10am, when the sun finally made its appearance. In celebration, I cleared the living room floor of unfolded clothes. We then danced to an adhoc mix of R&B. We danced to some Lauryn Hill, Michael Franti (Spearhead), and old-school Chaka Khan (with Rufus). After dancing, the girls took a bath and I whisked them off to spend a couple hours with their cousins, aunt and uncle.
The late afternoon saw me tinkering around with microcontrollers and solder at my workdesk. At a particularly difficult solder junction, I was interupted by the return of the girls, their cousins, aunt and uncle.
Then, quickly, came their supper, teeth brushing and nighttime book.
There was something about the book, the Zen Shorts book, that seemed to break any desire to return to the workbench. Nighttime is not for engineering. At least not for me tonight.
My supper is simple and not very refined. A bagel, some sunflower seed butter, a glass of cheap Pinot Noir. The house is quiet.
My thoughts turn to art, the books I bought recently to read, and the quietness. The unusual quietness that would have not existed with whole family present.
The books were purchased yesterday on a whim from Second Story Books in Rockville. This is a huge warehouse full of used books. I spent a hour and a half browsing the science, computer, engineering and math sections. I left with three books: The Tale of the Scale, The Introspective Engineer, and The Art of Mathematics.
As a modern technological man, I feel compelled to fill quiet voids with ideas, tinkering and programming. All of this, I am compelled to dive into with a panic -- I only have a few hours before sleep and the week will begin.
Another glass of wine and this feeling should dissipate. A little cello swooning and swaying in the background should set the mood for reading.
The week ahead is full of projects and spirited engineering. There are difficult deadlines looming.
But tonight, there are clothes to be folded, a bed to be made and books to be perused.
Yet, in the quiet there is still a tug of loneliness. I keep expecting to hear my son giggling or his inevitable "what can we do together tonight?". But, that will soon return. It will be a welcome return, but tonight there is just me, my gently sleeping girls and the quiet.
About an hour ago, I read to my two five year old girls. We read Jon Muth's Zen Shorts. I don't know if they really enjoyed it, but it was a quiet read. My wife and nine year old son are out of town.
The watercolor artwork of the book was soothing and provided an easy transition to bed time. While I read, from the kitchen Yo-Yo Ma could be heard playing the works of Ennio Morricone. The music was both spectacular and relaxing. This collection of soundtracks always seem to quiet the girls. They seem to know that when classical music is heard, bedtime is nearing.
They drifted off to sleep a half an hour ago. There were no final protests, only a question about whether tomorrow will be Tuesday. No, sweeties, Tuesday is the day after tomorrow.
It is evening. The earlier part of the day was about family. The girls played hard and could not be convinced to help with house cleaning. They behaved their age, as expected.
The morning was rainy until about 10am, when the sun finally made its appearance. In celebration, I cleared the living room floor of unfolded clothes. We then danced to an adhoc mix of R&B. We danced to some Lauryn Hill, Michael Franti (Spearhead), and old-school Chaka Khan (with Rufus). After dancing, the girls took a bath and I whisked them off to spend a couple hours with their cousins, aunt and uncle.
The late afternoon saw me tinkering around with microcontrollers and solder at my workdesk. At a particularly difficult solder junction, I was interupted by the return of the girls, their cousins, aunt and uncle.
Then, quickly, came their supper, teeth brushing and nighttime book.
There was something about the book, the Zen Shorts book, that seemed to break any desire to return to the workbench. Nighttime is not for engineering. At least not for me tonight.
My supper is simple and not very refined. A bagel, some sunflower seed butter, a glass of cheap Pinot Noir. The house is quiet.
My thoughts turn to art, the books I bought recently to read, and the quietness. The unusual quietness that would have not existed with whole family present.
The books were purchased yesterday on a whim from Second Story Books in Rockville. This is a huge warehouse full of used books. I spent a hour and a half browsing the science, computer, engineering and math sections. I left with three books: The Tale of the Scale, The Introspective Engineer, and The Art of Mathematics.
As a modern technological man, I feel compelled to fill quiet voids with ideas, tinkering and programming. All of this, I am compelled to dive into with a panic -- I only have a few hours before sleep and the week will begin.
Another glass of wine and this feeling should dissipate. A little cello swooning and swaying in the background should set the mood for reading.
The week ahead is full of projects and spirited engineering. There are difficult deadlines looming.
But tonight, there are clothes to be folded, a bed to be made and books to be perused.
Yet, in the quiet there is still a tug of loneliness. I keep expecting to hear my son giggling or his inevitable "what can we do together tonight?". But, that will soon return. It will be a welcome return, but tonight there is just me, my gently sleeping girls and the quiet.
Saturday, March 08, 2008
2nd Quote of the day, also from SICP
Why can't a day have two quotes?
From the Foreward of "Structure and Interpretation of Computer Programs":
From the Foreward of "Structure and Interpretation of Computer Programs":
"The source of the exhilaration associated with computer programming is the continual unfolding within the mind and on the computer of mechanisms expressed as programs and the explosion of perception they generate. If art interprets our dreams, the computer executes them in the guise of programs!"
- Alan J. Perlis
Quote of the day, from SICP
"I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.''
Alan J. Perlis (April 1, 1922-February 7, 1990)
Friday, March 07, 2008
The most brilliant paper I have read in a while...
The paper referenced here.
It's about the art form known as mathematics.
Sigh, time to break out my Turtle Geometry book again.
It's about the art form known as mathematics.
Sigh, time to break out my Turtle Geometry book again.
Thursday, March 06, 2008
Not a "Maker"
Not that anyone has asked, but...
I am not a "Maker".
I've alternated between awe and respect in regards to the things I've seen "Makers" make, but I am not one of their clan. Neither am I one of the closely related "Dorkbots".
I don't think I actually "like" to make things. I am driven to make things. It's in my blood.
I don't have a lot of things to show at this time because I tend to obsess. I hate the idea of spending 8 hours a day working on stuff that doesn't interest me, so I tend to get (and stick with) jobs that allow me to obsess. And, that tends to suck away at my CFT.
So, I am less interested in making really cool stuff like you can see here. But I do seem drawn to making (or at least thinking about) stuff that has more tangible impact.
That sounds rather "engineer-y", but I am (at times) equally consumed by art (music, books, drawing and painting). Sometimes I've even been known to do a drawing/painting or two.
Keep an eye on this space and hopefully I will find the CFT to work on something I am passionate about. It may not be earth-shattering, but hopefully it will be interesting, well engineered and full of beauty.
Enough talk... I should be working on something.
Wednesday, February 27, 2008
Life is too short to idle away in a cube...
Not much is getting done in my office cube today. I like my job; I hate my cubicle. (I hate *all* Cubicles).
I've got some serious mental blocks happening right now. I'm not feeling 100% healthy, so that is definitely a contributor.
I'm going home to hang with my son.
I've got some serious mental blocks happening right now. I'm not feeling 100% healthy, so that is definitely a contributor.
I'm going home to hang with my son.
Inspiration... Knuth & TeX
My interests are odd (for a computer geek). I don't think I'm retro, but I've learned Ruby, Lua, Erlang, ML, OCaml and a bit of haskell in the the past 7-8 years (yep, I first picked up on Ruby in 2000). I really haven't learned a new language (or done any real programming in the above languages) in the past 4 years.
I'm interested in [La]TeX again. A couple of posts ago I mentioned working on AFT. That could be fun, but (if I had the CFT) I'd rather hack around with TeX. In particular, I am interested in learning MetaPost (look it up). There is a nice $50 LaTeX graphics book that covers MetaPost.
So, I am thinking to myself, wouldn't it be fun to do some hardcore typesetting? (Remember, my interests are odd.)
Fundamentally, I love the idea of TeX (and LaTeX). The end result is very tangible: A (potentially) beautiful typeset document. Maybe make a book out of my kids' artwork or something. TeX (and LaTeX) is a complex enough system that it would be fun just to get lost hacking in it.
Emacs is a large hackable system too, but the end result is some editing tools.
Unix is a large hackable system, but the end result is doing some process/text manipulation.
With TeX, the end result is a piece of paper. A well typeset piece of paper.
I'm interested in [La]TeX again. A couple of posts ago I mentioned working on AFT. That could be fun, but (if I had the CFT) I'd rather hack around with TeX. In particular, I am interested in learning MetaPost (look it up). There is a nice $50 LaTeX graphics book that covers MetaPost.
So, I am thinking to myself, wouldn't it be fun to do some hardcore typesetting? (Remember, my interests are odd.)
Fundamentally, I love the idea of TeX (and LaTeX). The end result is very tangible: A (potentially) beautiful typeset document. Maybe make a book out of my kids' artwork or something. TeX (and LaTeX) is a complex enough system that it would be fun just to get lost hacking in it.
Emacs is a large hackable system too, but the end result is some editing tools.
Unix is a large hackable system, but the end result is doing some process/text manipulation.
With TeX, the end result is a piece of paper. A well typeset piece of paper.
Quote for the day
Twenty years from now
you will be more disappointed
by the things that you didn't do
than by the ones you did do.
So throw off the bowlines.
Sail away from the safe harbor.
Catch the trade winds in your sails.
Explore, Dream, Discover
-- Mark Twain
you will be more disappointed
by the things that you didn't do
than by the ones you did do.
So throw off the bowlines.
Sail away from the safe harbor.
Catch the trade winds in your sails.
Explore, Dream, Discover
-- Mark Twain
Tuesday, February 26, 2008
AFT Stuff
It's been a couple of years since I've done anything with AFT. I have a few ideas I've wanted to implement for a while, but I am tiring with mucking with the core of AFT and causing distress with any of my (few) users who wonder if they should upgrade. Sometimes a new feature may break old stuff or sometimes I roll in fixes with the new features.
As far as I can tell, AFT users install the version of AFT current to when they discovered it, use it and then resist upgrading (why upgrade when the tool does what you want)?
So, I am going to freeze AFT against any new features and add features by way of AFT add-ons.
These add-ons will be separately download-able and work with the AFT you have installed.
Here are some of the potential AFT add-ons:
As far as I can tell, AFT users install the version of AFT current to when they discovered it, use it and then resist upgrading (why upgrade when the tool does what you want)?
So, I am going to freeze AFT against any new features and add features by way of AFT add-ons.
These add-ons will be separately download-able and work with the AFT you have installed.
Here are some of the potential AFT add-ons:
- aft-indexer -- Create an index on an AFT file against words in a separate document, write out a new AFT file that includes AFT markup for an index and run AFT against that.
- aft-fixtabs -- Take an AFT document and smartly fix any tabstop errors. Output a new AFT document with tabs or N spaces for tabs.
- aft-ft -- Convert "free text" (somewhat intelligently) to AFT format.
- aft-simple -- A newer, simpler markup format (influenced by lessons learned) that produce standard AFT output.
Tuesday, February 19, 2008
Idea of the week #1: Scramble Box
This would be a small handheld device powered by a AAA battery that has 1 SD slot, two buttons and 1 tri-color LED.
Let's say you've just taken some prize-winning pictures and want to "secure" the SD card from copyright thieves.
You just pop in the SD card, press the "scramble" button and all content on the SD card is encrypted (in place) using AES-256. The LED lights yellow while this is happening and then turns green when done.
(The key was crafted by you and programmed into the device earlier by putting it into a file called "CFG/KEY.CFG" on a blank SD card).
When you want to unscramble the SD, you pop it in and press the "descramble" button. The LED lights yellow while this is happening and then turns green when done.
The device holds onto the "key" in flash memory. You can use a different key anytime by placing CFG/KEY.CFG on either the enrypted or yet-to-be-encrypted SD card. At the end of encryption/decryption the CFG/KEY.CFG is securely deleted (don't want to store keys in the clear, now do we?). If the CFG/KEY.CFG is supplied on a blank SD card, the flashed key is changed.
This is less secure (if someone steals your Scramble Box AND your encrypted SD cards then they can decrypt the cards so as long as they were encrypted with the currently flashed key). However, this at least allows encryption/decryption to occur without creating the key file
(so you can go directly from camera to Scramble Box).
Now, photos are probably not the best use case here. A better, although less dramatic, example would be to put a bunch of "important" documents on the SD card and run it through the Scrambler.
However, since we are just using a fairly standard AES-256 technique (CBC w/ CTS), you could always do the encryption/decryption on a PC (with the right software).
In this case, the Scramble Box can be used for batch encryption/decryption.
Oh, and for usability, the key is a simple password/passphrase that is run through a hash function, so you don't have to memorize a 32 bit key ;-)
Let's say you've just taken some prize-winning pictures and want to "secure" the SD card from copyright thieves.
You just pop in the SD card, press the "scramble" button and all content on the SD card is encrypted (in place) using AES-256. The LED lights yellow while this is happening and then turns green when done.
(The key was crafted by you and programmed into the device earlier by putting it into a file called "CFG/KEY.CFG" on a blank SD card).
When you want to unscramble the SD, you pop it in and press the "descramble" button. The LED lights yellow while this is happening and then turns green when done.
The device holds onto the "key" in flash memory. You can use a different key anytime by placing CFG/KEY.CFG on either the enrypted or yet-to-be-encrypted SD card. At the end of encryption/decryption the CFG/KEY.CFG is securely deleted (don't want to store keys in the clear, now do we?). If the CFG/KEY.CFG is supplied on a blank SD card, the flashed key is changed.
This is less secure (if someone steals your Scramble Box AND your encrypted SD cards then they can decrypt the cards so as long as they were encrypted with the currently flashed key). However, this at least allows encryption/decryption to occur without creating the key file
(so you can go directly from camera to Scramble Box).
Now, photos are probably not the best use case here. A better, although less dramatic, example would be to put a bunch of "important" documents on the SD card and run it through the Scrambler.
However, since we are just using a fairly standard AES-256 technique (CBC w/ CTS), you could always do the encryption/decryption on a PC (with the right software).
In this case, the Scramble Box can be used for batch encryption/decryption.
Oh, and for usability, the key is a simple password/passphrase that is run through a hash function, so you don't have to memorize a 32 bit key ;-)
Lambda the Ultimate links to some of my old ideas
These links are mainly here for my own bookmarking purposes, but they expound ideas I can't seem to let go of:
In the second link, Luke Gorrie ported his "untar" program from scheme shell to bash. I tried to make it more beautiful (or perhaps just more obfuscated). Here is his ported script, and here is my rewrite.
In the second link, Luke Gorrie ported his "untar" program from scheme shell to bash. I tried to make it more beautiful (or perhaps just more obfuscated). Here is his ported script, and here is my rewrite.
Wednesday, February 13, 2008
The End of the Analog Television Era: Sad...
The end of an era is coming. On Feb 17, 2009 analog television broadcast is supposed to come to an end. The US government has mandated that all over the air broadcasts will be digital. They are giving away coupons for free converters for analog TVs. After March 1, 2009 all newly manufactured TVs must be digital.
Since 1941, the analog broadcast standard has pretty much remained the same. The same signal broadcast then can be received now. For over the air broadcasts, the era of NTSC will end after a 68 year run.
Children in a post 2009 world will never know about "snowy" pictures. With poorly received digital, you get frame drops, stutters and pixelation.
The days of hacking analog TV signals are also gone. This is not quite as dramatic as the (eventual?) loss of analog AM/FM radio, where with just a crystal and a few parts any kid can tune in a grainy signal and thrill to the discovery of turning inaudible radio signals into sound!
I haven't figured out yet what the plan will be regarding "emergency broadcasting". When the next flood or tornado hits what do folk who didn't get the "free voucher" upgrade (or are just too far away to get a decent signal) do? In the middle of swampy Lousiana, or in a remote farmhouse in Kansas you may be able to currently get a grainy noisy signal warning you of disaster. Come 2009, how well will the same tower broadcast digital? Will you be able to make out the news when the digital stalls and drops?
None of this affects us cable/satellite users. But, I want to tune in when the moment comes and we witness the silence of the analog signal. I wonder how many uninformed people will take the silence to mean an invasion from space or Armageddon?
Since 1941, the analog broadcast standard has pretty much remained the same. The same signal broadcast then can be received now. For over the air broadcasts, the era of NTSC will end after a 68 year run.
Children in a post 2009 world will never know about "snowy" pictures. With poorly received digital, you get frame drops, stutters and pixelation.
The days of hacking analog TV signals are also gone. This is not quite as dramatic as the (eventual?) loss of analog AM/FM radio, where with just a crystal and a few parts any kid can tune in a grainy signal and thrill to the discovery of turning inaudible radio signals into sound!
I haven't figured out yet what the plan will be regarding "emergency broadcasting". When the next flood or tornado hits what do folk who didn't get the "free voucher" upgrade (or are just too far away to get a decent signal) do? In the middle of swampy Lousiana, or in a remote farmhouse in Kansas you may be able to currently get a grainy noisy signal warning you of disaster. Come 2009, how well will the same tower broadcast digital? Will you be able to make out the news when the digital stalls and drops?
None of this affects us cable/satellite users. But, I want to tune in when the moment comes and we witness the silence of the analog signal. I wonder how many uninformed people will take the silence to mean an invasion from space or Armageddon?
Monday, February 11, 2008
Cutting Code in a Coffee House
I need to remind myself that its all about creative problem solving. The Web and internet is all just a facade. Software is all about a manifestation of concepts. It's a tool for creative thinking. If you can web-enable it then you are trendy.
While doing embedded development, I am limited by what can be physically rendered. I can only get things smaller up to a point. I can only do what physics deem possible (for today at least). I can be creative, but I can't fly.
Current thinking in Web technology threaten to clip my wings too. I left IT development for the embedded world because I felt bogged down by XML, HTML and the Web programming juggernauts (Java, Javascript, Ruby, etc).
The effort of putting things on the Web didn't seem all that sexy anymore.
The effort of building complicated backend servers was no longer appealing.
Building embedded thingies gives me some immediate satisfaction. People use the stuff I build. I can measure the impact. It's real. It is physical. It has a form.
But, I kinda miss pure software. Coding in coffee houses is fun. Developing something useful while sipping on coffee and eating sweet breads (doughnuts, danishes, pie, oh my) is heaven. I just need an idea.
At times, when I got wrapped up in just hacking for the sake of hacking (e.g. getting awk/ksh/bash to do things they really weren't meant to do), I didn't feel like I was contributing much. Hey, I was a member of the language-of-the-week club (Erlang, Haskell, ML, etc)!
In reality, the languages I am the most productive in has been (in no particular order): C, Tcl, Awk and Perl. I've built production systems in Tcl/C and have written my only contribution to open source in Perl (see AFT). So, why do I insist on learning new languages? Why can't I just cut code in what I know best?
I need to take the time to visit a coffee house. Just me, my laptop and some ideas.
While doing embedded development, I am limited by what can be physically rendered. I can only get things smaller up to a point. I can only do what physics deem possible (for today at least). I can be creative, but I can't fly.
Current thinking in Web technology threaten to clip my wings too. I left IT development for the embedded world because I felt bogged down by XML, HTML and the Web programming juggernauts (Java, Javascript, Ruby, etc).
The effort of putting things on the Web didn't seem all that sexy anymore.
The effort of building complicated backend servers was no longer appealing.
Building embedded thingies gives me some immediate satisfaction. People use the stuff I build. I can measure the impact. It's real. It is physical. It has a form.
But, I kinda miss pure software. Coding in coffee houses is fun. Developing something useful while sipping on coffee and eating sweet breads (doughnuts, danishes, pie, oh my) is heaven. I just need an idea.
At times, when I got wrapped up in just hacking for the sake of hacking (e.g. getting awk/ksh/bash to do things they really weren't meant to do), I didn't feel like I was contributing much. Hey, I was a member of the language-of-the-week club (Erlang, Haskell, ML, etc)!
In reality, the languages I am the most productive in has been (in no particular order): C, Tcl, Awk and Perl. I've built production systems in Tcl/C and have written my only contribution to open source in Perl (see AFT). So, why do I insist on learning new languages? Why can't I just cut code in what I know best?
I need to take the time to visit a coffee house. Just me, my laptop and some ideas.
Pure Software vs Embedded Hybrid
Visions of purchasing the Asus EEE has grabbed me lately. It would probably be useless for embedded development, but if I imagine myself somewhere on an island (or in a mountain cabin) hacking away at my latest ideas. There wouldn't be much embedded work done there.
At the minimum, embedded work would take a PC, some sort of JTAG interface and a target board (and maybe a power supply). To do embedded I am chained to my house (or the lab/cube at work). With a nice portable, I could be sitting in a coffee shop or in an airport terminal, jamming to tunes while I hack away.
This is a different kind of development, though. As much as the embedded devices I hack during the day will impact people (I design pagers, satellite based trackers, etc), writing pure software (that either runs on a server or someone's PC) has the potential to impact far more people (and hopefully for good, not evil!).
At the minimum, embedded work would take a PC, some sort of JTAG interface and a target board (and maybe a power supply). To do embedded I am chained to my house (or the lab/cube at work). With a nice portable, I could be sitting in a coffee shop or in an airport terminal, jamming to tunes while I hack away.
This is a different kind of development, though. As much as the embedded devices I hack during the day will impact people (I design pagers, satellite based trackers, etc), writing pure software (that either runs on a server or someone's PC) has the potential to impact far more people (and hopefully for good, not evil!).
Thursday, February 07, 2008
(Simple) Single Wire Protocols
My current favorite MCU is the MSP430. In particular, I like the ones that stretch the longest lifetime out of small batteries (like a CR2032 coin cell). Unfortunately, there aren't a lot of "communication" options for such a low power design (think: how do we get logged data out of a tiny low power processor?). RS-232 is too heavy, SPI/I2C is too complex, Bluetooth and other RF is too expensive (money and power-wise).
How about a simple single wire protocol?
Dallas/Maxim has such a protocol (called One-Wire) that is very interesting, but its very proprietary (you can't legally create a slave -- they reserve the right to be the sole provider of slaves that are compliant to the protocol). Among other things, this protocol supports multiple slaves and can even be used to power them. You just need a single wire (normally pulled up) and a common ground. The single wire is used for *all* communication (bi-directional).
I'm looking at doing something similiar to this, but greatly simplified: Only one slave supported.
How about a simple single wire protocol?
Dallas/Maxim has such a protocol (called One-Wire) that is very interesting, but its very proprietary (you can't legally create a slave -- they reserve the right to be the sole provider of slaves that are compliant to the protocol). Among other things, this protocol supports multiple slaves and can even be used to power them. You just need a single wire (normally pulled up) and a common ground. The single wire is used for *all* communication (bi-directional).
I'm looking at doing something similiar to this, but greatly simplified: Only one slave supported.
(Random) Copious Free Ideas
A few random ideas for someone's Copious Free Time: (All of these projects involve very low power circuits -- the idea is that these things will run a long, long time without changing batteries).
Cold Bot
Augment a Roomba (or iRobot Create) with a temperature sensing parasite that navigates the Roomba to the coldest spot(s) in a room. If the temperature sensor was mounted on a small probe/arm, then you could pin point insulation leaks. The parasite also controls the power to the roomba thereby extending runtime by shutting the roomba off when the coldest spot has been reached.
For extra credit, make it awarm bot , place a gold fish bowl on top and let it take the fish to the warmest part of the room ;-)
Temperature Throwies
Tape a MSP430F2012 to a coin cell battery and use the internal temperature sensor to log temperature data to its internal flash. Make a bunch of them and place them in parts of the room or house that you are interested in monitoring for temperature trends. Create a single wire interface (data) to transfer data to a collector. The collector has two probes (ground and data) that you touch against the sensor in order to transfer logged data (along with an associated sensor ID).
Plot collected data on a PC.
Mom, my little sisters are messing with my stuff!
Couple a tilt sensor (accelerometer) with an MSP (or AVR) to make a small alarm. Use a piezo buzzer and coin cell battery. Make it small enough not to be easily noticed. Put on top of (or inside of) the item you want to monitor. If someone moves the item, the piezo screams.... for a long time.
Alternatively: Remove buzzer and use a watch crystal to build a fairly accurate RTC. Silently log the time the item was jostled. Collect this info later with single wire interface.
Cold Bot
Augment a Roomba (or iRobot Create) with a temperature sensing parasite that navigates the Roomba to the coldest spot(s) in a room. If the temperature sensor was mounted on a small probe/arm, then you could pin point insulation leaks. The parasite also controls the power to the roomba thereby extending runtime by shutting the roomba off when the coldest spot has been reached.
For extra credit, make it a
Temperature Throwies
Tape a MSP430F2012 to a coin cell battery and use the internal temperature sensor to log temperature data to its internal flash. Make a bunch of them and place them in parts of the room or house that you are interested in monitoring for temperature trends. Create a single wire interface (data) to transfer data to a collector. The collector has two probes (ground and data) that you touch against the sensor in order to transfer logged data (along with an associated sensor ID).
Plot collected data on a PC.
Mom, my little sisters are messing with my stuff!
Couple a tilt sensor (accelerometer) with an MSP (or AVR) to make a small alarm. Use a piezo buzzer and coin cell battery. Make it small enough not to be easily noticed. Put on top of (or inside of) the item you want to monitor. If someone moves the item, the piezo screams.... for a long time.
Alternatively: Remove buzzer and use a watch crystal to build a fairly accurate RTC. Silently log the time the item was jostled. Collect this info later with single wire interface.
Subscribe to:
Posts (Atom)