Wednesday, April 27, 2011

Liikennerevoluutio osa 2

( About a follow-up meeting of Sitra lead Transport Revolution program starting in Finland. )

Kirjoitin joulukuussa tämän blogiin Sitran Liikennerevoluution aloitustapahtumasta.

Tänään pidettiin samassa tilassa hankkeen toinen julkinen tapahtuma, jossa kerrottiin mitä tässä välillä oli erinäisissä palavereissa saatu aikaan.

Minulla on yritys, joka mitä suurimmassa määrin pyrkii liikennevallankumouksen toteuttamiseen. Sitä taustaa vasten on ristiriitaista katsoa Suomen vakiintuneiden instituutioiden (ministeriöt, Tekes, Sitra, Trafi..) pyristelyä vallankumouksen alulle saattamiseksi. Komeat puitteet, hienot banderollit ja tilaisuutta varten vuokrattu yksityisratikka eivät vain sovi kuvaani siitä, mitä liikennevallankumous (tai mikään vallankumous) olisi. Mutta ehkä tuossa on kyse finesseistä ja sanojen vähän väärästä käytöstä. Ehkä se, mitä Suomi nimenomaan tarvitsee on kabinettivallankumous, mitä sanaa alkuperäisessä blogissakin käytin. Ehkä se on oikea vallankumous tai sitten edellytys sen suuremman tapahtumiselle.

Oli miten oli, esityksessä puhutut asiat olivat pääosin hyviä ja aplodit ansaittuja. Ainoastaan WSP:n edustaja, toimitusjohtaja Matti Mannonen mainitsi liikennepalvelujen ennakoitavuuden merkityksestä. Että jos junat eivät ole ajallaan, on ihan sama, miten nopeasti ne kulkevat. Olen samaa mieltä, myös HSL:n bussien osalta. Itse lisäisin hänen antiinsa palvelujen ylläpidettävyyden ja vikasietoisuuden (resilience), jotka ovat ennakoitavuuden edellytyksiä.

Tavallaan on olo, että edelleen puhuttiin heinänseipäistä. Hanke tarvitsee konkretiaa. Ainoastaan HSL:n Ville Lehmuskoski piti innokkaan, jalat maassa -tasoisen esityksen HSL:n Metropol-hankkeesta (mutta se olikin virallisen ohjelman ulkopuolelta). Kyseessä näyttää olevan tilaustyyppinen, vaihtuvataksainen ja skaalautuva liikennepalvelu, joka toimii jossain taksien ja palvelubussien välimaastossa (ehkä korvaten ne molemmat tai toimien yhteisenä portaalina niiden tilaamiseen). Vaikuttaa hyvältä, on mielestäni menestys jos taksiautoilijat saadaan mukaan tuohon toimintaan.

En oikein tiedä, ketä vastaan tämä vallankumous on. Sanat, joita ei haluta ovat sellaisia kuin "siilo" ja "siltarumpu". Justjoo. Vaikuttaa enemmän politiikan sisäiseltä organisaatiouudistukselta kuin varsinaiselta päivittäiseen elämäämme vaikuttavalta vallankumoukselta.

Aika näyttää. Jos olisin pörssianalyytikko laittaisin statukseksi "seuraa".

Ohessa joitain ohjelmaan tekemiäni merkintöjä mielestäni arvokkaista sutkauksista:

- WSP, Matti Mannonen: ".. olemme saapuneet maailmaan, jossa saavutetuista eduista voidaan ja tulee luopua."
- RYM, Ari Ahonen: ".. että saadaan liikenne positiiviseksi keskustelun kohteeksi."
- Tivit, Reijo Paananen: "Tärkeintä on lähteä liikkeelle."
- Logica, Sami Sahala: "Liikkumisen 2.0"    (huom: ei liikenne 2.0)
- Hannele Pokka: "Pilotteja tarvittaisiin aika noppeesti."

