Need a short nontrivial example program

J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

I'm a member of the ACM at my university (Wichita State), and we are allowed
to participate in the College of Engineering's open house. We decided to do
an arduino project b/c it seemed like the kind of thing that would be
accessible to engineers.

A while back, I read
http://talklikeaduck.denhaven2.com/2009/09/03/red-light-green-light and
loved the idea. So we decided to create a traffic light controlled by the
Arduino, which receives commands from a test suite like RSpec, that reflect
the status of the tests.

But how to show this off to the engineers?

Ruby is easy to learn, and with a good prebuilt test suite offering helpful
explanations of why it failed, and what you might do to make it not fail, I
think that I could sit a reasonably capable person down and have them write
a program.

So I am looking for ideas about what this program should be. I want it to be
nontrivial, because I want them to walk away thinking "holy crap, I just did
something cool that I could see myself using at some point in the future".
And I want it to be short so that a number of people can give it a try.

For example, I really love the TweetStream example program (
http://github.com/intridea/tweetstream/blob/master/examples/growl_daemon.rb),
where you can have your Mac growl at you every time someone makes a tweet
with a given keyword. But I think most engineers here don't have macs so
will be harder to appreciate this. Plus, I'm not sure how to test some of
that stuff, and to see it in action, you would kind of have to spam your
twitter account.

Anyway, looking for ideas.
-Josh
 
A

Aldric Giacomoni

Josh said:
I'm a member of the ACM at my university (Wichita State), and we are
allowed
to participate in the College of Engineering's open house.
[...]

So I am looking for ideas about what this program should be. I want it
to be
nontrivial, because I want them to walk away thinking "holy crap, I just
did
something cool that I could see myself using at some point in the
future".
And I want it to be short so that a number of people can give it a try.

So the ruby-warrior thing doesn't excite you? ;-)

It can be tough; what is really exciting for an engineer? They have a
very meticulous personality, point-by-point, attention to detail.

Maybe recreating Dwemthy's array in front of their eyes?
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

So the ruby-warrior thing doesn't excite you? ;-)
I actually played with it back whenever Ryan announced it on his Twitter.
But I had to read a lot of specs and source to figure out what was available
to my robot, and how to have him do things. I put it down b/c I could see it
was going to eat up a lot of time that I needed to devote to other
priorities.

It can be tough; what is really exciting for an engineer? They have a
very meticulous personality, point-by-point, attention to detail.

Maybe recreating Dwemthy's array in front of their eyes?
I'm really hoping for something that can be done in under 10 minutes (the
format is not yet clear to me, I have a meeting with the people putting it
on, but I may have to give a presentation, in which case, the whole thing
should take under 10 min).

The TweetStream example is less than 15 lines of code. The final product
doesn't need to be that short necessarily, but shorter is still better.
 
M

Michael J. I. Jackson

No! Not Dwemthy's Array! You will most assuredly look like a fool when
your Rabbit gets trashed by the Industrial Raver Monkey as he's
desperately trying to choke down leafy heads of lettuce!

--
Michael Jackson
http://mjijackson.com/
@mjijackson



Josh said:
I'm a member of the ACM at my university (Wichita State), and we are
allowed
to participate in the College of Engineering's open house.
[...]

So I am looking for ideas about what this program should be. I want it
to be
nontrivial, because I want them to walk away thinking "holy crap, I just
did
something cool that I could see myself using at some point in the
future".
And I want it to be short so that a number of people can give it a try.

So the ruby-warrior thing doesn't excite you? ;-)

It can be tough; what is really exciting for an engineer? They have a
very meticulous personality, point-by-point, attention to detail.

Maybe recreating Dwemthy's array in front of their eyes?
 
R

Robert Klemme

So I am looking for ideas about what this program should be. I want it to be
nontrivial, because I want them to walk away thinking "holy crap, I just did
something cool that I could see myself using at some point in the future".
And I want it to be short so that a number of people can give it a try.

What about a simply simulation of some system's behavior that appeals to
engineers? Something from their domain. If you do a clean separation
between simulation framework and the specific simulation you might even
end up using it for something else.

Kind regards

robert
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

What about a simply simulation of some system's behavior that appeals to
engineers? Something from their domain. If you do a clean separation
between simulation framework and the specific simulation you might even end
up using it for something else.

Kind regards

robert
If I understand what you're saying, you mean something like a truth table
maker?
-Josh
 
R

Robert Klemme

[Note: parts of this message were removed to make it a legal post.]

What about a simply simulation of some system's behavior that appeals to
engineers? Something from their domain. If you do a clean separation
between simulation framework and the specific simulation you might even end
up using it for something else.
If I understand what you're saying, you mean something like a truth table
maker?

No. I thought more of a simulation of some mechanism (maybe mechanical
or whatever). You'd have a framework that would operate the simulation
and components that exhibit specific behavior. Say you could model a
basic with detectors for the fill level which open and close a valve
which controls water flow. You could create a simplified log of the
current fill level over time. Something like that.

Kind regards

robert
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

If I understand what you're saying, you mean something like a truth table
maker?
-Josh


Hmm, I've been thinking about this, It could probably be done easily with
tree top. But formatting output might require arcane knowledge.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top