A Xserve Newbie Install

September 1, 2010 by Matty G · Leave a Comment
Filed under: Rants, Tech 

Ok, so I’m not a complete newbie. I’ve played around with Linux servers, WAMP, MAMP and other server technologies. But by no means do I consider myself an IT professional.

My office in the last couple months has invested in not one, but two Xserves. I was extremely excited about getting the first. We use it as a web server, and it helped me learn a lot about web server technology without having to learn all the complex command-line calls all at once.

Then, I needed to upgrade PHP, because some Open Source web apps didn’t like the version that came with Snow Leopard. Google-fu to the rescue. Here’s what I turned up in that search.

http://www.entropy.ch/software/macosx/

http://www.gen-x-design.com/archives/recompiling-php-5-3-on-snow-leopard-with-freetype-support/

http://www.afp548.com/article.php?story=20040726020639560

Recompiling PHP was an exciting and stressful experience, to say the least. The nice thing was that this was not on a production server (at the time). So I had a little bit of wiggle room, and if I had to, I could wipe the OS and start fresh (as a last resort, of course). So that server is now humming along, barely scratching 10% CPU usage, cool as an ice cube in the wickedly air-conditioned server room at my work.

And of course, having money to spend, they decided to buy another one. With the low CPU usage on the existing one, I thought I should plan another usage for the new Xserve.

The idea? Storage. We do a lot of video work at my office, and video takes up gabs of storage. But with the 6TB limit (and non-redundancy) of the Xserve, I needed a revised plan.

Enter the DroboPro. I’ve heard many good things about the consumer versions, and having the VMware seal of approval, it’s got to be good. At least as good as the hard drives attached to it.

Because we have an IT department where I work, this idea was not so well received.”That’s IT’s job.” That seemed to be the whole argument. The problem is, when we ask for high capacity storage, they gave us a virtual machine with 4TB of (tape) backed-up storage. That thing goes down, it’s down for days.

The head of the IT department met with me and advised that as long as it wasn’t for production (ie, for serving to the general public) that the DroboPro would be a good solution, and that it would last us the year. I hope he meant that the storage capacity would last us for the year, because I think that the folks at Data Robotics would almost be insulted if an IT head thought their products would die after a year.

Two Xserves are under my power. And they even talk to each other for authentication (that was an ordeal in itself). I’d love to hear from you. Leave me a comment!

Internet Explorer as the Psycho Girlfriend

August 19, 2010 by Matty G · Leave a Comment
Filed under: Humour, Tech 

This is adapted from a friend of mine, Brad Taunt. I changed just a little, to make a little bit more defined differences. Enjoy.

Internet Explorer is the scum of the internet. Now before you rant and rave about “hackers” and “trolls” let me explain why almost, well hopefully all, web designers HATE Microsoft’s devil child.

Now for all you non-tech savvy kids out there, let me use the perfect analogy to show just how much IE sucks. Let’s look at all popular web browsers as if they were girlfriends.

Mozilla Firefox, if it were a girlfriend, would be the pretty-yet-geeky, university graduate who everybody knows. She would dress nice no matter the circumstance, be polite and courteous and always try to improve herself, and help out the charitable organizations.

Safari 5.0+ would be gorgeous, very intelligent and also decently popular with the family. She would have one of the best fashion senses, would be very quick witted and could take criticism extremely well. Like that girl from Glee. If you’re into that sort of thing.

Google Chrome would most likely be the best catch of them all. Drop dead gorgeous, polite, constantly learning new things, able to teach other girlfriends how to be as perfect and dress amazing all the time. But the family would be suspicious of her, and not take to her too well.

Now we come down to it…

Internet Explorer. Dear Lord. This one would look like she fell out of the ugly tree and hit every single branch on the way down, then got spit on. She’d be dumb as a post and more stubborn than a cock-eyed donkey when it came to change and dress like a dead homeless person. But WHY is she still around? Because for some unexplainable reason, more than half the internet’s users STILL use her as if she was a free prostitute(which isn’t far from the truth). Why? Why, why, why??

