Doing programming stuff

I’ve been remiss in updating due to being busy on the Coursera site. I’m currently taking the Programming Languages course from Dan Grossman of the University of Washington. It has a strong focus on functional programming, a paradigm that is completely new to me. It’s pretty amazing to learn about these powerful programming idioms that don’t yet exist in mainstream languages.

Meanwhile I am also serving as a Community TA for the current run of Princeton’s Algorithms 1 course. Apparently I got the invitation due to good grades and being active in the forums during the first run of the course. It basically means playing the role of moderator on the official forums and helping students with explanations and basic problem solving when appropriate. It’s sometimes disheartening to note how many students don’t understand basic instructions, for example, like zipping two files is not the same as putting the two files in a folder and zipping that folder. But it’s also great to see students work on the same problems that I spent time on last year, sometimes with results that surprise me.

For those curious, we get moderator powers and can view some personal details of students. We also gain access to a TA-only forum in which instructors and TAs from all of the courses on the platform can interact. We also regularly interact with the course instructor by e-mail. But we have no special behind-the-scenes access to the nuts-and-bolts of the system. So fixing stuff like broken autograders, server outages and the like are done only by Coursera engineers.

Finally if you’re not yet into the MOOC scene, here’s a recent post on the official Coursera blog announcing a huge expansion plan. Those in Asia may be interested in knowing some of the new universities that have signed up include the National Taiwan University and the National University of Singapore. Courses in more languages than just English should be available soon, including some in Chinese. In fact I should be taking a couple of courses on C++ later this year in French simply because they are the only C++ courses on the platform currently available and it is kind of embarrassing not to know the standard language most widely in use in industry.

Recent Interesting Science Articles (January 2013)

The first month of 2013 has been particularly fruitful so we have a mixed bag of various science related articles. Here goes:

  • We’ll start with the most important piece of news that made the rounds this month, though more often in editorial than science circles. This Mother Jones article, one of many on the topic, talks about a new explanation of the perplexing rise in America’s crime rate in the 1960s to 1970s and its equally perplexing fall in the 1990s. The answer apparently lies in the use of lead in ordinary petrol. Childhood exposure to lead when it was a common component of petrol in the 1940s and 1950s caused brain damage that subsequently led to increased crime when these children grew up twenty years later. The subsequent shift to unleaded petrol resulted in a new generation who were never exposed, hence the fall in crime rates.
  • Similarly the next article isn’t so much news from scientists as a recent topic of discussion among economists. In the face of much talk about whether or not innovation has slowed down compared to the past, the blog Sociological Speculation proposes one obvious low-hanging fruit that could dramatically improve human productivity: a way to reduce or entirely eliminate the human need to sleep. The article is more about the effects of such a revolution rather than any specific technology but it does mention Modafinil. A quick check on Malaysia’s own Lowyet.net forums reveals that even Malaysians are asking about its availability, meaning that there is genuine interest in using technological means to wrest more hours out each day.
  • Next a couple of lighter articles on psychology. First is an article from the BPS Research Digest about how people who are more easily digusted really do have a heightened ability to spot dirt, even if the said dirt is nothing but simulated grey shades on a white background.
  • Then this article from the New York Times covers a cognitive bias that upon introspection seems quite odd, called the end of history illusion. People readily look back upon their past selves and admit how different they were from how they are now. Yet when asked how they expect their future selves to be, they seem to think that it will be more or less like what they are currently. In other words, it seems as if people lock-in their present states and project that into the future, regardless how old they currently are. Yet the evidence is that people never stop changing and your future self is likely to be as different from what you are currently as you are now different from your past self.
  • We end this post with a couple of links to just plain cool stuff. This piece of news talks about a military laser recently tested by a German company. It was capable of slicing through 15 mm steel from a kilometer away and accurate enough to shoot down drones that were falling at 50 meters per second from two kilometers away. And remember for every bit of this type of news that makes it out to the general public, you can be sure that there are plenty more that are kept under wraps.
  • Finally this article from NBC covers what is billed as the largest structure in the universe. It is a structure composed of 73 quasars with supermassive black holes at its centre and is 4 billion light years across at its widest point. Our own Milky Way galaxy is only about 100,000 light years wide.

The Books of the South

9780765320667

The Books of the South is an omnibus collection of the next three novels of the Black Company series, consisting of Shadow Games, Dreams of Steel and The Silver Spike. The former two novels cover the adventures of what remains of the Black Company, now led by Croaker, as they venture southwards in search of the mercenary company’s origins. The latter novel covers the splinter rebel band led by the White Rose and various free agents as well as the remains of the empire under new leadership as all factions squabble in the fallout of the huge battle against the Dominator.

Of the three books, The Silver Spike is perhaps the most satisfying as it at least brings the story of several key characters to a definitive close whereas the other two end on a “to be continued” note. Following the devastation of the epic Battle of the Barrowland depicted in The White Rose, the White Rose herself, Silent and a small group of survivors become embroiled in a conflict around the silver spike used to trap the essence of the Dominator. A band of rogues realize that the spike is immensely valuable and concoct a plan to steal it. Meanwhile, the remnants of the Lady’s Empire tries to restore order.

Continue reading The Books of the South

