Wednesday, 21 November 2007

motorbike switch

Motorbike hasn't ever liked starting when weather is cold. It's a bit oldish but also needs a service now I think but it won't get that for a few weeks. Last year I got some practice push-starting it before I got new battery. But have seen that even with everything off there is a small current being drawn to somewhere deep inside (not by lights or anything I could disconnect easily. Now hill-start in morning is no problem, push-start is okay, but tires one out very fast.

Charging battery while still connected in motorbike didn't seem to charge it very well. It's a trickle charger and maybe if bettery is in bike the little current being drawn from battery uses up much of the trickle current. Also sometimes ground connection wasn't great, lots of metal bits on bike actually don't conduct well or don't connect to ground I found. And there's no good grip for a crocodile clip to get hold of.

I push-started bike after donating blood one evening ... :-P urgh. And another evening there was almost zero power in battery, push-starting was hard.

I added a switcheroo to my motorbike between battery and everything else. It allows battery to be isolated completely from bike circuit so if bike is not being used for a weekend battery won't discharge. It also gives me a reliable place to connect battery charger clips to.

Switch was lovely for 3 weeks. (my battery lasting > 1 week is SO SO SO nice). Anyway now switch is stuck on (in off position) now since yesterday. oops. Presumably burnt out? Thankfully burnt out so that can still drive bike! >;) Not sure how long it will last! Have tools with me in case. Must open up and have a look. Presumably the fuse right there on bike is 15 amps for a reason!

I decided a 2 amp switch was worth a go as I've nothing else handy. The first thing connected to +ve terminal is THICK cable, 15A fuse and funny potty thing. I've an old kettle switch and toggle switch of unknown ampage and a spare but too large 20amp trip-switch at home. Don't have enough electrical junk :(

peats.ie don't seem to have switches on their website. OHHH ho ho! Maplin have 20A ILLUMINATED toggle switches >;) Hmmm, red, green, blue or amber, ... what do you think? :) Anything more than 10A often have leds in them. radionics.ie maybe.
maplin.co.uk/Toggle Switches

Update: (Dec 2) My 15Amp switch is COMING slowly I hope. In the meantime the switch on bike is actually still working out quite well. The switch mechanism goes through phases of not working and back to working. Weird but theory is that plastic is going soft inside.

Tuesday, 20 November 2007