Suomessa käytetään kuulemma vuodessa 20 miljardia euroa "matkoihin ja kuljetuksiin" (tuo tekee kymmenisen euroa *päivässä* jokaista kansalaista kohti). Voitaisiinko ottaa tavoitteeksi esim. puolittaa tuo rahasumma, eli hoitaa koko kansakunnan liikenne puolta halvemmalla (tai vastaavasti liikuttaa puolta vähemmän, tai jotain siltä väliltä).

Tilaisuudessa pyöriteltiin 10% vähennystä budjettipuolen numeroihin. Omasta mielestäni se ei riitä vallankumouksen käyttöön sanastossa, mutta kertonee tämän hetken uskottavuustasosta Suomessa. Jos sanottaisiin, että pyritään puolittamaan, ei hanketta otettaisi ehkä tosissaan. Tällaisia me olemme - ihmiset. Sinä ja minä.

Friday, April 1, 2011

Conditional formatting bug in Numbers

I love Numbers and use it daily.

However, there is one annoying bug that I've put up with for too long. I use conditional formatting in my accounting sheet to show alarting colors "if not equal to cell (reference)". What happens is that copy/pasting such cell does NOT correspondingly update the conditional format reference. All the pasted cells will compare to the original reference.

This is *absolute* behaviour usually marked as "$A$1" (the dollars) in spreadsheets. However, the conditional formatting UI does not show $'s and therefore indicates the reference is relative. Actually, it does not *allow* changing the type of reference (which imho it should).

Usage case for relative reference in conditional formatting (this is how I use it):

- You have sums from the spreadsheet and below them "known right" sums i.e. from bank slips. If the two sums are not the same, mark with red bold color. Condition: "if not equal to (cell above)".

