Monday, January 28, 2008

Source Code Browsing

A co-worker recommended GNU Global for browsing source code a few days ago. It was pretty easy to set up. Install it and then go to the root of your source tree and type gtags. Then you can run global on the command line and try it out. Try things like:

global funcName
global -x funcName
global -rx funcName
global -sx varName

That should give you the idea that it can find a function definition and all its references, or a variable name and all its references pretty quickly. Very handy.

There is an emacs interface as well. Load gtags.el (comes with global), open a file, and do M-x gtags-mode. c-h m will show you the commands gtags-mode provides for doing the same thing we just did on the command line.

I'm not sure if I'm going to switch to using global/gtags. I already use a combination of cscope and Exuberant ctags, both of which have their strengths, and both of which have emacs interfaces, naturally. They all seem to have troubles parsing out tags/symbols in my C++ code in various places, but for the most part they work well. My quick testing showed that GNU Globals did a little worse than what I'm already using using. You can see some issues it has here.

Overall, if you aren't already using a tool like this to help you browse your code (maybe you're using good ol' find and grep), I highly recommend picking up one (or more) of these tools. They are a lifesaver.

Monday, January 14, 2008

Windows XP on the XO!

Yes, that's Windoze XP on my XO laptop. Click on the image for a larger version. The resolution doesn't quite match the XO screen's native resolution. Minor detail.

OK, so it's not running directly on the XO hardware. It's running on a KVM virtual machine.

And actually, that's not running on the XO hardware either. It's running on my Core 2 Duo machine that runs Ubuntu. What's running on the XO is an ssh client, an X server, and some good wifi networking. The XO makes a sweet little thin client.

So, um, nothing really to see here. Sorry if I got anyone's hopes up. Or fears.

Wednesday, January 9, 2008

One Man's Trash is Another Man's Treasure

I just wanted to say a big thank you to Antonio for bamboozling me into buying an XO laptop. I had forgotten that it was his blog entry that got me going with the idea of buying one. I'm so glad I did. I love it. My kids love it. And we've barely scratched the surface of what we can do with it. My 7-year old confidently explained to my 3-year old, "It doesn't have any games," yet he can't leave it alone. He's choosing to play with the XO instead of mindless games or watching TV. He hasn't even found the Record or Measure activities yet! That is success.

So um, Antonio, if you really don't have use for your, "plastic paperweight," I'd love to take it off your hands. With only one around the house, we haven't been able to try out the Chat activity or other sharing features yet.

Saturday, January 5, 2008

It Arrived!

My XO laptop has arrived!

And we are impressed.

It's one awesome machine. I love the rugged feel. I had no qualms about letting my 3-year old, or even my 1-year old play with it. Every portable electronic device should feel this tough and usable. The 1-year old had a blast with it. I was really wishing I had a video camera on him. He sat on the couch with it between his legs and pushed every button with both his fingers and toes. He flipped the rabbit-ear antenna/latches up and down, rotated the screen, closed it, opened it, cycled through display orientations, and when I got it back from him it typed only in foreign language characters (I had to reboot it to undo that, though I'm sure there's some other way). He was really mad when I separated him from it. Hilarious.

For my usage, the keyboard is too small to touch type, and to get on the internet through my wrt54g I had to change to channel 11 (that took some serious googling to find) but otherwise I have no complaints. It can't replace my serious work machines, but for browsing the web, checking email, messing around with the camera (as you see above), and playing Tam Tam, it rocks. I'll keep playing with it and pushing it to its limits and make some more reports, but for now I'm a pretty happy camper.

Thursday, January 3, 2008

Blogging in the Shadows

A while back I set out to find some embedded systems/firmware bloggers. I had hoped to find something as thought provoking, clever, and interesting as Joel on Software, or Stevey's Drunken blog rants. I didn't find anything that great at the time, but with a nod in my direction (thanks!!), Benoit has posted a whole slew of interesting blog entries in the past few weeks.

I haven't had time to read them all, let alone respond, but I wanted to say something. I had no idea that Canada had a ring ceremony for engineers. How cool is that? The awesome Kipling poem made me all misty eyed. I loved the song about the bubble too. I have a cousin from the Bay area who has started two companies and, though not really anything like what's described in this song, ever since his first company I've talked to him and read about that whole world with interest. Hilarious song.

I also totally agree that for some reason, even though I love the low-level stuff that I work on, there just isn't that much exciting to talk or read about in the field for some reason. So what would I like to read about? I'll have to think about it.

Off the top of my head, I think a lot of the buzz in the non-embedded world comes from the fact that you can easily try a lot of the cool stuff out at home for free. Is there any substance behind all this talk about Ubuntu Linux? Download it and try it out. Interested in this Ruby on Rails thing? Download it and run through the tutorial. Python? Java? Haskell? Ocaml? All free, with extensive tutorials included. The latest web-based gizmo from Google, or Yahoo!, it's free too. Anyone can try it and write their 2 cents on the matter. The conversation thrives.

In the embedded world, not so much. A commenter gave some examples of exciting things in the embedded world, but they kind of sit there as meaningless marketing speak or vaporware if I can't test drive them myself. How about it Greenhills? Your website still looks like it was designed in the '90s. Have you ever heard of a free download? Maybe even just a screencast?

One other difficulty in getting a good conversation about embedded development going is that we all work on very different systems. Where everyone else in the world develops for Intel processors running either Windows or Linux, we embedded people are all working on custom-made, one-off systems, writing very customized software. Not many general purpose application frameworks that excite a large crowd of energetic geek bloggers are going to fall out of what we do. Will they?