Saturday, July 24, 2010
I typed too soon
Yesterday, I mentioned that Google, in a somewhat eccentric move, had added buttons to a menu-bar in Chrome, but that they had refrained from doing so in the Mac version, for fear of Jobs' tablet-y vengeance. Well, it turns out that they were just running late:
Steve is selecting his iPad as we speak. A 3G one, probably; they're marginally heavier.
Steve is selecting his iPad as we speak. A 3G one, probably; they're marginally heavier.
Wednesday, July 21, 2010
New innovations in peculiar UI design from Google
From the latest dev version of Google Chrome for Linux:
What is this, Google?! I hope that this is merely a brief experiment which will go away soon! Madness.
Fortunately, the dev version for MacOS is untouched. I say fortunately, because this is the sort of Apple HIG violation which causes Steve Jobs to personally come to your home and beat you to death with an iPad.
What is this, Google?! I hope that this is merely a brief experiment which will go away soon! Madness.
Fortunately, the dev version for MacOS is untouched. I say fortunately, because this is the sort of Apple HIG violation which causes Steve Jobs to personally come to your home and beat you to death with an iPad.
Creepy...
At the moment in America, there is a sort of latter-day McCarthyist witchhunt going on relating to journalists who dared have an email list without inviting the far-right press.
On a Facebook post listing these terrible, awful people:
First, this business of "You aren't a real [whatever] because you don't agree precisely with my ideologies" is deeply disturbing and unpleasant. But really, Reich?
On a Facebook post listing these terrible, awful people:
First, this business of "You aren't a real [whatever] because you don't agree precisely with my ideologies" is deeply disturbing and unpleasant. But really, Reich?
Flash - aaaa-aaaa - he'll save every one of SEGMENTATION FAULT
Much has been said, lately, in great and tedious detail, about how terrible it is that Flash, present on every other smartphone (for values of 'every other smartphone' meaning 'the Nexus One') is not available on the iPhone, due to Steve Jobs' unspeakable cruelty. But what of the other end, that place where little Flash movies come from? That is, what of Adobe's Flash creation tools?
First, it is important to understand what these tools are. There are two of them, Flash Professional, theoretically a fully-integrated development environment, and Flash Builder, the 600 euro Eclipse plugin formerly known as Flex Builder. In practice, of course, Flash Professional is not really a fully-integrated environment; while you can draw vector graphics and write Actionscript (a strange Java ripoff, with a secondary prototype-y alternate-world OO system stolen from Javascript) in it, no-one actually does. It is, in practice, a system for taking vector graphics produced in Illustrator or whatever, possibly animating them, manipulating them modestly, and packaging them in a format agreeable to Flash Builder.
Flash Builder is a reasonable Eclipse plugin; nothing special, and not a patch on, say, PyDev, or the C++ one, but not terrible. Flash Professional, on the other hand... Well, where to start?
First, the user interface is deranged, and getting more deranged; it has gotten noticeably worse from CS4 to CS5. There is a whole blog devoted to the topic of how mad Adobe interfaces are, and Flash is one of the more egregious examples. Adobe appears to be currently in the process of replacing normal, sensible UI elements with crazy UI elements that they have made themselves. While these are (usually) the same across the Windows and Mac versions, they are highly inconsistent, messy, and pointless. They don't behave like proper UI elements, they have ugly font rendering, and ugh, they're just terrible. Look at this nonsense. All of this is, for now, in a state of flux; maybe a window will have proper UI elements, and then maybe it will have the special broken Adobe ones. A selection of wonderful Flash things, stolen from the Adobe Gripes blog.
But that's just UI, right? Admittedly, one might think that UI would be slightly important to a company who specialises in design tools, but we can live with it. It should, by the way, be emphasised that these fake controls don't just look crap, they feel crap, too. They are extremely tedious and unpleasant to use.
Ah, if only the problems stopped at UI. Flash is also, well, fragile. Importing a Flash CS4 file into Flash CS5 is taking your life in your hands. Exporting a Flash CS4 file from CS5 is a triumph of optimism over experience. Undo will sometimes fail to, well, undo, instead changing things to a state which Flash presumably believes was the last state, but which is actually a new one that it has made up. Flash crashes. A lot. Particularly when saving (hence the post title), which is especially delightful. Saving can take a while anyway, so you try to avoid doing it too much, but then there's that horrible gut-wrenching moment, when you go to save and it explodes. Ugh.
As far as I can see, once Microsoft can be bothered to modernise IE a bit, and someone makes a Flash Professional-alike tool for making vector animations suitable for use in HTML5, Flash is basically doomed. And not a moment too soon.
Bonus: Adobe's amazing Inspire magazine (this month is the Flash issue!). It's just like a website, only it's one giant Flash movie so the fonts are extra-ugly and scrolling doesn't work properly and it makes my CPU usage jump to 60%. And Adobe professes to be proud of this abomination. It makes you wonder, really, is this just a public face, or do Adobe really not realise that this stuff is just this side of acceptable for an expensive, high-profile commercial product which they claim to be the best thing since sliced bread?
First, it is important to understand what these tools are. There are two of them, Flash Professional, theoretically a fully-integrated development environment, and Flash Builder, the 600 euro Eclipse plugin formerly known as Flex Builder. In practice, of course, Flash Professional is not really a fully-integrated environment; while you can draw vector graphics and write Actionscript (a strange Java ripoff, with a secondary prototype-y alternate-world OO system stolen from Javascript) in it, no-one actually does. It is, in practice, a system for taking vector graphics produced in Illustrator or whatever, possibly animating them, manipulating them modestly, and packaging them in a format agreeable to Flash Builder.
![]() |
| Let the last line be a warning to you all |
Flash Builder is a reasonable Eclipse plugin; nothing special, and not a patch on, say, PyDev, or the C++ one, but not terrible. Flash Professional, on the other hand... Well, where to start?
![]() |
| State-of-the-art UI design |
![]() |
| Oh, well, ah, fine, then |
![]() |
| Adobe, having invented PostScript, has no need to prove itself further in the typography stakes. 'p ackage'. |
![]() |
| Native UIs are for lesser applications, not for WONDERFUL FLASH. Note that the dotted underline means 'you can edit this' |
![]() |
| This is what comes of rendering your own fake scrollbars |
![]() |
| Look carefully at the disabled radio buttons. Note that they are made by superimposing semi-transparent squares. Argh. |
But that's just UI, right? Admittedly, one might think that UI would be slightly important to a company who specialises in design tools, but we can live with it. It should, by the way, be emphasised that these fake controls don't just look crap, they feel crap, too. They are extremely tedious and unpleasant to use.
Ah, if only the problems stopped at UI. Flash is also, well, fragile. Importing a Flash CS4 file into Flash CS5 is taking your life in your hands. Exporting a Flash CS4 file from CS5 is a triumph of optimism over experience. Undo will sometimes fail to, well, undo, instead changing things to a state which Flash presumably believes was the last state, but which is actually a new one that it has made up. Flash crashes. A lot. Particularly when saving (hence the post title), which is especially delightful. Saving can take a while anyway, so you try to avoid doing it too much, but then there's that horrible gut-wrenching moment, when you go to save and it explodes. Ugh.
As far as I can see, once Microsoft can be bothered to modernise IE a bit, and someone makes a Flash Professional-alike tool for making vector animations suitable for use in HTML5, Flash is basically doomed. And not a moment too soon.
Bonus: Adobe's amazing Inspire magazine (this month is the Flash issue!). It's just like a website, only it's one giant Flash movie so the fonts are extra-ugly and scrolling doesn't work properly and it makes my CPU usage jump to 60%. And Adobe professes to be proud of this abomination. It makes you wonder, really, is this just a public face, or do Adobe really not realise that this stuff is just this side of acceptable for an expensive, high-profile commercial product which they claim to be the best thing since sliced bread?
Tuesday, July 20, 2010
As usual, demise of Apple greatly exaggerated
Apple beat earnings predictions today, as it always does, despite the usual cries of "this time, it's going to be a disaster." What a shock.
Monday, July 19, 2010
Sunday, July 18, 2010
Olive oil is serious business
On the subject of hazelnut and sunflower oil passed off as olive oil in Italy:
However, by early 1992 Ribatti and his associates were under investigation by the Guardia di Finanza, the Finance Ministry’s military-police force. One officer, wearing a miniature video camera on his tie, posed as a waiter at a lunch hosted by Ribatti at the Grand Hotel
.So, remember, don't mess with the olive oil, or military-police-tax auditors will come after you with their tie-cameras.
A minor mystery, resolved
A while back, I was buying spices in Lidl. And I was surprised that, while they had just about everything else, they didn't have cumin. They did have caraway, a fairly obscure spice which is related to, and looks almost identical to, cumin.
Anyway, tonight I was browsing Wikipedia pages about spices (as you do), and discovered that, in many central European languages, the words for cumin and caraway are very similar, and frequently cross over in translation. So the stuff I saw in Lidl, a German shop, probably was cumin.
I realise that this is probably boring and obscure even by the standards of my normal blog entries, but this sort of thing interests me.
Anyway, tonight I was browsing Wikipedia pages about spices (as you do), and discovered that, in many central European languages, the words for cumin and caraway are very similar, and frequently cross over in translation. So the stuff I saw in Lidl, a German shop, probably was cumin.
I realise that this is probably boring and obscure even by the standards of my normal blog entries, but this sort of thing interests me.
Exhaustion
Long, irritating week. I felt that I worked a lot, but didn't really get all that much done, which is always annoying. Nice to have the weekend off. I'm unpleasantly aware that I've been snappy and unpleasant with people...
Oh, well, I'm planning to take a week or so off in September (this will be the first time I've taken time off work since finishing college three years ago, which is slightly ridiculous); I can last til then. :)
Oh, well, I'm planning to take a week or so off in September (this will be the first time I've taken time off work since finishing college three years ago, which is slightly ridiculous); I can last til then. :)
Wednesday, July 14, 2010
Random picture dump
Odd pictures I have accumulated:
Lucozade. Now a sex aid.
Note that a picture caption has escaped into Google Finance front-page news.
BBC - for all your condom size news. The curiously French complaint, by the way, was a made-up disease called Heavy Legs that they have in France.
Trinity erected a new building in roughly three days, just to check if anyone was paying attention.
Google are apparently concerned that their error messages are not exciting enough, so have decided to cause your computer to explode.
No cat middle-men!
Unfortunately, St Paul had an unchecked array bound. Jesus' problem was far simpler; no-one had bothered to change the default password.
Apparently, Google has decreed that I'm into BDSM! Actually, I had just written an email about a slave database, but it's still not great targeting.
This was the month with all the snow and cancelled trains, mind you. I do not think that reliability means what Irish Rail think it means.
Microsoft's TechNet website is very classy, with only the bare minimum of ads...
Look, if Microsoft can't advertise web hosting on this important article about Windows 95, it won't be able to afford to make a new tablet. Stop complaining.
More mad stuff from Adobe
This is Adobe's application updater (note the fetching fake UI, rendered in GLORIOUS FLASH):
Would you like to update Flash Professional? What's in the update? Well, you wouldn't want to bother yourself with that, surely? Oh, okay, we'll give you one and a quarter lines of the message as a teaser.
Of course, Adobe Application Manager isn't the same thing as Adobe Updater. Here is an Adobe Updater dialog:
Would you like to update Flash Professional? What's in the update? Well, you wouldn't want to bother yourself with that, surely? Oh, okay, we'll give you one and a quarter lines of the message as a teaser.
Of course, Adobe Application Manager isn't the same thing as Adobe Updater. Here is an Adobe Updater dialog:
Do you understand that message? If you do, Adobe would like to hear from you, as the last ten tech writers mysteriously fled to Australia.
Sunday, July 4, 2010
Wikipedia, in an indexed BDB database
This is a script for taking one of the large Wikipedia dump files (available here) and putting it into a BDB database, with the keys being the names of articles, and the values being the XML description of the articles. I used the page-articles.xml.bz2 file, which contains all current articles, redirects and disambiguation pages, but not history or user pages. It's a 5.6GB bzip2-ed XML file. It contains just under 10 million pages.
I won't pretend that the script is any good; in fact it's extremely hacky. It does the job, though. Article XML descriptions are gzipped (because gzip support is easier to find than bzip2 support, and because bzip2 compression is extremely slow). Using the pages-articles.xml file, a 20GB BDB database is created. On an oldish Core 2 Duo Macbook Pro, taking the wiki data from the internal drive and writing to a BDB file on an external drive, the process took just under 12 hours (using a 2GB cache pool).
To run this, you'll need the following. First, a recent version of Python; I used Python 2.6. BDB itself, of course. PyBSDDB (available here); low-level Python bindings for BDB. Finally, lxml.
A few notes. First, the script uses a 2GB memory cache pool. If you don't have that much spare RAM, you can reduce that; just modify this line:
The script is single-threaded, though it would be relatively easy to make a multithreaded version; as most of the work is in C code, the Python Global Interpreter Lock should not be a huge issue. There are a number of different approaches you could take to doing this sort of thing; I did consider simply storing offsets to articles as values, but, while bzip2 does support seeking within a file, it's slow enough to be a problem over very big files like this. You could, of course, also use something other than BDB.
If you are using a small cache pool, it may be worth periodically closing and re-opening the database and database environment handlers; this causes the cache to be flushed to disk and Oracle recommends it while doing large bulk imports.
To read articles, given an article name, use something like this:
You can then parse the resulting XML document.
Unfortunately, I can't make the BDB file available; I simply don't have the facilities to host a 20GB file. You can make one yourself, though, using the provided script and Wikipedia dumps.
And as to why I'd want to do this strange thing, precisely, well, stay tuned...
I won't pretend that the script is any good; in fact it's extremely hacky. It does the job, though. Article XML descriptions are gzipped (because gzip support is easier to find than bzip2 support, and because bzip2 compression is extremely slow). Using the pages-articles.xml file, a 20GB BDB database is created. On an oldish Core 2 Duo Macbook Pro, taking the wiki data from the internal drive and writing to a BDB file on an external drive, the process took just under 12 hours (using a 2GB cache pool).
To run this, you'll need the following. First, a recent version of Python; I used Python 2.6. BDB itself, of course. PyBSDDB (available here); low-level Python bindings for BDB. Finally, lxml.
A few notes. First, the script uses a 2GB memory cache pool. If you don't have that much spare RAM, you can reduce that; just modify this line:
a.set_cachesize(2, 0)
The script is single-threaded, though it would be relatively easy to make a multithreaded version; as most of the work is in C code, the Python Global Interpreter Lock should not be a huge issue. There are a number of different approaches you could take to doing this sort of thing; I did consider simply storing offsets to articles as values, but, while bzip2 does support seeking within a file, it's slow enough to be a problem over very big files like this. You could, of course, also use something other than BDB.
If you are using a small cache pool, it may be worth periodically closing and re-opening the database and database environment handlers; this causes the cache to be flushed to disk and Oracle recommends it while doing large bulk imports.
To read articles, given an article name, use something like this:
def lookup(name): gzdata = b.get(name) gzf = GzipFile(fileobj=StringIO(gzdata)) return gzf.read()
You can then parse the resulting XML document.
Unfortunately, I can't make the BDB file available; I simply don't have the facilities to host a 20GB file. You can make one yourself, though, using the provided script and Wikipedia dumps.
And as to why I'd want to do this strange thing, precisely, well, stay tuned...
Subscribe to:
Posts (Atom)



