Usage case for absolute reference in conditional formatting (I don't use this):

- You have a spreadsheet-wide setting for some threshold value, i.e. to mark expenses higher than it. Expense cells have "if higher than (absolute cell)" to highlight the ones you should focus on.

I do hope Apple fixes this. I've reported it to them today.

Wednesday, March 2, 2011

Retina display - also to the desktop. Please!

iPhone 4 has spoiled us (though I still have the 3GS version).

One part of Apple's launch advertising was saying how the retina display has pixels so small you cannot see them by naked eye.

NOW, that only made me realize I don't get that on desktop. Thanks a lot. :( I'm now acutely aware of how fuzzy the on-screen fonts are even on a state of the art monitor (typing this on a 27" Cinema Display that's anyways way too big for my needs).

I might return this monitor - don't envy just yet...

What I really would like is a 24-25 inch non-cinema (not 16:9 ratio) monitor that shows PDFs, program code and any stuff with "retina quality" crispness.

There is none, it seems. Advice on the web seems to point at viewing from a longer distance. But I'm used to being rather close to the display. Why, oh why. Apple please make a "retina display" experience. Make it soon. :)

Addendum:

Seems Apple may be doing exactly this.

"The developer build of Lion released this week came with fresh HiDPI mode references,
suggesting that Apple may expect 200ppi+ laptop and desktop displays to become available during Lion’s lifetime."


Now, a 4:1 resolution enhancement of Cinema display would make it 5120 x 2880 resolution. I think that's way beyond what DisplayPort can handle. My guess is these new displays (if/when they arrive) will use the just released Thunderbolt connection directly.

Addendum 2

I continued wondering how the Thunderbolt technology can affect display markets, and how a 5000x2000 pixel display could be implemented. Here's one way.

Thunderbolt is essentially PCI Express, and such could be used as the bus interface between the CPU and the GPU. The *display* could have the GPU.

This makes tremendous sense since with rising pixel count the data bandwidth between the CPU and the GPU will likely (I haven't calculated specifics) be way smaller than the bandwidth of pushing pixels to the screen. Make the display smart, essentially make it a display adapter card (with a display). And voilá - no PPI limitations to the forecoming future!

Things s.a. font blitting will then happen in the display. And the solution will be compatible with everything - not just OS X - since the concept of a PCI Express display adapter is OS independent. So... when can I get one? :)

Sunday, February 20, 2011

Backing up Boot camp partition with help of iPartition 3 (no WinClone)

Winclone has been the de facto tool for backing up a Boot camp partition. Its website says it's discontinued.

So... I went looking for an alternative way. Setting up Windows 7 (+ Security Essentials + Inventor 2011) is not such a pleasure I would voluntarily look for it (again). So I want to "image" the bootcamp partition somehow.

Ideally, the image would only carry the bytes actually used in the NTFS volume and not be a 1:1 copy of the raw device. So Linux-like bitwise device copy is ruled out.

I was surprised not to find a ready-made solution for this in the otherwise splendid Coriolis iPartition 3 software. But their customer support gave the following advice:

Hi Asko, Thank you for you comments :)
Actually, there is a simple way to do what I believe you wish to do using iPartition and Disk Utility. You can use Disk Utility to create a "sparse disk image" large enough to accommodate your windows partition.
Then, in iPartition, delete any partitions which may have been created in your new disk image then navigate to the windows partition that you wish to back up. Select this partition and chose "Clone..." from the Partition drop-down menu. Set the target disk to your new disk image and hit Go.
You can now unmount this disk image and you will see that the image (.sparseimage) file size is only the size of the files that Windows was using. This is because iPartition recognizes the free space in your partition when performing the clone operation.
We hope that you find this solution useful. If you need any further assistance or have any other issues then please don't hesitate to get in touch.
Kind regards, (person's name removed)

I'm doing that right now, and it seems to work (*knock knock*). I do wish they would build this procedure (or similar) and restoration of Boot camp partition from the backup such created, right into iPartition.

Tuesday, February 15, 2011

Autodesk Inventor would actually fit on 5 (almost 4) DVDs



Autodesk Inventor 2011 Pro comes in a nice, smallish package. Within the package there are 7 (!) installation DVDs and separate Vault Server and "Fusioin technology Preview" discs. This blog entry is about the 7 DVDs.

What is the cost of making a DVD?

- manufacturing
- managing (it's a part in Autodesk's storehouse, somewhere)
- packaging (actually placing those DVDs inside the enclosure + one extra "page" per each 2/3 DVDs)
- shipping
- landfill

This site says the carbon footprint of a DVD is 1.06 pounds (453gCO2). Maybe that includes the enclosure but that is irrelevant, here.

Why am I writing this?

I was *blown* by having a software install from *7* DVDs. Windows takes only 1 (well, two if you count both 32- and 64-bit versions). So I went to see what's inside the DVDs - or how densely they have been packed. Well, they aren't.

If Autodesk reorganized the way they store file on the DVDs, they would be able to fit everything on 5 DVDs (a 28.5% savings). Why not do that?

Here's the numbers (single-sided DVD capacity is 4.7GB):

Disk 1/7: 3.74 GB used
Disk 2/7: 2.38 GB used
Disk 3/7: 3.05 GB used
Disk 4/7: 1.92 GB used
Disk 5/7: 2.19 GB used
Disk 6/7: 3.44 GB used
Disk 7/7: 2.53 GB used

Total: 19.25 GB used (which makes 4.09 fully filled DVDs)

To Autodesk, this might not be much. Peanuts. And they're probably proud to have such a gigantic installation experience (though in practice it's enough to give 4 of the 7 disks - both 32- and 64-bit versions are included). But where this counts is example. If you can slim something down, it should. So I'm saying they give a baddish example.

What's the footprint of a bit - electrical delivery

What they would be keen to point out is that "subscription" customers get an electrical delivery (download service). Right. Where this is good is that the customers can download only the required pieces (those ca. 4 DVDs worth). That's around 12GB with their filling ratio. But also that has a carbon footprint. Let's see.

For this, we need to consider i.e. delivery from California to Finland (my case). There may be 3-4 (or more) network hops on the way. Some calculations I found only include the server electricity usage but that's wrong. The bits need power to move, even if they'd be sent over fiber optics. So the question becomes: "what is the carbon footprint of sending one bit half-way around the world"?

TBD. If you can find a measurable answer to the above question, pls. make a comment. I did not find it.

But I found this article about energy use of data transmissions, saying:
He notes that some large carriers have energy bills approaching $1 billion.

Clearly, there's a roof to how much bits it's "free of charge" to move around. Someone pays the electricity bills. Internet is not free (for the environement).

Use the cloud

What would be interesting if Autodesk wants to further develop the "subscription" model is to employ peer-to-peer technologies. What this helps with is:
- less burden on their own servers
- faster download speed for customers
- lesser carbon footprint (because data is found closer to where it's needed - i.e. a Finnish customer would get the data from others in Finland)

Maybe they already do something like this, buying cloud services from Amazon, Microsoft, Google and other providers. Good, if they do.

What to do?

In summary, I like the AI2011 offering. I do. And it doesn't feel bloated in use, at all. Which makes it even more essential to make also the installation less bloated. Because it can be. I.e. like this:

- One "joined" (both 32- and 64-bit disk) that is used for starting.
- 2 disks for 32-bit Windows version.
- 2 disks for 64-bit Windows version.

The customer would need to give three disks for any AI2011 install. Looking forward to a slim install in AI 2013. Or maybe a torrent. :)

- Asko Kauppi


Thursday, February 10, 2011

Autodesk Inventor 2010 under VMWare Fusion 3.1.2

I'm going to do some work with Autodesk Inventor 2010 during this spring, and thought of documenting the installation experience here, for others to know of.

The full text will need to wait, but I thought to make a few notes of the important pieces, especially since I'm running it under an officially non-supported VMWare Fusion virtualisation. Here goes.

7 DVDs. Whoa. They must have an army building this stuff.

Those disks contain both 32- and 64-bit versions, which partly explains the size. But actually, installation apart, the software doesn't feel too heavy. It's snappy even under virtual machine (running on Mac Mini 2GHz, 4GB, with Windows 7 32-bit and 2GB memory allocated for the virtual machine).

One but. After install AI2011 has the "software graphics" option set. VMWare 3.1.2 can do DirectX9, which is enough for AI2011, so simply tick that option away. Faster. Looks better. Cool. :)

