The LEGO Catapult

Everyone takes breaks at work. Some people take smoke breaks. Others go on a walk around the building. Me? I play with LEGOs. I figure if people can take a 10-minute smoke break every couple hours, I can certainly take a 10-minute LEGO break. And what happens when you give three engineers a bucket of LEGO bricks and a couple days of 10-minute LEGO breaks? You get the LEGO Catapult.

This is a functioning catapult built entirely out of LEGO bricks. The only “foreign” objects included in the build are rubberbands, which gives the catapult its power. The catapult shown is actually the second catapult we built. The first catapult kind of just happened as we casually played with the bricks. Once of said, “We got any rubberbands,” and a prototype catapult up and working.

While our first model was great and it worked, it lacked a few things. First was power. The prototype had a good arc shot but it used several standard-sized rubberbands wrapped in an odd fashion that lent to breaking bands and flying bricks. The trigger mechanism was also extremely weak. After every shot we had to carefully put the trigger back in place to keep the launch arm down while we loaded up our projectile.

The current model we really thought about what would make a good design that would be stable and provide for maximum power. The catapult was built with your generic LEGO bricks for the housing and limited use of Technics LEGO bricks to achieve rotation bricks and axles.

[youtube]UQTHY0FFmJU[/youtube]

The “engine” uses two .25-inch rubberbands. The launch arm has two tire hubs at the end that the rubberbands go around. Another hub is lower and near the back of the housing, the bands go over this hub and then around a third hub that is near the bottom of the housing and right below the hubs on the arm. The second hub is adjustable, so if we want more or less power we can move it, but during testing we found the distance between brick holes made the stretch too much – in that it would pull the bricks right off the housing – or not enough power.

The new trigger mechanism is a LEGO door frame (from the old LEGO sets) attached to hinged bricks. One bricked tire axle is used keep the trigger rubberband from rubbing against the hard edge of a normal block. That rubberband is stretched just barely around a stack of bricks so that when the trigger is pulled back to release the arm, it is immediately pulled back into place ready to be cocked again. On top of the trigger is a roof brick that lines up with a hull brick under the end of the arm. This way when you push the arm down the two pieces slide against each other and the end of the arm is held by the top of the door frame.

The arm itself had one major problem – the brick nubs! The nubs would catch on various objects we launched, so we needed a smooth launch pad. We dug out all the novelty plates and put them on the end of the arm (hence all the arrows in the pictures). This allows any projectile to slide off as it is launched giving it a nice arc.

Our standard for shot testing was a regulation LEGO man with a helmet. Afterall, when you’re riding a catapult you gotta think safety first. However, a LEGO guy equipped with a helmet and backpack made a much better weight that gave the man more arc and distance.

The trick to a good shot is the weight of the object and its position on the launch arm. Putting the object near the bottom of the launch arm made for a straighter shot while putting it at the end of the arm gave it more arc and height.

The catapult is built on the dividing wall that separates my workspace from that of my co-workers. The wall is roughly 4-inches wide and the catapult itself is a about a foot long, give or take. The catapult is pointed towards the wall in order office that has our whiteboard on it. So to give us a little more motivation for the project, we taped styrofoam cups to the wall as targets.

The catapult is pretty hefty and can launch a variety of objects. Beyond your LEGO men, we regularly launch MUSCLE Men, Hot Wheels cars, and plastic army men. We once launched a peanut and the peanut actually cracked when it hit the wall. We also took an old mouse and took out the ball and shaved off the rubber coating. At the heart of a mouse ball is a solid metal ball, we guess steel or something. It’s pretty heavy but the catapult can handle it, although it doesn’t launch it nearly as far.

All in all, we’re quite proud of the LEGO Catapult and now the activity of catapulting fills in our 10-minute play breaks. We’re not sure how long we’ll keep the catapult around. It’s serving us quite well right now, but we’ll certainly think up something else to build…and hopefully it can shoot something too!

Personally, I was amazed what four rubberbands can do for some LEGOs. If only I had thought about it when I was little. Man, I could have built a ton of stuff that actually had some functionality.

