Wednesday, February 5, 2014

Figuring out what's next

About a week ago I had my 27th birthday. In some respects turning 27 wasn't all that different from turning 25 or 26 - each time I felt the same before and after.  But this time the day itself fell when I was on a business trip in Erbil Iraq, and I was arranging a workshop for 100 NGOs and Technologists to train them on how to use technology to fight corruption.

I've come a ways in the past year. I finally, finally snagged myself a job at a great organization, the U.S. Institute of Peace. I have a girlfriend whom I love deeply. I'm a little less in debt, have a little more pocket change. But a lot is the same from the past year, too. I find myself worrying about the future, and trying to figure out what the "next step" is. 

I'm beginning to realize this will probably never change. A moving goal post is a good thing for a person, and I doubt (and don't desire) that I'm going to plateau into happy security any time soon.

In this case, now that I've found my way to a great organization, I find myself wanting to change my role inside it. I'm itching to do more than the program assistant work - for all the projects I've organized, I just don't have a head for event logistics, and never truly will. What I really love is doing something creative. I think I'd like to try my hand at developing a serious game for peacebuilding - one that doesn't suck, as so many have before. I've been plugging away and making another game since Shaped (always very slow paced - many steps sideways and three steps back), but if push came to shove and it became my only task... well, I'd rather have that challenge and fail than not have that challenge.

The thing is I realize that this next step, when it comes, is not the end all be all either. It's just the next iteration in a long, complex process. Years from now I'll probably be doing something else very different. On my 40th birthday I'll probably be someplace I can't predict.



Saturday, January 19, 2013

How to bring Gmail (and other Chrome apps/bookmarks) to your Windows 8 Start Menu.


As an early adopter of Windows 8, I've been a little disappointed with the utility of the operating system. One of my major frustrations is the inability pin a website to the Start Menu. (Well, strictly speaking, that isn't true - there's a technique to do it with Internet Explorer. But I'm a Chrome user, and irritated that Microsoft is plainly funneling me towards it's browser.) If you're like me, you're also a little disheartened that Google wont be creating apps for Windows 8. Luckily, though, after an afternoon of tooling around I've come up with a simple workaround that brings not only Gmail, but the full range of Chrome apps and bookmarks, straight to your Windows 8 Start menu.

Here's how!

1. Open Chrome and go to the "New Tab" menu.



2. Right Click "Gmail" (or whatever other bookmark you drag onto the New Tab screen) and Select "create shortcuts".

At this point, you can also chose to "open full screen" if you want a Metro Style (ish) app. It will still load on your Desktop.

3. Create a Desktop Shortcut.


4. On your Desktop, right-click your new icon and select "Pin To Start".


You can't pin ordinary URL shortcuts to the Start Menu, but the system views this one as a special launcher of Chrome.

5. Done! On your Start Menu you will find a unique version of your Chrome app.

You can now delete the shortcut from your desktop. It will still run!
It's an imperfect system. Even if you launch these shortcuts in "full screen mode", they will all end up on the Desktop app system, meaning you'll have to do some finicky closing of windows to jump between your apps. And, sadly, this system doesn't work for Mozilla Firefox users! But it isn't a bad way to bring Gmail to your desktop in way that doesn't involve Internet Explorer.

Tuesday, December 25, 2012

Musing on Procedural Generation


Wow - this blog is still here. 

It's been a while since the last post, and it's going to be of an entirely different character. I'm writing this blog mainly as an exercise to flesh out some thoughts I've had tonight about coding. Suffice it to say that in the time between Cairo and now, I've founded an indie game studio (Send More People) and started to get into the language C#.

The Gist of It

Space sometimes poses a challenge for game designers. Space is big - our own galaxy has something close to 100 billion stars in it, and many of these stars have orbiting planets. Generating billions of systems can be tricky for reasons of scale - storing the data, and, from a design standpoint, ensuring that each system is built properly.

Spore supplied players with a vast procedurally generated Galaxy
Minor segue: games like Escape Velocity had a few hundred star systems and hand-crafted each one. Usually there were only a handful of planets in each given scene, and their qualities were pre-determined. Compare that to a games like Sins of a Solar Empire - where each game is set in a procedurally generated star system - and the scripted feel is exchanged for variable gameplay. And it occurs to me now, Spore did a great job at generating a galaxy... although it didn't give you much to do in it.

