Archive for the ‘Uncategorized’ Category

h1

Oh! They love me! They really love me!

June 14, 2012

One of my first reviews for Making Embedded System came on the O’Reilly site and it was a not a good review. I mean, it was a bad review (and it wasn’t particularly well written).

It was somewhat heartbreaking to have put all that work into a book and then have someone bash it. And he hadn’t really read it (one of the things he said was terrible was, funny enough, something I was saying was terrible if only he’d done more than flip through it).

Ouch. But I try (try really, really hard sometimes) to learn from mistakes and to be as mature as possible about such things. I totally agree with this author’s posting: “The biggest enemy of our careers is not bad reviews, but obscurity.” As with my view on ebook pirating, I may not like bad reviews but I do want my book to make ripples. I am not yet to Scalzi’s delighting in one star reviews but I’d almost (almost, maybe) have bad reviews than nothing. Of course, Scalzi’s examples are much funnier than mine. And he’s got a thicker skin from years of doing this.

But as we were gone on our cross country trip, two more reviews were added to my book on Amazon, heaping my collection of 5-star reviews there to a lucky 7.  (Which isn’t to say that 8 or 9 or 53 would be unlucky, feel free to add more, I won’t mind.)

Now, I will admit that I know Ken Brown, one of the Amazon reviewers. And when he said, “Well, is there anything else I could do?” after tech reviewing it (and doing an awesome job with the review), I immediately asked if he could pretty please write a review.

Still, seven people like my book enough to take the time to write a review in Amazon. I’m sometimes surprised by what they liked most about it. I mean, check this out from James Langbridge, a guy I’ve never met (though we exchanged emails after he entered some errata):

This book is full of technical detail, but more importantly, it is full of wisdom. I had fun reading this, and to the question would I recommend this book to a friend? I already have, to junior members of my team.

I like “I had fun reading this”… such a wonderful thing to say about a technical book. And this:

I would say that the most valuable contribution this book makes is in explaining the design integration of hardware components and basic EE-technologies to a software developer who has not yet experienced the design of a sophisticated embedded system. – Ira Laefsky

And then on Goodreads, someone said exactly what I could have wished for:

I wish this book was around when I started working.

Because that is the book I wrote: the one I wish I had when I started.

 

 

 

h1

Universities of the future

June 11, 2012

Going to college is expensive, really hideously expensive. And the price keeps rising. Student mortgage themselves in hopes of future income. And if they choose a major that doesn’t pay off, well, too bad, you still have to pay the loans

I don’t think this trend can continue. I’m excited (amazed, thrilled) by the online universities. Some of these are traditional universities offering their course material for free, often without a grade. Standford’s Machine Learning course by Professor Ng was awesome, I think every week I learned something that I applied to my job’s gnarly data analysis problem. And last fall, Stanford opened its Artificial Intelligence class for free to all comers. More than a hundred thousand people took them up on it. A hundred thousand people taking an upper level CS course. Wow!

The professor (Sebastian Thrun) touched all those minds. Amazing. And apparently addictive as he went off to co-found a startup to teach the masses. Udacity offers courses free to anyone and they range from intro to CS (no programming required) to building a robotic car. And the now-almost-legendary AI course is there. They even give you a grade (well, certificate with different levels of distinction).

Udacity isn’t alone. ITunes U has just a slew of videos and course materials on every topic under the sun. The photography ones are worth watching just for the pictures. And  Courseara has partnered with Stanford, Princeton, Penn and U of Michigan to offer an amazing selection.

See, every time someone makes a better course on topic X, you could watch that one instead. You could get the best education money can buy (and never have a boring, droning professor whose lecture leaves the material all in a muddle in your head). And it would be free.

Hey, I’m flabbergasted by that. I remember the day I paid off my student loans, what huge weight it was off my shoulders. Why would you pay to go to college when you could just suck this all down for free? For free!!!!!!!!!

How can it stay free? Well, I heard Udacity’s strategy yesterday (but I don’t know if it was said in confidence so you can search online to find it out yourself). It was interesting. I don’t know if it was viable but close enough that, yes, they can probably stay free to the student. Which is awesome (amazing, thrilling, exciting).

Grading become a problem but everyone is working on that. At Udacity, they build courses that have exams and homework that can be automatically graded (with some teaching assistant involvement). For many of the sciences, points can be based on the right answer (though it leaves style and partial credit to be solved).

Let’s say they fix that; natural language processing is getting better. Computers can read essays already, they don’t have too far to go to grade them. And multiple choice is evil but easy to grade.

