Showing posts with label personal. Show all posts
Showing posts with label personal. Show all posts

May 9, 2010

Lego for Adults

Someone asked me recently, "why do you spend so much time programming random things that nobody will ever use?" While I didn't really have a good response at the time, the one that I like the most is, "why do kids spend so much time playing with Lego that nobody is ever going to use?" In short, programming random things is like Lego for adults. For me anyway.

The best difference here is that I don't have to take apart my software afterward in order to build something new. I can put it up somewhere just in case someone else comes along and wants to use it too.

Jul 9, 2009

Kitties and CPU Fans

A lot of us like kittens, they like to play and run around and chase things - just earlier my kitten was sitting in the screen doorway watching a squirrel, it was pretty funny.

They also like fans on computers. Things moving! Oh my god! So they stick their little claws in there trying to kill your fans. Try to keep them from doing this, the ends of their claws can splinter and while it may not hurt them very much (at least it doesn't seem to, he just keeps doing it) one thing you don't want is little bits of claw firing into your system.

Recently my computer started making a lot of noise from the fans. I figured that it was the heat, it is July after all. However I noticed that the fan on the side of my case wasn't working, and the CPU fan was working extra hard - way harder than normal.

I decided to open up and take a look. Sure enough the case fan had enough fur around the spinning part to slow it down to the stopping point, but here's what was worse - the CPU fan:


That is only about 10% dust!

Jun 29, 2009

/(Temporary)? Retirement/

It seems that the company I have been working for, keenkong and I have taken our separate paths. It wasn't really anything spectacular, from my perspective it was basically just a little incompatibility. I wasn't overly enjoying it, and that likely affected how I worked.

So now I look to the horizon with a fair bit more uncertainty about the future. I'm feeling fairly neutral about the job ending. I'm not ecstatic but at the same time, I'm happy to have some free time and a chance to take on some more creative pursuits.

As for looking for a new job, I'm not feeling overly motivated to find a new development position. It seems there are enough open-source projects that I'd be interested in contributing to to satisfy any code craving I may have.

Right now my current goal looks to be go back to school full-time and finish that, and see where it takes me. Back to coding? Maybe but unlikely.

So yeah, I will announce here my (likely permanent) retirement from the software development profession, and hope that all of those reading still in it will enjoy it more than I did :)

PS: I will still be writing code in my spare time - I do like coding after all. This blog will continue to get posts about that kind of stuff, just probably not as many Rails/JRuby posts.

Jun 8, 2009

Blocking Reddit from Blogger

Over the year and a half or so that I've been writing this blog, a number of my posts have been put onto reddit by their search bot, gst - at least I think it is a search bot, I don't think anybody could have posted as many articles as they have unless they are sitting there reading blogs 24/7 - or maybe it is actually multiple people, who knows. Anyway, some posts were well liked, some were not, but in the end it doesn't really matter to me.

There is a good and a bad side to reddit. The people who like my stuff either just leave (possibly putting a vote up on reddit) or they subscribe and continue reading and occasionally share an intelligent comment. This is welcome. What does bug me is the people who just come in, leave a nasty comment or two like "yer gay" or something and fuck off. These people contribute absolutely nothing and when I'm having a bad day it is not the kind of email I want to come home to.

So anyway, I wrote up a little script to block out reddit traffic. To install this on your Blogger blog, just click the "Layout" tab, go to "Edit HTML" and drop this somewhere outside of a CSS tag:
<script>
if (document.referrer.match(/reddit\./)){
window.location = document.referrer;
}
</script>
This basically just boots them back to reddit. It won't affect them if they copy+paste the URL into their browser, but I figure if they're willing to go through that much effort to read your stuff they actually want to read your stuff and probably aren't going to troll.

May 10, 2009

Identity

Not too long ago someone I know wrote a post about identity and the question, "Who are you?" He says that our usual answer to this question is first our name, and then our occupation; he then goes to say that this answer is wrong.

After reading this, I found myself asking the same question - Who am I? No, who am I really? Rob? Well, yes, but a name is simply a label used to identify you. Kinda like a variable in your code if you named your variables Valerie or Steve or something - which would make for horrible programs, maybe we should all name our children when they're 20 or something after what they do, like Makes-Good-Hot-Chocolate or something. Those native peoples had something going there.