Posted in All

The obvious API

The application programming interface, or API, is what makes any software usable by other programmers. Companies like Google and Yahoo all make APIs that they give out for free to the public so people can make new software programs that use the companies services. They do this all so their name stays fresh in people’s minds and so when the next “hot” web application is released it will be using their base product.

APIs are literally the commands programmers have to type in to access the vendor’s software. For example, lets say you want to display a marker on a Google map. The API call for that action might be named displayMapMarker() – the programmers have to type this in their own application to do what they want.

HooksAs a developer that makes inhouse software, I never really considered what I do making APIs, but after reading some articles and talking to some people at work, it turns out I am creating APIs. But instead of making APIs for public consumption, I’m making them for myself.

Now you might think, as I did, with only being a one-man department I wouldn’t need to work hard at creating a generic API for anything. Afterall, if I made it and I’m the only one that’s going to use it, I know what to do, right? This is true…for about two months…or however long it takes to get the project done. After that, much like college, I flush the toilet in my head and all the stuff I needed to know for the time being is gone. Of course the downside to this method is when you have to go back to your project, because guess what, you forgot why you did what you did!

For this fact alone, it is important that you create a nice generic API for your own applications. You need to create API calls that describe what the call does so that you don’t really have to think too hard about what you’re going to get when you make that call.
This common sense didn’t hit me until recently when I had to go around updating a lot of old software. I had to re-learn everything about the programs and wasted a lot of time. I had the mentality of, “these are functions that no one will see so I can name them anything I want and it really doesn’t make a difference.” Wrong.

It’s as simple as this: Just describe what the call does. Literally.
If the call calculates the sum of accounts, your call should be called sumAccounts(). Or if you have a call that gives you a user’s e-mail address, it can be called getUserEmail().

I have gotten into the habit of going just a wee bit further by making the description include the primary parameter the call needs to work properly. So if the function that gets the user’s e-mail address requires you give it an ID number to work, then the call should be named getUserEmailById(). Up front this tells me what the call needs so I don’t even have to read the docs or notes or anything. Yay!
The amount of effort you save by naming your API calls this way is almost unmeasurable. You don’t need to get creative with your API calls. And don’t get all nerdy and come up with “cool” names for your API calls that sound good and look good to you, but really don’t mean anything.

By following this guideline, if other programmers ever do need to use your API the simple naming is already done! Help yourself and help others without any extra effort.

Why I use Firefox

At work and even at home I get beat up quite a bit for using the Firefox web browser. I know Firefox (FF) only is only used by about 10% of the web surfing population and that most of the world – especially the corporate world – runs on Internet Explorer. My work is no different, we’re standardized on Internet Explorer (IE). But that doesn’t stop me from using Firefox because Firefox is a tool.

FirefoxPrompted by a recent quick article over at Joel, I feel the need to share my uses of Firefox. I started using Firefox for one real reason – tabbed browsing. This was well before I learned about extensions and other add-ons that make Firefox extremely valuable. I just liked having tabs to surf multiple pages at once instead of Alt+Tab-ing between open IE windows…but then I found extensions.

It is because of the extensions that probably continue to use Firefox as my regular browser – because the extensions turn Firefox into a invaluable resource for a web developer like myself.

The first extension is the Web Developer toolbar. As Joel says, I can’t imagine doing development without this toolbar. It has so many helpful things that give you mounds of data about the web page you’re on…or the web page I am creating. You can use to resize the window, switch between device views, and get image and color information in a nice report-style page. By far, my #1 extension for Firefox.

The other extension that I have found to be critical to development is Firebug. This subtle add-on lets you see what your browser is doing on any web page. This includes inspecting the DOM and, most importantly, see what is going on in Ajax world. You can easily see the Ajax calls being made by your application so you know what variables have been sent and what data has been returned. Without this extension I would still be using your standard issue alert() function. No more!

