20101010

Rube Goldberg and the 6 Simple Machines

Hah, the title kind of sounds like a Disney fairytale for engineers doesn't it?

Rube Goldberg

Definition: Rube Goldberg: A comically involved, complicated invention, laboriously contrived to perform a simple operation. 1

A Rube Goldberg machine is essentially an overly designed and engineered contraption that often involves a long chain of events that culminate into a simple conclusion. The term bears the name of an American cartoonist named Reuben Lucius Goldberg (July 4, 1883 – December 7, 1970) who was well known for his comics involving these complicated machines that performed trivial tasks. 2

    Rube Goldberg’s comics have sparked international competitions where individuals and teams attempt to construct Rube Goldberg machines. One of the most popular contests being held annually at Purdue University. 3  The 2010 contest held at Purdue had the contest objective of creating the most complex machine that would dispense an appropriate amount of hand-sanitizer into a person’s hand.

6 Simple Machines

Definition: Simple Machine: is a mechanical device that changes the direction or magnitude of a force.

In contrast to a simple machine, a complex machine is simply two or more simple machines working together. When we say working, we mean work, which is the product of force or effort times the distance.  The following are the 6 types of simple machines 5:
  • Inclined plane - A slanting surface connecting a lower level to a higher level
  • Wedge - the edge of a smooth slanted surface
  • Screw - an inclined plane wrapped around a cylinder
  • Lever - a stiff bar that rests on a fulcrum
  • Pulley - a groove wheel with a rope or cable around it
  • Wheel and axle -  a wheel with a rod, called an axle; through its center, both parts move together
   
It is interesting to know that despite the fact that we use machines to make our lives easier and to do less work. It is because of the laws of thermodynamics, that in fact, using simple machines actually amounts to the same amount of work being done overall. 5 Simple machines make things easier for us humans, but essentially same amount of energy is required to perform a task.

Source:
    1 Webster's New World; 4 edition (August 15, 1999)
    2 The National Cartoonists Society http://www.reuben.org/members2.html
    3 Time; “Top 10 Nerdy Competitions”;             http://www.time.com/time/specials/packages/article/0,28804,2023019_2023018_2022959,00.html
    4 Paul, Akshoy; Pijush Roy, Sanchayan Mukherjee (2005). Mechanical Sciences:Engineering Mechanics and Strength of Materials. Prentice Hall of India. p. 215. ISBN 8120326113. http://www.mtsu.edu/~pdlee/public2_html/simple_machines.html#sm#5.
    5 IEEE. “TryEngineering”. Simple Machines. http://ewh.ieee.org/r3/cnc/tisp/cd/TE/simpmach.pdf

20100919

Physics Fun: How Many Elephants of Stuff Comes Out of the Tailpipe of Your Car?

We fill up our automobiles at the pump daily. Have you ever thought about how much of the stuff your car uses as fuel escapes from the tailpipe every year?  For a bit of fun, let's measure it in elephants per year.

Before we calculate this, we need to know a few conversion factors to help create our elephant equation:
  • Gasoline weighs about 6 pounds (lbs) per gallon
  • The weight of an elephant is about 10000 lbs per gallon
Now we can use the handy-dandy dimensional analysis we learned in our science classes to create a rough model that cancels out conversion factors. In the below equation q = Odometer reading in miles/week, and u = Mileage in miles/gallon.

? elephants = (q miles/1 week)*(1 gallon/u miles)*(6 lbs/1 gallon)*(1 elephant/10000 lbs)*(52 weeks/1 year)

This conversion factors simplify to a simple little equation: y =0.0312(q/u), where y is the number of elephants per year.

Let's try our model using U.S. national automobile averages.
q = 231 miles/week, u =23 MPG


y=0.0312(q/u) = 0.0312(231/23) = 0.31 elephants/year

So it turns out Americans have almost a third of an elephant of stuff popping out of their exhaust pipes every year on average. Want to calculate your own car's elephants quickly? Use my Elephant Tailpipe Calculator!
Elephant Tailpipe Calculator 1.0

20100905

The Persistent Cloud: Part I

The Persistent Cloud: Part I
by Andrew M. Samuels

