Monday, September 21, 2009

Yous

This is a word I find myself saying more and more. In current usage, the word you does not technically have a plural, but yous (and also you all) are becoming popular for that. I find myself saying it without thinking, and when I try not to say it, it sounds wrong. It's funny the way languages change.

I'm still not sure whether I want to try and stick with the more "correct" usage, or go with this new plural form. Generally I try and use proper grammar as much as possible, but there really isn't all that much point in casual usage. Words come in and out, meanings change, but sometimes it can be fun to go against that change. I still enjoy asking people, "Contemporary with what?" when they use the term contemporary to mean recent, because that's not its actual meaning. Most people don't even understand what I'm on about, sad as it may be. Ah well, I shouldn't spend too much time bemoaning this change, as I said, languages do change, and will keep changing.

Saturday, September 19, 2009

Welcome To The Masquerade

I bought Thousand Foot Krutch's new album on Monday, and it's awesome! Wasn't even all that long I had to wait to be able to get it here after the US release, less than a week which is much better than the about 2 weeks I had to wait for The Flame In All Of Us (TFIAOS). I had really been looking forward to this, the promotion TFK did for it, the teasers and all really had me hooked, though it's much better hearing it as the entire album than the few songs they had released.

The album just works so nicely as an album, the songs fit together, the sound is fairly consistent without being all the same. And it's heavier, much heavier than TFIAOS, which I like. I'm not sure whether in ranks above Phenomenon as my favourite TFK album (and favourite album of any band), but if it doesn't it comes close.

My favourite song on it (at least for the moment) is E for Extinction. It has a great quiet - loud - quiet sound which is always good, and a good message to go along with it. I particularly like the lyric When we move we camouflage ourselves. We stand in the shadows waiting. Which really hit me. I also like the song The Part That Hurts The Most (Is Me). Which also sounds great and has some good, hard hitting lyrics which I think is a must. I can never get too into a song with poor lyrics.

So well done TFK, you did a great job making an excellent album! Now come back to NZ.

Thursday, September 3, 2009

Laplace's Equation in 3D, polar coordinates

The title basically says it all. For a mere three marks (out of 50) in our take home test, we've been asked to Laplace's Equation in spherical coordinates. As you can see from that post it's a mission. I basically gave up around half an hour ago. It seems that I made a mistake when I was inverting the Jacobian (2 pages of working), which is a slightly different way from the linked article, but that's how we've been asked to do it. Tomorrow I suppose I'll go through it and find my error, which will be tedious. I did get maple to do it for me, so I know what I should get, and I was pretty close, but it appears I messed up one column.

The frustrating part is that even when I've inverted the matrix, I still need to do the ridiculous substitutions you see near the bottom of that page. I won't do them all at once like that, I'll be a bit smarter, but still, it's going to be tedious.

The thing that's really annoying is not that this is particularly hard - it isn't, it's just tedious and a huge amount of work. I won't be surprised if this question goes to 4+ pages. And it's not the kind of work you have to do by hand any. That's why people developed computer algebra systems, why we rely on the work of people who have gone before us, so we don't have to sit there doing tedious calculations. However, I do understand the point, so I'll strive to do it well, plus I want a good mark in this paper, and the test is worth 20% so it is fairly important. Maths Away!

Wednesday, August 26, 2009

Playing with Qt Jambi

Over the last couple of days I've been playing around with Qt Jambi, the Qt bindings for Java, which are pretty cool. I haven't used them that much so far, but they seem really nice. I'd been starting to write this little car game thing, which is more a proof of concept at the moment, which I've now ported to be able to use Qt.

