elehack.net

Archive for November 2007

OO: the new spaghetti code?

Many moons ago, Simula was created. From it came Smalltalk, and C++, followed by Java and a host of other languages sporting this new programming paradigm: object-oriented programming. Objects are everywhere — most new/modern languages, at least in the mainstream, are based on them — and are used for everything. In Java, all the core data structures are implemented in an object-oriented fashion.

I’m not convinced that all this is a good thing. In fact, I submit that excessive use of object-oriented principles leads to a new kind of spaghetti code, rendering programs perhaps as unreadable as when implemented with unscrupulous GOTOs. OK, maybe not quite, but it can still be pretty bad.

Read more...

Eureka! A reversible debugger!

I blogged a while ago about finding OCaml, and really liking it. Well, that like has now been intensely increased.

For some time now, I have wanted a debugger that can go backwards. A company called Undo Software has one, UndoDB, that works with GDB. But they charge a decent fee for their product.

Read more...

Boycott voting machines

A while ago, I read a decent article about the problems with electronic voting machines. I encourage any of you who value your vote, and value democracy, to boycott voting machines (especially of the Diebold variety), and to insist upon voting using a paper ballot. Iowa’s fill-in-the-circle ballots are great.

The biggest problem with electronic voting machines is lack of verifiability. If there’s a bug (either naive or malicious) in the software, so that votes are counted incorrectly, how can it be tracked or challenged? How can you recount in the case of a discrepancy?

Read more...

The frailty of human experience compared with truth

In my last post, I discussed the various forms of human knowledge, and discussed how mystical or experiential knowledge can be misleading.

Today, I read a sad but poignant story reinforcing this point. Not in the mystical-experiential sense, but in the experience and interpretation thereof sense. We must always check our experiences, and what we think we know, against that which we know to be true, Scripture.

Read more...

On the Logical Knowledge of God

At times, some people will say that we are not to approach God with logic — that we are supposed to approach Him on some kind of non-reasoning spiritual level and not try to make sense of His nature. This notion is, I believe, incorrect and highly dangerous. It is my intention with this article to explain why.

There are four basic types of knowledge that we as humans obtain, corresponding to four ways of obtaining information: sensory or empirical knowledge, logical knowledge, received knowledge, and mystical or experiential knowledge. There may be (and likely are) more classes of knowledge, but for our present purposes these shall suffice.

Read more...

OCaml for teaching?

I’ve been thinking lately: What would happen if we used OCaml as a language for introductory programming at the collegiate level?

To be sure, it would need some improvement to be suitable for this. For starters, a compiler with more useful error messages (although I have heard that using camlp4 improves error message quality). Also, some good interactive environment, possibly fusing the capabilities of DrScheme and Eclipse, would be most beneficial (I have heard of the existence of a project called DrOcaml; perhaps it has some merit).

Read more...

Reflections for Sunday: Resist him, firm in your faith

1 Peter 5:6-11 (ESV):

Humble yourselves, therefore, under the mighty hand of God so that at the proper time he may exalt you, (7) casting all youranxieties on him, because he cares for you. (8) Be sober-minded; be watchful. Your adversary the devil prowls around like a roaring lion, seeking someone to devour. (9) Resist him, firm in your faith, knowing that the same kinds of suffering are being experienced by your brotherhood throughout the world. (10) And after you have suffered a little while, the God of all grace, who has called you to his eternal glory in Christ, will himself restore, confirm, strengthen and establish you. (11) To Him be the dominion forever and ever. Amen.

Read more...

Page 1 of 1