Archive for the ‘not-yet-fully-invented’ Category

Aspnet MVC 2 starter project compilation error

March 15th, 2010

When starting your first Aspnet MVC2 project you might immediately run into compilation errors like these:

Error 1 The type or namespace name ‘Controllers’ does not exist in the namespace ‘MvcApplication1’ (are you missing an assembly reference?) C:\myprojectpath\MvcApplication1.Tests\Controllers\HomeControllerTest.cs 8 23 MvcApplication1.TestsError 3 The type or namespace name ‘Models’ does not exist in the namespace ‘MvcApplication1’ (are you missing an assembly reference?) C:\myprojectpath\MvcApplication1.Tests\Controllers\AccountControllerTest.cs 10 23 MvcApplication1.Tests

Error 4 The type or namespace name ‘AccountController’ could not be found (are you missing a using directive or an assembly reference?) C:\myprojectpath\MvcApplication1.Tests\Controllers\AccountControllerTest.cs 317 24 MvcApplication1.Tests

The origin of the problem is that the test project doesn’t reference the web project. Just add the reference and you’re good to go.

I haven’t found the solution on google yet so I write this here to someones possible future aid.

>Visual Studio suddenly refuses to show forms in the designer

March 1st, 2009

>

Short story:

Totally wierd.  One day VSNet of my colleague refused to open a form.

The solution was to run “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe” /ResetSkipPkgs

Long story:

VSNet 2008 suddenly refused to open a form in a VBNet project with the message

—————————
Microsoft Visual Studio
—————————
There is no editor available for ‘C:\Documents and Settings\myusername\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb’.
Make sure the application for the file type (.vb) is installed.
—————————
OK  
—————————

(How to copy error message dialogues.)

Googling didn’t give much.

