Archive for the ‘Software’ Category

Once upon a time there was a genius software developer named Hans Reiser. He used to join Linux forums and lambaste other hackers as being foolish, prodigal, indolent, and was generally a bit of an egomaniacal ass.

In other words, par for the course in the world of software development.

But then he was indicted, and convicted, for the murder of his wife amid a tale of S&M, Linux development ( intimately linked ), Russian internet-ordered brides, and infidelity.

A crucial feature of the trial was, well, that the cops couldn’t find the body. Upon being found guilty, Reiser seems to have copped a plea with the judge such that he could get a lesser sentence in exchange for the victim’s family and, nota bene, his own children being able to lay the body of their daughter / mother to rest.

Here was Gawker media’s “Valleywag” summation picture:

Gawker Reiser

First of all, and not to be juvenile, but a copy-editor would have caught the phrase “fingers corpse”—oh right this is blogging, ahem, never-mind.

Secondly, the incapacitated girl in the ad in the party dress appears dead if not really whacked out on laudanum. One could foreseeably think that that was the corpse under discussion.

The whole post is pretty distasteful, I’d say.

I’m reminded of pro-feminist blogs decrying things like “new bikini’s are scandalous” or left-leaning blogs that decry “It’s insane that McCain can run for president in the 21st century given that he can’t even use a computer” only to be served up, guess what, an ad featuring said bikini’s or a clip of the blogger-hating senator as an ad.

  1. Examine the Unicode standard’s code page collection for “Latin small letter a with macron”.

  2. Nets U0100.pdf

  3. “Latin small letter a with macron” appears on chart as 0101. This is a hexidemial number which points to U+0101 as its code point. Converting 0101 to decimal gets you 257, this is the same as the HTML entity code. Thus one can enter either ā or &amp#x0101; and get the right glyph [ā|ā]

  4. Put ā character into a view via Rails that is back-ended by a PostGres database.

  5. Using script/console, write the collection of models that contain this accented character to a YAML file.

  6. “Latin small letter a with macron” is stored in a YAML dump of accented charcters as: \xC4\x81

  7. Hm, OK that’s a start. Somehow 0101 or 257 is linked to C4 81. How? I know, BTW, the database that holds that entry is in UTF-8 as psql -l shows this.

  8. C4: 196

  9. 81: 129

  10. 196+129=325 != 0101. Hm, look at documentation.

  11. Be stumped.

  12. Send mail to mailing lists for help.


In the immortal words of Sid Meier’s “Civilization”: “Time Passes…”


  1. \xC4\x81 is the UTF-8 encoding for the Unicode code point U+0101.

  2. [Q:] Which table does U+0101 fall into?

    [A:] “So the first 128 characters (US-ASCII) need one byte. The next 1920 characters need two bytes to encode. This includes Latin alphabet characters with diacritics, Greek, Cyrillic, Coptic, Armenian, Hebrew, and Arabic characters. The rest of the BMP characters use three bytes, and additional characters are encoded in four bytes.”

  3. OK this means that the code point will be of the form: “110yyyyy 10zzzzzz

  4. We will now work to fill in the “y” and “z” values:

  5. Hexidecimal “U+0101” converts to binary: “100000001

  6. There are 5 y’s and 6 z’s. So let’s split the above number to match that form: “[00]100-000001”. Note, we moved from the right. Where the leading 0’s were required to turn 100 into 00100, they were pre-pended.

  7. Integrate and produce: “110” + “00100” : “10” + “000001” => 11000100 : 10000001

  8. Take THESE numbers and convert them back to hex => c4 81

  9. String notation for this is \xc4\x81 - violá!

  10. Figuring this out letter by letter is a major pain in the keester. A good URL resource is: Fileformat.info or, handily a URI of the form:

http://www.fileformat.info/info/unicode/char/<unicode char value>/index.htm

Special Thanks to: Michael Flester

Brave new world

Thursday, December 20th, 2007

Thanks for following me across to my new site, note the new .net domain.

I’ve not written for so long owing to my fear of having to migrate more data or lose more data should the lost stevengharms.com die that I’ve completely fallen out of the habit of writing.

So far the folks at hostgator have meen a dream to work with, I opened 3 different support cases with respect to getting things set up and going and all three were addressed and dealt with between the hourse of 9 and 5. Totally, professional, friendly, and smooth.

I noticed a few links on the navigation tab are broken, i’ll be getting to those shortly, but for the moment my virtual home is safe.