Once you have grades, the next step is accreditation. Colleges already have it so they know how to do it. Some places may not go down that road, instead offering non-accredited transcripts. As long as they maintain an excellent reputation, it will work. For awhile. And then they’ll get accredited though maybe not by the body that does it now.

So, sweeping aside the problems that University of Phoenix has already surmounted, let’s think about where we go from here. Online colleges don’t have to turn anyone away to keep class sizes small. They can scale. Infinitely.

But what about labs? Physically doing the work in science? And then there is the issue that one of the main points to college is meeting everyone else in your college. The people I met in college are still my best friends, the people I trust to “get me” when no one else does. And I’ve heard the main point of business school is making contacts to help you work in business.

(Note: wild prognostication ahead.)

I think that college will go mostly online as the only affordable choice. And then students will realize they need each other, beyond the forums, in person. So they’ll co-locate. But not to an expensive university town, instead to an apartment in some cheap place where they can find part time jobs. And then, when four people are living nearby, a few more will come because is makes sense. And then a few more, until the whole building is mostly college students, studying together, helping each other, sharing physical space and physical materials.

Their degree will be from Accredited Online University  with a note that the student was from Apartment Building 12. Some of the apartments will be frat houses. Some will have chem labs in the basement. (Oh, save us from those that are both.) And some people won’t have that, they won’t afford the apartment or won’t get in (will you have to send your SAT scores so you can live with these people?). That’s ok, though it may be like going to a lower tier college so they’ll need to get good marks. Or maybe the students will take online courses from a dormitory at a traditional college as they augment that degree with courses that aren’t taught locally (or at the time needed or are taught poorly).

One of the tenets of society right now is that information wants to be free. If you are older than 35, can you imagine having Wikipedia in high school? I’m constantly stunned by the depth and breadth of what I can find online. Adding courses, designed to help people learn, well, now we are getting somewhere awesome. It isn’t just information, it is education.

Another tenet is that of self organization. Flash mobs are amusing; SOPA legislation squashing was more amazing. They used to call it grassroots. Now they call it the internet.

So, I think the universities of the future will be partially self organized. Where the senior, getting ready for a job, tells his sophomore neighbor that if she takes Penn’s archaeology course before Stanford’s paleobiology, it will make more sense. Since her transcript is going to be a set of courses and grades, well, her “degree” comes from when she’s ready to get a job or pass a certification exam. He does this because he wants his apartment building to stay ranked and maybe because he gets some “mentoring score”.

I don’t have it all planned out. But if I start buying apartment buildings, well, you’ll know why.

 

h1

Writing is hard

June 7, 2012

If you ever think “I want to be a writer” or “I want to write a book” then I have the giant secret that everyone is keeping from you that will enable you do to just that.

Write.

Um, yeah. That is it. I hear other authors talk about “butt in chair” time. Sometimes what you write is not awesome. If you wanted to play a piano sonata in front of your friends and family, do you think you’d expect to walk up there and do it? Or do you think you’d have to practice and practice? Writing is the same. Get over it. You put your time in and eventually (eventually!) you get something out of it.

Unfortunately, I find that I get tired of writing. Oh, I know, you think I program computers and that is totally different. Sometimes yes, sometimes no. I spend a lot of time thinking about how to phrase something when I’m programming, how to make the comments instructive and useful while still being short, and how to build from detail to big picture.

For me, the skills are similar to writing. Which is why after working all day, I’m not blogging. During the trip, it was extremely relaxing to write. Now, it is kind of a chore. I don’t plan to give up my blog but I’ve got exciting new things happening and contract job that has a crazy deadline. Between them (and the update to Plants vs Zombies), I’m not getting any writing done here on the blog.

It isn’t a lack of ideas, just a lack of oomph.

To distract you, let me show you what C has been up to: http://www.flickr.com/photos/stoneymonster

Those great photos of the venus transit (and the awesome eclipse one!) also represent hours and hours of work. And it isn’t only the work of setting the telescope up and pushing the button every few minutes to get a new shot while sitting in the sun. Each picture needs to be evaluated and some of them need adjustments to highlight the cool stuff.

With butt in chair, he’s doing photography. As well as programming. Which also has an oddly large crossover with photography.

 

 

 

h1

Words are power

May 31, 2012

In school, I studied systems engineering. I went to an odd college where we learned how to put a system together mathematically, modeling just about everything as a resistor-inductor-capacitor circuit or a spring-mass-dashpot. Because it all boiled down to math that looked the same. This holistic view gave me fresh eyes and I love the hammer-like feel to it.