Try it as an applet here (note this is using ordinary Java swing, not Qt as I'm not sure if you can embed a Qt widget in an Applet (or in any AWT or swing element). Then there'd be the trouble of having to download Jambi which is fairly big.

Use your arrow keys to drive around, Ctrl+R resets (in hindsight, not a good choice as it coincides with firefox's and epiphany's reload page shortcut (possibly other browsers too)). The physics is terrible, but I find it fun just driving around, making pretty patterns. You might need to click the applet to give it focus.

Or you can download it here. That includes the source. To run it using qt, it will need to find the Jambi jar file, and it looks in the current directory and "/usr/share/java/qtjambi.jar" (the latter is the default location in Ubuntu (and possibly other distros), so you just need to install the jambi package). You can download Qt Jambi here. Then you need to pass the command line option '--qt'. By default I try and use opengl (which is faster), if it doesn't seem to work, try '--qt --no-gl' to use the regular qt rendering engine.

The number in the top right corner is how many milliseconds it's taking to draw each frame (averaged over the last 100 frames I think). I found Qt with no opengl to be about the same speed as Java swing at 640x480, which I found surprising, I thought Qt would be significantly faster, though at full screen swing slows right down, while Qt only takes a little bit longer, and with opengl it's about 25% faster. YMMV.

I had to be a bit sneaky when writing this so that the swing version would run fine even without the Qt libraries. My first (which I thought was nicer) implementation didn't work, as there were references to the Qt classes in the classes that were being run, even though they weren't used. So when I redid it I had to split everything up, a swing version and a Qt version, so that when swing was being used there would be no references to the Qt classes. I wasn't sure that that would work, but it did, which is pretty cool. Enjoy.

Edit: It appears it's pretty hard for this thing to regain focus, I should probably look into that, enjoy it if you can get it to work, otherwise download the jar, that's more likely to work correctly.

Tuesday, August 25, 2009

Windows Network Grrr...

I've come to be incredibly frustrated with how networks work under Windows (XP) over the past year or so. I'll explain my set up a little first, I have a laptop which runs Ubuntu, I connect to the Internet via another computer (running Windows XP) which connects directly to our cable modem. I thought I'd have issues with this seeing as how I wasn't using Windows, but on my side it has been a breeze (much easier than in Vista on the same laptop).

The thing that irritates me is that every time the driver, firewall etc. is updated, or just at random other times, the computer stops me from connecting. I haven't changed anything on my laptop, I just can't connect to the network. So far we've managed to fix the problem by changing some option somewhere on the XP computer, in some nested dialog box, or whathaveyou after trying various things for around an hour. As I said earlier, it's incredibly frustrating. A thing like that should just work, which it does in Ubuntu, but not in XP (though I haven't tried the other way around). Rant over.

Wednesday, August 19, 2009

Proposed road safety law changes

Some new road safety proposals and things came out today (or maybe jest recently), which can be found here. I had a quick squizz at the summary, which overall seems pretty good and I support a lot of the ideas, especially the increased focus on fatigue, which I think is often overlooked. But there's one proposal in there that really irritates me, so prepare for a rant on that.

The offending proposal is: Introduce a zero BAC limit for certain drivers (drivers under 20 years, adults without a full licence, and commercial drivers) (And Guptill just got out, grrr.) These proposals for a zero limit always irk me. People don't seem to understand what zero means, or how common things are that contain a trace amount of alcohol.

Among other things, the following can all contain small amounts of alcohol: cough syrup, fruit juice, and bread. With a zero limit, even the most minute amount of alcohol puts you over the limit. Sure, with current equipment means these trace amounts won't be detectable, but even so, if this law change were to go through it would be illegal to drink juice left in the sun (which had fermented a little) and then drive. How stupid is that? Sure, reduce it to a very small amount such as 0.01% or 0.005%, but not zero. Zero is just stupid.

Just to be open here, I don't fall into this category, I am not under 20, and I have my full licence, so I don't have any obvious ulterior motive. I just hate ridiculous proposals for laws, because there's always the chance that they will no longer be proposals, but get enshrined and adhered to.

I understand the purpose of these laws, to encourage people to not drive if they have been drinking, but a zero limit is not the way to do that. A zero limit may do this, but one huge side effect is that it'll make the actions of people who aren't endangering others illegal. This is when laws go to far, there is a limit to how much they can infringe on the rights of the people. So while I'm in favour of reducing the blood alcohol limit, NZ's is one of the highest in the world as it stands, but I cannot support a zero limit.

I plan on making a submission on the previously linked to site, and possibly even writing a letter to the editor, though I'll need to organise my thoughts a lot better for that. I had more ideas before, so I might add them to this if they come back in an arbitrary manner.

Monday, August 17, 2009

My most productive evening of study - ever

As the title suggests, I think this evening has been the most productive evening of study I've ever had. I got home just before 6pm, and probably studied for all bar 1-2 hours of that until now (11:20pm), and it's not even as if I have something really urgent that I need to finish.

So, when I got home I started my Calc assignment first, spend around an hour working at that, doing a considerable amount. Then we had dinner, and afterwards I went downstairs and did a few things on my computer (not taking much time altogether), then starting reading The C Book as study for a test I have on Wednesday. After a while I stopped, finished my Calc assignment (which was fairly straightforward, though relatively long, 5 pages in all). Then I came back downstairs and continued reading the aforementioned book. I think I read almost 100 pages (as in the pdf version), and now I'm writing this.

I don't think I've ever spent so little time doing other things, even when I had a big assignment, lab report, test or exam the following day. It's crazy. It's as if I've got all motivated or something. But I think it's a good thing, so far at uni I've been cruising a bit too much, doing the minimum necessary for good grades, when it would be better to understand what I'm studying a little better, and with better time management I should be able to keep my sleep more consistent which has to be a plus (I fall asleep way too often in lectures).

I'll see if I can keep this up now...