Wednesday, October 15, 2008

1000 Albums, "Green" cycles, Linux commands you cannot live without

Sounds

NPR's All Songs Considered recently interviewed author Tom Moon, who wrote the book "1,000 Records To Hear Before You Die". He went through tons of recordings (obviously), and came up with a list of the most important to the history of music and culture in the world. These may not have significant appeal to you personally, but objectively, these albums all have something unique and important about them.

For example, the Hot 5s and Hot 7s. These were the first recordings that featured African Americans on wax in the US. Louis Armstrong was fantastic at this time in his life as well. Another example is Grease. This is something that is not important to me, but I understand why it's there.

It made me finally remember why I studied music in college. It also made me realize why I haven't liked music in four years as much as I had prior to four years ago.

Opinions

The world will always heal itself...with or without us. Earth doesn't need us to survive and continue existing. I think the strongest argument for taking care of what you have isn't what's in the Bible about being a good steward, which my mother always reminds me of. She has translated this into "be a good steward of the stuff you have." I now realize that it was written to mean everything. Not just "stuff", but everything you could possibly affect during your short life. I don't think the answer is to minimize everything in your life, but it is to be conscience of what your purchases, actions, thoughts, dreams and work actually do for other people, for the Earth, for the future, etc.

There is a Native American proverb which goes "
We don’t inherit the land. from our ancestors, we borrow it from our children". Ironically, I feel this is how we should be thinking about our lives.

For example, rather than say: "We have 50 years of oil left if we continue to use it the way we do today, stop using oil" say: "Our dependence on oil does damage to our environment, but it does things for us which are conveniences which we aren't used to living with out: heat without a fireplace, quick and rampant transportation options, overproduction of corn and soy, electronic "toys", etc. How can I affect change to use something other than oil (which would be better on the environment and could actually make entropy work in reverse...with biodynamic and sustainability practices) to continue using what I currently use and have, or how can I replace or cut these things out of my life so as not to leave my footprints on this Earth?"

So, the questions and answers are very involved. I'm still on the path to finding answers to some of the questions I have about how to replace or remove things from my life...and more questions pop out. It's a constant struggle, and I think if we're conscience of it moving forward, unlike we have been in the past, we'll have a better chance of not killing ourselves in the short term.

And, like I said, Earth will heal. Carbon will be eaten up by trees which can grow on land previously covered by ice. The oceans can eat carbon, too. Plants and mushrooms will take over and the very strong animals will survive in the meantime. Even if we eliminate ourselves and other large mammals, fish, birds, and insects...plants, water, air, bacteria, and virus' will live on.

Programming

If you're going to use linux, you need to learn a few commands. The good ones are 'grep' and 'find'. Once you figure those out, learn 'sed' and 'awk'. 'screen' is another great command that lets you have "tabbed" shells in one session.

I've been working with configure, automake, and Makefiles for the last couple weeks. I've been trying to learn each of these tools inside and out at the same time, so it's been a challenging couple weeks. I know that I'll be better prepared for development on any OS in the future because of this experience.

I won't give you any specific examples, but I will recommend that to learn these tools, find a package that has a lot of dependencies (say MythTV or Xine). Create an NFS partition in your home directory which models the directory that you would put on another chipset. You should have a cross compile toolchain. We're using CodeSourcery G++. Set up a Makefile which will help you build quicker and easier once you have all of the kinks worked out. We're using a Makefile.common file to declare variables that are used in more than one line. Examples of this are the chipset we are cross compiling to, and directories that we want to point our linker to to find cross compiled libraries.

The Makefile itself should have sections for each step. For example, if you're building libxml2, have xml2_configure, xml2_make and xml2_install sections. You can make section called xml2, which calls those out in order:
xml2: xml2_configure xml2_make xml2_install
The other way to make things easier is to use an environment variable defined in your Makefile or Makefile.common which sets the path to all configure and make scripts for various packages.

