Dissembling Disassembly Experience


Sitting in the sunshine at my favorite hippie coffee shop yesterday, I was trying to reverse-engineer a C switch statement out of assembly and was stuck on “leal 0xffffffce(%eax), %edx”. A couple guys were nerding out near me, so during a lull in their conversation, I leaned over and said, “Hello! How much do you love assembly?” They gallantly looked over my binder of printed textbook pages, and asked, “What framework is this? I worked in Mac. Is this x86?”

And I had to admit that for me, assembly lives in that sheaf of papers. I have never compiled a program and dived into its disassembled state. (I experimented once, early on, but didn’t inhale.) My dev buddies cringed when I told them later that night about the coffee shop incident; one even said, reassuringly: “How embarrassing.”

Still, I am kind of loving being the beginner who makes groan-inducing, pity-pat-garnering goofs. (Well, I have a choice: either embrace it, or die of shame.) Liberated from my Whiz Kid aspirations, I see the humor in these situations–and who can help but love the learning process when you get to laugh yourself through it?

So I’m laughing all the way to my console, where I’m looking, finally, at disassembled code. Jmp on it!

The Flash and the Slog


Programmers (especially interviewers) seem to measure skills against a “flash of insight” standard: if you have four hikers, walking at different rates and arguing about which coin is counterfeit, does the lady get eaten by the tiger?

I mostly get stuck, though, in “slog out of it” sorts of issues: the latest version of Visual Studio has some grudge against an old library, or someone has overloaded ‘string’ so it behaves very oddly, or Mercurial has eaten my patches and no grepping can find them. This turns into an Internet Slog, where somehow all the unhelpful newbie forums have SEOed their way to the top of Google.

And such slogs can be particular to very small scopes. What prospective employer will care that I’ve incorporated old string manipulation libraries into a recursion exercise? At the end of the day, they’ll never know that I skipped number 4 on a self-assigned problem set. And will I really be hired in a Unix environment? Odds are, I’ll have to start all over to learn the ins and outs of some other code repository system; how much of this source control knowledge will map to that?

Other slogs, though, remind me of the Faun’s statement at the end of the Narnia world: “The further up and the further in you go, the bigger everything gets. The inside is larger than the outside.” Human knowledge is wonderful this way: I could start by reading up on updating old libraries and VS restrictions, then swim further into rationales behind language features and updates, and ultimately end up deep in Theory Land.

This would not be so bad if I could count on multiple Theory Lands a) having some solid bottom and b) having adjoining borders, so I could build a fantastic architecture of applied skills with perfect foundtations.

The problem is that I don’t believe there’s ever a bottom; a friend of mine was working with a company that cared about 0s being faster than 1s, and below that, there are people working with materials, and then sub-particles, and dear God but–where does it all end?

I have to depend, I think, on building blocks study enough for the task at hand. I do not need to understand the kernel for my current projects, so I can leave that aside for now. I do need to understand source control. I haven’t run up against design patterns yet (since my projects are so small); I should, however, have a rock-solid grasp of references in recursive functions. This means that sometimes my Faun Slog will take hours or days, but because I’ll limit the scope to “helping me complete the task at hand,” I won’t get thrown too far down the rabbit hole.

And I will keep adding projects that demand sturdier and deeper foundations–which, I suspect, will become the sorts of giants from whose shoulders I can touch insights so easily, it will look like a flash.

Hippies and Counterfeits


I felt really pretty tonight! Which does not often happen, so I am especially grateful. And a little disappointed that we didn’t take any photos, but that is just vanity.

I also feel markedly less stupid. I’d bashed my brain against this puzzle for a long time and couldn’t get the answer: You have 12 coins, one of which is counterfeit and weighs more or less than the others–you don’t know which. You have a balance, which you can use three times. Determine which coin is counterfeit, and whether it is heavier or lighter than the real ones. I sketched diagrams, played with different possibilities, came up with some rules of thumb, and just could not get it. I thought maybe this meant I was too dumb to ever get a programming job.

But tonight, I heard that three of the smartest people I know (all employed in software, one with an ungodly knack for logic puzzles) just took ninety minutes to solve the problem together. And after they finally got it, the consensus was, “If you are a programmer and take that long trying to solve a problem like that, you’re wasting your time.”

So maybe my job prospects are not hopeless.

This afternoon, I went to my favorite independent coffee shop and sat in a comfy leather chair reading Effective C++, while the regulars wandered in and exclaimed over the new photos on the wall. A guy sat down across from me, opened a book and read a few pages, then took a cell phone call from his mom and blithely blathered for 20 minutes about his work schedule. I gave him the look of, “Seriously?”, and eventually got up to look for another chair. Finding none, I sat back down, and he finished his conversation. He paused for awhile, then came over and sat by me.

“Hi,” he said. “You look like you could use a little break, and I’d be happy to provide you with one.

“I don’t know what that means,” I said.

“You seem like you’re drowning in details, and ever since I sat down, I’ve had that feeling that I should come over and help you out. Do you know anything about East Asian philosophy?”

“Sure, some,” I said.

And he told me all about reiki and the energy in all things, and said that in a reiki session, an attuned practitioner can provide healing for others by laying hands on or near their bodies. “And I’ve just been wanting to offer one to you ever since I came in. Would you like a reiki session?”

“Um,” I said. “How long does it take?”

“Well, a quick session could be maybe ten minutes,” he said.

“Honestly,” I finally hedged, “I don’t think I’m in a place where I could appreciate that right now. But thank you for the offer, and the conversation.”

