<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Hieu Blog</title>
	<atom:link href="http://hieuvadiep.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hieuvadiep.com</link>
	<description>Get updates of us from here</description>
	<pubDate>Thu, 12 Nov 2009 17:45:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>mytop to monitor mysql</title>
		<link>http://hieuvadiep.com/2009/11/13/mytop-to-monitor-mysql/</link>
		<comments>http://hieuvadiep.com/2009/11/13/mytop-to-monitor-mysql/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:45:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Personal Life]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=79</guid>
		<description><![CDATA[With the basic operation of mytop covered, let&#8217;s look at the steps you take to perform common tasks using mytop. This it intended to give you a hands-on feel for using mytop.
Find, analyze, and kill long-running queries
When mytop starts, it sorts threads by the Time column—that is, how long the thread has been in that [...]]]></description>
			<content:encoded><![CDATA[<p>With the basic operation of mytop covered, let&#8217;s look at the steps you take to perform common tasks using mytop. This it intended to give you a hands-on feel for using mytop.</p>
<p><strong>Find, analyze, and kill long-running queries</strong><br />
When mytop starts, it sorts threads by the Time column—that is, how long the thread has been in that state. Those that have most recently changed appear at the top of the screen. To locate long-running queries, first remove all idle threads from the display by pressing i, then reverse the sort order by pressing o. The resulting display will show the longest running queries at the top of the screen.</p>
<p>Once you&#8217;ve located a long-running query, you can obtain the full query by pressing f and entering the thread ID when prompted. When looking at the full query, you can ask MySQL to explain the query by pressing e. Or you may kill the query by pressing k and supplying the thread ID.[1]</p>
<p>[1] In MySQL 3.23 and 4.0, killing a query also terminates the client&#8217;s connection to the server. In other words, it kills the connection, and the query dies as a byproduct of that.</p>
<p><strong>Determine what type of queries MySQL has been running</strong><br />
It&#8217;s often useful to know whether MySQL is running more SELECT or more INSERT queries. Maybe you suspect an application is misbehaving, or perhaps you&#8217;d simply like to compute your server&#8217;s typical read to write ratio. In mytop&#8217;s thread view (Figure B-1), it displays the percentage of SELECT, INSERT, UPDATE, and DELETE queries. On the right side of the header, you&#8217;ll see something like this:</p>
<p>Se/In/Up/De(%): 61/30/02/05</p>
<p>&#8230;  63/07/12/10<br />
The first line means that, overall, 61% of the server&#8217;s queries are SELECTs, 30% are INSERTs, 2% are UPDATEs, and 5% are DELETEs. The second line displays values that apply to the last refresh interval (5 seconds by default) only. The two together can give a quick feel for what your server has been doing recently and how that compares to the longer term average.</p>
<p>If you want more detail, press c to switch mytop into command view. There you&#8217;ll find detailed counts and percentages for each type of command or query executed. The first column of numbers summarizes overall counts (since the server was started or counters reset), while the second set of numbers reflects the last refresh interval only.</p>
<p><strong>Kill a group of queries</strong><br />
Use mytop&#8217;s &#8220;super-kill&#8221; feature by pressing K. You&#8217;ll be prompted for a username, and mytop will then kill all of that user&#8217;s threads. In the future this may be extended to evaluate more complex expressions, such as killing all nonidle threads from a given hostname or IP address.</p>
<p><strong>Limit the display to a particular user or host</strong><br />
You can ask mytop to filter out all threads except those from a given host or those owned by a given user. If you press u, mytop prompts for a username to filter on. Similarly, pressing h allows you to provide a hostname or IP address which is used to filter the display. If you supply both, mytop restricts the display based on both criteria.</p>
<p>To clear the filtering, you can press F to remove all filters at once. Otherwise, you can use the u or h keys to remove either of the filters manually.</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/11/13/mytop-to-monitor-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache and mysql keeps crashing</title>
		<link>http://hieuvadiep.com/2009/10/07/apache-and-mysql-keeps-crashing/</link>
		<comments>http://hieuvadiep.com/2009/10/07/apache-and-mysql-keeps-crashing/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 14:16:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Works]]></category>

		<category><![CDATA[apache crash]]></category>

		<category><![CDATA[biethet]]></category>

		<category><![CDATA[server crash]]></category>

		<category><![CDATA[too many connections]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=77</guid>
		<description><![CDATA[Today is a terrible day. After many failed attempts to correct the server which kept crash and crash, we finally mediated the problem.
Symtoms:
- Apache crashed every 5 minutes. top command shows a high number of ilde httpd requests (negative priority)
- mySql kept saying too many connections
- Reboot server comes to file system failure. Use fsck [...]]]></description>
			<content:encoded><![CDATA[<p>Today is a terrible day. After many failed attempts to correct the server which kept crash and crash, we finally mediated the problem.</p>
<p>Symtoms:</p>
<p>- Apache crashed every 5 minutes. top command shows a high number of ilde httpd requests (negative priority)</p>
<p>- mySql kept saying too many connections</p>
<p>- Reboot server comes to file system failure. Use fsck to get it back online but problem persits.</p>
<p>Finally:</p>
<p>- Enable http_access log on httpd.conf to see where it is because of DOS attack. It turned out yes. The IP 79.125.40.218 which comes from Amazon data services send out a high number of GET request to our server.</p>
<p>- Ban the IP from httpd.conf : deny from 79.125.40.218. Voila, system is fine again.</p>
<p>We will consider using iptables to more effectively ban ips.</p>
<p>Thanks God. The server is up.</p>
<p><a title="Biet het" href="http://www.Biethet.com">Biethet.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/10/07/apache-and-mysql-keeps-crashing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get Rid Of Jackass Clients</title>
		<link>http://hieuvadiep.com/2009/09/27/get-rid-of-jackass-clients/</link>
		<comments>http://hieuvadiep.com/2009/09/27/get-rid-of-jackass-clients/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 14:02:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Works]]></category>

		<category><![CDATA[customer]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=75</guid>
		<description><![CDATA[A very good article from Forbes.com which counters the thinking that customers are king !
The customer is not always right&#8211;so fire your wrong ones.
Jackasses have been in the news lately, with President Obama caught on an open mike observing that Kanye West was one after the rapper made a fool of himself at the recent [...]]]></description>
			<content:encoded><![CDATA[<p>A very good article from Forbes.com which counters the thinking that customers are king !</p>
<h2 class="storyDek">The customer is not always right&#8211;so fire your wrong ones.</h2>
<p>Jackasses have been in the news lately, with President Obama caught on an open mike observing that <a style="border-bottom: 1px dotted; color: #003399; text-decoration: none; cursor: pointer; display: inline; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: 400; font-style: normal;" rel="nofollow" href="http://topics.forbes.com/Kanye%20West">Kanye West</a> was one after the rapper made a fool of himself at the recent MTV Video Music Awards. Jackasses are always with us in business too. Robert Sutton in his book (using a cruder term for the same sort of person) <em>The No Asshole Rule: Building a Civilized Workplace and Surviving One That Isn&#8217;t,</em> argues that talented yet disruptive employees always cause more harm than good. He says you need to either reform them or push them out. But what about when it&#8217;s not employees but clients who are difficult, who berate your team and make you waste time running around in circles? Should you just suck it up and make sure you hit the quarterly numbers? Or should you fire those customers?</p>
<p>Companies need to exceed the expectations of customers to create brand loyalty, as I wrote in <a href="http://www.forbes.com/2009/07/24/united-airlines-lessons-leadership-managing-mistakes.html">&#8220;United Airlines Shows How Not to Run Your Business.&#8221;</a> After all, it costs less to sell new products and services to current customers than to acquire new ones. But the old adage that the customer is always right is just plain wrong. Customers are not always right, and you should not always let them run all over you.</p>
<p>That might sound counterintuitive if your company is struggling just to scrape by in this difficult economic time, but you have to get rid of bad clients. Jackass clients, just like difficult employees, can destroy a business by destroying morale and diverting attention from growing the business. Cutting clients isn&#8217;t easy, especially if they&#8217;re big ones, but companies need to do it more often.</p>
<p>How do you know if you should fire a client? Look for these three signals:</p>
<p>First, too often executives, especially small business owners, spend so much time and energy servicing difficult clients that they&#8217;re unable to canvass for new business. Relying on just a few clients is a killer. Basing your whole business on one or two income sources is simply too risky. If you find yourself spending so much time and effort on one difficult client that you&#8217;re neglecting your other clients, or if you&#8217;re not able to search for new ones, then you know you have a problem.</p>
<p>Keep in mind the 80-20 rule. At most companies, about 80% of the revenue comes from 20% of the clients. If you find you&#8217;re spending too much time on an unproductive client, fire them. Analyze where you spend most of your time and effort. You&#8217;re likely to learn that you spend the most time on the least important clients. That&#8217;s because more important clients already trust you and are therefore easier to please.</p>
<div id="related" class="storyBoxes"></div>
<div id="commBox" class="commStory"><script type="text/javascript">rtsUtil.addRtsBox('rateStoryP2',{source_type:"story",source_id:"2009/09/16/jackass-client-customer-leadership-managing-firing.html"});</script></div>
<p>Second, remember that if your company is like most, your employees are your greatest asset. A good management team can squeeze profits out of bad products, and a bad management team can kill even the best ideas. The key is to retain your best people. In the long run they will help you make far more profits than the one difficult client who may drive them away.</p>
<p>If your employees look haggard and even the go-getters among them hesitate to take on a new project with a particular client, it&#8217;s time to investigate. Sometimes an employee will leave a company because of unhappiness with day-to-day client work, rather than because of bosses or colleagues. This is especially true in service industries like law, medicine and accounting, where one spends more time with clients than with co-workers. It is terrible to work in an environment where the client makes your life miserable and your boss fails to back you up. Everybody wants to work in a humane environment where they feel valued and supported.</p>
<p>Bad morale also exhausts employees and makes them unable to think clearly and plot the best courses for future success.</p>
<p>Finally, life is short. While we all have to put up with difficult situations and people sometimes, you can&#8217;t let chronically difficult clients affect the health and well-being of your family. If your kids or significant other tell you you&#8217;re especially grumpy, then think about whether a client is causing your stress, and whether that stress is worth it. Most of the time it isn&#8217;t.</p>
<p>High-paying jobs and the resulting benefits like vacation homes, jewelry and gadgets are great, but at the end of the day, always remember why you work so hard.</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/09/27/get-rid-of-jackass-clients/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD sendmail start stop</title>
		<link>http://hieuvadiep.com/2009/09/02/freebsd-sendmail-start-stop/</link>
		<comments>http://hieuvadiep.com/2009/09/02/freebsd-sendmail-start-stop/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 04:05:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Personal Life]]></category>

		<category><![CDATA[freebsd]]></category>

		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=71</guid>
		<description><![CDATA[To stop sendmail:
cd /etc/mail
make stop
To start sendmail:
cd /etc/mail
make start
To restart sendmail:
cd /etc/mail
make restart
To get sendmail to regenerate aliases, the virtual user table and other stuff, run make on its own like so:
cd /etc/mail
make
After running &#8220;make&#8221; on its own, sendmail automatically  reads all the files so you shouldn&#8217;t need to restart sendmail yourself  at [...]]]></description>
			<content:encoded><![CDATA[<p>To stop sendmail:</p>
<p><code class="block">cd /etc/mail<br />
make stop</code></p>
<p>To start sendmail:</p>
<p><code class="block">cd /etc/mail<br />
make start</code></p>
<p>To restart sendmail:</p>
<p><code class="block">cd /etc/mail<br />
make restart</code></p>
<p>To get sendmail to regenerate aliases, the virtual user table and other stuff, run make on its own like so:</p>
<p><code class="block">cd /etc/mail<br />
make</code></p>
<p>After running &#8220;make&#8221; on its own, sendmail automatically  reads all the files so you shouldn&#8217;t need to restart sendmail yourself  at this point.</p>
<p>The header information from the Makefile in /etc/mail contains information about commands that can be passed to make. The top of this file is listed below.</p>
<p><code class="block"># This Makefile provides an easy way to generate the configuration<br />
# file and database maps for the sendmail(8) daemon.<br />
#<br />
# The user-driven targets are:<br />
#<br />
# all       - Build cf, maps and aliases<br />
# cf         - Build the .cf file from .mc file<br />
# maps      - Build the feature maps<br />
# aliases - Build the sendmail aliases<br />
# install - Install the .cf file as /etc/mail/sendmail.cf<br />
#<br />
# For acting on both the MTA daemon and MSP queue running daemon:<br />
# start            - Start both the sendmail MTA daemon and MSP queue running<br />
#                        daemon with the flags defined in /etc/defaults/rc.conf or<br />
#                        /etc/rc.conf<br />
# stop             - Stop both the sendmail MTA daemon and MSP queue running<br />
#                        daemon<br />
# restart         - Restart both the sendmail MTA daemon and MSP queue running<br />
#                        daemon<br />
#<br />
# For acting on just the MTA daemon:<br />
# start-mta      - Start the sendmail MTA daemon with the flags defined in<br />
#                        /etc/defaults/rc.conf or /etc/rc.conf<br />
# stop-mta       - Stop the sendmail MTA daemon<br />
# restart-mta   - Restart the sendmail MTA daemon<br />
#<br />
# For acting on just the MSP queue running daemon:<br />
# start-mspq    - Start the sendmail MSP queue running daemon with the<br />
#                        flags defined in /etc/defaults/rc.conf or /etc/rc.conf<br />
# stop-mspq      - Stop the sendmail MSP queue running daemon<br />
# restart-mspq - Restart the sendmail MSP queue running daemon<br />
#<br />
# Calling `make' will generate the updated versions when either the<br />
# aliases or one of the map files were changed.<br />
#<br />
# A `make install` is only necessary after modifying the .mc file. In<br />
# this case one would normally also call `make restart' to allow the<br />
# running sendmail to pick up the changes as well.<br />
</code></p>
<p><!-- google_ad_section_end --></p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/09/02/freebsd-sendmail-start-stop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache Wildcard Subdomains *.example.com</title>
		<link>http://hieuvadiep.com/2009/07/04/apache-wildcard-subdomains-examplecom/</link>
		<comments>http://hieuvadiep.com/2009/07/04/apache-wildcard-subdomains-examplecom/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 15:44:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Personal Life]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=69</guid>
		<description><![CDATA[
 


Every account for our server monitoring application, Server Density, is accessed under a unique URL such as http://example.serverdensity.com. This gives each account a unique identifier for our internal account management system.
Although each customer has their own database which is linked by their unique URL, there is only 1 copy of the application code itself. [...]]]></description>
			<content:encoded><![CDATA[<div class="post-header"></div>
<p><!--end post header--> <!--end meta--></p>
<div class="entry clear">
<div class="snap_preview">
<p>Every account for our server monitoring application, Server Density, is accessed under a unique URL such as http://example.serverdensity.com. This gives each account a unique identifier for our internal account management system.</p>
<p>Although each customer has their own database which is linked by their unique URL, there is only 1 copy of the application code itself. Wildcard domains are used to allow any subdomain to be used.</p>
<p><code>*.serverdensity.com</code></p>
<p>means you can use</p>
<p><code>hello.serverdensity.com<br />
cheese.serverdensity.com<br />
whateveryouwant.serverdensity.com</code></p>
<p>without needing any kind of additional configuration of Apache or the DNS for serverdensity.com.</p>
<p>In our DNS zone for serverdensity.com, we have the usual entries but there is also the following record:</p>
<p><code>*.serverdensity.com.  	serverdensity.com.  	CNAME</code></p>
<p>This refers to</p>
<p><code>serverdensity.com.  	67.23.6.201  	A</code></p>
<p>because we currently have a single server set up for beta test accounts. As the service grows, this will be replaced by appropriate load balanced servers but for now, a single machine is handling requests.</p>
<p>The Apache config uses name based virtual hosts and we define a single vhost for the *.serverdensity.com domain:</p>
<p><code>ServerAdmin customer.service@boxedice.com<br />
ServerName *.serverdensity.com<br />
DocumentRoot /path/to/sd/<br />
ErrorLog /path/to/sd/error.log</code></p>
<p>All requests to any subdomain are therefore picked up he DNS wildcard and passed to Apache, which also handles the wildcard, with the application code handling the requests. The subdomain used is made available in PHP in the $_SERVER['SERVER_NAME'] variable so it is easy to pick out which customer database to load.</p>
<p>The advantages of this system are:</p>
<ul>
<li>Only a single copy of the Server Density application code base needs to be deployed.</li>
<li>Customers can have their own unique URL.</li>
<li>No additional configuration is required for domains or Apache, which would result in large config files.</li>
<li>Requests are all handled by a single DNS zone which makes it easy to swap in a load balancer to distribute requests across multiple servers.</li>
<li>Requests can be individually linked to customer accounts so we could track down heavy usage or link error reports to a customer to help us reproduce and diagnose problems faster.</li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/07/04/apache-wildcard-subdomains-examplecom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>10 Quick Tips for an Easier CSS Life</title>
		<link>http://hieuvadiep.com/2009/05/16/10-quick-tips-for-an-easier-css-life/</link>
		<comments>http://hieuvadiep.com/2009/05/16/10-quick-tips-for-an-easier-css-life/#comments</comments>
		<pubDate>Sat, 16 May 2009 02:57:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Personal Life]]></category>

		<category><![CDATA[css tips]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=67</guid>
		<description><![CDATA[This nice article for Css designer. Found at :http://www.search-this.com/2007/03/26/10-quick-tips-for-an-easier-css-life/
**********
As with most things, a logical and structured approach is the best way to go. Therefore I have put together 10 quick tips (in no special order) to help make your CSS coding as pain-free as possible.
1. Keep it Simple
This may sound obvious but if you find [...]]]></description>
			<content:encoded><![CDATA[<p>This nice article for Css designer. Found at :http://www.search-this.com/2007/03/26/10-quick-tips-for-an-easier-css-life/</p>
<p>**********</p>
<p>As with most things, a logical and structured approach is the best way to go. Therefore I have put together 10 quick tips (in no special order) to help make your CSS coding as pain-free as possible.</p>
<p>1. <strong>Keep it Simple</strong></p>
<p>This may sound obvious but if you find yourself using complicated coding to achieve your design then you should think again about whether the feature you need is really necessary or if you&#8217;re just thinking about your design and not your visitors. Too often designers get caught up in their own design and go to great lengths to produce a certain visual effect only to find later on that visitors find it either irritating or unusable.</p>
<p>Complex code is usually the result of muddled thinking. Plan your layout logically and work from the outside in and from the top down where possible. Look at what containers you will need and break jobs down into smaller parcels. I usually start with a page wrapper and then progress logically through the header, navigation, main content and footers etc trying to preserve the flow of the document as much as possible.</p>
<p>While good visual design is necessary to attract visitors you must still have good content and a usable and accessible site. If you find your html and css looks like spaghetti then have a re-think and see if you can simplify it. This will make it easier to maintain in the future and will often save code and bandwidth.</p>
<p>2. <strong>Don&#8217;t use hacks unless its a known and documented bug</strong></p>
<p>This is an important point as I too often see hacks employed to fix things that aren&#8217;t really broken in the first place. If you find that you are looking for a hack to fix a certain issue in your design then first do some research (Google is your friend here) and try to identify the issue you are having problems with.</p>
<p>If you find its a known bug then 99% of the time there will be a known solution to this bug and you can safely use a hack if required knowing that you are fixing a bug and not just correcting bad coding.</p>
<p>I couldn&#8217;t count the number of times I&#8217;ve seen layouts using hacks when all that was needed was to control the default margins on the page (see next tip).</p>
<p>3. <strong>Take care of margins and padding on all elements that you use</strong></p>
<p>All browsers apply default padding and margins to most elements and the amount they apply varies quite substantially. Therefore you need to explicitly control the padding and margins on all the elements you use.</p>
<p>This is covered in depth in this article <a href="http://www.search-this.com/2007/03/12/no-margin-for-error/">&#8220;No Margin For Error&#8221;</a>.</p>
<p>4. <strong>Avoid using too much absolute positioning</strong></p>
<p>Most novices to CSS quickly latch on to absolute positioning because it is pretty straight-forward and does what it says on the box. However absolute layouts have a number of problems and the biggest problem of all is that absolute elements are removed from the flow.</p>
<p>This means that when you absolutely place an element then it has total disregard to whatever else is on your page. It will overlap whatever was in that position and will take no notice of other content at all. The result of too much absolute positioning is that you end up having to control everything with absolute positioning and makes for a very rigid and inflexible layout.</p>
<p>The most common problem encountered when using absolute positioning for two or three columns is &#8220;How to put a footer at the bottom of all three columns?&#8221; The answer is you can&#8217;t, unless you resort to scripting or use a fixed height for all three columns.</p>
<p>Instead you should look into using mostly static positioning, margins and floats to maintain the flow of the layout. Static positioning is the default and basically means no positioning at all and the elements just take up space in the normal flow of the document. If elements flow normally then they have a logical construction and one element follows another without having to position it at all. You can use margins to nudge elements into position or use floats when you want elements aligned horizontally.</p>
<p>5. <strong>Avoid &#8220;divitus&#8221;</strong></p>
<p>Although &#8220;divitus&#8221; isn&#8217;t a real word it is now commonly used to refer to layouts that have too many divs and not enough semantic html. Semantic html means using the correct html element for the task in hand and not just using divs for everything. Divs are generic dividers of page content and nothing else. 99% of the time there will be an html tag perfect for the job in hand.</p>
<p><strong> e.g. p,h1,h2,h3,h4,h5,h6,ul,ol,dl etc&#8230;</strong></p>
<p>Use divs to divide the page into logical sections or when there is no better alternative. If your page is logically divided into sections that use id&#8217;s to identify each section then this will allow you to target inner elements in that section without having to over-use classes on each element</p>
<p>e.g. #top-section h1 {color:red}(see next tip on &#8220;classitus&#8221;).</p>
<p>A common misuse of divs can be found in the following example:</p>
<div class="syntax_hilite"><span class="langName">HTML:</span></p>
<div id="html-1">
<div class="html">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="font-weight: bold; color: #000000;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&#8220;header&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="font-weight: bold; color: #000000;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;bold&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Heading<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="font-weight: bold; color: #000000;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&#8220;subheader&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="font-weight: bold; color: #000000;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;bold&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Sub Heading<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="font-weight: bold; color: #000000;">&lt;div&gt;</span></a></span>This is the content<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/div&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>A lot of times the above code can simply be reduced to this:</p>
<div class="syntax_hilite"><span class="langName">HTML:</span></p>
<div id="html-2">
<div class="html">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="font-weight: bold; color: #000000;">&lt;h1&gt;</span></a></span>Heading<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/h1&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h2.html"><span style="font-weight: bold; color: #000000;">&lt;h2&gt;</span></a></span>Sub Heading<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/h2&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="font-weight: bold; color: #000000;">&lt;p&gt;</span></a></span>This is the content<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/p&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>As you can see, by using the correct html to describe the content you give your layout inherent structure and meaning without any extra effort.</p>
<p>6. <strong>Avoid &#8220;Classitus&#8221;</strong></p>
<p>&#8220;Classitus&#8221; is another made up word similar to &#8220;divitus&#8221; (as explained above) and refers to the over-use of classes (or id&#8217;s) when in fact none are necessary. If your page is logically divided then you can target many specific elements without the need for millions of classes.</p>
<p>A common example of misuse of classes is shown below:</p>
<div class="syntax_hilite"><span class="langName">CSS:</span></p>
<div id="css-3">
<div class="css">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">a.link<span style="color: #66cc66;">{</span><span style="font-weight: bold; color: #000000;">color</span>:<span style="color: #993333;">red</span>;text-decoration:<span style="color: #993333;">none</span><span style="color: #66cc66;">}</span></div>
</li>
</ol>
</div>
</div>
</div>
<div class="syntax_hilite"><span class="langName">HTML:</span></p>
<div id="html-4">
<div class="html">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="font-weight: bold; color: #000000;">&lt;ul&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link1<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link2<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link3<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link4<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link5<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&#8220;link&#8221;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link6<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/ul&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>All the links have been given a class of .link in order to style them and is completely unnecessary. If we apply an ID or class to the UL instead, we can target all the anchors within that ul without having to add any extra classes at all.</p>
<div class="syntax_hilite"><span class="langName">CSS:</span></p>
<div id="css-5">
<div class="css">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">#nav a <span style="color: #66cc66;">{</span><span style="font-weight: bold; color: #000000;">color</span>:<span style="color: #993333;">red</span>;text-decoration:<span style="color: #993333;">none</span><span style="color: #66cc66;">}</span></div>
</li>
</ol>
</div>
</div>
</div>
<div class="syntax_hilite"><span class="langName">HTML:</span></p>
<div id="html-6">
<div class="html">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="font-weight: bold; color: #000000;">&lt;ul</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&#8220;nav&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link1<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link2<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link3<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link4<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link5<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="font-weight: bold; color: #000000;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="font-weight: bold; color: #000000;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&#8220;#&#8221;</span><span style="font-weight: bold; color: #000000;">&gt;</span></span>Link6<span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: #000000;">&lt;/ul&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>As you can see we get the same effect and save considerably on mark-up and readability. A lot of times the ul may be unique in a section anyway and you can use the parent id without even having to add an id to the ul. (Remember that id&#8217;s are unique and can only be used once per page.)</p>
<p>7. <strong>Validate your code</strong></p>
<p>Visit the validator at every opportunity and <a href="http://jigsaw.w3.org/css-validator/">validate your css</a> and <a href="http://validator.w3.org/">html</a> especially when learning something new. If you are new to html/css then validate regularly during development so that you can be sure the code you are using is correct; that will allow you to concentrate on getting the design right.</p>
<p>Do not wait until you have finished coding the design as you may be using features that are not appropriate and will result in a lot more work than necessary. Validating frequently will also catch simple errors like typos which will always creep into the code when you are not looking.</p>
<p>8. <strong>Rationalize your code</strong></p>
<p>At every stage during development ask yourself whether you need that extra div wrapper or not. Can existing elements be utilised for background images without adding extraneous code?</p>
<p>Thinking ahead and planning your layout beforehand will often lead to more concise code and an easier-to-manage layout.</p>
<p>9. <strong>Flexibility</strong></p>
<p>Remember that a web page isn&#8217;t the same as a printed page and that ultimately the user has more control over how your page will appear than you do. With this in mind try to allow for some flexibility in your design so that things like text resizing issues don&#8217;t break your layout. Don&#8217;t make everything a fixed height/width or at least use ems to allow the layout to expand when text is resized.</p>
<p>With a little thought and patience you can still make your page look good and satisfy accessibility requirements.</p>
<p>10. <strong>Browser support</strong></p>
<p>A designer&#8217;s lot is often not a happy one due to the variance in the display offered via various browsers. There is no easy answer to this question (apart from the tips already given) and my method of working is as follows.</p>
<p>First of all decide with your client (or yourself) what browsers you are aiming to support. This will of course be based on many factors (which we won&#8217;t go into here) but could be as simple as checking your server stats to see who your visitors are.</p>
<p>Once you have decided what browsers to support then make sure that you have access to these browsers in some way. The easiest way is to download the browser you need so you can test locally.</p>
<p>If you can&#8217;t download the browsers for one reason or another or you need to test on another platform, then there are a number of sites that will offer remote access or screenshots. Some of these require payment and some of the simpler ones are free (a quick look on Google will soon sort you out).</p>
<p>Once you have decided what browsers to support it is time to start coding then you must check your design at every stage in the browsers that you want to support. This means writing a line of code then firing up at least 3 or 4 browsers to check. As you get more experienced you will soon learn what is likely to work and what doesn&#8217;t and you can check less frequently.</p>
<p>If you take this approach of checking at every stage then you will soon find out what works and what doesn&#8217;t and identify problems straight away and determine the cause is immediately. This would not be the case if you waited until you had finished and then checked the design. It could take hours (or days) to identify where the problem is and what is causing it. It may in fact be too late to fix it because you have built the whole page on a function that only works in one browser and you would have to start again from scratch.</p>
<p>By checking as you go you eliminate this problem and quite often a small change in design at each stage will accommodate nearly all the browsers you need to support without needing to hack. You can&#8217;t make these small tweaks and changes in design if you wait until the end.</p>
<p>The above tips for css coding aren&#8217;t in any special order and most are just plain common sense. If you follow the advice given you will make your web design life a lot easier and less stressful.</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/05/16/10-quick-tips-for-an-easier-css-life/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google tips for entrepreneurs</title>
		<link>http://hieuvadiep.com/2009/05/10/google-tips-for-entrepreneurs/</link>
		<comments>http://hieuvadiep.com/2009/05/10/google-tips-for-entrepreneurs/#comments</comments>
		<pubDate>Sun, 10 May 2009 06:49:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Works]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=65</guid>
		<description><![CDATA[Google co-founder Larry Page provides several tips for entrepreneurs.
Tip 1: Just don&#8217;t settle.  Especially with employees, it is very important to find great people you are compatible with.
Tip 2: There is a benefit from being real experts.  Experience pays off.
Tip 3: Have a healthy disregard for the impossible.  Stretch your goals.
Tip 4: It is OK to solve a [...]]]></description>
			<content:encoded><![CDATA[<p>Google co-founder Larry Page provides several tips for entrepreneurs.</p>
<p><strong>Tip 1</strong>: Just don&#8217;t settle.  Especially with employees, it is very important to find great people you are compatible with.</p>
<p><strong>Tip 2</strong>: There is a benefit from being real experts.  Experience pays off.</p>
<p><strong>Tip 3</strong>: Have a healthy disregard for the impossible.  Stretch your goals.</p>
<p><strong>Tip 4</strong>: It is OK to solve a hard problem. Solving hard problems is where you will get the biggest leverage.</p>
<p><strong>Tip 5</strong>: Don&#8217;t pay attention to the VC bandwagon. Don&#8217;t start a company just because you can.  Instead, have a really good idea that is good regardless of the funding situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/05/10/google-tips-for-entrepreneurs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Startups in 13 sentences</title>
		<link>http://hieuvadiep.com/2009/05/06/startups-in-13-sentences/</link>
		<comments>http://hieuvadiep.com/2009/05/06/startups-in-13-sentences/#comments</comments>
		<pubDate>Wed, 06 May 2009 11:15:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Personal Life]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=63</guid>
		<description><![CDATA[Good article on startups
*****
One of the things I always tell startups is a principle I learned from Paul Buchheit: it&#8217;s better to make a few people really happy than to make a lot of people semi-happy.  I was saying recently to a reporter that if I could only tell startups 10 things, this would [...]]]></description>
			<content:encoded><![CDATA[<p>Good article on startups</p>
<p>*****</p>
<p><span style="font-family: verdana; font-size: x-small;">One of the things I always tell startups is a principle I learned from Paul Buchheit: it&#8217;s better to make a few people really happy than to make a lot of people semi-happy.  I was saying recently to a reporter that if I could only tell startups 10 things, this would be one of them.  Then I thought: what would the other 9 be?</p>
<p>When I made the list there turned out to be 13: </span></p>
<p style="margin-top: 32px;"><span style="font-family: verdana; font-size: x-small;"><strong>1. Pick good cofounders.</strong></p>
<p>Cofounders are for a startup what location is for real estate.  You can change anything about a house except where it is.  In a startup you can change your idea easily, but changing your cofounders is hard.  <span style="color: #999999;">[<a href="http://paulgraham.com/13sentences.html#f1n"><span style="color: #999999;">1</span></a>]</span> And the success of a startup is almost always a function of its founders.</p>
<p><strong>2. Launch fast.</strong></p>
<p>The reason to launch fast is not so much that it&#8217;s critical to get your product to market early, but that you haven&#8217;t really started working on it till you&#8217;ve launched.  Launching teaches you what you should have been building.  Till you know that you&#8217;re wasting your time.  So the main value of whatever you launch with is as a pretext for engaging users.</p>
<p><strong>3. Let your idea evolve.</strong></p>
<p>This is the second half of launching fast. Launch fast and iterate. It&#8217;s a big mistake to treat a startup as if it were merely a matter of implementing some brilliant initial idea. As in an essay, most of the ideas appear in the implementing.</p>
<p><strong>4. Understand your users.</strong></p>
<p>You can envision the wealth created by a startup as a rectangle, where one side is the number of users and the other is how much you improve their lives. <span style="color: #999999;">[<a href="http://paulgraham.com/13sentences.html#f2n"><span style="color: #999999;">2</span></a>]</span> The second dimension is the one you have most control over.  And indeed, the growth in the first will be driven by how well you do in the second.  As in science, the hard part is not answering questions but asking them: the hard part is seeing something new that users lack. The better you understand them the better the odds of doing that. That&#8217;s why so many successful startups make something the founders needed.</p>
<p><strong>5. Better to make a few users love you than a lot ambivalent.</strong></p>
<p>Ideally you want to make large numbers of users love you, but you can&#8217;t expect to hit that right away.  Initially you have to choose between satisfying all the needs of a subset of potential users, or satisfying a subset of the needs of all potential users.  Take the first. It&#8217;s easier to expand userwise than satisfactionwise. And perhaps more importantly, it&#8217;s harder to lie to yourself.  If you think you&#8217;re 85% of the way to a great product, how do you know it&#8217;s not 70%?  Or 10%?  Whereas it&#8217;s easy to know how many users you have.</p>
<p><strong>6. Offer surprisingly good customer service.</strong></p>
<p>Customers are used to being maltreated.  Most of the companies they deal with are quasi-monopolies that get away with atrocious customer service. Your own ideas about what&#8217;s possible have been unconsciously lowered by such experiences.  Try making your customer service not merely good, but  <a href="http://www.diaryofawebsite.com/blog/2008/07/wufoo-and-the-art-of-customer-service/">surprisingly good</a>.  Go out of your way to make people happy.  They&#8217;ll be overwhelmed; you&#8217;ll see.  In the earliest stages of a startup, it pays to offer customer service on a level that wouldn&#8217;t scale, because it&#8217;s a way of learning about your users.</p>
<p><strong>7. You make what you measure.</strong></p>
<p>I learned this one from Joe Kraus.  <span style="color: #999999;">[<a href="http://paulgraham.com/13sentences.html#f3n"><span style="color: #999999;">3</span></a>]</span> Merely measuring something has an uncanny tendency to improve it.  If you want to make your user numbers go up, put a big piece of paper on your wall and every day plot the number of users.  You&#8217;ll be delighted when it goes up and disappointed when it goes down.  Pretty soon you&#8217;ll start noticing what makes the number go up, and you&#8217;ll start to do more of that.  Corollary: be careful what you measure.</p>
<p><strong>8. Spend little.</strong></p>
<p>I can&#8217;t emphasize how important it is for a startup to be cheap. Most startups fail before they make something people want, and the most common form of failure is running out of money.  So being cheap is (almost) interchangeable with iterating rapidly. <span style="color: #999999;">[<a href="http://paulgraham.com/13sentences.html#f4n"><span style="color: #999999;">4</span></a>]</span> But it&#8217;s more than that.  A culture of cheapness keeps companies young in something like the way exercise keeps people young.</p>
<p><strong>9. Get ramen profitable.</strong></p>
<p>&#8220;Ramen profitable&#8221; means a startup makes just enough to pay the founders&#8217; living expenses.  It&#8217;s not rapid prototyping for business models (though it can be), but more a way of hacking the investment process.  Once you cross over into ramen profitable, it completely changes your relationship with investors.  It&#8217;s also great for morale.</p>
<p><strong>10. Avoid distractions.</strong></p>
<p>Nothing kills startups like distractions.  The worst type are those that pay money: day jobs, consulting, profitable side-projects. The startup may have more long-term potential, but you&#8217;ll always interrupt working on it to answer calls from people paying you now. Paradoxically, <a href="http://paulgraham.com/fundraising.html">fundraising</a> is this type of distraction, so try to minimize that too.</p>
<p><strong>11. Don&#8217;t get demoralized.</strong></p>
<p>Though the immediate cause of death in a startup tends to be running out of money, the underlying cause is usually lack of focus.  Either the company is run by stupid people (which can&#8217;t be fixed with advice) or the people are smart but got demoralized.  Starting a startup is a huge moral weight.  Understand this and make a conscious effort not to be ground down by it, just as you&#8217;d be careful to bend at the knees when picking up a heavy box.</p>
<p><strong>12. Don&#8217;t give up.</strong></p>
<p>Even if you get demoralized, <a href="http://paulgraham.com/die.html">don&#8217;t give up</a>.  You can get surprisingly far by just not giving up.  This isn&#8217;t true in all fields.  There are a lot of people who couldn&#8217;t become good mathematicians no matter how long they persisted.  But startups aren&#8217;t like that. Sheer effort is usually enough, so long as you keep morphing your idea.</p>
<p><strong>13. Deals fall through.</strong></p>
<p>One of the most useful skills we learned from Viaweb was not getting our hopes up.  We probably had 20 deals of various types fall through.  After the first 10 or so we learned to treat deals as background processes that we should ignore till they terminated. It&#8217;s very dangerous to morale to start to depend on deals closing, not just because they so often don&#8217;t, but because it makes them less likely to. </span></p>
<p style="margin-top: 32px;"><span style="font-family: verdana; font-size: x-small;">Having gotten it down to 13 sentences, I asked myself which I&#8217;d choose if I could only keep one.</p>
<p>Understand your users.  That&#8217;s the key.  The essential task in a startup is to create wealth; the dimension of wealth you have most control over is how much you improve users&#8217; lives; and the hardest part of that is knowing what to make for them.  Once you know what to make, it&#8217;s mere effort to make it, and most decent hackers are capable of that.</p>
<p>Understanding your users is part of half the principles in this list.  That&#8217;s the reason to launch early, to understand your users. Evolving your idea is the embodiment of understanding your users. Understanding your users well will tend to push you toward making something that makes a few people deeply happy.  The most important reason for having surprisingly good customer service is that it helps you understand your users.  And understanding your users will even ensure your morale, because when everything else is collapsing around you, having just ten users who love you will keep you going.</p>
<p><strong>Notes</strong><br />
[<a name="f1n"><span style="color: #000000;">1</span></a>] Strictly speaking it&#8217;s impossible without a time machine.<br />
[<a name="f2n"><span style="color: #000000;">2</span></a>] In practice it&#8217;s more like a ragged comb<br />
[<a name="f3n"><span style="color: #000000;">3</span></a>] Joe thinks one of the founders of Hewlett Packard said it first, but he doesn&#8217;t remember which.<br />
[<a name="f4n"><span style="color: #000000;">4</span></a>] They&#8217;d be interchangeable if markets stood still.  Since they don&#8217;t, working twice as fast is better than having twice as much time.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/05/06/startups-in-13-sentences/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Freebsd frequent installation guides</title>
		<link>http://hieuvadiep.com/2009/04/29/freebsd-frequent-installation-guides/</link>
		<comments>http://hieuvadiep.com/2009/04/29/freebsd-frequent-installation-guides/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:16:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Works]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=59</guid>
		<description><![CDATA[- Install Mysql:http://www.mydigitallife.info/2006/04/13/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-3/
- Install apache: http://www.mydigitallife.info/2006/04/13/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-4/
- Install php; http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/
- Memcache: http://code.google.com/p/memcached/wiki/FAQ#How_can_I_install_memcached?
]]></description>
			<content:encoded><![CDATA[<p>- Install Mysql:http://www.mydigitallife.info/2006/04/13/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-3/</p>
<p>- Install apache: http://www.mydigitallife.info/2006/04/13/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-4/</p>
<p>- Install php; http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/</p>
<p>- Memcache: http://code.google.com/p/memcached/wiki/FAQ#How_can_I_install_memcached?</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/04/29/freebsd-frequent-installation-guides/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Terrible configuration : Session Cache is not configured</title>
		<link>http://hieuvadiep.com/2009/04/29/terrible-configuration-session-cache-is-not-configured/</link>
		<comments>http://hieuvadiep.com/2009/04/29/terrible-configuration-session-cache-is-not-configured/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:11:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Works]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[freebsd]]></category>

		<category><![CDATA[Session Cache]]></category>

		<guid isPermaLink="false">http://hieuvadiep.com/?p=56</guid>
		<description><![CDATA[It took me almost sleepless nights begging Google for the answer on the installation of PHP and Apache.
The error in /var/log/httpd-error.log was as simple as this:
[warn] Session Cache is not configured [hint: SSLSessionCache]
when Php is not installed, Apache worked fine. I had tried to uninstall and reinstall many times but no avail. At last, the [...]]]></description>
			<content:encoded><![CDATA[<p>It took me almost sleepless nights begging Google for the answer on the installation of PHP and Apache.</p>
<p>The error in /var/log/httpd-error.log was as simple as this:</p>
<p><strong>[warn] Session Cache is not configured [hint: SSLSessionCache]</strong></p>
<p>when Php is not installed, Apache worked fine. I had tried to uninstall and reinstall many times but no avail. At last, the savor is :</p>
<p><strong>vi /usr/local/etc/php/extensions.ini<br />
#extension=recode.so (check it marked)<br />
/usr/local/sbin/apachectl start</strong></p>
<p>Why the hell did I compose recode with php-extensions.</p>
<p>Thanks to : http://chris-jan.blogspot.com/2008/08/freebsd-apachesession-cache-is-not.html</p>
]]></content:encoded>
			<wfw:commentRss>http://hieuvadiep.com/2009/04/29/terrible-configuration-session-cache-is-not-configured/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
