I’ve come across a tweet recently from PoisonTheMonkey, about the current BP abomination:
This is what capitalism looks like: http://tumblr.com/xevam3dx2
It’s a disturbing image, and I agree with what she is trying to say, except for her usage of the word “capitalism”. From wikipedia:
Capitalism is an economic system in which the means of production are privately owned; supply, demand and price are mostly set by market forces rather than economic planning; and profit is distributed to owners who invest in businesses. Capitalism also refers to the process of capital accumulation.
It continues with “There is however no consensus on the definition of capitalism, nor how it should be used as an analytical category.”
So pretty much it seems to be a very general word that actually covers a few things, and that’s the problem. Capitalism shouldn’t be a dirty word, there’s nothing inherit in capitalism that means companies should get away with killing flora and fauna. It just means that people and buy and sell stuff they own.
The problem is that we are under a system of corporatism, now I will fully admit corporatism is a capitalist system, but it’s not the capitalism of the system that is causing the problem, it’s the fact the governments of the world give favour to companies/corporations. So I feel PoisonTheMonkey’s statement is actually blaming the wrong thing.
She’s not being malicious at all, she knows the governments attitudes are the problem. What she is describing is what I understand as corporatism, so I would think that is a much better word to use to describe the problem.
As far as the BP situation goes, the American government should be stepping in, and making BP pay for a 100% clean up, until it’s fixed, or BP have no more money left. Corporations are all about profit, so if you make disasters like this cost them, they will make sure it’s fixed quickly and never happens again.
I’ve always liked developing software on a *nix based system, generally this means Linux, but I’ve recently been using OpenSolaris because, well, it’s better than Linux. Anyway, there has always been OSX, and I did used to own an iMac, which was nice.
However, it’s very hard to upgrade the video hardware in any Mac, besides the lovely, but very expensive MacPros. And as I do like gaming on my PC as well, it’s kinda something that is a bit important to me at times.
Anyway, I’ve managed to get OSX running on my PC hardware, there’s plenty of websites on how to go about it, so I’m not going to repeat them here, Google is your friend. So now I’m running OSX Snow Leopard, the only problem I seem to have is that I can’t enable my full 8GB of RAM, and I have to run at only 4GB. Besides that however, everything else seems to work just fine. Even my Geforce 295.
The only other problem is finding software that does certain tasks in a way that I’m used to on Windows, so I thought I would just mention a few in case it can help anyone else out.
Steam has just come to the Mac, so I think that pretty much solves the problem for me. For the last few years, I have only ever used Steam to buy my PC games, and Valve’s recent support for Mac now means that I can do the same under OSX. With the added advantage that when I buy a copy for my PC, I get the Mac version for free. With the support of Steam, I’m hoping that the Mac will get some more support from game developers.
This is a pretty important one for me, I pretty much always have music playing when I’m at my computer, so it’s important that I can at least have a music player that I can live with. On Windows, I always used Foobar as my music player of choice. It supports pretty much all music formats under the sun you could think of, it’s pretty customisable, and supports ReplayGain.
When it comes to OSX however, seriously, iTunes is probably the best option, all other music players just don’t seem as nice, which now gives me some problems.
iTunes doesn’t (and probably never will, support FLAC properly. This actually isn’t much of a problem now. iTunes has always supported Apple Lossless, which, seems to me, produces a smaller file size than FLAC did. So basically I can recode all my FLAC files to Apple Lossless.
Now this has always been an option, so why wasn’t I using iTunes on the PC then? Well, because I also have an iPhone. If I did have my entire music collection in iTunes, I would need to keep two copies of tracks about. The lossless ones for playing on the desktop, and the lossy ones for syncing with my iPhone. However, the new version of iTunes (at least on OSX) now supports encoding of lossless to lossy when syncing. So now all I have to do is manually manage tracks to sync on my iPhone, but don’t have to keep two copies, and re-encode tracks I want to sync.
This one is kinda important for me, ReplayGain addresses the issue of having a mixture of CDs that have been normalised to different levels, basically this is a problem when you have your music player set to random. You will some find some tracks are really quiet, so you’ll turn up the volume, and then it will switch to a much louder track, and you’ll be deafened.
iTunes does have support for pre-calculated volume adjustment, it’s called Soundcheck. However, the problem with Soundcheck, is that it does per-track normalisation, this is bad. On an album, say for example Pink Floyd’s The Dark Side of the Moon, you will find that with Soundcheck results in the volume of the tracks jumping all over the place. The volume should be normalised based over the whole album. iTunes does not support this…
However, with a bit of searching, I found iVolume. This program when set correctly, will calculate and set the Soundcheck setting so each track in an album is set to the same level. This means no jumping up and down in volume, and also that the normalisation will work across albums as well.
Well, that’s it for now.
The statements that MYOB generates are inflexible, and in a word, crap. I’ve found that getting timely and informative statements out to customers goes a long way to helping keeping your customers close to their payment terms.
So, in order to automate the process, I wrote up a script that generates statements, and any warning letters I needed to go with them. Keep in mind I’m using JRuby, as it gives me access to JDBC which is far easier to get working with the MYOB ODBC driver than trying to use the Ruby ODBC driver, and it requires no patching to get it to work.
I have previously written on how I was working on automating the invoice system between the sales database I wrote and MYOB. I do have something written up, however it’s not code that I would want anyone to see, because I know it’s not high quality.
Anyway, the statements MYOB prints, are, in a word, crap. So I wanted to write a system that would take the information out of MYOB and generate my own format of statements for either mailing or e-mailing.
Now the problem with MYOB and Rails, or to be correct, the problem with MYOB and ActiveRecord is that MYOB is not a vaild SQL database. This problem is compounded by the fact that ActiveRecord expects the database schema to be a specific way (this can be changed). ActiveRecord can be nice to work with, however there are cases where it can be a bit of a pain, and this is one of those.
I’ve had a little play with Sinatra and Sequel and this looked like a good chance to give Sequel a try. The statement generator I’m writing is just something to run, once or twice a month, so it doesn’t need a web interface.
JRuby is currently my Ruby VM of choice, because I’ve found the Java integration very useful for printing and faxing for our internal sales application, so I’ve stuck with that, which, when it comes to MYOB is a good thing. Why?
As mentioned in my previous post, I had found information on getting MYOB and Rails/Activerecord talking to each other at Pat Allan’s site, Freelancing Gods. The problem is the Rails ODBC driver doesn’t support MYOB (and I’m sure MYOB doesn’t have a 100% correct implementation), so you have to patch some files to get support.
However, JRuby allows you to use JDBC, so I figured that I could use the Java JDBC to connect to the MYOB ODBC driver. It works, with no patching involved.
Ok, enough of the length explanation, how does it work?
First, get and install JRuby.
At the moment I’m using JRuby1.3.1, and I download the jruby-bin-1.3.1.zip file. I’m going to assume you know how to get JRuby installed, and in your command path.
With that done, start up your command shell (I use Windows Powershell), and install the following gems:
That’s it! Next, you need to set up your MYOB ODBC datasource, again, I’m going to assume if you’re looking up this information then you know how. There’s one thing however, if, like me, you’re using the 64bit version of Windows Vista, you need to run:
C:\Windows\SysWOW64\odbcad32.exe
Otherwise it will only list the MS SQL OSBC drivers.
With that done, we can then load up jirb and play with the database. Or you can write the following file and run it.
require 'rubygems'
require 'sequel'
#Setup the database connection
DB = Sequel.connect( 'jdbc:odbc:MYOBTest' )
customer = DB[:customers].all[0]
puts customer[:name]
DB.disconnect
Don’t forget the disconnect, otherwise JRuby will crash when you exit.
If you’re familar with Sequel, you might wonder why I do the bad thing, and go:
DB[:customers].all[0]
rather than:
DB[:customers].first
This problem is that the MYOB ODBC driver will complain about the SQL statement generated, best I can guess is that it doesn’t support the SQL option LIMIT.
Anyway, that’s it for now.
Well, our work OpenSolaris server has been giving me the shits. After going down mysteriously I had to do a quick swapover job (basically I took the 3 drives out of it and plonked it into the new machine I had ready for the boss (quick note, it worked straight away, I was really surprised.)).
I decided I’ve had enough with building my own servers, seems to be that I had a few problems with hardware recently, in particular, RAM. The sudden loss of our e-mail server was enough motivation for me to get permission to spend some cash on a proper server.
Since (Open)Solaris is currently my OS interest at the moment, I figured I would check out what they’re offering, basically we’re a small business, we don’t need, and can’t afford something too hardcore. My choice came down to either the Sun Fire X2200 M2, or the Sun Fire X2250. They’re the same price (currently AUD $2,350.00), so I basically went with X2250 because it’s faster (I think).
So now I’m waiting for it to arrive (via Sun’s Try & Buy trial offer), when it arrives I’ll try and give a “review”. I say “review”, but honestly it’s just going to be what I think about it, and this is my first (and probably only) proper server purchase, so don’t actually use it to make a decision.
Of course, if you are deciding on new server hardware, and like myself, this is your first time, keep in mind that these server boxes are pretty deep. We had to purchase a new rack that was 1000mm deep, as the server is 633mm deep.
Ask me what my religion was, hmm, say about two months ago. I would have said “Agnostic”, however, I’ve recently been thinking about my views on religion. I really can’t remember what made me start thinking about it, I think it was a YouTube clip, anyway, that’s not important.
As a result, I’ve read “The Blind Watchmaker” by Richard Dawkins, followed by “God is NOT Great”, by Christopher Hitchens. I’ve managed to get hold of “Enemies of Reason”, and “The Root of Evil”, documentatries by Dawkins. And again, I’ve been following athiest channels on YouTube.
My views have gone from “Agnostic” (which would have been more correct to say that I was an agnostic athiest, as I’ve never really believed in God), to athiest, to anti-thiest. This is largely due to my reading of Hitchens, a point of view that had recently been firmly resolved by the recent bushfires in Victoria.
How? Simply, because a ministry in Victoria proposed that abortion laws are the reason why God started the bushfires, and recently Fred Phelps has said that the fires are send by God to punish Australia. These are but two recent examples of how the religious will try to use fear of God as a means to push their agenda.
Now you may think, “These guys are pretty fucked up, but, well, it doesn’t really affect me”, and you may be right, for now. The thing is, and what I’ve been starting to notice, is that this religious shit does affect us, there is a religious agenda out there that is trying to establish a control on the population.
For example, take the UN, there has been a resolution, that aims to make defamation of religion illegal. This is pretty old news, from November I think, however I believe at this stage, it’s optional. Australia voted against it, as they should, Australia is a secular government. However, you can see the obvious attack on free speech here, something which you can’t allow a compromise on. It’s a point that I am, unfortunately, not eloquient enough to present an argument for. However, again, Hitchens provides a wonderful speech on from June 2007 on free expression.
Unfortunately, I simply do not know how much free speech we have in Australia, but I think that this is something America has right. All speech should unrestricted, even the fucked up shit like hate speech, because once you make a distinction between what is allowed, and what is not allowed, then you open a door, ever so slightly, for more speech to be policed.
Anyway, here’s some links that I suggest people to check out:
Pharyngula
Refuting Atheistic Naturalism Episode 2 (This kid is like 14!)
Check out the videos by these guys on YouTube:
Thunderf00t
AronRa
AndromedasWake
DonExodus2
cdk007
patcondell
TheAmazingAthiest
C0ct0pus
8th November
Well, the flight was a bit of an endurance. Starting at about 10pm Friday night (the 7th) and finishing on Saturday at 2pm Christchurch time. For those (like me) that have to sit down and do the math, that’s about 10 hours, of course, flying took only about 5 hours. The rest of the time was taken up by waiting, or getting ready to fly out.
We didn’t get to sleep until 8pm, so that means we were up about, hmmm, lets see, 6am Friday to 4pm Saturday, so that’s about 22 hours without sleep. I was half expecting to see fairys fly off the top of door frames, or non-existant kittens jumping out of peoples laps, thanks to sleep deprevation. We were saved by my Aunty and Uncle, who, are excellent hosts.
9th November
After a much needed 12 hour kip, we were refreshed and ready to go looking about Christchurch, with my cousin, nothing too major, just a quick look through the markets and a few shops.
If you’re using OpenSolaris and the CIFS server stuff that’s built-in with ZFS, you may have run into a problem where you can’t edit or rename files with Windows, even though you’ve got write permissions on the file. It’s not the server that’s stopping you, it’s the Windows client. It’s looking at the ACLs and checking for permission, sees that it doesn’t have it and denying you.
The trick is you have to set the ACLs to what Windows expects. To do this, make sure you’ve got you path set to use the Solaris ls and chmod utils.
export PATH=/bin:$PATH
Then set the permissions for all the files, and dirs recursively:
chmod -R A=owner@:rwxpdDaARWcCos:fd:allow,owner@::fd:deny,group@:wp:fd:deny,group@:rx:fd:allow,everyone@:wpAWCo:fd:deny,everyone@:rxaRcs:fd:allow movies
Depending on what you want to do, you will have to change the ACL options, but hopefully this helps a little.
The Australian government, in an effort to protect “The Children” are trying to put into effect, Internet censorship at the ISP level. This is stupid, ignoring the moral, and social reasons for a second (as these are generally very gray areas), you can look at the technical reasons.
For one, it can slow down your Internet connection as much as 80%, not only that, but, well, it won’t really stop anyone from getting to filtered websites. You could easily get around it by just setting up a VPN, or other proxy service for your connection. As the saying goes, “Locks only keep honest people out”.
I like OpenSolaris, ZFS is very cool, and I’ve toyed with zones a little, and I’m yet to really try DTrace. However, when it comes to ZFS, there’s one thing that’s a bit of a worry, the complete and utter loss of your data. Now in theory if you’ve got a redundant pool, then your dataloss should be very minimal, however, certain things can happen that you should be careful playing with things that are cutting edge.
What the hell am I on about?
Well, on my home server, all by itself, it decided that it would no longer boot. GRUB would load, however the menu wouldn’t, no spashimage, no menu selection, just the grub command line. I really couldn’t be bothered to try and fix it to be honest, and it gave me a chance to document how to get MediaTomb, etc, setup for it.
The problem, is pretty much described in this OpenSolaris forum post.
Anyway, today, I had the same problem with our email server at work, I rebooted, and the machine wouldn’t boot. Because it wasn’t easier to start from stratch, I had to try and nut the problem out. Unfortunately I don’t even know what the problem is, I’m just not that good, I had already tried directly entering grub commands to get it to boot (getting the same result as in the forum post).
Luckily, using Google, I found some pointers to get myself sorted. Actually, this post, they even made a wiki entry for it here. First time I tried it, it didn’t solve the problem, however, I thought I would also try it on the older boot enviroment… success!!! Sort of….
Initially, I had only done the update on rpool/ROOT/opensolaris-snv_95-1 (it is updated to snv98 despite the name), however, after also doing the procedure on rpool/ROOT/opensolaris-snv_95, I got my grub menu back!! Woohoo! Oh, wait… er… kernel panic….
So after much wailing, thinking, and googling, I really had nothing else to try, but I had noticed that there was a opensolaris-work-2 boot environment I had forgot. So basically I followed the procedure for all three of my boot environments, I also just left the zpool imported (I was using a snv98 LiveCD) and rebooted the machine.
Success! So now the server is up and running again, but it’s things like this that really scare me about using OpenSolaris and ZFS.
Update:
I’ve recently found out that the RAM in my home server is faulty, no matter how good a filesystem is, it still can’t stop the hardware from screwing it up. However, it has to be said that, despite the flakey hardware I’ve only lost one, or two files.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |