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

 <title>Dave Dash</title>
 <link href="http://davedash.com/tag/startups/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/startups"/>
 <updated>2012-01-17T21:54:19-08:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <entry>
   <title>Using sfDoctrine to match allowed email domains</title>
   <link href="http://davedash.com/2007/07/09/using-sfdoctrine-to-match-allowed-email-domains/"/>
   <updated>2007-07-09T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/07/09/using-sfdoctrine-to-match-allowed-email-domains</id>
   <content type="html">&lt;p&gt;[tags]php, propel, doctrine, validators, symfony, optiopt, startup[/tags]&lt;/p&gt;

&lt;p&gt;I'm a co-founder at an online finance web site and I'm in charge with building out the site.  Our rollout strategy is to let a a handful of companies at a time, so we're limiting registration based on your company's email address.&lt;/p&gt;

&lt;p&gt;I decided to follow the bandwagon and use PHP Doctrine.  We'll define two objects, &lt;code&gt;Company&lt;/code&gt; and &lt;code&gt;CompanyDomain&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Company:
  tableName: company
  columns:
    name: {type: string(100)}
    created_at: timestamp
    updated_at: timestamp

CompanyDomain:
  tableName: company_domain
  columns:
    company_id:
      foreignClass: Company
      cascadeDelete: true
    pattern: {type: string(100)}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Where a &lt;code&gt;CompanyDomain&lt;/code&gt; represents a domain name for a company.  E.g. Motorola might have both &lt;code&gt;motorola.com&lt;/code&gt; and &lt;code&gt;mot.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can validate a signup form and see if we've got an email address from a domain we recognize.  I like using the &lt;code&gt;validationXXX&lt;/code&gt; methods in an action class for specific validation.  I made one called &lt;code&gt;validateSignup&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public function validateSignup()
{
    if ($this-&amp;gt;isPost())
    {
        $email = $this-&amp;gt;getRequestParameter('company_email');
        if (!$company = CompanyTable::match($email))
        {
            $this-&amp;gt;getRequest()-&amp;gt;setError('company_email', 'Your work email doesn\'t appear to belong to any of the registered companies.');
            return false;
        }
        return true;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In our &lt;code&gt;CompanyTable&lt;/code&gt; we create a static function &lt;code&gt;CompanyTable::match&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;static public function match($email)
{
    $company = Doctrine_Query::create()-&amp;gt;from('Company c, c.CompanyDomains d')-&amp;gt;where('? LIKE CONCAT(\'%\', pattern)', $email)-&amp;gt;execute()-&amp;gt;getFirst();

    return $company;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that we transparently do a join in the &lt;code&gt;-&amp;gt;from()&lt;/code&gt; statement.  If there's a match we get a company object (which we can associate with the new user) otherwise we get a &lt;code&gt;null&lt;/code&gt; object.&lt;/p&gt;

&lt;p&gt;Enjoy.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Finding a co-founder</title>
   <link href="http://davedash.com/2007/04/05/finding-a-co-founder/"/>
   <updated>2007-04-05T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/04/05/finding-a-co-founder</id>
   <content type="html">&lt;p&gt;[tags]startups[/tags]
A friend of mine directed me to &lt;a href=&quot;http://www.paulgraham.com/notnot.html&quot;&gt;Why to Not Not Start a Startup&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Not having a cofounder is a real problem. A startup is too much for one person to bear. And though we differ from other investors on a lot of questions, we all agree on this. All investors, without exception, are more likely to fund you with a cofounder than without.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is probably the single largest road-block in the way of starting a start-up.  One solution is to move to where there are more interested parties (e.g. Silicon Valley), but that's not always an easy option (although I'm warming up to it, Minneapolis isn't exactly heaven for several months out of the year).&lt;/p&gt;

&lt;p&gt;Another option is to find someone online.  &lt;a href=&quot;http://www.subelsky.com/2007/03/first-web-app-launch_10.html&quot;&gt;Mike Subelsky&lt;/a&gt; created &lt;a href=&quot;http://www.founderfinder.com/&quot;&gt;Founder Finder&lt;/a&gt; as an attempt at addressing this very issue.&lt;/p&gt;

&lt;p&gt;Unfortunately, deep down inside I think that is a difficult proposition as well.  &lt;em&gt;I&lt;/em&gt; have a &lt;a href=&quot;http://spindrop.us/2007/03/01/how-do-you-find-good-programmers/&quot;&gt;hard time finding good programmers&lt;/a&gt;, I've worked as a one-man island most of my life, and haven't maintained good contact with my fellow CS major's from &lt;a href=&quot;http://uiuc.edu/&quot;&gt;UIUC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Believe it or not, social networking is helping in some ways, because I'm able to reconnect with people I knew at one time or another who are very much start-up driven and really have the drive.&lt;/p&gt;

&lt;p&gt;A better network of developers needs to exist, not just people we scrape out of monster.com and jobster... how's that for a cheap idea?&lt;/p&gt;
</content>
 </entry>
 

</feed>