Anyway, I'm thinking that it would be fun to procedurally generate a universe for a player to explore. Here's how I might organize the variables in a such a system, and the variables they might produce. Each of these variables should be derived with the others in mind; for example, planets closer to the star  would likely be warmer than those further, etc. The relationships would be complex, though - surface temperature would also be influenced by, axis rotation, atmospheric content, day length, etc.
  • Stars
    • Number of (Integer, likely 1-2)
    • Type (name)
      • Brightness (Float, Scale 1-10)
      • Size (Float, Diameter km)
      • Mass (Float, Whatever the Unit of measurement is for stars...)
  • Planetary Bodies
    • Number of (Integer, Probably between 0-15?)
    • Size (Float, km)
    • Atmospheric content (Array, Chemicals and % of Atmosphere)
    • Mass (Float, kg?)
      • Gravity (Float, Unit is "G" for earth gravity.)
    • Surface Composition 
      • Chemical (Array, Elements and %)
      • Liquid on the surface (Boolean)
        • Size of Bodies of water (Integer, percentage of surface area)
    • Life 
      • Exists? (Boolean)
      • How Many forms (Integer)
      • Intelligent (Boolean)
        • Hostile (Yes/No/Neutral)
        • Technological Development (Array, Stone-age to space god)
      • (Many, Many other variables possible)
    • Moons Orbiting
      • Same variables for planets
    • Orbit period
    • Revolution period
    • Axis Rotation
  • Asteroid Belts
    • Number of asteroids (Integer)
    • Size of asteroids
    • Speed 
    • Composition

Look at your watch, dude.

Its nearing 1am and it's Christmas day, so I'm calling it a night. But in closing, it occurs to me that there are multiple levels of complexity that are possible for procedurally generating a star system, and each level of complexity seems to exponentially increase the difficulty in creating system. Likely I'll want to hit some middle ground between just randomly generating a number of planets and moons, and meticulously generating individual characteristics of said bodies.

Something to consider. Over and out.

Sunday, August 22, 2010

Prepare for Takeoff

As predicted, my determination to blog every week or so collapsed soon after I landed here in Cairo. Now I'm faced with the task of representing all of the past few months in a few brief paragraphs. It's a daunting challenge.

The funny thing that I'm conscious of just how little of Egypt I've actually seen. It's is not a large country compared to the United States, but out of all the places I potentially could have gone - Mount Sinai, Dahab, Siwa, Luxor, and many a good beach besides - I've only left town to see Alexandria.

At least I can report that the Alexandria was fantastic. I went for a three day excursion with a few of the boys and girls from my Arabic class. Good times were had by all. Our first stop was Mamoura, a gated beach community about 17 km from Alexandria ("Askanderia" in the vernacular). We were told that we had a house reserved for us right next to the water - this building would be our base of operations for the next few days. Unfortunately our "reservation" was actually just the say so of a local, who actually was in no position to guarantee that the apartment would be free. As it turned out we were competing for the place along with all of Egypt, since the Alexandria beach was a vacation destination. Somehow we were able to finagle an apartment in Mamoura for the same price - after, of course, assuring our host that all of us were married.

It took a long time to figure our sleeping situation out - the better part of the afternoon actually - so we decided just to spend the rest of our time at the beach. It was crowded. The spot we bought might have been no more than 10 meters or so from the water, but we couldn't see it but for the throng of Egyptians, umbrellas, and tables between ourselves and the ocean. Once we got to it though, the water was divine; pleasantly warm and refreshing. Big breakers crashed over our heads. For a person who grew up with the chill and relatively tame water of inner Cape Cod, it was a wonderful experience.

Unfortunately, we hadn't quite done all of our homework about Mamoura. My guidebook cautioned women to "cover up" and wear shorts and a tee shirt over their swim outfit. That advice could even have been taken further - my two friends from Germany and Austria wrapped themselves in a sarong and still had were hassled by Egyptian men. One fellow came up to Katrin in the water and held out hands to shake. Embarrassed, she complied, and then had to forcefully detach herself when the man wouldn't let go until I swam up and signaled for him to please stop touching my "wife". Our friend Tamara fared worse - she was knocked over by a breaker and a man "helped her up," grabbing her breast in the process. Judging from the complete lack of uncovered women at this beach, we should have perhaps been more conscious of local customs and mores, and come better prepared with longer clothes and spare tee-shirts for our girls. Egyptians are a wonderfully kind people, but for some reason - maybe the lack of sex in their own culture before marriage, or their perception of western women as promiscuous - some of these men felt comfortable in grabbing and touching our friends in a way that they would have never done to one of their own.