However after a fair bit of thought on the matter, I inevitably came to the thought, "Well, if I'm trying to figure out who I am, what is identity?" That is another slightly tricky one to put your finger on. Fortunately I went on vacation last week, so I had plenty of time to sit around and ponder.

I came to the following answer, feel free to debate: your identity is defined by what do you and/or what you believe. It is a collection of what I'll call "identity elements". I am a professional software programmer - why? Because I program software professionally. I am an amateur software programmer - I write code in my spare time for no real reason other than to see what happens. I make wine, play guitar; I believe in mostly free markets and science. I could go on like this for a long time. The accumulation of these identity elements is what makes up your identity.

It gets more complicated than that: some identity elements have more weight to them. Which of these elements has the higher weights is heavily influenced by your society and consequently (most of the time) the weight that you yourself apply to them. In Canada and most of the Western world it seems that your job has a higher weight than what you do Saturday nights - although if you do really weird things on your Saturday nights then perhaps that will more heavily influence the weight of that element, but then again "weird" is also defined by the society in which you live.

When you find that your identity is not really what you want it to be, then you're at a bit of an identity crisis. Maybe this crisis is better defined as lack of job satisfaction, boredom, feeling like you're not doing anything with your life, who knows. They're all pretty much rooted in the same thing.

So what to do? I suppose I'll play expert on this topic for a little while, although I am far from the ideal person to do so. I'd say look at these identity elements and see what you can do to affect the ones that you are not happy with. If you are not enjoying your job, why not try and figure out why? See what you can do to change it.
Sometimes you can't do anything to change these major aspects. Maybe you can't just quit your job, or change your significant other, or move to a new city (or maybe you can and you're just telling yourself you can't). In this case, it is important for your mental health to turn to the other elements of your identity and focus on improving those - and oftentimes it is much easier to change those than in the larger elements.

Rereading this, I noticed that part of this is about attaching yourself to some label(s). Many people believe that removing these labels is a good thing - reminds me of high school with the "anti-conformist" kids who shunned labels and sheeplike behaviour, meanwhile all of them seemed to be moving in the same direction and doing what each other was doing; all they did was trade one label in for another.
I don't think that these labels are completely bad, the important part is simply realizing what the labels are and arranging your labels in a way that satisfies you.

