“AttributeError: ‘module’ object has no attribute 'blah' "

This is a stupid one.

I was getting the Python error: “AttributeError: ‘module’ object has no attribute ‘mailbox'”

I read this helpful guide, which didn't fix it. I then realised that I had 'import mailbox' in the head of the python file, and the python file itself was called 'mailbox.py': Python takes files in the local folder as higher priority than the modules in the main installation.

Moral of the story: don't name your python files the same as any of the modules you're importing.

Oops!

New (academic) year. New start.

Back onto the academic bandwagon we go; in the meanwhile, this has really got me thinking:

"Can you get an MIT education for $2,000? -- Scott Young"

YouTube Video Link

Whole screen images in LaTeX

As I've just found out while writing my presentation for BluePrint Durham, if you want to put a whole screen image into a LaTeX/Beamer presentation, you can't just centre it, as you end up with a fairly unwieldy left-margin. Unfortunately, the simplest solution that I can see is to use a tikzpicture frame.

Make sure you include \usepackage{tikz} in the preamble, and then for each image (per slide), use:

\begin{frame}[plain]
\begin{tikzpicture}[remember picture,overlay]
\node[at=(current page.center)] {
    \includegraphics[width=\paperwidth]{imagefilename}
         };
    \end{tikzpicture}
\end{frame}

(Solution courtesy of StackExchange, as ever.)

My Setup

Wow, it has been a long time. It's always nice see what other people use daily to do their jobs, so I guess it's only fair that I share mine. (Shamelessly inspired by James!)

Hardware

My main computer is a 2007 Mac Pro (Quad 3.0GHz Core, 5GB RAM with about 3TB of storage, impressively running faster than most people's computers today), attached to a beautiful HP LP2475 24" Professional monitor - I've never been so impressed by a monitor out of the box; the colours on it are perfect for all aspects of photography. Sound system-wise I've got a Cambridge Audio Azur 340a Amplifier, running into some old but perfectly serviceable Celestion bookshelf speakers. In the lounge I've got a Cambridge Audio A1 hooked up to some even older, but just as nice Yamaha bookshelf speakers - these are mainly for casual listening (iPod etc.) or for attaching to my laptop either with a cable or over AirFoil for music, Spotify or iPlayer.

When I'm out my iPhone 4S rarely leaves my sight, and I take my 2008 MacBook (2.4GHz Intel Core 2 Duo, 4GB RAM) with me a lot of the time (less so at night: pub + laptop ≠ great success), some Sony in ear headphones, which are pretty much the best I've found for under £25; when I'm going on a longer journey or period away from home I take my Grado SR60's, which in my opinion outperform most other headphones under £500. They might look a bit dweebish (is that a word?) but they sound absolutely stunning, and you don't have to look at yourself wearing them! I've got an old iPod Classic which is mainly for use in the car, but I keep on forgetting to charge it before long journeys. I always make a point of taking my Kindle with me if I'm using public transport, but I find that I'm reading more and more books on it full stop. I've also got an old PC set up running Ubuntu (10.04 LTS) as a media(-ish) server, but haven't finished sorting it out yet; the aim will be to get it attached to a projector. Also in the lounge is my Samsung ML-2525w Wireless Laser printer which a friend was kind enough to point out to me at the stupidly cheap price of £50, and is far more useful than a USB-only printer as you only need the router on to print to it, not any specific computer. I'm yet to get Google Cloud Printing to work with it though...

Camera-wise I've got the Nikon D300S with the standard 16-85mm lens, both of which I love dearly, but which isn't complete without the Nikkor 50mm f/1.4, which is frankly sharp beyond belief and my favourite lens ever. I've been pleased to note that the D300S currently retails for the same price that it did when I bought it two years ago! I've got a Sigma 70-300mm, but rarely use it as the glass isn't particularly good. I've got a Nikon SB-50DX flash which in spite of having 'DX' in the name wasn't designed to work with Nikon's Digital SLRs, but is fine as a manual flash. I've got a great & sturdy Camlink Professional Tripod which is a lot better than I expected (given I only paid ~£35 for it). My camera, lenses, other kit and laptop (if I'm so inclined) all fit neatly inside my Crumpler rucksack. I take my camera with me quite a lot of the time, but not as much as I'd like - it's a superb piece of kit, but a tad heavy & bulky for EDC.