Repair did nothing.  It stopped after a “…has encountered a problem…” with Ok as only choice.
Uninstallation din’t work; the same error as above.
Uninstalled through a tool found here.  Reinstalled VSNet2008 and Service Pack 1.  The “total uninstallation” was a fraud, the old projects still populated the MRU list :-(  And the problem remained.

My colleague created a new winform project in C# where the problem was the same but the error message different.

—————————
Microsoft Visual Studio
—————————
Project ‘WindowsFormsApplication1’ could not be opened because the Microsoft Visual C# 2008 compiler could not be created. QueryService for ‘{74946829-37A0-11D2-A273-00C04F8EF4FF}’ failed.
—————————
OK  
—————————

This gave us more Google fodder to find more switches here.

After running “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe” /ResetSkipPkgs the sky was sunny again.

This took the better part of a day.

Why didn’t uninstall all remove everything.  Who do Microsoft think they are?  Adobe?

(the dialogue dumps above were easily copied with ctrl-c. read more here)

>Huawei 220E and Vista

December 29th, 2008

>

Look into upgrading the 3G dongle software if your Huawei220e doesn’t work with Vista.

My Huawei 3G dongle worked nicely with my WinXP and even better with my Asus Eee.

When I changed to Vista it refused to work properly.  The driver and UI installed correctly but failed to neither work nor give me a usable error message.  I looked at the internet for several days without finding a solution, not even on 3’s pages.  Later I by chance talked to a colleague and he told med to update it at the store for free.  The first clerk didn’t have a clue what I was talking about but the next exchanged the dongle for a piece of paper and told me to wait for two days.

After two days I got the dongle back and now it works so so with Vista and not yet with my Eee.

On a note all software is not removed from the computer when uninstalled.  Even though I uninstalled the software it still remembered my pin code.

The UI is also not navigable with the keyboard, a mouse is needed.

Huawei being one of the bigger, probably biggest, manufacturer of 3G dongles for laptops should really have better software.

>3, 3G and Flash 10

December 27th, 2008

>

A just received a message from 3 that my 3G connection is not compatible with Flash10.

My question is -how can a user interface thingamajig destroy a network connection?  What made someone come up with the bright idea that a network connection should only be useable through a graphical interface?

Pros and cons with HTC Touch Pro

October 14th, 2008

I have jotted down the pros and cons with a HTC Touch Pro mobile phone here. Typically personal experiences and not the stuff you can read about in reviews and ads.

– Slow. It is possible speed it up a little downloading an app and following the instructions. The app I used is called Advanced Config and can be found at xda-developers.com. But the unit is till Slow.

– Bad battery time. Especially when you use ActiveSync to talk bluetooth or anything else but the phone functionality. One can argue that too much communication (Bluetooth, WLAN, 3G…) is to blame the the fact remains: I bought the phone to use this stuff and when I do I have to charge it before the day is over.

+ The TouchFlo3D user interface is nicer than what Microsoft presents. When the TouchFlo3D doesn’t work any more the GUI falls back to Microsoft’s implementation. A graceful degradation sort of. Or like using a terminal window when KDE doesn’t make it.

– The TouchFlo3D still behaves like version 1 and sometimes mistakes a slide for a click or refuses to recognize my gestures at all.

– Crashes. All my WindowsCE machines since 1999 have crashed unexpectedly. Sometimes due to no reason at all. If not being freshly booted and put in the charger counts as a valid reason to crash (it was also connected to my WLAN at the time).

+ Easy to develop for. As long as you use dotnet and have the right development environment. Unlike developing for iPod or Xbox it is free to develop (these to others are free to develop for as long as you pay the respective companies a fee for deploying)

– WindowsMobile6.1 and Dotnet CompactFramework 3.5 does still not support WPF.

– The API for TouchFlo is not made public.

– It is Slow. Did I mention that?

– As a phone for making phone calls it is not very good. There are cheaper and better alternatives. I use my mobile phone for much more than calling so to me everything is a compromise; but if the phoning capabilities are very important – look for another solution. I can defend it being slow due to it being bogged down by applications and bad architecture, but I cannot defend it’s bad sound.

– ActiveSync. It uses ActiveSync for synchronization which is not very good on the phone and possibly the worst software written ever on the client.

+ GPS and bundled with Google maps. It should run Microsoft’s competitor too but I havn’t tried. The GPS feels slow.

+ Radio. But it requires the headset as aerial.

+ Charged through a USB port.

– Bad battery time.

– It is not a standard USB port. Normal USB works so it is not much of a problem.

– Uses the proprietary USB variant for headset. There is no 2,5mm plug for listening.

+ Supports 3G.

– Only comes in the installed language. Microsoft’s Hej Knekt!-licenses forbids HTC to change language. This means that on a swedish phone you might get the totally unusable swedish error messages. They are better translated today but are still totally ungoogleable.

+ Has a gravity sensor.  I have still to find a use for it but I think it is cool.

+ The camera seems quite good but is slow.

– The phone and the camera are slow.

+ Hardware accelerated 3D graphics.

– So slow that the caller often hangs up before I manage to answer.

+ The case looks good.

– The usability of the case is not thought through.  I requires two hands for pushing the phone out of the sleeve and it is way too easy to happen to press the on/off button while doing this.  The phone also manages to change it’s volume even though it is in it’s protective case and the phone is locked.

– The home page looks cool but one has to choose between either a good time indicator and bad calendar or a bad time indicator and a less bad calendar.  The home/front page calendar doesn’t always manage to show all events for the day.

+ Easy to read the time on the home page.

+ The keyboard is quite good.

– The swedish onscreen keyboard lacks functionality.  So did the Qtek9100.  The 9100 was updated after a while but after way too long.  The thinking by HTC seemed to be like “we cannot support functionality X with åäö so the swedish users shouldn’t be supported without them either”

– It uses ActiveSync.  Probably the worst software written ever.

+ Has no key for taking voice notes.

– Shifts volume even though locked and in its cover.

+ Has dual touch sensitivity below the screen.

+ A screen cover comes with the phone.

– Not reliable.  Can crash unexpectadly in the middle of the night and leave you without wake up chime in the morning.+ A better way of killing running applications than Windows Mobile 5.  What were Microsoft thinking when they wrote in the guidelines that it should _not_ be possible to stop applications? At the same time they removed the cancel button – very wise on a gadget like a PDA or phone.  Not!

+ When putting it in its case it can mimic the sounds of a sword being put in its scabbard from a Holly Wood movie.

– Slow.  In case I forgot to mention.

+ Shows the last you called and it is easy to choose one and change to another number of the same contact.  Like: call to a friend’s home, isn’t there, call mobile instead.

+ The web browser Opera that is bundled is nice.  Unfortunately it is crippled.

+ The cross/back button works quite good.

+ After one gets a hang of how to change application through TouchFlo and have moved the right applications to the Program choose; it is quite easy to open apps of your own choice.

+ If you have Visual Studio it is easy to develop for.

+ Finally there is a built-in method for closing all applications quickly.

– The case doesn’t stand the wear and tear of jeans and suitcases.

– It sometimes makes prank calls and answers calls from my pocket.

+ It does less prank calls and answers phone calls from my pocket than my earlier EricssonP910i and QTek9100.

– Almost impossible to use as a phone with headset while in your pocket.  Even inside its case in a loose jacket pocket it tends to turn the microphone off.

– For locking the phone it is easiest to hold the hang-up button.  This also works when using the phone, just hold the button down and the phone locks.  Well… every other time.  The other times it hangs up.

– The head set that is bundled is ok.  But it still gets a minus because the headset for the 9100 was superb.  Lock behind the neck made it balanced so you could have it hanging without getting slowly drawn off.  Fabric around the wire made it very tangle resistant.  The good designs with the old head set where thrown away and back to square -1 for this.

– Slow.  In case I forgot to write.

+ USB charger, I use the same cable for charging, communicating and other gadgets; less to carry.

– Spontanous crashes during night.  I wrote this before but this month it crashed several nights leaving me without alarm clock in the morning.

– The HTC GUI sometimes fails.  But it doesn’t fail to let the Microsoft GUI through, only to show a big black screen with words like tap if you wan to restart the htc gui”.  Tapping makes the HTC GUI start and crash and show a big black screen with words like tap if you want to restart the htc gui”.  Repeat until you get tired and reboot.

+ Multi touch under the screen.  A semi secret.

– Up and down on the main button are ok but left and right are so so.

+ Direction sensitive so it knows if you hold it vertically or horizontally.

+ A new UI for messages that bundles SMSes.

– A new UI for messages that is in other ways harder to use.

– It doesn’t make it as a phone.  You can get both much cheaper and at the same time much better phones.

+ Has a lot of horse power (that it unfortunately abuses)

– Slow.

– The button on the headset, is it really a button?  It is possible to doubleclick it to recall.  But it is not possible to hang up.  It may be possbible to answer calls but I havn’t tried since if I have the plugs in my ears I go deaf when they ring.

>How come all digital calendars suck?

May 19th, 2008

>This can also be written: why haven’t I written one of my own?

The digital calendars try to mimic their paper cousins the same way as Phillipinean food takes after ditto from USA. They have kept all the bad stuff and thrown away the good parts.

Number 1 bad thing with all the digital calendars I have run into is their obsession with hours. There is no way to enter “after job” or “in the afternoon” or “time will be decided later”.
Number 2 bad thing with all the digital calendars I have run into is that there is no way to enter thing by week. I normally have vacation between week X and week Y (or dates X’ and Y’ if you prefer) and this is marked with a line in the margin. In my paper calendar that is. I cannot enter full day meetings because then my whole vacation is one big blob of “meeting” where I cannot find other stuff like sailing competition, midsommar or the dog’s birtday.
Number 3 is the overview. For the ones living their life like Gantt the solution might be perfect. But for all us others…

Some 100 years ago I had an Apple Newton and for this one I bought a calendar that did what everyone using the paper calendar metaphor should do; throw it in the recycling bin. The solution was to just list things in chronological order with a line for week changes and bold for new day (or something like that) In reality I know that the meeting at the divers’ club is at thursday evening and hence things above it is earlier and below it later on. This way of presenting my calendar turned out to be just the thing.

Last: if someone knows of a calendar program – please tell me.

>Outlook Express address book error

March 25th, 2008

>Outlook Express has a problem wich cost me an hour of my life. I document it here to the aid of others. (I did search in the knowledgebase on MSDN or support att Microsoft to enter my newfound intel but there was no good place. MSDN which some years ago was a good place to find information has IMHO deteriorated.)

Problem: Outlook Express refused to open the emails. The error information was something like “An error has occurred.” but in swedish so it was useless for googling.
Opening the Address book there was a better error message “The Address book cannot be opened.” but likewise in swedish. Slightly narrower error message which helped me a lot.

I fixed the Wab (address book) file by copying the automatic backup (myusername.wa~).
But OE still complained about a corrupt WAB file.

Googling did little to help so I rebooted “just because”. And it worked.

To make OE read the address book again one has to reboot the computer. (Technically it might be enough to zap exactly the right process or do some registry hack but I don’t know which.)

Lessons learned:
1) When localizing a product – make each error message searchable. Either by a unique ID to search for or by letting the user see the international (english) text besides the local.
2) Give the user a sporting chance to track the error. If it is not possible to give a proper error message – describe where to find it, like in a log file or something.

