<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8003962790669596876</id><updated>2012-02-16T06:06:37.089-08:00</updated><title type='text'>Software / Programming/ CS</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8003962790669596876.post-3776054517816960700</id><published>2011-11-19T23:03:00.000-08:00</published><updated>2011-11-19T23:22:49.799-08:00</updated><title type='text'>Origins of code interviews questions</title><content type='html'>Have you ever wondered where are all those brain teasing ,programming interview questions coming from? You can find them gathered and published in at least a dozen of web sites and books. You read the book before the interview and try to memorize, ideally understand the answers. Then when the interview is over, you forget them.&lt;br /&gt;I was curious where are any of those problems used in practice. I mean, there must be some application. For example, take the short formula (n&amp;(n-1)) ==0, where do you ever need to determine if a number is a power of 2? Of course, since computers are using binary arithmetics, you would think this has many application. I tried googling and I could not find any. I found out about perfect numbers http://mathforum.org/dr.math/faq/faq.perfect.html that are computed based on but I don't think you need to verify if a number is a power of 2 there.&lt;br /&gt;Finding a missing integer in an array of consecutive integers has a simple solution using bit manipulation. I was able to find one application thanks to this site: http://blogs.oracle.com/malkit/entry/finding_missing_value&lt;br /&gt; and after reading it, I got the idea of another application: to find a missing packet in a sequence of received packets, where each one has a sequence number (like in TCP protocol).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8003962790669596876-3776054517816960700?l=spmprogram.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/3776054517816960700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spmprogram.blogspot.com/2011/11/origins-of-code-interviews-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/3776054517816960700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/3776054517816960700'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/2011/11/origins-of-code-interviews-questions.html' title='Origins of code interviews questions'/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8003962790669596876.post-4211948651128497127</id><published>2011-09-01T22:01:00.000-07:00</published><updated>2011-09-01T22:11:29.690-07:00</updated><title type='text'>Parallel sorting algorithms in databases - reading papers</title><content type='html'>I'm reading a lot of papers about sorting these days and it's getting a little  funny. Pretty much every paper starts the same.&lt;br /&gt;&lt;br /&gt;A guide for writing the "Introduction" of a paper about parallel sorting algorithms:&lt;br /&gt;&lt;br /&gt; - Your first sentence : Sorting is a (fundamental/most important) (kernel/operation/building block/task) in databases.&lt;br /&gt;- Say some of the common uses of sorting in databases (ORDER BY, Merge Join, etc.)&lt;br /&gt;- Mention Moore's law&lt;br /&gt;- Future trends:  The number of cores will be increasing in the future (of course it will)&lt;br /&gt;&lt;br /&gt;Apart from finding the introductions a little funny, the content of the papers is getting rather complex once you are done with the introduction. For example this paper "Fast Sort on CPUs and GPUs:&lt;br /&gt;A Case for Bandwidth Oblivious SIMD Sort" that has won an award has some of the most sophisticated aanlysis and terms. It helped me understand my own parallel algorithms better.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8003962790669596876-4211948651128497127?l=spmprogram.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/4211948651128497127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spmprogram.blogspot.com/2011/09/parallel-sorting-algorithms-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/4211948651128497127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/4211948651128497127'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/2011/09/parallel-sorting-algorithms-in.html' title='Parallel sorting algorithms in databases - reading papers'/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8003962790669596876.post-864298457824445870</id><published>2011-03-05T16:49:00.000-08:00</published><updated>2011-03-05T16:52:12.960-08:00</updated><title type='text'></title><content type='html'>After reading http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx&lt;br /&gt;I will rewrite all my methods to use a List&lt;string&gt; instead of an ArrayList.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8003962790669596876-864298457824445870?l=spmprogram.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/864298457824445870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spmprogram.blogspot.com/2011/03/after-reading-httpmsdn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/864298457824445870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/864298457824445870'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/2011/03/after-reading-httpmsdn.html' title=''/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8003962790669596876.post-4168567826817296632</id><published>2011-03-05T16:28:00.000-08:00</published><updated>2011-03-05T16:48:44.926-08:00</updated><title type='text'>Difference between List, HashTable and Dictionary</title><content type='html'>According to http://msdn.microsoft.com/en-us/library/ms379571(v=vs.80).aspx, a Hash table is the fastest data structure in C# when you know the number of records you are going to store because of the collision resulution method. &lt;br /&gt;&lt;br /&gt;The better performance of a Hshtable over a Dictionary is doubtful however, due to boxing/unboxing which occurs when using a HashTable (http://msdn.microsoft.com/en-us/library/4yh14awz(v=vs.80).aspx).&lt;br /&gt;&lt;br /&gt;Some sources say that HastTable is simply used for backward compability, and the new programs should always use a Dictionary. &lt;br /&gt;&lt;br /&gt;My approach will be to use a Dictionary when I have to search for records and a List when I simply add new records or process records one by one. I will be curious to test the performance of a HastTable over a Dictionary though for a fixed-size array.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8003962790669596876-4168567826817296632?l=spmprogram.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/4168567826817296632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spmprogram.blogspot.com/2011/03/difference-between-list-hashtable-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/4168567826817296632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/4168567826817296632'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/2011/03/difference-between-list-hashtable-and.html' title='Difference between List, HashTable and Dictionary'/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8003962790669596876.post-1511055566082248679</id><published>2011-03-05T16:23:00.000-08:00</published><updated>2011-03-05T16:26:20.552-08:00</updated><title type='text'></title><content type='html'>A good article about how to improve the performance of a DataReader:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/sqldatareader-performance-tips.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8003962790669596876-1511055566082248679?l=spmprogram.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spmprogram.blogspot.com/feeds/1511055566082248679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spmprogram.blogspot.com/2011/03/good-article-about-how-to-improve.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/1511055566082248679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8003962790669596876/posts/default/1511055566082248679'/><link rel='alternate' type='text/html' href='http://spmprogram.blogspot.com/2011/03/good-article-about-how-to-improve.html' title=''/><author><name>Svetlana Marinova</name><uri>http://www.blogger.com/profile/08902639535619912759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