Specialist Ethan Meyer walks outside his DRASH to take in the crisp clean air and head towards the mess for breakfast. The sun beams contently and focused. Nothing but clear skies if you ignore the lone cloud hovering in the distance moving towards Kandahar. Meyer occasionally did daily routines the old-fashioned way for nostalgia’s sake, he could have easily checked the weather on his Android mobile and synced it with his Packbot to bring him back some coffee. Admiring the generous weather, Ethan wished this was a vacation, but the resurgent Taliban seems to be attempting to put a damper on such fantasies.

Spc. Meyer’s squad set up their DRASH tent in about an hour as the rest of the company moved into the base set up just outside Kandahar.  NATO forces and the new Afghan military had Kandahar under control for several years until an uptick in violence had spiked as a result of the troop surge. Taliban forces retreated and regrouped to hold out in Kandahar.

It didn’t take a very extensive analysis to understand that the Taliban insurgency was planning. They’ve seen the efforts of the insurgency in Iraq and wished to inflict the same type of damage in an attempt to wear down NATO’s political will through brutal violence in an urban setting. The enemy will disguise themselves as civilians, hiding like cowards amongst the innocent. Scoffing at our efforts to root them out while the civilian populace is made to suffer by the insurgents as distractions and shields.

It has been a little more than a decade since the fall of Baghdad in 2003. People have said that the Second Gulf War was a hopeless effort that solved nothing. But Meyer knew better, and more so, the defense strategists, scientists, and engineers knew better. War had changed. It took a decade to find any measurable adaptation, but it came. A few suits at the top with scientific degrees and an itch for problem solving put in the order for billions of dollars worth of funds, not for new weaponry, but for innovative minds. And these minds literally decided to put their head up in the clouds.

The lone cloud parked itself high above the base. It looked so distant, yet looming. You knew it was thinking. When you looked up at it you wondered if your supposed reality was a tug-o-war between your own dream and the dream of the machine.  The brains at the Department of Defense research facilities dubbed it EPAC or Encrypted Persistent Airship Cloud.

When the public thinks of airships, they think of big burning crashing oh-the-humanity German zeppelins. If you rubbed your gym-socked feet against the carpet and touched the thing you would hear the “ka” and the “boom” walk hand in hand under the flames.

Airship design and engineering has evolved since your great grandma’s flapper days; in this case you didn’t have to worry about any souls lost on the ship because EPAC is unmanned. Controlled by some twenty-somethings in Nevada who had probably gotten their start in operating multi-million dollar aircraft on their Xbox 360. From the pictures Meyer had seen, they hardly had to leave their mom’s basement couch to operate EPAC. In fact, one of the pilots navigated the mechanical cloud with an Xbox controller.

Our parents tried to tell us those damn video games would get us nowhere. Now recruitment offices scouted new warfighters partly based on how many points a prospective recruit had racked up playing the Halo series on the Xbox Live network. Past gaming data starting at a time when it was still awkward to put your hands around the cute blond at the school dance. Courtesy of corporations that never disposed of years worth of data. And what was the need? Data storage was cheap. Cheaper than oil is these days. You could store mountains worth of data for peanuts.

The problem with all this data was never the storage.  Just because you had petabytes worth of data about your target demographic, it didn’t mean you knew what the hell to do with it or what the data even meant.  It wasn’t until the data was processed, organized, and interpreted that it actually became useful. Useful to a point where it separated your problems in real time before your eyes and placed them in cute little Tupperware containers for further inspection by the brains wearing boots.

This airship was built on imagination meeting application. It stood almost motionless, lofty, dreamy, it tried to fool you. At a high enough altitude where shooting projectiles at it with most conventional weapons would be pointless. Massive enough, where some will ogle at it, attempt to touch it like cats and yarn. EPAC housed an impressive array of sensors, communication devices, and parallel processing units inside its blank white hull. A supercomputer onboard that might convince you that it could learn. Maybe even think like you do.  But EPAC’s supercomputer doesn’t think like you do. It does better, but has a different purpose. By no means did it replace the need for the intelligence operative, it worked with her, synced with her. Defense engineers synced every piece of equipment with a sensor of some sort to the cloud. Drones, MRAPs, mobile phones, battlechips, packbots, even the cameras mounted on a soldier’s helmet; EPAC inhaled the torrent of sensor data served by the darknet, an encrypted network of information flow facilitated by the airship.

