Archive for the 'Computers' Category

Websites I Visit at Work

February 13th, 2008

If you work as a programmer then you know as well as anyone that you just can’t work so many hours in a row. For myself, I usually have to take a break after 2-3 hours of working max. Programming takes tremendous amounts of brain power, so have to take a breather every once in a while. I spent most of my free time reading blog posts, and I find it easier to use an RSS reader so you only have to go to one place to get all your blog-reading fix. I personally prefer using Bloglines, their interface is great — especially the new beta version. Another good choice is Google Reader, which you can actually incorporate into your iGoogle portal page. There are many others out there, so find one your like and use it. Now for the good part. :)

I’m gonna list the blogs I frequent the most, ordered by my visiting frequency.

  1. Lifehacker: Hands down my favourite website to read. You get “tech tricks, tips and downloads for getting things done.” Some tips require a more technical-minded reader, but overall the instructions are pretty straightforward. This is IMO the #1 website to increase your productivity in life.
  2. Racialicious: A blog dealing with racial issues in the US. Although the focus is mainly on American issues, most of it applies to Canada too. And it’s always good to know what’s going on in our neighbour south of the border.
  3. Slashdot: News for nerds, stuff that matters. This is purely a geek site, so if you’re not “into” the whole geek thing maybe you shouldn’t visit ;). It many topics, including gaming, new technologies, and politics. I find that I skip over most of the stories, but there are some great ones on there. Be sure to check out the comments too, I actually enjoy reading those over the actual articles themselves a lot of the times — RTFA!
  4. Gizmodo: A website dedicated to gadgets. I think that pretty much says it all. It’s a place I go to, to see all the cool, shiny gadgets that I probably wouldn’t be buying. Did I mention they’re shiny?
  5. Coding Horror: A must-read for an programmers. Jeff Atwood writes about coding horrors that programmers create, aka the “human factors.” He provides great insight into many problems, including ones that seem trivial at first glance, like writing an algorithm to shuffling a deck of cards.
  6. Joel on Software: Joel is one of the most well-known programmers out there. He heads Fog Creek, the company that makes FogBugz. The must-read post is his talk on Computer Science and Software Engineering that he gave at Yale (parts 2 and 3 too!).
  7. Ajaxian: Probably the best blog to read for any developers working with Javascript, and of course Ajax (as the name suggests).
  8. RedFlagDeals: Deals on many different products for the Canadian buyers. They have have many deals added everyday, including deals on many electronic products.
  9. The Daily WTF: Readers submit their WTF stories working in the tech industry. Mainly just for laughs.

All of the above sites provide RSS feeds, so you can subscribe to them using your favourite RSS reader.

More Greasemonkey+Stylish Goodness

February 1st, 2008

I took a little time styling my del.icio.us page (well, actually it’s the whole site in general). I got tired of the plain fugly layout. Although I didn’t change too much besides the colours, I think it’s more pleasing on the eyes. I also used Greasemonkey to change the background colours on the “save by x other people” based on the number of people that save it. The original background color was too light IMO, and makes the text hard to read.

I also prefixed the active tag with “{{”, and appended “}}” to the end of it. If find this styling more visually pleasing, and more obvious than the original “!” in front of it. I also hid the “!” using Greasemonkey since it also got the same styling as the active tag.

(more…)

Greasemonkey and Stylish to control webpages

January 26th, 2008

I finally got around to installing Greasemonkey and Stylish for my Firefox. For those that don’t know, Greasemonkey is an extension that allows you to run custom Javascript scripts for pages that render in your browser. Stylish is basically the same thing, but for CSS not Javascript.

I haven’t gotten around to doing anything with Greasemonkey yet, but I’m pretty sure a week from now I’ll have a bunch of scripts running. :P The very first thing I did with Stylish is to hide all ads on the website. I think the social ads was a horrible idea for facebook. I’m so tired of seeing an ad in my newsfeed that tells me so and so is a fan of x and y. This little script below will eradicate all known ads on facebook!

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain(”facebook.com”) {

#ad_0, #ad_1, #ad_2, #ad_3, #ad_4,
#ad_5, #ad_6, #ad_7, #ad_8, #ad_9,
#ssponsor, .advert, .ad_body,
.ad_capsule, .ad_media,
.comments_ad_image, .sponsors,
.sponsor_absolute, .social_ad,
#new_stuff_content, .nextstep { display:none !important; }

}

Quick and dirty does it! Goodbye facebook ads!

Happy Birthday to Knuth!

January 14th, 2008

This is a late entry, but I was in Waterloo over the weekend so I’m just getting to this now. :)

