Showing posts with label science. Show all posts
Showing posts with label science. Show all posts

Monday, March 9, 2009

Post 187

Well, number 187 is not prime - I'll say it out right.  The square root is > 14, so 13 is the largest prime to test.  Turns out 11*17 = 187, so there you go.  But it is our little primality test to kick things off.  On a brighter and more personal note, I made it to the gym today, after many abortive attempts.  Hopefully I will make it tomorrow and things will be good.  Not going is easy, but after going I always feel so much better and I wonder why I don't go.  It is very weird.  Must be kind of like smoking - many people say they know that smoking isn't good for them, but they keep doing it.  When they finally quite for a few weeks, they see how much better they feel and wonder why they didn't quit before.  The reason is a little more obvious for smoking - there is a physical addiction component.  I'd think that the gym-attendance would be more along the physical addiction track but laziness is obviously the stronger factor.  It's like we say at my house - greed and laziness are the mothers of invention.

Always confused me that "necessity is the mother of invention" because it is so obviously wrong.  When people are in real need, they grab whatever they find at hand and adapt it to the need, kind of like using a hammer to drive screws through the plywood to seal your house before the hurricane.  Innovation requires persistence, like when a better version of an existing tool is created.  If you needed that better tool to operate, you couldn't have started!  Instead, you use what you have and the irritation at the fact whatever you're doing could be easier grows until you create the thing that will make your life easier - the invention!  Think of Thomas Edison, who worked his lab mercilessly and used the media to crush his opponents - that's greed.  He wouldn't go to that trouble just because he could make new things - those new things were sold for money that he could use!

Well, there's the mid-post rant - here's the political one.  President Obama announced that the US government will now sponsor embryonic stem-cell research.  I think it is a good thing to pursue research.  What Bush specified was very limiting, not allowing for much variance at all.  I heard some comments from people opposed to this research, all talking about the dangerous moral and ethical grounds.  I think such research needs ethical guidelines, but some of the reasoning didn't sit well with me.  For example, the claim that such research could result in more abortions.  Linking the embryonic stem cell research with abortion is attempt to create moral outrage where simple guidelines would suffice.  I wonder if the same people that are opposed to abortion are opposed to all other fertility protocols, because they have more abortions and ethics to worry about in that area.  Anyway, I think that this current path is better than what came before.  

Sunday, January 14, 2007

Practice

A colleague at work posted a link to this post by Steven Yegge. It was describing that the best programmers would practice the art and skill of programming. In it he drew a parallel to classical musicians, who have been developing methods of practicing music over hundreds of years. The two disciplines appear related, when approaching programming or musicianship as a craft.

I'll probably write again about this post (it's almost two years old now - must be some kind of blog-record, referring to a two-year-old-post), but I really wanted to say something about one of the comments there. The commenter indicated that he was learning the piano and that he found debate over the usefulness of Hanon or Czerny. These are books that work on technique and I am familiar with the Hanon especially. Hanon describes a series of exercises around each of the scales. From the comment:

seems that practicing techniques are still fairly hotly debated even now; some people maintain that non-musical drills such as those by Hanon and Czerny are worthless; it's better to use, say, Bach Two Part Inventions or Chopin Etudes, because technique should never be divorced from music.
So what is my problem with this? It really gets me when people state that "technique should never be divorced from X" where X is sport, music, programming, etc. There are several parallels to this that I personally have encountered, but I'll stick with the piano references first.

The most galling thing about substituting Bach for Hanon is that it makes Bach into non-music. So many people that Bach is very regimented - that there is one true way and that way proceeds in an orderly fashion. They leave no room for interpretation - they are renouncing that it is music! You might be able to tell that I really liked the Bach that I learned to play, but that is only part of it. Music can be interpreted and presented differently - the musician is part of the process. Bach is very technically demanding, so playing Bach will pay dividends in other music. This is precisely the thing that is being suggested - playing something technically demanding will improve your overall ability. This contradicts the reason to dismiss Hanon. Hanon's exercises are technically demanding, but aren't music (can you say: "Wax on, wax off Daniel-san"?). If they are technically demanding, then using them will improve the part of your playing that doesn't involve the musical interpretation part. Also lets you treat Bach like a piece of music that needs to be worked on and interpreted instead of exercised.

This same argument is made of sports. Let's pick, oh I don't know hockey. The argument illustrated by the commenter translated to hockey would be: don't practice skating, just play scrimmages. Clearly anyone who has tried to play hockey or learn to skate will see the folly in that (or foley). Skating is not something that is done alone while playing hockey - in fact it falls into the background while playing as there are other demands on your attention. However practicing skating in isolation can provide a tremendous boost. The reports I have heard from the power-skating classes that some of my work peers have attended show that they are doing things not related to hockey. Things like jumping over 6 pylons or jumping over pylons while doing a 360 in the air. I rarely find pylons at hockey games, so I'm assuming that the practice of skating and the practice of a game are different.