The Left Hand of Darkness

TheLeftHandOfDarkness1stEd

I’m still slowly working on reading the great classics of science-fiction that every fan of the genre should read at least once. I’ve been a fan of Ursula K. Le Guin’s Earthsea series ever since high school but I’ve read precious few of her more substantial Hainish Cycle novels. The Left Hand of Darknes, originally published in 1969, is perhaps the most well-known of these and was the big book that made Le Guin a great SF writer so it’s well past time that I got around to reading it.

I have read The Dispossessed, published in 1974 but judging from the events in the books apparently set thousands of years before The Left Hand of Darkness. There are obvious stylistic and thematic parallels between the two books. In each of the two books, two different societies that are rivals to each other are described. The reader takes the role of tourist to compare and remark upon the differences and similarities between the two rival societies. In The Dispossessed, the contrast is between the capitalist Urras and the anarcho-communist Anarres, obvious allusions to the United States and the Soviet Union.

Continue reading The Left Hand of Darkness

Recent Interesting Science Articles (December 2012)

Just four articles for the last month of December 2012 and one of them isn’t a science article at all but is a retrospective on the year with a perspective that I hope more people would share.

  • The first one is on a subject that Hiew actually forwarded to me earlier in the month. It’s about how it may be possible to know whether or not the universe that we currently exist in is actually a simulation run on some unimaginably powerful computer. The idea is that if our universe is simulated using an evenly-spaced three-dimensional lattice then the structure of that lattice itself imposes fundamental limits on the energy levels that any particles within the system can possess. And according to the team behind the paper, our universe does indeed have this kind of cut off in the spectrum of high energy particles. Personally I’m leery about this approach because it makes unfounded assumptions about the structure of the simulation. For example, instead of a fixed, regularly-spaced lattice, one could easily imagine a flexible system which could be as dense or as sparse as required to track the particles that are present locally. In any case, for a look at a fictional scenario of this, check out the novella True Names by Benjamin Rosenbaum and Cory Doctorow.
  • The next link is not an article but rather a letter written in response to an earlier article. The original thesis made two complementary claims: 1) that humanity as a species is becoming less intelligent over time due to the  accumulation of mutations that have deleterious effects on intelligence and 2) that if this is so the question of why we managed to evolve intelligence at all in the first place is because modern society shelter humans from the full effects of natural selection. Hunter-gatherer societies it is claimed have greater use for intelligence while in our time even relatively stupid people may thrive and live long enough to procreate. This letter argues against these conclusions stating that mutations occur in individuals and not the entire population as a whole while intelligence is correlated with the number of surviving children in modern societies.
  • Then we have this article from Smithsonian.com about why humans blink so frequently. As the article states, some blinking is obviously necessary to lubricate the eyeballs, but we seem to blink more often than necessary for these basic functions. It turns out that another reason for blinking is to temporarily shut out the world to give ourselves a moment for introspective thinking. In effect, our minds shift to an altered mental state more conducive to thought at the moment when we blink.
  • Finally our non-science article is this optimistic retrospective of 2012 from The Spectator. One of my personal pet peeves is people being unreasonably pessimistic about the present and like to view the past through rose-tinted glasses. But as this article reminds us 2012 has really been the best year ever for humanity as a whole. Poverty has never been lower. On a global scale, inequality is down too. Far fewer people die from violence or disease. And despite doomsayers’ repeated proclamations of peak oil, we live in an age of energy abundance not scarcity. So here’s looking forward to 2013 being an even better year!

End of Introduction to Interactive Programming in Python class

Updated on 28th December 2014 to fix errors caused by a change in the CodeSkulptor library.

The latest Coursera class I’ve been taking is Introduction to Interactive Programming in Python, a long and unwieldy title. It was conducted by professors Joe Warren, Scott Rixner, John Greiner and Stephen Wong of Rice University and ended yesterday so, as usual, I thought I’d write a few words about it.

To tell the truth, I was misled by the title of the course. I thought it really was an introduction to writing interactive programs. Since all of the programs we worked on in the Algorithms class were non-interactive, I thought this would be a good new experience. It turns out that this course should really be labelled something like Introduction to Programming via Interactive Games in Python, which is even more of a mouthful but more aptly describes the content of the course.

Continue reading End of Introduction to Interactive Programming in Python class

The Gripping Hand

Larry Niven and Jerry Pournelle_1993_The Gripping Hand

The Gripping Hand is the sequel to The Mote in God’s Eye. In some markets, it is also sold as The Moat around Murcheson’s Eye, which is a mouthful for a title but perhaps makes more sense. It was released in 1993, a full eighteen years after the first book was published. (George R.R. Martin fans might want to take note.) That’s almost as long as the time that has passed in-universe between the events of the two books.

The sequel centers around two characters from the first book. Kevin Renner who was navigator on board the INSS MacArthur during the mission to Mote Prime and Horace Bury, the trading magnate who initially saw the Moties as a tremendous money-making opportunity but later became terrified of them. The two are now agents of Navy Intelligence, with the responsibility of ferreting out rebel threats to the Empire while the Imperial Navy concentrates its resources on the Motie blockade.

Continue reading The Gripping Hand

The unexamined life is a life not worth living