I need advice on my road to my goal (Home automation).

I have what I believe is called 2nd order ignorance in the area of programming - I have just enough knowledge (which is to say, very little) to realize just how much I have yet to learn.

So: my goal is to get into some home automation stuff using a Beaglebone as my platform - it has tons of GPIO for sensors, relays, etc. Ultimately, I have a whole bunch of ideas and a mild case of aspergers, so I will eventually cram the entire board with ridiculous stuff like temperature sensors in each room with servo-activated airflow limiters or else extra fans in the ductwork leading up to the room - the birth of cheap robotics is a playground for idiots like me. But I’m starting small.

However, my programming knowledge is limited to writing Hello World programs on the display C64 on the shelf at Kmart when I was a kid (I remember the day I discovered the awesome power of the semicolon in BASIC - it was like the scene in The Wizard of Oz where it switches from black and white to colour), and a tiny bit of C programming from playing with an arduino a little bit recently.

My concern is: I want my software to be structured in a way is logical, but more importantly, that fits into (and even more importantly, takes advantage of) existing schemas within the programming community.

Basically, I want to do this right. For instance, right now I’ve got one temp/humidity sensor on my desk, and I want to use my beagleboard to monitor that sensor once per minute, and save the data in a format that I can call up and examine on a graph.

Now, I know that I could spend the next week figuring out how to accomplish that one set of tasks simply by learning Javascript, and doing it in my own (totally proprietary and atrociously written) way.

On the other hand, I’m pretty sure that I could instead take advantage of some kind of open source database server and query language that runs on the Beagleboard, which probably makes it supremely easy for me to integrate the database functionality that I want without writing a single line of code beyond some kind of “include” or “require” statement (I’m a total noob) at the start of my program.

I also imagine that there are libraries out there which will make the monitoring of the sensors as efficient (system resource wise) as it is possible for them to be - some sort of daemon object, I suppose, if I understand the concept of objects correctly. System resources are what is at a premium in this scenario, as I understand it.

So basically, I’m starting small, and I need to learn, and what is most important to me is that I do not waste my time learning anything which I will later need to unlearn.

So, stipulating that it is my expressed goal to become a good programmer, and that I am very poor and cannot afford any formal training but am good at self-study, what is the quickest route to the knowledge I need to make my project happen? Is there a definitive book on Javascript (which I gather is the language of the BB) which includes a good treatise on program structure and scalability?

I don’t want to end up with the processor grinding itself to death because I have 100 separate system processes doing tasks which could properly be handled by two or three, or even one. I want the data saved in a way that is flexible to use and recall, so I can tweak the system. I will eventually want to program a decent interface, though for now I’ll probably just write script files of some sort with automatic email updates to configure things, just to keep my plate as un-full as possible in terms of what I need to learn. This also, as I understand it, should enable me to use the Beaglebone headless on my desk, where it currently sits. I’m more comfortable with graphical stuff, but I can work with it.

So there you are - I am completely ignorant, but I think I know exactly what I want to do. Stipulating my basic competence and motivation, can someone recommend my best bet to get the knowledge I need as quickly as possible?

In my blue sky ideal world, someone will have already properly written something open source that I will be able, with maybe a week or so of study, to just tweak up to do what I want, because I would actually learn far better if I had something working to examine and mess with, rather than starting from scratch. I catch on pretty quick, usually, and traditional courses tend to move slowly.

Anyways, any advice appreciated. Mainly I want to get this up and running as quickly as possible, because I have no patience about this kind of thing. But I also want to approach it logically, so I actually do get there quickly.

I’m trying to keep this short since you have a long road with many many options. Hopefully there are some ideas below that will give you some resources, and research would be advised.

Fundamentally it seems to me that you’re faced with a typical “build it” or “buy it” decision. Both have merits and only you can determine the appropriate path. Either way, it would probably be helpful to research system/software design, there’s a ton of material out there on everything from full V-model to SCRUM (note that design patterns may be also useful).

You’ll learn a lot by looking at small to medium size projects (I’d initially stay smaller than 100 files)…especially ones with numerous contributors. Is it easy to get up to speed and contribute? Can you grok the architecture? etc. There are good/bad examples and lessons from each…I usually find documentation lacking, and thus requires a lot more digging than should be required. It’s also annoying when something should work out of the box, but doesn’t (however you’ll learn something in sorting out why it’s broken…and maybe be able to contribute to fixing it if the docs are good enough).

Language-wise, I don’t think that there’s a single language being used on Beagle’s. Node.js (bonescript) is easy to pickup, but since the boards can run full Linux installs, you can use pretty much anything. I don’t think I’d limit myself to a particular language as each have merits. Concepts learned in one language/framework usually apply to others, so you won’t have to ‘unlearn’ anything.

You don’t mention revision control…but start with something. Git & Mercurial are more flexible than others, and have lots of resources. While you can go without, revision control will help more than you can imagine.

FYI becoming a better programmer means many things to different people, and different goals warrant different approaches. However, “throw away” code pretty much never is…write even your most useless tool as if it’ll be leveraged for something.

Good luck, and if you can find a mentor nearby, it’d make things much easier (I heard of one company in NY which stopped accepting College grads and instead hired out of High School so they could educate/train internally…given some of what I’ve seen, not a bad idea),

-Dale

I would look into using Python as your programming language.
It is very easy to learn and it is very lightweight, It also comes pre-installed on most Linux distributions.
The only thing to remember is KISS (Keep It Simple Stupid)
You can right is a few lines what it takes 100+ in C.
My friend and I have dabbled in home automation and it really is fun once you get into it.

Keep working at it, and let us know how you do!