bash redirection (what "duplication" of file descriptor really means and how to use it.

This has annoyed me for YEARS! Much reading of `man bash` and the internet didn't come up with a solution until yesterday.

from:
http://www.cyberciti.biz/faq/saving-stdout-stderr-into-separate-files/



# save stderr and stdout to seperate files AND show to user
bash$ ((ls gah source/ 2>&1 1>&3 | tee stderr.log) 3>&1 1>&2 | tee stdout.log) 2>&1


Anyway 2>&1 syntax is "duplicating" stderr to stdout. But this sense of "duplicate" has not made sense to be before because in doing 2>&1 then stderr is ONLY going to stdout and not to stderr anymore. BUT using the ()s => AHHH! that's where stderr and stdout are duplicated.

breakdown:

( (ls gah source/ 2>&1 1>&3 | tee stderr.log) 3>&1 1>&2 | tee stdout.log ) 2>&1
(dup stderr(2) to stdout(1) and stdout(1) to fd3 |tee stores what's on stdout (now stderr))
now outside inner ()s
stderr is on fd1, stdout is on fd3, nothing is on fd2
try this: (ls gah . 2>&1 1>&3 |tee stderr.log) 3>fd3 2>fd2 1>fd1
( dup fd3(original stdout) back to stdout(1), dup fd1(original stderr) back to stderr(2)
|tee stores what's on stdout (now original stdout))
now outside all ()s
stdout is on fd1, stderr is on fd2 as originally


All is clear as semi-translucent puddle-water ?

And I'd to look up how to acheive parameter expansion in bash parameter name AGAIN. Using ! is not intuitive.

VARNAME=SHELL
echo $SHELL $VARNAME ${!VARNAME}


bash redirect stderr stdout

Friday, 16 November 2007

scitoys.com has very nice DIY electronics.

http://scitoys.com/scitoys/scitoys/magnets/gauss.html


->o Moo Moo Moo Moo
----------------------

Nothing to do with cows.
M is a magnet.
o is a metal marble.
-------- is a ruler with a groove.
The whole is a gauss gun.


Make a REALLY BASIC motor: http://sci-toys.com/scitoys/scitoys/electro/electro.html#motor

Sunday, 11 November 2007

Snap Circuits by Elenco

I found Snap Circuits by Elenco while searching for a 15Amp switch for motorbike on maplin.
Looks lovely. Reviews on Amazon look good.
Only problem is maplin don't make credit card payments easy :(
To authorize credit card got email from maplin, phoned up credit card team.
Told to wait for access code sent via snail-mail.
It's two weeks now (Dec 3) have been so busy work/home haven't had a chance to phone them and find out what's up.

http://www.amazon.com/Elenco-SC-100-Snap-Circuits-Jr/dp/B00008BFZH
http://www.maplin.co.uk/Module.aspx?ModuleNo=98971&criteria=snap%20circuits&doy=3m12

Wednesday, 7 November 2007

The problem with God-faith-religion[tm]

Executive summary:

The main problem as I see it is that God-faith-religious[tm] people can (and all the time do) abdicate responsibility (for all kinds of everything) to a "higher power". The instructions they receive are not from a "higher power" but from a group of humans.

I have been very respectful to any religion before. But I have also been growing more concerned about the danger of having huge groups of "faithful" people who believe they have a God-given right to push their particular rules anywhere. Stupid ideas might actually perhaps be deserving of some disrespect.




I found book "The God delusion" and started reading it last weekend.
wikipedia: Richard Dawkins

He's preaching to the converted (HA HA!) and I didn't think I'd be interested reading if I agreed. Two of Dawkins points I'm finding interesting follow, they're very complimentary but distinct enough that I'll seperate them.

1. That atheists should be more actively atheist and more vocal. Atheists are not organised as a group and the G-f-religions[tm] have the powerful political lobbys that run the countries we live in. So it is important for atheists not to be closet atheists. And it's important to evangalise atheism (Ho ho!). I've been concerned/thinking about problems the God-faith-religious[tm] mentality has mostly latent inside it but not sure what could be done about it. Even with our kids we're starting to see how they are now at a disadvantage (a small but pervasive disadvantage) when it comes to choice of schools.

2. All of society gives a huge respect to all G-f-religions[tm] (except for maybe the poor Pastafarians!). And the G-f-religions[tm] expect it. AND they're offended if this respect isn't enthusiastically and fully granted to every aspect of the funny G-f-religious[tm] rules that have been imagined and evolved over the years.

You know, he is DEAD right with point #2 there. I (and I think atheists in general) would be very respectful of other peoples beliefs and cultures and want to be very open-minded. G-f-religions[tm] themselves are probably the groups that are least respectful to each other. There are some (some? more than some maybe) bad things I can think of about any G-f-religion[tm]. I think I have been deluding myselfmy earlier religious indoctrination that a belief in God is good and right has deluded me into thinking it is harmless to allow some of these bad things to persist (and hence possibly to grow) because _most_ of the G-f-religion[tm] is pretty reasonable and good (and after all of course most of the people in the G-f-religion[tm] don't _REALLY_ believe every nuance of weird detail, ... do they?).

Essentially I'm thinking now that it is dangerous for society to be giving these G-f-religions[tm] too much respect. It's like looking the other way when first you see minor bad behaviour. Soon you're looking directly at abuse and torture and you can't do anything about it.

Heh Heh. This person does disrespect nicely :)
youtube: Pat Condell



What's this God-faith-religious[tm] stuff? Gah. Traitor (English) language! :)

English (and maybe every language?) doesn't have a good vocabulary for describing enthusiasticcomitted atheism. You can say you are religious about your food, about your operating system, about your favourite author/newspaper/politics, even about your philosophies and science. And people understand there is no God involved (more-or-less). But can you say you're a religious atheist? HAH. It doesn't quite work. You can see the argument G-f-religious people use often attacking atheism because the atheist is as "religious" about their atheism as they are about their delusion.

Dawkins also talks about the use of the word religion (or spirituality). I see these words as being so inherent in the language because of a few thousands of years of belief in Gods and religions that you can't express some ideas which have no God. There I go respecting God too much again and giving it a capital letter! :) e.g. atheists would describe themselves as having a spirituality consisting of a philosophy of beliefs in the human race - this sounds very religious but it is NOT it is a Godless spirituality.

For me (and others I think) the word "religious" is naturally a word devoid of God because of course there is no God. To me religion simply means the whole structure of a group of people that believe in this kind of God or Gods and follow these particular rules. It's completely natural for me to know there is no God. I'm very very certain of this (of course allowing for a minute (NEGLIGABLE! (hmfph, emphasis of negligable? is that an oxymoron?))) probability which must be allowed by scientific open-mindedness.

This meaning of religion is so obviously not so for God-faith-religious people. A bit scary if you think how different their mindset must be.

I wouldn't have been a closet atheist exactly, a very VERY quiet atheist though! :) It seems just to very rarely come up.

Maybe I'll start by getting a Pastafarian t-shirt! :)

Wednesday, 31 October 2007

Halloween day was interesting me = VERY-bad-public-enemy-#1-guy[tm]


Halloween morning was VERY interesting.
I got to be the VERY-bad-public-enemy-#1-guy[tm] trying to keep a group of 10 to 20 kids (maybe from 8 to 14) away from council people collecting bonfire rubbish.

Background:

I quite like Halloween and do think people should have their fun. I also like bonfires etc and wouldn't be against a bonfire by itself. Is FUATH liom (I HATE) the nanny-state mentality. Kids have to learn for themselves and do some naughty/dangerous things. BUT if they are caught at this by adults I think it is very healthy if they get a little bit of a telling off. People have to tell kids if they're doing wrong, if they can do wrong and see that adults look the other way then there can only be more trouble ahead. Part of parents job is to be boring/cross I suppose. And other adults please parents don't (YET :) ) have full 24/7 satellite monitoring of their kids so it's up to everyone in society.


Preliminaries:

This year I guess the critical mass of people against the bonfire was achieved so the residents were actively discouraging it. Lots of people I think are pro- the bonfire too but they didn't speak up this year.
Should be interesting to see what way it swings next year.

There was a more active advertising campaign against bonfires by the council this year too e.g. http://www.dlrcoco.ie/halloween.pdf I'm not really persuaded by the environmental argument BUT I can see that the bonfire and fireworks become more and more and more every year.

It's great fun maybe but it's taken advantage of and happens to be a night where we see some of our social problems! :-P One thing is at the bonfire last year (and previous years but to a lesser extent maybe) was that there
were teenage-adult visitors by foot or car with alcohol and fireworks. Over by the bushes or near the bonfire was a very uncomfortable place to be if you were adult or for the younger/local kids. Some of the visitors were saying
they were from Tallaght, some were from Foxrock. Maybe they were coming to a bonfire which had least adult control/interference ?

What for me personally was the main reason for being against the bonfire this year and being willing to see what happened if we were more active against it was being told by the younger kids on this estate that last year when the council came to collect rubbish that THEY PICKED UP THE STICKS AND STARTED
HITTING THE VAN AND TRACTORS
that had come!!

Now our estate is very wussy-upper-middle-class[tm] and for a mini-riot[tm] (albeit a wussy-upper-middle-class-mini-riot[tm]) to happen so trivially is very dismaying to me.

So anyway that is why I'm willing to do something about it. I don't see any particularily effective or easy solution against the social problems but some discouragement of bad activity is appropriate. One thing the council do is collect the bonfire waste. This could I think never be 100% effective sbut it would make the
bonfire smaller. Unless you had lots of adults supervising the area the whole evening and night that you would never prevent a bonfire anyway.


The way the bonfire works: They're illegal but kindof traditional. Kids have the week off school (mid-term) which they
can spend in the very active and healthy (physically & socially) :-D manner of collecting rubbish (from skips, from businesses, ... whatever). Lots of hard work is put in.

The council always attempts to collect the rubbish where it is gathered and take it away. So it is stored in hiding places, in our case behind bushes and trees at side of green or in a derilict site/field nearby. Last year the council said they encountered child residents who asked them not to take it away (reading between the lines: picked up sticks and started hitting the vehicles).

So to support the council the idea is to have adult residents present when the waste is being collected. The council has a busy day and doesn't give exact times for collections so you need people available all day.

Story:

So early enough Halloween morning the vans & tractors appeared and got to work. Fionn phoned other people and I headed over. I said hello to council people and immediately a group of kids arrived over. They immediately were upset and went to grab wood which council was throwing out from behind bushes. I spent next 20 or more minutes robustly trying to explain and argue with voice all the time while also pushing (trying to be gentle) kids away from the work. Kids did manage to keep on getting wood but they were focussed on arguing with me and getting around me so I think the workers at the main pile of wood were mostly unhindered. Kids tried some different things, went to go for tractor/trailer and were very active vocally. Some lady residents came shortly after start and kids noticably became a bit less angry-violent but still very active. In fairness to kids not one of them threatened myself with injury and there were lots of sticks with nails sticking out around!!

Very confidence-inspiring-NOT to have 2 of the council workers telling me "I saw you pushing those kids", "that's assault" etc. Kids were saying they would phone gardai, child-line, etc. Please don't waste the services time who are trying to do something about REAL problems. And do go home and bring your parents over! Do teachers have to put-up with this the whole time? Sheesh.

After main pile was gone council did not wish to go into field and collect what was there. I was telling kids they could have hidden it better :-) :-E But that there was still loads left for a bonfire. Kids stood on wood they had collected (who thought of that). That was effective! I'm definately happy for them to have a nice peaceful protest. Council headed away and I stayed trying to explain to kids for another good while.

Kids were very upset and some had tears in their eyes but their arguments if anything made me more resolute. They were saying alot that it was tradition and it was their right to have a bonfire. It's hardly a right, um, they're illegal too! (in the Irish-acceptable-illegal kindof way) I ended up thinking we're a bit spoilt if we get very upset over PARTIAL-denial of a bonfire.

We got some video of bits of this. Nobody came to any harm anyway (maybe me mentally a bit!) It spoils Halloween, leaves a not-nice feeling but I think sometimes you have to stand ground (even if the immediate issue isn't quite the thing you're fighting against?)

Rest of day:

Well I was working. Got lots done actually. Running tests and checking memory use with libumem. Testing and merging to trunk. Adding debug and tracing sequencer lock-up problem. Fixing Retransmit-Manager avalanche when overloaded. Gemma made a release.

:)