As a designer, I am always looking at web pages to “borrow” ideas and methods. One of the biggest aspects of design is color. Beyond a good layout, color is the other thing that catches my eye first and foremost. Then, naturally, I go, “Wow, I love that color. What is it?” Thankfully, ColorZilla lets me take an eyedropper and get the color just like that. It’s as easy as copy-and-paste and just makes design life a heck of a lot easier.

Another handy extension that I recently just discovered is the IE Tab that Joel pimps. Since IE is so prominent around the office, I need to constantly check Ie for design and functionality of my software. IE Tab lets you switch any tabbed web page to use IE so you can see how it looks and functions. Nice.

As you can see, when you pimp out Firefox it’s not just a window to the web, it’s a feedback system that allows me to do my job better. Is my using Firefox some anti-Microsoft protest? No. I don’t mind Microsoft – they make good stuff, especially when you put it all together. But even sans bling, Firefox is a great little browser.

Organize before you organize

In light of some recent meetings, it seems a lot of people think that tools and programs can organize information for them. While tools can help in organizing information for quick reference, the first step has to be organizing the information itself – or auditing.

If you have an ass load of data – files, pictures, whatever – the first step is auditing that information to find out what types of information you have. Kind of like cleaning out the garage…you have a pile for things you want to keep, things you want to sell, and things you can throw away. You can create as many piles as you need, each relating to the type of stuff you are trying to organize.

The problem with our meetings is that the group is focusing on what we should use to organize our data before we even figure out what information we need to categorize.

And on that topic, do it often – audit your information regularly. I go through a simple process about every few weeks that reorganizes my files and gets them organized in a way that benefits me at the time. Face it, what works one day may not work the next – so you fix it. You don’t accept the “that’s the way it is” excuse and change.

CDsThe amount data we each make on a weekly, even daily basis is incredible. Almost 96% of that data is unimportant less than 10 days later. So there are two solutions this situation, a) just delete it once you don’t need it, or b) you have archive and organize it all frequently so you don’t get lost in it.

I find it best to put all my files into a single folder and then sort that folder by date. Any files that I have changed within the past 30-days or so, I put into another folder, waiting to be categorized. I then go through the left over files and determine which ones are “key” files – those that are ultra-important reference files, like password lists or account numbers. Put those into another folder labeled “key”. Then what’s left over either dump into an “archive” folder or burn on to CD and file it away.

Now there are two folders: recent and key folders. Once you get to this point you can start thinking about what methods are best for organizing your files. Whether you use normal folders or some other program.

Once you figure out what you’re organizing, organization is easy.

The crap of meetings

Everyone knows that meetings rarely accomplish anything. I can count the number of meetings that were actually beneficial on one hand. But a recent string of meetings has put me over the edge.

If there’s one thing that makes a meeting truely worthless is the lack of a leader. There must be someone to run the meeting. A recent string of meetings on the topic of version control and developer documentation found myself and others in a room with absolutely no agenda…and no leader.

MeetingThere was one guy that organized the meeting and reserved the proper conference room, but I don’t consider him the leader because his only role was saying, “Okay, let’s start. Does anyone have anything to say?”

The meeting was an open forum style meeting, which is fine and can often work, but only when people actually want to participate and talk. Myself…I like to talk so it wasn’t any big deal for me to start spouting off my thoughts on the topic, but after my rambling everyone just did a collective shrug-sigh and say quietly. Apparently they didn’t have any opinion or just didn’t care – pick one.

In essence, there was no decision-maker in the bunch. Just a group of people that will be told what to do. But as a sign of good faith, the bosses gave us the option of democratic committee over the issue. In this case, not a good thing.

Regardless, every meeting needs someone that can run the meeting. Someone that can engage everyone by getting out their thoughts. That person should also have an agenda – questions to discuss, scenarios to solve, or at least something that people can learn.

So there’s the biggest problem with the meeting. The second is something a little different.

The Price is Right

I’ve gotten a lot of flack because I like The Price is Right. But as an article over at SVN sums up nicely, The Price is Right is the ultimate game show because it is so clear that it appeals to everyone.

The Price is Right should be held in the highest regard because of its accomplishment to be such a versitile show. I challenge anyone else to name a game show – or any show – that has broader appeal and understandability than TPIR.