And in the end, the human contact in that conversation was just what I needed: I remembered how to smile and be friendly to people, and avoided the temptation to tell him to keep his hippie hands to himself. My whole face relaxed, and my frustration at his phone conversation completely dissipated.

People are just people, and it really is ok to just let go and be with them. I should remind myself of this more often, especially when my brain is crunched up and grumpy.

Happy weekend!

ICANN is my new hero


Plus, um, what? URLs can be written in non-Latin alphabets? This is HUGE!

Also, they warn applicants:

“The usability of IDNs [International Domain Names] may be limited, as not all application software is capable of working with IDNs… It is up to each application developer to decide whether or not they wish to support IDNs.”

*waves arms* Here, me! I will be an application developer and decide to support this! Plus, with the countries that were just approved (Egypt, Saudi Arabia, and UAE), it would be a good excuse to finally learn rudimentary Arabic.

Unfortunately, Wikipedia says “internationalised domain names should be converted to a suitable ASCII-based form.” Not so cool. But still, how have I not heard about this before?

Korean Alphabet Love


Reading about Korean language representation in Unicode–and wow.

The Korean alphabet is simple enough that anyone can memorize it in an afternoon. The difficult part is that when the Korean alphabet was invented, the only other writing game in town was Chinese, with its square-shaped characters. In theory, it should be easy to read Korean letters linearly–but someone decided that the letters should be arranged in aesthetically pleasing syllabic boxes. Fast forward 600 years, and now each multi-letter syllable has its own Unicode representation.

I won’t attempt to re-explain what that article covers so thoroughly, but I just had to share the best part: when you take a Unicode point (for example, 46239) that describes a single “boxed” syllable, you can deconstruct it into letter components by:

tail = (codepoint – 44032) % 28
vowel/mid = 1 + ((codepoint – 44032 – tail) % 588)/28
lead = 1 + (int) ((codepoint – 44032)/588)

With my random number I picked above, it becomes… “dwetch,” which has no part of any Korean word so far as I know. Internet search yields… 50,000 results of complete jibberish, looking remarkably like (imagine!) someone just rendered random Unicode combinations.

But still. HOT. I love this world.

Starving Artist


The trouble with passions connected to well-paying professions is that in your early days, there are no comrades in arms with whom you can drink liters of wine and fantasize about finally finding success. Young people who decide to be actors–or writers, or painters–dream desperately about their Big Break, the point after which jobs will fall into their laps and they can buy new shoes at full price and enjoy modest name recognition in their chosen field. In their day-to-day lives, though, their peers are pretty much in the same places they are: working ill-fitting jobs to pay the bills, shopping the store-brand oatmeal, wondering if it’s all worth the effort. They may or may not go on irresponsible benders. The necessity of emotional support is well understood.

Kids who go in for computer science, though, are pretty much snapped up as soon as they can demonstrate the basic skills. Sure, they secretly dream about being the next Dijkstra (who doesn’t?), but I imagine they suffer the indignities of non-rock-stardom from posh digs, with more health insurance than they know what to do with, and enjoy satisfying conversations with their brainy coworkers. Their day jobs may not be glamorous, but they avoid the identity crisis of constantly explaining their nonaligned “calling” and “job”: “I’m a writer, but I work as an accountant.” Plus, when programmers want a break from their interesting projects, they can take a month off to go study a new language in a different country. There are no emotional support groups for coders who crave their own eponymous algorithm.

For now, for lack of a more structured support group, I will redirect comfort from Anne Lamott’s guide for beginning writers, Bird by Bird (New York: Pantheon Books, 1994). Replace “writing” with “coding,” and it becomes eerily accurate:

So I tell [my students] what it will be like… when I sit down to work, with a few ideas and a lot of blank paper, with hideous conceit and low self-esteem in equal measure, fingers poised on the keyboard. I tell them they’ll want to be really good right off, and they may not be, but they might be good someday if they just keep the faith and keep practicing. And they may even go from wanting to have written something to wanting to be writing, wanting to be working on something, like they’d want to be playing the piano or tennis, because writing brings with it so much joy, so much challenge. It is work and play together… [T]heir heads will spin with ideas and invention. They’ll see the world through new eyes… At cocktail parties or in line at the post office, they will … sneak away to scribble these things down. They will have days of frantic boredom, of angry hopelessness, of wanting to quit forever, and there will be days when it feels like they have caught and are riding a wave.

And then I tell my students that the odds of their getting published and of it bringing them financial security, peace of mind, and even joy are probably not that great. Ruin, hysteria, bad skin, unsightly tics, ugly financial problems, maybe; but probably not peace of mind. I tell them that I think they ought to write anyway. But I try to make sure they understand that writing, and even getting good at it, and having books and stories and articles published, will not open the doors that most of them hope for. It will not make them well. It will not give them the feeling that the world has finally validated their parking tickets, that they have in fact finally arrived…

But I also tell them that sometimes when my writer friends are working, they feel better and more alive than they do at any other time. And sometimes when they are writing well, they feel that they are living up to something.

Back to it.

Source Control: Checking IN!


Fixed my first bug in someone else’s code! Granted, it was a two-line fix of something that the dev could have fixed in about 4 seconds, but the process of going through the code base, finding the right section, stepping through the section (using my BRAIN, because I haven’t found a good debugger yet), and finally realizing where something needed to be checked and returned…

Well, let’s just say there was some victory dancing to The Black Keys ^.^

And now my tutor says I need to check it in–but that sounds scary! I have never checked something in before. What if it crashes everything? Will satellites fall out of the sky? Seriously, folks!

So far, so good: hg commit worked from my end. It’s a cloudy night, though, so I can’t tell if there’s a sudden “meteor shower”.

Rock on!