<?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/"
	>

<channel>
	<title>bLeniuS</title>
	<atom:link href="http://blog.blenius.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.blenius.com</link>
	<description>Brian Blogs Here</description>
	<lastBuildDate>Tue, 20 Oct 2009 16:03:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New books for my geekshelf</title>
		<link>http://blog.blenius.com/?p=86</link>
		<comments>http://blog.blenius.com/?p=86#comments</comments>
		<pubDate>Tue, 20 Oct 2009 16:03:51 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.blenius.com/?p=86</guid>
		<description><![CDATA[Just ordered three new books!
They all have really great rating, and I actually read some on Google Books (I really love that beast..I never waste my money on books)
I don&#8217;t know if I will ever be done reading all these books, but I think they deserve to be on my geekshelf, which is already full [...]]]></description>
			<content:encoded><![CDATA[<p>Just ordered three new books!<br />
They all have really great rating, and I actually read some on Google Books (I really love that beast..I never waste my money on books)</p>
<p>I don&#8217;t know if I will ever be done reading all these books, but I think they deserve to be on my geekshelf, which is already full of computer science and programming books&#8230;and the Harry Potter series <img src='http://blog.blenius.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>1. Algorithm Design Manual<br />
<a href="http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1256053932&amp;sr=8-2" target="_blank"><img class="alignnone" title="The Algorithm Design Manual" src="http://i43.tinypic.com/35331ix.jpg" alt="" width="300" height="421" /></a><br />
How many of these algorithm books do I need before I clearly understand NP-complete problems?</p>
<p>2. Concurrency in Java<br />
<a href="http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1256054218&amp;sr=1-1" target="_blank"><img class="alignnone" title="Concurrency in Java" src="http://www.ebooknetworking.com/books/032/134/big0321349601.jpg" alt="" width="378" height="500" /></a></p>
<p>Something I really need. UC San Diego emphasized a lot in Java (and C). However, I took my operating system class with a professor who favored C. So.. I never had to deal with multithreading with Java craps. This books seems to cover a lot of details on how to do multithreading correctly in Java, plus the concept of multithreading.</p>
<p>3. Coders at Work<br />
<a href="http://www.amazon.com/Coders-at-Work-Peter-Seibel/dp/1430219483/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1256054288&amp;sr=1-1" target="_blank"><img class="alignnone" title="Coders at Work" src="http://i27.tinypic.com/21nk4xz.jpg" alt="" width="300" height="450" /></a></p>
<p>Interviews of many famous coders&#8230; this should be fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blenius.com/?feed=rss2&amp;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Job Hunting Started!</title>
		<link>http://blog.blenius.com/?p=74</link>
		<comments>http://blog.blenius.com/?p=74#comments</comments>
		<pubDate>Mon, 19 Oct 2009 11:28:37 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.blenius.com/?p=74</guid>
		<description><![CDATA[
I&#8217;m hoping to graduate in December, 2009.
YES, I&#8217;m HOPING to graduate. I&#8217;m not taking any crazy course, but who knows?
Anyway, if I&#8217;m graduating in few months, I need to figure out what I need to do upon my graduation.
I have updated my resume and submitted to a bunch of places.
I&#8217;m planning to submit it to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Get a job!" src="http://vocalo.org/files/imagecache/default/media/images/JobSearchNewspaper.jpg" alt="" width="439" height="416" /><br />
I&#8217;m hoping to graduate in December, 2009.<br />
YES, I&#8217;m HOPING to graduate. I&#8217;m not taking any crazy course, but who knows?</p>
<p>Anyway, if I&#8217;m graduating in few months, I need to figure out what I need to do upon my graduation.<br />
I have updated my resume and submitted to a bunch of places.<br />
I&#8217;m planning to submit it to another set of companies.</p>
<p>Hopefully, I will get through all the job application and interview process well&#8230;<br />
*crossing my fingers*</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blenius.com/?feed=rss2&amp;p=74</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading in a file with Perl and Java</title>
		<link>http://blog.blenius.com/?p=59</link>
		<comments>http://blog.blenius.com/?p=59#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:18:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[file handling]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.blenius.com/?p=59</guid>
		<description><![CDATA[This is why people love Perl. A small amount of work to do a BIG TASK:

        $file_name = "somefile.txt";
        open (my $fh, $file_name) or die "Ouch: $!\n";
        # $text variable now contains whatever the [...]]]></description>
			<content:encoded><![CDATA[<p>This is why people love Perl. A small amount of work to do a BIG TASK:</p>
<pre name="code" class="php">
        $file_name = "somefile.txt";
        open (my $fh, $file_name) or die "Ouch: $!\n";
        # $text variable now contains whatever the file contains
        $text = do {
            local $/ = undef;
            <$fh>;
        };
        close($fh) or die("Ugh: $!\n");
</pre>
<p>Just to compare, this is how you would do in Java:</p>
<pre name="code" class="java">
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class ReadFile {
    public static void main (String[] args) {
        try {
            String filename = "somefile.txt";
            BufferedReader bufferedReader = new BufferedReader(new FileReader(filename));
            ArrayList<String> lines = new ArrayList<String>();
            String line = null;
            while ((line = bufferedReader.readLine()) != null) {
                lines.add(line);
            }
            bufferedReader.close();
        }
        catch (IOException e) {
              System.err.println("OUCH!!!!");
        }
    }
}
</pre>
<p>After this, you get a list of string that contains contents of a file. This is a little extreme case, but still&#8230; it shows how much of work you would do if you want to do the same job in Java. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blenius.com/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Decorator Revisited, Part 1: What is a decorator?</title>
		<link>http://blog.blenius.com/?p=34</link>
		<comments>http://blog.blenius.com/?p=34#comments</comments>
		<pubDate>Wed, 19 Aug 2009 23:37:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.blenius.com/?p=34</guid>
		<description><![CDATA[I love programming in Python. It not only keeps lines of code to the minimum but also has great language features that allow developers to think about programming in different ways. I often get confused whether Python is a object-oriented language or a funcitonal programming language (to clarify, it is a general-purpose programming language). It [...]]]></description>
			<content:encoded><![CDATA[<p>I love programming in Python. It not only keeps lines of code to the minimum but also has great language features that allow developers to think about programming in different ways. I often get confused whether Python is a object-oriented language or a funcitonal programming language (to clarify, it is a general-purpose programming language). It even has lambda functions!! However, the one language feature that I like the most is decorator. Decorator is simply a syntatic sugar that looks like Java&#8217;s annotation. This is a simple example of decorator in Python:</p>
<pre class="py" name="code">@decorator
def decorated_func():
... some code ...</pre>
<p>Same as . . .</p>
<pre class="py" name="code">def decorated_func():
... some code ...

decorated_func = decorator(decorated
_func)</pre>
<p>Basically, decorator is a function that can do anything before and after a decorated_func gets called. This is closely related to the <a href="http://sourcemaking.com/design_patterns/decorator">decorator design pattern</a>, which dynamically add functionality or responsibility to an existing object. With that said, you can add as many decorators as you can as long as their types are matched:</p>
<pre class="py" name="code">@decorator1
@decorator2
@decorator3
def decorated_func():
     ... some code ....</pre>
<p>In the next two posts, I will go over how to create a decorator for general functions and classes. I will also go over some interesting ways of using decorators, such as the famous memoized decorator.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blenius.com/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