>No cancel button

December 10th, 2007

>This message will be repeated in english

Någon gång i slutet av 1900-talet bestämde sig Microsoft för att slopa Avbryt-knappen på sitt nya operativsystem PocketPC.

I operativsystemet innan, WindowsCE PPC, fanns en Avbryt-knapp så om man råkade nudda kalendern kunde man alltid Avbryta sig ur att skapa en ny post. I PocketPC 5.0 som jag använder nu är det svårare att skapa en ny post men lika lätt att flytta den. På en nuddning har man flyttat ett möte i tiden och det finns inget sätt att ångra. Detta på en apparat som är gjord att användas.

Detta är lika korkat som när Apple tog bort den andra knappen på musen de hade under ett kort tag.

Sometime in the end of the 20th century Microsoft updated their WindowsCE PPC to PocketPC. At the same time they removed the Cancel button.

I refused to buy a new gadget when you were just one tap away from moving your appointment without having any way to cancel you erroneous tap. I mean, it was built to be used in other places than a steady desk, right? What where they thinking of?

And with PocketPC6.0 the Cancel button is still missing. This is as stupid as when Apple removed the second mouse button they finally got in place.

>Daemontools has a rude behaviour

October 31st, 2007

>This message will be repeated in english.

Jag behövde läsa en ISO-fil och kunde just då inte använda MSs Virtual CD. Det är en liten, enkel, icke påträngande lösning.
På rekommendation installerade jag DaemonTools och den uppförde sig ofint.

