2010-03-31

Science Non-Experiments in Grade School

Neuroskeptic breaks down for us here just how "practical" lab experiments in school really isn't all that practical at all. It reminds me of physics experiments I did in high school, timing cars and balls rolling down inclines, graphing the data, fiddling around to make the data look like what we knew it should be, generally learning experimental techniques that was never useful, etc.

In particular, I remember this one time when I was filling out the lab report with "observations" that I knew would've been observed had I done the experiment on the lab bench. My science teacher came by asking what I was doing, and I explained how I knew the physics behind the experiment already so I was filling in what I knew would happen based on sound physical laws I knew. He wanted me to do the experiment anyway to see what would happen, which is of course what I knew would happen.

The point is, given practical lab experiments in grade school is really not at all practical, as Neuroskeptic explains, and if the student already understands the physics or scientific principals the experiment is designed to keep students entertained long enough to learn, then what's the point of wasting time doing the experiment?

2010-03-30

My learning experience with the bare basics of Clojure

I've been too busy to really dig into Clojure programming, but I thought it'd be a good exercise as a mental note of what the last thing I was learning is by writing down a bit of my experience in the learning process...

As I begin to learn Clojure programming, I wanted to get some data to play with, to get a sense of what different functions do in Clojure, so I started with this:

(def x (for [x (range 5)] (rand)))
(def y (for [x (range 5)] (rand)))


This way I have two lists of random numbers, each having 5 numbers.  I wanted to match each element in x with its corresponding element in y (so that, eg, I could later add them together element wise as though they were vectors in math; or multiply them together later, then summed, as though I was doing a convolution, etc.)

So here's my first try:

2010-03-19

Clojure Incanter Startup Basics

Assuming your incanter folder resides in ~/bin, we'll start up the Swank server that runs the Clojure code, start up emacs, and execute some code. Here's how.

In your terminal, do the following three:
cd ~/bin/incanter
bin/swank
emacs


Now in emacs, do the following two to play with the ants demo:
C-x C-f path/to/ants.clj
M-x slime-connect


Accept default Host: 127.0.0.1 with a return-key press; same for port. Now the REPL is running within emacs. Go back to the buffer with the ants.clj file open and page down to the very bottom.

To compile the file, do C-c C-k.

To interactively execute code, go to the end of the line of code you want to execute from ants.clj, say the line (send-off animator animation) then do C-c C-e

Not hard at all!

(Edit 2010-04-09: Weird! C-c C-e to execute the last sexp didn't work for a while here. Had to kill the file buffer and reopen the file. Now it works! Odd.

Oh I see, using Clojure Mode, a quick M-x clojure-enable-slime-on-existing-buffers solved the problem. Although the keybindings changed somewhat. C-x C-e to get the above behaviour, while C-c C-e lets you type in a quick one-line to execute.)

2010-03-18

Tests always benefit the test-giver, not the test-taker (even self-assessments)

It occurs to me that tests always benefit the test-giver, and not the test-taker. By tests, I mean pretty much every single assessment method used by teachers everywhere, be they tests, self-assessments, diagnostics, etc.

I could be spending my time right now, for example, on learning a new programming language, writing up a program to test out a game theory model I have in mind, reading research papers, working on my thesis proposal, etc.

Instead, I'm working on final exam test preparation. That means I'm working out some preparation problems that have no relevance to my research, that are not even really educational since I have no solutions to compare and learn from, that are contrived so to direct the test-taker to arrive at a particular solution that is easy for the test-marker to verify.

And why do I have to write an exam for this course? So the course instructor, the test-giver, can write a "letter" on my course transcript indicating my "grade". Think about that again, the test is given for me to write, so that the test-giver can do something (in particular, to scribble down a character on a piece of paper).

Tests benefit the test-giver.

Nothing inherently wrong with that, of course, as the instructor has to somehow write a "fair" letter for my course grade. We just have to recognize the goal, the purpose, of what we do as educators. We as educators demand students to write tests really only to benefit ourselves.

Without tests, students won't know how well they're doing though!!

2010-03-16

Protecting Ubuntu with DenyHosts

You can find out more on using DenyHosts to increase your Linux computer's security here: Got Security? You're in Denial. But for Ubuntu Linux users, just open Synaptic and look for DenyHosts to install it! It looks like an install and forget application, although if you like you can modify the configurations at /etc/denyhosts.conf.