The influx of data from the Iraq War was like no other in history, and DoD jumped on the mountain and fielded its best and brightest to climb it, contemplate it, and build powerful clouds that could rain down bytes to consume the mountain.  No longer an obstacle, but an ally to the warfighter.  Well, at least that’s the idea.

EPAC is an idea. An idea conceived in the humility of those willing to learn from the past, and use technology to soak up the sea of knowledge that the past and present battlefield contains. Warfighters on the field weren’t quite ready for the torrential rain of information the persistent cloud would unleash. Specialist Ethan Meyer looks down at his blinking mobile phone, a reminder that the syncronization with EPAC would begin in fifteen minutes. Meyer thought he just heard thunder in the mostly cloudless sky.

20100901

Progeny of Sol: Act I - Screenplay

 Progeny of Sol: Act I

Written by Andrew Samuels



SOUND OF A VIOLIN, resonating, and fading out.

THE NIGHT SKY, comes into being from blackness, revealing a star studded sky with twin moons.

JASON (V.O.)
Looks clear tonight. So are we on?

Camera pans down, away from the night sky, onto the barren rocky countryside, looking over a cliff.

CUT TO:
EXT. MOUNTAINOUS CLIFFSIDE - NIGHT

Jason Canis, a short, stocky, male with buzzed hair. Early twenties in age. Still very young, and hopeful. Heads Up Display (HUD) goggles rest on his forehead. He has the demeanor of the most curious toddler. Ready for the next adventure.

Jason finishes peering up at the night sky, looks over at Kristen, not quite sure if she heard him.

Kristen Oort, comparatively tall, slim build, long dark hair, and cosmetically tan skin. At age 21, she, like Jason, is just beginning her life. Curious, yet very focused on finding an answer.

Kristen, sitting Indian style in the dusty terrain, never looks up at Jason to respond, her eyes fixed on the pod that bore the weight of the telescope.

KRISTEN
Mmhmm...Geez, how do you fix this sun-forsaken thing? Oh, never mind, got it. Wait, what were you saying? Oh, yeah, definitely. The others should be on their way.

A LOW HUM and slight annoying whine with the sound of crackling pebbles and rocks increasing from behind, bright xenon light infiltrates the position of Jason and Kristen's setup.

BRI
Hi-ya, fellas!

Bri Sagan, a short, dirty blond haired girl in her late teens, steps off her electric unicycle and powers it off. The low hum disappears immediately, but the annoying whine lingered until the gyroscope in her unicycle stopped spinning.
Jason, with an even more curious look on his face, approaches Bri and her unicycle with astonishment.

JASON
What? Where the hell did you get one of those?

Jason nodded towards the electric unicycle as Bri kicked the stands in place. She beamed ear to ear at Jason and Kristen.

Kristen, finally looks away from the telescope, and peers at Bri with half envy and half amazement.

KRISTEN
Gotta be one of the perks of being the Colony Chief of Engineering's daughter.

BRI
(chuckling and kicking the dirt and pebbles with her boots)
Well...actually, I'm just sort of borrowing it from transport storage for a little while. Haven't even had the chance to ask dear old Dad if he had any stellar rides to spare.

JASON
(pointing a finger up)
Ah, so you stole it. Might I inquire how exactly?

Bri anticipated this response and had an excellent bullshit rebuttal ready.

BRI
Long story buddy, but you know, stealing is a bit harsh of a word. I am merely taking it upon myself as this unicycle's new custodian. Besides, how's a little gal like me supposed to lug all of this equipment over here on foot?

Kristen, now relieved to have fixed the telescope pod, interjected into the conversation with her hands on her hips.

KRISTEN
You just wait till the Colony Council finds out. They just might shut our little science project down for breaking the rules. Did you think of that missy?

Bri scoffed, and unpacked her computing equipment out of the titanium box cabled to the back of her unicycle.
BRI
Hah, well friends, this is science and in science, rules are meant to be broken.  The Council is full of old farts in their 400s who still remember what it's like to power things with dead plants and animals.  Once we find Sol, the Council will have no choice but to commend us. We'll be the heroes of the colony.

JASON
Yes! What are we waiting for? Let's get started already!

KRISTEN
I hope your right Bri, but the truth is we haven't found Sol, and hardly even know where to start.  Not even the Elders know where mankind's first solar system was and two of them have been alive for almost 600 years.