I've noticed sometimes AI2011 opts that switch back, by itself. Maybe it measures performance and as we know, virtual machines can have quirks in that, especially if the software is being running when suspended. So if things work slow, check that corner and untick the box.

Second but (not big, though).

I ordered a 3DConnexion SpaceExplorer "3D mouse" to help orientate within the drawings. The hardware's good and the demos and tutorials work swiftly under VMWare 3.1.2. However, using it under AI2011 is an absolute no-go. It takes a second or so for movements to be registered on screen. Maybe it's the SpaceExplorer AI "drivers" (rather adapters). Maybe it's something else. Clearly the "drivers" have been designed and only tested on rather fast 3D workstations. Makes sense.

Unfortunately the "driver" architecture of this thingy is such that I cannot run them native on OS X and have the device virtualized somehow (like a mouse) onto Windows. It all needs to run there. Maybe it has to do with USB performance. Go figure.

IF VMWare is looking into supporting Autodesk tools as I think they are, they should probably look at the speed issues with this hardware as well.







( One more thing. Untick "enable Mac OS mouse shortcut" boxes in VMWare Fusion Preferences - and use a two-button mouse. Makes Ctrl-clicking work in Windows. )

Addendum:

If you intend to use Inventor from both BootCamp (booting to Windows) and via VMWare Fusion, you will need a "network license" (and a license server somewhere on your network). The local license scheme gets confused by "hardware change". Discussion of this at Autodesk forum.

Monday, January 17, 2011

