What Every Programmer Needs To Know About Encoding
Permalink
Mar 31, 2008
Programming

In many modern languages, encoding errors are the number one cause of security flaws in software.

This is going to be long because if you don't have a deep understanding about what is going on, you too will write encoding-based security flaws. Given the widespread state of ignorance about this situation, including a large number of people who don't even believe there is a problem, I do not believe I can make this much shorter.

But before I can discuss any sort of solution, what exactly is the problem? Let us start with a parable.

Read the rest...


The Money Value Function
Permalink
Dec 04, 2007
Programming

I've loosely defined the value function (link) to only compare two "things", without further specifying what "things" it can take, because some things we put in there (like CloseToFamily) are fundamentally non-numeric properties. But some people have their own specializations of this value function. One that almost nobody will admit to using, but a lot of people live by, is the Money value function. This function takes just one argument and returns a single concrete number with the unit "Dollars" (or relevant local currency).

Read the rest...


This entry is part of the BlogBook called "Programming Wisdom".


Emotional Value
Permalink
Oct 17, 2007
Programming

When I was a child, I wanted to be like Spock. For those few who do not know whom I mean, Spock was the science officer on the star ship Enterprise in the famous 1960's sci-fi television show Star Trek. His claim to fame was being half-human and half-Vulcan. Vulcans were an alien race who are so naturally violent that they felt themselves forced to renounce their emotions and turn to a life of pure logic, lest they extinguish themselves in endless war. A common misconception is that Vulcans have no emotions; they do, but they rigidly suppress them.

Spock's major character arc involved a conflict between his "human side" and his "Vulcan side", between "emotions" and "logic". During the television series, he had chosen to attempt being pure Vulcan/logical, but he met with less success than he would have liked. Something never made clear was whether this was purely a personal issue or if perhaps being only half-Vulcan made it somehow biologically more difficult to live with the Vulcan philosophies and disciplines. (Most likely even the writers themselves were conflicted over their interpretation of this.)

Spock's initial choice reflects a common view of emotions, that they are intrinsically opposed to logic, unpredictable and uncontrollable, that you are forced to choose either the cold, cruel world of logic, or the squishy, utterly irrational world of emotion and feeling, but that ne'er the twain shall meet. This is view can be seen in our most ancient literature, where the fiery passions of somebody's loins are routinely contrasted with their cold, austere logical mind.

What absolute garbage!

Read the rest...


This entry is part of the BlogBook called "Programming Wisdom".


Permalink
Oct 11, 2007
Programming

My ol' Why Not Mozilla? page recently wandered onto programming.reddit.com, though I wouldn't go clicking through for the comments.

Some specific criticisms are out of date, but the gist still seems true.

On the off chance any Mozilla people ever read this, the feedback has uniformly been positive about the piece. If any of you still harbor delusions of platform-ness, it's not going to happen. The developer community has been burned. I don't think we'll ever trust the Mozilla team to promise us a platform again.

If I could say one thing to the Mozilla/Firefox project, it would be this: You are a browser. You will never be anything else. When you're not being a browser, you're being a web-app (Thunderbird et al). Start simplifying. Drop RDF. Stop pretending XUL is anything but a browser-creation DSL. Simplify XPCOM. Do this conciously, and go over every abstraction and ask if you really use it or if it's there because somebody, somewhere might use it.

Think Agile, not BDUF-based platform. YAGNI.

But it's probably too late for that.

(To be fair, I haven't heard about this from the project for a while, but I still get the sense the heavy-duty design pervades the project, now with its reason-for-being lost in the mists of history.)


On Values
Permalink
Oct 11, 2007
Programming

When we make a judgment, we are saying that one thing has a larger value than another. We have a value function in our brains that takes two arguments and returns whether the first is less than, equal to, or greater than the other. As cruel or as crazy as it may sound, that function can take any two things and compare them; we have to make decisions like Value(CoolJob, CloseToFamily) all the time.


Read the rest (644 words)

This entry is part of the BlogBook called "Programming Wisdom".


<- Future Posts Past Posts ->

 

Site Links

 

RSS
All Posts

 

Blogroll