Jag installerade och den bad mig boota om. Det är ok, den gör säkert lite krångliga saker som kräver omstart.
När jag hade installerat DaemonTools så fanns där ingenting. Jag skulle tydligen installera en gång till. Det är ok, installation är krångligt men jag hade gärna fått en dialog som berättar detta. Så jag installerade för andra gången.
När jag hade installerat DaemonTools för andra gången så fanns där ingen applikation i start-menyn där de brukar vara, utan jag skulle ta tag i musen och klicka på en ny ikon i sys-tray.

Vad sjutton är det som är så magiskt att DaemonTools måste starta samtidigt som min dator varje gång? Men det är ok – bara för att jag inte vill starta en CD-emulator vid varje uppstart så finns det säkert de som vill eller måste.

Men… nästa gång jag startade Internet Explorer var min startsida utbytt!
Installationen frågade mig aldrig om den fick lov att byta ut min startsida och även om den hade gjort det – Det finns Ingen I Världen som vill byta ut sin startsida i IE mot http://google.daemonsearch.com/se/ý eller http://search.daemonsearch.com/search/

Detta ofina beteende gör att jag misstror resten av DaemonTools också. Om de anser de kan byta ut startsidan i en av mina applikationer – vad anser de då de kan göra mer med min maskin?

Självklart har jag avinstallerat applikationen. Men vem vet vad som har avinstallerats. Kanske ligger där kvar ett rootkit à la Sony-BMG?

The other day I needed to read an ISO file and couldn’t use MSs Virtual CD as I usually do. On recommendation I installed DaemonTools and it misbehaved.

I installed and it asked me to reboot. It is ok, there are probably lots of difficult things to do to create a virtual CD. When the rebooting was finished nothing new had happened. Something probably had, but what?
I am not angry about rebooting, sometimes a man has got to do what a man has got to do. But it would be nice with some information that I had to install again.
So I installed again and it looked fine. Except for there being nothing in the start meny as there usually is. I had to grab the mouse and click an icon in the systray.

What is so magic about DaemonTools that it has to autostart every time I log on? IMHO it would be better if one started it when needed. But what do I know? – it might do a lot of fancy stuff that requires it to be autostarted.

But… the next time I started Internet Explorer my start page was changed! I don’t use IE unless I have to but what made someone decide that their choice of start page is more important than mine?
Honestly – there is No One In The World who wants to exchange their start page to http://google.daemonsearch.com/se/ý or http://search.daemonsearch.com/search/

This rude behaviour, overwriting my choice of start page in one of my applications, makes me wonder what more the application has done to my machine. Someone obviously has decided he knows more about my surfing needs than I. What has he decided he knows more? whether a keylogger should be good? whether I need an automatic update for yet another application?

Needless to say I uninstalled the application. But who knows what the uninstaller did…

>! is a bad operator

September 13th, 2007

>In C#, C and C++ the exclamation sign (!) is used for negating a boolean value.

This is considered a bad thing because it is so small and easy to miss.

    if( !IsPostBack ){…

I would like to write

    if( Not( IsPostBack ) ){…

instead.  But I have yet to find a way to overload it such in C#.

Even with the improved readability of “Not” it is easy to think wrong.  It is way too easy to get lost in negations in a just slighty complex boolean expression.

A way to improve readability is to avoid the useage of ! or negations at all:
    if( IsPostBack ){
        // Does nothing.
    }else{
        …
    }