Friday, December 30, 2011

Clean Code

Clean Code (A Handbook of Agile Sortware Craftmanship) by Robert C. Martin is a must-read.

Here are a few notes about it (filtered).

Friday, November 18, 2011

Regasm : insufficient system resources

Got this error at work :
Regasm : error RA0000 : Insufficient system resources exist to complete the requested service
I played a little with procmon (Thanks a lot Mark !) I looked for "INSUFFICIENT RESOURCES" in the events. This event was due to a RegCreateKey in HKCR/Wow6432Node/CLSID. It turned out that it was not possible to create a subkey with regedit.


Saturday, July 2, 2011

How To Really Reset Folder Settings in Windows 7

Sometimes, Windows 7 automatically updates explorer's columns. For example, if a folder has a mp3 file, columns headers will be artist, song, etc.

This is really annoying for all other files of the same folder.

Configuration is stored in registry. Deleting and creating again such a folder will not reset its configuration. You have to delete keys in registry.

Here is the .reg file found on :
Windows Registry Editor Version 5.00



[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]

[-HKEY_CURRENT_USER\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\Bags]
[-HKEY_CURRENT_USER\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]

Friday, May 27, 2011

Révolution... 6 mois plus tard

Reçu ce jour (6 mois et 12 jours après la demande effectuée le 15 décembre) :
Free Haut Débit


Nous avons le plaisir de vous annoncer que votre nouvelle Freebox pour votre ligne ******** est en cours d'expédition au point relais KIALA.


Vous serez informé par email et SMS de l'arrivée de votre colis au point relais KIALA choisi.

Sincères salutations,

L'équipe Free

Saturday, March 12, 2011

Windows 7 sp1 [Solved]

Windows update fails to install service Windows 7 sp1. After downloading the 900 MB of windows6.1-KB976932-X64.exe (I also downloaded Windows_Win7SP1.7601.17514.101119-1850.AMD64CHK.Symbols.msi and Windows_Win7SP1.7601.17514.101119-1850.AMD64FRE.Symbols.msi, almost 300 MB each but I am still not sure about the requirement of these two), I tried to update manually. But this failed again : "L'installation n'a pas réussi", "l'assembly n'a pas pu être trouvé". "Détails" do not give a lot more info : "Erreur : ERROR_SXS_ASSEMBLY_MISSING(0x80073701)". There is a link to get more info ("Se connecter pour en savoir plus sur ce problème"), but this does not help me solve this problem.

Found the same problem here and here.