So when I got out of college, I started to look for nails. Oddly, I actual found some. That led to embedded systems where that same math becomes surprisingly important. I was really good at this! My niche education was going to be useful!

I was still a fairly junior engineer so I explained my plan and process for solution to a senior engineer. i described the math parts, showing a little of my work but glossing over areas that needed to be done. At the end of my show and tell, the senior engineer took all the fun parts away from me and told my manager I didn’t know what I was doing.

See, he called a part of the system the “plant” and I never used those words. And when he used them, I didn’t recognize what he meant. I was a couple years away from my systems courses so part of the problem was my forgetfulness but, at my school, the professors I had called that part the “transfer function”, “system”, or the “process”. The literature tends to use these somewhat interchangeably (not precisely interchangeable, a book usually chooses a term and sticks with it).

It took a long time and a lot of math (and working code) to show I did know what I was doing. Even after that, I didn’t like this senior engineer, he felt so petty. Now I kind of understand what happened- I waved my hands and he probably though the project was too large and important to leave in such untried hands.

This is why I get stressed out when people are nervous about not knowing words. I mean, there is jargon and certainly that plays a role in making people feel like outsiders (and idiots). But sometimes, the words don’t seem like jargon, they are just words and everyone else knows what they mean, I’m just too dumb to understand.

Ahem. No. Words have meaning. Learn the words; understand the meaning. Then you have their power.

Words have incredible power but the most amazing thing about the world today is how easy it is to learn what the words mean. So let’s look at the word algorithm. I’m not going to look it up on Wikipedia for you, feel free. I’m not even going to Google it so I could be wrong in some tiny piece of semantics that are to follow. Watch me not care, I understand the meaning of this word: an algorithm is the word a man uses to mean a recipe.

Oh, I should not read the feminist blogs before writing my own, especially since the connotation is not true. On the other hand, an algorithm tends to be technical, usually related to computers or math based things; a recipe is something one follows when cooking dinner But at the heart, they share a lot: a list of requirements, a list of steps in phrased for the skilled reader, an ideal outcome.

Say I wanted to make cookies. My lackadaisical cookie making method requires a ratio of somewhere between 1:2:3 (butter: sugar: flour) and 2:3:4. Add other things like eggs, salt, baking soda or powder (depending mostly on type of sugar but also other flavoring agents), flavoring agents (vanilla, chocolate chips, peanut butter, orange rind, etc.) to taste. Mix then bake for 5-15 minutes depending on cookie size at 300 to 365F (convection) depending on cookie size and desired texture.

That is neither a good algorithm nor a good recipe. It is a useful direction but not at all a destination. (If you ever want a cookie recipe from me, get it as soon as you can because I won’t remember a recipe the next day.) I’d call that description of how to make cookies a pattern. It is a very loose way to go about it, leading to generally good results. As design pattern: cookie it works pretty darn well (for me).

Of course, if you have no idea what you are doing, it will be a disaster, it assumes a lot of knowledge from the user, knowledge that usually comes from experience. (Ahem, even that mix step hides a ton of potential information though if you take it on the surface, just mixing the dough however you feel so moved, the results won’t be bad).

So as a recipe, a cookie recipe might be:

Simple vanilla cookies recipe

1/4c butter (softened)
1/4c white sugar
1/4c brown sugar
1 egg
3 tsp vanilla
3/4c flour
1/2 tsp salt
2 tsp baking powder

Cream butter and sugar. Beat in egg. Add vanilla. Add flour, baking powder and salt. Put on cookie sheet with silpat (or greased cookie sheet), each cookie should be about 1 tablespoon worth of dough, rolled and then flattened. Bake at 325F for 8-10 minutes.

Makes approximately 2 dozen. Suggest serving with small bowl of chocolate buttercream frosting for DIY inverse oreos.

I think there is a enough details there that just about anyone can follow that. I suppose I used the standard “cream butter and sugar” jargon and that might be meaningless to some. And I didn’t say to preheat the oven. I kind figured you’d know how to do that. That you maybe had made cookies at some point in your life. What an odd assumption on my part.

I could create an algorithm to create simple vanilla cookies. Let’s see. Since I write software, this is a lot like writing a program to tell a robot how to make cookies.

Simple vanilla cookies algorithm

 

