The End of an Era - Good Riddance

So this is one of those personal blog entries that is really written more for myself than for any audience. I have not posted in a while and have been thinking that I really should put something up here. I have a couple interesting code things that have been rattling around in my head, and those will make it here or to Rapid Development Group's Blog in the near future. However today I will talk about how my life has changed drastically in 2011, <sarcasm>and provide some advice for those of you who haven't quite gotten it all figured out yet like I have </sarcasm>.

The change that has had the biggest impact on my sanity is that I sold my racquetball e-commerce business. Racquetball Factory was the reason I learned how to build websites. I have always been a computer geek - but I had never considered computer science as a career path. I was going to focus on more fundamental science: Chemistry, Physics, and Math. However, I discovered those things were hard, and I never felt connected to anything real, or relevant. So I relied on being a bright jack-of-all-trades and relished in getting a new job every 6 months for the past 4 years. During my time at these various business' I discovered something extraordinary - the bar is extremely low for starting your own business! So, at the ripe old age of 23 I took my chemistry degree, my $25,000 AMEX card and 0 formal business training and started my own e-commerce business. I had built a Zen-Cart e-commerce site for one of my previous employers and figured I could take that knowledge and build an awesome Zen-Cart site for Racquetball Factory - alas, I was unaware that building an awesome Zen-Cart site is impossible. But, my site was very good, and had an objectively superior user experience to all but one or two other racquetball e-commerce sites.

I continually improved the site in my spare time while working and going back to school for Information Systems (half business/half computers). I learned a lot about SEO during this time, and for a while I thought that was what I wanted to do - but it is just so much more fun to actually build a site! Though I thoroughly enjoyed building the site and being "Master of my own Domain" - I disliked things like inventory, shipping out orders, stringing racquets, and all that other crap. So I found a business partner who was in a good position to take over those things, and take advantage of many synergies since he ran a local tennis store. It went OK, and only OK and so I ended up selling the whole thing. Racquetball Factory was stuck in the limbo between being not enough for one person to do full-time, and too much for someone to take over who is not able to dedicate enough time to it. If I had really wanted to invest in it I could have built the business up to the point of living off of it within 2-3 years. That would have been awesome - except for I hate stuff like inventory, shipping out orders, stringing racquets, and all that other crap.

I was sad to see it go, but more excited to not have to worry about it anymore. I also made pretty good money on the deal, but if I were to calculate an hourly rate based on the 1000's of hours I put into building the business I would probably cry. However it was an amazing learning experience, not only for what I learned about business and technology, <cheese>but for what I learned about myself</cheese>. I was able to put a hefty down payment on a house and I plan on settling down with my wife and not moving every 6 months like we have been. I am trying to have more free time, while at the same time be more productive. I am working on narrowing my focus and getting rid of things I don't need. I am in a better place than I was last year.

So this has become quite rambly so I am going to end with how my mindset has changed over the course of 2011 with 2 closely related points

Time is Money/The Division of Labor: I am a good web developer, my skills are worth a lot of money on the open market right now. I am extremely happy with my employment situation and am not looking to move, but I do enjoy doing a small amount of side work when an opportunity presents itself - and I charge enough to make it worth my time. I used to want to learn how to do everything and be able to be self-reliant and that I would be saving money. As mentioned previously I am a pretty smart guy and am quick to pick things up. This can lead to the delusion that I can save money by doing things myself instead of paying a specialist. I still think that being a broad person is a great benefit and I enjoy variety. But suddenly all those economics classes describing the benefits of trade are starting to make sense to me. Instead of trying to move some cabinets around in my new house and install a dishwasher I paid someone to do it who is really good at that. In order to pay for it, I helped my wife's cousin put up a website, which is something I am very good at. So now I have professionally installed cabinets and a dishwasher instead of the hack-job that I would have thrown together. The builder is happy, I am happy, and my wife's cousin is happy.

TL;DR
Have someone else do it. Focus on your competitive advantage.

</rant>
Happy New Year!

Fixing Macfusion / MacFuse for Snow Leopard - Mount SSH Drives in Mac OS X