Keep in mind that change takes time. If you want to change your job, it is not a good idea to just drop it and quit (I've sorta done this, not a good idea!), instead just keep going, searching while you're working, or if you really hate it maybe save up some cash so that you can spend some time looking for a new job without worrying too much about finances.
Set goals for yourself and work to attain those goals. Don't expect them to be attainable immediately, and don't despair when it seems like your goals are so far away that they are out of reach. When I graduated from university I had lots of debt - maybe not as much as some people I know, but it certainly seemed like a lot to me. My goal was to pay that down as soon as possible, and not too long ago I did (yay!). Now I have new goals - finish studying! Learn French!

Perseverance is the key to attaining your goals. I know it is hard, but the rewards when you complete those goals are well worth the effort. Thanks for reading.

Apr 24, 2009

My Problems with Twitter

While many people claim that Twitter ate their blog, I can't really say it has eaten mine - while I have been much more quiet lately than 6 months ago, I think it more due to lack of enthusiasm/inspiration/commitment than anything else. I have several reasons why I'm not a huge fan of Twitter for "microblogging", at least compared to a lot of the other people who are on it. Don't get me wrong, it is great for small little things, but I don't think it is a great substitute for an actual blog.

Why I don't like it:
  • Lack of expressiveness - while some people could say that Twitter makes them more efficient in saying what they want to say, I think shortening your message to 140 characters really limits what you can say. A lot of the time I have stuff to say that is too short to make into a real blog entry, but I'd like to talk about in more depth than a simple tweet (perhaps I should lower my minimum blog entry length, but for some reason I don't like to write really short ones. Not sure why).
  • The Chaos - It is completely chaotic. I forget to check Twitter every day. In fact, sometimes a week goes by. What happens when I finally do remember to check is I sign on and there's absolutely no way I can see what people have said except for in the last few hours. Fortunately the good response to this was to just stop following a whole bunch of people who just spammed out tweets like there's no tomorrow, so now my timeline shows probably a day or two worth of tweets - though still no good if I haven't checked it in a week. In fact, just today I found out that several weeks ago someone sent me a "message" - not a real direct message mind you, but an @robbrit message - with a link to a cool book and I just got it today because I was messing around the Twitter Search API. If you're reading this, thanks! It is definitely interesting!
  • Level of Satisfaction - This somewhat relates to my first point, but is a bit different. I find that tweeting does not give the level of satisfaction as a good blog entry (I find it odd that I'm saying this, since I tend to tweet more than I blog these days) mainly because with a blog entry I sit down and write something that people may actually care about. While shouting out random things to my followers on Twitter may be temporarily gratifying (just got to work! sitting in my chair now!), there is a deeper feeling of satisfaction when you receive a comment on a year-old article saying how you helped someone out so much, or when someone links you on Reddit because they like what you've written - although there is an awful lot of negative attention from sites like those that really bugs me, but I suppose it is unavoidable on the Internet.
Hopefully there are others that feel the same way as I do. While I don't think that Twitter is bad, I do think that I would prefer to blog more often.

Jan 29, 2009

Another Use For Duct Tape


Stupid cat.

Dec 8, 2008

Responsibility

Once upon a time, when I was in my second year at university, I was taking these two courses (I was taking more than two courses of course, but these are the two that have any relevance to my story). One of them was called Computer Graphics, where you learn about how computer graphics are done. Things like transformation matrices, perspective, anti-aliasing techniques, things like that. While the lectures were mostly theoretical using formulae, diagrams and pseudo-code, the assignments were to be done in C++ with OpenGL and GLUT - and for the most part the only function in OpenGL you were allowed to use was glDrawPixels. This meant that we were going to be working with pointers a lot, and doing pointer arithmetic and things like that since glDrawPixels only accepts a single-dimensional array of pixels. Not a big deal, pointer arithmetic is pretty damn basic. On top of that, we had a required first-year course on assembly language where if you want to get anything done you use mostly pointers (aka memory addresses) so pointers weren't really a foreign concept.

The second one was a class on programming languages. We learned about things like static vs. dynamic typing, functional programming, parsing, etc. It was pretty interesting (it was during this course that the FP light bulb went on in my head). However about halfway through we had to do a small unit on pointers and pointer arithmetic because the Graphics prof was complaining that nobody understood them and students were failing the assignments because of this - and in a class where there is no final, the assignments have quite a heavy weight.

I found it somewhat sad that people actually needed this. It's not like we were doing anything advanced with C++, the objects we were making were very basic, the standard libraries we used were no more advanced than std::list or std::vector. If you want to get familiar with pointers there is this thing called a search engine that you can use to find this stuff out, or another thing called the school library which was full of books on C++. Yet people blamed the prof for using things that they hadn't been taught in class - it is important to note that the C++ course was not required for the graphics course, probably because the scope of C++ that you use (pointers) is covered by a single lecture.

The thing that was holding these people back was their lack of responsibility. The lack of understanding that not everything is spoon-fed to you and that you actually need to go out and learn things on your own time (consider it homework). Isn't that what university is all about? Learning things? How about learning how to learn things?

Here's a fact (might be widely known, might not be). A computer science education does not give you the direct skills you will need in the workplace. You'll probably learn the basics of Java and some of the libraries for it like Swing or the collection classes, but it's doubtful you'll be able to use just that to develop enterprise applications. You might take a course on PHP, but that won't tell you how to build quality websites - if your university has a class anything like the one at the university I went to, chances are the stuff you'll be learning is well out of date. They have classes that teach you Haskell or Prolog, which have a gigantic market share and will grab you a job in no time.
Then there's other things - no class ever taught me how to use version control. Or how to do unit testing. Or how to use vi/emacs (some universities do force you to use these, mine didn't).
So if they don't teach you the things you'll need to know, how are you supposed to get a job? This is where that responsibility comes in. You have a lot of free time when you're at school - at least this is the way it seemed like to me. You have lots of resources at your disposal. Any of these things, be it a language or a software or a technique, can be learned just by sitting down in a lab for a little while and looking online for it. I learned how to manage Ubuntu because there was a lab run by students, and you could volunteer to manage a machine (due to dropping enrolment/interest, by my 4th year I ended up administering all the machines). I learned how to use SVN because I was working on a personal project and decided it should be under version control.