Right when I thought TPIR is just another game show, someone points out how the show can relate to my job! Now if only I can relate LEGOs to my job…

The books I’ve read

I am not a reader. I don’t really enjoy reading all that much. Blame on my parents, blame it on my generation, blame it on video games – your pick, but for every book I’ve read I have seen probably 50 movies and television shows. I doubt I’m alone on this one. But occasionally I do pick up a book and read it cover to cover.

BooksOK, not always cover to cover. Sometimes cover to point of suck. Eitherway, I crack it with intensions of reading it. My books of choice are usually nerd books that relate to technology, since that’s what I do and that’s what I know. My other paperback vice is design books. I just like looking at these because it gives me tons of ideas to copy, borrow, steal, and reuse.

I wouldn’t call my reading entertainment. Very few of the books I read are fiction. Not that doesn’t mean I’m not entertained by a book, but I typically don’t pick up a book when I’m bored and need to kill time.

Anyway, thought I might list some of the books I’ve read and actually enjoyed (or learned something). I’ve made an Amazon list that has the books in no particular order. I recommend all of them.

Books I’ve read

CAPA Summer movies

So, when you think of a movie in a movie theater you think “blockbuster” “must see” “pile of crap”. The current day movie is what comes to mind. Tickets are $8 and rising and snacks require a signature in blood. Now take a step back. Think of a simpler time when movies where not just something you went to when you were bored or brainwashed but a true event. That’s what the CAPA summer movie series is all about.

The lovely wife and I received two free tickets to the CAPA movie series from Time Warner because they felt bad about their customer service sucking. Not being one to turn down free I wandered over to CAPA’s site and saw that they were playing “Roman Holiday”. While in no means a current hit it’s a great movie from an era of Hollywood that had original ideas. Toss in the fact that the movie is shown in the Ohio Theater (and the tickets are free) makes it an ideal Sunday afternoon outing.

Ohio TheatreDriving on down to the Ohio Theater we parked at City Center Mall for a dollar and walked through the mall to arrive 15 minutes early. As we turned the corner we saw on the marquee the title and stars of our chosen movie surrounded by the mass of light bulbs that only a theater built 1920′s can handle. Out front was the old fashioned ticket booth with only one window (gasp). Inside were ushers on every door handing out a program. A program for a movie?!?!? Inside the theater proper were the sounds of the theater organ. I don’t think you can ever fully appreciate what movie going used to be unless you have heard a theater organ. After a very enjoyable 15 minutes of “mood music” the movie promptly started at 2:00 without any ads or previews. An hour into our film came the intermission.

Now intermission is a thing that has passed into urban legend and myth. Everyone knows there used to be such a thing but you’ve never seen one. This, my friends was a proper intermission complete with another round of organ music. In the lounge area were your standard concessions (minus actual freshly popped popcorn. Theirs was the fancy kind in the single serving bag) plus the addition of wines and other such adult beverages. Exactly 15 minutes later everyone was back in their seats for the conclusion.

Exactly 45 minutes later the film was done and we were treated to another rousing selection on the theater organ. All I can say is this is a movie done right. If you have never been to the CAPA Summer movie series you don’t know what you’re missing. With tickets normally $3.50 and snacks at reasonable theater prices you can’t beat the total movie package. Toss in the organ and the feel of a movie done right and you’ll be back for more.

-Lorkin-

Adventures in MySpace

For a web site that half the world is now using, MySpace is by far one of the worst designed and functioning places I’ve been in quite some time. Yes, I gave in and decided to join the crowd, and if 50 million people use it everyday I figured it must be super easy to use. Oof.

First off, sign-up didn’t work. I went through the registration and got the confirmation e-mail. When I clicked the confirmation link it asked me to log in – but it just kept delivering me to the home page – over and over and over…so I wasn’t sure if my account was created or not. I got no other e-mails saying one way or the other, nor was there any response from the web page.

