Why is Mayhem so basic? Why can’t we make it more complicated?

Simple: Mayhem is designed to be easy.

We have been receiving a lot of feedback, especially from developers, asking questions like, “How do you do while loops?” or “Can you make one event trigger multiple reactions?” Another common question has been, “Why can’t we pass data from an event to a reaction?”

The short answer is that Mayhem is meant to be easy for everyone. This means you, me, developers, non-programmers, and even my grandmother should be able to navigate Mayhem with ease.

But you didn’t come to this blog for the short answer.

The longer answer is split into two parts.  First, adding these things (loops, multiple reactions, data passing, etc) will make it more difficult for end users to use the program. Second, adding these things will make it more difficult for developers to write modules.  Both would defeat the purpose and vision of Mayhem.

Mayhem approaches simplicity in a whole new way.

For a  long time people have tried to simplify  programming for non-programmers by creating visual programming languages. However, none of these languages have seen widespread adoption by non-programmers.  Why? Even with graphical programming systems, you still fundamentally have to know how to program, or at least to think in terms of loops, functions, etc. How is my grandma going to be able to do that?

With Mayhem we took a radically different approach in which we only support one simple, very generic construct. When something happens…do something else. That’s it. That’s Mayhem. A lot of programmers have gotten frustrated with us because of this, throwing around comments like “Mayhem isn’t Turing complete” and “It’s hopelessly limiting.” However, Mayhem isn’t designed to be a programming language; it wasn’t developed to replace C# or any other “real” programming language.  Mayhem was designed to be the single link between Events and Reactions, with no programming required by the end user.

While Mayhem can’t do everything, what it can do is done trivially. Our model is one that everyone can understand quickly. We wanted to minimize the learning curve as much as possible;  adding  multiple constructs and parameter passing would make us no different than other visual programming languages. In other words, instead of enabling the language, we focus on enabling people.

Okay, that explains why our super straightforward Event and Reaction model makes sense for end users, but why does removing all that functionality make it easier for developers? That’s actually a pretty easy question. With Mayhem, we made every Event work with every other Reaction.

Now imagine that we allowed the Event to pass data to the Reaction. Let’s  pause for a second to talk about contracts in Windows 8. Contracts are my absolute favorite thing about Windows 8. (For more information on contracts, there’s a great article here.

 As an example, let’s say you wanted to take a picture from your hard drive and put it into a Word document… but the picture is only on Facebook!  By downloading the Facebook app and implementing the Win8 photo contract, any photos stored on Facebook would become available to you through the default Windows photo picker.  There’s even a generic sharing contract, so you can “share” what  your current application has saved with any other application (as long as both have implemented the sharing contract.) In order to program those applications you have to write custom code for each of those contracts, the program needs to know how to search, share and many more…generically.

Let’s jump back into Mayhem land. Mayhem’s Event and Reaction model is a contract at its simplest. Imagine we have the Reaction DoThingsWithStuff. If the Event was able to pass a parameter, DoThingsWithStuff would need to know how to interpret that parameter. It might be an image, it might be a website URL, and it might be a custom object. DoThingsWithStuff would only ever be able to work with the things it was programmed for, failing for everything else.

There are also obvious consistency problems for the end user in the case that DoThingsWithStuff knows how to interpret multiple data types. The end user would have to know how DoThingsWithStuff acts based on which event they paired it with. Something that might seem extremely obvious to developers would make my non-computer savvy friend frustrated because his connection didn’t work as he expected.

Now let’s take Mayhem as it is; we don’t pass any data, and Events and Reactions are self-contained. Any Reaction will know how to work with every Event made previously and any produced in the future, regardless of what the Reaction does. The Reaction always works the same way, and therefore you can be a master of that Reaction as soon as you use it.

Not only are Mayhem Events and Reactions simple to code, they are universal concepts. Almost anything can be plugged into this model. From the real to the virtual, the most disparate devices and services can all tie together in Mayhem. What’s more, you don’t have to be a Boy Scout (or a master developer) to do the tying.

 

For more information about Mayhem including the Make Your Own Mayhem contest with $7,500 worth in prizes, visit http://MakeMayhem.com.

Blogging, I’ve missed you so.

It’s been a long time since I’ve updated this site. I have done so much in the last year that I have told myself that I need to just sit down and crank out information about it. That’s great in theory, but the amount of time I would need to have spent writing about things that have already happened keep me from making progress on my current projects.

Therefore, this will not be the all inclusive post with tons of details, pictures, and step by step instructions on how to recreate my projects that I wanted it to be. Instead it will be a short recap with some minimal information. If you really want to know more about a project, let me know what you are looking for and I can probably oblige specific requests.

Anyways, I get calls fairly often from potential employers who ask me if I’m free for work since my latest blog post is from my last day as an intern during the summer of 2010. I guess I was unaware how often my blog was read for information about my current status in life. To all of you who may be possible employers… *wave*.

Since my internship was over, I have revisted a lot of old interests and projects, and played with new things I couldn’t have imagined getting the opportunity to play with.

Firstly, I was a TA at the University of Washington for the web programming class. Pretty straight forward, we taught the whole stack from mysql backend, php, css, and javascript frontend. I led quiz sections, graded homework, office hours, etc. The regular shindig. I love web programming so much, so passing this knowledge on was an awesome experience.

I’ve also been revisiting my computer controlled light tubes project. The first version is quite large and clunky, the wires are massive and inflexible and it’s time for it to be expanded. I learned a lot from making the initial version, I had never really worked with hardware before and did everything from the soldering to the firmware and highlevel c# controller. My new version will be 1 printed circuit board, slightly larger than a credit card’s dimensions (excluding the height obviously) instead of 4 hand soldered boards. I’m designing the schematic and am planning to send those out for manufacturing. It’s a big undertaking and is something I’ve never done before.

I’ve also been working on building new letters for the outside of my Fraternity’s chapter at the University of Washington. Our current letters are brass and blend in with the side of our building and are almost invisible at night. Some houses have purchased back lit letters for their house. These turn on at night and turn off in the morning and are backlit in white. I decided to take the whole concept one step farther and to do something I have never seen someone do before. I made new letters for our house (didn’t buy them or hire someone to cut them), and attached an rgb led strip to the back. I made a custom controller that turns on and off the led strip to a solid color at night and in the morning just like all the others. However, you can plug a computer into it and run animations to your heart’s content. If you unplug the computer, the solid color that turns on at night will be the last color the computer set them to.

I laser cut the letters from acrylic, painted them with silver automobile paint and a clear coat, drilled and tapped holes to attach studs, wired up the led strips, and made the circuit controller. To give you a sense of size, the outside oval of the Theta is 18 inches across and the studs holding up the letters are 4 inches long.

And during all this, I have also been working at Microsoft full time since January. I’m working on an amazing project called Mayhem that has the potential to revolutionize what normal people (non developers) can use their computer for. I have so much more to say about that, and I’m able to as well! The entire project is public and open source, so stand by for more information. :)

As I said, I don’t have time to go as depth in all these projects as I would like to, but I have taken this opportunity to at least provide some summary of what I’m working on. Hopefully I’ll approach writing articles in more managable chunks and can actually keep this up. I feel like I always say that. Hmm.

Next Page »