Responsibility doesn't just apply to the computer world - although it is really relevant here. Not happy with your job? Find something else. Think you're overweight? Go to the gym. Something bothering you? Figure out why it is bothering you, and attempt to find a solution (preferably a solution that solves the problem, not just puts it off) instead of sitting back complaining about it.

We live in a (mostly) free society. Your choices are ultimately the ones that direct what happens to you, so the only thing that really holds you back is yourself. I'd guess that the main thing holding people back is fear. It's what holds me back most of the time. I'm afraid right now, that after I post this article people will read it and leave nasty comments saying how dumb I am, or how inexperienced I sound, or how I'm completely wrong about everything.
That's part of learning. There's been several times when I write something and somebody will leave an insightful or informative comment telling me how I'm wrong. As much as I hate being wrong, it is a good experience and after the initial annoyance at being wrong subsides, I feel like I've learned something and am a better person due to my failure.

So if you're young and unhappy/unsatisfied, now is the time to go out and take risks. Ignore your fear of failure. What have you got to lose at this point? It's not like you have dependants or anything (if you do, ignore that last comment). Your life at this stage is mostly a blank slate, and what becomes of it is what you make of it. Don't let others dictate what goes on it, take responsibility for your own actions.

Dec 3, 2008

Christmas Coffee

I got up yesterday all ready to start coding (or blog reading, whichever happens first when I sit down at the computer). After making coffee, I realized that I had used up the last of the milk for my cereal and consequently did not have milk for my coffee. Now this is downright heresy, so I quickly peeked into the fridge for a proper substitute. My eyes settled on the carton of eggnog sitting there on the shelf. I figure it's mostly milk and sugar anyway, so let's try it.

It's actually quite good, and I'll recommend it to anybody.

Today I'm trying it with nutmeg.

Maybe tomorrow I'll add some rum.

UPDATE: The nutmeg was gross.

Nov 26, 2008

Kingdom of ... Lennoxville?

I was talking to a friend from university yesterday and we started playing Kingdom of Loathing again. For those who haven't played it, it's a browser-based role-playing game where you control a character who goes around fighting monsters and doing quests (that is kinda implied by the term "role-playing game"). The difference is that it's quite satirical, it makes a lot of jokes based on puns or play-on-words, or pop culture, or things like that.

We were thinking that it'd be really fun to have something like that, except based on our experience at Bishop's, or on college life in general. It'd be based in the little town called Lennoxville which is where Bishop's is, and so the places you would explore would likely be places around there. However the game itself and most of the adventures would be more oriented towards college life in general.

I'm wondering if anybody would be interested in this idea, maybe not necessarily for coding (if you want to do that, it'd be cool too, but it's a fair bit of work and so I don't expect anything) but for ideas of things that would be stereotypically college, or ideas on the mechanics of the game. Or even just if you'd be interested in playing.

Nov 22, 2008

In The Office vs. Home

A few months ago I quit my job at the office to work for a startup, which has involved me working from home most of the time. I've worked at home before, and have sorta flip-flopped on how I feel about it. Here's my current analysis:

Pros:
  • Flexibililty - If I have to go to some place that is only open on weekdays between 9 and 4, I don't have to rush during my lunch break. If I want to stay up late and sleep in, I don't have to wait for the weekend. I can take classes if I want.
    The flexibility of working at home is the main reason why I like it.
  • Freedom to Choose - I don't have to adhere to a particular software just because everybody else is using it. I can choose to work under Ubuntu with Vim instead of Windows and some IDE.
  • No commute - Well, there is a bit of a commute. I have to walk all the way from my bedroom to my computer room in the morning. Sometimes I even have to stop by the bathroom and the kitchen on the way, which means going really far out of my way since the computer room is next to the bedroom. Damn.
    This one is really awesome in the winter here in Montreal. No more having to jump from a metre-high snowbank into the bus, only to spend an hour and a half on a normally 15 minute bus route. No more having to walk down a frozen sidewalk because it is faster to walk from the metro line than take the bus.
  • Choose a time frame - One interesting thing about coding is that your good coding periods do not really occur at the standard working hours. Sometimes they might, other times maybe not. I don't really have a time when I'm most productive, it changes from day to day. Sometimes I can churn out some good stuff at midnight, other times at 11am. It depends on the day, and the office doesn't compensate for this.
  • Claim things on taxes - since I work at home, I can claim things like Internet and hydro on my taxes. Awesome, since in Quebec you get raped when the tax man comes around.
And now, the cons:
  • Takes self-discipline - There's a Wii with Rock Band in the other room. I have Starcraft installed. I have beer here. The temptation to do any of these is quite high when you're working at home. It takes some good self-discipline to not do these while you're working.
  • No boundary between work and play - When working in an office, you have a clear distinction between what is work and what is not - the location. When you're not at the office, you don't have to give a shit about work and can sit back and relax. For me, I always have this feeling that I haven't got enough work done, so even if I have done 40 hours for the week I feel like I can put more in. Doesn't give me much time to relax.
These are the ones I can think of right now. Anybody have anything else?

Nov 19, 2008

Analyzing Blogs

This is completely unrelated to any thing I write about. I found this random site that analyzes a blog and tells you about the thought processes of the author.

Here's what I got:

ESTP - The Doers


The active and play-ful type. They are especially attuned to people and things around them and often full of energy, talking, joking and engaging in physical out-door activities.

The Doers are happiest with action-filled work which craves their full attention and focus. They might be very impulsive and more keen on starting something new than following it through. They might have a problem with sitting still or remaining inactive for any period of time.

I'm really not sure what to think about this. The second paragraph is pretty fitting, but the first? Hmm...
It is beta after all...

Jul 26, 2008

OpenPolitik

I've been a little quieter recently compared to normal, and I'll tell you why now. I've been riding my bike to work, so there is less time in the morning for me to think about what to write in my blog entries while I dodge traffic and retarded pedestrians. And it takes less time to bike to work than to take the bus/metro, so there is less time to think even without distractions. I've also been on vacation for the last week (hooray!) so I've been out and about.

Second, I've been working on a programming project. It is a little app for playing a diplomatic board game that I used to play a lot while in university. Since there are no longer hordes of geeks around for me to play with, I've created an online version for us to play it. You can see it here. I released it under the GPL too, so if you want to see the code it is here. It is written for Google's App Engine, which I wrote about in a previous post.
I have found a few restrictions though. The biggest problem I had was manipulating images. Google doesn't allow you to use the Python imaging library (PIL), you have to use a set of functions that they define. It does things like cropping, resizing, rotating, etc. The basics. However I wanted to be able to update a board, which involves pasting one image onto another one and the engine didn't allow me to do it. I had to do something a bit more involved, where I created pieces and placed them as <img> tags on top of a div that had the background image set to the board, absolutely positioned to where they were supposed to be. In retrospect, this might make it easier later on for an admin to modify the board, using some fancy drag and drop Javascript. Cool.

Anyway, that is my advertisement. If you are interested in playing, just head over to the game and either start a game, or join an existing one. I'm sure you will be more than welcome.

Jun 18, 2008

Wheee

I picked up a Wii yesterday (or more specifically, my girlfriend picked up a Wii and I am owing half of the cost). Figured I'd give it a shot, it looks pretty cool. Ours came with a Nunchuck controller and Wii Sports, and we picked up a second Wii-mote so that I could kick people's asses at tennis. Also grabbed one of those recharger packs, hopefully it will be better than getting batteries all the time.

It is pretty cool. It is a great example of innovation. How many games have you played that made you sweat? With the exception of DDR. Other than on your hands where you hold the controller, not many. Doing the boxing and to a lesser extend tennis, you really start to work up a sweat. It's cool.

