The CodeMaiden’s Demesne

Lorem ipsum dolor sit amet

What’s going on?

Posted by thecodemaiden on June 9, 2008

Well, hi there!

I doubt anyone really looks for updates to this blog, but it’s okay. It gives people something to read when this thing is popular and I haven’t updated in a month. Just read through the archives and see all the weird, random posts I have.

So, a bit of an update - I just watched Steve Jobs’ WWDC keynote address (my boss’s boss’s boss - or something like that - was there: Scott Forstall). Yes, I work at Apple, at least as an intern. Pinch me!

Disclaimer: This is not the spot for breaking Apple news. Seriously. I know less than most rumor sites, it seems. This is just me being a total fangirl.

Anyway, I am consumed with jealousy of Mr Jobs. You see, the first time I ever really laid hands on a Mac was in 2006, when I got my MacBook. I was prepared to wipe off the Mac OS X (which I had never heard of - not anything good, anyway) and replace it with a *nix distro of my choosing. Mac OS X blew my mind. Every feature I had ever dreamed of integrating into my own operating system some day? Done. All the flash and dazzle of a GUI-driven OS, with all the available power (Terminal, yes!) of FreeBSD. To me, OS X is just a beautiful, simple, somewhat closed, but still amazing, *nix distro. I was dismayed to find that development for OS X was simpler (to me) than for *nix, which is in turn easier than for Windows (again, to me). The APIs, XCode, Interface Builder - dream come true for a budding game developer. This is what I wanted to give the world, dammit! Why, Steve?!

And then the iPhone… so many things I want in one perfect package. I always wanted to get into mobile development, but it felt so difficult. I didn’t have time to learn the skills and platforms I would need. But the iPhone? All OS X, great APIs, XCode, wide audience… a developer’s dream device. Is Apple reading my mind? And the distribution methods for the third party content? Fantastic! I see medical apps, social networking, cool games, and I just want to cry. All this could be mine for $199… 

The only thing I don’t like (I bet an announcement is going to come out right after I write this) is being tied to AT&T. I would like to have options - I guess after a while I could cancel AT&T and switch out the SIM.

Phew! I think I finally blew off some steam. WWDC is getting me all hyped up - and I’m going to get to go there in person later this week! 

Peace, love, and brownies.

 

Posted in Uncategorized | No Comments »

On Life, the Universe and Everything.

Posted by thecodemaiden on May 11, 2008

I could try to be poetic and sum this up in 42 words, but I’m not that clever right now. Instead, I’m going to talk about one of the most dreaded topics ever: God.

Yes, you could call me religious (unless you’re a good Christian - then you might call for an exorcism). I make no pretence at being a perfect Christian (far from it!), but I do believe in God, and that’s a start.

So, there are always people who constantly denigrating my belief in God, dismissing it as ridiculous, disparaging my intelligence. Why, though? Why am I not allowed to believe in God? There are people allowed to believe that their country is “the best on Earth” - how do you even begin to validate that claim? What is best? Have you been to every country? Who are you to judge? People are allowed to have favourite colours, favourite foods, favourite vices; people are allowed to fall in love, die for their causes, hate other people at first sight - none of these things is particularly rational (at least as I’ve had rationality explained to me), and none of them are particularly scientific or likely to affect scientific progress. They’re all just fine, though. Yet I’m not allowed to believe in God.

***PONTIFICATION WARNING***

As an aside, I would just like to address the claim that religion is oppressive, destructive, and generally horrible. Religion and belief in God are different things - not entirely separable, but different. All the atrocities committed “in the name of God” are more truthfully in the name of a religion. At the same time, not all atrocities are committed in the name of religion. People are people, power is power. Whether someone gains power as a communist dictator or as the head of a church, they have power. The more power there is to be had, the more likely someone is going to do something underhanded for and with it. Manipulating the fear and trust of others is a reprehensible thing, but it is a human thing. Religion just happened to be a means to an end for some people.

***END OF PONTIFICATION***

Okay, now that that’s out of my system, I ask again: why can’t I believe in God? What mountains of evidence are going to bring to me to prove there isn’t? I mean, if you want to argue there is evidence that there might not be a God, well, okay, but there is evidence to me that you might not exist, either; I’m a closet solipsist.

Why do I believe in God, anyway? Well, it meshes well with my theories of the world, especially quantum mechanical stuff. If God’s observing everything in the universe, then I don’t have to lie at night wondering exactly what makes all the quantum states of everything around me, including my body, collapse into a specific reality. It also makes me feel better about physical laws and evolution and the way mathematics weaves itself into the fibre of the universe.

As an electrical engineer, I get to be the one saddled with applying esoteric concepts like complex numbers to the real world. You might say, oh, physicists have to do it, too, but let’s be honest: do physicists apply anything? (I’m sure they do, really.) So you have complex numbers popping up in equations that govern things that you put together with your own two (real-valued) hands and you go, “Um, what?!” So many “laws of physics” are presented mathematically - why is that? Why is it possible to play with equations on paper, get something cool, and then go look for it in the real world - and find it? It’s simple to add, subtract, multiply and divide everyday objects - but squares and square roots? Have you ever squared anything? I haven’t. And most maddening of all: how come capacitors/inductors/memristors can integrate & differentiate? 

I mean, you can jump up and say that mathematics is just a tool to model the world, so it’s not even coincidence - it’s design. I see it as design too - but not human design. Just set some physical constants, mix them into the mathematics, ensure a little quantum wiggle room, and let ‘er rip. I see that as the supreme expression of creativity. On a large-scale, the universe appears finely tuned for life; change a constant in a few decimal places and *whoompf* - no stars, no life, no me. At the same time, the more minutely you look at the world, the less certainty there is in what’s happening next, down to the subatomic level where you can’t even pretend to know what’s going on.