I’ll tell you why; people are lazy and scared to find a different girlfriend. “I’m use to her”, “There’s no way there’s anything better”, “I’m stupid” – all of these common excuses. Well stupid people of the internet, I have news for you: There are other fish in the sea.

p.s. if anyone is reading this in Internet Explorer…I hate you.

What I Learned While Pair Programming with a Software Engineer

July 20, 2010 by Matty G · Leave a Comment
Filed under: Tech 

I’ve had the pleasure of knowing another Matt for just over a year now who is a student at UOIT, where I work. I’ve known for a while that he is a very good programmer and that he has the ego to go along with it.

It has only been recently that I’ve gotten to see his genius first hand, pair programming with him on a web app that needed to be updated (read: models and controllers completely rewritten, thankfully the views were mostly reused).

Here is a couple things I learned and/or observed during my time with him.

Object Oriented Programming is really what makes code poetry
I have learned a little bit of OOP in my long years of off-and-on programming. Visual Basic, JavaScript, ActionScript and PHP are all of the languages I’ve learned over the years. But the only reason I’ve used OOP is mostly out of necessity (with a few exceptions).

With this app (we’ll call it “Sillybizer” so as not to get my employer upset with Google getting my site instead of theirs), we didn’t have to code it OOP, but looking back it would have been complete insanity not to. Each big piece of data has it’s own object, complete with getters, setters and methods that pertain to that piece of data. It really is a true thing of beauty to behold as a programmer, knowing that you don’t have to go through either a 10,000 line function file or copy the same code over and over in different pages – you just go to the class file, and only look through a handful of methods to find the right method/function to use.

If Jesus was a programmer, he would have used MVC
MVC is just one way to write an application (be it web or otherwise), but it seems to me to be the most logical use of OOP. Having the model (or types of data to be manipulated), view (or the user interface) and controller (where the users input gets used to call manipulation methods) seems not only easier to write, but also better for future maintenance.

Singletons are a good lot
The singleton pattern in programming allows you the ability to call an objects method without having to think if you’ve instantiated your object yet. So the object’s reference is actually held by the object. The only downfall being you can only call one object at a time – but in web programming, where data persistence is virtually non-existent, this is a very helpful concept.

It’s ok to be janky, as long as it’s only a few lines of code
Sometimes, you just need to get something done.

“We really should have put that in the object,” one of us says.
“I know, but it’s only this one line of code. And it’s only in this controller, nowhere else,” says the other.
“Just do it.”

I think that was uttered in one way or another at least 3 times in those six weeks. Sometimes, you just need to get it done. It usually consisted of some weird logic that we needed to comment the crap out of. Wait… I think we forgot to comment that…

Political Satire

June 17, 2010 by Matty G · Leave a Comment
Filed under: Political 

I’m a Jesus follower. I agree with universal health care. I think the government needs to regulate business (to a certain extent). I’m not completely sold on global warming, though I think we need to do as much as we can to stop polluting our world. I don’t think someone who doesn’t consider themselves a resident of a country should run a country. I don’t think that someone who stops our elected politicians from doing the work we voted for them to do should not be running the country.

I also think that someone who has failed to win the place of ruling party more than four times should retire, no matter how loud he is, but I digress.

So, in Canada, we’re seeing the polls equalize between the Liberals and the Conservatives. Neither of which I can in good conscience vote for.

You know things are bad when a primarily liberal political satire starts making fun of the party they hold so dear: This Hour Has 22 Minutes had a brief “news story” that said that the more Minister Ignatieff didn’t say a word, the more the Grits shot up in the polls.

Either that or the Conservatives are doing it to themselves.

Political Apathy sucks.

Custom Javascript Objects with Embedded JQuery

January 28, 2010 by Matty G · Leave a Comment
Filed under: Tech 

To all of you non coding geeks, you don’t have to read this. It might confuse bewilder bore you to death not be of relevance to you.

