An example Google Docs spreadsheet with dynamic Amazon pricing

I posted about dynamic Amazon prices in Google Docs spreadsheets before.

Here is a complete example of a shopping list created as a Google Docs spreadsheet, that pulls its prices dynamically from This is a list for my forthcoming new computer, that I’ll be hopefully putting together in the next couple of months.

Here’s the link. You can make your own copies from File->Make a copy… And with your own copy, you can modify it to be your own perfect shopping list for whatever. And this way you can actually mix dynamic prices from different webshops. I’ve added example scripts for two stores, that I will actually be using to get many of the stuff cheaper than from Amazon.

It’s not easy or totally automatic to create and modify this kind of spreadsheet, but once you understand how it works (and that each store requires its own script), you’ll be able to make budgets that are dynamic. For me this was a must have, as I’ll be making my purchase from several different webstores, and needed to find a way to compare their prices on a daily basis. Atleast Amazon prices tend to change all the time, and the price that is updated dynamically is not actually the cheapest Amazon price. There might be cheaper Amazon offers in the small print, but I haven’t yet looked for a way to fetch those prices dynamically.

And yes. My links in the spreadsheet contain sneaky affiliate links, that might give me some money, but I doubt that will actually happen. Feel free to replace the links with any product page links.

My wish list for the next Apple Cinema Display (2013) and hoping for a Dell U2714H

I sincerely hope that Apple would release a new 2560×1440 display with the following specs, so I could buy Apple products again. (At the moment I can’t buy any of their products, as there is something wrong (in my opinion) in each of them.) So here’s a wish list:

1. 2560×1440 resolution IPS or similar panel. (Because 4k is going to be too expensive for me.)

2. Matte or semi-glossy screen. I’m not buying glossy glass panels, ever. I’ve used them on iMacs, and I’ve had enough. I’m sure Apple can come up with a cool way to do matte screens again. Some kind of frameless design would be nice!

3. 27 or preferably 30-32 inch. The bigger pixels wouldn’t bother me…

4. It’s not going to happen, but I’d still hope for a wide gamut display supporting sRGB, Adobe RGB and Rec.709 colour spaces. That would give the screen some professional appeal in photography and filmmaking.

I believe there will never be such a display from Apple. So, I have my next hope on Dell. Like I said in my previous post where I bashed each 27 inch monitor out there, I don’t like the design of the Dell displays. Well, until now. They are having a much better design on this years models, and they don’t look like Compaq Presarios from the 90’s. But, they haven’t yet released the Ultrasharp series with this new design. Only the P-series, which lacks the wide gamuts and 2560×1440 resolution. Some have speculated that the U2713H is not due for an update this year, so we might not see a U2714H this year. But I’m surely hoping there will be such a model. If it gets favourable reviews in or, that would be my next monitor.

Here’s a sneak peek from the U2414H (the 24 inch model, supposedly coming without wide gamut later this year):

Dell U2414 front

And the clean back side of the P2714H (with 1920×1080 resolution):
Dell P2714H

Apple Thunderbolt 4K Display (speculation)

I’m waiting for Apple to unveil the pricing and availability for the new Mac Pro. I most probably will not be getting it, unless it is really cheap (like 2000€ for a reasonably fast version). I don’t really like the design of it, I don’t like the expandability. You have to hook everything with thunderbolt, and it will be a mess.

And the old Mac Pro design was much nicer. They should have iterated on that to make something like the Bitfenix Prodigy or even use the G4 Cube design or something like that.

But, it is still interesting and will probably be a very good computer for those who can afford it.

One interesting thing about it is displays. Apple claims those dual AMD GPUs can power three 4k displays. But the current Apple Thunderbolt Display is not a 4k display. ??!!?!?

LG.Display, which makes the panels used in Apple Thunderbolt Displays just said a few days ago, that they will be making a true 4k panel (4096×2160 instead of the UHD 3840×2160 found on other “4K”-panels). I’m sure Apple will also concider Sharp’s IGZO panel, but this LG.Display’s true 4k panel sounds like it was commissioned by Apple for their upcoming 4k displays. The LG.Display’s panel will be 31″ or 78 cm. Which is nice.

The new Mac Pro needs a 4k display made by Apple, and I’m hopeful (or sure) that they will announce it at the same time as the Mac Pro’s pricing and other details are given.

I’m hoping they get rid of the front glass at the same time, or at least give that as an option. Otherwise the Apple Thunderbolt 4K Display will be useless to me. (Oh, did I mention I won’t be able to afford it anyway… My budget for a screen is 999€ max.)