In sports, this is known as "the fundamentals". There have been times, in hockey, were the fundamentals were not stressed and I believe the professional game suffered. The lack of attention at the lowest levels was a problem. Much the same as the guitar analogies in the referenced material - you can learn to play the guitar without the scales and chords, but there isn't room to grow.

Bringing this back to the original post, I believe that the post is advocating the exercise of technical aspects in isolation. Solving problems, critical thinking, abstract thought, improvisation, pattern recognition - these are all things that help develop programming or software development skills. And I heartily agree.

Sunday, January 7, 2007

Chevrolet Volt

Sweet! Looks like GM is going to make a car that I'd buy. Maybe I'll be able to afford it when it's available - 2012. That's 5 years and in line with how much longer I'd like to make my current cars last.

The car is a full electric car with a combustion engine that acts as a generator. It can be plugged into 110 V outlets for 6-6.5 hours charging, at which point the batteries have a range of about 64 km. When the charge gets low, the generator kicks in. Full tank plus full charge give a range of about 1000 km - just like my diesel New Beetle. Check here for the specs.

Guess that "Who Killed the Electric Car?" documentary kicked GM in the butt during the last Detroit Auto Show. They said they began work on the Volt after the 2006 show. Looks like they may actually be able to make something useful in a short period again. We'll have to see what else is going on in 5 years, but so far this is the most intriguing item I've seen in a long time. Other than some nice direct-from-Europe diesels that are on the way.

References

Friday, December 29, 2006

Rear-window science

New Scientist has another neat blurb on some new research. It's the oh-so-popular "carbon nanotube" again. This time, some group has created a paint with carbon nanotubes in it and then pass a current through the "paint". Since the tubes conduct electricity, this produces heat. Not only that, it produces an even heat through the entire paint. And a thin layer of the paint is transparent. This paint would replace the heating wires in car windows while providing a cool-looking tint. A thicker layer (which would be opaque) could be used as in-floor (or in-wall, in ceiling in-whatever) heating. The great thing about it is that there are no wires to break so the conductivity is spread very evenly.

Think of the home reno with that: "new tile floor... uh, did you want in-floor heating? Okay, just gotta fetch the other bucket. " Or "Gonna seal that driveway for you... did you want it to be self-cleaning for ice and snow? Okay, let me get the other bucket." This is something that I can't recall very often from science-fiction - technology that is paint-on. I've seen an announcement of a paint-on solar panel, but it isn't commercialized yet. Same idea as this though - some new kind of nano-scale material that can be applied like a paint.

vCJD help at last!

vCJD (variantCreutzfeld-Jacob Disease) is a pretty horrible disease. It is a series of tiny protein fragments that can pass through your entire body, gathering in your brain and basically destroying it. This is also known as "mad cow disease".

The tiny protein fragments are called "prions". Prions aren't virii, bacteria or yeast, but a non-living form of infectious agent that is very difficult to get rid of. In the spectrum described above, yeast (a type of fungi) is "alive". It has a nucleus, organelles (like mitochondria) and a membrane. Next is bacteria, which is single celled, no organelles or nucleus, but still considered "alive". A virus is a non-living agent - it has an exterior shell and DNA inside, but it has no internal mechanisms. It cannot move or reproduce on its own, but it uses living cells to reproduce. This makes it a sort of half-alive entity. More like a machine that is activated when it contacts the appropriate cells. Prions are even less like living cells than a virus.

A virus contains genetic material, RNA or DNA, with a protein casing. The casing protects the genetic material until it can hijack a living cell and use it to reproduce. A prion lacks the genetic material - somehow it is able to change certain proteins into itself, without using other means. The exact mechanism is actually not understood.

However the GOOD NEWS is that someone has discovered a treatment for this disease! Researchers were able to develop a blood filtering process that is capable of pulling out the bad prions from the blood. This is by far the best news for any sufferer of vCJD or mad cow disease. I hope the process will proceed to commercial approval so that it will be available as a treatment.

Edit (2006-12-31): A helpful commenter pointed out that this is not a treatment for vCJD, but rather something that will make blood transfusions safer. The prions are removed from human blood by the process, which is still a tremendous step for the disease. I suspect that it would be used as part of a treatment for someone with vCJD, by filtering their own blood. So little is still known that it may make no difference.