As some of you know, I’m a multimedia developer (read: web developer… that seems to be the majority of what I do) at a relatively new University in Southern Ontario, Canada. I’ve been working on a website for first year students to brush up on writing and math skills. Back at the beginning, someone had the idea of having a “virtual campus” as another means of students finding their information.

One thing led to another, it started with Flash, then moved over to an AJAX solution.

I worked on said AJAX solution and had it working relatively nicely. However, due to some usability quirks, I needed to rewrite a huge chunk of code.

I decided to objectify it, purely for my own amusement and further education.

The problem that I kept on having is that whenever I used a JQuery call and needed to reference the object’s properties, it would always give me an undefined error. Being the Actionscript junkie I am, and knowing that Actionscript borrows heavily from Javascript, I tried using parent.variable instead of this.variable.

It all seems to be working at this point. But I thought this might be of some use to someone, somewhere. I thought it was working, however, what using parent.variable did was created a variable outside of both the JQuery and VirtualCampus objects. Not a great idea, however, it served my purpose and was a lot easier than using the VirtualCampus object to extend the JQuery object.

Quick example:

function VirtualCampus() {
this.campus_location = []; //array with locations visited
this.campus_depth = 0; // what level in the nav tree they are at
this.campus_faculty = 0; // id of faculty they entered
this.current_info = []; // Data for current location in VC
$.getJSON(‘virtualcampus/vc.js’, function(jsony){ // Get JSON data for campus
$.each(jsony.location, function(i, item) {
parent.campus_info[i] = [];
parent.campus_info[i][0] = jsony.location[i].name;
parent.campus_info[i][1] = jsony.location[i].file;
parent.campus_info[i][2] = jsony.location[i].depth;
parent.campus_info[i][3] = jsony.location[i].faculty;
});
});
}

So there’s the constructor, that sets variables and gets the JSON data for the VirtualCampus. Notice the parent.campus_info 2D array… that’s stored as global scope. I tried very hard to make it local to the object, but JQuery and my object weren’t playing nice. If anyone has any idea how to get around that, let me know.

Double Crunch Challenge: Post-Post-Week Wrap-up

January 28, 2010 by Matty G · Leave a Comment
Filed under: PrimalStride 

So the week after the… uhh, week after the double crunch challenge, I’m still doing crunches (though I’ve dropped it to 100 per day), I’m still eating relatively healthy (save for the Wendy’s my wife and I got for dinner because we were in a bit of a rush).

I’ve included having a handful of nuts between meals to keep the metabolism going. Water doesn’t seem to do it, even though I drink about 2 litres over the course of the day.

Today I started including lunges in my morning exercise. I’m not all that good at them because of balance issues, but I still got a burn from doing them, which is a good thing.

Interesting note: the guy I share my office with (I got to find a shorter way to say that – what about gismow?) just started on P90X. I looked at that at one point, but the pre-requisites definitely don’t allow for fat guys to start with that routine. Maybe once I get to that first plateau. Maybe.

Until Seth gets back (which I believe he said would be next week) I’ll add a new exercise each week. Maybe I should get my Wii Fit involved again. But I can’t watch BT and exercise at the same time if the Wii Fit is involved. Hmmmm.

Double Crunch Challenge: Day 5

January 12, 2010 by Matty G · Leave a Comment
Filed under: Rants 

Let me answer your question: Yes, it still hurts; but not as much as it did yesterday. That means my body just might be getting used to it. I spread out the crunches throughout the day – fifty when I wake up, fifty just before (or when I get) to work, fifty at lunch, fifty when I get home or after dinner, then fifty before I got to bed. It only really hurts once I hit the forty mark.

The greens: last night I had green beans. Leftovers went good in a salad for lunch today too. Tonight: I’m thinking spinach. Raw, in a salad. Throw some fruit in there and a light vinaigrette – that’s good eating!

Today’s question from PrimalStride:

