Archive for the 'Computers' Category

Saving with Greasemonkey

August 10th, 2008

I have a high-interest savings account open, which is where I put all my savings into — dur. The only problem is that when I sign on to internet banking, I can see all my accounts listed there. A few times in the past I actually took money out from my savings account to pay off my credit cards. Well, most of the time it’s because I transferred too much into my savings without realizing I need that money for my credit cards.

I read some tips online about setting up automatic transfers to transfer x amount of money from your cheque into your savings, everytime you get a paycheque. This way you can fool your self to think that you have less money than you actually do. The only problem is that the tip only works if you’re transferring to another bank, like ING. Since I see my money listed there anyway, it’s almost pointless.

That’s where Greasemonkey comes in! Using some JavaScript, I hid my Savings account from the accounts view. Of course, I put in at link that I can click on if I do need to see it. I think it’s going to work well. :)

What Have I Been Doing?

August 5th, 2008

It’s been a really long time since my last post. Just haven’t had the urge to blog these days. It’s getting really busy at work with a bunch of different projects. That probably adds to my laziness when I get off work.

No, I’m just kidding. I’ve been doing quite a bit in the past little while actually. Aside from the regular house cleaning and cooking tasks, Ams’ and I have started planning our wedding. We even set up a little wedding blog for it!

You might notice the wedding blog is a Django site (so says the little button at the bottom). It’s coded by yours truly, Mr. Jack Hsu. I’ve actually released the code on Google Code with the New BSD License. So if you have Django running somewhere and wanna check out the blog app, please feel free to do so. It’s still a work in progress, and I’ve been working hard the last week or so to get the code ready for public consumption. The documentation is coming along as well!

I <3 Django!

Firefox 3.0 Released Today

June 17th, 2008

Firefox 3.0 has officially been released today. The Mozilla Foundation aims to set a world record with the most downloaded software in 24 hours. FF 3.0 makes huge improvements to memory usage, and also javascript execution. Go to the official site to download the installation file.

Want to get the most out of FF 3.0? Check out Lifehacker’s full coverage on the release, including top 10 new features!

Enjoy!

Robocup: Humanoid Finals 2007

June 5th, 2008

I just love watching Robocup. This one is especially impressive. I love how the goalie for Osaka dives to block shots. I laughed quite a bit while watching this clip.

Javascript is a Programming Language

April 22nd, 2008

I’ve come across a few individuals who still think that Javascript – or ECMAScript — isn’t a real programming language. For example, on Facebook, there is a group called I forgot the semi-colon, which is a programming group, and in the group info it says the group isn’t for anyone who thinks Javascript is a programming language. The problem is that a lot of these so-called “programmers” think of the web as just another view for which applications written in something like Java would “dump” their data into. The is a completely wrong way of thinking about the Web, and people who think this way will never become successful developing for the Web.

Javascript is used in many places outside of the browser. It is used to develop many feature-rich applications on the Web, and a large part of the Firefox GUI is written in Javascript. Not to mention all those Dashboard Widgets you Mac users like, yep, all in Javascript.

The thing I love about Javascript is that it is flexible. Unlike languages such as Java or C++, Javascript variables are dynamically typed (like Python). This means I can define a variable and initialize it to a string, then later on assign an integer or an object to the same variable without getting some kind of incompatible type errors. You can use structural programming, functional programming, or object-oriented programming in Javascript. This allows you to choose what best fits the current application you’re developing without being restricted to one particular programming paradigm.

So for anyone who thinks Javascript isn’t a real programming language, please tell me why.

Every Programmer Shall Have Admin Access

April 3rd, 2008

Everyone in my team at work (Front End developers) just got administrative access to their PC today. It’s ridiculous to thing about working as a programmer and not have the rights to install things, but that’s what we had. This got me thinking about the post on The Programmer’s Bill of Rights over at Coding Horror. I went and had a quick look to see if it mentioned admin access. To my surprise the post said nothing about such thing. Maybe it’s just too stupid to even mention not having admin access? Or was I spoiled during all my co-op terms?

In any case, giving programmer the right to do their work properly is very important, and it should definitely be include in our bill of rights. ;)

Greasemonkey: Facebook Poke All

February 14th, 2008

Firefox only!

I just finished writing my own Poke All script for Greasemonkey. Using it ispretty straight-forward, I basically added a single button you can use to poke everyone that has poked you. After everyone has been poke, a “close” link appears next to the Pokes header. Clicking this link will close the entire section — with a nice animation too!

You can get the script here. Or if you don’t have Greasemonkey for Firefox, you can install the Poke all Firefox extension I compiled using this compiler — just save it to disk and drag-and-drop it into Firefox, and choose to install.

Poke all button

Done poking!

Visit the script’s page on Userscripts.

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!