How an ( web site update shouldn't be performed

There is a Vzajemci web site that tracks mutual funds available in Slovenia. It is a nice site if one wants to follow the mutual funds situation is Slovenia (they have all sort of news and information regarding mutual funds, plus forum and an option where you can track your own portfolio, etc.) however, they aren't very professional with updating their website. Today is the second day where their web site is severely crippled and practically unusable. At least lately appeared an apology text on the top of the page. It says something like: "We are sorry but due to website modifications some parts won't work."

Now, if it were I, I would create a private clone website, done all modifications there and only then update the public online version. The last step shouldn't take more than 10 minutes (if I exaggerate). Instead they are messing with live website in real time.

The bottom line is that the updates shouldn't be tested on live site. In the era of virtual computers ([VMWare], VirtualPC, etc.) nobody has a valid excuse to do updates like that.

BTW, does anybody know of any web-service that provides daily values of Slovene mutual fund points?

UPDATE (9.8.): Apparently they have legal issues, not technical ones. Duh. Still not working.

Faster way to download Orcas beta 2

[MS] released also a torrent like (remember Avalanche?) application - Microsoft Secure Content Downloader July 2007 Community Technology Preview - that should provide better download (of "select Microsoft CTP's") times as it uses similar technology as torrent and other peer-to-peer software. I won't try it out since I am almost 2/3 done downloading VSTS version.

Note that current version "will only allow you to obtain current Visual Studio 2008 Beta 2"l

UPDATE: My "normal" download of VSTS nuked thus I've installed MSCD downloader and I am now downloading with 3.6Mbps (out of possible 6.0). Not a big speed advantage but at least it is able to resume, I assume.


UPDATE 2: Download is much faster now, it ranges from 5.0 to 11.0 Mbps.

Programmers can fly, really

Just recently I saw that Simon Čopi, my friend and a co-worker from my previous company, is participating and representing the only Slovene team in Red Bull X-Alps 2007 competition - where you have your glider and your feet to cross the Alps (that's 850km). That's awesome and over here we are all crossing fingers for him. Go Simon!

As a curiosity: all athletes are using Nokia NSeries N95s phones to report the position (live tracking).

Global warming is affecting Apple, too

the Inquirer writes that "Apple has lodged a patent for a device charger that works only with one device". In other words, you won't be able to charge your i[THING] with anything else than original charger. They mention that this would be good to make stolen devices unusable and thus preventing thefts.

As people don't have enough chargers already. Instead of thinking how to reduce the number of chargers by unifying them, Apple is thinking about increasing the number of chargers. If your family has two (or more) i[THINGS] you'll need two (or more) different chargers to charge them. This is stupid and I hope it never reaches the production phase. Not to mention the problem if the charger fails.

Apparently global warming and current heat wave is affecting Apple R&D people.

Creating SpinComboBoxEdit control

I saw a question about how to extend [DevEx]' ComboBoxEdit control to include spin down and up buttons in their forums. The buttons should cycle through available items. I thought I could easily create such a control and here it is in all its glory:


Note the two added spin buttons at the right side.

Now, let's test it. Here is my test data:


Clicking on left spin button will set the first value:


Next click on the same button will move the selection forward:


and so on.

And here is the required code

using System; using System.Collections.Generic; using System.Text; using DevExpress.XtraEditors.Repository; using System.Drawing; using DevExpress.XtraEditors.Registrator; using DevExpress.XtraEditors; using System.ComponentModel; using DevExpress.XtraEditors.Controls; using System.Collections; namespace Righthand.Editors { public class RepositoryItemSpinComboEdit : RepositoryItemComboBox { static RepositoryItemSpinComboEdit() { } public const string SpinComboEditName = "SpinComboEdit"; public override string EditorTypeName { get { return SpinComboEditName; } } public override void CreateDefaultButton() { base.CreateDefaultButton(); Buttons.Clear(); Buttons.Add(new EditorButton(ButtonPredefines.Combo)); Buttons.Add(new EditorButton(ButtonPredefines.SpinLeft)); Buttons.Add(new EditorButton(ButtonPredefines.SpinRight)); } public static void RegisterSpinComboEdit() { //Icon representing the editor within a container editor's Designer Image img = null; try { img = null; // your image; } catch { } EditorRegistrationInfo.Default.Editors.Add(new EditorClassInfo(SpinComboEditName, typeof(SpinComboEdit), typeof(RepositoryItemSpinComboEdit), typeof(DevExpress.XtraEditors.ViewInfo.ComboBoxViewInfo), new DevExpress.XtraEditors.Drawing.ButtonEditPainter(), true, img)); } } public class SpinComboEdit: ComboBoxEdit { static SpinComboEdit() { RepositoryItemSpinComboEdit.RegisterSpinComboEdit(); } public SpinComboEdit() { Properties.ButtonClick += new ButtonPressedEventHandler(Properties_ButtonClick); } void Properties_ButtonClick(object sender, ButtonPressedEventArgs e) { if (e.Button.Index == 1) MoveSelection(1); else if (e.Button.Index == 2) MoveSelection(-1); } private void MoveSelection(int index) { int? indexOfItem = null; if (EditValue != null) { indexOfItem = Properties.Items.IndexOf(EditValue); } int newIndex = -1; if (indexOfItem.HasValue) newIndex = Math.Max(Math.Min(indexOfItem.Value+index, Properties.Items.Count - 1), 0); else if (index > 0 && Properties.Items.Count > 0) newIndex = 0; EditValue = Properties.Items[newIndex]; } public override string EditorTypeName { get { return RepositoryItemSpinComboEdit.SpinComboEditName; } } [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public new RepositoryItemSpinComboEdit Properties { get { return base.Properties as RepositoryItemSpinComboEdit; } } } }

Most of the code is required to derive my SpinComboEdit control out of [DevEx]' provided ComboBoxEdit control (see 7.2 help file topic Editor Features/01.Editor Structure/Custom Editors - or previous version help file, just this link won't work).

Points of interests are CreateDefaultButton() method where I create default buttons, SpinComboEdit() constructor where I attach to Properties.ButtonClick event and MoveSelection(int index) method where I actually move the selection forth and back. It should be pretty straightforward to understand.

I hope you'll find this sample useful and take note that this code can and should be further improved as it was a quickly built with demo purposes in mind.

Jumping from 2GB to 4GB RAM makes Vista x86 faster

Recently I've increased my workstation RAM from 2GB to 4GB (all modules are CL4). Although I am running Vista Ultimate x86 and the available RAM increase is actually smaller than 2GB (Task Manager is reporting 3581MB of total RAM) due to x86 nature of OS the speed increase is quite nice. No, I haven't done any benchmarking or anything, I am speaking out of my subjective experience. Was it worth? Definitely. It would be nice to have all 4GB available, but hey, I really don't want to go x64 path (where I would have 4GB available and possibly more), not right now as half of my devices wouldn't work due to the lack of proper 64 bit drivers. Yes, the x64 era for workstations isn't yet here. Unless you really really really need more than 3,5GB RAM I don't see a reason to go with x64.

The bottom line is that if you are doing development (or any other serious job that consumes memory) don't hesitate and jump on 4GB wagon even if you are on x86 OS. Perhaps a word of caution here: some (older) motherboards have problems with 4GBs and you might get a lot less available RAM than me, so check it out before buying RAM. And if you wonder, my motherboard is Gigabyte GA-965P DS4 rev 1.0.