Cannot Contact Steam Network

Illustration

Jeff Atwood has some strange hobbies that include (but are not limited to) giving away games. Fortunately I was on receiving end of latest giveaway. Condition was good score on one or more trilogy sites and steam account.

Installation of steam client wen’t without issues but program would not start. It would just give standard non-descriptive message “Cannot contact steam network”. For troubleshooting purposes I tested it in Windows XP Mode and everything worked there. That confirmed that compatibility with my Windows 7 (64-bit) is issue here.

Solution was annoyingly simple. I went into properties for Steam and checked “Run this program in compatibility mode” check-box. I opted for Windows XP compatibility (default) and started it again. Update went without hitch.

After update I got nasty message from Windows telling me that I should consider removing compatibility settings. Once I removed compatibility application continued to work but my download rate went to 0.0 KB/s. Going against all warnings I reactivated Windows XP compatibility and everything was good once more.

Worthless Precision

Illustration

Calculations show that Earth’s oil reserves will cease to exist at 20:58 on Oct 22, 2047. It is scary figure to see and it is probably as good of an guess as any. Saying this, it is also just rubbish. I will explain on example of thermometer.

My new kitchen thermometer shows me temperature of 19.3 °C. I think that all thermometers that you can buy show results with one decimal digit (with resolution of 0.1 °C). However, once I checked specification, I was puzzled. Precision of measurement is only ±2°C. Simply said it means that actual temperature is anywhere from 17.3 to 21.3 °C.

It is in human nature to assume that all that is shown actually matters. I can bet you that people would trust thermometer with five decimal digits more (e.g. 19.24133 °C) than one without them (e.g. 19 °C). It just looks better when our numbers have higher resolution. Real truth is hidden in precision. And that number is not always easy to find.

Time of oil exhaustion is nonsense for same reason. They showed it with resolution of one minute just to make it more believable. Real precision is probably give-or-take few years if not more.

P.S. Yes, we will run out of oil one day. We just cannot pinpoint date.

BIOS Feature

Illustration

I have mandatory BIOS password on my work computer. Some Catbert character thought of it as good security feature. Now, whenever I need to reboot my computer, I need to sit next to it.

I used to grab cap of coffee while it was rebooting and all I needed to do was to log into Windows once that is done. Now I need to sit next to it through whole shutdown process waiting for BIOS password and only then I can get a coffee. If there is some update in progress, that waiting period usually puts me in “I will kill this guy” state. I really hate waiting…

During that useless time my mind often wonders to my first Pentium-class computer. There you could set “stealth” BIOS password (I forgot official name of that feature). If such password was set, system would boot up without asking for anything. Everything seemed normal until you tried to use keyboard or mouse - they were locked. Only once you entered your password BIOS would release control of PS/2 ports and Windows would take over. Since Windows worked normally even without password, you could rely on this feature even across reboots.

I have pretty good idea why that feature is gone - USB. BIOS can intercept and handle PS/2 keyboards quite easily even once Windows are up and running. Since Windows talk with keyboard over BIOS, it can choose whether to pass characters or not. With USB things get complicated.

Once Windows take over USB control (and that is fairly early in boot process) there is no simple way BIOS can restrict it. Only approach that would work in that case would be some hardware virtualization. BIOS would have control over physical USB and Windows would get virtualized version controlled by BIOS.

I am quite sure that someone would do it if there weren’t three big problems - compatibility, performance and cost. Compatibility would be easiest to solve. Performance (latency) could be lowered by employing ASICs. However cost to do that would be high. And all that because of feature that is not that necessary to begin with.

Sometimes I long for simpler times… :)

Full Width Toolbar

As I ventured into WPF world, some things annoyed me more than others. One of those things was inability of toolbar to have no grip and to be full width.

After some time I found solution for grip problem. Just put toolbar in toolbar tray and set IsLocked attribute to true.

<ToolBarTray IsLocked="True">
    <ToolBar>
        ...
    </ToolBar>
</ToolBarTray>

Extending it’s width proved to be little bit more engaging. It took me a while to notice ActualWidth property of ToolbarTray control. As name says, it will return you actual width of ToolbarTray.

Since we want toolbar to span whole window, it should be inside DockPanel (and docked to top). Synchronizing ActualWidth of ToolbarTray and our Toolbar is then solved by simple data binding:

<DockPanel?
    <ToolBarTray IsLocked="True" DockPanel.Dock="Top">
        <ToolBar MinWidth="{Binding RelativeSource={RelativeSource AncestorType={x:Type ToolBarTray}}, Path=ActualWidth}">
            ...
        </ToolBar>
    </ToolBarTray>

    <Grid>
    </Grid>
</DockPanel>

Sample with everything done (and few things more) is here.

Got a Key?

Illustration

Starcraft II has it’s release date confirmed. It will be available for general public on 27th July. Of course that probably means that I (a resident of Croatia) will not get it until some time later.