Luckily the rest of the beach day was fantastic. A group of locals challenged us to a game of beach football (soccer) and we had a wonderful time. I flatter myself that I was the principle striker on our team - three goals scored! Sadly I did not live up to form as a goalie. Afterwards many people came up to us and asked for their pictures to be taken with us. One even handed his baby over to my "wife" Dania and me... somewhere on an Egyptian camera somewhere there is an image of a tall, sandy and sunburned American with a short brownhaired girl, holding what appears to be our little brown love child. What a funny world.

As the sun was setting I spoke to an Egyptian who came up to me and started speaking in slow, but clear English. We agreed that Askanderia was a beautiful place and the sunset was fantastic - but then he said something else that struck me. "Egyptians love America, love France, and Europe," he said. "But the rest of the world, they don't like us." By us, I understood that he wasn't just talking about Egyptians but also Arabs and Muslims. I tried to answer as simply and as honestly as I could. I said that people were afraid of the Middle East because they didn't know much about it, and what they did know they misunderstood. But I assured him that in my group at least, there were five westerners (and one Korean!) who appreciated his country very much. He didn't really seem convinced.

Shew. I barely scratched the Alexandria trip but I've already run out of space (by which I mean drive) to continue on in this sitting. Makes me wish I had been keeping up with this blog all along - it would have been much easier to keep up with events.

Here's hoping I can squeeze more in. If the next article is about some political issue... well, my biographers are going to need another source for the Egypt chapter! Ta.

Sunday, June 27, 2010

Getting Around, Speaking Arabic, Kids and Cairo

As academic life heats up in Cairo, my time/desire/energy to blog effectively has declined. But I've had quite a few experiences in the past few days and I'd feel guilty if I didn't at least mention them here.

The first is actually more of an observation than an event. I noticed a difference between Cairo and other cities, but it took me several days to realize what it was; the presence of children. Kids are much more present in Cairo than in other cities I have visited. Maybe this is because I've come here during the summer when school is out, but even so, I find I surprising number of children aged nine to thirteen on the streets and in the businesses of Cairo. Children work here -two days ago I cam across a tea seller, one of the people who carry large heavy containers of tea shoved into their belts, who was probably no older than twelve and standing in what was (at least to this pampered foreigner) excruciatingly hot weather. Children deliver the weekly box of water bottles to my apartment, and they run errands or performing simple tasks for their family businesses. It's not only at work that children are visible - read back on my last post for a description of how I ended up dancing with children as late as 12 o'clock on a week night. What a difference from my own childhood summers, spent mainly playing at summer camps in western Massachusetts.

Another thing I wanted to touch upon was transportation. I am starting to master the taxi system; the trick is knowing a fair price for getting to one's destination. This is essential when one is travelling in the black taxis because their is no fare counter in the cab - one negotiates with taxi driver on the road. On my first trip to Nasr City, about a 20 minute cab ride, I ended up paying 50 LE for the journey. This was grossly overpriced. My cab driver chuckled gleefully as I handed over the money, saying "Shukran, habibi, shukran" (Thank you my love, thank you.) To put it in perspective, I repeated the journey again by a white cab, with a fare counter, and ended up paying only 16 LE. The rip-offs recede, though, once you know what you are doing. Upon a taxi driver demanding 25 LE for a 10 LE cab ride, I jumped out of the cab before we had moved a block and jumped immediately into the seat of one of his competitor's.

The buses are less easy to understand, however, and that's a shame because they are so much cheaper. The 16 LE bus ride from Nasr city is a pound fifty on a bus, a mere thirty cents US. The issue is that the buses are often packed unless you jump on at their points of departure... these locations are shrouded in mystery and lost to the realm of dim rumor, because as far as I can tell there is no official bus map. The drivers have an assistant that shouts out the place the bus is going. Because the bus is often so packed by the time it makes it to Midan Ramses, I often share a cab with my friend Oscar. My way of getting back from Nasr City is going to one of those mythical starting locations and shouting "Midan Ramses?" until someone points me over to a boarding bus. I end up spending about 10 LE per day on transport - not too shabby.

I've also had the opportunity to branch out since I came here. My list of acquaintances has expanded from my two room mates, Ana and Alison, to a collection of Fajr center students, American University in Cairo students, and the constantly growing community of friends of friends of friends of friends. I feel sympathetic for the AUC crowd - their campus lies on a beautiful patch of land about an hour north of the city, but as a result they are sheltered from the helter-skelter of downtown Cairo life. Even the folks at the AUC dorms in Zamalek report feeling isolated from "Real Cairo". At the same time it is these friends who are introducing me to new parts of Cairo life - a few dates with a Canadian AUC girl that have taken me to a modern art museums and a back-alley shisha bar for watching the (last) American game of the World Cup. These past few days have been exhausting but very worth while.;