Looking deeper in C:\Windows\Logs\CBS\CBS.log (>250 MB) :
2011-03-12 22:11:26, Info                  CBS    Exec: Resolving Package: Package_43_for_KB976098~31bf3856ad364e35~amd64~~, Update: 976098-91_neutral_LDR
2011-03-12 22:11:26, Info CBS Exec: Resolving Package: Package_43_for_KB976098~31bf3856ad364e35~amd64~~, Update: 976098-91_neutral_LDR, PinDeployment: amd64_8c41fc7eb0dbe2daefc621237184c0e3_31bf3856ad364e35_6.1.7600.20561_none_e8d566dacff1f5ff
2011-03-12 22:11:26, Error CSI 0000000c@2011/3/12:21:11:26.177 (F) d:\w7rtm\base\wcp\componentstore\csd_locking.cpp(324): Error STATUS_SXS_ASSEMBLY_MISSING originated in function CCSDirectTransaction::LockComponent expression: (null)
2011-03-12 22:11:37, Error CSI 0000000d (F) STATUS_SXS_ASSEMBLY_MISSING #1573632# from CCSDirectTransaction::OperateEnding at index 0 of 1 operations, disposition 2[gle=0xd015000c]
2011-03-12 22:11:37, Error CSI 0000000e (F) HRESULT_FROM_WIN32(ERROR_SXS_ASSEMBLY_MISSING) #1573517# from Windows::ServicingAPI::CCSITransaction::ICSITransaction_PinDeployment(Flags = 0, a = 8c41fc7eb0dbe2daefc621237184c0e3, Version = 6.1.7600.20561, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral, cb = (null), s = (null), rid = [77]"Package_43_for_KB976098~31bf3856ad364e35~amd64~~", rah = [1]"2", manpath = (null), catpath = (null), ed = 0, disp = 0)[gle=0x80073701]
2011-03-12 22:11:38, Info CBS Failed to pin deployment while resolving Update: 976098-91_neutral_LDR from file: (null) [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
2011-03-12 22:11:38, Info CBS Failed to resolve item[0] in Package: Package_43_for_KB976098~31bf3856ad364e35~amd64~~, Update: 976098-91_neutral_LDR [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
2011-03-12 22:11:38, Info CBS Failed to resolve execution update. [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
2011-03-12 22:11:38, Error CBS Failed to resolve execution package: Package_43_for_KB976098~31bf3856ad364e35~amd64~~ [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
2011-03-12 22:11:38, Info CSI 0000000f@2011/3/12:21:11:38.370 CSI Transaction @0x34c280 destroyed
I think the important part is Package_43_for_KB976098~31bf3856ad364e35~amd64~~ So I tried to download KB976098 for x64 and install it manually, but windows tells me it is already installed.I eventually managed to install SP1 thanks to Kris post : I had to remove 4 KB : KB976098, KB979306, KB981793 and KB979916. Problem solved !

Sunday, February 20, 2011

Argotic Syndication Framework Desillusion

When I discovered Argotic Syndication Framework a few hours ago, I thought : One to rule them all. They say on their web site that I don't have to speak the syndication langage.

But, I failed to make it work on the first syndication feeds I tried : atom feeds generated with dotclear raise the following exception :
   at Argotic.Common.Guard.ArgumentNotNullOrEmptyString(String value, String name)
at Argotic.Syndication.AtomPersonConstruct.set_Name(String value)
at Argotic.Syndication.AtomPersonConstruct.Load(XPathNavigator source)
at Argotic.Syndication.AtomPersonConstruct.Load(XPathNavigator source, SyndicationResourceLoadSettings settings)
at Argotic.Data.Adapters.Atom10SyndicationResourceAdapter.FillFeedCollections(AtomFeed feed, XPathNavigator source, XmlNamespaceManager manager, SyndicationResourceLoadSettings settings)
at Argotic.Data.Adapters.Atom10SyndicationResourceAdapter.Fill(AtomFeed resource)
at Argotic.Data.Adapters.SyndicationResourceAdapter.FillAtomResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata)
at Argotic.Data.Adapters.SyndicationResourceAdapter.Fill(ISyndicationResource resource, SyndicationContentFormat format)
at Argotic.Syndication.AtomFeed.Load(XPathNavigator navigator, SyndicationResourceLoadSettings settings, SyndicationResourceLoadedEventArgs eventData)
at Argotic.Syndication.AtomFeed.Load(Uri source, ICredentials credentials, IWebProxy proxy, SyndicationResourceLoadSettings settings)
at Argotic.Syndication.AtomFeed.Create(Uri source, ICredentials credentials, IWebProxy proxy, SyndicationResourceLoadSettings settings)
at Argotic.Syndication.AtomFeed.Create(Uri source, SyndicationResourceLoadSettings settings)
at Argotic.Syndication.AtomFeed.Create(Uri source)
It fails to parse publication dates in Univers Freebox syndication feeds or Slashdot feeds.

Well, it seems I have to learn this langage anyway...

Edit : After failing again on slashdot feeds with .NET 3.5 classes, I found Peter's blog. Actually my code was getting closer to his solution.

Tuesday, February 1, 2011

Merci à la TVA !

Les opérateurs profitent de la hausse de la TVA pour augmenter les tarifs des téléphones. Il y a deux semaines, on pouvait avoir un forfait Bouygues Telecom Evasio 1h+1h à 34 € (engagement d'un an), avec un HTC Desire pour :Voleurs !

Mais bon, il suffit de se détendre ! 51 € en blanc :^( chez Virgin Mobile avec le code promo DESIRE et le forfait E-Devine à 31 €.

Sunday, January 30, 2011

Recover Acer Aspire 1650

Useful keys :
  • F2 : Enter BIOS Setup
  • F12 : Choose boot device (if F12 key
    enabled in BIOS)
Notes :
  • You definitely need a backup DVD where Acer eRecovery has burnt the content of the hidden partition. Unfortunately, this DVD might not include everything (like Acer eRecovery for example - as if this restore process should be a one-time thing).
Steps :
  • Boot on backup DVD and wait for restore process to end. This will ovewrite the first partition with the content of the DVD big file. It takes about 12 min.
    Then the laptop reboots on the DVD to finish copying files.

    It seems that the real copy happens at 40 % (see HD activity). If I kept some linux partitions, it would froze at 40 % doing nothing (HD led off)
Then, if you reboot, Windows would use the following partitions :
  • C: : old hidden partition (hda1)
  • D: : old C: (hda2)
  • E: : old D: (hda3 or hda5)
IMHO, having two C:-like partitions is really messy.

That's why I want to hide the first partition again. This can be done in a few steps :
  • Hide the first partition
  • Copy the first partition (hda1) to the second (hda2)
  • Eventually reboot
Linux comes to the rescue. I use the Gentoo Minimal Install dvd (iso) for x86. So the detailed steps are :
  • Burn Gentoo minimal dvd
  • Reboot on this dvd (F2 or F12 can help)
  • Hide hda1 : (this commands sets hda1 type to Compaq Diagnostics, disables boot on hda1, enables boot for hda2 and save)
fdisk /dev/hda
t 1 12
a 1
a 2
  • Mount hda1 and hda2 :
mkdir /mnt/win/c
mkdir /mnt/win/d
mount /dev/hda1 /mnt/win/c
mount /dev/hda2 /mnt/win/d
  • Optional : save hda2 content :
mkdir /mnt/win/d/old
mv /mnt/win/d/* /mnt/win/d/old
  • Copy hda1 to hda2 :
cp -a /mnt/win/c/* /mnt/win/d
  • Reboot to windows
Then your fresh new WindowsXP will start using second partition.

Acer sucks, try Asus.

Edit :
  • Radeon X300 does not work after reboot. ATI driver fails to install.
  • Intel 2200BG wifi card does not work either.
  • Keyboard is not recognized and locks the Touchpad.
  • Startup desktop.ini file is opened automaticaly when XP starts ? Might be because the linux copy did not take into account the hidden attribute...
Edit : Merging the two first partitions to get 30 GB on C:\ fixes them all. No more post-install copy step. No more problem with ATI driver, etc.