Skip to main content

Posts

Showing posts from March, 2011

Bush hid the facts - Secret Conspiracy

In 1998 Richard Preston, a Princeton Graduate, published his second book, the novel "The Cobra Event." A follow-up to his highly successful non-fiction book "The Hot Zone" about the Ebola virus. "The Cobra Event" starts in Iraq, where state-sponsored scientist in mobile bio-labs on huge trucks create a bio-terrorist weapon. Not the "Cobra virus" of which the book is about, but the book opens this way to scare us into what might be. The novel was so effective that it alarmed then president Clinton.

But then something terrible happened. After Clinton left office, some one read the non-fictional "Hot Zone" and the fictional "Cobra Event" back to back, but didn't realize the second was a novel. Taking it as evidence of Iraqi mobile bio-labs, a secret conspiracy was formed to invade Iraq. Weapons of Mass destruction appeared on top-secret intelligence reports based on the "evidence" from "the Cobra Event."



Scope and Rookie Mistakes (My first ruby program p.4)

Scope
Imagine a master clock-maker. He sits on a specialized wooden desk surrounded by empty bins on which he puts the parts of clocks he makes or repairs. Behind him is the eager young assistant. The assistant is great and helpful and will look for any tool the master needs, so the master can concentrate. And concentrate he will. He puts on his magnifying glasses, and starts to work. The assistant not only fetches tools but also clears up bins around the master that he is not using. The assistant knows one key thing about the master. He can only focus on one object at once. If he's working on a gear that's all he knows. If he's working on a mechanism that's all he knows.  His magnifying glasses obscure the vision around him so he won't notice something next to him if it's not in his field of view. That's kind of how Ruby works. The field of view at any time is the scope. When the master puts what's his working down and says he's done the assistant …

First success and failure with Ruby program (ruby pt.3)

So if you haven't been keeping up I'm trying to write my first Ruby program to teach myself the ruby programming language. I coded in BASIC in high school and did a little C coding in college. Since then I've put that part of my brain to sleep with a diet of fruit loops and Keebler elf cookies. The program I'm writing takes a text file and reverses the order of the characters (in Hebrew) but not the order of the lines.

So status update: I got my program running this morning. Yesterday as I was going to bed (after the smoke detector woke me up -- long story tell you later) I picked up my ruby book and had an idea.

This morning I put it together. And now the program works (sort-of, but more on that later). It searches the directory for files that need to be reversed, reverses each line in order and outputs a file! Yay! But alas like many programming victories it was Pyrrhic.

And here is the failure (which I was expecting) it mangles Hebrew. Here is the input and outputted…

The Modulo (ruby program pt.2)

I think I've finally gotten a hold of the modulo operator in Ruby. Modulo looks like this: % in programming and it shows up as one of the primary mathematical operations in Ruby.
To understand modulo I looked up the Wikipedia page first and found it no help at all save for one fact: It shows that different programming languages handle modulo differently. For some it's the divisor and for other the divorcée (or some such unintelligible mathematical term that looks like divorcée).

I asked a friend who is good at math and learned a cool new understanding of modulo only to learn that math has a whole bunch of them and none are the programming one. Great. Then I hit upon the Wikipedia page for the jargon of modulo. And suddenly it started to make sense. This really shows how learning modalities differ.  The technical mathematical terms and formulas did nothing to my understanding of the programming term modulo. The colloquial-language-based-use went a long way to clearing it up.

Ac…

A religious plea for equanimity.

I am not a very religious person. By that I mean that I don't display what is a very deep spiritual questioning and seeking I constantly do. Today I'll make an exception.