But the experience of learning and speaking Arabic is what consumes the most of my time and mental energy. Fajr center holds classes five hours a day, five days a week, and taxes my knowledge of the material to the breaking point. For one thing, the professors don't speak much English at all, so new Arabic words are defined with a mixture of other Arabic words and pantomime. The book we are using is likewise entirely Arabic, and also very Islamic. As I flipped through the pages I found not one picture of a woman's face. Depicted females all wear hijab and face away from the camera. The book is also interspersed with excerpts from the Quran, and the reader is expected to know some Islamic details. For example, in the section when learning about families, the reader is expected to know the Prophet's mother, wife, and extended family. From all this and from the background of some of the people in my class, I assume the textbook is marketed from those Muslims who are born into non Arabic speaking countries who want to read the Quran in it's original language, which is an important accomplishment for followers of Islam.

In my class, level one, I am the only American. The level of diversity very impressive; we have an man from England (originally Cyprus), a South Korean, a Nigerian, a Pakistani, a man from Ghana, and two others whose nationalities I at this point forget. I've been giving the professors a headache recently - yesterday I insisted on moving up a level in Arabic because much of the material we are now covering was very much review. When I got to the new class, however, I discovered it was too much of a challenge and had to shamefacedly request moving back to my original setting. "Patience," said the 50-year old Nigerian man across from me. "You must have patience." And he is right. I'm straining against the barrier of my own ignorance, and throwing myself into an incomprehensibly challenging class and setting will not make me a better student. I exist in the unhappy medium between courses, and I've come to accept the likelihood that I will not be leaving the Fajr center with the fluency I need to pass a GW language exam.

This opens up a new, non-Egypt related can of worms. I have been living in the hope that I could graduate from GW after only two years of study - this now seems very unlikely, especially considering that any remedial Arabic courses I could take in Washington would compete directly with my already full course load and my new job working as my professor's assistant. "Arabic is not a two-year language," says Alison, who has been studying it for the better part of 4 years already. I see now that she is right too. I'm going to have to figure out how to study it for longer and graduate later. This means more time spent in Washington, and a delay on my goal of joining the Foreign Service...

Perhaps it's time to resume my Peace Corps application... see if I can finish my GW courses and then study abroad in a foreign country such as Jordan. That certainly would be a challenge, but its hard to see how two years of life in a foreign country could leave me without the knowledge necessary to graduate. The idea... merits further exploration.

A lot of typing done today, and not much Arabic homework done. Time for an anti-climactic and sudden stop.

Monday, June 21, 2010

Going Places, Meeting People, Dressing like an American

The past 24 hours have been pretty epic. I went to the concluding night of a 3-day film festival on refugees. The room mates came too, and it was the first night we all went out together. The show was enjoyable and intense, about a child soldier in Sudan who had grown up into an international musician and peace activist. This was an outdoors cinema and the seats on the ground level were taken, so we all trooped into a nearby building and watched from the roof. There was a moment when the movie was drowned out by the simultaneous call to prayer from two or three separate mosques in the area.

Afterwards the film festival was concluded with an reggae-esque band. The saxophonist, a Frenchman, played very sexily.

