Expensive regrets

My new desktop got delivered today! I’m pretty damn excited by it. It’s like a new toy.

CoolerMaster SILEO 500 Mid-tower Case
Gigabyte GA-G31M-ES2L Motherboard
Intel Core2 Duo E8400 3GHz Processor
2GB DDR2 800MHz Memory
Western Digital 500GB SATA Drive
DVD-RW Drive
PNY GeForce 9 9500GT 1GB Graphics Card

That’s the best machine I’ve ever owned… I mostly wanted it for gaming, because I really want to be able to play WoW and MMOs in general again, really. Also, awesome games are coming out this and next year, so I figured I could do with getting a machine that can actually run them.

That’s kind of backfired on me a little though; The internet here has so many ports blocked it’s unreal. They apparently really don’t like people playing games and slowing the network down (it’s a shared line for all the few hundred people in the flat, which is a bit dumb), so they’ve banned commonly used ports and just about every other port. Only letting a few obvious ports through.

That means that this expensive machine is essentially useless to me now. All I can do on it is exactly the same as anything I can do on my laptop. I’m going to have to find a way to proxy all these connections, or get a better internet connection.

Virgin Media are apparently doing a few checks for us now to see if they can install a line into the building, and what speeds we’ll get if they can. Even then though, the installation of a whole new cable might take months, and could probably cost me and my flatmates… We don’t really have much money, we’re only students!

Mobile internet is far too slow and way too expensive, so that’s not really possible.

The only other way then is using a proxy. I’m not even sure if that’s possible. If we ignore the technological setting up of a proxy, I’ll still have to suffer the ping times being pretty much doubled. I really don’t know what to do.

Unless I get this fixed, this is a massive waste of money. I’m really regretting it now.

Zoom To Fit All Markers on Google Maps API v3

I’d like a problem that for once hasn’t already been solved by someone else.

I had a set of markers which needed to be all on screen, and for some reason there’s no .zoomToShow method. Fortunately it’s pretty simple to create yourself.

//  Make an array of the LatLng's of the markers you want to show
var LatLngList = array (new google.maps.LatLng (52.537,-2.061), new google.maps.LatLng (52.564,-2.017));
//  Create a new viewpoint bound
var bounds = new google.maps.LatLngBounds ();
//  Go through each...
for (var i = 0, LtLgLen = LatLngList.length; i < LtLgLen; i++) {
  //  And increase the bounds to take this point
  bounds.extend (LatLngList[i]);
}
//  Fit these bounds to the map
map.fitBounds (bounds);

And that’s pretty much it. Then, of course, I found that someone had already done this before, but for version two of the API.

There is nothing wrong with using frameworks

After lurking in #javascript for a while I noticed that a lot of the developers there look down on people using jQuery and Prototype. Their view is that you’re just getting one step away from the actual language, and you’re leaving key programming skills behind.

I acknowledge that that’s true, but I don’t see why it matters. All languages are essentially frameworks of a lower level language. PHP is basically a framework for a load of C libraries. C is just a framework for assembly code. Assembly is just a framework for binary programming. Yes, by using PHP you lose a lot of functionality of C, but that’s just because PHP is filling a market with no need for hardware manipulation and the like.

Same with jQuery. If you use $.get() you lose the ability to do the request synchronously (I’m aware that you could just use $.ajax(), but I’m making a point), which isn’t really a big loss to most people when compared to the benefits.