It was Donald Knuth’s 70th birthday this past Thursday (January 10th). Anyone who studied Computer Science will probably already know who Knuth is. He is the author of one of the most important book in CS, The Art of Computer Programming. In this book, Knuth covers algorithms stretching from sorting and searching, to graphs and networks. He is also the person who popularized the beloved big-O notation that we use in algorithm analysis.

The field of Computer Science would not be the same without Knuth, so here’s to a happy belated 70th birthday! :)

Bill Gates’ last days at Microsoft from CES 2008

January 7th, 2008

Proof that Bill Gates is cooler than Steve Jobs!

Okay, that was a joke so don’t flame me. But the video was pretty damn funny, and shows that Bill isn’t afraid to embrace his geekiness.


Video: Bill Gates Last Day CES Clip

Navigate Google search results via keyboard shortcuts

November 29th, 2007

I was browser around on lifehack today and found this entry for Google Experimental’s keyboard shortcuts. Of particular interest if the comment left Davosian that gives a way of adding the keyboard shortcut to your Firefox search bar.

From the post:

I added a new search engine to Firefox’s top right search field by adding the following xml file to

C:\Documents and Settings\[YOURUSERNAME]\Application Data\Mozilla\Firefox\Profiles\[YOURPROFILENAME]\searchplugins:

—– googleext.xml start ————
<SearchPlugin xmlns=”http://www.mozilla.org/2006/browser/search/”>
<ShortName>Google Exp</ShortName>
<Description>Google Experimental Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width=”16″ height=”16″>data:image/x-icon;base64,R0lGODlhEAAQAPfLAAATVikwdA8SnxUfgAsWpAAilholjxw4jBc7kwAlvQQ2sRMsoBUqqhMzuhY/vxw4tSgmiyM1mSUztiQ6sTE3sQ4qyxMxxRoyxiAuxR1CtBxJsBxasSJuuTFguBte0Rlf2xVc9h9W9xVjzxVr0gdj6BRh4R1o5yBcyiZbyydT1i9b2Ddb1iFY6CJg2Vpor1dzvEJu20Z0yi23QDy1REi2OUy0O1WzOVC4PU+tVUe5Sk2xQU2zRUO4UE21Ula2SmKEqWWF2HyPx2+a6X6e6Xqk1m+s78sUDs4UGdEQB9YfDdwaANEfHd0YEscjAM4mAM0qANIoD9IkGdslGswuItYgL4aP0ImP2YGZ36Opzaq2wq/S+rzX/7/e8MrS1MLO/sTb48rT8snX/83c89PZ+crq+cH1/9Dl/9Ln/93r/9fy/+Hf7P/42eDm/O7u/+T29uX2/eT2/+f4/+f5/+j/9u//8+3/9u7/9ur5/+j//+n//+v//u3//+7//e7//+////b66/T/6vX/6/f/7f/07fj/4fv/4Pj/5v/45v7/4/r+7/3/6fDw+Pfx//D/9/X/8fT/8/f/8ff/8/D///H///L8/fL///P///X7//b6/ff/+/T///b9//f///v19//w9v/09P/29v/x+f/y///z///1+v/1///2///3//j79P/58/z/8/z99/z/9v7/9P7/9vn7//v6//j9//n9//j///n///v//vv////4+v/5+//6+P/4///6/P/6/v/6///7///9+P/8+v/9+v7/+Pz////8/f/9/f79///8///9//7//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAMsALAAAAAAQABAAAAj/AEn4oIFjBw8bOnrMuJGjhowZM1T8UdYJUZ5ZcNRYWjSrVK5QU0DMmtUnzRAXEy4o6FCEy6NDTkQIq1MmRgM0eZTlCXMgQJtRSE4gmgUkwh1EiZTNUiamy6NUUExcuoJgDCdDjQg9KgVL2SNFT1hwEvKglLBWuixZ+jSrlSBdRlL04bBBkTBdpZTpIqWsFaBcTEr0QaEhl6dWlswKW6poDRUPlmAUQKWMkTJLc76QMQNGUZMWgIgkCFJnlq5WXigwkFClVZQQyuRgELAlk7JBymCZGYAF0ZEPrQixgUDAihxVdPpoAZAFUZIRfThxgvPCwAILDipk+OFG2ZIVoxApERtPfvwlvZ+kQFzPvv0MJQEBADs=</Image>
<Url type=”application/x-suggestions+json” method=”GET” template=”http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&qu={searchTerms}”/>
<Url type=”text/html” method=”GET” template=”http://www.google.com/search”>
<Param name=”q” value=”{searchTerms}”/>
<Param name=”ie” value=”utf-8″/>
<Param name=”oe” value=”utf-8″/>
<Param name=”esrch” value=”BetaShortcuts”/>
<!– <Param name=”esrch” value=”RefinementBarLhsGradientPreview”/> –>
<!– Dynamic parameters –>
<Param name=”rls” value=”{moz:distributionID}:{moz:locale}:{moz:official}”/>
<MozParam name=”client” condition=”defaultEngine” trueValue=”firefox-a” falseValue=”firefox”/>
</Url>
<SearchForm>http://www.google.com/firefox</SearchForm>
</SearchPlugin>
—– googleext.xml end ————