Yesterday’s post looks a little incoherent with a day of rest between it and I. Based on the entreaty of Mr. Graitcer in the comments, I thought that perhaps I could try to characterize what it is to be fatigued in this way.

First, let’s just say that it’s not the expectation of the teacher or the class curriculum that you work yourself into fatigue of this type. It’s not necessary or required. Yet in both of the BNR classes I’ve taken, the students worked late into the night on their own projects, or improving the assignments.

Therefore, the motivation to work to this level of fatigue is not extrinsic, it is clearly intrinsic. This is, clearly, the more cruel mistress. In a previous post I spoke of the self-selection implicit in defining the population for BNR classes. I suggested that one of the primary contributing factors in being in the class is having the funds to pay the fee or having a job where the administrators feel that paying such a fee for such a person is a worthy investment. People who have such funds ( if the meritocracy be believed ) or faith of their financial administrators likely get to this position be not being able to simply let it go.

I have worked through weekends at work, on work stuff simply because I could not let it go. I have gone to work early, repeatedly, after a few hours of sleep because the problem stalked me. It wouldn’t let me go, it wouldn’t let me sleep. It was better to be awake, approaching understanding, than to endure fitful sleep under the Damocles sword of the unfound answer’s shadow.[1]

Many people I’ve talked to say: “Go do something else, come back to it.” My sweet girlfriend has shuffled around in the wee hours to find me tapping away and urged me to come back to bed. I hear this, but this is something that I ( and I suspect many others ) simply cannot do. If I were to come back to bed I would imagine my text editor. If I were to go do something else I would be irked that I couldn’t look up on Google possible solutions as I was doing it.

I don’t know it well enough. I don’t understand it well enough, I don’t see how the parts work. Granted this quality among the full rank of attendees, you can see how I would suggest that a startup out of any one of these classes could blow the doors off of any particular problem.[2]

So it’s under this background mentality that you’ll see BNR-class attendees whipping themselves to perform, to create, and realize until deep into the night. Simply put, this is just how we’re wired.

Attendees like to maximize effort. That’s why we’re programmers, we like the force multiplier effect of knowing a programming tool. The reason we’re at this class is because we want help learning something very difficult in the most efficient and deep manner possible. BNR classes deliver this. So much of the work done here can be seen in light of trying to optimize knowledge gained per unit time.

Most of us have attempted to learn the material back in “the real world”, but we couldn’t get the information to ‘etch’ deeply enough. Learning this material against deadlines, users, wives, taxes, other obligations was simply too slow or too confusing. If you are a “can’t let it go” person who knows that shortly he’ll have to be back in the real world where he’ll have to let it go and you won’t have access to immediate peer feedback or a guru, you work hard.

Like summer camp, we come, we know it will be hard, but we know, looking back, we’ll be amazed by how much we learned, how much we changed, and we’ll remember the conversations, the food, the hard nights. We’ll remember that we were part of a special community for a brief flicker of time.

And if, to chase to that next eureka, we have to have bleary eyes and catnaps in the conference room, so be it. Damn the torpedoes, I came to learn rails.

So we slurp down cups of rocket fuel, we dose up on small quick munchies, we talk, we think, we code, we edit, we close our eyes and doze and then turn back to it, we take more fuel[3]. At the end of a multi-hour run your sugar crash comes but you have to keep pushing. And sure, you could go back to your bedroom, but the feedback loop outside of Oz is too slow. You see, we have to be good enough to be independent when we leave because, it all likelihood, we will be.

So what’s it like, in the dark of night as we ply away? Well, to set the scene, we’re in a very large conference room with a large projection screen hanging from the front wall. The churn of the heating provides a constant white noise that is overlain with collective symphony of keyboard tapping[4] and occasional double-click.

For the most part it’s fairly quiet, except that there are ‘flexible duos’ merging and separating. These duos emerge when one party wants to discuss an idea or a problem he is describing to the other party. They conversation is usually pretty quiet, but occasionally precipitates a whiteboard session.

The lighting is dim, but not dark. The eyes of the coders in troglodyte mode is respected.

And, of course the half audible curse of ‘fuck’ or ‘damn’ as an execution fails, or even worse, does something you didn’t know about and or didn’t plan for.

The tablecloths that drape the tables are rumpled. There are big reference books from O’Reilly press and the Pragmatic Programmers stacked up, splayed open, or fallen onto the floor.

IMG_7286.JPG

With the dim lighting and the lack of a clock in the room, Vegas-style, you could easily fall through scheduled reality and forget that time is actually passing. Eventually, the time will turn late and that’s when the real fatigue sets in.

