by David LeMieux
I've made some minor tweaks to please. Now inputs use readline instead of stdin so that command line tab completion can work. Second, if you mistype an alias it will try and show you something that might match. This second part is super fleshed out, but if you leave out a work or a character it should at least show you something.
Halloween is my favorite holiday. Other holidays are also great, but Halloween is the one time a year I have an excuse to make something that would otherwise seem unnecessary. Usually I decorate my car for the annual Trunk or Treat. This year, however, my son wanted to dress as a robot with "lights and working gears." And so I felt compelled to grant his request.
Full costume, sans wearer
My wife and I decided to team up. I did most of the robot body and electronics and she did the other decorating and made some cool pants and other accessories.
The front ended up having two sets of LED lights. One set blinked at an interval, the other chased back and forth. A third set of lights, in the head/helmet, ran in a circle.
Two sets of lights and some decoration
Switch controlling the lights
A switch on the left side of the costume, reachable by my son, controlled the lights in the body.
The body and head were made with carboard boxes that we taped up and painted silver. I glued an extra poster-board panel on the front to give it a cleaner looking finish. On the bottom of the front panel were spinning gears. I made those out of high-density foam and connected them to a gear box and electric motor that were inside the box. I cut the gears from a template but since I don't have a band saw I cut them by hand and therefor they were quite inaccurate and would jam frequently. Fortunately since they were foam, any fingers or other things that got trapped in them were safe from harm.
Push button switch
The gears were switched on by a push button on the right side that my son could use whenever he wanted to add some flourish to his costume. While the lights could stay on as long as they were turned on, I made the gears operate with a push button that had to be held so that they wouldn't run all the time, draining the batteries. Also, the motor and gear box were kind of loud.
The wires were all just on the inside of the box.
Wires, taped in.
In the end, my son loved the costume and everyone we met while trick-or-treating seemed to enjoy it as well. Many houses we went to even claimed to be giving him extra candy just because the costume was so great.
There was a costume contest, but he lost to some very well made life-sized Star Wars Lego mini-figs (sorry, I don't have a picture.)
In High School a few friends and I had this idea that the local marching bands, which competed in marching competitions, should also have a friendly flag football game. Instead of asking the schools for permission we organized it ourselves and put homemade signs up sheets in the other schools' music rooms asking for band kids to sign up and contact us. We put our own names and contact information, mine on top.
We may have used some copy that didn't sit well with school faculty who found out. Something like "get revenge" or "beat down your opponent." The schools, not wanting any liability, put an end to it. During Wind Ensemble one morning in front of the whole class our music director called the three of us out by name and asked why we would even do such a thing. In that moment, caught off guard, I failed myself. I shrank. I didn't respond. I pointed to the other guys and essentially threw one of them under the bus.
I am ashamed. I was a coward.
I think about this event often. I am still friends with one but the other I haven't ever talked to since.
Sometimes when I think about what happened I can't decide if I've gotten any better at taking responsibility for my actions, especially in public settings. Had the director pulled us aside privately I may have done better, but in front of my peers I did something terrible. I lied and lost a friend.
CSS is a powerful language used to describe how a webpage should look. It has come a long way over the years and can be used to create seemingly limitless design. Except for when it can't.
I am not great at coding with CSS. I will admit right here that while I have an understanding of the language and the way it should work, I couldn't get by without having to look up every property on the web. I feel like I must not be approaching web design in the right way because I look at all the wonderfully designed websites in the world and it becomes apparent to me that CSS can do a lot and is used to great effect. Whenever I try to use it I bumble around and ultimately end up in a situation where nothing seems to work.
For example: vertical centering. I know there are ways to accomplish it but it always seems like I am implementing a work around and not letting the language do its thing. Why can't
vertical-align: middlejust work?
Fully Loaded Air Cannon
Nearly fourteen years ago I was in a musical performance group called "Thump." We were a bunch of high-school students ripping off, er, paying homage to Stomp and Blue Man Group. We played mostly percussive arrangements and put on, what I would call, a pretty rockin' stage show.
My job in the group was Lighting and Effects manager. I didn't play an instrument but I ran the lights, help make the tickets, ran the website, and handled other duties to help make the performance more professional. One project that I had for our second round of shows was to make an air cannon to shoot paper streamers across the audience during a particularly impactful part of the show. Air cannons of this sort were nothing new, but we didn't have a budget and so everything had to be made or acquired on the cheap.
I studied the basic mechanics of air cannons for a while. I consulted with local college and high-school physics professors to make sure my design was sound and would work. When I thought I had a good design I built a prototype. I used a small compressed air tank, some pipes, plumbing, an air gage, and a large aperture manual valve. I had wanted to use an electric valve but they were too expensive. After a few test runs I figured out the right way to pack it, how to add a paper cap at the end to ensure proper pressure distribution, and how to fire it on cue.
The night of the first performance things went better than expected and the air cannon effect provided an exclamation point to the already great performance. It went so well that as a group we decided we wanted two for the next night. The stage was pretty wide and the air cannon only effectively reached half of the audience. We wanted more coverage. Since I already had a working design I went out and bought all the same parts and put them together in the same way, or so I thought.
The second show was a few hours from staring and so I began to prepare the cannons. I packed them carefully with rolls of paper confetti. I checked the valves and all the connections. Then I asked a friend to fill them up with air to a predetermined pressure. I would have done it myself, but since I also ran the lights and other effects I needed to get those set up before people started filing in.
As the final number came we got the cannons in to position. We quickly reviewed firing them (I had been doing it on my own the night before, and this time I needed help) and we got the timing down with a non-firing practice. We armed the cannons and got in to position. The cue came, we turned the valves — and nothing.
"Well, at least they both failed together" I thought when I saw the absence of paper streamers, but I was wrong. The cannon on the far side, controlled by my friend, didn't fire. I forgot to tell him that the air gage was stuck and so when he was filling them he thought it already had air in it. My cannon had fired, but it took a few seconds for me to realize that I was left holding only half of it. The entire barrel, a long length of 3-inch PVC pipe filled with confetti rolls, had rocketed in to the audience much like an untied ballon when the end is let go. The barrel weighed anywhere from three to ten pounds. I instantly remembered I had failed to add the last application of PVC glue. The result was that when I opened the valve it filled the barrel with air then sent it in to the audience like a rocket. The barrel cleared a four foot pit wall, sailed over the aisle, and back many rows in to the audience. I never asked how many exactly, but given the angle of launch, it had to be at least ten.
Luckily it "landed" in the lap of a friend and not on the head of a stranger. Actually, it landed in his girlfriends lap and she was okay. I could have seriously injured or possibly killed someone.
I don't know what happened to those air cannons. They were at a group member's home for a bit. I left for college and so did everyone else. They were probably thrown away. Sometimes I wish I still had them though. Those kinds of projects, in high-school, college, and throughout my life have been key in forming my education and experience. I learned so much from almost killing someone with a failed air cannon than I wish everyone could have similar, if perhaps safer, experiences of their own.
Is "killing" hyperbole? Sure, but how I felt in that moment I was afraid I had. I imagined all the worst scenarios.
I am grateful I had the opportunities I had when I was younger and it is a personal dream of mine to be able to enable others to do so in the future.
I hereby decree has successfully migrated to better versions of core technology.
Code libraries and frameworks are great. They provide so much of the heavy lifting that developing with them becomes easy and predictable. In most cases, code libraries are a perfect remedy.
There are things that can be done to offset this, like using a CDN hosted version of the file. There are also tools that can help you manage what features you need and only package those in. Modernizr has an excellent example of this on their download page. Still, there are cases like those I see at work where a 20Kb library takes up too much space.
At Flite I help develop our ad platform. Users can make ads for desktop and mobile web use and then traffic them via different channels. The IAB has numerous guidelines about Internet advertising, and one of them is about file size. Some ads, for example, have to be under 40Kb, images and all. Since we develop a platform that allows users to create ads in a drag-and-drop interface and customize it will different components and features we are, in effect, serving small web applications as ads. But for all the functionality we allow, we can't tap in to the features provided in a library like Angular JS, for example, because the minified file size is nearly 30K on its own, leaving very little room for other assets.
I understand this is a problem that is perhaps unique to our circumstances at Flite. It still holds true that if we can, in most cases, make our file sizes smaller then sites will load faster and faster load times mean more satisfied users. So my question is always this: At what point does using a library become useful?
var item = document.getElementById("theItemIWant");
$('#myDiv').show().addClass('foo').append("Hello"); //And so on
$('#myDiv').width() //Returns a number
I made some minor updates to please lately and I figured I could talk about them here.
First, I fixed some bugs around the token replacement and input for aliases that use them. I also made it so that the template values could be provided inline with the initial command so that what was once:
> please do something
> input: _
> please do something -input 'foo'