You have to restart Firefox for this search engine (called Google Exp) to show up in the dropdown list.

D.

Photosynth

November 27th, 2007

I just saw a really cool demo of a product called Photosynth. It’s a new way to link and present digital images on a computer. There is also a demo on the Live website, so you can check it out yourself.

Beating Captchas

November 23rd, 2007

I was just reading an article on Coding Horror on captchas. It talked about sites using bad captchas (like ticketmaster), so that even humans cannot read them. Oh, if you don’t know, captchas are those little images that contain distorted text in which users must fill out before submit a form. You’ll see them on a lot of blogging sites so prevent bots from spamming the comments. Google also uses it for Gmail to prevent bots from signing up spam accounts.

Anyway, back to the topic, I was thinking whether I can develop some sort of algorithm to beat even the most advanced captchas currently deployed on the web. I mean, if humans can read them, then there has to be a way to do image analysis to recognize text, right? Maybe I should try making such a program, and then selling it on the underground markets in Russia. I’m just joking — about the selling part.

No More Undergrad!

April 22nd, 2007

I am an undergrad no more! I finished my last exam on Friday and came back home to Thornhill that night. I don’t feel any different from when I finished exams in my previous terms. I think the fact that my undergrad career is actually over hasn’t sunk in yet. Overall, I had a pretty enjoyable term. The courses that I took were pretty interesting. Well, most of them anyway. The two courses I enjoyed the most were SOC 101 (Intro to Sociology) and CS 486 (Artificial Intelligence).

Sociology allowed me more insight into what is happening with the Canadian society, as well as brief discussions on societies in the global scale. I never really understood why Ams liked sociology that much, but now I have come to appreciate this field of study as well. The turning point for me is when we looked at myths that are widespread in our society, but are in fact all false. For example, people tend to have the belief that homeless people are lazy and have only themselves to blame for their situation. However, this belief is generally not true. We are socialized to be very individualistic, and the capitalist society awards individual achievements. So when we see people with problems, or if we ourselves have problems, we have a tendency to blame it on the individuals — but in actuality the problem is most likely a social problem.

My favourite course this term is AI. I’ve always had an interesting, or fascination, with AI. I think the challenge of having machines performing complex tasks that are usually done by humans is very interesting. It was cool to see the different techniques that AI researchers use to solve different problems. I enjoy computer science not for its practical values, but I love the theories behind everything. If I had to choose between a situation where I am in a situation similar to Bill Gates of Microsoft or Steve Jobs of Apple, or a situation where I’m just a researcher (in computer science) getting paid 60K, I’d take the research position without hesitation. I’m not faulting anyone for wanting money, but personally I just want enough to get by. I find more satisfaction in doing work that I find interesting than getting paid a six figure salary working a job I’m not very interested in. I’ve always enjoyed problem solving and puzzles. The feeling I get when I complete a proof or solve a very hard problem/puzzle is one of the most rewarding feelings I get.

Anyway, I still waiting for all my marks to come in. I have a good feeling about this term, and I’ll see if my good feeling is justified or not. :P

Computer Go

April 19th, 2007

I found an utility online that wraps java apps with a Windows executable called Launch4j. I used it to make an executable for the Computer Go program I programmed for my AI (CS 486) project. I’m very interested to see how the program would fair against different people. Download the program using this direct link!

If you don’t know how to play go, here’s a website to get you started. The rules are very simple and it doesn’t take long to learn how to play. But it does take a while to get good at it.

My program does no tree searches at all, and has VERY limited pattern matching on the game board. When I say limited I mean less than 10 patterns exist in my program — compared to thousands in most go programs. As I mentioned previously, my program determines moves almost entirely using influence and evaluation functions. One thing I did use that help a lot is machine learning. For my demo I ran 30 simulations and had the computer try out different parameters for its evaluation function and pick out the best configuration it has encountered so far. When my prof played it it did manage to beat her, but it had some obvious flaws. After that I decided to run it an additional 100 times, and it made a HUGE difference. It’s still not super intelligent, but I do think it fairs pretty well. Of course, once you’ve played it for a few rounds you might notice some weaknesses that you can exploit… this is unavoidable in almost all AI game playing programs.