• About
  • Projects & Research
  • Publications
  • Archives
  • Categories
  • Posts Tagged ‘programming’

    Update: Programmer Proof


    2010 - 04.09

    I’m not sure if I should be dismayed that sexism is so prevalent in computing, or happy that it’s at least out in the open. I didn’t get the internship I interviewed for this week.1

    Two days ago I interviewed for an Open Source internship at a branch of one of the largest tech companies on the planet. I got to hear, “prove you’re a programmer.” Unsurprisingly, my male roommate didn’t get asked that when he went to interview today.

    Just so we’re clear, it’s discrimination if you ask a question to only a subset of applicants. No, there are no bullshit gray areas on this. This is the policy description held at that company.

    So, what do I do? Or, more useful, what can people that find themselves in a similar situation do?

    I have several advantages in that I knew most of the other interviewees. It’s really hard to know a question is only being asked of you if you’re the only interview session that you know about.

    But what else?

    Well, I’ve endeared myself to people that have a whole hell of a lot more influence than I do. My boss/mentor? Yeah, she and many of the faculty at my university were former employees of that company, going into academia upon retirement. She can easily get an audience with anyone there and get results out of someone.

    I found and told my boss/mentor immediately to talk about this unfathomable question posed to me. And she agreed that it could have been phrased better. And stated that it could or could not be sexist, and that we’ll wait and see.

    Yeah, not getting the position upset me. It sounded like a really good fit to me and my skills. But, no, I don’t want the job. First, why the hell would I want to work with some sexist asshole? Second, because it would be punishing someone (the intern chosen) who hasn’t done anything wrong.

    So, what happens now? Most likely I’ll get an apology  from someone I’ve never heard of and have no beef with.

    I can’t afford to sue for discrimination.

    This company can’t be blacklisted as female-hating.

    It’s a stalemate. One that I think happens a lot more than people talk about.

    I think I know why boss/mentor was scared of what would happen if I applied to her former company. I don’t exactly fit.

    1 I was promised an email that would confirm I had the internship, or a rejection with feedback. Yeah, I didn’t get either. I got to hear it from my roommate that heard it from the person who did get it.

    Data Structures


    2010 - 02.26

    I’m grading for the data structures course this semester. The prof has never taught the course and is reusing assignments from a previous professor’s version of the coursework.

    I spent Monday sick and grading. (I did not receive the assignments to grade until after the department grade-by due date and had to rush.)

    Grading is a very disheartening. The purpose of the assignment was to demonstrate using a queue. Prof said they could use more advanced data structures. The students did not comprehend they were to still follow the queue requirements (enqueue, dequeue, limited access, etc.).

    Out of 70 students only 1 included a queue, reused from recitation. About 20 had included Java’s queue (many of which preceded to use a secondary data structure to do the actual work). The rest used another data structure altogether to reach the same effect: ArrayLists to LinkedLists to HashMaps to trees.

    For people that are not familiar with a queue, this is among one of the simplest data structures to implement. It implements a First In, First Out (FIFO) means of accessing data. One can only access the first (or “top”) Object in the queue; all other contents are inaccessible.

    … I don’t understand the drive of these students to use more complex data structures (and code design) than is necessary. A queue uses notably less memory and has a faster access time these other data structures.

    I read comments that a hash table is more efficient than a queue. Queues have constant time adds (enqueues) and removals (dequeues). A hash table has O(1 + k/n), where k is the number of keys and n is the number of elements; this is between linear and logarithmic time scales (meaning the amount of time to perform an add or removal will increase with an increase in the size of data structure).

    This scares me. There will be (if there aren’t already) computer scientists and programmers making inefficient code because they genuinely believe their way is better.

    … I talked to the prof in charge (who has been out of town this week) about my issues. My actual boss, the Director of Mentoring and Retention, had spoken to him previously about this. (I was actually third to complain about it to her.) And she was not getting through to him; she was even considering going to the department chair.

    After I told the prof what had transpired, the light bulb finally went on for him. Students will not prove they understand concepts unless they are forced to. Getting the right answer is more important than learning, I guess.

    JUnit


    2010 - 02.03

    JUnit is a unit testing framework developed for Java programs. It’s not my favorite thing in the world. For starters, it only tests public methods. Which is a bit of a problem if from a development standpoint; many internal “heavy lifting” methods are not needed by outside classes and should be private. In addition, I cannot use Eclipse, my IDE, to debug as I do with other code.

    For my software engineering course, I am creating a very simple Roman to Arabic numeral converter. (If anyone knows what the unicode character for Roman numeral 5000, a V with a line over it, I would appreciate it for accuracy.) It isn’t the converter program that is important. The purpose is to demonstrate black box testing methodologies: testing without knowledge of the internals of a program.

    I developed a test plan and wrote the test cases in JUnit, as instructed, before proceeding on to writing the actual converter. I then ran my tests. A couple failed and a hand full had an error. I rewrote the code; the class is small enough to justify it, rather than worry about where my sometimes failing  bug was.

    Yet, I still had the same problems. So, I copied the short bits of code into a main() function to use the debugger. The debugger revealed no faults: my system produced the correct output. JUnit had produced a false negative. I didn’t know it could even do that. It did not occur across similar tests with identical assert statements, so I’m not sure what it could be.

    Learning from Projects


    2009 - 12.05

    My department encourages undergraduates to do research beginning in their freshman year. I get the impression that many schools limit this to a senior design project, which is rather saddening.

    I’ve stopped reading my CS text books because, well, they’re just not helpful. But then, trying to learn anything more unusual like how to use the tools available is still very difficult. So, I’m just going to do a quick overview of what I’ve learned from using different tool sets.

    LilyPad

    So, the LilyPad series of embedded systems modules is designed for wearable computing. So, the best place to start learning about the LilyPad stuff is from the creator, Leah Buechley. Things to keep in mind:

    • I never needed to create a pad for my units to prevent slippage. But, you’re millage may very.
    • Pins (rather petals) of the LilyPad Arduino are dictated by an int (integer) value.
      • 13 is reserved for the LED that exists on the LilyPad Arduino.
      • RX/TX are for serial connections (see XBee below)
      • Analog (denoted by “a” on the petal) pins retain the same numbering scheme as the digital ones(so there’s an analog and digital pin 0, which are both labeled “0.”)
    • Buttons should be set up connected to two digital pins. One should be written to be HIGH while the other is written to LOW. Then, just do something whenever the HIGH pin reads as LOW. (This is contrary to the standard debounce that is done with buttons.)
    • Do not EVER cross conductive thread lines or allow them to touch one another. This will destroy one or more modules.

    I have used all of the LilyPad modules available. Except for the slide switch it’s pretty much “find the closest example and repeat” (if anyone knows how to use the slide switch, I’d like to know).

    XBee

    Based on the ZigBee standard, XBees are designed for WPAN. Indoors, they are restricted to within a room, but can be separated by miles outdoors.

    This forum post is probably the easiest I’ve seen in getting started. Things to also consider:

    • RX connections go to TX and vice-versa. Weird, counterintuitive, but that’s how it goes.
    • With a firmware update, it’s possible to have the XBee use actuators. This isn’t direct control, more like if one XBee has a pin go HIGH, the XBee it talks to will also have that pin go HIGH.

    Personally, I found it a lot easier just to use the XBees for communication and an Arduino for the actual sensor data and actuator control.

    Trackmate

    Trackmate is a computer vision based tangible object system. From a user standpoint, it’s pretty easy to control: cut out some inch-square icons, tape them on to objects, and use the interface.

    From a programming standpoint, not so much.

    • I recommend the Minim Processing library for any audio work. Seriously, don’t even bother trying to do this from scratch.
    • The code itself, when I last looked at it, was very hardcoded, so don’t expect to change the behavior of the system unless wanting to write it from scratch.
    • Review Processing. While it is derived from Java, it leaves some more advanced things out.
    • Review matrix algebra and vectors. While you won’t be doing math directly, it will help to make sense of some of the values.
    • I did the initial setup using the PlayStation Eye camera as recommended. While I could use the camera’s drivers and operate it from outside Trackmate, it didn’t work with Trackmate (looked like snow). Don’t know why, but it just wouldn’t work for me.

    Toys I would like to play with


    2009 - 11.07

    Figured I’d talk about some relatively new technology that I would love to get my hands on. So, in alphabetical order:

    BUG Modules

    BUG modules with BUG base

    BUG modules with BUG base

    These little modular hardware components are designed with rapid prototyping in mind. So, what’s so great about them?

    • Various modules and planned modules:
      • Audio output
      • Motion detection
      • Zigbee
      • Touchscreen
      • GPS
    • Java programmed. Java is a simple object-oriented language with large functionality, cross-platform performance, and a safety net to prevent new programmers from doing stupid things (like, wipe one’s harddrive as one can do with C/C++). It also prevents having to write each component in it’s own language
    • There’s braille on the modules. While not very useful for most people, it is still a nice thing to do.
    • Modules are just inserted into slots; no having to argue with wires and solder. Like electronic legos, I suppose.
    • Education discount.

    So, why don’t I already have these?

    • Price. These things are $50-130 US a piece with the base module at a whopping $449. While I am paying for the convenience of prototyping, that’s still a lot of money considering that I (and I assume many people) would like several modules to create anything I want.
    • Sharability. I have to expect other people to shell out the money if I want to share my applications. While Bug Labs promotes users to share code on it’s site, I still would like to actually see others use it.

    littleBits

    littleBits intro from ayah bdeir on Vimeo.

    littleBits are a series of prebuilt circuitboards with components that magnetically snap together. Prevents the need to solder between boards to make connections and looks really child-friendly. Why do I want them?

    • Simple design. I don’t know a lot about hardware (despite my research interests being mostly in hardware), and these seem like a safe way for me to get my feet wet.
    • Outreach. These look like they would be a lot of fun for kids. While I know robots are interesting to many people, when I was little robots certainly weren’t for me (they didn’t come across as unusual or artistic enough for my tastes). These things look like they’d be more successful with atypical kids and super-hardware focused ones.

    And why don’t I have them?

    • Preorder without a set date. I don’t really have the time or money to tie up with a product that I don’t know when I will get it.
    • Preorder without a set dollar amount. I don’t want to order something without knowing how much it will cost.

    Nabaztag

    Nabaztag showing colored LEDs and it's ears moving.

    Nabaztag showing colored LEDs and it's ears moving.

    Created by French company Violet, Nabaztag is among the list of smart objects. This little electronic rabbit does reminders, does RSS updates, reads one version of RFID tags, and can send/receive messages from various sources. What’s the good:

    • It’s a rabbit.  I like rabbits.
    • RFID tagging of objects and linking these to digital events sounds convenient to me.
    • Programmable. It’s nice to have a pretty toy that I can modify.
    • Not having to look at my email all the time. Having a device on the other side of a room tell me I have mail sounds a lot nicer than always having to be connected.
    • It does ear tai chi.
    • Reads RSS, sets alarms, checks email, can receive texts. Generally, it just does lots of communication

    What’s the bad?

    • The services are reliant on  a database controlled by the company owner. I feel uncomfortable having data on another server and not knowing that I can be charged for services in the future.
    • Violet went bankrupt. It was then bought by Mindscape (this past October actually). So, I don’t know what will become of the Nabaztag line.

    Zii EGG

    ZiiLABS, a subsidiary of  Creative Technology, has been pushing the creation of it’s Zii processor, a stemcell-like multimedia-focused chip. Out of this is Zii EGG, a developer tool. What makes it interesting:

    • 10 point multitouch screen
    • 1080p output image
    • 32 gigs of memory
    • WiFi and Bluetooth wireless standards
    • HD camera
    • Accelerometer and GPS
    • Text-to-Speech engine

    And the not so great:

    • Android isn’t fully operational so have to rely on ZiiLABS’ Plaszma SDK.
    • Cell phone chip?! Seriously, this looks like a phone.
    • $400 price tag. Yeah, I get that it’s intended for companies, but there’s a nice individual and educational marketability.