Life Stream http://from.two2twelve.com/feed/lifestream/1 Life Stream 20 Driving design based on customer service http://digg.com/design/Driving_design_based_on_customer_service Great article that pin points crucial flaws in the design process that many web designers and developers fall victim too. Author defines clear examples we can all learn from and strategies we can implement into our workflow process. Great share! Highly recommended. http://digg.com/design/Driving_design_based_on_customer_service Wed, 16 Jun 2010 22:17:58 EDT RT @avanitydesign: Learning guitar takes awesome patience and many years of on-going practice. Check out www.raemag.com http://twitter.com/two2twelve/statuses/16342437092 Eric A. RT @avanitydesign: Learning guitar takes awesome patience and many years of on-going practice. Check out www.raemag.com http://twitter.com/two2twelve/statuses/16342437092 Wed, 16 Jun 2010 19:06:36 EDT RT @raemag: Ladies and Gents, today is the day. The official launch of RAE Magazine Online! www.raemag.com http://twitter.com/two2twelve/statuses/16265877130 Eric A. RT @raemag: Ladies and Gents, today is the day. The official launch of RAE Magazine Online! www.raemag.com http://twitter.com/two2twelve/statuses/16265877130 Tue, 15 Jun 2010 20:20:38 EDT Into a World of Motion http://from.two2twelve.com/blog/into-a-world-of-motion Eric Alli <p>A few weeks ago, during the final stages of development for my web app, <a href="http://raemag.com">RaeMag</a>, our company decided we needed a flashier way apart from banner ads and viral blog posts to promote the upcoming launch of our site. We're extremely excited and proud of the design, functionality and everything else we've built over the past 2 years of development and our collective idea to showcase RaeMag eventually became to make a commercial. Yes, a commercial...for a website.</p><p>I'll save my 3-week, self-taught journey into the world of After Effects, Motion Graphics and all of the technicalities that went behind producing such a commercial for another series of posts. For now...</p><p>I present to you, <b>T</b><b>he Official RaeMag Commercial in HD</b>...&nbsp;</p> <object width="890" height="525"><param name="movie" value="http://www.youtube.com/v/YYVZS-Xk3Uo&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/YYVZS-Xk3Uo&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="890" height="525"></object> <div><br></div><div>Please post a&nbsp;comment below and&nbsp;let me know what you think! And stay tuned for the upcoming launch of&nbsp;<a href="http://raemag.com">RaeMag</a>&nbsp;this week!</div> http://from.two2twelve.com/blog/into-a-world-of-motion Fri, 11 Jun 2010 01:06:13 EDT As a result of prolonged After Effects usage and it's effect on my CPU fan, I think my MacBook might actually achieve lift off tonight. http://twitter.com/two2twelve/statuses/15226978650 Eric A. As a result of prolonged After Effects usage and it's effect on my CPU fan, I think my MacBook might actually achieve lift off tonight. http://twitter.com/two2twelve/statuses/15226978650 Tue, 01 Jun 2010 23:58:16 EDT Brace yourself After Effects...I am about to make you look very silly. http://twitter.com/two2twelve/statuses/13568089287 Eric A. Brace yourself After Effects...I am about to make you look very silly. http://twitter.com/two2twelve/statuses/13568089287 Fri, 07 May 2010 16:31:22 EDT Moving directly from hardcore Rails development to full blown motion graphics design is not a recommended workflow. #mindexploding http://twitter.com/two2twelve/statuses/13368123465 Eric A. Moving directly from hardcore Rails development to full blown motion graphics design is not a recommended workflow. #mindexploding http://twitter.com/two2twelve/statuses/13368123465 Tue, 04 May 2010 10:48:08 EDT Checking out a new tool that helps web designers find variations of any color - http://0to255.com/ Nice work @shaunchapman! http://twitter.com/two2twelve/statuses/12470367004 Eric A. Checking out a new tool that helps web designers find variations of any color - http://0to255.com/ Nice work @shaunchapman! http://twitter.com/two2twelve/statuses/12470367004 Mon, 19 Apr 2010 14:52:17 EDT Why can’t Apple’s pro apps offer a “Framed Window” mode? http://bit.ly/9MD1NF #exposefail http://twitter.com/two2twelve/statuses/12295821526 Eric A. Why can’t Apple’s pro apps offer a “Framed Window” mode? http://bit.ly/9MD1NF #exposefail http://twitter.com/two2twelve/statuses/12295821526 Fri, 16 Apr 2010 13:46:04 EDT Running low on ideas for @raemag copy...Resorting to Star Wars references to stand in for lorem ipsum. http://twitter.com/two2twelve/statuses/12241685377 Eric A. Running low on ideas for @raemag copy...Resorting to Star Wars references to stand in for lorem ipsum. http://twitter.com/two2twelve/statuses/12241685377 Thu, 15 Apr 2010 16:08:35 EDT A Fresh Start http://from.two2twelve.com/blog/a-fresh-start Eric Alli <p>In my 8-odd years as doing web development, design and just about everything else remotely web-related...I consider myself,&nbsp;to some extent,&nbsp;an&nbsp;intarwebs&nbsp;aficionado. Though lately, I've been increasingly becoming aware that I rarely take part in the conventional tasks that one in my position conducts daily. Tasks such as twittering, blogging, digging, facebooking, whatever-ing have never appealed to me.</p> <p>This new version of my site is not exactly an attempt to rectify my lack of these certain "web-guy" characteristics, rather, it's a new avenue for my&nbsp;ambiguous ramblings, showcase of past and current works, and most of all, <b>my hope for an easy outlet for future creativity of all sorts</b>.</p> <p>It's not exactly a lifestream and not quite a blog, it's simply a collective gathering of everything I'd like to share, offer as a resource, and by any chance&nbsp;<b>a backdrop of inspiration for others</b>. This my include the occasional tweet and digg link which, as mentioned before, I use sparingly (which <i>may</i> count for quality!).</p><p>On another note, You may have caught on to the fact that my natural writing style (yes, that includes all of these blog posts) tends to be more on the formal side (I swear I don’t talk like this in person!). So, basically...If I sound like a horse in a henhouse (which, in fact, isn’t even a real idiom as far as I can tell)...you’ll know why. However, with that said, I do plan on venturing out of my natural style, so If you come across anything genuinely peculiar...please don't hold it against me :-).</p><div><h2>A Little Background<br></h2><div>This is currently the 3rd version of this site, this time around I've expanded my original "Two2Twelve Network" of mini-sites, which is just a fancy way of centralizing my network of sites...that I made.</div><div><br></div><div>One of the main excuses I have for redesigning and revamping this site was my longing to experiment with the latest web technologies and techniques; including HTML5 and CSS3. Though a full blown HTML5 version of this site (as I initially wanted) didn't cut it (Yes, though it pains me to say, I DO think it's too early to cut out IE users completely...just partially), I managed to implement quite a few CSS3 techniques (that do wonders for usability and&nbsp;accessibility) while sticking with valid XHTML code.</div></div><h2>What's In Store<br></h2><div>I plan on diligently keeping this site updated with a myriad of entries including, but definitely not limited to:</div><div><ul><li>Programming Tips &amp; Tutorials (From Ruby on Rails to Javascript, and more!)</li><li>My Personal Photography Collections<br></li><li>New Website Themes &amp; Templates</li><li>Web-related blogging and ramblings</li><li>General rants and reviews</li></ul><div>I've also updated my 2 mini-sites <a href="http://themes.two2twelve.com">themes</a> and <a href="http://code.two2twelve.com">code</a> (coming shortly!). Here you can find my selection of theme designs for sale and my collection of open-source scripts, plugins, and other programming-related resources, respectively.&nbsp;</div><h2>Furthermore<br></h2><div>After years of random blogging and tinkering with countless designs and concepts about what I should actually do with my personal site, and being one buggy blog engine away from going straight for a vcard-based site (joking, of course...those are silly), I've finally put together an extensive design on top the superb <a href="http://firerift.com">Firerift</a> CMS system that I plan on building on for the foreseeable future (and by the laws of the intarwebs, that should give me roughly 4 months of usage :-/).</div><div><br></div><div>In any event, I do hope you plan to stick around or at the very least give my site(s) a thorough browse.&nbsp;</div><div><br></div><div>Enjoy!</div></div> http://from.two2twelve.com/blog/a-fresh-start Mon, 12 Apr 2010 04:02:16 EDT The Studio http://from.two2twelve.com/galleries/the-studio Eric Alli <a href="http://from.two2twelve.com/galleries/the-studio"><img src="http://from.two2twelve.com/upload/media/frp_prsguitar1.jpg" /></a><br /> http://from.two2twelve.com/galleries/the-studio Thu, 25 Feb 2010 15:44:20 EST Matt's magic fingers from Muse band http://digg.com/music/Matt_s_magic_fingers_from_Muse_band Song: New Born http://digg.com/music/Matt_s_magic_fingers_from_Muse_band Thu, 25 Feb 2010 10:48:20 EST I've just come to the realization that my iPhone's sole purpose has been being a super-advanced alarm clock. #technologyutilizationfail http://twitter.com/two2twelve/statuses/3773579848 Eric A. I've just come to the realization that my iPhone's sole purpose has been being a super-advanced alarm clock. #technologyutilizationfail http://twitter.com/two2twelve/statuses/3773579848 Sat, 05 Sep 2009 00:47:35 EDT 8 Tips To Supercharge Your Rails App http://from.two2twelve.com/blog/8-tips-to-supercharge-your-rails-app Eric Alli <h2>1. Dynamic Blocks of Code</h2> <p>There may be times when you'd like to include a certain javascript or css file on certain pages, but not the entire site. This is a perfect example to utilize the content_for function.</p> <p>On the page or pages you'd like to include the specific javascript or CSS files. Put this block of code at the top of that template.</p> <pre class="brush: rails"> &lt;% content_for :header do %&gt; &lt;%= javascript_include_tag "myfile.js" %&gt; &lt;%= stylesheet_link_tag "myfile.css" %&gt; &lt;% end %&gt; </pre> <p>Next, open your global layout and insert this right before the header tag.</p> <pre class="brush: rails"> &lt;%= yield(:header) %&gt; </pre> <h2>2. Load Models From Sub-Directories</h2> <p>It's no fun sifting through dozens of models in order to find the one you're looking for. A great way to organize your models is to place them in sub-directories of the models folder and have your application load them from there.</p> <p>In your <b>config/environment.rb</b> file. Add this line of code within the <b>Rails::Initializer.run do |config|</b> section.</p> <pre class="brush: rails">Dir.glob("#{RAILS_ROOT}/app/models/*[^(.rb|.ignore)]").each{|dir| config.load_paths &lt;&lt; dir } </pre> <p>Don't forget to restart your app after any config changes such as this.</p> <h2>3. Make Your Own YML Configuration File</h2> <p>Using a YML config file can enable you to keep all your application's global variables in one place and have the ability to call them from anywhere.</p> <p>To get started, let's create our config file, config.yml in the config directory and add a few variables to it. You may add as many variables as you'd like.</p> <pre class="brush: rails">development: app_name: MyApp support_email: support@mydomain.com test: app_name: MyApp support_email: support@mydomain.com production: app_name: MyApp support_email: support@mydomain.com </pre> <p>Next, we'll need to load this configuration into our application by adding a line to the <b>config/initializers/configs.rb</b> file.</p> <pre class="brush: rails">MY_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml")[RAILS_ENV] </pre> <p>Now you can call any of the variables set in config.yml by using the following.</p> <pre class="brush: rails">MY_CONFIG["app_name"] </pre> <h2>4. Parse An RSS feed in seconds</h2> <p>Parsing RSS feeds in rails is extremely simple, however, you may come across complicated solutions for accomplishing it. Here's a super fast way to parse any RSS feed and display it's contents in your view.</p> <p>In your controller, on the first line (above everything) add:</p> <pre class="brush: rails">require 'rss' </pre> <p>Then, add an action (or add to an existing action):</p> <pre class="brush: rails">def index @rss = RSS::Parser.parse(open('http://weblog.xmgnetworks.com/?feed=rss2').read, false) @entries = @rss.items[0..4] # Limited to 5 items, remove or change as needed end </pre> <p>And finally in your view, add a variation of this (customize based on the data provided in the feed).</p> <pre class="brush: rails">&lt;% @entries.each do |entry| %&gt; &lt;%= entry.title %&gt; &lt;%=entry.description %&gt; &lt;% end %&gt; </pre> <h2>5. Use Serialized Hashes</h2> <p>In some cases you may want to store multiple pieces of data and associate it with a model. For instance, if you have a users table and would like have the ability to store preferences for each user. One way this could be done would be to create a table called user_preferences and link them with a basic Rails association. But, a much simpler way to do this without the need to create more tables or files, is by using the "serialize" function provided by Rails.</p> <p>To get started, we'll first need to add a column to our existing users table called preferences, you can do this with a simple rails migration.</p> <pre class="brush: rails">script/generate migration add_preferences_to_users add_column :users, :preferences, :text </pre> <p>Then, we'll need to add a serialize function to our users model, near the top in order to activate serialization for the preferences column.</p> <pre class="brush: rails">serialize :preferences </pre> <p>That's all! To add preferences for a user you can use the following function.</p> <pre class="brush: rails">@user.update_attributes(:preferences =&gt; { "hide_age" =&gt; "true" }) </pre> <h2>6. Use Helpers with Blocks of Code</h2> <p>Helpers are an integral part of rails, but using them strictly inline can limit their potential. Here's how you can pass a block of code from your views into a helper method.</p> <p>In this example, we'll be generating boxes for a sidebar on the fly. This way, instead of repeating all the styling of our box each time we use one in our views, we'll just need to add the content for them.</p> <p>Let's start with the view. In the template where we'd like our box, add the following snippet of code. Repeat this snippet for multiple boxes.</p> <pre class="brush: rails">&lt;% sidebar_box("My Box Title") do %&gt; Content for my box. &lt;% end %&gt; </pre> <p>The line "sidebar_box("my_box_id") do" will call a helper function called "sidebar_box" and pass a variable to it called "My Box Title" that we'll use for the title of our box.</p> <p>Next, we add our helper function by opening <b>application_helper.rb</b> and adding the following function.</p> <pre class="brush: rails">def sidebar_box(title, &amp;block) data = capture(&amp;block) content = '&lt;div class="sidebar_box"&gt; &lt;h4&gt;'+title+' '+data+' &lt;/div&gt;' concat(content) end </pre> <p>The first line in this function, <b>data = capture(&amp;block)</b>, will capture everything contained within the sidebar_box block in your view. Next, in the <b>content =</b> line, we add the hardcoded HTML each box will have and the dynamic content we captured from the block in our view, here you can freely add any HTML you wish.</p> <p>Lastly, we use the <b>concat(content)</b> function to bind everything together and send it back to your view.</p> <h2>7. Loading dynamic stylesheets</h2> <p>Splitting your stylesheet into several smaller stylesheets is a great organizational practice, especially if you find your stylesheet growing over the 1000-line mark. In rails, a great naming convention for your stylesheets is to name them after each of your controller's and then load them into your pages dynamically.</p> <p>A simple way to do this, is to open your <b>application.rb</b> controller and add the following snippets of code.</p> <p>First, we'll add a method to find stylesheets to load into your pages depending on what controller the user is on. If no stylesheet for the controller is found, it simply does nothing.</p> <pre class="brush: rails">def find_stylesheets @stylesheets = [] # A new empty array stylesheets_path = "#{RAILS_ROOT}/public/stylesheets/" # The path to our stlesheets folder candidates = [ "#{controller_name}" ] # Use the controller name for the stylesheet to search for candidates.inject("") do |buf, css| if FileTest.exist?("#{stylesheets_path}/#{css}.css") # Search for a matching stylsheet @stylesheets &lt;&lt; css # Add it to our array else @stylehseets = [] # If no matches, add nothing to our array end end end </pre> <p>Next, add a before_filter near the top of your application controller to call this method before each page load.</p> <pre class="brush: rails">before_filter :find_stylesheets </pre> <p>Lastly, we'll add a styleshet_link_tag into the section of our global layout template that will be populated with the stylesheets found in the above method.</p> <pre class="brush: rails">&lt;%= stylesheet_link_tag "#{@stylesheets.to_s}.css" unless @stylesheets.empty? %&gt; </pre> <h2>8. Quickly Aggregate and Display Data from Multiple Model's</h2> <p>Displaying information from multiple models, that each have different field names can be a challenge. But Rails makes it easy to do this in a few simple steps.</p> <p>A common example would be creating an activity stream for your users that displays their activity throughout your application.</p> <p>First, we'll need to construct a controller method to fetch all of the information we want to display. Here's an example.</p> <pre class="brush: rails">def activity_stream blog_posts = BlogPost.find(:all, :conditions =&gt; ["user_id = ?", @user.id]) comments = Comment.find(:all, :conditions =&gt; ["user_id = ?", @user.id]) # Add any models you wish to add to the stream @activity_stream = blog_posts + photos end </pre> <p>Next, we'll add the activity to our view and call a helper method to sort through each type of activity.</p> <pre class="brush: rails">&lt;% @activity_stream.each do |item| %&gt; &lt;%= activity_item_for(item) %&gt; &lt;% end %&gt; </pre> <p>Lastly, we add our helper method that will allow you to customize what information appears for each type of activity item. This can be customized with HTML styling and any other fields from your model that you'd like to display.</p> <pre class="brush: rails">def activity_item_for(item) case item.class.name when 'BlogPost' "#{item.title}" when 'Comment' "#{item.body]" end end </pre> http://from.two2twelve.com/blog/8-tips-to-supercharge-your-rails-app Mon, 31 Aug 2009 10:50:00 EDT Battling against color profiles and missing thumbs on the eve of the @raemag beta launch. http://twitter.com/two2twelve/statuses/3527982848 Eric A. Battling against color profiles and missing thumbs on the eve of the @raemag beta launch. http://twitter.com/two2twelve/statuses/3527982848 Mon, 24 Aug 2009 23:58:02 EDT Quickly finding that some things should never be in a tree structure...Task lists being the first among them. http://twitter.com/two2twelve/statuses/3248570314 Eric A. Quickly finding that some things should never be in a tree structure...Task lists being the first among them. http://twitter.com/two2twelve/statuses/3248570314 Tue, 11 Aug 2009 13:03:24 EDT Have begun the proverbial IE testing phase... #raemag http://twitter.com/two2twelve/statuses/3168454776 Eric A. Have begun the proverbial IE testing phase... #raemag http://twitter.com/two2twelve/statuses/3168454776 Thu, 06 Aug 2009 15:53:23 EDT Is currently experiencing #tscc withdrawal symptoms. http://twitter.com/two2twelve/statuses/3065543634 Eric A. Is currently experiencing #tscc withdrawal symptoms. http://twitter.com/two2twelve/statuses/3065543634 Sat, 01 Aug 2009 01:08:23 EDT HOW TO: CSS Sprites (Background Image Arrays) http://from.two2twelve.com/blog/how-to-css-sprites-background-image-arrays Eric Alli <h4>This Series</h4> <p> CSS Sprites have a countless number of possible implementations, I've chosen to cover three of what I've seen to be the most common uses. <br><br> These uses include: </p><ul> <li>An SEO-friendly page-title replacement sprite </li> <li>A menu / navigation sprite</li> <li>An icon / button sprite</li> </ul> Each of these sprite implementations have their own unique advantages and challenges that result in an ultimate benefit for your website. <br><br> In every part of this tutorial series we will cover the following process for each of the three sprite uses: <ul> <li>The slicing and preparing of graphics for use in a sprite</li> <li>Programming the XHTML/CSS for a sprite</li> <li>Extending and updating a sprite</li> </ul> In this first installment of the series we'll be integrating sprites to create SEO-friendly page title image replacements. The end result will be pretty, image-based page headers for your website without giving up the SEO benefits of header tags and text. <h4>Step 1: Slicing and Preparing Graphics</h4> <p>First, we'll design and prepare the graphic for our page headers.</p> <div class="tutorial_image"><img src="http://from.two2twelve.com/upload/media/1~500x500.jpg" alt="1.jpg"></div> <p>Next, we want to create additional page title graphics for our other website pages. Now, instead of creating a new file with the graphic for each page title, we're going to implement the sprite technique into this single image by positioning our first graphic to touch the top and left edges of the canvas. Then, for each subsequent graphic (or page title) you require, duplicate that initial graphic and place it around 10px directly under the previous graphic (you can use the ruler tool and guides to measure the spaces). Here are some notes:</p> <div class="tutorial_image"><img src="http://from.two2twelve.com/upload/media/2~500x500.jpg" alt="2.jpg"></div> <p>Next, we'll crop the extraneous whitespace off the canvas using the crop tool. Finally, we should end up with a completed graphic that looks similar to this:</p> <div class="tutorial_image"><img src="http://from.two2twelve.com/upload/media/3~500x500.jpg" alt="3.jpg"></div> <h4>Step 2: Integrating A Sprite via XHTML/CSS</h4> <p>Now that we've constructed a sprite, we can move on to integrating it into our website.</p> <p>Here is the XHTML code we'll be using on each page to display it's corresponding graphic from the sprite:</p> <pre class="brush: rails"> <div id="page_title"> <h1 id="home_title">Home</h1> </div> </pre> <p>As you may notice, this greatly resembles a normal looking page header without the use of a sprite, keeping our titles valid and SEO-friendly. Repeat this code on each page of your website that you have a title for and edit the h1's id and text to correspond with the name of the page (Ex: </p><pre><h1 id="about_us_title">About Us</h1></pre> for your about us page). <p>The CSS for this sprite consists of three element styles:</p> <pre class="brush: rails"> div#page_title { display:block; height:40px; &lt;-- The height of each sprite + the whitespace below it margin:0 0 0px; } div#page_title h1 { width: 215px; &lt;-- The width of your sprite image height: 30px; &lt;-- The exact height of each sprite text-indent: -7777px; background-image: url('../images/sprite.jpg'); &lt;-- The image file background-repeat: no-repeat; } h1#home_title { background-position: left top; } h1#about_us_title { background-position: left -30px; } </pre> <p>The first element: div#page_title, defines the container that encompasses the page title. Here is where you can add padding and margins that will affect the overall style and positioning of the sprite.</p> <p>The next element: div#page_title h1, defines the properties of each sprite, such as the height, width and the location of the sprite image. The "text-indent" property is used in this element to hide the text within the h1 tag, but still keeping it visible to search engines by not removing it completely.</p> <p>The last elements h1#home_title and h1#about_us_title, define the position of the background image in relation to the sprite image. For the sprite used in this example, each page title graphic is 30px in height with 10px of whitespace below it. The first title graphic in our sprite is for our home page, this means, for our h1#home_title element we can simply set the background-position to left and top. Next, our about page graphic is placed under our homepage graphic making things a bit tricky. To position this title and subsequent titles, we'll note the height of each graphic from our CSS (30px) then set the background position to left and -30px to move the background image up by 30px, as a result, displaying the portion of the graphic with our about title instead of the homepage title.</p> <p>Now, if you have another graphic in the sprite under about us, for example, named contact us, simply duplicate the HTML above, fill in the h1's details and create a new element with the name h1#contact_us_title and set it's background position to left and -60px in your CSS file and repeat as necessary.</p> <p><b>Tip:</b> To get the exact dimensions for the sprites used in the CSS, use the ruler tool in Photoshop (command + i (mac) / ctrl + i (windows)).</p> <p><b>Here's an example of an implemented page title sprite.</b></p> <div class="tutorial_image"><img src="http://from.two2twelve.com/upload/media/4~500x500.jpg" alt="4.jpg"></div> <p><a href="http://themeforest.net/item/streamlined/27379">View This Theme on ThemeForest</a></p> <h4>Step 3: Extending and Updating A Sprite</h4> <p>When it comes time to update your website's look, sprites make is extremely painless. Simply, open your sprite image file, update each graphic title with your new styles and save this over your old sprite file. Congratulations! You've just updated all your websites page titles by editing one file and without changing any code.</p> <p>Now that we've covered the basic concept of creating and implementing a sprite for our page titles, in the next tutorial, we'll create a multiple-state menu / navigation system using the CSS Sprite technique.</p> http://from.two2twelve.com/blog/how-to-css-sprites-background-image-arrays Thu, 09 Jul 2009 23:44:00 EDT