You can wave it away, chalk it up to chance, whatever you feel like. I’m not trying to convert you, and I probably couldn’t if I tried. I’m just saying that in my quieter moments, there is a still, small voice that reminds me exactly how piercingly beautiful the world and its construction is. I like to attribute that beauty to Someone older, wiser, and way cooler than me.

Posted in Musing and Confusing | Tagged: , , , , , , , , | No Comments »

An Exercise in Logic?

Posted by thecodemaiden on April 29, 2008

So, I’ve been thinking (a most rare and frightful occurrence) and today my thoughts fell upon logic puzzles, particularly those that involve two partners in crime. You know, the ones where one always tells the truth and one always lies, and you have only one chance to squeeze the information you need out of them with a Yes/No question. Actually, any question with only two possible answers will suffice.

I’ll start off with the basic solution: just ask them, “What would your cohort say if I asked him if the mall is to the right or to the left?” What this does is force the truthful one to think something like, “Since the mall is to the left, my cohort would say ‘Right’,” and blurt out “Right!”. The untruthful one would think, “My goody two-shoes cohort would say ‘Left’,” and blurt out “Right!”. You then conclude that the opposite of what they say is where you want to go. If you want to think of it in terms of functions and the composition thereof (and I did), what it boils down to is them both applying the “lie” function. No need to think too hard about it; just know that if you encounter two such people, do the opposite of what they tell you.

Now, however, is the part where you consider that life is so much more confusing than puzzles. Like, what if they both say, “I don’t know”? This means that the liar has decided his partner does know and, you know, lies. It also means that the non-liar really does not know, and since you only get one question, you are screwed.

Even if they both knew what you needed to find out, and you played by the rules and asked the “right” question, consider the motivation for the liar to lie. If his intention is just to test your logical skills, then he may give the exact opposite of what the other would say. I find it hard to believe, though, that someone would spend their entire life garnering a reputation for lying all the time just because he and his associate feel like posing logic puzzles to everyone. If for some strange reason he just cannot tell the truth, he could just as well say “Pickle!”, or “Up!”. If his intention is to deceive - and I think that’s the point of lying - then he could really mess with you. Imagine this:

You: If I asked your friend, would she say the mall was to the right or to the left?
Liar: No.
Honest one: Neither.

or maybe even this (yes, the mall is still on the left):

You: If I asked your friend, would she say the mall was to the right?
Liar: I dunno.
Honest one: Nope.

See the problem here? Sure, if you heard them respond, you’d know which one was just messing with you, but guess what? You used up your one question. At least if one had said “Pickle!” you’d just do what the other one said. Also, the answers above bank on the honest one knowing for sure whether the liar will decide to mess with you or not. If the liar was really in it to trip people up, she’d just mix it up so the only honest answer the honest one could give is “Depends on her mood”.

“Argh!” you yell, “you think too much!” Well it gets even better: how do you know one always lies and one always tells the truth, anyway? Let’s kick it into overdrive with this question: what if one of them walks up to you and says: “We have the information you want, but one of us always tells the truth and one of us always lies, and you only get one question?” It’s all fine and dandy if the truthful one says it, but what if it was a lie?

Stay tuned for the exciting conclusion…

Posted in Musing and Confusing | Tagged: , , , | No Comments »

I Am the Very Model of an Engineer Electrical.

Posted by thecodemaiden on April 28, 2008

Well, perhaps I’m not. Most people don’t think of a West Indian woman with dreadlocks when they think of electrical engineers, but that’s ok. They do think of Carnegie Mellon students (at least if you’ve heard of Carnegie Mellon), so that works.

In honour of ECE (Electrical and Computer Engineering) day at CMU, I wrote the following song, to the tune of “Modern Major General” from Pirates of Penzance. (Actually I wrote it on a whim, but I like that other story better.)

Enjoy.

I am the very model of an engineer electrical
I shudder at imperial and work in units metrical
I conquer circuits with my use of methods analytical
And transfer functions with manipulation algebraical

I can solve equations second order and differential
I can relate electrostatic force to the potential
The steady state responses of my circuits I can estimate
With clever use of limits, nasty fractions I eliminate.

I revel in the mastery of complex vector calculus
The things I can accomplish with MATLAB seem so miraculous
And this is but a sample of my talents mathematical
For I’m the very model of an engineer electrical!

When making Bode plots I always keep my axes semilog
And I can synthesise ‘most any circuit using Verilog
When my oscilloscope shows my responses are off-kilter
I skilfully adjust the qual’ty factor of my filter

I know the properties of amplifiers operational
The circuits I design are full of logic combinational
My soldering iron and protoboard are indispensable to me
And never will I tire of ogling expensive gadgetry

For any project I can choose the fittest circuit elements
And mix them all in series or in parallel as relevant
When given half a chance, you see, I will wax pedagogical
For I’m the very model of an engineer electrical!

And matters computational are certainly within my ken
I compose code more beautif’ly than prose that flows from any pen
I’m versed in data structures, systems, graph theory and all that stuff
No IDE’s for me - you see, vi is far more than enough

Now, extensive debugging is a task from which I never shirk
I keep my programs modular and simple so they always work
My knowledge of computer architecture keeps them optimised
And mutexes ensure that my thread-safety’s never compromised

System control and feedback is a field I find enjoyable
My fervour for all things digital makes me most employable
Forget those engineers who are mechanical or chemical
My future seems much cooler as an engineer electrical!

-theCodeMaiden

Posted in Flights of Literary Fancy | Tagged: , , , , | No Comments »