Now, when you run into a problem, use the tools described above to help debug files. Remember, configure will create files (they're listed in the output of the script) which are used to help the general Makefile build your libraries. The Makefile will compile and link all libraries, and install will create executables and move them to the proper directories.

When you're all done, you won't have anything working on the host system because it's compiled for a different chipset. So try running it on that chipset to see if the compilers worked like you wanted them to. If you build the Makefile properly, you should be able to zip this directory up and move it to another build system and remove all of the work required to cross compile MythTV or Xine.

Friday, October 10, 2008

The music of Video games, bicycling clothing, automake

Sounds

I stumbled on 380 YouTube videos which all have the title sequence: "From Bleeps to Beats/The Music of Video Games". The site which organizes these videos in a more aesthetic manner is called "Gar's VGM Site". These videos were compiled by a man named John, who is from Montreal. His handle is "garudoh".

I believe the music was extracted directly from the ROM, but it's never credited. The complete sequence of every tune from the games is represented. I've been working my way through from #1 and have to say that he's done an impressive job of including video game content as well as music.

I'd like to clarify why I think this is music. There are some incredible tricks that composers used to make the music not only listen-able but that is related to gameplay of specific games (side scrolling action games tend to be in 4/4 and have a lot of snare sounds...like Sousa?) and can be listened to over and over and over again.

I'm not a gamer, and haven't really been since Genesis was popular...so listening to a lot of these is a mixture between admiration for the composers and memories of my childhood.

Opinions

I got a pair of Cordaround's Bike to Work Pants in the mail yesterday. They are very comfortable, durable and close to being acceptable in a formal setting. They're fine for my workplace, but they wouldn't work with a button down and tie....at least I couldn't make it work.

But I'm no fashionista (fashionisto?)

It got me thinking about clothing for biking. When I sold my car for a bike last month, I thought about what I needed a bike for, and then shopped for that kind of bike. I don't want to have one bike. I love biking and have done it for many years. I want to have a utility bike first (for groceries, getting to work, etc), road bike second (for weekend trips to Marin) and a mountain bike third (for doing what I love most about biking...playing in the mud). The second two need to be top notch, so my goal was to make my first bike a fixer upper, so I could re-learn all about bike maintenance and repair. The bike I got was a 1970s Motobecane Grand Touring. It's yellow and silver. I'm going to change the wheels, rear cassette and cog (should come with wheel), bottom bracket and crank (need 175mm crank, and I might have to rethread the bottom bracket), possibly fork headset and handle bars...then brake levers and dérailleurs.

Anyway, I got to thinking about necessary accessories. There are lots of clothing that bikers tend to wear...you can see this in any bike shop. Shoes are essential, as this is part of the pedal/crank/chain system. But the pants and shirts are what concern me. Spandex is good if you're training or racing...but for fat slobs riding slowly with their girlfriends down abandon roads or wine tasting...please stop today.

There is a need for better "clothes" to wear while biking. Clothes that you could wear if you weren't biking either. They have these for camping, hiking, skiing, mountain biking, skating, and plenty of other sports (how many jerseys do you see at football stadiums...in the stands?) Why not utility biking and every day biking?

So I talked to a couple people and we concluded that the market probably hasn't had a demand for it yet. With rising gas prices, the new incentive ($20/month pre-tax from employer for riding your bike to work rather than driving) to ride your bike to work, the response in the Bay area surrounding increased commuters taking their bikes on public transportation, and many other factors are indicators that people don't want to drive anymore. They want to ride! And with that, let's make it more fashionable by providing fashion and clothing with is just as much utility as it is regular clothing. I'm waiting for this to improve.

Programming

The automake tool has been causing me headaches for the last week or so. I've been attempting to cross compile (to an ARM Cortex-A8...BeagleBoard) Pango because it's a dependency in a project I'm working on.

Learning Linux is satisfying. This is going to be more of an opinion post than anything, but diving into generating a Makefile from scratch which auto builds an entire list of dependencies in order to do this for other systems and compliers is a great thing. Tracking down bugs helps you learn the tools that are part of Linux (less, more, grep, etc), it helps you learn about log files, read through errors quicker, and figure out what all of these dependencies do. I'm learning more about how to start a project by learning how to make a project that's broken than I did programming with Windows for 4 years. In Windows, you don't have to mess with this stuff. There are some complicated things you can learn how to do in Windows...but their alternative in Linux is easy (e.g. DirectShow vs. GStreamer).

On the flip side, the "complicated" things in Linux really aren't that complicated, and are actually minimal for a reason. The alternative on Windows is obfuscated by their license. We can never know how some of these kernel level things happen in Windows because it's hidden on purpose.

Proof by induction: Linux is more user friendly, although more difficult to learn in the beginning.