Monthly Archives: September 2012

Battery or dynamo hub powered front light, the big decision #cycling

At present I have an Air Bike P7 Ever Light (SCC P7 LED, 700 lumens) and it’s been working well for several years now but a while back the cat chewed the charger cable, so I patched it up, but the lamp cable has also been patched up, the lens is cracked and the reflector surface has bubbled in places too. Sure, it still works, but a replacement is overdue.

I can’t afford a decent branded battery pack light (oooww Betty) or a SON dynamo plus a decent lamp. Given the price of the MagicShine lights I’m tempted to buy one, but I’ve also been thinking about a dynamo. Dynamos seem expensive, mostly lack a flashing mode for daytime use and quick release would have to be a DIY solution too. Why am I still interested in a dynamo? Well, the modern battery front lights have such poor runtime that I find it annoying to have to keep charging it, my rear lights last the week so they can happily be battery powered without getting annoying. Fortunately Busch & Müller’s IQ DRL lamps aren’t that expensive and have a Daylight Running (flashing) Light, so if I can keep the price of the hub and wheel down then the only issue is a DIY quick release bracket, I can deal with that. Another thing about a dynamo (in theory) is that I can upgrade or replace the lower costing lamp in future, so when the IQ2 is widely available I can upgrade (or just wish I’d have waited for it). Nexus and Bluebell have different wheel sizes, so I can’t swap it between the bikes, but then I’ll still have the Air Bike that I can use on the lesser used Nexus if I have to.

Finding somewhere that sells dynamo hubs laced into rims isn’t that easy either, some don’t, they only sell the components, some say you’re going to have to contact them with your requirements and they’ll create the custom order for you. A few people recommended Bike24, so I went there, they do sell the built wheel, but unfortunately the cheaper dynamos were out of stock, after some huffing and puffing I decided to just splash out a bit (no, not on a SON, I can’t splash out that much!), here’s what I ordered:
Supernova Infinity S dynamo hub laced into a Mavic XM 719 rim (center lock or rim brake) – €229.90
Busch + Müller Lumotec IQ Fly RT Senso Plus LED Front Light with DRL 174QRTSNDI – €49.90
Total = €279.80

The downside (there always is one) is Bike24 are based in Germany (hence the Euro price tag), so I’ve no idea how much it’s really costing, but I figure if I can afford it in pounds then it’ll be fine.

Wish me luck!

Advertisements

Bluebell survived day 1 in the wild on her own #cycling

My locking up strategy, hopefully it will keep her safe….

20120924-230358.jpg
20120924-230416.jpg
20120924-230605.jpg
20120924-230614.jpg
I tried to lock the front wheel and frame, but these kryponite locks don’t see wide enough some how.

New job, new cycling decisions #cycling

My previous office had a bike shelter in the car park, facilities for cycling other than that were non-existent, but one can change in a toilet cubicle, use baby wipes for the private areas and wash hair, face and hands in a sink (or toilet, whatever you like). I was fine with this for nearly two years, it wasn’t ideal, but I got used to it, so showers at the office aren’t a requirement for me now, but they do encourage others, if there’s not a shower then some won’t cycle, it’s one of those things.

Where was I heading with this, oh yes, my new job which I hope will progress into “my job” in a few months is in a town centre. This location brings numerous benefits, but there is even less provision for cycling, I am indeed shocked and appalled by this. How can the provision be less than practically nothing? Well, nowhere safe to store my bluebell, that’s how.

Q: Accept a job even though there is no guarantee of safe parking?
A: You can always buy a clown bike and store it under your desk
– No thanks, unless no other option.
A: Are you kidding? Job first, figure the rest out later
– Yes, fine, job accepted.

First couple of days have been train plus walk, it’s horrible and my legs can’t take all this walking, though the train isn’t that expensive (yet).
Thoughts of driving are ruled out by awful traffic and parking at £15 per day.
So I NEED my bike but the bike storage is now confirmed as rubbish!

Q: So bike under the desk, what about those dirty days when the bike will drip filth everywhere if I brought it inside?
A: That’ll get them to provision something PDQ
– Not sure I want to rock the boat in my new job just yet.
A: You can buy special bike bags for this
– Sounds like a faff to me and the outside of the bag will still get wet / dirty in the progress, I think my bike belongs outside, especially given my lack of cleaning routine