I was wrong. Apple did not reveal a new 4k display with the new Mac Pro. But they did release the pricing for the Mac Pro, and the base model is 3100€. Too much for me, but I’m sure a lot of people can afford it.

Why do all “professional” computer displays look awful?

I’ve been doing some research on the web about buying a new desktop computer and a display for it. I’ve been using a 2005 first generation white Macbook as my primary computer for the last eight years (and it’s still going strong, despite the display flickering quite often and the second battery is not doing so great…).

Just for the record (and bragging): I use it mostly with Linux for programming and OS X for graphics and music, and there’s also Windows 7, but I only use it to make cross platform programming.

So as I’m mostly using my laptop as a desktop anyway, I’d like my next computer to be a desktop with a big screen (instead of the 13.3 inch screen on the laptop). I’ve been looking for the 27 inch displays that are on the market. They’re slightly out of my price range, but I’m the kind of a person who’ll use that same display for hopefully 10 years or more, if it lasts that long. (I still have my PanaSync S70 as a second monitor, which I bought in 1998.)

But why do all 27 inch screens either lack features or if they have the features, they are really really ugly?

What I want in a monitor is a combination of really good design (because I have to look at it every day, and if I had clients, they would too) and the right features. I do films and colour grading very seriously. I used to do it professionally too…

I’ve now learned that even wide gamut monitors would not help me, because most of them just have settings for sRGB and Adobe RGB. What I’d really need with video colours is Rec.709 colour space. That is funny, because any cheap HDTV kind of supports it (probably not accurately, but that’s the only colour space they’re showing.) If I’d want a computer monitor with support for Rec.709, I’d have to pay more than 2000€ for it. (Maybe the Eizo CG276 or the HP DreamColor). But I’m an adventurous person, and always so out of money, that I’d be willing to try out calibrating an Adobe RGB monitor into kind of supporting Rec.709.

So, I’m not demanding Rec.709 from my list here, because I can’t afford them anyway. My demands are:
1. good design
2. wide gamut (Adobe RGB or Rec.709)
3. no PWM (I’ve heard the internet rumour that Pulse Width Modulation is used to control brightness on many monitors, and it basically flickers the screen at a very high rate, and that might cause problems with us sensitive people… So, I don’t want it, even though I have no first hand evidence of this happening.)
4. no glossy surface, no strong antiglare treatment either. I want my screen semi-glossy or semi-matte.

Here’s a quick rundown on several candidates for my new display, and their plusses and minuses, which eventually lead to the conclusion, that I’m not buying any of them! None of them meet the requirements. Let’s hope that the next generation of 4K and UHD displays will fix these issues…

The Apple Thunderbolt Display
is a very nice looking display, but the features are a joke with its ultra glossy glass screen and lack of input options. Even the very short thunderbolt wire is not detachable, so you could have a longer one. It is white-led backlit, so only sRGB.
+ design
– too glossy glass
– only sRGB
– no inputs, no HDMI, no DVI, only displayport or thunderbolt, might be enough still, if the cable was detachable

Here’s pictures of an iMac to show the glossy glass in a windowed environment.
Too many reflections on these iMacs

The LG EA83
is an almost bearable looking monitor. The design on the front is almost nice, and the screen is semi-glossy and supports Adobe RGB. The bad rumours of the internet said it has PWM. And the backside has a messy design with that strange holder for the power supply and those ugly blue usb-ports. (I really don’t need my USB3 ports to be blue. Please stop with that, everybody who is doing it.)
+ Adobe RGB
+ 10 bit colour (I’m under the impression that no NVidia consumer GPU supports 10-bit colours. Please, say it ain’t so.)
+ good design on the front
– blue USB ports and power supply holder

Ugly blue USB ports

Samsung S27B971
(the new matte one)
+ glossy glass got removed, and is now semi-glossy matte, more matte than LG EA83
The stand doesn’t have that many options, but it seems ok, I don’t really need pivot
+ good design, but not great design. Bearable design.
– only sRGB
+ no PWM
This is the monitor that is closest to getting bought by me.

A bit UFO, but Okayish

Dell U2713WH and Dell U2713H 27” sRGB/AdobeRGB
— really bad design, looks like Compaq Presario PC from the early 2000
The Dell U2711 really looked much better with its straight lines. It didn’t look good, but it still was much better, and I might even concider it…
– integrated power supply might buzz, depending on unit, says the internet
– ugly Dell logo on the front, I don’t like Dell… 🙂
+ Adobe RGB on the 2713H.
+ no PWM (I’m not sure).

Compaq Presario

Asus Pqsomething 27”
– ugly PC design