However, then I went there last night and magically I could log in. Don’t know why. Still haven’t gotten any e-mail about it, but I was able to log in and browse around. First off, the design of my “home” page is awful. Ads everywhere and wee tiny little links that I have to update my profile and preferences. The biggest thing is my picture! Why do I need to see a big picture of myself first?

The other thing I found blastfully confusing is that the page I see when I log in is NOT the page everyone else sees. I was looking for links to add friends and where it tells about me – like I saw on others’ pages – but they weren’t there. Little did I know that the “View my Profile” link is the public page people see.

In most places on the internet, “Profile” means your personal information and details. It is not a synonym for “my home page” – stupid.

TPNow the design of my default page is totally lacking. Fonts are ugly and way, way too small. And again, the first thing people see is my photo. I know a picture is worth 1000 words, but it turns my photo into an advertisement, especially with the big ass ad at the top of the page.

Aside from being ugly and unusable, MySpace is incredibly slow. I mean dog slow. Waiting for pages to load and ads to load gives me enough time to wash my car and walk the dog. In fact, I went to my MySpace page when I started writing this article and now – about 4 minutes later – the page has still not loaded.
On top of slowness-due-to-ads, you have to wait for people’s theme song to load – which was totally unexpected and frustrating because the player is not visible when you visit a page. You have to search for it turn off the noise.

I would also think that the comments and discussion would be a big part of the personal pages, so they should be near the top. Alas, they are at the bottom of the page. I’m less interested in “who I’d like to meet” and would rather see what’s going on with the person. And with that, the blog is all wrong too – they’re just headlines! I started putting in a blog entry expecting all or part of the article to be on the page with the headline. But nay, you have click the “view more” link to read the entire thing. Wasteful and obnoxious.

I remember back when everyone had a “home page” where they put up photos of their pets and declared their love for Spider-man and Motley Crue — hell, I had one of those! But that move quickly died out because it was crude, hard to keep up, ugly and just not worth the time. It seems to be MySpace is taking everyone BACK to a time when everyone thought they could “do it” and succeed. This just proves that when you give the masses too much control it just ends up being a hidious mess.

Unfortunately, you can never underestimate the power of stupid people in a group. Thus, MySpace is raking in massive traffic and massive dollars. All we can do is sit back and hope this fad dies off soon — or if it doesn’t, let’s hope someone else (or even MySpace) takes some pride in their product and makes look and work better for everyone.

Jack or master?