BRI
That's why Dr. Luna has agreed to help us. He can't make it tonight, but some of our other classmates should be...ah speak of the devils!
CUT TO
ACROSS the mountains where you can see distant lights from the Colony. Three other dark silhouettes, young people, wielding flash lamps walked side by side as they made their way toward the project site.

JASON
(shouting)
Nice of you to join us! Do you have the records?

DON
(Shouting back)
Of course, we weren't going to leave ya hanging.  Even though we are way past Level 1 curfew.

Don, Rachel, and Mike were much younger colony members in their preteens. Virtually newborns for Colony age standards.

Before Bri could make a smart remark about it being past their bedtime, Don handed the fingernail sized data chip to Bri.

BRI
    Stellar, lets boot this baby up.

Bri placed the data chip into her navicomputer and plugged in her HUD goggles to view the display screen.  The other group members joined in and connected their respective goggles to see exactly what Bri was looking at.

A Red light flashed on the visual display, indicating that the navicomputer was in connection with Colony's main artificial intelligence whom curiously named itself Mr. Giggle Pants.

MR. GIGGLE PANTS
Let me know if you will be needing any assistance.

BRI
Okay, thanks Giggle. Well, I guess I do have a question, based on the data I just put into my navicomputer, can you tell me a bit of what we know about Sol?

It was hardly even a second of crunching from the navicomputer and Mr. Giggle Pants had a response.

MR. GIGGLE PANTS
Sol is the hypothetical sun of the ancestors of all humanity and...

A long pause and silence, dotted with a few clicks from the navicomputer as it blinked its tiny lights happily.

BRI
(looking anticipating)
And? And what?

MR. GIGGLE PANTS
Apologies, all further non-fiction historical records and scientific data on Sol has been lost or corrupted. Please ask another question.

A RUSHING sound of wind blew past, and dust devils appeared in the clearing below the cliff.

Closeup of Kristen's face, she bites her lower lip with deep thought, and gets into the hunt for knowledge.

KRISTEN
Giggle, can you find information present in this data chip on fables, legends, or children's stories about Sol or mankind's beginning?


MR. GIGGLE PANTS
One-hundred and forty three items found. Suggestions: “When We First Set Sail”, “Homeworld”, “Little Johnny's Journey to the Outer Rim”, “Starry Night in Woodruff's Grove” “La Casa del Sol”, “Everybody Poops”

JASON
Hold on Giggle, why is “Everybody Poops” one of your suggestions? Isn't it relatively popular? I recall one the Colony's droid nannies reading it to me when I was three.

MR. GIGGLE PANTS
I thought it might be appropriate reading for you youngsters. But seriously, this is one of the most ancient of children's literature on Colony record.

BRI
But what does it have to do with Sol?

MR. GIGGLE PANTS
It is believed by some historians of legends to be written on the home planet of human ancestors in the Sol system.

The group goes silent for a moment. Their eyes and ears perk up at this new knowledge.

Bri smiled widely from ear to ear.

The excited young astronomers boot up the navigation system on the telescope and pour over the data  sorted by Mr. Giggle Pants.

BRI
(whispering under her breath)
We're going to find it. I know it.

CAMERA pans up, back to the starry night sky and twin moons, everything fades away into blackness.

20100830

Physics Demo: Non-Newtonian Fluids like Cornstarch + Water aka Oobleck

What's cool about Non-Newtonian fluids like Cornstarch + Water, a.k.a. Oobleck, is the fact that it has a hard time deciding what physical state it wants to be in; a liquid or a solid. It has a lot to do with the molecular bonds as I've learned in my attendance of Eastern Michigan University's chemistry lectures. The molecular bonds are stronger in Oobleck than your typical liquid, yet weaker than your typical solid.  Hence the puzzling nature of this Non-Newtonian fluid with an identity crisis. It doesn't know what it wants to be!

Here is a video I recorded of myself and my friends at All Hands Active (AHA!) demonstrating the effects of Oobleck when you place the substance on a vibrating speaker.  We were also advertising our organization on the streets of Ann Arbor, MI, and we drew in quite a crowd who were dazzled by the spectacle.

Behold the power of physics.

Electronic Prototyping with the Arduino Microcontroller

