<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

    <title type="text">Blog</title>
    <subtitle type="text">Blog:</subtitle>
    <link rel="alternate" type="text/html" href="http://www.elfboy.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.elfboy.com/site/atom" />
    <updated>2013-03-08T13:17:25Z</updated>
    <rights>Copyright (c) 2013, Philip</rights>
    <generator uri="http://expressionengine.com/" version="2.3.1">ExpressionEngine</generator>
    <id>tag:elfboy.com,2013:03:08</id>


    <entry>
      <title>Mobile Safari Crashes with CSS Transition and Calc()</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/mobile_safari_crashes_with_css_transition_and_calc" />
      <id>tag:elfboy.com,2013:/1.47</id>
      <published>2013-03-08T21:10:22Z</published>
      <updated>2013-03-08T13:17:25Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="CSS"
        scheme="http://www.elfboy.com/site/C10"
        label="CSS" />
      <content type="html"><![CDATA[
         
      ]]></content>
    </entry>

    <entry>
      <title>Speaking Out</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/speaking_out" />
      <id>tag:elfboy.com,2013:/1.46</id>
      <published>2013-02-07T07:36:13Z</published>
      <updated>2013-02-06T23:50:16Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="General"
        scheme="http://www.elfboy.com/site/C6"
        label="General" />
      <category term="Life"
        scheme="http://www.elfboy.com/site/C7"
        label="Life" />
      <category term="Personal"
        scheme="http://www.elfboy.com/site/C3"
        label="Personal" />
      <content type="html"><![CDATA[
        <hr/>
<p>You may not know me. I&#8217;m not an internet celebrity, a conference speaker, or a book author. I don&#8217;t have a large web presence. Posts on this blog are few and far between (though like most, I wish I wrote more). To use a term I first learned back in the day on bulletin boards, I’m a bit of a lurker. I read and watch, only occasionally commenting. And it’s exactly that, the never speaking out, that needs to change.</p>

<p>So as not to make any assumptions on what you know and read, I&#8217;ll start by saying there has been more and more talk lately about diversity and equality in our web industry. This week that has specifically focused on women who have been abused (in a broad sense) in some way. Sometimes the abuse is private, sometimes public. The abuse covers a wide range from the seemingly small offenses to the horribly gross.&nbsp; Several incredible, brave women have spoken up about their mistreatment in an effort to shine a light on the issue (as well, I would guess, to strengthen and encourage themselves and others in similar situations). <a href="http://www.sazzy.co.uk/2013/02/speaking-up">Sarah Parmenter</a>, <a href="http://www.jenseninman.com/blog/13737040/speakingupitstime">Leslie Jensen-Inman</a>, and <a href="http://rel.ly/2013/02/also-speaking-up">Relly Annett-Baker</a> to name a few whose stories impacted me. Some I know of through Twitter and the industry, some I don’t.</p>

<p>But they aren’t the only ones who need to speak up. Others need to speak out too: the men. Relly’s last paragraph rang in my ears as I read it:</p>

<blockquote><p>“Chaps: All the time women are ‘others’ in this industry, we need you, as a representative of the legion of smart, not-sexist guys, to call out the one or two guys who think you are actually like them. These guys think you too are okay with ‘lighthearted’ rape jokes, misogyny, veiled threats and nudge-nudge references about the women in your midst. Show them *they* are actually the minority.”</p>
</blockquote>

<p>It is time (way over due) that we men vocally stand up for the women in our industry. We need to shut down the sexist, threatening comments and the abusive actions. It falls at our feet because it is generally in our little all-male groups at conferences, restaurants, parties, that these misogynistic patterns take root. Forget “nipping it in the bud,” pull it out by the root! When someone says an inappropriate comment, don’t allow it. Call him out, say it isn’t okay, disagree.</p>

<p>It’s definitely not easy, both to recognize and to do. Especially as the guys doing this are usually your friends or coworkers. I recently experienced this at a conference and shamefully did nothing. Someone I know made a handful of remarks about some of the women there. They were not horrible, but off-color enough that I wasn’t sure how to respond… so I didn’t. But those small remarks are what can lead to further and worse remarks. Saying something as simple as “don’t be a creeper” or “that’s a little inappropriate” would have gone a long way, and maybe brought up a deeper conversation about what is okay and what isn’t. I still feel bad about not saying anything, especially in light of these previously mentioned ladies speaking up.</p>

<p>If we good men (I work hard to include myself in that group), don’t stand up and speak out I fear nothing will change. The bad apples in the bunch won’t listen to their victims. They don’t believe in them, don’t like them, and don’t think they are important, so they won’t listen to them. They won&#8217;t stop, not unless we, who they seem to have more respect for (as they should for the women), condemn what they are doing. These women, these people, are to believed in, liked and respected. They are important and should be heard.</p>

<p>I hope by writing this I am helping to do just that. I’m also learning from my mistake of lack of action at the recent conference to be sure to speak out vocally in the moment against sleazy comments and actions.</p>

<p>This isn’t just an industry issue, it’s a human one. It needs to be stopped wherever we find it. Yet, as most of us are in this industry because we love it and want to see it flourish, we have a special responsibility to stop the abuse here.</p>

<p>Men, speak out. Support the ladies in our industry. Fight against and condemn the abuse they are receiving.</p> 
      ]]></content>
    </entry>

    <entry>
      <title>The Future</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/the_future" />
      <id>tag:elfboy.com,2012:/1.45</id>
      <published>2012-09-02T19:35:50Z</published>
      <updated>2012-09-02T12:37:51Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Life"
        scheme="http://www.elfboy.com/site/C7"
        label="Life" />
      <category term="Personal"
        scheme="http://www.elfboy.com/site/C3"
        label="Personal" />
      <category term="Travel"
        scheme="http://www.elfboy.com/site/C9"
        label="Travel" />
      <content type="html"><![CDATA[
        <p>This morning I worked from the living room of my brother&#8217;s house, over 100 miles away from my office. I remotely connected to my desk computer and met with my coworkers via a conference call. While this was going on I chatted with a friend who works in Cambodia and snuggled with my youngest niece. Now, this evening, I&#8217;m typing this on a glowing screen at 30,000 feet as I head out on vacation.</p>

<p>Ladies and gentlemen, <i>the Future</I>.</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Transitioning to In&#45;House</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/transitioning_to_in_house" />
      <id>tag:elfboy.com,2012:/1.44</id>
      <published>2012-03-22T17:50:26Z</published>
      <updated>2012-03-22T11:20:28Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Business"
        scheme="http://www.elfboy.com/site/C4"
        label="Business" />
      <category term="Life"
        scheme="http://www.elfboy.com/site/C7"
        label="Life" />
      <content type="html"><![CDATA[
        <p>A few weeks ago an industry peer of mine that I&#8217;ve met once here in Portland contacted me to tell me that the company he works for is hiring. I wasn&#8217;t really interested. I&#8217;m a freelancer running my own business. Between international travel and a one-year stint with another company, it&#8217;s been that way for 12 years. I love it: the flexibility, the diversity, working with clients. And yet my friend kept encouraging me to look into it, so I sent in an application and my resume (which took a little dusting).</p>

<p>Here I am now, a few weeks later, finishing up the major work on my last freelance job before my full time in-house one begins.</p>

<p>After going through interviews and meeting with several people in the company, I decided to accept their offer of employment. <a href="http://webtrends.com">WebTrends</a> really seems to be a fantastic place to work. When I hear employees say that what draws them back is the people they work with and the culture of the company, it makes me stop and consider. That&#8217;s a place I want to work: not only where the company takes care of its employees, but where the employees build real friendships with each other and are more than coworkers.</p>

<p>I&#8217;m not finished with freelance though. Of course I&#8217;ll always have my own little projects going on behind the scenes. In addition, I plan on taking a few select clients. Sure, time will be limited, but because of that and the fact that I&#8217;ll have a steady paycheck I can be very selective with the projects I choose. This means I can work only on jobs I really believe in which means I&#8217;ll be motivated to put in my best work which in turn means the client gets the best results as well! (So hey, if you have a rockin&#8217; project, let me know and maybe we can work together).</p>

<p>So Monday things will be quite different, and I&#8217;m excited for that change!</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Random PHP Password Generator</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/random_php_password_generator" />
      <id>tag:elfboy.com,2012:/1.43</id>
      <published>2012-02-21T07:05:39Z</published>
      <updated>2012-02-20T15:24:40Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Programming"
        scheme="http://www.elfboy.com/site/C8"
        label="Programming" />
      <content type="html"><![CDATA[
        <p><strong>Code:</strong></p><pre>
Random Password: &lt;br /&gt;
&lt;?php
$len = isset($_GET['len']) ? $_GET['len'] : 8;
$pw = '';
for($i=0; $i<$len; $i++) {
	$pw .= chr(rand(33, 126));
}
echo $pw;
?&gt;
</pre>

<p><strong>Output example:</strong></p>

<pre>
W?7;q,%R
</pre>

<p>The characters it uses are pulled from the <a href="http://www.asciitable.com/">ASCII table</a> (values 33 through 126, inclusive).</p>

<p>Just save that on your server and pull it up. Add a ?len=N query string in there were N is a number for the desired non-default length.</p>

<p><i>Caveat: All of that said, don&#8217;t forget that there are <a href="http://xkcd.com/936/" alt="An XKCD comic on password strength">better choices</a> than randomized passwords.</i></p>

<p><span style="font-size: .8em;">Thanks <a href="http://twitter.com/travinsf">TravInSF</a> for idiot-checking me</span></p> 
      ]]></content>
    </entry>

    <entry>
      <title>Making Repeatable Background Stripes</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/making_repeatable_background_stripes" />
      <id>tag:elfboy.com,2012:/1.42</id>
      <published>2012-02-15T06:26:15Z</published>
      <updated>2012-02-22T14:52:16Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Education"
        scheme="http://www.elfboy.com/site/C5"
        label="Education" />
      <category term="Programming"
        scheme="http://www.elfboy.com/site/C8"
        label="Programming" />
      <content type="html"><![CDATA[
        <p>SVG is a graphic made out of XML style code. I won&#8217;t go into a full blown tutorial, as I&#8217;m not familiar enough with SVG and I&#8217;m sure there are many fantastic resources out there if you just Google. Basically, what I was able to do was to create, using XML-based SVG code, an image that is 1 pixel wide by 100 pixels tall. The top 50 pixels are one color, the bottom, another. Here&#8217;s an example of the code:</p><pre>
&lt;svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"&gt;
 &lt;!-- Created with SVG-edit - <a href="http://svg-edit.googlecode.com/">http://svg-edit.googlecode.com/</a> --&gt;
 &lt;g&gt;
  &lt;title&gt;Layer 1&lt;/title&gt;
  &lt;rect id="svg_1" height="50" width="100" y="0" x="0" fill="#FF0000"/&gt;
  &lt;rect fill="#00FF00" x="0" y="50" width="100" height="50" id="svg_2"/&gt;
 &lt;/g&gt;
&lt;/svg&gt;
</pre>
<p>(Note the comment in there, I used that editor to generate the code. It looks like a great learning tool! Check it out.)</p>

<p>Here&#8217;s a live version of that code.</p><pre>
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
 <!-- Created with SVG-edit - <a href="http://svg-edit.googlecode.com/">http://svg-edit.googlecode.com/</a> -->
 <g>
  <title>Layer 1</title>
  <rect id="svg_1" height="50" width="100" y="0" x="0" fill="#FF0000"/>
  <rect fill="#00FF00" x="0" y="50" width="100" height="50" id="svg_2"/>
 </g>
</svg>
</pre>

<p>This is what you should see if your browser can display SVG.<br />
<img src="http://www.elfboy.com/images/uploads/svg.png" style="border: 0;" alt="SVG example" width="100" height="100" /></p>

<p>Shush. Don&#8217;t judge my color choices.</p>

<p>Now, since that&#8217;s just code it&#8217;s really easy to swap out of the colors depending on your needs. Especially with a little bit of PHP in there. I grab my colors out of a database, but they could just as easily be in an array. For example:</p><pre>
&lt;?php
header("Content-type: image/svg+xml");
$colors = array('#ff0000', '#00ff00');
?&gt;

&lt;svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"&gt;
 &lt;!-- Created with SVG-edit - <a href="http://svg-edit.googlecode.com/">http://svg-edit.googlecode.com/</a> --&gt;
 &lt;g&gt;
  &lt;title&gt;Layer 1&lt;/title&gt;
  &lt;rect id="svg_1" height="50" width="100" y="0" x="0" fill="&lt;?php echo $colors[0] ?&gt;"/&gt;
  &lt;rect fill="&lt;?php echo $colors[1] ?&gt;" x="0" y="50" width="100" height="50" id="svg_2"/&gt;
 &lt;/g&gt;
&lt;/svg&gt;
</pre>

<p>Save that as a .php file and you&#8217;re good to go. <strong>It&#8217;s important to notice the content-type being set by the header() function.</strong> This makes sure the browser treats the output as SVG.</p>

<p>Lastly, in my CSS file I simply set the above PHP file as the source for my background: url().</p><pre>
.stripes {
    background: url(your-php-generated-svg.php);
}
</pre>
<p>That will repeat across the x- and y-axes. You could also use background-size to change the size since it&#8217;s a <em>scalable vector</em>.</p>

<p><strong>Don&#8217;t forget to <a href="http://www.caniuse.com/#cats=SVG" alt="Can I Use?">know when you can use it!</a></strong></p>

<p><em>Update 22-Feb-2012:</em><br />
I just stumbled across this CSS declaration today: <a href="http://www.css3files.com/gradient/#repeatinglineargradient">repeating-linear-gradient</a> Looks like that might be problem solved!</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Frustrated? No.</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/frustrated_no" />
      <id>tag:elfboy.com,2012:/1.40</id>
      <published>2012-01-19T03:56:13Z</published>
      <updated>2012-01-18T13:20:14Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Business"
        scheme="http://www.elfboy.com/site/C4"
        label="Business" />
      <category term="Education"
        scheme="http://www.elfboy.com/site/C5"
        label="Education" />
      <category term="General"
        scheme="http://www.elfboy.com/site/C6"
        label="General" />
      <content type="html"><![CDATA[
        <p>If you haven&#8217;t read it yet, take a few minutes today to do so. It&#8217;s a really useful article. (And let me quickly say I&#8217;m not harshing on Zeldman in this article. I love and respect what he has done for the industry. I&#8217;m making a bit of a side point in part to remind and excite myself.)</p>

<p>At one point in the article Zeldman says, &#8220;This is a frustrating time to be a web designer, but it’s also the most exciting time in ten years.&#8221; and earlier &#8220;In the short run it’s going to be hell&#8230;But it is the short run.&#8221;</p>

<p>While he does give the caveats of it being the short run and the most exciting time, I have to ask, is this really a frustrating time to be a web designer? I think it&#8217;s just a time to be a web designer. Because it&#8217;s always been like this: the browser wars, poorly supported CSS, poorly supported media, bandwidth holding us back, tables and floats fighting an inefficient battle to accomplish our layout desires, Flash, and a lot of little bugs and quirks along the way (actually, things are so quirky out here that there&#8217;s an industry term around it!).</p>

<p>So is it really frustrating? Isn&#8217;t it just what it means to be a web designer? I&#8217;m not saying there isn&#8217;t room for improvement. We should always be trying to better ourselves and the industry. <strong>But it&#8217;s what we do!</strong> We live out here, on the edge, pushing technology forward and making it better. For those of us who thrive on that and want to keep making things better, there will never be a time where it all makes sense and is easy. But I don&#8217;t think we want that. We&#8217;re striving for perfection and there&#8217;s a lot of philosophical debate on whether the attainment of that is possible, but the fight for it is worthwhile.</p>

<p>In the end, I&#8217;d like to just make a minor modification to Zeldman&#8217;s words: This is the time to be a web designer, it’s the most exciting time in ten years. And you know what, we&#8217;re constantly getting better so it will continue to be the most exciting time to be a web designer!</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Dumb Hackers</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/dumb_hackers" />
      <id>tag:elfboy.com,2011:/1.39</id>
      <published>2011-11-25T01:25:07Z</published>
      <updated>2011-11-24T09:27:08Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <content type="html"><![CDATA[
         
      ]]></content>
    </entry>

    <entry>
      <title>Typekit Goes to Adobe</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/typekit_goes_to_adobe" />
      <id>tag:elfboy.com,2011:/1.38</id>
      <published>2011-10-04T03:07:02Z</published>
      <updated>2011-10-03T17:01:03Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Business"
        scheme="http://www.elfboy.com/site/C4"
        label="Business" />
      <content type="html"><![CDATA[
        <p>There has been quite the mixed reaction to this. Not only people completely against it and those totally for it, but most comments and tweets I&#8217;ve seen in reaction to the announcement show most people (myself included) both happy for those currently working for Typekit and worried about the future.</p>

<p>It seems that a lot of people in the web industry have a love/hate relationship with Adobe. While they make the best design products out there, they aren&#8217;t particularly loved for all the flaws software of that size comes often has. They&#8217;ve been known to not manage new acquisitions the best. Hello Macromedia. And honestly, how often does a big company snapping up an innovative small one end well for said innovation? It seems that the large corporations can&#8217;t innovate on their own so they just make a business of buying up other people&#8217;s brilliant work and calling it their own.</p>

<p>But what I&#8217;m really worried about is the future. I use Typekit on a handful of sites. I would like to continue doing so. But this is a hosted service. And just like Delicious and relics of the past like GeoCities, we&#8217;ve seen that if you don&#8217;t have the data on your own server, you cannot be sure it will always be there for you. Fonts are hardly your own content, but the idea is the same. If you don&#8217;t &#8220;own&#8221; it, you could lose it. If things go south, I&#8217;m going to really wish I just purchased the font licensing and hosted them myself. Yeah, it&#8217;s a bit more of a hassle for sure, and with all the little adjustments in rendering Typekit does to help, it isn&#8217;t quite the same as hosting your own email. Nevertheless, this just seems to add to the argument to host your own stuff so you can keep it around. Like everyone else, I really hope Adobe proves us all wrong and continues to supply a fantastic font embedding service at a reasonable price.</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Help with OAuth (in PHP)</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/help_with_oauth_in_php" />
      <id>tag:elfboy.com,2011:/1.37</id>
      <published>2011-06-15T08:16:55Z</published>
      <updated>2011-06-14T18:30:56Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Education"
        scheme="http://www.elfboy.com/site/C5"
        label="Education" />
      <category term="Programming"
        scheme="http://www.elfboy.com/site/C8"
        label="Programming" />
      <content type="html"><![CDATA[
        <p><strong>One.</strong><br />
While I don&#8217;t want to reveal too much of what I am working on quite yet, it does use Google&#8217;s API (hence the need for OAuth). Google has extensive documentation, but it isn&#8217;t always up to date. With such a wide range of technologies and versions, just be prepared to do a little sleuthing and trial and error to find which version of an API you need to use. In addition to that, the discussion lists are great resources. Search them. Not only are others possibly dealing with similar issues, but Google employees and programmers are helping and posting answers there.</p>

<p><strong>Two.</strong><br />
Code libraries are not silver bullets. I&#8217;m writing my app in PHP. A library can save you from writing a lot of code, but you still need to have a bit of a grasp behind the technology. I found that the libraries I looked at were either bloated, trying to do everything (which complicates the issue if you don&#8217;t completely understand the technology), or they were so basic that some core functionality, it would seem, wasn&#8217;t there. I ended up writing in some modifications to one of the libraries I used. Understand that a code library is not plug-and-play. You still need to learn its functions and how to use it. Hopefully it has good documentation, but that&#8217;s not always true. Read through the code and comments. Read discussion boards.</p>

<p><strong>Three.</strong><br />
Because of what I&#8217;m doing, OAuth in the Google API wasn&#8217;t enough. I needed to also use OpenID to connect. So I switched from OAuth doing both authentication (logging in) and authorization (allowing me access to user data) to just the latter. So I had to figure out how to use OpenID for authentication and make it play nice with OAuth. Yes, dancing between multiple APIs and similar words was confusing. The PHP libraries for these are written in classes (object orientated programming -> OOP). I learned PHP before it did OOP well so that was a little added learning too. I knew the idea behind the practice, but I recommend if you don&#8217;t already have a handle on classes that you learn that before jumping in. Just get a basic understanding, nothing major. Learn about private, public, protected and how the general concept works.</p>

<p><strong>Four.</strong><br />
The last thing I learned, and probably what should have been the simplest, but I struggled with, is how to implement the GET and POST requests from the Google API. I&#8217;ll claim that my brain was fried after a week of pouring through API docs, multiple libraries, official specs, and new programming methods. For example, this is what Google tells you to do to find a users recent public activity in Google Buzz:<br />
&#8220;GET <a href="https://www.googleapis.com/buzz/v1/activities/googlebuzz/@public">https://www.googleapis.com/buzz/v1/activities/googlebuzz/@public&#8221;</a><br />
I wasn&#8217;t sure what to do with that at first, especially when it came to POST methods. Is that some sort of command line thing? Or is it just a cryptic generic command? I&#8217;ve found that it&#8217;s never really explained with these things. When you go to get a code base from Google Code the first way they provide it is using SubVersion through a command line:<br />
&#8220;svn checkout <a href="http://gdata-samples.googlecode.com/svn/trunk/">http://gdata-samples.googlecode.com/svn/trunk/</a> gdata-samples-read-only&#8221;<br />
Yeah, I&#8217;m sorry, this is 2011, and I use a GUI operating system. Can&#8217;t you just give me a ZIP? Yes, they link to client programs that can access the SVN, but it&#8217;s an afterthought. </p>

<p>The whole thing is really not set up in a manner that makes for an easy entry point. Which I think is the whole problem. You are told <em>what</em> to do, but not <em>how</em> to do it. Nothing I learned this week was exceptionally difficult, but it was poorly explained which steepened the learning curve.</p>

<p>To get back to the API commands, figure out how to do a GET or POST in whatever language you are using. For me with GETs that meant I had to use OAuth to create a URL to access with file_get_contents() or cURL. I believe there are other options as well. The OAuth library builds the URL for you as you need to have your special parameters attached to it that give authorization to the data. It isn&#8217;t needed to create this URL, but it&#8217;s easier than doing it yourself (though, it is like doing it yourself, just with pre-fabricated code).</p>

<p>When it came to POST, I stuttered for a while. You have to send data, but not as normal query string parameters (those are GET variables). The data is part of the &#8220;body&#8221; of the request. Really, my best advice here is to <a href="http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/">read and use this</a>. Be sure to read a few comments too. Your web server may not allow the PHP function fopen() and you may need to use cURL. cURL is very common so you should be able to find a lot of help on it.</p>

<p><strong>Five.</strong><br />
Lastly, just keep trying and pushing. Take it in little pieces. Each step of the OAuth or OpenID connection at a time. I wish I could give easy step by step instructions, but there are resources out there for that. Google does a decent job explaining the OAuth flow. The harder part is keeping it all in your head and using it for your specific project. And since each project is unique, it&#8217;s not easy to give a list of what you should do to achieve your goals.</p>

<p><strong>OAuth Walk-through.</strong><br />
Okay, with those thoughts there, here is a small explanation of how OAuth happens. Read a few of these articles, it will make things clearer.</p>

<p>OAuth is a way for your application to access the user&#8217;s data within another application. Your application needs to send the user to the site with data you want to access to have them log in and approve your application. (The point of this is to keep your app from ever needing to see their login credentials) So, in your application, you give the user a way to start the process: a link or button for example. When this is clicked, your app needs a Request Token to give to the user when they go to authenticate. So the click loads a script on your app which builds a URL (given by the API). This is where the OAuth library is helpful – in building these URLs. Then the app performs a GET of that URL. In PHP I used file_get_contents() to do this. At this point, the user is technically still on your website loading data on your files. Your file has gone and retrieved data from another site, but the user has not left. The returned data includes the Request Token and Secret. Attach these items to another API supplied URL and then <em>send</em the user to this new authorization URL using something like the header() function in PHP. Now the user is off of your site logging into the site with the API you want access to, and telling it that yes, your app can access the user data. Prior to this you will have set a callback location that the API will send the user back to once authentication and authorization is complete. When the user returns to your app, they are sent with a new set of keys, the Authorization Token and Secret, as well as "verifier" variable. Using these, you create a third URL to GET and ask the API, again using file_get_contents() or the like, for a final set of tokens: the Access Token and Secret. With these you can access their personal data using further GETs and POSTs according to the API. You should save these for use now and next time the user arrives, perhaps in a database. They should be encrypted for safety so <a href="http://techblog.bozho.net/?p=341">read this article</a>.</p>

<p>By the end of this dance, your script has accessed the API twice through the GET method and sent the user over to the API site to log in and approve your app one time in between those GETs.</p>

<p>If you&#8217;ve made it all the way to the end of this, I&#8217;m very impressed. I feel like everything I just wrote makes this whole concept as clear as mud. I found OAuth to be the type of thing where if I could have asked someone small specific questions during the process I would have moved much quicker and grokked the concept in a day or two, not a week. If something in here doesn&#8217;t make sense, or you are stuck in your process, feel free to email me or hit me up on Twitter <a href="http://twitter.com/philiprenich">@philiprenich</a>.</p>

<p>Good luck!</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Making CSS Drop Down Menus Work on the iPhone</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/making_css_drop_down_menus_work_on_the_iphone" />
      <id>tag:elfboy.com,2011:/1.36</id>
      <published>2011-03-24T06:00:26Z</published>
      <updated>2011-03-23T19:57:27Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="CSS"
        scheme="http://www.elfboy.com/site/C10"
        label="CSS" />
      <category term="Education"
        scheme="http://www.elfboy.com/site/C5"
        label="Education" />
      <category term="HTML"
        scheme="http://www.elfboy.com/site/C11"
        label="HTML" />
      <content type="html"><![CDATA[
        <p>I recently had a client ask if I could get the drop down menus on his website to work on the iPhone. We hadn&#8217;t done anything special for mobile devices on this project, but basic navigational functionality is of course very important. I was surprised at the request because sites I&#8217;ve done before have used drop downs that worked. What was different here? If you&#8217;ve used a drop down menu on the iPhone before you know what to expect. On the first tap of the top level navigational item the second level list appears (and the link you clicked on seems to show it&#8217;s activated state &gt;&#8212;not tested). You can then select a secondary item or tap again on the main link to follow it. However, on this particular site, when the top item was tapped the drop down would display, but before anything could be done the link would be followed and you would be taken to that page. Good luck trying to stop the browser load or selecting a sub-link first!</p>

<p>After a long and fruitless search on the web I started asking some friends of mine for help and looking at sites they had developed. I noticed all the sites with correctly functioning iPhone friendly drop down menus use JavaScript.</p>

<p>Meh.</p>

<p>I&#8217;ve used SuckerFish before and it is a great script, but I&#8217;m more happy with a pure CSS solution (and I&#8217;m not supporting dead versions of IE). So I did a little sleuthing and discovered that all of these JS enabled websites toggle the display CSS rule of the sub-menu between <i>none</i> and <i>block</i>. My CSS code was toggling the left rule from <i>-999em</i> to <i>auto</i> alone. So I did some testing of different combinations and discovered that the display rule is the only one that matters. No JavaScript is required as long as you explicitly set <i>display: none;</i> as the initial rule for the sub-menu. And then on :hover you just change display to any visible option you want.</p>

<p>Try it out for yourself. Below are two CSS only drop down menus. Both will work in a desktop browser, but only the second will work correctly on an iPhone. Here are the two declarations that are added for the working drop down:</p><pre>
#ios ul { display: none; }
#ios li:hover ul { display: block; }
</pre>
<p><i>Update: As I&#8217;ve been testing this out, I just realize that setting a width on the drop down secondary list will also make it work. It doesn&#8217;t need to be on hover of course then, just on the initial declaration.</i></p> <style>
#list-example {
	position: relative;
	margin: 2em 0 10em;
	font-size: 1.4em;
	z-index: 1000;
}
#list-example ul {
	float: left;
	margin: 0 1.5em;
	font-weight: bold;
	line-height: 1.4;
}

#list-example ul ul {
	position: absolute;
	left: -999px;
	font-size: inherit;
	background-color: rgb(228, 248, 232);
	background-color: rgba(228, 248, 232, 0.4);
	border: 1px solid rgb(210, 203, 174);
	border: 1px solid rgba(210, 203, 174, 0.5);
}
#list-example ul li:hover ul { left: auto; }
#list-example ul ul li {
	width: 300px;
	padding: 5px;
}

#ios ul { display: none; }
#ios li:hover ul { display: block; }
</style>
<div id="list-example">
	<ul id="anti-ios">
		<li><a href="http://elfboy.com">This will reload the page on first tap</a>
			<ul>
				<li>Now you see me...</li>
				<li>And I'm gone!</li>
				<li><a href="http://elfboy.com">Home page</a></li>
			</ul>
		</li>
	</ul>
	<ul id="ios">
		<li><a href="http://elfboy.com">This will reveal on first tap and load on second tap</a>
			<ul>
				<li>Now you see me...</li>
				<li>Hey, I'm still here!</li>
				<li><a href="http://elfboy.com">Home page</a></li>
			</ul>
		</li>
	</ul>
</div>
<div style="clear: both"></div>
      ]]></content>
    </entry>

    <entry>
      <title>An Idea to Help Christchurch</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/an_idea_to_help_christchurch" />
      <id>tag:elfboy.com,2011:/1.35</id>
      <published>2011-02-23T15:53:14Z</published>
      <updated>2011-02-23T00:20:15Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Business"
        scheme="http://www.elfboy.com/site/C4"
        label="Business" />
      <category term="Life"
        scheme="http://www.elfboy.com/site/C7"
        label="Life" />
      <category term="Personal"
        scheme="http://www.elfboy.com/site/C3"
        label="Personal" />
      <category term="Travel"
        scheme="http://www.elfboy.com/site/C9"
        label="Travel" />
      <content type="html"><![CDATA[
        <p><b>Dear Web Designers &amp; Developers in Christchurch,</b></p>

<p>The first thing that needs to be said is to all Canterburians and Kiwis at large and is that my heart goes out to you all affected by the tragedy of the earthquake. My prayers are for you and your loved ones, and my thoughts are with you all. I lived in Christchurch for a short time, but even being only a temporary resident it is heartbreaking to watch the news coverage. I&#8217;m still waiting to hear about the safety of a couple of friends. I can&#8217;t imagine the strength it takes to walk through what you are experiencing.</p>

<p>I want to help, but what can I do some 12,000km away? I can&#8217;t move rubble, I can&#8217;t offer housing, I can&#8217;t make you a hot meal, or even give you a comforting hug and shoulder to lean on. I&#8217;m not really even in a position to help much financially, though I am going to try to see if I can give to the Red Cross.</p>

<p>So what can I do? I don&#8217;t know, but here&#8217;s an idea. I&#8217;m just going to throw it out there and we can work out the &#8220;how.&#8221; I&#8217;m a web designer and developer. I don&#8217;t have a huge workload currently. Last I heard 50% of Christchurch was out of power and of course the CBD is closed down. Maybe I can help out those of you who are in the web industry by helping you complete your projects. Maybe you had client work that was supposed to be done in the next couple of weeks. Even if you have your laptop out to an Internet connection, my guess is work will not be full steam ahead for a while, and probably shouldn&#8217;t.</p>

<p>That&#8217;s my idea then. Can I help any Christchurch web agencies or freelancers with immediate needs? Maybe just taking some of the workload will give you the chance to go spend time with your mum or help your neighbors. Some of my friends in the New Brighton area were asking for help getting their house and yard in order. I&#8217;ll handle some of your web projects, you take care of yourself and neighbors. Who knows, maybe others in the industry around the world will step forward too.</p>

<p>Details? I don&#8217;t know, let&#8217;s not worry about that. This is about how I can help the country and city I consider my second home while I&#8217;m still in America. I&#8217;ll be over for a visit in a few weeks and hopefully I can help in other ways then. For now, this is all I&#8217;ve been able to come up with.</p>

<p>There&#8217;s a contact form here you can reach me at or on Twitter @philiprenich</p>

<p>With lots of love,<br />
Philip</p> 
      ]]></content>
    </entry>

    <entry>
      <title>CSS3 Multiple Background Images</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/css3_multiple_background_images" />
      <id>tag:elfboy.com,2011:/1.34</id>
      <published>2011-02-02T03:15:44Z</published>
      <updated>2011-02-01T11:46:45Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <content type="html"><![CDATA[
        <p>According to the <a href="http://www.w3.org/TR/css3-background" title="W3C spec">CSS3 spec for backgrounds and borders module</a>, the allowed values for background-image are a color, an image, none (the default), or inherit. Now the way multiple backgrounds work is that you list each one in the background-image property in a comma separated list which appear in a descending order of top to bottom visually. You then can use the other background properties to manipulate each one, using the same comma style.</p>

<p>Here&#8217;s my problem. When the user hovers (or touches in the iPad case) the button I am changing the color of the gradient. I have a lot of these buttons, each with a unique icon but the same gradients. I would like to declare only once in my CSS what the hover state does. However, it seems that it is impossible to change only the gradient without mentioning the icon as well, as there are two backgrounds per button. By not declaring the icon it is removed on hover. This means that for every unique button, I must have a unique hover rule as well. (As an aside it also means that every button declaration in the CSS requires me to not only specify the unique icon, but to repeat the gradient code as well)</p>

<p>I would like to try to find a way, if possible, to only have to declare the hover state one time for all buttons so that the icon would remain declared automatically from the normal state. I&#8217;ve tried &#8220;inherit&#8221; and that just breaks the rule completely. Has anyone ever tried this and found a method?</p>

<p>Here&#8217;s a <a href="http://dev.elfboy.com/multiplebackgrounds">quick little page</a> to demonstrate what I am talking about (WebKit or Firefox). Please leave any ideas or thoughts in the comments. Thank you!</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Twenty&#45;Ten</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/twenty-ten" />
      <id>tag:elfboy.com,2011:/1.33</id>
      <published>2011-01-03T05:26:12Z</published>
      <updated>2011-01-02T13:29:14Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="Life"
        scheme="http://www.elfboy.com/site/C7"
        label="Life" />
      <category term="Personal"
        scheme="http://www.elfboy.com/site/C3"
        label="Personal" />
      <category term="Travel"
        scheme="http://www.elfboy.com/site/C9"
        label="Travel" />
      <content type="html"><![CDATA[
        <p><b>Countries: Four</b><br />
(United States, Canada, Mongolia, Philippines)</p>

<p><b>States: Six</b><br />
(Oregon, Washington, Colorado, Utah, Idaho, Nevada)</p>

<p><b>Cities: Twelve</b><br />
(Only visits where I stayed all day or slept there)</p>

<p><b>Lived: Six</b><br />
(Places I lived one month or longer)</p>

<p><b>Beds: Twenty</b><br />
(Including one under the stars)</p>

<p><b>Planes: Fifteen</b><br />
(Counting connections)</p>

<p><b>Airports: Twelve</b><br />
(Unique ones)</p>

<p><b>Airlines: Six</b></p>

<p>I lived out of a suitcase quite a lot this past year. I don&#8217;t expect that to change much this year.</p>

<p>And you know what the best part of all of that was? It wasn&#8217;t seeing the piece of land my brother is working to preserve while simultaneously develop education in Mongolia, it wasn&#8217;t the mango smoothies in a marketplace in the Philippines while our military escort filtered through the crowd. Nor was it the beauty of Estes Park in Colorado or morning runs and swims in the lake in the Central Oregon wilderness.</p>

<p>It was the people all along the way.</p>

<p>It&#8217;s my friends and teammates from Ultimate Frisbee who, only knowing me for a short while, are sad to see me go.<br />
It&#8217;s the random man who paid for my taxi in Manila, the friendly lady who passed the time with me in the airport in Ulaanbataar.<br />
The nuns who showed boundless hospitality.<br />
The people who held long conversations with me to challenge my attitudes, thoughts, and beliefs.</p>

<p>And suddenly I&#8217;m stuck because of the overwhelming amount of incredible people I know and met this year. It&#8217;s painfully beautiful.</p>

<p>The best thing for me in traveling is the awesome people I meet: be it in transit at the airport or welcoming me into their homes and life at the destination. It&#8217;s also the hardest part because I&#8217;m always picking up and leaving again.</p>

<p>My friends complain about me traveling because they are afraid I won&#8217;t come back. It&#8217;s love. What I&#8217;m not sure they understand is that it&#8217;s not just I who am gone from their lives for that time, but they who are gone from my life.</p>

<p>Sometimes I half-seriously joke about there being too many awesome people in this world. You can&#8217;t know or be with them all. But you want to, because they are incredible and have an amazing story. I want to know what makes everyone tick: what makes them love and hurt. But that&#8217;s not really possible, there isn&#8217;t time or space with so many people.</p>

<p>I haven&#8217;t come to terms with that yet; I&#8217;m not sure I want to.</p> 
      ]]></content>
    </entry>

    <entry>
      <title>Percentage Widths Flexbox Problem</title>
      <link rel="alternate" type="text/html" href="http://www.elfboy.com/site/percentage_widths_flexbox_problem" />
      <id>tag:elfboy.com,2010:/1.32</id>
      <published>2010-10-20T05:36:02Z</published>
      <updated>2010-10-19T16:24:03Z</updated>
      <author>
            <name>Philip</name>
            <email>info@elfboy.com</email>
            <uri>http://elfboy.com</uri>      </author>

      <category term="CSS"
        scheme="http://www.elfboy.com/site/C10"
        label="CSS" />
      <content type="html"><![CDATA[
        <p>The CSS:</p><pre>
#box {
	display: -moz-box;
	-moz-box-orient: horizontal;
	width: 1000px;
	background-color: #ccc;
}
#box div {
	margin: 10px;
	padding: 10px;
	width: 20%;
	background-color: cyan;
	border: 1px solid #000;
}
</pre>

<p>And the HTML:</p><pre>
&lt;div id="box"&gt;
	&lt;div&gt;one&lt;/div&gt;
	&lt;div&gt;two&lt;/div&gt;
	&lt;div&gt;three&lt;/div&gt;
&lt;/div&gt;
</pre>

<p>And this is an image of what I&#8217;m getting in Firefox 3.6<br />
<img src="http://www.elfboy.com/images/uploads/flexbox_test1.png" style="border: 0;" alt="image" width="959" height="78" /></p>

<p>Maybe using percentages for the children of a box is not allowed, but that seems really silly to me. Am I doing it wrong? Has Firefox not yet implemented flexbox completely (or accurately?)</p>

<p>Thanks for the help!</p>

<p><b>Update:</b><br />
<a href="http://twitter.com/travinsf" title="Twitter profile">@TravInSF</a> noted that I hadn&#8217;t tested in WebKit browsers. Upon doing so I found that it works as expected. Perhaps this is a Firefox bug / non-implementation.</p> 
      ]]></content>
    </entry>


</feed>