This is just a quick heads up to anyone trying in vain to get MacFuse and Macfusion to work with the new 64 bit versions of Snow Leopard in order to mount an SSH drive. Don't listen to anyone but this guy. I have been searching for a while and following all the "fixes" that fixed the myriad problems with MacFuse coming to Snow Leopard. However, those have all been mostly fixed in the latest version of Macfusion. The thing that hasn't been fixed in even the latest beta version of MacFuse is 64 bit Kernel support.

The version of MacFuse found in the link is an unofficial beta that fixes the problem. I am not sure why it hasn't been taken into MacFuse proper (which doesn't seem to have been updated since 2008). So as a public service I am making a giant button, since it took me forever to find.

Click here to fix MacFuse for 64-bit Snow Leopard

Creating an Animated Floating Sidebar With jQuery

I finally got around to implementing a floating sidebar that contains all of my follow links contained in my header. Lots of sites have a floating sidebar, but I wanted mine to be a little different. First, the items in my sidebar come flying out of the header to the sidebar when the user scrolls down past the header, instead of being fixed over on the side. You will also notice a nifty little elastic animation effect.

First let's tackle the fact that the sidebar items actually come "unglued" from the header and hang out over on the side when the user scrolls past the header, and also return to their home inside of the header when scrolled back to the top. The first step is to give the header region containing the home for the follow links relative positioning like so.

Now, all of the magic happens with jQuery. The full code is posted below, but I would like to write you a narrative to explain it. The first step, believe it or not, is to set a timer. We set a timer, because we are going to be binding to the scroll function, and without setting a timeout, you can experience serious performance problems when someone scrolls quickly on your site, the scroll event can be triggered hundreds of times a second with certain mousewheels! The next thing we do is keep track of the home position of the block we will be floating.

It's bind time baby. The very first thing we do inside of the scroll function is to check the timer. If the timer is still going we don't do anything. If the timer has expired we reset the timer and then check if we have scrolled past the home position of our block. If we have, then the first thing is to "unglue" the block by giving it absolute positioning. Then we animate the block over to the side and set it's top position to the top of the window. I have also added easeOutElastic easing to make the animation a little more fun (check out all the types of easing available at this easing types demo). I am also stopping the animation, clearing the queue, and jumping to the end every time the animation is fired, because even with the timer this function will be called a lot and we could potentially have a long queue of animations.

Now, if the user scrolls, and it isn't below the block's home (plus an offset for webkit), then we add the CSS to return the block to it's home. I don't animate it, because I really want the links to be in their home position as soon as the user scrolls up, and doing a really fast animation didn't make sense if the user wasn't going to see the animation anyway. We follow that up by resetting the timer to 0 and then defining the timeout length (250ms in my case, a larger number will have better reliability, but not as smooth of scrolling).

This code is a combination of several methods that I came across while researching how to do a floating sidebar, and I went down several paths before I settled on this code. As a result it is almost surely not optimized (do I need to clear the queue if I am setting a timer anyway?), but it works and should be fairly performant, even in IE. Please leave any suggestions for improvement or any questions in the comments.

Tags: 

jQuery Masonry is Bad Ass

jQuery Masonry is a sweet layout plugin for jQuery. They describe it as "The flip side of CSS floats". It aligns elements vertically then horizontally, minimizing the vertical gaps between elements of varying heights. I created my own sandbox for playing around with masonry.

Like any layout, it has it's time and place. I would consider this primarily an alternative layout, only to be used when trying to be a little different. In terms of usability, one is generally better off sticking to a grid.

If the content being displayed is meant to be "artsy", such as a list of varying sized portfolio pieces or photos, then it is actually really useful and can give your site an "edgy" feel.

On my masonry sandbox page I am also playing around with some other ways to effect Drupal views. In the header of the view I have created buttons that correspond to toggling views field names. This can cause some overlap with the masonry layout that is applied that stacks content on top of other content. However, there is a simple fix; we just add masonry to the callback function of the slideToggle functions to re-mason the page only after the slideToggle has finished firing. The full JS for the page is below.

Tags: 

Pages

Subscribe to Front page feed