Electricity is beautiful and powerful physical effect. We can use computers and programming to tame it. Programming is one of my favorite things to do. Combining programming and physics (specifically electricity) makes for an even more exciting challenge for me! In the following Youtube videos, I demonstrate some simple but fun examples of what you can do with an Arduino microcontroller and some electronic prototyping equipment. My personal project was to learn how electricity works and how to manipulate it with a few simple tools.

Arduino is an open source microcontroller that makes electronic prototyping easier, yet gives you many more capabilities thanks to the fact that you can program the microcontroller and tell it what to do.  The software I wrote to make these wasn't more than a few lines, but it was neat to know what was going on thanks to my previous experience in web programming.

The first simple Arduino experiment I made was an LED activated by a pushbutton.


The second is an LED activated by a light sensor. Way cool, and the Arduino code behind it was fun to write.

20100826

Dynamic, Database Driven Websites with PHP + MySQL

Face it. Most websites are a bit boring in functionality. Not necessarily a bad thing in most cases, but sometimes you need a bit more power to make a website function beyond what you could do if you were to develop each and every page manually. One by one.

What if I told you I could almost instantly make 200,000+ unique pages on a website as soon as I wrote the software to do it, and uploaded it to my web server? That is exactly what I did with my two sites here, SingleBlackDating, and FileFin.

Unfortunately, the sites no longer exist on the web anymore since I've stopped my internet company and started on my career path to be an engineer and physicist. Luckily, I still have the software and databases behind the two websites, and some old screenshots of one them thanks to the Web Archive.

SingleBlackDating.com
This was notably a dating site geared toward the African-American demographic.  There are a lot of African-Americans all over the 50 States of the US, so how do I make custom web pages based on state, county, city, and ZIP code? Why, with an enormous database provided by the Census Bureau, of course!  Using PHP and MySQL database software, I was able to construct a dynamic website that made pages on the fly based on information I fed the site from a assortment of databases of information.  The website used the State/County/City/ZIP database to break the website down into over 200,000+ pages, all based on a unique US city or ZIP code listed. Each city page had a short blurb advertising the dating service, and pulled even more information from a database of restaurants, and even recommended a restaurant for a date.  The site isn't viewable anymore, but you can download the software and databases that ran it.
Download SingleBlackDating.com

FileFin.com
A site for free software developers to promote their stuff. Not your typical site. Using a bit of imagination you can actually make your websites do work for you.  In order to promote SingleBlackDating.com I constructed FileFin.com, a dynamic databases driven site with PHP, MySQL, and a freeware package called PadKit. How it worked was when a software developer found my site, he/she was looking to list their software in my database of free software for all of the web to see.  The site was free to use, but there was a catch. The software developer had to make a link on their website promoting my SingleBlackDating.com site. On the free software submission page I had PHP and MySQL automatically select a unique web page from the 200,000+ for the developer to link to on his/her site.  The problem was, how was I sure that the software developer actually did link back?  Well, thanks to PHP programming I wrote a little piece of code that checked to make sure a link to my site was found before the submission went through. If there was no link back, the software developer could not link to my site.  All of this was automatic, and I never had to maintain the site. Last I checked on FileFin, there were 11784 software submissions.
Download FileFin.com
Here are some screenshots of the site I found on the Web Archive:

Augmented Browsing with Ruby Programming Language + Watir Module

Some things on the world wide web cannot be automated easily. The PHP/cURL combination is typically the most convenient and controllable way of automating the web and mimicking a normal web user, but there are roadblocks and obstacles along the way that can prevent you from using that particular type of programming easily.

When I say obstacles, I mean when web developers use sophisticated Javascript or AJAX in their web pages. The cURL library doesn't like this very much, and it is a bit more difficult to read the HTTP protocols necessary to send back to the web server the website is hosted on. In comes augmented Browsing with Ruby/Watir!

What is Ruby?
Ruby is an object-oriented programming language with a bit more power than PHP (a scripting programming language), although arguably a different aim in intentions for web purposes. Ruby nevertheless is growing in popularity amongst web developers, but is still the minority compared to PHP.

What is Watir?
Watir is an automated web browsing testing toolkit. It uses a technique called augmented browsing that allows it to literally and visually drive the Internet Explorer browser on your desktop computer programmatically. Instead of simulating a browser, like cURL, Watir steers the actual browser on your computer with Ruby's built-in OLE and COM support.