Fujitsu P27T-7
– white casing isn’t properly white, but some sort of light grey, might still be ok
+ good design, but
– looks a bit big
+ great stand
+ 0-watt standby, if it works (on some review unit it didn’t)
– fujitsu logo on the top feels strange, logos on the back are OK
+- I like fujitsu, but do they really know how to calibrate displays?

Fujitsu P27T-7

HP ZR2740W
– all HP displays seem to have a really horrible PC design, just boring

EIZO (most of the same things apply to NEC)
– your designs are horrible, I just hate the rounded stand bases. The transformers kind of looks of the stand and the back are really really strange. Why don’t you do clean design EIZO?
– agressive anti-grain coating
+ Adobe RGB on the 1200€ models and Rec.709 on the 2000+€ models…
– but they’re too expensive for me.
+ I really want to like EIZO. Maybe if they’d change their logo from that RGB thing to something else first…


So that’s it. I’m not buying any of those… And it’s a bit boring for me. I hope we’ll get a monitor with all of these 4 issues done right in the future.

I basically want a monitor with

1. the design of the Apple Thunderbolt display
2. 30 to 32 inch (but 27 is ok too.)
3. 2550×1440 or bigger. 4k or UHD would be nice, but probably too expensive for me…
4. no PWM, like Samsung S27B971 or Apple displays.
5. Adobe RGB, so make it wide gamut with those GB-LEDs, or whatever they are. And while you’re at it, add Rec.709 preset and calibrate individually in factory, like Samsung S27B971 or Dell U2713.
6. semi glossy like LG EA83 or semi matte like Samsung S27B971. NO glass.
7. external power supply is ok, but make it look nice like Apple does, and if you can’t do that, don’t do like LG EA83 has done with their power supply holder.

My writing really sucks, this is just a burst of text with no editing. I hope it helps someone.

Importing prices from Amazon into a Google Docs spreadsheet

I searched the internets for this specific piece of Google Docs spreadsheet code. And here it is. I wondered how I could create a dynamic shopping list kind of spreadsheet for my new computer that I might afford at some point in my life. The dynamics here would be the ability to get the pricing for all the things in the list from Amazon websites every time I open the spreadsheet. Here’s how I got it working:

This is a way to get dynamic pricing info into a Google Docs spreadsheet from in euros… and below that also how to get it from in dollars.

=value(substitute(replace(importXml("", "//b[@class='priceLarge']"), 1, 4, ""),",","."))

The function line starts with a =, but as I have just learned you put that only to the beginning of the line, not in front of each function…

If we start from the inside, we have the most important function importXml(“url”, “xpath thing”). It is used to get the actual data from the Amazon website as text. In this case we have the url of a certain pricy and almost well designed, but still lacking monitor.

The xpath thing, in this case is “//b[@class=’priceLarge’]”, where it gets the data from the html/xml file from a line which has tags like this:

<b class="priceLarge">EUR 806,99</b>

So, there’s where the letters “b”, and “class” come from. And “priceLarge” is the name of the class…

(If you’d have some other website with other tags you can add the like this: “//td/b[@class=’priceLarge’]”, which would also include the “td” tag that is before the “b” tag…)

That will get you the price as text, but we still need to convert it to a number. We do that with first using the replace(“some text”, startnum from 1, nro letters, “replacing text”) function, to get rid of the “EUR ” letters.

Then we still have the european standard decimal comma that didn’t work with my version of Google Docs (this might still work for you). We use substitute(“text,withcomma”, “whatyouwanttoreplace”, “replace it with the dot”) function to change the comma to a dot.

Lastly the value(somenumberwhichistext) will change our text into a real number, so that it can be used to checking how much our shopping list will cost.


For we don’t need to use the replace and substitute functions. Google Docs even undestands the raw output of importXml( price) as a number with a dollar sign in front of it. But if you want to get rid of the dollar sign, you can just use value() and that will get rid of it. Like this:

=value(importXml("", "//b[@class='priceLarge']"))

That will give you the price of the Nokia N9 64GB black edition. (That’s my phone! But I got it used for much cheaper.)

It said somewhere, that there’s a limit of 50 importXmls in Google Docs. Haven’t tested that, yet.

Hope this helps.

Here’s a new post about this subject. The post has an example spreadsheet.

QtCreator 4.7 Cube OpenGL ES 2.0 example / And how to get it running on the N9 (MeeGo-Harmattan)

This is something like a note to self, because this is the second time I had to figure this one out.

So, yes, I eventually bought the N9. It is black with 64GB. I got it used and over two years after it was initially available. I felt a bit bad, because my old phone was working great, but then again my old phone went into good use now, to replace a slightly broken phone somewhere else in the galaxy.

Ok. This was supposed to be a post about how to get that Cube OpenGL ES 2.0 example running on the N9.

The problem seems to be that the shaders don’t get linked correctly. This was because the QGLShaderProgram object gets created too early. In the constructor for the class MainWindow, remove the line that creates a new QGLShaderProgram.

Like this:

MainWidget::MainWidget(QWidget *parent) :
timer(new QBasicTimer),
//program(new QGLShaderProgram), //so remove this line
geometries(new GeometryEngine)

And then insert the creation line into the initShaders method:

void MainWidget::initShaders()

program = new QGLShaderProgram();

// Overriding system locale until shaders are compiled
setlocale(LC_NUMERIC, "C");

// Compiling vertex shader
if (!program->addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))