Nokia Qt licensing (getting started on Windows 7 using Visual C++ 2008 Express edition)

( Addendum: Thanks to Gordon, New Zealand for pointing out that the recipe below won't work for 64-bit Windows 7 host - I had a 32-bit system. There, it seems, one must compile Qt from source. Check this out for assistance: Troubleshooting Visual Studio 2010 and Qt 4.7 integration )

Software should be simple. Software licensing should be simple. Software development should be simple.

Yeah, right.

Qt is a wonderful development tool from Trolltech and nowadays Nokia. But it seems to me they are doing their best to make starting using it difficult (I call this Symbian syndrome, it seems to be contagious).

About the Qt licensing

On their licensing page Nokia/Qt tries their best to make you feel like the commercial license really is what you need. Nope.

LGPL is what you need - also for development and sales of commercial software. Only if you must change the internals of Qt itself (who would?) and do not want to share those changes (why?) you should grab the commercial. At least I don't see any other reason. So - ignore the FUD and grab the LGPL.

Which download?

This is what turned me down on Symbian, years back. Fragmentation. So many packages that one cannot really know, which one to download.

Arguably, Qt is difficult for the packager. Some ten platforms. Different compilers. Cross compiling. But they indeed could be making it simpler.

This is the one you want (qt-win-opensource-4.7.1-vs2008.exe), for Windows 7 native development using the free Visual C++ 2008 Express edition (also the newer 2010 Express might work but I haven't tried).

Inconsistency warning

Nokia is saying that only gcc compiler is officially supported by the opensource installation package. This may be so but the free Visual C++ 2008 Express compiler works just splendidly. You really want to rather use the Microsoft compiler, since this means no need to install MingW and that stuff. In my opinion, Nokia/Qt could simply state the fact and "support" the Express compilers. Why not?

The opensource installer seems to be meant for both LGPL and GPL 3.0 licensing. So it implies when you start it. However, the click-through license being shown is only LGPL. This is a beauty spot - if I were Nokia/Qt, I'd call the package LGPL (instead of opensource) and simply keep the GPL 3.0 for the "generic all sources" package. Don't complicate things. No-one developing for Windows and with Visual C++ 2008 will use GPL, anyways. Give less blurry options. Be consistent.

Installation

These instructions are based on this, but updated.

1. Install Visual C++ 2008 Express (or 2010 Express)

Note: Though it is free, the Express version requires registration within the first 30 days. You must have a "Windows Live ID" for doing this.

2. Install the 'opensource' Qt 4.7.1 package

Installation is a breeze and now it seems problems are behind us. Run the demos at the end of the installation - they give a good picture of what Qt can do.

3. Creating your own project

( Now, I'm not sure if all this works right after installation. If not, do the next step - configure and compile Qt - first. )

Add the Qt binaries folder to the PATH unless it's already there (wasn't for me - why wouldn't the installer have done this?)

    Start > Control panel > search: environment > Edit account's environment variables (or something like that)

PATH C:\Qt\4.7.1\bin


Open a "Visual Studio 2008 Command Prompt" ( Start > Programs > ... > Visual Studio Tools > ... ). This is normal Windows command prompt with some environment variables set so one can compile stuff (see with 'set' command).

Create an empty folder (MyDemo) and a source file (main.cpp) in it:

   mkdir MyDemo
cd MyDemo
( create main.cpp with a text editor, see contents i.e. from here )
qmake -project
qmake


Compile

   nmake


Run

   cd debug
MyDemo.exe


Success? If not, give a comment on this blog.

4. Configuring and recompiling Qt itself

Open the "Visual Studio 2008 Command Prompt"

   C:
cd \Qt\4.7.1
configure --help


That shows all the different configuration options.

Try something like this (all in one line):

   configure 
-no-accessibility
-no-qt3support
-no-opengl
-no-openvg
-platform win32-msvc2008 
-no-gif
-no-libtiff
-no-dbus
-no-phonon
-no-phonon-backend
-no-webkit
-no-script
-no-scripttools
-no-declarative
-no-style-motif -no-style-cde
-sse2


configure will ask you for the license. Confirm open source by 'y'.

Running configure took around 20 minutes. Make some coffee...

   nmake


Running nmake took around 2 hours. Watch some tv...

To clear an earlier configuration:

   nmake confclean


What about Qt Creator?

The above installation brings the command line tools and the Qt Designer (the UI editing tool) to your usage.

It does not, however, bring an IDE.

Qt Creator is an IDE for Qt. The current name of the Windows installer is qt-creator-win-opensource-2.0.1.exe. Download.

Another IDE option is to integrate Qt development with Visual C++, using that as the IDE. This is done using the Qt Visual Studio Add-in (qt-vs-addin-1.1.7.exe). Visual C++ 2008 Express does not support add-ins, however, which leaves us either to work on the command prompt (quite fine) or use Qt Creator.

Note: You can uncheck the "MinGW runtime development tools" option when installing Qt Creator (since we're not using MinGW).


Note: If using Qt Creator with projects on network drives (or i.e. shared host disk of VMWare as I do), use drive letter mappings (s.a. G:) instead of the long path names (s.a. \\vmware-host\Shared Folders\...). It may be the space in the path name or it may be the \\ style but I didn't get projects to run that way. Drive mapping helps (create those in main level of 'Computer' view of the Windows file manager).


Debugging with Qt Creator

Qt Creator needs a CDB console debugger in order to allow you to single step and debug your code. This is a separate download from Microsoft, under the name Debugging Tools for Windows. The actual installer is named winsdk_web.exe (Windows 7 SDK etc.).

You only need to have the "Debugging Tools for Window" option checked in the above installer. It may give some warnings about only having the "client" parts of .NET something 4 installed. This is okay, proceed.

Once the stuff is installed, restart Qt Creator and it should now be able to debug (add a breakpoint, try single step, look for variable values). Voila!

( It does say about "Debug helper" not being rightly set up or needing a new compile. Maybe, if we had started with CDB being there Qt would have gotten all the stuff right. Or maybe it's something else. Anyways, it seems Debug helper is not so valuable. We can still see the contents of all regular C++ constructs just fine. )

Finally there

It shouldn't be this hard.

But now that Qt and all the pieces are in place, Qt Creator is actually feeling like a very nice IDE. And Qt itself is awsome, that I know anyways (otherwise I might have lost hope in the midst of this). The official response of Qt people would surely be "either use MinGW or get the real Visual C++ software (and use the plugin)." Well, I don't want to. I have good experience of using VC++ Express versions and see no reason they shouldn't/couldn't be supported by Qt.

What Nokia/Qt could do, in my opinion, is to make a dynamic webpage (using JavaScript and CSS) that takes one through the whole installation routine, on a one single page. The page would have road junctions along it, asking you for something (s.a. which environment you want to build on and what to target, what compiler to use, license etc.) But all this would happen on the one single page. Then at the end you would get a list of *all* required downloads in the order they should be installed. That would be dead easy (both for them and for the page visitors). Now they seem to be going for "one package installs all" (most likely because managers prefer that way). This is not necessarily best for developers, since we want to have each thing only once, and understand how the parts fit together.

To get a feel of what the current situation is, look here:

At footer of all the tabs:
- 4 Qt Creator binaries links
- 1 Qt Creator source link
- 1 Visual Studio Add-in link
- 1 Nokia SDK link

LGPL tab:
- 5 "Complete development environment" links
- 7 "Qt libraries" links

Commercial tab:
- no links (just forms)

That page is the main cause of the headache. Don't use tabs on it - make the flow from up to down. Way less information-like links, or make them visually separate from the download links. USABILITY, PLEASE!

None of this is clearly expressed on the Nokia/Qt website, leading to unnecessary downloads and time lost trying to figure out what works and what does not. This is why this blog entry was created.