Dissembling Disassembly Experience

2010/05/14

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

2010/05/07

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.


Present Tense

2010/05/04

I feel like there’s a three-line biography constantly circling over my head, changing as I do: “Laura is a recovering liberal arts major who studies programming. She goes dancing and drinks wine, and brings whiteboards to breweries for impromptu coding sessions. She walks to the grocery store and buys chocolate, and walks home singing The Mountain Goats.”

In English, the present tense describes habitual actions, but we use a special case of present continuous tense for current actions: the sentence “I wake up early and go running” is distinct from “I’m waking up early and going running.”  One is clearly a daily routine, while the other is a somewhat optimistic fluke.

Sometimes I let my current actions enter my biography: “I read the New York Times when I should be tracking down the source of this annoying bug.” This is inevitably depressing: who wants to be someone who habitually reads newspapers instead of working? Worse yet, once we acknowledge this action as a pattern, we’re more likely to do it again. Commitments (internal or otherwise) are pesky like that.

Luckily, I believe we have some influence over these floating biographies, and I will make sure I only adopt present tense phrases that I want to be true. And, in a lovely reciprocity, calling out positive actions as habits serves to reinforce them.

“I’m getting distracted, but I work hard.”

As the Koreans say: fighting!


Hippies and Counterfeits

2010/05/01

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

2010/04/15

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

2010/04/15

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.


Coffee Appreciation

2010/04/12

I went into my favorite coffee shop for my usual americano, and the barista said to me, almost as an aside: “I want some of whatever you’re on.”

“Er,” I replied. “What?”

“Whenever you walk in here,” he said, “you look like just you’ve seen the most wonderful thing. I want some of that.”

I will take it as a compliment ^.^