Monthly Archives: August 2011

Professor Layton vs Ace Attorney

Oh my god. I have no idea how I’ve managed to only just find out about this, but let me just say: AAAAAAAAAAAAAAAAAAAH!!!!!!! SO EXCITED!!!!!!!! It’s like a dream come true. I am a massive fan of Professor Layton and of Phoenix Wright (Currently playing Trials and Tribulations in fact). I haven’t been as excited about a game since Twilight Princess. I am so freaking excited I’ve just got to tell the whole internet: AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!

fgetcsv and character encoding

There’s a lot of info on the net about solving problems parsing csvs: using iconv, utf8_encode and utf8_decode, using fget instead of fgetcsv and parsing your file as a string, even some regex stuff for finding and replacing weird characters.

What worked for me wasn’t any of those things. I am migrating content from a Joomla website (using a modified version of TinyMCE when storing certain fields) to a Drupal one, and I kept getting problem  characters appearing as next to some spaces, and other problem characters with quotes and inverted commas.

All I had to do was open the CSV with the exported content from the Joomla tables in notepad++ and convert it to ANSI encoding (in the menu under ‘Encoding’ I clicked ‘Convert encoding to ANSI’). Let’s just hope that non-utf8 encoding isn’t going to come back and bite me in the bum later.

Development and domestic duties

Cleaning, tidying up and programming all give me the same feeling of satisfaction, stimulation and general well-being. If I’m given a load of disorganised cupboards/difficult requirements/messy data/dirty socks & general chaos, my fingers itch and itch and my brain buzzes. I can’t rest until it’s all done. And in all of these cases, I find if I’m made to do them quickly or half heartedly I lose all sense of enjoyment from it. If I don’t have the leisure to comment neatly, use a toothbrush on ingrained dirt, think about my classes and functions or dust the cupboards corners and line them with paper, then really, what’s the point in doing it at all?

When you sit back and see your beautiful neat kitchen with everything in it’s optimal place, or your beautiful bit of code which works exactly as it should and is neatly commented with a nice consistent naming convention for variables/classes/functions, don’t you feel a warm glow? This is what life is about my friends.

Pet peeves

I’m made upset and uneasy by the following:

  • People being reluctant and antipathic towards learning basic HTML, when it would make their life so much easier
  • People not using tabs in browsers and instead opening loads of windows
  • The fact that most people won’t start or even try reading a book if it is over 300 pages long
  • People using colour coding and formatting in spreadsheets instead of an extra column for data, and then looking surprised when I point out how useless it is because it loses the formatting when converted to csv and it doesn’t allow sorting
  • Someone USING the word ‘utilise’ (oh my, yes)
  • Me writing an email carefully and clearly explaining something and then someone replying in a way which makes it obvious that they just haven’t bothered reading it because it would mean them employing their brain for 5 seconds and they just can’t be bothered, so please can’t I explain it more simply?
  • Irrational numbers and recurring decimals
  • Word documents being used when a text file or spreadsheet would be much more appropriate
  • The millions of shorcuts you have to learn for vi/vim and how they make my memory apparently completely disintegrate
  • People using me as an interface for google instead of their computer/web browser – lmgtfy.com indeed.
  • Jeremy Clarkson
  • People always choosing to learn things in a very narrow, blinkered way instead of learning the fundamental rules about how things work and then extrapolating. So it’s kind of like me saying “So would you like to learn how to click this button and then the next button, or would you like to learn about what the system is doing and how it works?” == “So, would you like a step by step set of instructions to follow every time you want to cook cheese on toast, or would like to learn the fundamental principles of cooking and be able to create your own delicious dishes (including cheese on toast) effortlessly”?
  • Continuing from the above point: the problem is that people just aren’t lazy enough. Anybody who is remotely lazy will of course choose the second option, as it’s setting you up for life and means you will have to expend less effort further down the road. Only a machine needs step by step click-this-go-here-open-this sort of instructions. We are human beings, and we should be better. And yes, I’m aware it’s not possible to learn everything and some people just don’t have the time, but for stuff you do every day there is no excuse. This is kind of my first point reiterated I guess.

And, delving into my own shortcomings: The question is, is it better to be hopelessly bewildered by irritating bureacratic forms/bills and to put off doing anything about them, or is it better to be ruthlessly efficient and open your post as soon as you get it or fill out forms beforehand so you are organised? The former means you’re irritated and frustrated for a small period of time when people yell at you to get stuff sorted and then it is all over, the latter means you are CONSTANTLY irritated and frustrated (and worrying and fretting and organising and getting stressed out) but are also not selfish or working against the system.

Hmm….. Hmm. Sometimes it does feel as though we should have better systems for managing our lives with. Is this really the best we can come up with, human race? Filling out forms and soul destroying bureaucracy is the only way to organise ourselves because we exist on such a large scale now? Bah. But on the plus side I’ve done a foreign conversion on my driving license and although I might have forgotten to fill out my second leave form, at least I filled out my first one.