There are enough peers present such that your quorum sensing lets you know “It’s OK to stay a bit longer”. Your eyes are dried out from staring at the screen, the typing fingers are sore and tired. The myriad of files you edit get lost, your new enemies are questions like “Where did I just write that thing a second ago?”

You reach the next item on your “to do” list and you attack that problem…and keep on going. In some ways it’s actually invigorating, working on something you care about this much, something that has this much of your love in it. Few things “outside” can hold your interest like this. In some ways, you feel more alive doing this kind of work in this environment that you may have felt at your day job for the last year.

Eventually the discussions between students achieves a sort of level of conversational shorthand. We’ve all been speaking to one another in these highly specialized terms for days and days. We’re all coming from the same reference and our discussions are short, brief, and truncated.

As the evening wears down more stammers work their way into the dialog. The solutions wear down. The bowl full of ice chips melts and the bottles, coffee mugs, and cans on the desk continue to multiply as the diminishing returns on coffee and sugar is reached, crossed, and run over by a distance of several miles.

IMG_7286.JPG

But eventually you reach your goal and you shuffle back to your hotel room and unwind by watching infomericals or NOVA and then drift off to sleep.

This is the society of the hack, and you’ve done a good day’s work. Sleep is quick and hurried, because the next round of class starts bright and early at nine in the morning.

Footnotes:

  1. Incidentally, the Silicon Valley exacerbates this problem. Most people can’t let it go, and there’s not much else to do besides work anyway, thus so many good ideas and good companies coming from that area.

  2. This is what the early internet adopters must have thought would happen. Global, flexible, talented groups meeting and fluxing, producing brilliance. Regrettably, it seems that this talent needs to be pulled out of their quotidian affairs to achieve this maximal “group flow” dynamic ( see: Cocoa Dev House or Burning Man )

  3. I recall a passage in The Fountainhead where Roark falls asleep at his drafting table and breaks a pot of coffee. I recall Ender Wiggin facing yet another round in the battle room after another brilliant performance around the absurd rules. In these passages I always see the author comme createur writing his experiences into the character’s life.

  4. Not really tapping. Apple laptops don’t have a cheap, plastic, clackity sound, like the PCs, but rather have a very pleasing whisper.

Hi all,

After the lengthy tour of duty yesterday, I’m back in for another lengthy day. I think that Wednesday is really the grinder day.

First, you’ve been lectured to for the last 3 days. There are very few minds that can take 8hr. / day lectures without feeling a bit tapioca-ish on the 24th hour.

Secondly, you’re listening and then working very hard on something that you just were introduced to. You have these head bashing against a wall sessions and then, suddenly, you’re set free ( because you’re doing something that’s old hat, something you learned, say, that morning ) and then you hit the wall with all that built-up acceleration. It takes a certain mental flexibility.

Third, the sugar, the munchies, the food, etc. By this time it’s all having some funky effects on your body.

Homesickness becomes a bit of a factor. You remember how good your bed is, how nice it is to be among your things and your life.

Now, about the work. You see, you can slide on day 1. You learn the material, you review it, you’re probably OK. DON’T BE FOOLED this is your one and only chance to get ahead of the abbatoir days 2 and 3.

Then comes day 2. If you want to keep ahead you’ll be working late on day 2, maybe even thinking that you’re going to catch a break on day 3. But no, my friends, day 3 is the grinder. Day 3 says “OK, you’re determined, but how determined are you?” You’re bleary from day 2, the cokes, the mountain of water bottles, can you do another 18-hour run at things?

At day 4 you’re going to be exhausted. You’re going to reach your limit. You start to feel like your treading water capability is turning into negative progress. Unless you’ve stayed up on the exercises and mentally integrated the concept and become with the ‘way things are done in this language’, you’re going to feel a bit behind.

Fortunately day 5 is the wind-up day. There’s a sense of graduation and possibility. If you can integrate the first 3 days quickly you’re going to be in a good position to re-discover the last two days quickly. I think that may be the optimal take-away from a class like this.

I’m not sure, I’ll be a good empirical guinea pig for the next few months.

Big Nerd Ranch: RoR Camp: Day 3

Wednesday, February 14th, 2007

Goodmorning.

I had a late morning this morning … because I had a late night last night.

Last night, per BNR tradition ( and I can say this because of me experiences at the Cocoa camp ), post dinner ( and occasionally a drink or two ) many of the students returned to the classroom to review, invent, create, etc. under the tutelage of our teacher.

I basically re-ran all the exercises from Day 2 again, inventing scenarios to make sure that I truly “got it”. In training, it’s very easy to simply nod and do the exercise but, as my math teacher says, when you are working the problem alone, you will get the loneliness. You will say, “Where is my teacher? Where is the format, I’m so lonely, I cannot solve this problem.”

So, to make sure that I could work through the loneliness me and a few other students were here until about 1:30…and I wasn’t the last to leave! We Big Nerds be hard^core.

I moseyed into class about 5 minutes behind and Charles had already begun the lecture on “Data Validation”. It’s a pretty gentle way of starting the morning.

Outside, Georgia has tuned cold and windy, a lot like the Bay actually.

This morning we did a lesson data validation and man, I hit a tough bug. Rails was telling that the error was at some line in some process. With the help of another patient peer we commented out all the lines of my code and methodically worked through and found out that the error message was completely un-helpful, the error was some 6 lines earlier!

BNR classes always leave me with the feeling that working should be more like this: patient people focused on exploration and the delivery of solid products with understanding produced as a natural side-effect (oh yeah, and having an absolute guru around to ask questions to is not a bad part either). I’m pretty sure you could take any BNR class, tell them to attack some market problem, and they would be able to deliver it as a successful startup.

Consider the self-selection principle at play. People pay ( or are in positions where employers are willing to pay ) what, on paper, might seem like a rather steep fee ( in reality, it’s entirely reasonable for the type, depth, and knowledge provided ), this indicates a certain level of success obtained in the world. Further, even people of that level of success are usually rather loath to take one-fifty-second of their life and spend it doing “work” for at least 9 hours a day. Paul Graham said that the magic of a startup wasn’t that it was a small amount of people, it was a small amount of people like you. During these sessions you feel like you’re part of a larger community of people like you.

For 5 days people like you, focused on learning, learn, work and talk together. It’s kinda special. Sorta like camp, but instead of popsicle stick birdhouses you build powerful computer applications. If, in 5 days, we could do something like this, in 90 days what sort of application could we build?

Programmers: Are you good in math?

Thursday, February 1st, 2007

The Leauge sent in an email to see if I had fallen off the edge of the world. Although it appears irony has fallen upon The League, for as I type this, his web site has, in fact, fallen off the edge of the world: Blogger appears to be down.

I have not left the gravitational field of this big, blue, glob. There’s a bunch of interesting work stuff going on ( more later ), my mom was in town and I started classes at Austin Community College.

I’m taking two classes: Intermediate Algebra and C++.

First, this is the kind of mathematics I learned in high school ( or should have learned better ). I eventually matriculated to the university and there went as far as 2 semesters of business calculus: integration, derivation, the whole shebang. But, after ten ( and I am astounded to type that ) years away from calculus, I’ve forgotten so much. So, here I am, back at square one, learning the basics again. It’s easy to forget a lot because, to answer those kids in high school who asked “when am I going to use this in the real world” the answer, I’m afraid to say, is rarely. So much, that, you’re right, you might be wasting your time. Sorry.

In any case, this time through I’m finding it much easier to learn and encode this information. I’ve thought about why, but I think that my brain must have been conditioned for understanding symbolic and abstract systems through years of programming and a bit of symbolic logic. As is suggested by the action of Snow Crash, I think that the brain arrives with just a tiny bit of software pre-installed. The first several routines (“primary routines”) decide whether or not you will be more or less receptive to new (“secondary”) routines.

The primary routines must be incredibly fundamental. Do you use symbolic language, pictorgrams, pictographs? Using pictographs may disincline a learner from picking up a certain set of secondary routines ( I don’t believe anything is un-learnable, although research shows that past the age of 7 there’s no chance for language acquisition if it hasn’t already happened, sorry Tarzan).

So this secondary routine, algebra, just didn’t stick for me. But I think that I’ve been running secondary programs of an abstracting and variant nature now for so many years that receiving new routines which share similar pathways as other abstracting secondary routines’ function has made it easier to integrate the data.

Or, maybe because my teacher is exceedingly competent. Gustavo Cepparo is one of the best lecturers I’ve had at any school I’ve ever attended. He does not advocate “niceness” he educates giving you an education (although he is very personable). He sees himself as your worthy adversary, trying your skills and, in so doing, giving you an education. Damn straight.