1. Measure 1/4c butter, heat to soften.
2. Mix in 1/4c brown sugar and 1/4c white sugar until mixture is creamy and has no granular pieces of sugar of remaining.
3. Beat in one egg until fully mixed.
4. Add 3 tsp vanilla, beat until fully mixed.
5. Add 3/4c flour to top of bowl (do not mix in).
6. Add 1/2tsp salt and 2 tsp baking powder to flour.
7. Gently stir dry ingredients together then mix with wet ingredients.
8. Scoop a cookie, about 1 tablespoon at a time.
9. Roll dough into a ball, place on greased cookie sheet leaving about >1 dough ball worth of distance on all sides.
10. Flatten dough ball into a disk about 1/4in high.
11. Repeat 8-10 until all dough is used.
12. Place cookie sheet in preheated convection oven at 235F.
13. Wait 9 minutes, remove.
14. Serve with chocolate buttercream.

Ok, that is a little detailed in spots but you can see how it contains all the same information as in the recipe but in a different format. It isn’t a better format or a worse one, just different. I could have shown it as a flowchart and it would still have been an algorithm. In fact, anything you can represent as a flowchart is probably an algorithm.

Usually, though, algorithms lead to things other than cookies. In pure math, an algorithm might lead to an single answer. Say you want to give someone change… they buy 10 cents of lemonade and hand you a $5 bill. For one algorithm, you (or the cash register) calculates the difference between their purchase and then you given them the difference. It seems so simple, of course that is how anyone would do it. Well, no, the other school of thought for creating change (another algorithm that can be used) is to count up from their 10 cents, handing them pennies until they get to a number divisible by 5 (none), nickels until they to a number divisible by 10 or 25 (none), dimes until they get to a number divisible by 25 (four), quarters until they get to dollars (two), then the number of dollars (four). The whole time counting it out: lemonade was ten cents, twenty, thirty, forty, fifty, seventy five cents, one dollar, two, three, four, five.

Both of these change-creating algorithms are valid. They can both be proven to work. Ok, that is one area where algorithms are different from recipes: proofs. I mean, I can experimentally determine that my cookie algorithm works but doing it. But can I prove it will always make cookies? I don’t know how to start to show that given the conditions described, it will always work.

But in the math and computer world, an algorithm is usually developed so that it works under certain  conditions and can be considered optimal in some way. How it is optimal, that is an interesting question (fastest? least possibility for error? least memory used?). When people say they study algorithms, they not only learn all the different ways to sort through a list of data, they also learn how to determine how one way is better than another and under which circumstances.

Well, as usual, I’ve totally forgotten the point of this post. And I find myself strangely hungry for cookies. I hope there was a point. If not, well, I hope you have cookies too.

 

h1

My mom only gave me 4 stars on Amazon

May 29, 2012

In November of 2005, I wrote a novel.

It was fairly terrible but really, really fun to write (and for me to read). Someone with a resume suspiciously like mine ends up free floating in space and has to save the world from terrorists with the help of her drummer-physicist-engineer husband. (Yeah, that would be C.)

The novel came about via NaNoWriMo (National Novel Writing Month) and my officemate (and friend). Phil came in one day and said, “I really want to write a novel for NaNoWriMo.” I replied (and I swear I was just trying to get some work done, I may even have had headphones on) “I will if you will.” Phil will not live down the hassling until he finishes his novel. Which I’m sure will be this November.

After two months planning and one month writing, I spent a year editing and refining and then got it self-published through Lulu.com, mostly as a Christmas present to my mom but also to continue the hassling of Phil. A year or two later, Lulu worked out a deal with Amazon. One morning I got to work and there was my book on Amazon. It was very, very cool.

Well, once you get a book (anything) on Amazon, the next thing to do is to get some reviews. Phil, exceedingly graciously given the aforementioned hassling, wrote a 5-star review for me. My mom also agreed to do a review. She gave the novel 4 stars.

Let me say it more clearly: my mom only gave my book 4 stars on Amazon.

Oh, so amusing and cringe-worthy. Both at the same time. There is nothing like your parents keeping you humble.

To be fair, my mom had no idea that a 4-star review was akin to saying “just ok”. Amazon indicates it means “I like it” vs. the 5-star “I love it”.  In her review, my mom says that the work is pretty good for a first time author and she looks forward to more. It is a positive review with a few light criticisms from someone who reads a lot (a lot!) of science fiction and fantasy. She had high standards and my novel didn’t quite merit the same rating she’d give to Bradley, McCaffrey, Henderson, Norton, or Zelazny.

My mom was very supportive in everything I did. I never had any doubt she loved me. But anytime I talk growing up, I definitely pulled out the 4-star review as an indication of how difficult my childhood was. It almost always gets me an incredulous laugh.

Around the time my mom passed away, the reviews from both her and Phil disappeared (Lulu and Amazon weren’t linked anymore and the reviews didn’t apply to the Kindle version for some reason). I wish I’d copied them down. But I’ll never forget them.