<?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>cawanpink.net &#187; postgrad</title>
	<atom:link href="http://cawanpink.net/tag/postgrad/feed/" rel="self" type="application/rss+xml" />
	<link>http://cawanpink.net</link>
	<description>i dislike capital letters. i abuse ctrl-c and ctrl v</description>
	<lastBuildDate>Sat, 21 Aug 2010 10:06:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I&#8217;m on semester break!</title>
		<link>http://cawanpink.net/2010/01/im-on-semester-break/</link>
		<comments>http://cawanpink.net/2010/01/im-on-semester-break/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 05:49:33 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[belongings]]></category>
		<category><![CDATA[geeks]]></category>
		<category><![CDATA[postgrad]]></category>
		<category><![CDATA[putrajaya]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=2146</guid>
		<description><![CDATA[I suddenly found this huge amount of time. I mean really HUGE. I have week nights and weekends free. Well maybe not to you, but it is that huge if you&#8217;re studying part time. I was so used to worry about assignments and studying every moment every day, now for the next 3 months I [...]]]></description>
			<content:encoded><![CDATA[<p>I suddenly found this huge amount of time. I mean really HUGE. I have week nights and weekends free. Well maybe not to you, but it is that huge if you&#8217;re studying part time. I was so used to worry about assignments and studying every moment every day, now for the next 3 months I am free! So I&#8217;ve been this free only for a week, I got my room cleaned up &#8211; got it into much neater state (heh) by bringing in 3 new proper furnitures &#8211;  a bed, a study table and a wardrobe. Now everything is in its place and happy.</p>
<p>I&#8217;m not going to take pictures of my room (sorry Kak Watiey heheh) &#8211; it&#8217;s such a sacred place for me. But they are very similar like these, except mine all in dark wood colour:</p>
<p style="text-align: center;"><a href="http://www.archerssleepcentre.co.uk/secure/images/products/2129.jpg"><img class="aligncenter" title="Single bed " src="http://www.archerssleepcentre.co.uk/secure/images/products/2129.jpg" alt="" width="300" height="226" /></a><br />
<a href="http://upload.ecvv.com/upload/Product/200801/20063154382119084_Sliding_Door_Wardrobe.jpg"><img class="aligncenter" title="Wardrobe" src="http://upload.ecvv.com/upload/Product/200801/20063154382119084_Sliding_Door_Wardrobe.jpg" alt="" width="360" height="282" /></a><br />
<a href="http://www.hupsheng.com.my/Cube5/images/uploads/HS-488.jpg"><img class="aligncenter" title="Study table" src="http://www.hupsheng.com.my/Cube5/images/uploads/HS-488.jpg" alt="" width="309" height="320" /></a></p>
<p>Ok that&#8217;s done and now last night I started looking at <a href="http://www.djangoproject.com/">Django</a> + <a href="http://www.postgresql.org">PostgreSQL</a> + <a href="http://www.python.org/">Python</a> in general. Was kinda slow, I have this habit of looking too far ahead (maybe it&#8217;s thinking too much) so I was worried that I would ruin my laptop in the future by blindly install everything inside. Typical woman? Being paranoid of nothing? Yea jumping in too early is not my thing, I&#8217;m scared if anything goes wrong. Laptop dies, application breaks, stuff happens yes I know but I don&#8217;t want it to be because I didn&#8217;t do my best to prevent it from happening.</p>
<p>Anyway, yea I&#8217;m embracing this temporary new found freedom &#8211; will put it to good use. Was so tempting to watch TV  (I LOVE WATCHING TV &#8211; enough said) at nights but like my mom says &#8220;TV will be there forever waiting for you, go do something else better&#8221; so no worries there. Besides, I like programming. It&#8217;s like a drug. I remember Harish Pillay said during <a href="http://foss.my">FOSS.my 2009</a>, &#8220;How do you think an author wins an award for his/her book? He/She probably reads alot of other books to write it. So, how do you be good in programming? You read alot of codes.&#8221;</p>
<p>I love that man.</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2010/01/im-on-semester-break/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Now I know how to mine data</title>
		<link>http://cawanpink.net/2010/01/now-i-know-how-to-mine-data/</link>
		<comments>http://cawanpink.net/2010/01/now-i-know-how-to-mine-data/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 08:16:09 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[malaysian government]]></category>
		<category><![CDATA[open data]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=2122</guid>
		<description><![CDATA[There&#8217;s just too many techniques on how you can do data mining. In grad school we only got to know 1 technique &#8211; by using artificial neural network. There&#8217;s a tool for this &#8211; Weka. Download and install it or sudo apt-get it (yes imagine my surprise when I found out about this).
What&#8217;s data mining?
Well, [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s just too many techniques on how you can do data mining. In grad school we only got to know 1 technique &#8211; by using artificial neural network. There&#8217;s a tool for this &#8211; <a href="http://www.cs.waikato.ac.nz/ml/weka/">Weka</a>. Download and install it or sudo apt-get it (yes imagine my surprise when I found out about this).</p>
<h3>What&#8217;s data mining?</h3>
<p>Well, basically it&#8217;s a process to get a knowledge (eg. if customers buy diapers, most likely they will buy beers too) from your data (imagine spreadsheets filled with numbers and strings). You may have thousands of records but how do you make sense of it? You mine those data, and get a pattern. From there you&#8217;ll get a knowledge. So from this you can put beers next to diapers in supermarkets to increase sales. That&#8217;s the general idea.</p>
<p>There&#8217;s a 90% chance that the data you got is not cleaned aka there&#8217;s missing values, some data are not consistent (eg. in sex can only have F or M, there&#8217;s a value Q?), and some data are just plain rubbish. The data need to go through preprocessing stage. For missing values, you have to filled them up, either using mean or median values, whichever is best for your data. The same goes to inconsistent data. This is where working with experts in the domain you&#8217;re working in is very important. You don&#8217;t want to remove what you think is rubbish but it actually means something.</p>
<p>Then we have data discretization process where you reduce that huge amount of data but they still carry the same value. Afterwards we normalize the data. After this is done, then the data is ready for the modelling exercise.</p>
<h3>Classification</h3>
<p>One of the benefit you get from data mining is classification. It&#8217;s where you can predict if you have this data (eg. male, married, doesn&#8217;t have children, have regularly purchase beer for the past year) whether beer purchase is likely. So it will classify to something like this purchase_beer equals to 0 (no) or 1 (yes). In order for the model to predict 0 or 1, the model itself has to be trained with alot of data. Train it until it reaches the accuracy we want, above 90% is good. A trained model with very high accuracy is going to be an asset as you can feed it data and it will spit out what we want. </p>
<p>The most difficult part in doing this for me is the data preprocessing part. You have to have quality cleaned data to produce quality results. You have to carefully select which kind of data is relevant to your goal (eg. would you want to include one&#8217;s job as one of the attributes considered for the diapers-beers example?) which is why having domain experts is important. They also have to determine how each data should affect the result (eg. job probably affects 10% but marital status affects 80% towards diapers-beers purchase).</p>
<h3>I just love AI</h3>
<p>There are just so many preprocessing methods &#038; data mining hybrid techniques already been researched by academicians. I&#8217;m just so overwhelmed by the amount of technical papers on this. They probably not so much IT savvy like us, the implementors as they call it, but they definitely have the brain on that part of the world. We just have to scour through this massive database and get it to run on our apps. Well, should you need it that is. Coz processing thousands of data can take hours or days, some months, depending on your machine spec.</p>
<h3>Open data</h3>
<p>While doing data mining assignment last 2 weeks, I became frustrated with the unavailability of data in Malaysia. Sad. Maybe it&#8217;s still difficult for us to see it now, I&#8217;m already imagining all the stuff we can do with those data like in JPA, MOHR, MOH, MOHE &#8211; fuhhhh I&#8217;m all shuddery now. Even in OSCC, those training feedback forms and MyGOSSCON feedback forms &#8211; hmm whatever happened to those?</p>
<p>There are concerns of exposing private data I guess. Well, if you ask me make the data anonymous, as I couldn&#8217;t care less who got promoted last year. I only want the &#8217;spec&#8217; of that person who got promoted &#8211; age, sex, location, department, salary, is he respected by peers, does he drive, etc, that kind of stuff, you get the idea.</p>
<p>Hmm.. this will take another 10 years to realise, I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2010/01/now-i-know-how-to-mine-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve had pretty good lecturers so far at UKM</title>
		<link>http://cawanpink.net/2009/12/ive-had-pretty-good-lecturers-so-far-at-ukm/</link>
		<comments>http://cawanpink.net/2009/12/ive-had-pretty-good-lecturers-so-far-at-ukm/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 05:06:30 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=2092</guid>
		<description><![CDATA[Now that I&#8217;ve just found out the thing that we&#8217;re supposed to submit tomorrow is now postponed to next week, I&#8217;m taking a moment to write about my 4 lecturers I&#8217;ve had so far and my whole experience being a in grad school here.
Semester I
The conditions of the class were pretty common and just above [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve just found out the thing that we&#8217;re supposed to submit tomorrow is now postponed to next week, I&#8217;m taking a moment to write about my 4 lecturers I&#8217;ve had so far and my whole experience being a in grad school here.</p>
<p><strong>Semester I</strong><br />
The conditions of the class were pretty common and just above tolerable. No power points in sight except at the very front and the very back. When it was raining I prayed to god that I won&#8217;t die because of the cold temperature. Being in an IT faculty, taking an IT course, but no wifi? The ones they had was the prepaid ones. I couldn&#8217;t be bothered to search for any open shops in campus that&#8217;s open on Saturdays. Being one of the research university, free wifi should be available to all staff and students! Unless I need that rare publications, I can pretty much do anything on the internet.</p>
<p>Dr. Md Jan taught Data Structures (we got to know trees). He&#8217;s a considerate person. It&#8217;s a very straightforward paper, like Maths, that I loved it! He&#8217;s always open for discussions, jovial and committed. I like him because he made use of internet in his lectures. He&#8217;s current. He let us choose our own programming language for his assignments. Being an open source person, that&#8217;s freedom of choice and I liked it.</p>
<p>Prof. Patel taught Computer Network. I just couldn&#8217;t bring myself to like this paper. It felt like out of this world. He came across as someone who teaches just to pay the rent. Nothing&#8217;s wrong there of course, it just felt ordinary. I couldn&#8217;t understand his assignments, I did it just to pass the test. Network is something that I don&#8217;t wish to dwell in so much.</p>
<p><strong>Semester 2</strong><br />
Hey the classroom looks so much better. New floor, new chairs so I the chilling problem gone. They set up power points! And there&#8217;s wifi! Applaudable effort for me even though it&#8217;s not stable all the time but the thought is there. Keep it up!</p>
<p>Dr. Salwani teaches Software Engineering. Her expertise is in AI but she used to be a developer so it&#8217;s actually captivating to listen to her lectures (at least for me coz I can relate). She used real life scenarios and real life problems &#038; solutions. I think she&#8217;s well respected in her field to other academicians in Malaysia. She&#8217;s got a thing with open source that I&#8217;m not so comfortable with (from past experience maybe?). She&#8217;s tough and kinda strict but lacks a bit in managing assignments deadlines. We have 2 assignments still not sure of the deadlines. I think my classmates wish she would just take back the those 2 since other one we&#8217;ve been doing is quite huge!</p>
<p>Dr. Azura teaches Advanced Artificial Intelligent. She&#8217;s one of the top AI researchers along with Dr. Salwani, although her interest is in data mining. The work they&#8217;ve done, I mean, seriously, big corporations should hire/consult these 2 &#8211; they can give you patterns and predict things! I am astounded that I had not looked into AI before (I studied maths doing my first degree and I though AI is very physics-like haha thanks to tv shows), that I feel those CS graduates should all work in AI industry! Don&#8217;t just program a program, program an AI program. Anyway, she&#8217;s a great person, abit chatty in the classroom although I don&#8217;t mind it since the class is 3-5pm, and a very knowlegable person.</p>
<p><strong>Conclusion?</strong><br />
Although the lecturers have been great, I&#8217;ve had some problems with my group assignments. I like if the assignments is individual coz I don&#8217;t have to rely on others to do my work. I have no problems with working in a group, it&#8217;s just frustrating some of them like to work last minute. So I usually did my part early and trust that they would take that and continue. When it&#8217;s time to submit, it&#8217;s disheartening looking at the end result so messy and unorganized. Oh well. </p>
<p>Being the only programmer in the group really sucks sometimes. The group did their part, I believe as much as they could but I get the right to grumble. Non-programming assignment, I contribute to the group. When it comes to programming, only me doing it? It&#8217;s because they have already forgetten how to program. This is real, so real that it sucks being a programmer in this case.</p>
<p>Studying really takes a toll in your life. Your priority changes abit. Not much if you&#8217;re single, alot if you&#8217;re married. I understand my group have husbands and children to care for but it&#8217;s not good if you abandon your team on not one, but many presentation days. My advice to married women who wants to pursue study:</p>
<p>[1] Let everyone in your family know your intention. If you&#8217;re studying, let them know you&#8217;re studying. Your priority has changed abit. Last time you go straight to the kitchen after work 5 times a week, now you only do it 2 times a week. There&#8217;s just some routine stuff you can&#8217;t do anymore.<br />
[2] Your husband should understand what being a grad student means. It doesn&#8217;t mean you still can be with him everytime going to everywhere, not until you finish studying. It doesn&#8217;t mean he can continue old habit of not doing anything around the house after work (just an example). You wife has other stuff to do now, give a take a little now can we? If you can&#8217;t work together, I assure you, you&#8217;re going to be staying up late every night just to catch up with the lessons.<br />
[3] Please understand the sacrifice you have to make if you&#8217;re studying. You&#8217;re going to be tired, busy all the time and  you can&#8217;t afford to be at all family occasions/kenduri kawen kawan anymore. If you&#8217;re studying, you want to be good at it and because it means something to you. If not why do it at all?</p>
<p>Anyway, I actually enjoy the whole period so far although I don&#8217;t have time for anything else. You want it, you have to sacrifice your time. I now know some stuff that I probably wouldn&#8217;t have known if I&#8217;m learning on my own. Granted there are times I felt like quitting &#8211; but that&#8217;s just normal I guess. </p>
<p>Education is not cheap these days. I should squeeze everything out of it so I get the money worth. All in all I think UKM is an ok place for me. As long as they have good lecturers, that&#8217;s the most important thing and so far I think they have pretty good ones at FTSM.</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/12/ive-had-pretty-good-lecturers-so-far-at-ukm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fuzzy reasoning &amp; Artificial Neural Network</title>
		<link>http://cawanpink.net/2009/11/fuzzy-reasoning-artificial-neural-network/</link>
		<comments>http://cawanpink.net/2009/11/fuzzy-reasoning-artificial-neural-network/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 10:08:38 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=2041</guid>
		<description><![CDATA[Interesting assignment for my AI paper. The first one asks for me to calculate someone&#8217;s learning difficulty level, given his IQ level and his recent test score (education domain). Another one asks to predict the level of H1N1 risk of a patient, given his severity of these symptoms: fever, breathing difficulty, fatique and coughing.
Fuzzy reasoning [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting assignment for my AI paper. The first one asks for me to calculate someone&#8217;s learning difficulty level, given his IQ level and his recent test score (education domain). Another one asks to predict the level of H1N1 risk of a patient, given his severity of these symptoms: fever, breathing difficulty, fatique and coughing.</p>
<p>Fuzzy reasoning is useful when you&#8217;re dealing with &#8216;high IQ&#8217;, &#8216;average IQ&#8217;, &#8216;low IQ&#8217;, etc. How would you translate &#8216;high&#8217; or &#8216;average&#8217; into crisp numbers like more than 160 it&#8217;s &#8216;high IQ&#8217;. If it&#8217;s more that 130cm it&#8217;s &#8216;average IQ&#8217;. Of course the numbers can&#8217;t be used for everyone (I may have a different opinion on how much is &#8216;high IQ&#8217;). And you can&#8217;t use simple algorithm if and else like we normally would do. Fuzzy sets on the other hand allows you to have 160 falls under &#8216;high IQ&#8217; and &#8216;average IQ&#8217; at say, 0.8 and 0.6 (on a scale 0 to 1) each. Once you have defined all that, you have to have your fuzzy rules to work on. Given someone&#8217;s IQ level and his test score, you can calculate his learning difficulty level and then maybe you can have this result to propose a new set of tests that match his level.</p>
<p>Artificial neural network emulates how the brain works, well sort of. It has the capability to learn and predict stuff. Like the H1N1 case, the model will learn to reach a very good predict whether the patient has high risk of being infected with H1N1 or not. It is much dependant on number of cases, the more cases you feed the model, the better the result will be.</p>
<p>Personally I think it&#8217;s all mathematics. Everywhere you see calculations. Once you understand how it works, it&#8217;s pretty easy (the data I worked on is not that much hahaha). In real world, the data set is huge, so data mining is actually intriguing, I think. Worth knowing.</p>
<p>In the risk of my classmates meniru, I&#8217;m going to upload what I have done so far, which I doubt that they&#8217;ll find it here until much later. If you manage to <a href="http://cawanpink.net/wordpress/wp-content/uploads/2009/11/assignment2.pdf">get it here</a> anyway, hey I really don&#8217;t mind you looking around. Just be kind enough to give feedbacks there&#8217;s mistakes in the doc <img src='http://cawanpink.net/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .</p>
<p>Okay. HUNGRY. AND SLEEPY.</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/11/fuzzy-reasoning-artificial-neural-network/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Grad school (Part 1): AI is blowing me away!</title>
		<link>http://cawanpink.net/2009/08/grad-school-part-1-ai-is-blowing-me-away/</link>
		<comments>http://cawanpink.net/2009/08/grad-school-part-1-ai-is-blowing-me-away/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 05:13:36 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[oscc]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=1913</guid>
		<description><![CDATA[Well, so far at least. So today marks the beginning of my second semester here in UKM. I can&#8217;t wait for this nightmare to end. 3 more sems to go&#8230; hinnnnssssss hinnsss hinss..
Anyway, the AI course &#8211; I like the lecturer already, she encourages us to use open source in doing assignments. And she&#8217;ll tailored [...]]]></description>
			<content:encoded><![CDATA[<p>Well, so far at least. So today marks the beginning of my second semester here in UKM. I can&#8217;t wait for this nightmare to end. 3 more sems to go&#8230; hinnnnssssss hinnsss hinss..</p>
<p>Anyway, the AI course &#8211; I like the lecturer already, she encourages us to use open source in doing assignments. And she&#8217;ll tailored the assignments to fit the background of her students. One thing that I like is that she&#8217;ll fail anyone who doesn&#8217;t submit assignments even though it carries 40%.<br />
<span id="more-1913"></span><br />
And yeah the introduction to AI that we went through today has made me to look at MyMeeting on a whole new perspective. It&#8217;s a far fetched thing but I&#8217;d like it to be able to tell the user what will happen to his projects in advance, say 3 months early. It would be cool if the system can predict whether or not the action will be taken care of by specific agency or not. So this can evolve to something else, like picking the right agency to implement a task, since the system holds its past performance. Fuyyoh very high ambitions, feeling rather productive at this minute&#8230; hahaha.</p>
<p>You know I miss doing integration between systems. Too bad I&#8217;m working for OSCC which has a few products but I&#8217;m only working on one product. I reminisce the day when procurement department can approve parts purchase by the red light indicator beside its name, and how customer service department can send alerts automatically when reservoir level is too low. Initially there were many independent apps going on there but when it&#8217;s integrated, great things can happen.</p>
<p>From all these apps, the high level management then only can see, for example, how much they have spent, how much water has been saved, at what pace the water is being consumed, are they ready for the next quarter etc. This kind of thing helped alot in driving the direction the company is going. The point I&#8217;m trying to make is, sometimes big bosses they ask for something high level like this when the data are not there to begin with.</p>
<p>Hmmpphhh I&#8217;ve to go, next class is starting.</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/08/grad-school-part-1-ai-is-blowing-me-away/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Huffman Code</title>
		<link>http://cawanpink.net/2009/06/huffman-code/</link>
		<comments>http://cawanpink.net/2009/06/huffman-code/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:06:23 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=1868</guid>
		<description><![CDATA[So this is another little assignment that we had just before final exams. It&#8217;s about Huffman code and its application in file compression. We were supposed to write a program to read a file, determine total bits for that file, then use Huffman code to compress it and calculate the total bits after the compression. [...]]]></description>
			<content:encoded><![CDATA[<p>So this is another little assignment that we had just before final exams. It&#8217;s about <a href="http://en.wikipedia.org/wiki/Huffman_code">Huffman code</a> and its application in file compression. We were supposed to write a program to read a file, determine total bits for that file, then use Huffman code to compress it and calculate the total bits after the compression. The file should only contain alphanumeric characters [A-Za-z0-9], and maybe spaces, new lines and dots and commas.<br />
<span id="more-1868"></span><br />
This script is not the most elegant since I only had 2, 3 days to do it (really it&#8217;s a dump of chunk of codes) but it works so hoorah! Basically what the script does is:</p>
<ol>
<li>Read a file (*.txt) and determine frequency of each characters and total bits.</li>
<li>Build a Huffman tree based on previous frequency table. Each node keeps a character &amp; its frequency, path (eg. 011, 0011, 01110 etc), vertex flag (whether it&#8217;s a left or right child) and visit flag (whether it has been visited or not &#8211; for node searching later). Note though, not every node keeps a character, only leaf nodes do (Huffman tree properties). Sorting algorithm to build priority queue to work with when building the tree is <a href="http://en.wikipedia.org/wiki/Selection_sort">selection sorting algorithm</a>.</li>
<li>Follow every root-to-leaf path to get the bits for each character. This script uses <a href="http://en.wikipedia.org/wiki/Breadth-first_search">breadth-first search algorithm</a> to look for nodes inside the tree.</li>
<li>Write compression information in a new file (compressed one) but this script only write the bits sequence into the file.</li>
</ol>
<p>The file here: <a href='http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman1.cpp'>huffman.cpp</a> (C++)</p>
<p>Some screenshots:<br />
<a href="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_1.png"><img class="aligncenter size-medium wp-image-1870" title="huffman_1" src="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_1-300x225.png" alt="huffman_1" width="300" height="225" /></a><br />
<a href="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_2.png"><img class="aligncenter size-medium wp-image-1871" title="huffman_2" src="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_2-300x225.png" alt="huffman_2" width="300" height="225" /></a><br />
<a href="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_3.png"><img class="aligncenter size-medium wp-image-1872" title="huffman_3" src="http://cawanpink.net/wordpress/wp-content/uploads/2009/06/huffman_3-300x225.png" alt="huffman_3" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/06/huffman-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animal guessing game</title>
		<link>http://cawanpink.net/2009/06/animal-guessing-game/</link>
		<comments>http://cawanpink.net/2009/06/animal-guessing-game/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 10:35:46 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[postgrad]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=1624</guid>
		<description><![CDATA[Little assignment I had a while ago, about binary tree. The prof let us choose our own language so I thought of C++, just because I studied it 4,5 years back and didn&#8217;t freakin remember anything about it. 
The problem: Animal guessing game
What I did, the source: in C++
Thought of using classes but was short [...]]]></description>
			<content:encoded><![CDATA[<p>Little assignment I had a while ago, about binary tree. The prof let us choose our own language so I thought of C++, just because I studied it 4,5 years back and didn&#8217;t freakin remember anything about it. </p>
<p>The problem: <a href='http://cawanpink.net/wordpress/wp-content/uploads/2009/06/1230626752_tk643420project20no1.pdf'>Animal guessing game</a><br />
What I did, the source: <a href='http://cawanpink.net/wordpress/wp-content/uploads/2009/06/animal_game.cpp'>in C++</a></p>
<p>Thought of using classes but was short of time heh!</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/06/animal-guessing-game/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s been a while</title>
		<link>http://cawanpink.net/2009/03/its-been-a-while-2/</link>
		<comments>http://cawanpink.net/2009/03/its-been-a-while-2/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 08:12:28 +0000</pubDate>
		<dc:creator>cawanpink</dc:creator>
				<category><![CDATA[lament]]></category>
		<category><![CDATA[bachata]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[postgrad]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[wish]]></category>

		<guid isPermaLink="false">http://cawanpink.net/?p=1528</guid>
		<description><![CDATA[It&#8217;s not that actually, there were few updates but in Facebook. They&#8217;re all about tags. My friends went tag crazy. And people are crazy tweeting as well. Anyway, taking some time off to write about thumbdrive.
I AM IN DIRE NEED OF A THUMBDRIVE. Why I didn&#8217;t try to get one all this while is beyond [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not that actually, there were few updates but in Facebook. They&#8217;re all about tags. My friends went tag crazy. And people are crazy tweeting as well. Anyway, taking some time off to write about thumbdrive.</p>
<p>I AM IN <strong>DIRE NEED</strong> OF A THUMBDRIVE. Why I didn&#8217;t try to get one all this while is beyond me. It&#8217;s not that expensive. I guess I was just too lazy to go these IT places alone. But oh my god do I need one. Ok before I get carried away by the absence of a tiny cheap gadget, it&#8217;s already March people! Just when I thought I still have 12 months to go&#8230;</p>
<p>Long break really knocks me back at work &#8211; I spent half day figuring what everyone else was doing the past week so I could write the report. And then some. Urghhh!!! Now I&#8217;m in between controllers and models, trying out to figure out what did I do last week. I hate leaving on a spur like that because I didn&#8217;t do enough mental notes to connect to when I get back to it.</p>
<p>It is now 3.30pm, 2 more hours I&#8217;ll rush out of here. I don&#8217;t know, sometimes it happens to people I guess. There are days when the stars are just not aligned, the moon is not so bright, the wind seems stale, etc, you get the idea. Oh well at least I get a week break which is never a bad thing. Only now I have started to realized how busy I&#8217;m going to be the rest of this year.</p>
<p>Already given the assignment on computer networks. I never liked networks &#8212; eeek! Binary tree and such is such a welcoming balance to this semester. I don&#8217;t really care how computers are interconnected, just get me a working one, well connected one and let me build the apps ok. You worry about setting up the infrastructure, I worry about how to store the data and manipulate them. Isn&#8217;t that sound nicer. There&#8217;s network programming paper coming up &#8211; wonder whether or not will I like it. We&#8217;ll see.</p>
<p>I&#8217;m rambling.</p>
<p>Better go now before I start saying more nonsensical stuff.</p>
<p>On last note: I have this sudden, an immense liking to bachata music. Just perfect to listen to at night, especially if you have that special someone. Warning: if you don&#8217;t like latin music, don&#8217;t bother. You have been warned &#8211; you are prohibited to cringe upon listening. </p>
<p><strong><a href="http://www.cawanpink.net/lagu/06_-_Ven_Tu.mp3">Song 1 &#8211; Ven Tu</a></strong></p>
<p>Listen to it while you can, I&#8217;m going to take it down in a few days and after that you&#8217;re on your own <img src='http://cawanpink.net/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  tralalalaa ~~</p>
]]></content:encoded>
			<wfw:commentRss>http://cawanpink.net/2009/03/its-been-a-while-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.cawanpink.net/lagu/03_-_Con_Los_Ojos_Cerrados.mp3" length="3533084" type="audio/mpeg" />
<enclosure url="http://www.cawanpink.net/lagu/06_-_Ven_Tu.mp3" length="4622966" type="audio/mpeg" />
		</item>
	</channel>
</rss>