Where do you get your power from? Are you able to survive, to thrive, and to flourish through the strength of your friendships with others? Do you have a deep religious fervor that keeps you going? Perhaps you just know, deep within yourself, that you are able to do whatever you wish?

I said in yesterday’s update that I wanted to be able to do physical activities with my family without running out of steam. I believe that drives me more than anything else. I am a Jesus follower, however, I don’t know that my relationship and belief in him would push me to get in shape; though I do like to joke every once in a while that “the Catholic Church says that gluttony is one of the deadly sins; I don’t know if it will send you to hell, but it sure will get you to heaven faster.”

Double Crunch Challenge: Update

January 11, 2010 by Matty G · 2 Comments
Filed under: PrimalStride 

On day 4 of the double crunch challenge: I’m hurting.

I’ve been faithfully doing my 250 crunches a day and have had very little difficulty in eating a different green vegetable each day. Friday was Green Peppers, Saturday was Broccoli and Celery (Looky! Double Dose!), Sunday was Asparagus. Today? Any suggestions?

Did I say I’m hurting? Wait… my fellow office dweller is gone for lunch. Time for 50 crunches! That’ll bring me up to 150 for the day.

I’m back. Yes, I might be going insane when I hurt and I’m doing the very thing that makes me hurt, but hey – (cliche alert) no pain, no gain!

Today’s question posed by our PrimalStride fearless leader, Seth:

What do you look forward to most when you imagine yourself living a truly healthy lifestyle?

I see running around with my son without running out of breath after 10 minutes. I see looking forward to walking with my wife. I don’t see me better at sports, but definitely enjoying them more despite my lack of coordination.

It occurs to me that I should look at last week’s challenge (even though I had not committed to PrimalStride yet) and incorporate it into my daily routine.

New Year’s Resolutions

January 8, 2010 by Matty G · 1 Comment
Filed under: Rants 

It’s been a while since I’ve blogged. Yes, I’ve been on twitter, I’ve been on Facebook (but only because facebook grabs my tweets automagically) but I’ve never really done any significant writing in over a year.

That’s about to change.

I’ve seen others talk about wanting to blog again, and making a new year’s resolution to blog at least once a week. I think that’s an attainable goal. But here are some other goals I’ve been thinking about.

Time Management
I spend way too much time in front of the TV. I probably spend too much time sleeping (6-7 hours is enough, right?). So actually saying “I’ll only watch 1 hour of TV a night, 2 hours if there’s something good on” might make a meaningful difference in productivity and brain power. Besides, I’m already getting into the habit of holding my son in front of the TV and letting him watch because it distracts him. Not a good habit to get into. And scheduling time that I sleep will let me do more…

Exercise
Oh yeah. The big fat (pun intended) popular New Year’s resolution. Go to the gym. Work out. Lose weight. I’ve made it before, and judging by my waist size, it’s never really stuck. I’m sure 90% of people who make that resolution fall off the wagon within a few weeks. Time management should help me out a little… if I schedule it, I must follow through.

And a little backing doesn’t hurt either. Primalstride.com, run by Seth Simonds, is a week-by-week weight loss challenge – so each week, you get a new challenge. This week’s challenge he’s dubbed the double crunch challenge: 250 abdominal muscle crunches a day, and a new green vegetable each day.

Blogging
Well, obviously, if you’re reading this, you see why I want to blog. As the tag line of the blog says, I’m going to write about technology, new fatherhood, politics, health and just about anything I feel the need to write about. I’m just going to write what I want, when I want; but try and do it at least once a week.

I’ve made my resolutions… wait, no. I’ve made promises to myself. Resolutions just seem to get broken. What about you?

Just When You Thought It Was Safe

March 8, 2008 by Matty G · Leave a Comment
Filed under: Pop Culture 

I wrote a while back about Facebook killing my inner child. Seems I’m not the only one.

If you’re asking yourself, “Who is this guy?” He’s the executive producer of a rather successful science-fiction franchise. And a writer.

Next Page »