Q: Other options?
A: There’s storage on the flat roof, you could use that? There are also railings to lock it to.
– I’d have 4 or 5 flights of stairs to carry the bike up inside the building, not to mention the weight of it all, the filth issue above still comes in. Though that would be the safest storage option.
A: Pedestrian crossing railings outside the office
– I’d worry about that location, seems a bit like irresponsible parking to me, would my bike be removed by the council, etc.
A: The station parking
– Too far to walk from there up a hill to the office, you also need a season ticket for the cycle lockers too, so I’d be using the unsecured parking and I’d definitely need expensive cycle insurance, my locks are plenty high enough on the security ratings, there’s vandalism to worry about as well as theft.
A: Local bike parking e.g. hoops outside the library or school
– Similar concerns to station, though close to the office, there’s no guarantee I could get a space, but on that day I can always fall back to a different option, or turn around and go home in protest.

Q: Couldn’t you use the Nexus bike rather than worrying about the theft of Bluebell?
A: I’d rather slit my wrists, I tried the Nexus recently and I think I’d have to buy a better bike, but that’d again be at risk of theft, probably more than Bluebell, though she is expensive, she doesn’t have the coolness factor the thieves are hopefully looking for.

Q: When would you ride Bluebell if you used a different bike?
A: The Burley doesn’t fit it unless I get a new hitch, so probably never.

Q: Is there any point owning Bluebell and not riding her?
A: No, I suppose not.

Q: What will I do if my Bluebell does get stolen?
A: Cry and claim on insurance?

Q: Would you replace Bluebell?
A: Tricky question, I’d have to cross that bridge when I came to it, but it’s probably not worth it, the replacement would only get stolen too.

So it looks like the local bike parking plus hefty insurance and my hefty locks is going to be my first attempt, let’s see how I get on. Wish me luck!

The all important first ride (in a Burley) #cycling #burley

I’ve finally got around to posting this up…

The first ride, important for both me and the baby.
Unfortunately the Burley only fits the Nexus bike, because of this issue with Bluebell (Thorn Raven Sport Tour):


Easily solved by buying a new (different style) hitch, but as of yet I haven’t.

The setup:

Ready:

Test ride, you’d be amazed how bumpy my lawn is!

Out on the open road:

I then took him on a short loop (max 1 mile), he was quiet the whole way apart from when he started complaining because we were waiting for a while (OK, ages!) at a set of traffic lights.

My Burley is second hand, it’s a Burley Solo, I’m happy with it, though I have nothing to compare it to, so I won’t review it other than to say they are a big investment.

Since this I have taken him up a mid sized hill (i.e. a hill that is a bit of a grind, but my chest doesn’t feel like it’s going to explode), sure it was a grind with him on the back, but fun to whizz down the other size as roadies were slogging up it, some had a bemused look about them, as if to say how did you cycle up this hill with that on the back?

WPF Window (or do I mean View) Navigation (or do I mean switching, opening, closing…) part 3 #wpf

Following on from my post WPF Window (or do I mean View) Navigation (or do I mean switching, opening, closing…) part 2 I have finally put together the view switching part, here goes…

First I added two User Control (WPF) items (for now I’m going to keep these in a new folder called SubViews) and a MvvmViewModel (WPF) for each:
Nav\Views\SubViews\UC1.xaml + .cs
Nav\Views\SubViews\UC2.xaml + .cs
Nav\ViewModels\UC1ViewModel.cs
Nav\ViewModels\UC2ViewModel.cs

Next I added some dependency properties to my ViewModels using the mvvminpc snippet.
Starting with UC1ViewModel, I added Val1 of type String:

        /// <summary>
        /// The <see cref="Val1" /> property's name.
        /// </summary>
        public const string Val1PropertyName = "Val1";

        private string _val1 = "";

        /// <summary>
        /// Sets and gets the Val1 property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public string Val1
        {
            get
            {
                return _val1;
            }

            set
            {
                if (_val1 == value)
                {
                    return;
                }

                RaisePropertyChanging(Val1PropertyName);
                _val1 = value;
                RaisePropertyChanged(Val1PropertyName);
            }
        }

Similarly I added Val2 to UC2ViewModel.
These are just something to bind to and display.

Next I added a dependency property of type UserControl and called UC to AnotherViewModel, I will bind to this and change this to swap the UserControl that is displayed:

        /// <summary>
        /// The <see cref="UC" /> property's name.
        /// </summary>
        public const string UCPropertyName = "UC";

        private UserControl _uc = null;

        /// <summary>
        /// Sets and gets the UC property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public UserControl UC
        {
            get
            {
                return _uc;
            }

            set
            {
                if (_uc == value)
                {
                    return;
                }

                RaisePropertyChanging(UCPropertyName);
                _uc = value;
                RaisePropertyChanged(UCPropertyName);
            }
        }