So I've come up with a list as to why the Wii is so much more awesome than the other consoles:
  • Cost - This is a big one. Now in the long run the overall cost if you buy everything yourself is not that much cheaper. The Wii itself runs at $100-$200 less than a PS3 or the 360, depending on which model of PS3 or 360 you get. The games are about the same price, same with the add-ons. So if you plan on just buying the thing yourself, then you're probably not going to save that much in the long run.
    This is where target audience comes in. Your non-gamer roommate (or in my case, girlfriend) is much more likely to pitch in to buy a Wii than the other consoles. That could potentially half the price or more of the console. Furthermore, since there are more Wii owners than owners of the other consoles, it's more likely that if you want to borrow a game from a friend you're going to be able to borrow it. So you don't have to shell out the cash to buy it. A lot of the people at my office have been doing this.

  • Exercise - With Wii Sports (I haven't played any other games yet) I got a good workout. My arm was sore after playing too much baseball, and from all the ducking and punching from boxing got me right tired. Much better than sitting on your butt mashing buttons and wiggling a joystick.
Then there are the problems I can think of:
  • Lack of games - most of the "cool" games aren't for Wii. They're on PS3 or 360. You know what? I don't really care. Most of the "cool" games are also on PC, and obviously I already have one of those. Plus I can do all sorts of other things on my PC, like program things or look at porn.

  • Pain - For once, there is more at risk to your body than getting carpal tunnel syndrome or blisters from joystick-rotating. You can actually pull muscles waving things around. Or you can whack a friend in the head (accidentally this time) while you're trying to hit their serve back. Or you can fall over. Etc. Watch out!
I'm really impressed with the Wii so far. Definitely thinking I went with the right console.

Apr 4, 2008

Rhythmbox and my iPod

Rhythmbox is the default music player on Ubuntu. I've heard wonderful things about Amarok, however I still have yet to try it out. Rhythmbox is great, even makes me not miss Winamp so much anymore. It does all the normal stuff, like play my music, let me search through the library, sort by various things like artist, album, etc. It even keeps track of how many times I play a particular song. Shows which music on my list I actually listen to.

So I finally caved and bought an iPod not too long ago. I dislike Apple nearly as much as Microsoft, but I figured I'd give it a shot. I plug in the iPod and...nothing happens. Doesn't detect it or anything. So I do a quick Google search for "ubuntu ipod" which brings me to a page that says the iPod must first be formatted before I use it. Ok then, I reboot into Windows, download iTunes, and format the thing. Cool, so Windows now sees it. I reboot into Ubuntu, and what happens? Something! Rhythmbox detects it and pops it up on the side with all the playlists and what-not that I can dump stuff into. So I can drag and drop music onto my iPod now.

So hooray, I can mindlessly stare out the window with white earbuds in my ears. Speaking of which, I wonder if my huge headphones will work with the iPod, I like those better.

Feb 8, 2008

Can I go back?

Another article unrelated to Ubuntu. Maybe I should start a new blog...

Recently I started coding in C++ again. Over the last year since I've been out of university, I've been working primarily with PHP and Ruby for both personal and professional projects. In my last year of university, I didn't really do much programming as my courses were either in economics (I was planning on transferring but the money in computers told me not to) or high-level comp-sci/math courses where you're past the stage of coding everything and you're busy figuring out whether or not the program that you want to code is actually code-able or not and if so, will it finish by the time your grandkids are in the retirement home.

So back to C++. It is wonderful and painful at the same time. After working with Ruby, the thought of not having functions as first-class values, conditional assignments and if/unless statements after a statement is near-crippling (I realize now that in high-school and first year I was a Blub Programmer, am I still one?). But working with pointers again and manual memory management makes me feel like I'm actually doing something. If only there were a language where I can have both pointers AND anonymous functions. Maybe with some good type-inferencing like in Scala. There probably is one, but I don't know about it. It is my new mission to find out.

Jan 22, 2008

Facebook Applications Update

A week ago I made a post here:
http://lovehateubuntu.blogspot.com/2008/01/hate-facebook-applications.html
about blocking applications on people's profiles. I've updated it today to also block application requests on the main page. Unfortunately it looks like I won't be able to block ALL application invites since some of them show up with the "so and so posted a picture about you", but this should kill most of them.

Jan 15, 2008

Hate: Facebook Applications

On a completely unrelated note, here is a way to block Facebook applications on profiles:

First, you need Firefox. This doesn't work in Internet Explorer.

Then get Greasemonkey: https://addons.mozilla.org/en-US/firefox/addon/748

Install it, then right-click the GreaseMonkey icon (the little brown monkey) in the bottom-right-hand corner and go to New User Script. Type whatever Name, Namespace and Description you want, but put
http://*.facebook.com/profile.php*
as the only line for Includes. Leave Excludes empty.

Press Ok, and you should have a thing asking you for a text editor. Choose whatever you want (C:\Windows\notepad.exe under Windows, /usr/bin/gedit under Ubuntu) and copy-paste this code there:

// ==UserScript==
// @name Blocks Profile Applications
// @namespace Facebook Scripts
// @include http://*.facebook.com/profile.php*
// ==/UserScript==

function removeApplications(){
var boxes = document.getElementsByTagName("h2");

//the white-list
var allowables = ["Mini-Feed", "Information", "Friends",
"Mutual Friends", "Friends in Other Networks",
"The Wall", "Education and Work", "Photos", "Groups",
"Videos"];

for (var i = 0; i < boxes.length; i++){
if (boxes[i].id.substr(0, 10) == "title_app_"){
var inside = boxes[i].innerHTML;

if (inside.substr(inside.length - 4) == "</a>")
inside = inside.substr(0, inside.length - 4);

var title = inside.substr(
inside.lastIndexOf(">") + 1);

var allowable = false;
for (var j=0; j < allowables.length; j++){
if (allowables[j] == title){
allowable = true;
break;
}
}

if (!allowable){
var app_id = boxes[i].id.substr(10);
document.getElementById("box_app_" +
app_id).style.display = "none";

if (document.getElementById("icon_app" + app_id))
document.getElementById("icon_app" +
app_id).style.display = "none";
}
}
}
}

function removeRequests()
{
var divs = document.getElementsByTagName("div");

for ( var i = 0; i < divs.length; i++){
if (divs[i].className == "sidebar_item requests" && divs[i].innerHTML.match(/Requests/) ){
divs[i].style.display = "none";
}
}
}

if (window.location.toString().match(/profile/))
removeApplications();
else if (window.location.toString().match(/home/))
removeRequests();

If you want to change which applications are blocked, you need to change the white list, otherwise it will block all applications. You just put the name of the application in and it won't block it.

This code is not GPL'd, it is not commercial, it is not anything. Do whatever you want with it.

Nov 10, 2007

The First One

So I have the first entry on this new blog. Let me get started with a little introduction. This blog is about my experiences with this "new" Linux distribution, Ubuntu. It is a version of Linux that claims to be "Linux for human beings" and attempts to get rid of the normal nightmare of using Linux on a desktop.

I am a Computer Science graduate who has been using Linux for several years (since Mandrake 9, which came out in 2002 I believe). Since then I've tried a number of distributions: Fedora, Gentoo, openSUSE.

Let's get something straight. I am not a Linux geek. I hate command-line, or messing with configuration files. I'm a firm believer in the "it just works" philosophy. To solve any problem should not require hacking the system. Windows and Mac have proven that a computer is completely usable without having to worry about command line or config files and all that garbage. I like Ubuntu because they are basically the only Linux people who understand that there are people out there who do not like all this hacking.

I started using Linux as a primary operating system with Ubuntu 6.10 "Edgy". Shortly after, Ubuntu 7.04 "Feisty" was released and I switched to that. It was an excellent improvement, all my main hardware worked out of the box (only thing that didn't was the microphone on my webcam, but whatever). Overall I was really impressed with it and did not look back to Windows.

Now I'm with Gutsy and am having some issues. It seems I'm going back to wrestling with the computer to get things working. Last I checked, I was the owner of the computer and not the other way around. So where did they go wrong? Stay tuned for more entries on the subject.