<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Captain Tsubasa Logs...</title>
	<atom:link href="http://aytek.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aytek.wordpress.com</link>
	<description>Why do we never have time to do it right, but always have time to do it over?</description>
	<lastBuildDate>Thu, 21 May 2009 08:13:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='aytek.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/d85beee8fc36357ec14f2e123c17dbb8?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Captain Tsubasa Logs...</title>
		<link>http://aytek.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aytek.wordpress.com/osd.xml" title="Captain Tsubasa Logs..." />
	<atom:link rel='hub' href='http://aytek.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Optimize ASP.NET Membership Stored Procedures for greater speed and scalability</title>
		<link>http://aytek.wordpress.com/2009/05/21/optimize-asp-net-membership-stored-procedures-for-greater-speed-and-scalability/</link>
		<comments>http://aytek.wordpress.com/2009/05/21/optimize-asp-net-membership-stored-procedures-for-greater-speed-and-scalability/#comments</comments>
		<pubDate>Thu, 21 May 2009 08:03:54 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/05/21/optimize-asp-net-membership-stored-procedures-for-greater-speed-and-scalability/</guid>
		<description><![CDATA[Here is a good article from Omar AL Zabir. If you are also using ASP.NET Membership/Role/Profile providers, or at least checking if you can use it as i do, it has pretty good and practical results. Thanks Omar for this informative and beneficial article. Last year at Pageflakes, when we were getting millions of hits [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=125&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div align="justify">Here is a good article from <a class="headermaintitle" href="http://msmvps.com/blogs/omar/default.aspx">Omar AL Zabir</a>. If you are also using ASP.NET Membership/Role/Profile providers, or at least checking if you can use it as i do, it has pretty good and practical results. Thanks Omar for this informative and beneficial article.</p>
<p><i>Last year at Pageflakes, when we were getting millions of hits per </i><i>day, we were having query timeout due to lock timeout and Transaction </i><i>Deadlock errors. These locks were produced from aspnet_Users and</i> <i>aspnet_Membership tables. Since both of these tables are very high read </i><i>(almost every request causes a read on these tables) and high write</i> <i>(every anonymous visit creates a row on aspnet_Users), there were just </i><i>way too many locks created on these tables per second. SQL Counters </i><i>showed thousands of locks per second being created. Moreover, we had</i> <i>queries that would select thousands of rows from these tables </i><i>frequently and thus produced more locks for longer period, forcing</i> <i>other queries to timeout and thus throw errors on the website.</i></p>
<p><i>If you have read my last blog post, you know why such locks happen.</i> <i>Basically every table when it grows up to hold millions of records and </i><i>becomes popular goes through this trouble. It’s just a part of</i> <i>scalability problem that is common to database. But we rarely take </i><i>prevention about it in our early design.</i></div>
<p><span id="more-125"></span>
<div align="justify">
<div align="justify"><i>The solution is simple, you should either have WITH (NOLOCK) or SETTRANSACTION ISOLATION LEVEL READ UNCOMMITTED before SELECT queries.Either of this will do. They tell SQL Server not to hold any lock on the table while it is reading the table. If some row is locked while the read is happening, it will just ignore that row. When you are reading a table thousand times per second, without these options, you are issuing lock on many places around the table thousand times per second. It not only makes read from table slower, but also so many lock prevents insert, update, delete from happening timely and thus queries timeout. If you have queries like “show the currently online users from last one hour based on LastActivityDate field”, that is going to issue such a wide lock that even other harmless select queries will timeout. And did I tell you that there’s no index on LastActivityDate on aspnet_Users table?<br /></i></div>
</div>
<div align="justify">
<p>To read remaining part please visit <a target="_blank" href="http://msmvps.com/blogs/omar/archive/2009/03/13/optimize-asp-net-membership-stored-procedures-for-greater-speed-and-scalability.aspx">Omar&#8217;s blog</a>.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=125&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/05/21/optimize-asp-net-membership-stored-procedures-for-greater-speed-and-scalability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>Closures</title>
		<link>http://aytek.wordpress.com/2009/03/12/closures/</link>
		<comments>http://aytek.wordpress.com/2009/03/12/closures/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 14:02:03 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/03/12/closures/</guid>
		<description><![CDATA[This is a good article from Martin Fowler. As there is a growing interest in dynamic languages, more people are running into a programming concept called Closures or Blocks. People from a C/C++/Java/C# language background don&#8217;t have closures and as a result aren&#8217;t sure what they are. Here&#8217;s a brief explanation, those who have done [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=118&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a good article from <a href="http://martinfowler.com/bliki/Closure.html">Martin Fowler</a>.</p>
<p>As there is a growing interest in dynamic languages, more people 	are running into a programming concept called Closures or 	Blocks. People from a C/C++/Java/C# language background don&#8217;t have closures 	and as a result aren&#8217;t sure what they are. Here&#8217;s a brief 	explanation, those who have done a decent amount of programming in 	languages that have them won&#8217;t find this interesting.</p>
<p>Closures have been around for a long time. I ran into them 	properly for the first time in Smalltalk where they&#8217;re called 	Blocks. Lisp uses them heavily. They&#8217;re also present in the Ruby 	scripting language &#8211; and are a major reason why many rubyists like 	using Ruby for scripting.</p>
<p><span id="more-118"></span></p>
<p>Essentially a closure is a block of code that can be passed as an 	argument to a function call. I&#8217;ll illustrate this with a simple 	example. Imagine I have a list of employee objects and I want a list 	of those employees who are managers, which I determine with an 	IsManager property. Using C#, I&#8217;d probably write it like this.</p>
<pre>  public static IList Managers(IList emps) {
    IList result = new ArrayList();
    foreach(Employee e in emps)
      if (e.IsManager) result.Add(e);
    return result;
  }</pre>
<p>In a language that has Closures, in this case Ruby, I&#8217;d write 	this.</p>
<pre>def managers(emps)
  return emps.select {|e| e.isManager}
end</pre>
<p>Essentially select is a method defined on the Ruby collection 	class. It takes a block of code, a closure, as an argument. In ruby 	you write that block of code between curlies (not the only way). If the block of code 	takes any arguments you declare those between the vertical 	bars. What select does is iterate through the input array, executes 	the block of code with each element, and returns an array of those 	elements for which the block evaluated as true.</p>
<p>Now if you&#8217;re a C programmer you probably think &#8220;I could do 	that with a function pointer&#8221;, if you&#8217;re a Java programmer you 	probably think &#8220;I could do that with an anonymous inner class&#8221;, a 	C#er would consider a delegate. These mechanisms are similar to 	closures, but there are two telling differences.</p>
<p>The first one is a formal difference, closures can refer to 	variables visible at the time they were defined. Consider this 	method</p>
<pre>def highPaid(emps)
  threshold = 150
  return emps.select {|e| e.salary &gt; threshold}
end</pre>
<p>Notice that the code in the select block is referring to a local 	variable defined in the enclosing method. Many of the alternatives 	to closures in languages that don&#8217;t have real closures can&#8217;t do 	that. Closures allow you to do even more interesting stuff. Consider 	this function.</p>
<pre>def paidMore(amount)
  return Proc.new {|e| e.salary &gt; amount}
end</pre>
<p>This function returns a closure, indeed it returns a closure whose 	behavior depends on the argument sent into it. I can create such a 	function with and assign it to a variable.</p>
<pre>highPaid = paidMore(150)</pre>
<p>The variable highPaid contains a block of code 		(called a Proc in Ruby) that will return whether a tested object 		has a salary greater than 150. I might use it like this.</p>
<pre>john = Employee.new
john.salary = 200
print highPaid.call(john)</pre>
<p>The expression highPaid.call(john) calls the  e.salary &gt; amount code I defined earlier, with the 			amount variable in that code bound the to the 150 I 			passed in when I created the proc object. Even if that 150 			value went out of scope when I issue the print call, the binding 			still remains.</p>
<p>So the first crucial point about closures is that they are a 	block of code plus the bindings to the environment they came 	from. This is the formal thing that sets closures apart from 	function pointers and similar techniques.(Java&#8217;s anonymous inner 	classes can access locals &#8211; but only if they are final.)</p>
<p>The second difference is less of a defined formal difference, but 		is just as important, if not more so in practice. Languages that 		support closures allow you to define them with very little syntax. 		While this might not seem an important point, I believe it&#8217;s 		crucial &#8211; it&#8217;s the key to make it natural to use them frequently. 		Look at Lisp, Smalltalk, or Ruby code and you&#8217;ll see closures all 		over the place &#8211; much more frequently used than the similar 		structures in other languages. The ability to bind to local 		variables is part of that, but I think the biggest reason is that 		the notation to use them is simple and clear.</p>
<p>A good case in point is what happened when ex-Smalltalkers started 	in Java. Initially many people, including me, experimented with 	using anonymous inner classes to do many of things that we&#8217;d done 	with blocks in smalltalk. But the resulting code was just too messy 	and ugly so we gave up.</p>
<p>Like any term in software there is a lot of blur about the exact definition of closure. Some people say that the term only applies to an actual value that includes bindings from its environment, such as the value returned by highPaid. Others use the term &#8216;closure&#8217; to refer to a programming construct that has the ability to bind to its environment. This debate, an example of the <a href="http://martinfowler.com/bliki/TypeInstanceHomonym.html">TypeInstanceHomonym</a>, is usually carried out with the politeness and lack of pedantry that our profession is known for.</p>
<p>I use closures a lot in Ruby, but I don&#8217;t tend to create Procs and pass them around. Most of the time my use of closures is based around <a href="http://martinfowler.com/bliki/CollectionClosureMethod.html">CollectionClosureMethod</a>s similar to the select method I showed earlier. Another common use is the &#8216;execute around method&#8217;, such as when processing a file.</p>
<pre>File.open(filename) {|f| doSomethingWithFile(f)}</pre>
<p>Here the open method opens the file, executes the supplied block, 	and then closes it. This can be a very handy idiom for things like 	transactions (remember to commit or rollback) or indeed anything 	where you have to remember to do something at the end. I use this 	extensively in my xml transformation routines.</p>
<p>Such use of closures is actually much less than what people in 	the Lisp and functional programming worlds do. But even with my 	limited uses I miss them a lot when programming in languages without 	them. They are one of those things that seem minor when you first 	come across them, but you quickly grow to like them.</p>
<p><strong>Other languages: </strong><a href="http://joe.truemesh.com/blog//000390.html"> C#</a> |  <a href="http://ivan.truemesh.com/archives/000392.html"> Python</a> | <a href="http://boo.codehaus.org/Martin+Fowler%27s+closure+examples+in+boo"> Boo</a> |  <a href="http://stefanroock.blogspot.com/2006/08/closures-in-common-lisp.html"> Lisp</a> |  <a href="http://nonn-et-twk.net/twk/closure/">JavaScript</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=09071369-068b-4370-bfd7-b126acd65157" alt="" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=118&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/03/12/closures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=09071369-068b-4370-bfd7-b126acd65157" medium="image" />
	</item>
		<item>
		<title>The difference between ASP.NET Web Site and ASP.NET Web Application</title>
		<link>http://aytek.wordpress.com/2009/03/11/the-difference-between-aspnet-web-site-and-aspnet-web-application/</link>
		<comments>http://aytek.wordpress.com/2009/03/11/the-difference-between-aspnet-web-site-and-aspnet-web-application/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 13:45:18 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/03/11/the-difference-between-aspnet-web-site-and-aspnet-web-application/</guid>
		<description><![CDATA[I have just read this at stackoverflow.com. Website: The Web Site project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=116&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have just read this at <a href="http://stackoverflow.com/questions/398037/asp-net-web-site-or-web-application">stackoverflow.com</a>. </p>
<div class="post-text">
<p><strong>Website:</strong></p>
<p>The <em>Web Site</em> project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since the other directory may not be compiled into code yet. Another problem can be in publishing. </p>
<p>If VS isn&#8217;t told to re-use the same names constantly, it will come up with new names for the dll files generated by pages all the time. That can lead to having several close copies of dlls containing the same class name, which will generate plenty of errors. The Web Site project was introduced with VS 2005, but has turned out not to be extremely popular.</p>
<p><strong>Web Application:</strong></p>
<p>The <em>Web Application</em> Project was created as an add-in and now exists as part of SP 1 for VS 2005. The main differences are the Web Application Project was designed to work similar to the Web projects that shipped with VS.net and VS 2003. It will compile the application into a single dll at build time. In order to update the project it must be recompiled and the dll published for changes to occur. </p>
<p>Another nice feature of the Web Application project is it&#8217;s much easer to exclude files from the project view. In the Web Site project, each file that you exclude is renamed with an exclude keyword in the filename. In the Web Application Project, the project just keeps track of which files to include/exclude from the project view without renaming them, making things much tider. </p>
<p><em>Reference: <a href="http://www.megasolutions.net/AspNet/difference-between-Web-Site-and-Web-Application-Project-27210.aspx" rel="nofollow">http://www.megasolutions.net/AspNet/difference-between-Web-Site-and-Web-Application-Project-27210.aspx</a></em></p>
<p><a href="http://maordavid.blogspot.com/2007/06/aspnet-20-web-site-vs-web-application.html" rel="nofollow">This article</a> also gives reasons on why to use one and not the other.  Here is an excerpt of it:</p>
<blockquote><ul>
<li>You need to migrate large Visual Studio .NET 2003 applications to VS  2005? <strong>use the Web Application project.</strong></li>
<li>You want to open and edit any directory as a Web project without  creating a project file? <strong>use Web Site  project.</strong></li>
<li>You need to add pre-build and post-build steps during compilation?  <strong>use Web Application project.</strong></li>
<li>You need to build a Web application using multiple Web  projects? <strong>use Web Application project.</strong></li>
<li>You want to generate one assembly for each page? <strong>use Web Site project.</strong> </li>
<li>You prefer dynamic compilation and working on pages without building  entire site on each page view? <strong>use Web  Site project.</strong> </li>
<li>You prefer single-page code model to code-behind model? <strong>use Web Site  project.</strong></li>
</ul>
</blockquote></div>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=d8ed55aa-da99-45e4-84a4-f0b78535f8c1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=116&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/03/11/the-difference-between-aspnet-web-site-and-aspnet-web-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=d8ed55aa-da99-45e4-84a4-f0b78535f8c1" medium="image" />
	</item>
		<item>
		<title>10 Insanely Useful Django Tips</title>
		<link>http://aytek.wordpress.com/2009/02/13/10-insanely-useful-django-tips/</link>
		<comments>http://aytek.wordpress.com/2009/02/13/10-insanely-useful-django-tips/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 16:14:57 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/?p=109</guid>
		<description><![CDATA[One of the reasons i add posts in this blog is to open it in the future and read my posts. I can say this is a kind of bookmarking for me. This post will be a bookmark to revisit in the future. Here is the next article i have read in nettuts.com and think [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=109&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the reasons i add posts in this blog is to open it in the future and read my posts. I can say this is a kind of bookmarking for me. This post will be a bookmark to revisit in the future.</p>
<p>Here is the next article i have read in <a title="nettuts.com" href="http://www.nettuts.com">nettuts.com</a> and think really useful. I read many things about Django and it seems really cool. Although I couldn&#8217;t create a full application with it yet, i am sure it will be really nice to use Django.</p>
<p>This article is from Glen Stansberry who is a web developer and blogger. You can read more tips on web development at his blog <a href="http://www.webjackalope.com/">Web Jackalope</a> or <a href="http://www.twitter.com/glenstansberry">follow him on Twitter</a>.</p>
<blockquote><p><em>There are quite a few great little tricks and tips one could use on their Django projects that would speed up development and save many headaches in the long run. From basic to obscure, these tips can help any skill-level of programmer become more adept with Django and all it&#8217;s glory.</em></p></blockquote>
<p><span id="more-109"></span></p>
<p><a href="http://www.djangoproject.com/">Django</a> is an excellent framework for Python. While it may not get as much ink as other popular frameworks like <a href="http://nettuts.com/misc/ruby-on-rails-from-scratch-week-3/">Rails</a>, it is just as much a polished framework as any of <a href="http://en.wikipedia.org/wiki/List_of_web_application_frameworks">the rest</a>. It puts plenty of emphasis on the <a title="DRY" href="http://c2.com/cgi/wiki?DontRepeatYourself">DRY</a> principle (Don&#8217;t Repeat Yourself) in clean coding by automating many of the processes in programming.</p>
<p><strong>1. Use relative paths in the configuration</strong></p>
<p>For some reason, projects tend to be moved around in location from time to time. This can be an absolute bear to deal with if you don&#8217;t first plan ahead for the possibility. Rob Hudson has an excellent technique to ensure that your Django deployments can be moved around with ease, only having to edit a few lines of code in your settings files.</p>
<p>Rob&#8217;s post has excellent <a href="http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/">code examples</a> for setting up your Django installation in a very flexible way.</p>
<p><strong>2. Use the {% url %} tag</strong></p>
<p>Instead of hardcoding individual links, try using the backwards compatible <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#url">{% url %}</a> tag to achieve the same result. This will give you the <em>absolute</em> URL, so that if, heaven forbid, your Django project moves the links will still remain in tact.</p>
<p>Essentially the {% url %} takes a view name and its parameters and does a reverse lookup to return the queried URL. If you make changes to your urls.py file, the links won&#8217;t break.</p>
<p>While it&#8217;s not the most advanced tip, it&#8217;s an excellent technique to use in your django projects.</p>
<p><strong>3. Use Django admin for your PHP apps</strong></p>
<p>Possibly one of the greatest features of Django is the <a href="http://docs.djangoproject.com/en/dev/topics/auth/#topics-auth">user authentication</a> system that Django has built straight into the core. It&#8217;s seriously easy to set up, and it comes packed with a robust system to authenticate users and configure other necessary settings.</p>
<p>This user system is so awesome that it&#8217;s even been suggested to <a href="http://jeffcroft.com/blog/2006/jul/14/django-admin-your-php-app/">use Django as your admin area for your PHP application</a>. Here&#8217;s Jeff Croft on why Django is a great solution for an admin system for any application, regardless of language:</p>
<blockquote><p><em>One of the core philosophies of Django is loose coupling. Besides the more alluring free-love connotation, this mean that each of the layers of Django ought to be independent of the others, such that you can choose to use only bits and pieces of it, and/or slide in other components if you prefer. Lucky you, it is incredibly simple to learn the basics of Django&#8217;s model layer, which handles database schema and object-relational mapping even if you don&#8217;t know Python. Anyone can create a database schema in Django and get the crown jewel of the framework &#8212; it&#8217;s admin interface &#8212; with very little work, even if you plan to write the application logic itself in another language.</em></p></blockquote>
<p><strong>4. Use a separate media server</strong></p>
<p>Django allows you to <a href="http://docs.djangoproject.com/en/dev/howto/static-files/#howto-static-files">serve static files</a> in your development environment, but not your production environment. Why? It&#8217;s not efficient. At all. Jacobian.org <a href="http://www.jacobian.org/writing/2005/dec/12/django-performance-tips/">gives an explanation</a>.</p>
<blockquote><p><em>Django deliberately doesn&#8217;t serve media for you, and it&#8217;s designed that way to save you from yourself. If you try to serve media from the same Apache instance that&#8217;s serving Django, you&#8217;re going to absolutely kill performance. Apache reuses processes between each request, so once a process caches all the code and libraries for Django, those stick around in memory. If you aren&#8217;t using that process to service a Django request, all the memory overhead is wasted.</em></p></blockquote>
<p>By using a separate server to house and serve these static files, your performance won&#8217;t suffer. If you didn&#8217;t want to buy a server you could use <a href="http://aws.amazon.com/s3/">Amazon S3</a> to house the files relatively cheaply.</p>
<p><strong>5. Use the Debugger Toolbar</strong></p>
<p>Debugging tools for any language are invaluable. They speed up development by spotting errors in your code and potential pitfalls that might happen. Rob Hudson has <a href="http://rob.cogit8.org/blog/2008/Sep/19/introducing-django-debug-toolbar/">recently released</a> the <a href="http://github.com/robhudson/django-debug-toolbar/tree/master">django debug toolbar</a> to help with debugging code, and it could greatly help any developer.</p>
<blockquote><p><em>The toolbar itself is a piece of middleware that instantiates each panel object on request, and performs processing and rendering as the response is being written back to the browser. In this way it is essentially a set of middleware classes (the panels) grouped together to display a single toolbar. Each panel subclasses a base panel class and overrides a few methods to render the toolbar.</em></p></blockquote>
<p><strong>6. Use Django Unit Testing</strong></p>
<p><a href="http://docs.djangoproject.com/en/dev/topics/testing/?from=olddocs">Unit testing</a> is a great way to ensure that your changes to the code that it works as expected and doesn&#8217;t break any older code to maintain backwards compatibility. A great feature in Django is that it&#8217;s incredibly easy to write unit tests. Django offers the ability to use the <a href="http://docs.python.org/lib/module-doctest.html">doctest</a> or <a href="http://docs.python.org/lib/module-unittest.html">unittest</a> straight out of the box.</p>
<p>Django&#8217;s documentation offers a <a href="http://docs.djangoproject.com/en/dev/topics/testing/?from=olddocs">great tutorial</a> and some sample code on how to set up unit tests to keep your code running smoothly and spot any nasty bugs.</p>
<p><strong>7. Use a Cheatsheet</strong></p>
<p>Is cheating wrong? I hope not. This nifty 2-page <a href="http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/">cheatsheet</a> contains some golden nuggets within arm&#8217;s reach that one might have to dig around the Django documentation to find.</p>
<p>The cheatsheet features these helpful topics:</p>
<h6><strong>Templates</strong></h6>
<ul>
<li>Template tags and their options</li>
<li>Template filters and their options</li>
<li>Date formatting syntax quick reference</li>
</ul>
<h6><strong>Models</strong></h6>
<ul>
<li>Fields and their options</li>
<li>Common field options</li>
<li>Meta class options</li>
<li>ModelAdmin options</li>
</ul>
<h6><strong>Forms</strong></h6>
<ul>
<li>Fields and their options</li>
<li>Common field options</li>
<li>Standard error_messages keys</li>
</ul>
<blockquote><p><em>We all know time spent looking at documentation is time spent not solving the world&#8217;s problems through code. And no good programmer wants that.</em></p></blockquote>
<p><strong>8. Utilize django-chunks</strong></p>
<p><a href="http://code.google.com/p/django-chunks/">Django-chunks</a> is essentially a way to create blocks of reused code in your templates. Except creating the blocks is made even easier by using Django&#8217;s rich text editor.</p>
<blockquote><p><em>Well it essentially allows someone to define &#8220;chunks&#8221; (I had wanted to call it blocks, but that would be very confusing for obvious reasons) of content in your template that can be directly edited from the awesome Django admin interface. Throwing a rich text editor control on top of it make it even easier.</em></p></blockquote>
<p>By replicating bits of reusable code, django-chunks ensures that pieces of the layout can quickly and easily be changed if need be. While django-chunks is really only a model and template tag, it can greatly speed up development by replicating processes.</p>
<p><strong>9. Utilize Memcache</strong></p>
<p>If performance is going to be an issue with your Django-powered application, you&#8217;ll want to install some sort of caching. While Django offers <a href="http://docs.djangoproject.com/en/dev/topics/cache/">many options for caching</a>, the best by far is <a href="http://docs.djangoproject.com/en/dev/topics/cache/#memcached">memcached</a>. Installing and using memcached is fairly easy with Django if you use the <a href="http://gijsbert.org/cmemcache/">cmemcache</a> module. Once the module is installed, you just change a single configuration option, and your Django pages will be served lighting fast.</p>
<p><strong>10. Stop hacking scripts together and just use Django</strong></p>
<p>If you still don&#8217;t fully understand Django&#8217;s power after reading this article, there&#8217;s a logical reasoning for using Django in your next project: You save time hacking together designs with different sets of software. Jeff Croft explains why creating a project in Django is much <a href="http://jeffcroft.com/blog/2006/may/02/django-non-programmers/">more efficient than trying to hack together scripts</a>.</p>
<blockquote><p><em>Now, if you&#8217;re used to building sites using a blogging app (WordPress, TXP, etc.) as a CMS, you&#8217;re used to getting all that for free. But you&#8217;re also getting a lot of things built-in that maybe you don&#8217;t want (unless, of course, you&#8217;re building a blog). The limitation I ran across in using a blogging app for my personal site is that I wanted it to be more than just a blog. As soon as I tried to hack a blog into a photo gallery, or a links feed, or a statistics database, a game of Sudoku, or whatever else I could think of, things started to get crufty. I also built a website in which I tried to use a discussion forums app (vBulletin) as a CMS, and that had the same results. It worked &#8212; sort of &#8212; but it wasn&#8217;t extensible, was very hackish, and just generally was inelegant. With Django, you get all of these things and none of the limitations of a blogging app.</em></p></blockquote>
<p>Django allows you to expand your website into literally any direction without having to worry about hacking the design or making sure the scripts and databases are compatible. It just <em>works</em>.</p>
<p>Resource: <a class="wp-caption-dd" title="nettuts.com" href="http://nettuts.com/tutorials/tools-and-tips/10-insanely-useful-django-tips/">nettuts.com</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=109&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/13/10-insanely-useful-django-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>Is the Relational Database Doomed?</title>
		<link>http://aytek.wordpress.com/2009/02/13/is-the-relational-database-doomed/</link>
		<comments>http://aytek.wordpress.com/2009/02/13/is-the-relational-database-doomed/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 11:11:26 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Startups - Companies]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/02/13/is-the-relational-database-doomed/</guid>
		<description><![CDATA[I read an interesting article in ReadWriteWeb.com which i follow daily. It is a good idea to take a look at the article. I paste first part of the article here. Recently, a lot of new non-relational databases have cropped up both inside and outside the cloud. One key message this sends is, &#8220;if you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=97&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font face="sans-serif">I read an interesting article in ReadWriteWeb.com which i follow daily. It is a good idea to take a look at the article. I paste first part of the article here.</p>
<p>Recently, a lot of new non-relational databases have cropped up both inside and outside the cloud. One key message this sends is, &#8220;if you want vast, on-demand scalability, you need a non-relational database&#8221;.</p>
<p>If that is true, then is this a sign that the once mighty relational database finally has a chink in its armor? Is this a sign that relational databases have had their day and will decline over time? In this post, we&#8217;ll look at the current trend of moving away from relational databases in certain situations and what this means for the future of the relational database.<br /></font><span id="more-97"></span></p>
<p><font face="sans-serif"><a href="http://en.wikipedia.org/wiki/Relational_database">Relational databases</a> have been around for over 30 years. During this time, several so-called revolutions flared up briefly, all of which were supposed to spell the end of the relational database. All of those revolutions fizzled out, of course, and none even made a dent in the dominance of relational databases.<br /></font><font face="sans-serif"><br /><b>The Problem with Relational Databases</b></font>
<p><font face="sans-serif">Even though RDBMS have provided database users with the best mix of simplicity, robustness, flexibility, performance, scalability, and compatibility, their performance in each of these areas is not necessarily better than that of an alternate solution pursuing one of these benefits in isolation. This has not been much of a problem so far because the universal dominance of RDBMS has outweighed the need to push any of these boundaries. Nonetheless, if you really had a need that couldn&#8217;t be answered by a generic relational database, alternatives have always been around to fill those niches.</font></p>
<p><font face="sans-serif">Today, we are in a slightly different situation. For an increasing number of applications, one of these benefits is becoming more and more critical; and while still considered a niche, it is rapidly becoming mainstream, so much so that for an increasing number of database users this requirement is beginning to eclipse others in importance. That benefit is scalability. As more and more applications are launched in environments that have massive workloads, such as web services, their scalability requirements can, first of all, change very quickly and, secondly, grow very large. The first scenario can be difficult to manage if you have a relational database sitting on a single in-house server. For example, if your load triples overnight, how quickly can you upgrade your hardware? The second scenario can be too difficult to manage with a relational database in general.</font></p>
<p><font face="sans-serif">Relational databases scale well, but usually only when that scaling happens on a single server node. When the capacity of that single node is reached, you need to scale out and distribute that load across multiple server nodes. This is when the complexity of relational databases starts to rub against their potential to scale. Try scaling to hundreds or thousands of nodes, rather than a few, and the complexities become overwhelming, and the characteristics that make RDBMS so appealing drastically reduce their viability as platforms for large distributed systems.</font></p>
<p>  <font face="sans-serif">For cloud services to be viable, vendors have had to address this limitation, because a cloud platform without a scalable data store is not much of a platform at all. So, to provide customers with a scalable place to store application data, vendors had only one real option. They had to implement a new type of database system that focuses on scalability, at the expense of the other benefits that come with relational databases.</p>
<p>To read the full article please visit <a href="http://www.readwriteweb.com/archives/is_the_relational_database_doomed.php">ReadWriteWeb.com</a></p>
<p>Resource: <a href="http://www.readwriteweb.com/archives/is_the_relational_database_doomed.php">ReadWriteWeb.com</a></font></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=45403318-15ef-48ee-b339-87d268cc14da" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=97&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/13/is-the-relational-database-doomed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=45403318-15ef-48ee-b339-87d268cc14da" medium="image" />
	</item>
		<item>
		<title>10 Ways to Improve Your Programming Productivity</title>
		<link>http://aytek.wordpress.com/2009/02/11/10-ways-to-improve-your-programming-productivity/</link>
		<comments>http://aytek.wordpress.com/2009/02/11/10-ways-to-improve-your-programming-productivity/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 20:31:05 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/?p=94</guid>
		<description><![CDATA[The following is a quote from Matthew Moore. He has an interesting post on his blog Adventures in Starting-Up Having worked at Google and now working in my own business, I&#8217;ve noticed that some days I&#8217;m just a rockstar at getting everything done, and others I can barely get a few lines of code out, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=94&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following is a quote from Matthew Moore. He has an interesting post on his blog <a title="matthewpaulmoore.com" href="http://www.matthewpaulmoore.com">Adventures in Starting-Up</a></p>
<blockquote><p>Having worked at Google and now working in my own business, I&#8217;ve noticed that some days I&#8217;m just a rockstar at getting everything done, and others I can barely get a few lines of code out, or accomplish anything on my todo list.  Of course, now that I&#8217;m in a really small business, every single day counts, for each person in the business.</p>
<p>After looking back and trying to figure out what separates one day from the next, here are some commonalities I&#8217;ve noticed.  All of these are obvious with a little bit of thought, and I&#8217;m certainly not the first one to come up with these ideas.  But a reminder of them can go a long way. Also, some of these only apply when you&#8217;re in Marathon mode (like when you&#8217;re trying to be effective over the course of a year or two), and not in Sprint mode (like when you have a major, major deadline in 2 weeks).</p></blockquote>
<p><span id="more-94"></span><strong>1. Limit News Intake to twice a day, Including Google Reader &amp; News Sites</strong><br />
Straight from the four hour workweek.  Let&#8217;s be real: Your minute-to-minute life isn&#8217;t affected by anything you read in your blogs unless you&#8217;re a news reporter.  Reading the news is an enjoyable way to procrastinate under the veil of being important.  I have 2 times of the day when I read news: google reader in the morning, and news in the evening.  Anything more is a distraction which lowers my effectiveness.</p>
<p><strong>2. Leave Yourself a Place to Start (or: Leave work with something small broken)</strong><br />
Programming effectively (at least, for me) requires me to have a lot in my brain at one time &#8211; which I &#8216;load&#8217; when I start, and which rapidly dissipates when I get distracted or stop.  That means that getting started and &#8216;into the zone&#8217; is the hardest part.  What makes it easier to get started is if I have a simple task to complete that gets me in the zone.</p>
<p>So, any time I stop (lunch, or in the evening), I intentionally break something so I can get right back and fix it &#8211; when I get back to work, I&#8217;m not only anxious to fix it, but I&#8217;m in the zone after I&#8217;m done fixing it.</p>
<p>There was a famous sculptor (or ten) who, before he&#8217;d leave for the night, would smash a sizable dent into his sculpture &#8211; so in the morning, he&#8217;d know where to start.  Many programmers I know have a problem with this &#8211; but seriously.  Try it a few times, and see if it gets you up and running faster, more consistently.</p>
<p><strong>3. Draw it Out &amp; Research First</strong><br />
I can&#8217;t really explain it, but I&#8217;m so much more productive whenever I use a pen and paper to draw out what I need to do.  I don&#8217;t know if it gives me time to sort out all the details in my mind, or if it&#8217;s just giving me a road map so I don&#8217;t get distracted.  But paper and pen is my favorite, whether it&#8217;s a flow chart or a UI mockup.  I know others love their whiteboards.  But for some reason, doing it in OmniGraffle or PPT just doesn&#8217;t have the same effect.</p>
<p>Also, if I know I&#8217;m going to need some algorithms that require knowledge I don&#8217;t currently have, I spend 30 minutes researching the answers to them.  That way I don&#8217;t get distracted or have to redo anything.</p>
<p><strong>4. Architect Your Perfect Distraction-Eliminating Work Environment</strong><br />
Unfortunately in big companies, you don&#8217;t necessarily have control over your designated workspace.  However, you can probably control your home work environment, or find an area at the office building that you can make your own.  My work environment includes:</p>
<p>* Big computer monitor, big desk (for when I want to work at a desk)<br />
* A recliner chair (for when I want to work in a relaxing posture)<br />
* Conducive Work Music (my mood is a bit different each day, but I have to know the song well, otherwise I end up listening to the words!)<br />
* Good sound system<br />
* Well-Lit with natural light<br />
* Wide-open space<br />
* Very few people (or no one) walking by<br />
* Well ventilated, preferably with outside air<br />
* Modern feel<br />
* Calm pets I get along with</p>
<p><strong>5. Eliminate IM during productive hours</strong><br />
Other people don&#8217;t usually spend the time to think whether or not something is urgent AND important when they IM you.  Chances are if they think about it for 15 seconds after their initial impulse to IM you, most IMs can be done over email, and can be answered in non-productive hours.</p>
<p>The same goes for you.  Before you ask someone on IM for something, see if it&#8217;s actually urgent and important.  If it&#8217;s not, send them an email and ask for the answer by the end of the day, or week.  Then you won&#8217;t get distracted, either.</p>
<p><strong>6. Only Respond to Emergency Emails during productive hours</strong><br />
This goes hand in hand with the tip above.  You can lose a few hours just in the context switching between programming and doing other things.  If you can, make a label, with a rule to filter out emergency emails and bring them to your attention.  Otherwise, answer all other types of emails after productive hours.</p>
<p><strong>7. Limit Meetings to once a week (or less)!</strong><br />
I saw this at the big company I worked at the most, but if your team runs effectively, and is an effective size, you should only have to have meetings once a week, to get everyone back on the same track.  If you have meetings more than once a week, there&#8217;s most likely a serious problem with how your project is managed, or how your team is structured.</p>
<p>In our small team, we meet once a week to prioritize the next 3 features being built &#8211; mostly because each feature takes a week to build (or two).</p>
<p><strong>8. Get out, and be social every 2 weeks</strong><br />
It might just be me, but I think it&#8217;s universal &#8211; I need human contact other than my work friends at least every two weeks, and go somewhere other than home and work.  Otherwise something inside me starts to get distracted easily.  I have a need to talk about myself to friends, and listen to my friends; and doing so regularly keeps me from getting too antsy &amp; feeing couped up.  I&#8217;m sure the rest of you experience some similar phenomenon, perhaps on a different timescale.  Tailor your routine to your own emotional needs!</p>
<p>And on a related note, even playing video games on weekends doesn&#8217;t really keep me from feeling antsy &#8211; I really have to leave my normal environment and interact with other people.</p>
<p><strong>9. Take evenings off most days</strong><br />
This is worse at a startup &#8211; the inertia of working 24&#215;7, as well as anxiety (or being anxious and excited) can keep you glued to doing work for far too long.  I&#8217;ve found that if I take evenings off, I&#8217;m more likely to need less sleep, and less likely to get caught up in reading the news or getting distracted on IM.  Each evening, unless there&#8217;s a problem, I&#8217;ll take at least a few hours to enjoy the companionship of my girlfriend, pets, some TV, or a book &#8211; and just let my brain unwind and refresh.  I think you&#8217;ll find your creativity improve, too.</p>
<p><strong>10. Get 20 minutes of exercise in the morning, 3 times a week &#8211; but use that time!</strong><br />
I don&#8217;t know about you, but I used to think exercise was a complete waste of time &#8211; but I knew it was important.  However, what I&#8217;ve found is that when I exercise regularly, I need less sleep &#8211; which is crucial in a startup!  I also bring along a great podcast I can listen to on an iPod.  Typically they&#8217;re a perfect length &#8211; 30-40 minutes, and I can get in my exercise while I&#8217;m getting a new perspective on things.</p>
<p>I suggest: Stanford Technology Ventures Podcasts (my favorite),  Ruby on Rails Envy (and other technical podcasts)</p>
<p><em><strong>Bonus. Make/Use Better Tools</strong></em><br />
This isn&#8217;t concrete enough to be an actual method (plus, 11 just isn&#8217;t a good number), but I&#8217;ve found it incredibly valuable.</p>
<p>The best time savers from a coding perspective for ThriveSmart is when we&#8217;ve made plugins out of repetitive code &#8211; or when we&#8217;ve found plugins for things we thought we&#8217;d have to do ourselves.   Take a look: can you write any tools that would automate parts of your life or drudge tasks?  Perhaps you can even outsource parts of your life, like in 4 hour workweek.  Just something to revisit every few months, to see if you can work smarter, instead of harder!</p>
<p>Original post: <a class="wp-caption-dd" title="matthewpaulmoore.com" href="http://www.matthewpaulmoore.com/articles/443-10-ways-to-improve-your-programming-productivity">matthewpaulmoore.com</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=94&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/11/10-ways-to-improve-your-programming-productivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>The PHP Benchmark</title>
		<link>http://aytek.wordpress.com/2009/02/11/the-php-benchmark/</link>
		<comments>http://aytek.wordpress.com/2009/02/11/the-php-benchmark/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 20:03:28 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/?p=91</guid>
		<description><![CDATA[I found PHPBench.com when i was stumbling. It is a simple but good site that lists some performance issues with basic php functions and usage of them. PHPBench.com was constructed as a way to open people&#8217;s eyes to the fact that not every PHP code snippet will run at the same speed. You may be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=91&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found PHPBench.com when i was stumbling. It is a simple but good site that lists some performance issues with basic php functions and usage of them.</p>
<blockquote><p><a title="phpbench.com" href="http://www.phpbench.com/">PHPBench.com</a> was constructed as a way to open people&#8217;s eyes to the fact that not every PHP code snippet will run at the same speed. You may be surprised at the results that this page generates, but that is ok. This page was also created so that you would be able to find discovery in these statistics and then maybe re-run these tests in your own server environment to play around with this idea yourself, by using the code examples (these code examples are automatically generated and as the code in my .php files change, so do they).</p></blockquote>
<p>You should take a look to see basic differences of using those functions and what you are doing right / wrong.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=91&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/11/the-php-benchmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>Ten of the Biggest Mistakes Developers Make With Databases</title>
		<link>http://aytek.wordpress.com/2009/02/10/ten-of-the-biggest-mistakes-developers-make-with-databases/</link>
		<comments>http://aytek.wordpress.com/2009/02/10/ten-of-the-biggest-mistakes-developers-make-with-databases/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 07:47:08 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/02/10/ten-of-the-biggest-mistakes-developers-make-with-databases/</guid>
		<description><![CDATA[Although fashions come and go in software development, some things stay remarkably constant. One of these is the use of databases. You may be wonderfully up-to-date with an AJAX Web interface or the latest whizbang Windows user interface, but under the covers, you&#8217;re probably still pumping data in and out of a database, just as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=81&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although fashions come and go in software development, some things stay remarkably constant. One of these is the use of databases. You may be wonderfully up-to-date with an AJAX Web interface or the latest whizbang Windows user interface, but under the covers, you&#8217;re probably still pumping data in and out of a database, just as we all did a decade or more ago. That makes it all the more surprising that developers are still making the same database mistakes that date back to those good old days of Windows 95 and before. Perhaps it&#8217;s just that most of us learn to use databases on the side, rather than really studying them. In any case, here are my nominations for the biggestmistakes that I see over and over again.</p>
<p><strong>Choosing the Wrong Database</strong><br />
Not all databases are created equal — which means before you do anything with a database, you have to pick the appropriate database. Time and again I&#8217;ve seen Access databases groaning to bear the load of huge data sets that would have been child&#8217;s play for SQL Server, or harried users trying to pay for and set up SQL Server to hold a few hundred rows of data. Broadly speaking, there are three tiers of databases in the market these days: desktop and embedded databases suitable for smaller tasks, &#8220;Express&#8221; versions of the major players that are good up to a few gigabytes of data, and the truly enterprise databases like SQL Server, Oracle, and DB2 that can handle just about anything you can throw at them. Before you do anything else, you need to make some realistic estimates about the amount of data that you&#8217;ll be storing and pick the appropriate product to do the storage.<span id="more-81"></span></p>
<p><strong>Choosing Too Many Databases</strong><br />
APIs such as ODBC, JDBC, and OLE DB have promoted the notion of database independence &#8211; the idea that you can write your application code in such a manner that you can plug any database at all in for data storage. Well, yes, but there are compromises. I&#8217;ve seen a lot of teams go down the rat hole of database independence, writing layers to translate all of their SQL statements to some lowest common denominator dialect that every conceivable database will support, and at the same time giving up on advanced features available in any particular database. The notion seems to be that some client in the future might want to switch to Oracle or DB2 or FoxPro or whatever, so it&#8217;s best to be prepared now. On the contrary: when you&#8217;re starting out with a new product, pick your storage engine and write to it. If your product is good, people will install the database you specify, and you won&#8217;t be wasting untold man-hours supporting &#8220;just in case&#8221;scenarios that you&#8217;ll probably never need.</p>
<p><strong>Know Your Data</strong><br />
If I had a dollar for every time it turned out that some customer numbers had seven digits instead of six, or that the registrar&#8217;s office really did allow students to register without a social security number due to privacy concerns and so the column has to be made nullable &#8211; well, I&#8217;d have a lot of dollars. Database design can&#8217;t be done in a vacuum, away from the business rules. It&#8217;s critical that you get the input of the actual users of the data, and hammer on them to find out for sure how big each column needs to be, what rules apply to it, what types of data it will hold, who can update it, and so on. Otherwise, you&#8217;re setting yourself up for costly rework down the line. You&#8217;ll learn to dread sentences starting with &#8220;Well, it looks fine, except&#8230;&#8221;</p>
<p><strong>It&#8217;s Just Like Excel, Right?</strong><br />
There&#8217;s a tendency, especially among managers of smaller shops, to assume that any developer knows how to set up a database. Frankly, this perplexes me. You wouldn&#8217;t assume that any given developer knows how to code in C# or set up a Web Service, so why is it that we&#8217;re all supposed to be database pros? The end result is that too many databases are designed by people who have never even heard the term normalization, never mind developed any understanding of the various normal forms. I can&#8217;t tell you how many times I&#8217;ve found everything shoved into one big table with hideous update anomalies and performance issues as a result. If you&#8217;re in this situation yourself, and you&#8217;re over your head, demand training &#8211; or start job-hunting. Efficient database design is something you need to learn, not discoverby trial and error.</p>
<p><strong>Third Normal Form is Not the Holy Grail</strong><br />
On the other hand, a little knowledge really can be a dangerous thing. I&#8217;ve seen databases that were normalized to death by well-meaning developers who insisted on putting everything in lookup tables. I recall one memorable instance in which &#8220;yes&#8221; and &#8220;no&#8221; were relegated to tblAnswers, where they could be referred to by an AnswerID foreign key from other tables. Yes, you need to know the normalization rules, but you also need to develop the skill to know when to stop normalizing, and when denormalization for performanceactually makes sense.</p>
<p><strong>What a Great Place to Hide Application Logic!</strong><br />
Stored procedures and triggers are a wonderful thing. When you&#8217;ve got multiple clients accessing a database, they can be a great way to make sure consistent data processing takes place. But they can also turn into an ugly black box in which application logic hides, unknown to Web and thick client developers, generally unseen and unreviewed. Too often database code isn&#8217;t subject to the same standards of design, test, and code review that we demand for the rest of our applications. When you&#8217;re tempted to put code in the database, take a moment to askyourself whether it really belongs there.</p>
<p><strong>Who Needs Backups?</strong><br />
Who needs backups? You do. Presumably you&#8217;re storing data in a database because it&#8217;s important enough to hang on to. Somehow, though, I end up walking into situations where &#8220;nobody got around to it&#8221; on a regular basis, and valuable data is lost forever because hardware, hackers, or just plain mistakes munged the database and there wasn&#8217;t any backup. Your backup plan (including things like frequency, type of backup, and how often you&#8217;re going to take backups off-site) needs tobe in place at the start of the development cycle, not at the end.</p>
<p><strong>Yes, You Need Version Control</strong><br />
Speaking of backups, you need to worry about schema changes to your database as well as data changes, and you need to keep track of those schema changes in such a way that you can recreate the database at any point in time. That&#8217;s right, if you want to do a really professional job of building software you need to extend version control to your database design. It doesn&#8217;t do much good to be able to recover version 0.784.5 of the software to test out a customer bug if you can&#8217;t also produce the corresponding database. If your database developers are cheerfully writing stored procedures and tweaking table designswithout leaving any trace of their work, you&#8217;ve got a problem.</p>
<p><strong>Use the Tools</strong><br />
Modern databases offer a lot more than just a series of buckets that you can toss your data into. They also come with a substantial variety of tools to make it easier to manage that data. For example, SQL Server makes it  easy to inspect the plan of attack that the server is using for your queries, and even includes wizards to tell you what indexes would make your queries more efficient for the actual load you&#8217;ve been throwing at your server. I&#8217;ve had great success running these tools on client databases and speeding things up, or lowering CPU usage by a factor of two &#8211; but the fact is, they shouldn&#8217;t have had to call in a consultant to tell them to use the stuff in the box. If you don&#8217;t know what tools and utilities come with your database, and what they can do for you, then you&#8217;re paying for value that you&#8217;renot receiving.</p>
<p><strong>Don&#8217;t Assume Everything is a Nail Just Because You Have a Really Big Hammer</strong><br />
Databases have a tendency to take over all data storage for an application. I&#8217;ve seen applications that tried to build an entire metadata-driven user interface, and then stored that metadata along with user preferences in the same database that was holding the business data. This is a good way to complicate your life and kill performance; some data really does belong in local files, not in a client-server databaseacross the network. When you&#8217;re storing data, you need to evaluate the different places you can put it (database, registry, plain text files, XML files&#8230;) and pick the appropriate spot for each piece of data. Don&#8217;t just automatically shove it into a database just because you have a connection string handy. These days, there&#8217;s probably more of a tendency to overuse XML files than relational databases, but the principle still holds.</p>
<p><strong><em>About the Author</em></strong><br />
<em>Mike Gunderloy is the author of over 20 books and numerous articles on development topics, and the Senior Technology Partner for Adaptive Strategy, a Washington State consulting firm. When he&#8217;s not writing code, Mike putters in the garden on his farm in eastern Washington state.</em></p>
<p><em>Resource: <a class="wp-caption-dd" title="developer.com" href="http://www.developer.com/net/net/article.php/11087_3589351_2">developer.com</a></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=81&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/10/ten-of-the-biggest-mistakes-developers-make-with-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>5 useful url rewriting examples using .htaccess</title>
		<link>http://aytek.wordpress.com/2009/02/08/5-useful-url-rewriting-examples-using-htaccess/</link>
		<comments>http://aytek.wordpress.com/2009/02/08/5-useful-url-rewriting-examples-using-htaccess/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 15:53:45 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/02/08/5-useful-url-rewriting-examples-using-htaccess/</guid>
		<description><![CDATA[If you are looking for the examples of URL rewriting then this post might be useful for you. Now let’s look at the examples: 1)Rewriting product.php?id=12 to product-12.html It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=76&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are looking for the examples of URL rewriting<br />
then this post might be useful for you.</p>
<p align="justify">Now let’s look at the examples:</p>
<p><strong>1)Rewriting product.php?id=12 to  product-12.html</strong></p>
<p align="justify">It is a simple redirection in which .php extension<br />
is hidden from the browser’s address bar and dynamic url (containing<br />
“?” character) is converted into a static URL.</p>
<p><span style="color:#800000;">RewriteEngine on</span></p>
<p><span style="color:#800000;">RewriteRule ^product-([0-9]+)\.html$ product.php?id=$1</span></p>
<p><span id="more-76"></span></p>
<p><strong>2) Rewriting product.php?id=12 to  product/ipod-nano/12.html</strong></p>
<p>SEO expert always suggest to display the main keyword in the URL. In<br />
the following URL rewriting technique you can display the name of the<br />
product in URL.</p>
<p><span style="color:#800000;">RewriteEngine on</span></p>
<p><span style="color:#800000;">RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2</span></p>
<p><strong>3) Redirecting non www URL to www URL</strong></p>
<p align="justify">If you type yahoo.com in browser it will be<br />
redirected to www.yahoo.com. If you want to do same with your website<br />
then put the following code to .htaccess file. What is benefit of this<br />
kind of redirection?? Please check the post about <a title="301 redirect in PHP" href="http://roshanbh.com.np/2007/12/301-redirect-in-php-and-htaccess.html">SEO friendly redirect (301) redirect in php and .htaccess.</a></p>
<p><span style="color:#800000;">RewriteEngine On</span></p>
<p><span style="color:#800000;">RewriteCond %{HTTP_HOST} ^optimaxwebsolutions\.com$</span></p>
<p><span style="color:#800000;">RewriteRule (.*) http://www.optimaxwebsolutions.com/$1 [R=301,L]</span></p>
<p><strong>4) Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz</strong></p>
<p align="justify">Have you checked zorpia.com.If you type<br />
http://zorpia.com/roshanbh233 in browser you can see my profile over<br />
there. If you want to do the same kind of redirection i.e<br />
http://yoursite.com/xyz to http://yoursite.com/user.php?username=xyz<br />
then you can add the following code to the .htaccess file.</p>
<p><span style="color:#800000;">RewriteEngine On</span></p>
<p><span style="color:#800000;">RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1</span></p>
<p><span style="color:#800000;">RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1</span></p>
<p><strong>5) Redirecting the domain to a new subfolder of inside public_html.</strong></p>
<p align="justify">Suppose the you’ve redeveloped your site and all the<br />
new development reside inside the “new” folder of inside root<br />
folder.Then the new development of the website can be accessed like<br />
“test.com/new”. Now moving these files to the root folder can be a<br />
hectic process so you can create the following code inside the<br />
.htaccess file and place it under the root folder of the website. In<br />
result, www.test.com point out to the files inside “new” folder.</p>
<p><strong> </strong></p>
<p><span style="color:#800000;">RewriteEngine On</span></p>
<p><span style="color:#800000;">RewriteCond %{HTTP_HOST} ^test\.com$ [OR]</span></p>
<p><span style="color:#800000;">RewriteCond %{HTTP_HOST} ^www\.test\.com$</span></p>
<p><span style="color:#800000;">RewriteCond %{REQUEST_URI} !^/new/</span></p>
<p><span style="color:#800000;">RewriteRule (.*)   /new/$1<br />
</span></p>
<p><span style="color:#800000;"><span style="color:#000000;">Resource:</span> <a href="http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html">Roshan&#8217;s Blog</a><br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=76&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/08/5-useful-url-rewriting-examples-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to Django &#8211; Building a To-Do List</title>
		<link>http://aytek.wordpress.com/2009/02/07/intro-to-django-building-a-to-do-list/</link>
		<comments>http://aytek.wordpress.com/2009/02/07/intro-to-django-building-a-to-do-list/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 16:13:33 +0000</pubDate>
		<dc:creator>Aytek</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[mvc pattern]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://aytek.wordpress.com/2009/02/07/intro-to-django-building-a-to-do-list/</guid>
		<description><![CDATA[Django is a powerful web framework, created in Python, which followsthe DRY (Don&#8217;t repeat yourself), and batteries included philosophies.It allows for rapid website development by providing a wide range oftools and shortcuts out of the box. Django is extremely fast andflexible &#8211; even faster than all of the PHP frameworks available. Inthis article, I&#8217;ll introduce [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=60&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Django is a powerful web framework, created in Python, which follows<br />the DRY (Don&#8217;t repeat yourself), and batteries included philosophies.<br />It allows for rapid website development by providing a wide range of<br />tools and shortcuts out of the box. Django is extremely fast and<br />flexible &#8211; even faster than all of the PHP frameworks available. In<br />this article, I&#8217;ll introduce you to Django by showing you how to build<br />a simple to-do list.</p>
<p>To read full article by Logan Mortimer visit <a target="_blank" href="http://nettuts.com/tutorials/other/intro-to-django-building-a-to-do-list/">nettuts.com</a></p>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/python" rel="tag">python</a>, <a class="performancingtags" href="http://technorati.com/tag/django" rel="tag">django</a>, <a class="performancingtags" href="http://technorati.com/tag/web%20development" rel="tag">web development</a>, <a class="performancingtags" href="http://technorati.com/tag/mvc%20pattern" rel="tag">mvc pattern</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aytek.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aytek.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aytek.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aytek.wordpress.com&amp;blog=194233&amp;post=60&amp;subd=aytek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aytek.wordpress.com/2009/02/07/intro-to-django-building-a-to-do-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ca41f56cc04f03953492ca358ba188?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain Tsubasa</media:title>
		</media:content>
	</item>
	</channel>
</rss>