I was discussing this “inclination for symbolic systems” with Lauren who, in her own life, is also undertaking an effort to put some ‘new secondary routine momentum’ into her gray matter. She’s learning computer science and programming. Oddly, when she programs she feels the same structure and scalpel that she came to know doing her literature work: themes, repetition, motifs, it’s all there.

But then we came to a question: Why is it, if you want to go into programming, pedestrian ( or parental ) wisdom holds: “Are you good at math.”

This, parents, friends, teachers, I want to warn you away from asking. The question is not “are you good at math” but do you like symbolic systems, creating them, imagining them, adhering and bending them? That’s the question.

Good programmers are kids who memorize the armor charts to Dungeons and Dragons. Good programmers like to corollate data on baseball cards, they like to organize baseball cards. I’ve seen kids read chess books, or play Magic or play Yu-Gi-Oh, know the Dewy Decimal system, it’s all the same thing: breathing life into internal rules processing machines in your brain, and then using physical ( versus digital ) objects as the inputs to your automata.

So why do kids get asked “but are you good at math”.

Math is a convenient, albeit misleading, question, it’s a forced symbolic system that kids are forced to learn. To this extent, it can be used as a good measure of “will you be a good programmer”. Further, and a child has no way of knowing this, this lazy question implies that “liking math” and “liking the pedagogical approach used by the school board and as practiced by your teacher” are the same. They are wholly different and a child has no way of knowing this.

I disliked most of my math teachers, and the pedagogy was slow, pedantic, too slow to build connections, to sketch an architecture, to paint a direction. Math class, for me, was about exercises and who in their right mind gives a flip about that? I knew math was important, but there was no direction or structure for that statement beyond the obscure “but you’ll need it in college”.

Here’s how I now propose that math should be explained.

  • There are many difficult problems in the world ( how to get a satellite in a crater on the moon), how long to incubate a new medicine, etc.
  • The language for expressing these ideas is mathematics. Just as anyone would look at this figure ( draw a capital ‘A’ ) without knowing the alphabet would suppose it’s a picture of a bird or an interesting shape, you must come to learn the basic letters and words of mathematics
  • For the next several years, you will be learning basic ideas and words in mathematics, this study is called arithmetic.
  • (later) You have learned arithmetic, but most questions in life do not hinge upon known quantities. Like we said in point 1, how do we do something that we don’t know, how do we model and predict? The branch of mathematics which deals with discovering unknown players in systems is called algebra
  • (later) You have learned algebra. Algebra helps discover nouns in systems (what plus 4 equals 11), but the world is a constant state of flux, as noted by Newton. A mathematical language for discussing flux and rates of change was invented by him and Leibniz, that is called the calculus.

I don’t know much more about math than that, but with that framework I could have seen that learning that 3/4 * 4/3 = 1 was something important in the sense that it was as fundamental as learning the crucial verbs to express want or need or identity.

And that, balance, unknown, systems for discovery of unknown, systems for modeling the unknown is incredibly interesting. Had mathematics pedagogy been about systems of symbolic manipulation to discern the unknown versus timed tests and a litany of rules and obscure little “tricks”: loose islands of thought, I feel I would have grasped the beauty of math earlier.

And ultimately this brings me back to the most sublime poem ever written “Ode on a Grecian Urn”

Than ours, a friend to man, to whom thou say’st, “Beauty is truth, truth beauty”—-that is all Ye know on earth, and all ye need to know.

Algerbra, comes from the original Arabic book in which its tenets were first set: Science of the Reunion and the Opposition.

Isn’t that a beautiful phrasing for what algebra allows us to do? This is truth and this is beauty.

And hoary old double-entry accounting, it is a science of reuniting the not with the present, the received with the owed. That is truth, and that, to my good accountant friends, is beauty too. I can see why those who ply this craft love it.

And programming, it is the balancing of the abstract concepts against the abstract concepts. In this vacuum, you create, and you create function, and then you create beauty. And that’s why we love it.

And assuredly, if you choose to plumb the deepest depths of that digital reality, you will do a lot of math, but don’t scare off a child from playing in our world of pure abstraction because they mistakenly associate it with the pitiful educational quality in this country or rote, staid, pedagogy.


**I’m posting this, but I feel it’s incomplete, I think I need to read it some more and refine it, so, this content may update. **

There have been a number of people who have refused to upgrade - like they got the best of whatever it was and refused to get more. There’s a cult of people who refused to leave MS Office 5.1. It was small, effective, perfect, light. Not many people could say that about Office anymore. Those who refuse to upgrade are called “refuseniks”.

A similar cult: WordStar