Ruby + Watir = Using your internet browser with no hands
Because you are actually controlling a real browser like Internet Explorer, obstacles in websites like funky Javascript and flashy AJAX are much easier to tackle. The problem is augmented browsing with Ruby/Watir is slow as molasses in comparison to PHP/cURL.

FBPoster
This program automated Facebook and didn't have any practical application other than to see how Watir worked, and if I could do it. It could log into your Facebook account, use the search box to look for Facebook groups related to a keyword, then it would post a custom comment of your choice in that group. Only you didn't do it, the software did!
Download FBPoster

GGrouper
Basically allowed you to log into your Google account, and if you have a Google Group set up, you can automatically make new pages in the group based on a set of keywords you give it in a text file.
Download GGrouper

VeohBlack
A bit more complicated than the first two software, VeohBlack made it easy to register accounts at the Veoh video site. It could then use the accounts to search for particular types of videos and make comments on them. It could even click to the next page of videos if you wanted.
Download VeohBlack

Web Automation with the PHP Programming Language and cURL Module

Here is a showcase of web automation software I had written myself using the programming language PHP and a browser emulation module called cURL. If you want to take a look at the code, feel free to download it.

What is PHP?
Also known as Hypertext Preprocessor, PHP is a very popular scripting language mainly used among web developers to produce dynamic web pages. Pages that can load quickly, from databases of information, and are interactive. Unlike a typical web page using just markup languages like HTML and CSS.

What is cURL?
cURL is a module or library you can install on PHP that lets you transfer information via web protocols, such as HTTP. Think of cURL as a browser, kind of like Internet Explorer or Firefox. Only instead of you, the internet user, viewing the web pages with your eyes and clicking around navigating with your mouse, cURL can help read what a website is saying, and can spit back information in response. Like a browser, it's a way for two computers to talk to each other over the internet.

PHP + cURL = Powerful combination that mimics a human using a web browser
Using these two powerful pieces of software, I have written and developed my own software scripts that can mimic your typical web user as if it were a person visiting the site.

Twtr
This software program revolves around Twitter, the popular social networking website. Twtr uses PHP/cURL to access Twitter's API, a REST oriented API given out freely to developers to make apps and games for the site. Twtr uses the login information for all the Twitter accounts you give it from a text file, grabs a proxy for each one, and then automatically updates your Twitter account automatically. So you can say whatever you want, automatically, without even being at your computer. You can set it to post once a week, everyday, or even every minute.
Download Twtr

WPBlogr
Perhaps my most sophisticated software in this PHP/cURL portfolio. WPBlogr allows you to automatically post to Wordpress blogs that you control using XML-RPC which is the direct predecessor to the increasingly popular SOAP web services. Some bloggers have multiple blogs, and seriously, who wants to spend time logging into each one of them one by one and posting? In a few text or CSV files, list the blog URLs, the login credentials, and the topics you want to write about, then WPBlogr takes it from there. The software logs into each blog, then writes and publishes a post about each topic you list. The coolest part about it was that, if you wanted, it could automatically pull a fair use amount of text from Google BlogSearch based on each keyword you gave it, shuffle sentences and words, and still make the paragraph readable. You could easily set it to how many sentences you wanted to output per post. All with the magic of PHP programming.
Download WPBlogr


Notebookr
Sometimes setting up a multitude of quick web pages was necessary in my line of work. Google used to provide a service called Google Notebook (no longer in development), which basically allowed you to create little note pages and share them on the web. Notebookr had the ability to log into Google Notebook with your account, and create multiple notebook pages based on a list of keywords you give it in a text file. Probably the coolest thing about this program was it automatically scoured the web for text related to your keywords, scooped it up and wrote a little paragraph about your subject.
Download Notebookr

Rubylinkr
This is a simple little script that used the URL shortener service RubyURL. You see people using URL shorteners like Bit.Ly on Twitter all the time.  But instead of entering them in manually, one by one, my programmed script, Rubylinkr takes a list of links that you give it, runs them through RubyURL, and outputs all the nice shortened URLs in a neat little text file, ready for action.
Download Rubylinkr

20100303

Hello World!

I kind of miss having a place to record my thoughts. While facebook is fun, it's not really adequate for expressing some of my more artistic and weighty expressions. Think of this blog as an ideaspace. Let's explore the cosmos.