Posted: May 28th, 2007 | Author: admin | Filed under: Computer Science, Programming Languages | No Comments »
So I’ve been a fan of prototype based programming since I first came across SELF a few years ago. I was talking to duncan over the weekend about various OO/PL type things and we realized that neither of us had seen factorial, the standard functional programming demo, implemented in a prototype langauge. This being the case, I set out to rectify it.
Here is an implementation in Javascript (tested in firefox)
Number.prototype.factorial = function ()
{
if (this == 1)
return 1;
return this * (new Number (this -1)).factorial ();
};
//Test
myNum = new Number (10);
alert (\"Factorial of \" +myNum +\": \" +myNum.factorial ());
So you can see it’s not that bad, but its not as good as it could be.
Now the following code DOESN’T WORK. This is how I wish I could program it.
NaturalNumber.prototype.factorial = function () {return this * (this -1).factorial()};
0.factorial = function () { return 1; }
Now this code leverages the power of a prototype based language. This code doesn’t work since JavaScripts doens’t treat literal #’s (1, 42, 1337, etc) as instances of the Number object, and doesn’t define a collection of natural #’s.
It defines a factorial function for every Natural # (integers >= 0). We have one special case 0, 0! = 1.
Posted: April 7th, 2007 | Author: admin | Filed under: Computer Science, Semantic Web | 1 Comment »
So, I was recently accepted into the Masters program @ the MIT Engineering Systems Division. It seems like a really cool program and I’ll be starting classes in the fall, my thesis ASAP 
Posted: January 18th, 2007 | Author: admin | Filed under: Computer Science, General, Semantic Web | No Comments »
So, yesterday I was at mashup camp 3 — I learned a lot of cool things and met a lot of interesting people. There was some good discussion on some semantic web issues. After the conference, i wandered down to the mit museum and I got to see a talk about the one laptop per child (olpc) — it turned on, the keyboard worked. I believe it
it looks really cool.
Posted: April 5th, 2006 | Author: admin | Filed under: Computer Science, Cool Stuff | No Comments »
The $100 Laptop (HDLT as Alan Kay is known to call it), or the One Laptop Per Child (OLPC) Project, is a project that I’ve recently become interested in. I’ve been discussing it with my friend Duncan a lot, and I decided it was time for me to chime in on this extremely ambitious project.
At first I thought the project was misguided – I’ll quickly outline my reasoning. Note: I am not claiming to be an expert on Africa, economics, nation building, or anything else for that matter.
The top issues I see facing Africa are:
- Africa needs modern farming practices and equipment.
- Africa needs medicine and medical training.
-
Corrupt governments and leaders need to be removed.
- Critical infrastructure needs to be built.
-
After that is taken care of, spending vast sums of money to get laptops in the hands of children would be justified.
I originally framed the project in terms of Africa, and that was the flaw in my thinking. There are a lot of countries that aren’t facing all of these problems, and their populations are larger: Africa only has about 800,000,000 people, but India and China alone have: 2,300,000,000. The countries that are currently in discussion with OLPC are: China, India, Brazil, Argentina, Egypt, Nigeria, and Thailand.
These countries have functioning economies and sufficient infrastructure. In India and China if we could raise the level of general education of the poor a few grades higher it could dramatically improve their society.
I also had another misconception – I thought that the idea was just to get laptops out there for the children to use the internet and already existing software. I then re-imagined it as the first step in creating an extremely important education device. This device once activated by the user would determine their education level and perhaps even interests. If the user didn’t know how to use the computer it could teach them the basics, if the user didn’t know how to read it could teach them how to read, and so and so forth – the software by itself could adapt to the user and teach them what they need to know. If I like to read mysteries, it could adapt my lessons so that it selects mysteries involving the level of math right above my current level to entice me to continue my studies.
This is what I’m interested in: writing software that adapts and anticipates the user’s needs, and the ability to help raise the standard of living around the world. By focusing the development on countries that are already functioning fairly well the chance of success is much higher since they have fewer major problems that need to be addressed.
Once the project is successful it should be easy to then deploy it to other countries that have more serious problems.
In Neal Stephenson’s The Diamond Age, or A Young Lady’s Illustrated Primer there exists a device that performs the behavior I described above. It’s interesting that I’m getting excited about this project at the end of my undergraduate career, since in my admission essays I wrote that creating a device like this is one of my primary reasons for pursuing a degree in Computer Science.
One last point I’d like to make is that this could revolutionize the way that children are taught in America. It empowers the student take control of their education, and could continue educate adults long after they graduate.
If you made it through that mess of ideas then I must congratulate you. I felt that I needed to get my ideas out there, and refine them as time permits. If you have any questions or comments please post a comment or send me an email.
Did I mention this project is ambitious?