In afternoon residents had organised a Halloween party on Green. I saw the start. Gazebo up and two teenage facepainters mobbed by loads of kids. The kids I had arguments with in morning helped move Gazebo out of way of council cutting the grass. Halloween pinatas, candyfloss machine. Ghouls vs Vampire football. I went out at very end VERY briefly and there was a lovely atmosphere.

Halloween evening:

Our house was a bit decorated but not much - windows painted. Nice carved pumpkin and I carved two more while manning door.

Kids had great fun. Kate was a pink shoe. Maeve was a witch. Daire was a scary thing with no face. Maeve would not let me put on Frankensatein suit. Maeve was with me after a bit and quite liked answering door and distributing sweets.

Bonfire was lit early enough 17:30/18:00 ? But very soon after Garda car drove past. And after that nobody was over there! Why, if they so wanted a bonfire? And if the collecting the wood is the fun part :) ... then why not just collect the wood and leave the council take it away without hassle!? :) :D :-P Okay, I'm joking a bit. Fionn asked them again next day and it was partially that their parents didn't let them go over if there were no adults there and also that there were older people drinking in the bushes and at one stage throwing fireworks at people who came near. So the kids were scared to be over there anyway. Adult presence would have helped but adults were also scared to go over and adult on green shooting fireworks retired because of getting fireworks shot at them.