America has become a divided country, not in the Left and the Right, but the rich and the poor. Somehow the rich have escaped scrutiny by the religious right, and have used the religiosity of America to out-maneuver more centrist or reasonable politicians. Not too long ago, Arnold Schwarzenegger was booed at a Republican convention (being held in California where Schwarzenegger at the time was the sitting Republican Governor) for doing nothing other than urging Republicans to go to the center. (I'm looking for the reference for this. Let me know if you know this speech.)

So with religious zealots defending the right of the rich to be rich, I'd like to talk in religious terms today.

The world Jesus walked on was one like today divided into two groups: the rich and the poor. Jesus the son of an artisan …

"Lol" Officially enters the Lexicon

Do you lol in public? OMG that's so rude...
Joining words like SUV, ATV, WiFi, SciFi, LoFi, HiFi, and other acronyms, now we have the internet as a generator of acronyms that have entered the lexicon.
The Oxford English dictionary has added the word "lol" to its pages along with "omg" and "fyi."
But lol is special since it can be pronounced 'lol' not just in spell-o-speak 'elle-oh-elle' like the others. "Lol" is it's own word now. That's kinda cool. Just don't be a n00b with it and go saying it everywhere. Lol.

And remember no everyone speaks English natively and like bee why oh bee (Wherefore art thou bee?) can leave a biology student who is studying bees rather confused.

Oh and TGIF.

How Apple has come to dominate the PC market.

Recent article in Computer World predicts that Apple will dominate the PC market in 2011. This was a company that had but a fringe of user a just over a decade ago, and Windows seemed like an immovable Juggernaut in control of the whole industry. So what happened?

The article suggest the tablet dominance of the iPad for it's dominance of the market, but I disagree. I don't think that's what's going on here, that's just the symptom.

I think the reason for this boils down to one thing: users, users users!

In a rather popular internet video the CEO of Microsoft, Steve Ballmer, goes around yelling what windows was all about: "developers, developers, developers." This focus had served the company well. After all Microsoft's early success lay in its business contracts. Few people outside hobbyists had personal computers. Computers were business tools used for spreadsheets, word processing and data processing outside the hands of most users. The world where …

Linux has arrived

When I first saw Linux in a dorm at MIT in 1995, I knew it was important. I wanted desperately to have an extra computer to put it on and learn it. Like most students I used my University's Unix main-frame for email to which I connected remotely from various computer cluster or labs across campus. Unix was completely different from windows or Mac OS, command line driven and was where the internet was. Back in those PC days the internet ran almost exclusively on Unix, if you wanted email, you had to use it.

Linux was an Operating System that allowed you to run a Unix shell clone on your personal computer instead of a huge mainframe or through a terminal. It was both great because it was completely configurable and free, but also a nightmare. You had to know a lot to really use it, and essentially needed an extra computer for it.

Around that time the internet moved away from Unix and into the web, and browsers. Netscape and Internet Explorer became the prime ways of interacting with…

My First Ruby Program (pt. 1 in a series)

I've decided to chart my progress on picking up Ruby as a programming language.

The first program I was going to go for is a program that reverses text.When I worked with graphics, I found that many times Arabic and Hebrew texts ended up being reversed. Because while they are written from right-to-left, these languages are displayed in special ways by Word Processing programs. They allow you to enter the text as it'd would be written, but save left-to-right, so that when you copy the text to a program that can't display the text in reverse order, they end up backwards.

This is such a common problem that most modern graphic programs (like GIMP) now allow you to enter text in both left-to-right as well as right-to-left order. But not all and not old ones. So what I want is to make a program that will take a text file and reverse the order of each line without reversing the order of the lines. Structurally this is quite simple you take each character put it in a stack and then …

Teaching Programming to Children (pt. 3)

Learning modalities

One of the most important things I've learned about teaching is the importance of modalities. Modalities describe the way one learns. I define modalities loosely here, so that when I taught English in Japan, one modality was grammar-learning-learning, another was conversation-driven-learning, interactive, solitary, repetitive, or generative. The trick was to be aware of one's own bias and to teach to as many modalities as possible (not necessarily in the same lesson but throughout the class).

I for one am a very visual person. I aced geometry and had headaches with algebra. I can't memorize a math formula with ease but can at a glance figure out angles on parallelograms. I enjoy photography and can't keep a musical beat.

Which explains why programming languages with highly equation-driven syntax look like gobbledygook to me, and why when I serenade people I do it John Cussack style -- with a boom-box.

This is the coolest thing about Ruby, my opinion…

Teaching Programming to Children (pt2)

The open source movement and the creative commons revolutions have brought a lot of power to regular people by sharing the underlying code and logic of programs and other knowledge. To take advantage of this freely available knowledge and to truly partake the power of open source, one must be able to code.

Thus began my search for good resources for learning to code, and for good resources to teaching coding or programming to children. This search led me to Ruby, a programming language particularly suited for teaching children code.

But why is Ruby so great? After all learning coding is like learning a new language, a time consuming and challenging proposition, and Ruby is not as famous or as popular as other languages such as Java. The answers lies in what you should teach to children.

Teach something fun to learn.

The first step in making learning fun is not balloons or clowns but a good learning curve. If the student feels his mastery of the subject increasing, it becomes more and …

Teaching Programming to Children (pt.1)

In this 21st century more than learning how to operate Buck Roger's jet-pack of yore, programmingwill be an indispensable tool for children. I've been researching the easiest language to learn, mostly for my own benefit, but throughout I've kept an eye on what would be the best way to teach children programming.

I learned basic programming (with BASIC actually) in high school but was completely unprepared for a transition to college level programming and stopped there. So a few years back when I ran into a need for a very simple program, I found myself baffled at the few options to learn programming on the market for kids. It seemed that children were still being showed the equivalent of the LOGO turtle drawing vectors on a computer as if that was in some way preparation toward programming.

I scouted around and it seemed the only group thinking about how to teach programming to children at the time was the OLPC group which code almost everything in Python, allowing the chi…

A dislocated bone and why health care is so expensive.

A few years ago I was involved in a car accident. Not my fault, I got rear ended and my car totaled.  For over a year I suffered from severe back pain. My orthopedic surgeon and back specialist looked at the X-rays, the ordered MRIs. The back pain was getting worse and at times it was excruciating. All I got was a prescription to Hydro-codone, the generic of the Vicodin.

Last year I decided to take advantage of the time between jobs to concentrate on getting healthy again. Throughout the pain, I had kept working because I couldn't afford to leave work and the pain was intermittent, so some days, it was not too terrible. I only used the (sixty pill!) bottle of Vicodin I got for emergencies, or plane trips, were sitting in a chair in pain was just too much. But since Vicodin is so powerful (it puts me in a daze) I could not use it for work, so I managed work in pain, sitting for long hours in front of a monitor doing work.

The pain had not only reduced the quality of life, which mos…

Mac OSX has a built-in Japanese Dictionary!

I had no idea till I read this blog. Just pull up the built-in Dictionary and go to the preferences and select it. Amazing!

Teaching in this century

With persistent attacks on teachers being bandied around because of the situation in Wisconsin, I thought it would be good to comment on this. While I agree that the teachers unions have brought about part of this because of two very important and very stupid conditions they don't like changed: teacher pay based on seniority instead of performance and the constant harping of smaller class sizes; to blame the unions is both misguided and ridiculous. The only thing that unions are responsible for is making things harder to improve, but they are not responsible for how they got this way.In my opinion the number one reason that teaching is under-valued is due to the success of feminism. It used to be that if you were a highly-gifted woman like let's say Danica McKellar, one of the best jobs available for you would be math teachers. Because being a TV star/math-book writer was not easily within reach. Now, this is an extreme example and they've been women scientist for a long t…

Health Insurance, R.I.P.

My doctor just quit private practice. I asked her why and she said that with the downturn in the economy she lost 30% of her patients so she was shutting down.I asked her how much it would be for a doctor's visit if she went cash only. She said $50.00 which is the same amount my chiropractor charges for an adjustment for cash only. This seems rather reasonable considering I pay $25 deductible with my insurance.But in reality $50.00 can be a better deal for the doctor, since she gets it cash up front and doesn't need to wait to get paid or worry about billing codes or have staff to handle that. We discussed how health insurance was now more like catastrophic insurance, very expensive one too. It wasn't health insurance, it was hospitalization/accident insurance. And Mike Huckabee compares it to house insurance (see previous blog).I can't believe that there are people who don't see the need to reform health care and the importance of 'Obamacare.'