`
Jack of all trades, master of none.Someone pretty smart probably said that a long time ago, and they’re right. If I was running a business, I would want more masters than jacks because masters would churn out higher quality stuff all at the same time. If you had a lot of jacks that might equal a handful of masters.At work we have three master developers – and I mean masters compared to jacks, not masters masters. Anyway, each of us is pretty specialized in what we know as far as platforms and languages. None of us really know how to do what the other one does.

KingThis situation puts the company in a tight spot because there are no backups for any of the developers. If I got hit by a truck full of whoopi cushions tomorrow they would be shit out of luck. Same goes for the other guys. However, each of us make very good quality products and get them done relatively quickly. We are each working on different products, so three products at the same time and each is turning out really well.

But a new CIO has a different idea. His big picture puts everyone picking in a single gold mine until it is empty. This gets the mine empty quickly, but what happens to the pile of stone and the pile of wood? Nothing. It sits there untouched until the gold is done.

This plan does not boost quality nor does it get things done quicker. First, everyone has to be cross-trained, which takes them out of their zone and makes quality suffer. This makes everyone unhappy because they are forced to stop working at their specialized craft. Also, projects that would have otherwise gotten done by either developer get pushed to the bottom of the priority list because everyone has to work on the same thing. No more multi-tasking.

I understand the big picture and sometimes that makes sense, like when everyone has multiple skills already. But when you have a group of people that are very specialized, putting them together as a team puts a lot on the line.

The next blog

Call it silly and stupid, but I had an idea and I just had to do it. It’s another blog. But since I’m not sure how much I will get into it after a while – it sounds good right now – I went the all-free route, Blogger.com. If I get into more, then I’ll consider a domain and so on…til then, it is sort of an experiment.

I’ve had the notion to write in detail about my experiences at work for a while. I debated to just write those thoughts here at The Toast, but I want to keep the Toast a little more relaxed. Here I can talk about work, the pets, the movies, whatever else…the new blog will be a more focused on specific nerd topics (hopefully) with less digression.

The new blog: The Intranet Platform

Why? Well…if you’re interested, you’ll just have to read it. Ha!

Why programming is an ideal job

I’ve been spouting my fondness of my job around here and elsewhere for quite some time. It’s no secret that I like my job. I like what I do and I enjoy doing it every day. Obviously some days are better than others, but overall I can’t complain too loudy.

A recent discussion about the Good Job Trap got Big G thinking about what his ideal job might be. Although he couldn’t nail it down to a single job, he has some requirements. And since I believe I have an ideal job, my job needs to meet those criteria:

1. I guess the biggest thing for me is I want to be able to get excited about whatever I’m doing.

While this is his #1 requirement, I will skip this for now because the rest of his criteria really tell the story about why programming is exciting…

2. I want the opportunity to be creative.

Art cowHaving been trained formally as an artist and being a rather artistic fellow for much of my life, I know what that kind of creative is. Art is fun but and you can make anything you want and not have to worry too much about the outcome. This is where programming beats art; you do have to worry about the outcome. And because you have a limited set of tools, you have to be creative in how to solve your problems. You also have to be creative in how you build things for the people that will eventually be using your program.

It doesn’t matter if you can’t make things pretty yourself (see #4) because that is a designer’s job. Programmers need to solve problems technically so the final product is stable, reliable, and supportable.

3. I enjoy solving problems. There is something quite satisfying about knowing that you just came up with a great solution that isn’t simply a hack.

Programming is all about solving problems. Through creativity you solve problems. A customer comes to you and says, I want a program that tracks and organizes our inventory of widgets. How do you do that? They don’t know + you don’t know = Problem that only you can solve.

For me, there are two problems to every situation: design and function. First I have to figure out how the program will look and work for the people using the program. After I do that, I have to figure out how to make all it all work as designed. Granted, the design member of your team should do this, but I have no such resource.

Duct tapeNow, you will have your hacks here and there, they are unavoidable. It doesn’t matter how well you plan, execute, and test, there will be someone somewhere that uses your program in a way you could never anticipate and naturally, that way will cause a problem or break your program. Apply hack here to get it fixed now then go back with a branch and add in a stable solution that makes sense.

4. I want to be part of a team. It doesn’t have to be a big team, but what good is it to really enjoy what you’re doing if you can’t really share that?

In theory, a software team should be an A-Team with people that are specialized in the aspects required to make a product. At my job I don’t have such a luxury directly, but I am part of a team of developers. We’re not necessarily working on the same thing at the same time, but we all collaborate to discuss problems and solutions.

As far as sharing the joy is concerned, even when you are a team of one (like me), that doesn’t mean you can’t share your happy life at work with others. Just ask my wife! She hears about my great job all the time (and hates it).

5. Quality. Whatever I do, I want other people to be impressed with the results.

OK, this requirement is deceiving. First off, since programming involves technology and computers, 90% of your customers will be impressed with the results just because they think computerizing is some sort of mystic art. Their inability to make a toolbar reappear in Word means when you give them something they asked for that works, they will almost instantly be impressed.

That’s just one edge of the sword. The other edge is to not let this acceptability by the customers to make you lazy. People will accept crappy technology because they know that crappy technology is better than no technology. This doesn’t give you a licsence to half-ass your work.

Go wherever you wantNow, take all these things and they add up to criteria #1 – excitement. Everyday I am able to go into my office and know there will be a new problem that I have to solve using limited resources and a lot of creativity. That’s exciting. Then once you reach your goal it turns out like you expected and like your customer expected, there’s more excitement. Yay you!

However, despite the fact that programming meets all the needs of Big G’s ideal job, the reason the match up for me is because I want to do it. I am passionate about making good products that help people. But any and every job can be made to fit those five things, but if you don’t honestly want to do the job, it doesn’t matter how many boxes you check off in the list.