2010-03-11

CBC discriminates against as many as there are deaf people?

[Edit 2010-11-23: I should note that as of today, it seems to me CBC has corrected their past failure to deliver media to people using Linux powered computers. That's great news.]

Is it corporate policy of the Canadian Broadcasting Corporation (CBC) to find it acceptable to discriminate against a minority group as numerous as there are deaf people in Canada?

At least it felt that way to me today as I looked at the data. There are about 32,976,000 people in Canada in 2007. The Canadian Association of the Deaf estimates "there are approximately 310,000 profoundly deaf and deafened Canadians" in May of 2007. So about 1% of Canadians are profoundly deaf or deafened.

According to several people [1, 2, 3] who talked with representatives from the CBC, including Parker Bishop, the Communication Assistant of CBC Audience Relations, the CBC believes about 1% or less use Linux systems and that is the reason why CBC feels it is okay to openly discriminate against Linux users and purposely prevents them from accessing the news and media paid for by Canadian taxpayers!

2010-03-10

The parts to a domain name in web addresses: Quick intro

Having never registered a domain name before, I had set out to learn how and what's involved. Sure I used domain names a lot in that I go to many web pages by typing in an address, but I have never looked fully into the mechanics behind domain names.

Here I'll explain what I learned, mainly the generalities behind what domain names are and how they work. I was dismayed by some recent news on how confusing domain names can be, so it may be helpful for you to understand how they work too.

Let's start!

Each web page you see on the world wide web is located somewhere, and so has an address. This web address is called its URL or URI (the specifics are rather technical). You should see this blog post's URL in your web browser above as:

http://blog.carsoncheng.ca/2010/03/parts-to-domain-name-in-web-addresses.html

There are a number of parts to this address that are separated by the slashes (ie, the forward slashes).

The http part tells the computer to use the Hypertext Transfer Protocol when accessing the page you want. There are other protocols too, but normally most everything uses http. If you are on a log-in page somewhere though, especially when you do online banking, the protocol should be https (note the "s"), as in the Hypertext Transfer Protocol Secure.

The :// ("colon slash slash") then tells where the rest of the address begins.

Domain Name Registrars for Canadians

This will be kind of a mind-dump of a post, more like logging my strategies for my own future reference.

I want my own domain name for my blog here, which is hosted by Google's Blogger service.  I've never tried registering for a domain name before, so here's my attempt at finding a decent registrar.

Looking for reviews
I found some reviews of various domain registrars:
That then turned up these two Registrars I found interesting:

I also found out that .ca domain names are all managed by the CIRA:
http://ro.cira.ca

Checking up BBB
And I also started checking out BBB for Registrars:
Go Daddy has "nice" ads but I've heard lots of horror stories about them too, but of course with any big company there'll be those amongst the many more good stories that no one hears.  BBB says they're good but there's lots of complaints regardless.  Tough to say what value BBB records really have though.

I tried another tactic, i.e. to find bad things about Netfirms.  For instance, I dig up WordPress hosting woes.  So it might suck for WordPress hosting due to server issues.  Nothing about domain name registration though that I could see.

This is my first real attempt at finding a domain registrar, and I'm realizing that I'm just trying to optimize along too many dimensions, so I asked a friend for a recommendation.

Asking for a friendly recommendation
My friend reminds me that if I need web hosting service in addition to needing DNS service, then Dotster or Network Solutions can be worth the extra money.  Otherwise, Domainsatcost, Dotster, or Go Daddy, would all work.
All I need is DNS service, not web hosting.  Specifically for Blogger custom domain services, I need to be able to set custom CNAMES and A NAMES records for my domain name.  (See http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=55373)

I also went back to looking up BBB on these companies that were suggested to me:

So the word of mouth suggestion from someone I'd tend to place more confidence on is for one company that has a F score on BBB, and one with seemingly quite expensive plans that has an A score on BBB.  Both are actually quite expensive compared to, say Go Daddy though.

Decisions, decisions...

What do big sites do?
I try another tactic.  I checked out some major sites (several major universities, news papers, etc.) thru whois (http://whois.cira.ca/) to see where they register through.  Many come up using Webnames.ca.  I check it out and it's expensive!  So if you don't mind the cost, I guess it must be pretty good if many major institutions use it (or maybe they cater to major clients with other services?).

Decisions

After looking at all the available data, I'm going with GoDaddy.  It's inexpensive enough, and offers enough features, and apparently is good at resolving complaints.

2010-03-09

Math is a very Zen activity

I was reading some computer science papers recently that used quaternion numbers. 

What are quaternions? I don't know, but that's okay. I just accept them for what they are. Let them be and flow with them. I keep reading.

But how can you understand what you're reading if you don't know what these quaternion things are? That's a good question. I guess I do by first understanding what quaternions are.

You just said you don't know what they are. That's true.

So how can you know what they are? By sitting quietly, reading the papers, observing how these quaternions behave in their natural habitat.

How they behave? Sure. They certainly interact with the authors of this paper.  The authors speak of them, use them, toss them around so to speak. They behave a certain way, and interact with others and other things.  They interact with other numbers, for example.  I observe them.  And by watching over them, I learn what they are.

And then you can understand the rest of the paper.  Yes. Now I have to read a paper on the biology of the brain. It talks about these Koniocellular, contralateral LGN, and lots of other stuff.

You have no idea what they are, do you?  Nope. Sounds like fun.

2010-03-08

How do I explain that drugs are bad but I turned out okay?

"How do I explain that drugs are bad but I turned out okay?" Clearly it's not just the results that justifies whether an act is good or not. Maybe the taking of drugs doesn't even in itself wholly determine whether it's good or not.

Imagine a farmer chooses to spend little time planting crops or tending his field one year, then has a famine the next (when he decides again to tend to his field), then everything turns out okay afterwards.  So was it okay to not tend to his crops?  Sure he had a famine, put his family at risk, etc, but everything turned out okay in the end!

It may be more effective to de-emphasize the results, and emphasize on what is lost, what is put at risk, what kind of person do the actions create, etc, in the experience and process.

Independence, maturity, freedom to choose, etc, are maybe important values. It's easy to see that there are many things kids can do that would be more effective in helping them attain those values. Kids can do drugs, and there are also many other things they could do that would be more effective in helping them become independent, mature adults with the freedom to choose what they want to do, etc. They might not be able to discern which are more effective, which is why there are adults, parents, teachers, and others, around to help them and set them straight.  But even this line of thinking is results oriented.

2010-03-04

Blocking Time Wasting Websites (on Ubuntu Linux)

I recently found myself wasting more and more time going to interesting, somewhat informative, and more or less completely useless websites. I'm talking about Slashdot, Digg, and others. Especially Hacker News, which sometimes has some great links to programming related articles and blog posts. It's just like this XKCD comic here.

The solution came in blocking the habit, but blocking the specific websites that are such time wasters most hours.

How to do this? A quick Google Search gives us the complicated answer.

In short, there's generally two ways of blocking specific websites. Through the hosts file, and through the firewall.

Looking at How To Block Unwanted Website In Ubuntu Linux and this question from Ubuntu Forums reveals how to block through the hosts file. They gave answers that works in the terminal, but if you are on Ubuntu, you can also key in alt-f2 to bring up the Run Application menu, then key in gksudo gedit /etc/hosts. It'll ask for your password, then a text configuration file will open up. Add in, each on its own line, 0.0.0.0     www.digg.com (whichever site you want, and that's a tab between the 0 and w). I think after you're done, this requires a restart though.

But that requires touching a text configuration file, and I don't like that. If there's a GUI method, I usually prefer that out of laziness. So here's a GUI method.

You can also block sites via the firewall controlled by iptables as described in this Linux Questions. Unfortunately, it still requires going to the terminal and typing in some commands. If you have Firestarter installed, however, you won't have to! (You can install Firestarter via the Ubuntu Software Center, under the Applications menu.)

This is a great GUI controller for the firewall. You can start and stop it, look at some status info. You can also click on the Policy tab, select Outbound traffic policy in the Editing menu under the tab, make Permissive by default selected, then right-click on the white area beneath Deny connections to host. That will bring up a menu to select Add Rule, which brings up a window to add in the hosts you want blocked, eg, reddit.com.

And that's it. A pretty GUI method.