After:

So.

Hmmm.

Interesting.

If people want it safer then we need an adult presence for the night in the area (to make things more boring). If kids really want a bonfire then I think get their own parents and more adults to support and run it. I'd help but NOT going to do anything without good support. Going all the way getting licence for legal one I think would be very difficult.

Close by in Sandyford-hall/Fernleigh they have an unofficial but adult-supervised one. This is much better I think but this year they had some problems with the crowd? Maybe kids from our area and people that came to our bonfire moved on to there moving the problem ? :-7 Humm. Or maybe these things just start small and always grow until it gets a bit problematic then ... well we're a biological system and if your graph these things they can grow, oscillate or stabilize somewhat for a time, but always eventually peter-out.

Looking forward to next year now! :) Will at least be interesting.

Monday, 15 October 2007

Another email to Dublin Bus. Bus went wrong way. Yikes. Kids got off near Renault garage,

Another email to Dublin Bus.

Subject: 44 bus (one missing Thur Oct 12, wrong route Fri Oct 13)

Hello,

1. missing bus 12/10/2007

Could you find out what happened to the Enniskerry->City Centre 44 bus on 12/10/2007,
the bus that arrives at 8:10ish at Kilgobbin Road. It did not arrive.


2. wrong route 13/10/2007

The route for that bus has changed due to roadworks on the Sandyford road.
We have two children who take that bus to school. Ages 9 and 5.
The first mornings of the route changes we accompanied them on the bus to
make sure they were familiar with bus stops.
On Friday they were with another family, the eldest in the group was 12 years old, they
were not accompanied by an adult.

On Friday the 44 bus got lost and instead of turning down the Drummartin link road it
drove on into Sandyford Industrial Estate. The bus left the children off somewhere near the
Renault garage. Because they know the area they were able to make their way to school.

This is of great concern to us.
We are not sure what information the children and driver exchanged.
We know mistakes can happen but hope that if they do happen then
the safety of the children is not put at risk.

A different morning the driver did not stop at the normal school bus stop and was
unfriendly to the children. "That's not my problem!"
They were left off just down the road thankfully near a pedestrian crossing.

Many/most drivers I think do take very good care of their passengers but we are concerned
if some drivers, especially on school mornings, don't take some consideration for younger
passengers.

Does driver training include care and consideration of passengers of different abilities
and is this can be reinforced by Dublin Bus on an ongoing basis?

What would be the minimum age of children that would be expected to be travelling
unaccompanied on the bus? (for short local trip)
- Note that if we encourage more use of the bus then it is more likely that there
would be a number of children from the same school on the same bus every morning and
every child in the group is safer as a result.



I would really appreciate it if you can investigate the incidents for us and find some
information on your policies with regards training and young passengers.


Sincerely,

James.