I got my first whiff of how friendly Egyptians can be. As I was standing next to Ana (room mate # 2) a child ran up to me and grabbed my hand, saying "dance with me!" I was in a pretty good mood so I ran over to where a crowd of 10 or so were spinning and twirling and joined in the fray. Very good time. The kids and I enjoyed mimicking each others dance moves - now a new generation of hip Egyptians knows how to dance like a gangly white guy!

That was the best time I had in Cairo so far. It was a gathering of laid back, happy people... many of them spoke English and wanted to chat. A reminder that good people can be found all over the world.

Today I decided to wear shorts and a tee-shirt and see if my method of dodging the heat made me more visible as a foreigner. I learned a few lessons.

First I rode the subway back to Mogamma (receiving many more glances on the train than yesterday.) The halls in the building, which were teeming yesterday morning, were empty. I soon found out why - business hours were closed for the document I wanted, despite the fact that it had already been processed and there were people sitting next to the pile where it lay. Cairo. I had the chance to test out my french, though... one of the people behind the window spoke french and I surprised myself by carrying on a decent conversation with him for a minute or two. I should get back into that language - I dedicated 6 years of my life to it, it would be a waste not to become fluent. Perhaps the foreign service will put me in France or Beirut or Morocco for a term.

Being defeated on that end (but making the acquaintance of three Americans who were in a similar circumstance to myself) I left and tried to find a vodaphone office.

I'm not really proud of what happened next. I asked a man for directions and he took me to his local store, where he preceded to sell me a phone from behind the display. The phone itself wasn't terribly expensive - I expected to pay around 300 LE - but in order to pay for it I went through a number of unwanted hoops. I told him that I would need to go to a bank to get the money I needed. He offered to show me a bank, but on the way he made a quick detour into his perfume shop. I wanted to go to the bank, but to be polite (since he had shown me the way to the phone shop) and I went inside. A warning flag went up as he sat me down and started to go into a sales pitch about how cheap his perfume was. Too late, he sucked me into a swirling barrage of discount offers, praises for his perfumes (which "sell for thousands" in Europe) and sweet tea. Somehow I found myself holding an 80 LE ($9) bottle of lotus perfume in one hand and my cell phone in the other.

It wasn't the worst deal I could have had, and it certainly will make a nice gift, but I don't like being taken advantage of or targeted as a foreigner. This man was friendly, but he was friendly to make a sale, and I only discovered the difference once it was too late. It was a cautionary tale; I know now that if you don't want something, say so firmly and stick to it. That's a good rule both for Cairo and anywhere else in the world.

The rest of the day was better. I went to the nearby Egyptian Museum and explored that for an hour or so. Then I ran into an Egyptian who, recognizing me as American, started testing his English with me. I started exchanging his Arabic for my English, and as he whipped out a notebook covered in English phrases I realized that he came to the Museum expressly for a chance to practice with a foreigner. I convinced him to take me to a Falafel restaurant that Alison had recommended, and gave him my card. He said he wanted to meet up again to talk some more... but with classes starting on Thursday I doubt I will have the time. I will write to him, though. I promised that much.

So, lessons learned: 1) Egyptians are very kind and helpful people, and more than a little forward compared to others I have met. 2) Wearing shorts and a tee shirt singles you out and announces your status as an American. People treat you differently, if not necessarily badly, when you dress distinctly from the locals. I think I may end up sucking it up and wearing pants and a collared shirt from now on according to the local custom. Although I had a good experience today, I prefer not to be considered an oddity and an opportunity in this country.

Sunday, June 20, 2010

The first few days are the toughest...

...or this at least is what I'm telling myself.

It's afternoon, day three of Cairo, and I am beginning to feel a little overwhelmed. At some point during the first night I became an entre for at least one mosquito, who took a walk sampling both of my legs, my arms, my chest and my face. I react badly to bug bites, and I am covered from head to toe in red blotches that I am just dying to scratch. It reminds me of this Calvin and Hobbes cartoon... but more so.


Combine this already uncomfortable sensation with the fact that the temperature during the day climbs to 111 Farenheit and you've got yourself a very sticky, very gross feeling on your hands. It makes me very frustrated, although I'm partly bringing it upon myself for insisting to dress as the Egyptians do and forgoing shorts. I wanted to blend in as much as possible, but faced with the June Egyptian sun I am rapidly coming to the conclusion that it's not worth the pain. I'm a foreign dressed white guy, anyway. They were bound to catch on eventually.

But it's too early to be overly negative. I was thrown into the mix in the Mogamma today trying to get my visa extended, and while I wasn't fluent by any means I was able to make myself understood in Arabic. My inhibitions to talk to people are rapidly falling away (it's amazing how bug bite pain will make you willing to talk to a pharmacist - what's the Arabic word for "SAVE ME"?) and I was able to navigate successfully, if not quickly, through the bowels of the Egyptian bureaucracy. It was a labyrinth that took me two hours to work through, using my meager Arabic skills and connections with English-speaking travelers in the same boat as myself to figure out where I needed to go and who to talk to. I learned to be more aggressive in line - the locals cut me off with hardly a second glance until I started putting my hand in between them and the window... an experience highly reminiscent of my fourth grade playground at recess.

Anyway, the point is there is a lot to be positive about. Despite the beleaguered American economy the dollar is still phenomenally powerful here. My room mate Ana and I were hustled into paying at least triple the value of a cafe meal and the whole check still came out to less than $8. Groceries are likewise very cheap - I have a feeling that if I am careful I still could have a few hundred to live off of in D.C. The people are wonderfully friendly and helpful, and I have yet to experience the highs of Egypt like the Pyramids, or Alexandria. Things are looking up.

So the message of the day is positivity. Don't let heat and bug bites and pollution (I didn't mention the pollution here... it sucks) get me down. In a few days I will be healed and whole and I will be able to experience the city with much fewer inhibitions.