Javascript isn’t exactly the most uniform language around, which IE not supporting half the stuff Opera does, and Safari doing things differently to Firefox it’s a really hard language to code for. You spend more of your time finding work-arounds for each browser than actual logic. The frameworks available all do that for you, making sure that there’re no compatibility issues between browsers, and that $(‘#element’).slideUp() does exactly the same on every browser.

I’d go as far as to say don’t even bother learning about document.getElementById means. It’s so clumsy and awkward when compared to $().

Due to those functionality additions though it’s obviously a little bit slower. I’ve not noticed any speed decrease, but in an “every microsecond counts” environment there would be a noticable difference. But Javascript engines are getting faster and faster so does it really matter? The average person doesn’t even notice a difference.

It’s just programming evolution. It happens to every language. I wouldn’t be surprised if a few forward thinking browsers decided to just store a copy of the latest framework versions locally, so they’re instantly available to every website without having to download the same file hundreds of times from different servers.

Social labels are to be avoided

I’m taking a break before starting work (yeah, that’s going well) because something in an AskReddit article made me think about something, and I thought I’d come share my revelation.

The “Objectivist Christian” labelled himself as pro-life, in that a foetus has a right to life and shouldn’t be aborted, however the government has no right to make it illegal. That spurred an argument that someone who calls themselves pro-life can’t also hold the opinion that it shouldn’t be regulated upon. A pro-life person must also want abortions to be illegal.

The guy insisted that they were two different arguments, and I agreed with him at first. The moral discussion of aborting is a completely different one to the legality of abortions. Just because you believe abortion is a woman’s prerogative, doesn’t mean you can’t also believe it should be illegal (or any other combination — though, the combination I just gave would be odd).

The countering person didn’t argue against that, and probably agreed with it. However, what they were getting upset about was that the label “pro-life” is socially accepted as “a life must be protected under the law”, a single idea. You can’t take a socially accepted term and  use it as you want, even if the literal sense of the word allows your definition.

Another example I was thinking of was the guy that was kicked out of university for calling himself  “African American”, although he was white but an African living in America. People were outraged that he’d call himself that, which is a name for a black person living in America, some people even thought it was racist.

So it’s clear that social labels need to be avoided whenever you’re talking about anything. Maybe they’re okay for the media to use, or in flippant conversation, but when you’re discussing your views you shouldn’t use terms like “pro-life” or “African American”. You need to say exactly what you mean.

NB: You’ll notice that I’ve not given my views on abortion, or anything really. I don’t intend to do that in this post, nor to discuss it here.

Time to start paying my way, I think.

I’ve realised that with a dawn of another university year, I’m shockingly close to having to live in the real world. One year away, really. This is my second year, and the third is out in the big wide upper-working class world. I’ll need to find a job, which probably won’t be very highly paying (that year in industry is about experience, not making money), so I’ll have to be backing myself. Also, an income would hurt to help pay off my overdraft.

Next year, I’m not sure if I’ll be getting much government grants at all, and I refuse to come back to living at home with my parents. I’ve just grown out of that. Which means, I’ll need at least an income of £80~ a week to pay for rent, plus food costs (damn human weaknesses), as well as bills and other living costs. That £80 a week is only if I’m really lucky to find somewhere. I’ll likely just be renting a room in student accommodation.

I have about nine months to save up enough money to keep me alive for that year. (I’ll obviously be making money during that year too though.)

With that in mind, I’ve decided to start taking a proactive money making approach, rather than a reactive one I’ve current been taking (“I need £50, so I’ll do £50 worth of work.”) with my freelance gigs. I want to actively be advertising my services, and getting in touch with businesses enquiring if they want any help improving their web presence. Though, I’m not too sure about how they’ll react to what effectively amounts to cold calling.

Since I’m most interesting in WordPress customisation though, I figured I’d create a WordPress services minisite, which isn’t finished just yet. I have a few ideas for promotion which are fairly exciting to me, and I really just want to jump into them before I’ve finished the website and proper landing pages.

I really have no desire to have a nine-to-five, working behind a cash register job. If I get to February and realise I have zero money saved, then I’ll have to resort to that, but I’m really trying to push that off. That’s kind of my motivation to earn as much money as I can, I guess.

I still think the largest thing holding me back is confidence in myself though. I see jobs I know I can do and think “but what if I make a mistake, and end up looking incredibly stupid”, or “what if I get in over my head and have to tell the customer I can’t do what I said I could in the time he wants it”. I think I just have to embrace that those situations will happen, and just be prepared for them so I’m not knocked off balance too much when they do.

Political alignment, as told by OkCupid

Stupid test.

Stupid test.

I did a political alignment quiz and came out as 70% permissive social liberal, and 81% permissive economic conservative. And that apparently libertarian. I’m sort of okay with that, but I would have rather been placed dead on the capitalist/liberal line.

As always though, some of the questions were dumb and I answered them wrongly. By that I mean one of the questions was:

Being poor and black is an advantage in getting into college.

And I chose “agree”. I realise now that the question was asking “do you think black people get life easier because they’re black?” Which I would have answered “disagree” to. Other questions like that had meanings which weren’t clear, so I answered the question “wrong”.

Anyway, go do the test.