That should get the example running with QtCreator 4.7 and the N9, as long as you change your project build/run settings to the N9 thing you’ve created earlier…

A link to a great post comparing garbage collection and manual memory management

Here’s a great post I found by reading planet D:
Real World Comparison, GC vs. Manual Memory Management

It mostly proves more scientifically what was my gut feeling of garbage collection (GC) (as it was implemented in the D programming language) versus manual memory management. I tried doing OpenGL and realtime video stuff with D, and I really got very productive with the D syntax. But the thing that got in my way in the end, was the GC. When I had many objects, my program started to stutter. And that’s when I started to think it was the GC doing it. I did everything I could think of to remedy the situation, but I found no other solution than to go back to C++, and it’s tested and tried, silly but working tools.

I would love a great language that had something like D syntax, the performance and manual memory management of C++. (Oh, and I think there should be a way to distribute software in source form for binary compatibility with the code being obfuscated, for the closed source people, but that’s another issue.)
I don’t think that any of the languages currently available do it the right way. Vala (or Genie) comes close, but I still think that the best language for real life work currently is C++. Maybe a good IDE might help me, we’ll see.

I used to write about programming

Ok, I admit it. I used to write a blog about programming. Posted there about once a year, just like in here. But as I think this is a better name for this blog, and I don’t want to keep two blogs, I’ll just start writing about (almost) everything in here.

So, possibly more posts coming about programming, open source, closed source, C++, OpenGL, user interfaces, sometimes a post about the nice things I had in the D programming language and the nice/bad things that I now have, when I’m back with C++. Stay tuned, once a year!

White N9

So, now there’s a white N9 coming! It’s probably the best looking device ever.

White N9

How are white plastics today? Do they still get yellow in 10 years? I think my white Macbook is already starting to show some shades of yellow after 5 years… And as the N9 is the only phone I’m going to get in the next 5 to 7 years (Hmm, will it really last that long… I’m going to have to try –), I don’t want it to eventually end up yellow.

I think the white is the best colour, but I have my doubts if it will stay white… For those people who change their phones every two years, it’s not going to be a problem. I also prefer the matte finish on the other colours. Glossy is so … glossy. But the white N9 is still awesome looking I have to admit.

I’m still waiting for the cyan N9 with 64GB.

On Tizen and MeeGo / Bad names vs good names

Intel and Samsung just announced that they’d be developing a new thing called Tizen, instead of MeeGo.
What a way to try to sabotage the launch of the N9. 🙂 It would really be in their own interest if the N9 would succeed, despite all the efforts by Stephen Elop and Nokia to put it down.
I was always really interested in developing for MeeGo and using MeeGo products. It is a great name and a brand, while Tizen is just the most horrible name I’ve heard in a while.

HTML5 is slow, hacky, ugly as a platform and just plain awful.

Hello Intel. You’ve just lost all your credibility. You don’t have any direction. Did you know that when you want to build a platform, you must make a good plan, a good name, and then ship something once per year, and stick to that. You’re pattern seems to be to make a new plan each year, a new name, and not to ship anything. Oh well, at least the N9 is shipping. 🙂

Hello Linux Foundation. Why are you putting your good name into this.

It would have been much better for everyone, if you’d just continue with the MeeGo name, infrastructure and codebase. You could have bolted HTML5 on top of it, for those who really want it. (Who would want it, is beyond me.)

I think I’ll just buy the N9, and hope it lasts for ten years, as it seems there will not be any interesting platforms in the near future.

Just change the name to something decent at least. But that won’t really save you anymore. Your credibility is lost.

I hope that there’ll be some sort of revolt in the MeeGo community and Linux Foundation over this.
I’m still sticking with Linux.

(I’m normally a nice guy, but this insanity just makes me angry…)
I think all this arguing about the N9 not being an actual MeeGo could just end now. I know it could have been called Maemo 6, but as far as I can see the N9 is the only MeeGo phone to ship. That makes it the most MeeGo of them all. And I always preferred .deb packages and Maemo’s Debian roots anyway!