Thursday, October 29, 2009

Screenshot of the Latest Build

I've been running into a lot of challenges with the layout, but it's starting to look really nice.

One weird thing about the controls is that they will always overlap each other...not the best behavior, so I need to either look into Grid layouts or see if there's just a "Overlap = false" or something.

Wednesday, October 28, 2009


Another project I dug up today while I was doing a Qt tutorial for my Open Source class, a small Brainfuck interpreter with a slick GUI. Qt is a fantastic graphics toolkit, and although I love Gnome, I'll probably end up doing other GUI projects in Qt...haven't bothered to take the time to learn GTK+ yet afterall. :)

Clever Qrulrs Code

I'm proud of this, so I thought I'd share's very simple, just calls out to two different web services to create a QR Code from a URL:

public Qrurls()


private void createBitlyURL(String longURL)
String URL = "" + longURL + "&login=" + bitlyAPIUsername + "&apiKey=" + bitlyAPIKey;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream resStreamLocal = response.GetResponseStream();
string tempString = null;

if (null != response)
resStreamLocal = response.GetResponseStream();
StreamReader sr = new StreamReader(resStreamLocal);
string str;
while ((str = sr.ReadLine()) != null)
if (str.Contains("shortUrl"))
tempString = str;
throw new Exception("Something is wrong!");

if (tempString != null)
bitlyURL = tempString.Substring(tempString.IndexOf(""), 20);

private void createQRCode()
String URL = "" + bitlyURL;

WebClient wc = new WebClient();
byte[] data =

PngBitmapDecoder decoder = new PngBitmapDecoder(new MemoryStream(data), BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
BitmapSource bitmapSource = decoder.Frames[0];

// Draw the Image
myImage = new System.Windows.Controls.Image();
myImage.Source = bitmapSource;
myImage.Stretch = Stretch.None;


It's being used in our Surface application for the iDMAa 2009 Conference. Obviously not the most complex code I've written by a long shot, but it didn't take much time and was extremely useful, since QR Codes are getting more common.

Monday, October 26, 2009

Just so you can all feel my pain...

My Surface project is becoming littered with code that looks like this:

presContent.Background = System.Windows.Media.Brushes.Transparent;
presContent.Foreground = System.Windows.Media.Brushes.White;

and this:

System.Windows.Controls.Image authorImage = new System.Windows.Controls.Image();

I spent around 10+ minutes just now making these "ambiguous references" unambiguous in this manner. There are a few major issues with this, besides the waste of time.

1) The "Intellisense" that everyone jizzes themselves over with Visual Studio is not very intelligent.

2) Why can't it tell that, when the variable is a System.whatever.fuckmicrosoft, that the constructor should also be of this type. What's the point of even having static typing if it can't tell that.

It's obvious these tools were very poorly designed with very little forethought...I shudder to think this was done with full knowledge and not on accident, but it's almost too prolific to not be otherwise. I only complain because it's making my life very very hard. This project has gotten rather large and the last thing I need to worry about is the jackass compiler complaining it can't tell which 10 word namespace this data type is actually in, and could I please write out all 10 words, which makes the "using" keyword ESPECIALLY useful.

In other news, we're at over 300 commits on the project, with 2 weeks left before shipping! :D

Tuesday, October 20, 2009

Struggles in Seminar

I'm taking a 600-level Art seminar class, mainly because I have experience with the Surface, and my boss is in charge of it, and the professor I'm doing my other Surface project with is teaching it. We're in week 9 and we haven't really started coding yet...this makes me extremely nervous, since I'm taking 2 other classes on top of doing a 699. The crux of our problems have been this stupid GUI do you design a cool, interactive GUI for a piece of hardware that is relatively new, and all the other applications for it are photo viewers, for an art museum that doesn't just want a photo viewer, because the photos would just be showing the stuff they have hanging on their walls? Answer: very carefully (ba-boom-ching!)

But seriously, this Surface may be intended for "collaboration", but the reality is far from that. The problem of designing a deep, interesting interface for what essentially amounts to a huge table that sees your fingers is no trivial task...and it hasn't been studied for years like a traditional GUI. It's really difficult to communicate the nuances, but here goes:

1) The Surface is both smaller than you'd expect, has less RAM than you'd like, and is rectangle, which, not matter how collaborative your app is, will force certain people into a driving position and others into a watching position. The Surface can only comfortably be surrounded by, maybe, 6 people total, but that's not nearly enough room for everyone to have their own "interaction space". Plus, it gets really cluttered REALLY REALLY fast.

2) You have two options: design the GUI in a way that allows for each person to have their own, isolated interactions, or somehow try to design it in a way that everyone can interact together. Each approach has it's own problem; the isolated interactions can be much deeper, but it's not collaborative, while the collaborative design can only be so deep, otherwise one person can ruin it for everyone.

Honestly, I would just love to see a design that can have the cake and eat it both deeply immersive for everyone involved while still being collaborative. I don't know if this is just due to my own brain being used to a specific way of doing things, but I feel like this is an impossible task for computers...they are necessarily a single-person experience. The fantastic thing about online games is that they can simulate a deep, collaborative experience, but you're still interacting with it through a single-user machine.

This brings up an interesting point many multi-player games, collaboration is necessary to complete a task. Sure, two people aren't controlling the same character, but their collaboration facilitates the common goal...that collaboration is always extremely deep and nuanced. Unfortunately, I can't figure out a great way to apply this to the Surface without involving multiple terminals attached to it, or by making a ridiculously complex game. This thought has really intrigued me, though, so I may follow up later.

Wednesday, October 14, 2009

CCSC:MidWIC and Thoughts on Women in Computing

This past weekend I presented a poster at MidWIC, the Midwestern Women in Computing Conference. This was both an extremely frustrating and fairly interesting experience, and got me pondering the whole "women in computing" issue. I felt like the conference not only missed the point of why women are such a minority in CS, but actually brilliantly illustrated the problem: we were placed in a small, cramped building away from the main building with all the food and keynotes (where CCSC was taking place), presented posters more or less only to each other, were given lipstick in the swag bags, and had a social dance at the end of the first day...the organizers were obviously under the impression we were all 9 years old.

However, that brings up an interesting issue. Women are most certainly a minority in Computer Science, but how do you not only encourage more women to join, but also promote them in a way that doesn't come off as condescending? So much of this is a major cultural problem that isn't going to be solved overnight. And by intentionally trying to promote one group you're doing the very thing that no one really wants: singling out a group of people based on their gender rather than their common interest in computer science, and thereby creating a very delicate dilemma. I want women to be promoted, in a sense, but only in the sense that, if I were to go to a general computer science conference, where everyone is attending due to nothing more than a deep interest in computer science, I will be taken as seriously as everyone else and I'll find as many women being taken seriously as men. So at that point I'm not even being promoted as a woman anymore, just as someone who loves computer science and has some knowledge about it, and therein is the catch-22.

However, that leads to another question...should we even bother promoting women in CS to each other? We're already women in CS, it's too late to make us be any more "into" CS. The challenge is to get teenaged girls interested in Computer Science, and plant the idea in their heads to check it out when they get to college. That requires mentoring programs (as well as a massive cultural overhaul, but again, that will take years at best) where women not only show their younger counterparts that they can do CS, but that they can be as good at it as anyone else. This is a challenge, especially for less well-funded schools, but it's a massive step in the right direction.

None of this is original, I'm sure, but if nothing else it helped illustrate in my own mind the problems being faced right now.