My SAD Lightbox is absolutely indispensable (and is hooked up to a timer to aid waking up in the morning), my Kawai piano helps keep me sane when home (it's the equivalent model to the link from about 20 years ago), and I'm lucky enough to have a baby grand to play just beneath my flat (Definitely Not Mine!). Now I just need to get an iPad to read the music from...

Software

OS X Lion (10.7). Google Chrome. GMail in browser & Mail for Durham email. LastPass. Adium. Twitter. Dropbox (if you're not using it already, get it now). ReadNow (with InstaPaper). NetNewsWire (with Google Reader). iTunes. Spotify Unlimited (best £5 I spend each month). VLC. Aperture 3 (although I'm in the process of moving over to LightRoom). Photoshop CS5. Textmate is simply wonderful. TeXShop for as many documents as I can physically manage (from the wider MacTeX package). MS Office (grudgingly, although Excel's pretty good). Transmit. MacGPG (integrates wonderfully with Mail). Terminal (all the time; Oh-My-ZSH, OpenSSH, IRSSI, Github, nanoc... the list goes on.) Flux is absolutely superb software for anyone who uses their computer after sunset (so, everyone) as it slowly adjusts the colour temperature of your display after the sun sets based on your location. Seems odd at first, but only takes 10 minutes to get used to! Easily cancellable if you're e.g. editing photos.

I probably use other software on my Mac Pro, but I'm writing from my MacBook right now so can't remember what I'm missing... there will be an update at some point.

I feel as if there's a section missing here... perhaps 'websites read/used daily'? Web Apps and the like are in many ways now so close to downloadable software that they should at least get a mention. GMail, WorkFlowy and RememberTheMilk (with 'A Bit Better RTM') are permanently open in pinned tabs. I try, but fail, to avoid Facebook (enough said). I like Flickr a lot, but don't upload enough. Otherwise I've got so many websites' RSS feeds loaded into Google Reader that I can't list them all here, but I am a big fan of (and probably spend a little too much time reading) BoingBoing, LifeHacker, Hack A Day and Wired. Oh, and The Guardian, in electronic or dead-tree format.

If I were to improve anything in my setup, it would be (in agreement with James) SSDs in both my MacBook and my MacPro, but unfortunately not until I get paid quite a bit more. A decent, modern flash for my camera would rock too, but otherwise I'm a pretty happy bunny! (#1stworldproblems much?)

Writing this has pointed out a) just how many Apple products I have, and b) just how lucky I am generally, but then I knew that much already.

Calamity...

And yet again, I've let my tea go cold before finishing it.

Other-worldly

All the talk of new exoplanets has got me thinking. Unsurprisingly there are plenty of rocky lumps out there in the universe, of a similar nature to ours, many of which will probably contain some form of life.

Most sci-fi would have us believe that they will either share their amazing technology with us, use it to annihilate us or somewhere in between, but here's the thing that would scare (or disappoint) me the most: what if we're the most technologically advanced creatures yet to grace the universe with our presence?

Please watch this video.

Stanford's Sapolsky On Depression in U.S.

I promise you it's worth an hour of your time.

True Knowledge

From letters to the editor, NewScientist, 27 October 2010

The interview with Jon Richfield, who has answered over 150 Last Word questions, was fascinating (9 October, p 50). However, by assuming that he must therefore be "great at pub quizzes", the interviewer confuses facts with knowledge. Pub quizzes and game shows rely on remembering individual disconnected facts, with harder questions normally meaning more obscure facts.

Jon Richfield, like many experts in their field, does not necessarily hold vast reams of facts in his head but has the skills to construct knowledge, understanding and meaning through analysis, thought and deduction. Unfortunately, our school and examination systems all too often focus on the memorisation and recall of facts rather than the acquisition of an in-depth understanding, and therefore knowledge of, the subject in question.

-- Anna Wood

Spot on.

Debate

So I guess every blogger and his dog's writing a piece on the UK General Election first television debate. jumps firmly but briefly on the bandwagon.

I don't really think I need to say much myself, as it's all been said before, however I would just like to leave you with a comment from Victoria Coren:

One of the most enjoyable things about the debate was the way Alastair Stewart shouted the leaders' names, in order to swap from one to another, and how obediently they responded. ("Gordon Brown! Now David Cameron! Mr Cameron and then Mr Clegg! Mr Clegg and Mr Brown together … Cameron on descant.")

Once Mr Stewart had the trio reacting with such alacrity to his commands, it's a shame he didn't go for the full Whose Line Is It Anyway. I kept waiting for him to shout "Now, in the style of a horror film! Western! Swedish melodrama! Now mention a washing machine!"

Some say only David Dimbleby can handle these debates with style. But I say we should give Clive Anderson a go.

Bloggers

I really admire bloggers who can open their hearts to the world (you know who you are), but I just can't do it myself. I know some of the many reasons behind why you do it, but I'm too private. Every time I try to post something really personal it gets indefinitely stuck in my drafts folder.

In person? Not so much. But then I know who I'm talking to 'in person'.

...and yet I'm supposed to be a technology-embracing-internet-friendly geek?! I suppose I am. I'm not really sure any more.

Newer articles  Older articles