Of course next I needed the UserControl instances and commands to swap them, I added them like so:

        private UC1 _uc1;
        private UC2 _uc2;
        public RelayCommand Swap1a { get; set; }
        public RelayCommand Swap1b { get; set; }

And in constructor:

            _uc1 = new UC1() { DataContext = new UC1ViewModel() { Val1 = "AVM uc 1a" } };
            _uc2 = new UC2() { DataContext = new UC2ViewModel() { Val2 = "AVM uc 1b" } };

            Swap1a = new RelayCommand(() => { UC = _uc1; });
            Swap1b = new RelayCommand(() => { UC = _uc2; });

Next up was to add code to ViewModelLocator to add design and blendability.
Using the mvvmlocatorproperty snippet I added a property for use when designing the UserControls, notice I don’t use the IoC container in this case:

        /// <summary>
        /// Gets the UC1VMDesignTime property.
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance",
            "CA1822:MarkMembersAsStatic",
            Justification = "This non-static member is needed for data binding purposes.")]
        public UC1ViewModel UC1VMDesignTime
        {
            get
            {
                if (ViewModelBase.IsInDesignModeStatic)
                {
                    return new UC1ViewModel() { Val1 = "Designing val1..." };
                }
                else
                {
                    return null;
                }
            }
        }

        /// <summary>
        /// Gets the UC2VMDesignTime property.
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance",
            "CA1822:MarkMembersAsStatic",
            Justification = "This non-static member is needed for data binding purposes.")]
        public UC2ViewModel UC2VMDesignTime
        {
            get
            {
                if (ViewModelBase.IsInDesignModeStatic)
                {
                    return new UC2ViewModel() { Val2 = "Designing val2..." };
                }
                else
                {
                    return null;
                }
            }
        }

I also changed Another so that at design time there was data in the UC:

        /// <summary>
        /// Gets the Another property.
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance",
            "CA1822:MarkMembersAsStatic",
            Justification = "This non-static member is needed for data binding purposes.")]
        public AnotherViewModel Another
        {
            get
            {
                AnotherViewModel avm = ServiceLocator.Current.GetInstance<AnotherViewModel>();

                if (ViewModelBase.IsInDesignModeStatic)
                {
                    avm.UC = new UC1() { DataContext = UC1VMDesignTime };
                }

                return avm;
            }
        }

Finally I wired it all up in the xaml files.
UC1.xaml:

d:DataContext="{Binding UC1VMDesignTime, Source={StaticResource Locator}}"
....
<StackPanel>
	    	<Label Content="uc1" Height="28" Margin="8,10,0,0" x:Name="label1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="36.803" />
	    	<TextBox x:Name="txt1" Margin="83,0,111,0" TextWrapping="Wrap" Text="{Binding Val1}" VerticalAlignment="Top" Height="49.96"/>
	    	<Label x:Name="lbl1" Content="{Binding Val1}" Margin="68,0,71.007,58.04" VerticalAlignment="Bottom" Height="44.96"/>
		</StackPanel>

UC2.xaml:

d:DataContext="{Binding UC2VMDesignTime, Source={StaticResource Locator}}"
....
<StackPanel>
    		<Label Content="uc2" HorizontalAlignment="Left" Height="35.96" Width="54" />
    		<Label Content="{Binding Val2}" Height="39.96" Margin="78,0,40,0" />
        </StackPanel>

AnotherWindow.xaml:

        <ContentControl x:Name="ContentControl" Content="{Binding UC}" Margin="177.5,82,110.5,0" Height="255" Width="464" VerticalAlignment="Top">
        </ContentControl>
        <Button Content="Swap to 1a" HorizontalAlignment="Left" Margin="0,0,0,124.04" VerticalAlignment="Bottom" Width="75" Command="{Binding Swap1a}"/>
        <Button Content="Swap to 1b" HorizontalAlignment="Left" Margin="0,0,0,98.08" VerticalAlignment="Bottom" Width="75" Command="{Binding Swap1b}"/>

Note that d:DataContext is ignored except at design time, so we have the ability to chose a design time model and I have coded those models so that they are null when not in design time anyway. I really like how that bit turned out, it’s really nice to have something you can design later (or pass onto a designer), there is nothing worse than a broken view that you can’t use in VisualStudio or Blend.