Protected: Developers are not code monkeys

14 03 2012

This content is password protected. To view it please enter your password below:


Displaying a video lightbox in IE7

16 03 2011

Recently on a project at work, I had to implement an FLV player inside a lightbox that would be activated by clicking on an image. It worked perfectly in every browser, except for Internet Explorer 7 and 8. After three workdays and several hours from my coworkers, I finally made it work.

For this project, I used the Colorbox lightbox JQuery plugin. It is fairly mature and easy to implement. I also used SWFObject to replace the contents of a div with a particular idea with the SWF video player loaded with the appropriate content. All of this was built on top of WordPress in a custom-built theme.

In all other browsers, the video showed up and played perfectly. In IE, it simply showed a small gray box in the upper left corner of the lightbox. My implementation of Colorbox works by taking the inner HTML of a hidden div and moving it into Colorbox’s own dynamically generated div and displayed in a lightbox.

Originally, SWFObject would run on page load and then that would be moved into the Colorbox when the proper element was clicked. It turns out IE does not like this. The trick was to have SWFObject run only after the Colorbox was loaded and displayed. The SWFObject code should be included inside an inline function that will be called by Colorbox once the lightbox is displayed. Below is a simplified version of the code I used.

$('#video-lb').colorbox({width:"942px", height:"402px", inline:true, href:"#video-lb", onComplete:function(){
   function setVideo(vidpath) {
      var flashvars = {
         flv: vidpath,
         showvolume: 1,
         showtime: 1,
         showfullscreen: 1,
         showiconplay: 1,
         autoplay: 0,
         bgcolor: "000000"
      var params = { allowFullScreen: true };
      var attributes = {};
      swfobject.embedSWF("player.swf", "playerContainerDiv", "618", "350", "9.0.0","expressInstall.swf", flashvars, params, attributes);

Video lightboxes seem to be becoming more and more popular. IE support is still typically required for most development shops. Hopefully this will help someone who is trying to do something similar.

Development is not an assembly line

6 02 2011

I recently had a conversation with a coworker that set off a train of thought for me. Web development is not an assembly line. By development, I mean the entire process of bringing something from idea to real, shippable product. That includes concepting, design, coding, and launch.

I work as a PHP programmer. The way things are done where I work is that there is a kickoff meeting for each project. I meet with the site’s designer or designers, the account manager, and possibly my department head. We run through the wireframes and I am given a PSD to go off of. I go off to my little cave for a couple of weeks, only occasionally interacting with the designers.

What we have is essentially an assembly line. From client to designer to programmer. There is some back-and-forth, but not much, in my opinion. The assembly line can be a great tool, so long as you are creating nearly identical copies of the same product, which we certainly are not doing. We are creating custom-design, custom-coded websites. A greater degree of communication and flexibility is required to do our jobs more effectively.

I see this as a problem. While there is an open line of communication, the programmers and the designers do not interact with one another often enough. Then I saw a video from Apple showcasing AOL’s return to the Mac and its initial ventures on the iPhone. I saw a relatively large team meeting in a big room and collaborating in real life. There were not any physical barriers keeping them apart. They were all looking at the same screen and giving input.

I would like to see more collaboration at work. I think it would improve the company’s culture. I would like to get kicked off on a project, go off for a week and code. Then I could come back and meet with all the people I saw at the kickoff meeting and we could all chip in.

Maybe I am being a little naïve and unrealistic. I just feel that there is some room for improvement as far as communication between departments goes.

About to do something reckless and stupid

2 02 2011

The smart thing and the right thing are sometimes not the same thing. Should you do something simply because you can? I can do my job. It challenges me. I have learned a great deal from my job over the past seven months. Unfortunately, I do not get much satisfaction out of my work.

Stay hungry. Stay foolish.

I graduated from college about nine months ago and this is my first full-time, salaried job. I work as a web developer. I graduated with a degree in Informatics, which is an IT-related major. Before that, I was an Astronomy/Astrophysics major. Before that, a Geology major. Because my academic performance as an Astronomy major was not great, I decided I just wanted to graduate, so I found the easiest degree program I could, one that mildly interested me. I blasted right through, graduated, and got a job I could do but did not really care about.

This lack of interest or enthusiasm is no one’s fault but my own. I can get through each day, pushing sites out the door, but there is no fun in it for me. I like the people I work with. They are smart, nice, and knowledgable.

I did the smart thing. I got a steady job with good coworkers in a familiar city that is somewhat easy for me to execute. The question is did I do the right thing? I am considering doing something drastic and stupid but it might be the right thing for me to do. Let’s see if it acutally happens.

There are only 40 hours in the week

5 10 2010

For anyone who has gone to school while working full time, this post will be old news to you. For those who have not yet and are considering it, then listen up.

I recently attempted to work full time as a web developer while going to grad school full time for my master’s degree in Human-Computer Interaction. It ended badly. I was forced to drop of my classes so that I can actually do my job. By trying to do both work and school at the same time and full-time, I attempted too much at once. Clearly, it is important to limit what you attempt in one semester.

Many students, especially undergrads, work a part-time job. I did when I was an undergrad. I have a new theory about how to decide how much work and school you can handle. I think that it is pretty simple. Take the maximum number of hours you would be willing to work at a full-time job and take this as the maximum number of combined hours you would spend on work, school, and other things at the same time.

For example, I’m willing to work 40 hours per week at a full-time job, which is exactly what I am doing right now. Working 40 hours per week really takes all of my energy, so that is the safe maximum for me to attempt. When I try to mix work and school in the future, I will take into account my credit hours and the number of weekly hours required by my job. If I am taking 15 credit hours, then I shouldn’t try to work more than 25 hours per week. I need to work 30 hours per week, then I should not sign up for any more than 10 credit hours.

Learn from my failure. For most people, it is simply impossible to do both work and school full-time. Some people can handle it. I cannot.

Use Twitter from the Terminal (part 1)

10 03 2010

I know that this has been done to death, but I felt that I should persist in beating a deceased horse. When I am at work and don’t want it to be obvious that I am on Twitter, I use this nifty little Terminal trick that lets me send out tweets. On my laptop, I took it a step further and wrote a command-line Ruby script that does that and more.

Here are the basics of posting to Twitter through the Terminal. Somewhere on your computer, create a new shell script file. In my case, I will call it Type this into the new file:

curl -u username:password -d status="$1"
echo Message sent.

Now it is as simple as running a shell command with your message attached.

./ "Hey, I am screwing around at work!"

It is as simple as that. You can create shortcuts that make using this even easier. The most common thing I do when I write this script is to alter the .bash_profile file to save myself the trouble of typing out ./

Open a new terminal window (or tab) and enter “nano .bash_profile”. (It is not necessary that you use nano, I just prefer it for quick text editing in the Terminal.) Add the following to a new line to the file with the path in quotes being the path to your file and save.

alias tw="~/path/to/"

Now close that Terminal tab and open a new one. That is the only way to get the newly edited .bash_profile to load and your new alias to take effect. To send a message use your alias in place of ./

tw "I am screwing around at work more efficiently!"

You’re welcome.


Since I wrote this, Twitter has moved completely to OAuth for its authentication. Therefore, this shell script will no longer work. I am pretty sure there is a workaround. I just have not had time to work on it lately.

Be cool, stay in school (forever)

26 01 2010

I love school. I cannot imagine not being in school, a reality that I will likely be faced with. To myself and some other people, there is no better place to be than in an educational institution. Why not stay there forever?

Even if you are not a teacher, you still get to shape the educational system in some way. If you are an academic advisor, you get to help students plan their academic, and possibly professional, careers. If you are a software developer or systems administrator within a university, you might be creating or supporting information systems that allow for efficient comunications between students and their instructors.

There are dozens of different positions within a major university that might involve never setting foot inside a classroom. However, being there would allow you to continue your own education for years, even decades with relative ease. Go to work, go to class, go home. You could do that for years. I know I would love to have that opportunity.

I do not see myself leaving the education system happily and would love to stay here and work. It is really the best place to be to shape the future of our society and to help ensure its continuity, before the young minds here become too old and stubborn to stray from their stupidity.