One of those features I forgot about
Sat, 28 Jun 08, 02:19:33
filed in
Python
Always nice to remember a feature in Python that I haven't used for ages. This happened to me the other day with this... given a list:
x = ["hair", "brown", "eyes", "blue"]
How do I get the hair and eye colours easily? One way, the oft forgotten 3rd argument to list slicing:
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
>>> x = ["hair", "brown", "eyes", "blue"]
>>> for z in zip(x[::2], x[1::2]):
... print z
...
('hair', 'brown')
('eyes', 'blue')
Screw you Rogers
Fri, 27 Jun 08, 14:02:27
filed in
Canada
Well Rogers is going to be screwing the Canadian's royally that's for sure. The details are here for the new iPhone plans. But a quick precis.
- A three year mandatory contract. Yes three years, twice as long as O2, 1 year longer than AT&T.
- The top plan $115 a month (about 57 pounds or 133 US dollars) gets you 800 minutes daytime, unlimited evening and weeknds and 2gb of data.
- For an extra $20 a month you get "Caller ID, Who Called, Caller Ring Trax" and evenings starting at 6pm (apparently its normally 9pm)
Wow so that's a monthly cost $135 + $6.95 (system access fee) + 13% (plus GST and PST) = $5,776.56 in monthly fees over 3 years. Let's compare this to some other countries:
|
Data |
Daytime |
Evenings |
Text |
Length |
Cost per month |
Handset cost |
| US |
Unlimited |
450 |
Unlimited |
200 |
24 months |
70 CAD |
200 CAD + 36 CAD |
| UK |
Unlimited |
1200 |
Unlimited |
500 |
18 months |
~90 CAD |
Free |
| Canada |
2GB |
800 |
Unlimited |
300 |
36 months |
~160 CAD |
199 CAD |
The most expensive Canadian plan is outshone by the third most expensive O2 plan (source) and the cheapest AT+T plan (source). Yes I'm assuming unlimited data is the most important.
Shame on Rogers and shame on Apple, who know damn well what the costs were going to be. I can only hope the sales are dismal and instead in 6 months time Rogers loosen up or competition comes into the market place.
Update:
Where is that python module again?
Tue, 24 Jun 08, 07:32:49
filed in
Python
For people like me with multiple pythons installations and can never remember his current modules are installed, I added the simple script, where-python:
python -c "import $1; import os; print os.path.dirname($1.__file__)"
And hence:
$ where-python django
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django
We need more developers
Sun, 22 Jun 08, 15:58:13
filed in
Plone
One common things I've heard in the Plone community, is that people are always struggling to find developers. This is often seen as a real problem not only for the consulting companies but also for Plone itself. This problem is common to many development areas, but the unique nature of Plone means that it's situation is rather exacerbated.
For quite a while I've had an opinion that people often jump on the "we need more developers" mantra when they don't need to. The term developer does mean an awful lot of different things to different people. To me a developer is a skilled professional that can solve complicated technical problems by developing solution. Alright that's a broad definition, would just programmer be better?. In the past I've worked with many people I would call good or even bloody great developers (thinking specifically here of Mark Hammond and Sidnei da Silva). I've also worked with some bloody incompetent ones and fired them.
There's a few things that I think are true about good developers:
- They are hard to find.
- They are hard to keep.
- They can be hard to manage.
- They can be productive.
- They can solve problems others can't.
Given that, I do try and approach the problem of finding more developers a different way. Instead by focusing on the developers you have got, more productive. A developer cannot hold a company to ransom and has to be reasonable, but likewise the company has to recognise that once you've got that person, hold onto them and keep them productive.
How can you make a developer more productive? Well first off I'm making an assumption that lots of people are cheaper than those good key developers we all need. If that is the case, the main way is push work off on to other people.
System administration is absolutely crucial. The other day one of my virtual machines stopped working whilst I was on a tight deadline. After looking in despair at that virtual machine, I wandered over to a sys. admin. and ten minutes later it was fixed. That saved me around 4-8 hours of work. Time and time again I've seen developers pulled into things I would classify as system administration.
One example is (from what I gather) at Google where allegedly there's a technical support centre's all throughout the office. Laptop's broken? Pop on over and we'll give you a new one. At ActiveState I remember that new servers were not a problem. The cost of a new server compared to the cost of a developer sitting and waiting for something to compile makes the decision clear, get the server.
Testing is a crucial part of the development cycle. Yet testing in small companies is often left to the developer or project manager. Testing is a discipline in it's own right and beyond unit tests can easily be pushed off on to testers.
User interface creation is an annoying one to me. Time and time again I've had designers plonk a few photoshop designs on me leaving me to figure how its possible to create those designs in HTML and CSS or whatever we are building it in. Or I've got to spend hours and hours creating forms or other things. Things that could be done by a quite junior developer who knows how to code HTML.
Specifications may or may not need a developer to write. Finding the right line between specifying too much and doing too little is something that I've been called on in the past. However, I still feel that 90% of the time, specifications I am given as a developer have just not faced a technical or critical eye. What if X isn't working what happens? What fields are you wanting on that page, how long are they, what are the validations. Simple things that are taught in most design courses.
The more of the specification work that can be done prior to a developer looking at and starting coding, simply eliminate more of the developers time and reduce the developer - project manager - client cycle. It still will happen, but it will happen less.
Administration is harder, but sometimes there's clear things that can be done by others, this one should be reasonably obvious.
Tools that they want to use. Everywhere I've worked has been really good on this, although I do think that many places need to focus more on training. If you are spending all this money and time on a developer and they want a Mac? Get them one. They want a big monitor? Come on how much do these things cost in the big picture.
This is all hard to measure of course, but I'm curious on other opinions. When people say they are short of Plone developers, who are they looking for gods like Martin Aspelli? If you were able to prise them away from their job, would you be able to keep them happy? Would they stay? Would it make sense to have them spend all their time reading crap specifications (if they get any), chasing stupid system administration problems or coding HTML? Or would you want them solving the hard problems?
Climb up Helvellyn
Sun, 22 Jun 08, 14:49:08
filed in
England
This weekend was the longest day, so my father and I decided to climb Helvellyn. Not of course a normal hike up, no we decided to hike up in the evening so we could watch the dawn rise on summer.
Hiking up England's third highest hill overnight is not as crazy as it sounds, until about 1am it wasn't really dark, the sun set about 11.30pm but it never got really pitch dark. Until about 1.30am when the wind picked up the cloud descended and we said that's it time to hide behind rocks before we do something daft like fall off the hill.
About 3.30am the clouds and winds lifted and we saw an absolutely glorious sunrise with about 20 or 30 other people on top of the hill. Helvellyn's eastern side is a very, very steep slope and the view goes for a very long way. Would do it again, but next time we'll head up a bit later so we have less time hanging around on the top of the hill.
How the CPI is calculated
Tue, 17 Jun 08, 13:57:48
filed in
England
According to everyone, inflation is running rampant in this country. Everything is going up at a crazy rate and yet the Bank of England says it's at 3.3% using the CPI. This seems completely at odds with what the media is telling us. For example: BBC or Guardian.
So how is the CPI calculated? Well there's a good article which basically lists its contents and I believe the offical CPI document is here: http://www.statistics.gov.uk/pdfdir/cpi0608.pdf.
What I was curious about are the weights. I'm sure there's some good theory that show's why these numbers are what they are, but there's some interesting things in there.
For example (page 12) the weighting given to meat (01.1.2) and fish (01.1.3) is 26. Slightly less than furniture, furnishings and carpets at 28. Money per month spent on furnishings can fluctuate greatly a new sofa one month will be a big peak that might equal a years spending on meat and fish. But certainly if meat (9.1%) and fish (8.8%) have been rising rapidly, you'd notice it. Furniture, you wouldn't (3.1%).
Liquid fuels (04.5.3) has risen at 84% but at a miniscule weighting I can only assume that's not petrol. That's in 07.2.3 and has risen at 19.5%. It's weighting is 38. That's slightly more than furniture. But that's the same or less weighting as 09.3 Other recreational items, gardens and pets (at 38), 03.1 Clothing (at 55), 11.1 Catering services (at 118). So yep we spend more on all those each month than petrol, 5 times more in fact.
Here's where I make some assumptions and make things up. With a total weightings of 1000, that means petrol accounts for 3.8% of the total basket. Which means that it would take a lot more increases in petrol to bring the CPI up higher. [1]
The price at the pump seems to reflect a small amount of expenditure (and in my back of a pad calculation I say it accounts for 8% of my disposable income, probably due to my long commute), yet it seems to evoke a very strong worry in people. Perhaps its because its an expenditure I really notice. Council tax (not part of the CPI)? Let's face it I hardly notice, I get the bill fret about it, complain about it, write a blog, get annoyed, put it on direct debit for the year and then worry about the next bill. But the petrol is there and going up every time. There's no "special buy 1 litre get one free", no direct debit, its in your face every day.
Anyway that's my brief trip back to my economics degree. Apologies if I've just got all this wrong.
[1] Yes I'm naively ignoring the effect that petrol rising would have on everything else in the economy and causing a feedback loop and other goods to rise.
Fuel prices
Sun, 15 Jun 08, 10:27:09
filed in
England
This last week there's been fuel protests by truck drivers all over the UK. Yesterday as we drove to Chester zoo I saw one coming the other way. They've been interviewed on the radio and so on. Quite frankly i've had enough.
Yes it sucks that petrol and diesel is expensive. But it's not going to get much cheaper. It's a finite resource, it will run out. The only question is how soon and how high will it get. The transition away from petrol will be very painful, the whole economy has changed over 20-30 years to become dependent upon it. Reducing consumption now, increasing alternatives now is the only way to ease the pain. Rather than just putting it all off and waiting for the cataclysm to hit your kids.
Every time I hear of a petition on the radio to stop road pricing I just want to start my own supporting anything to stop the insanity. I think next time there is, I will.
iPhone, yadda, yadda
Mon, 09 Jun 08, 16:25:04
filed in
Canada
Finally it's got the 3G and GPS and I need. But more importantly, according to Apple's websites, it's officially coming to Canada on July 11th. Canada doesn't have any official iPhone at all at the moment. The real question about when I land back in Canada is, should I go straight to the new Apple store, or go and see the in-laws first?
ARAX rubbish
Fri, 06 Jun 08, 14:01:55
filed in
Python
This post on eWeek (via Slashdot) had me annoyed.
- It's a Ruby conference. "Microsoft is pushing a different scenario, known as Asynchronous Ruby and XML, or ARAX". Pushing isn't the word I would use, showing off that silverlight can host scripting languages is more likely.
- Yes writing Ruby as opposed to the RJS stuff can be more productive? Well duh, I've blogged about this before and my opinion of RJS is low. There's nothing wrong with JavaScript and learning it is not difficult.
- Silverlight supports lots of languages, in fact it supports CLR, .NET and hence a lot of other stuff. A nice overview is here and information about the DLR is here.
- Want to use Python with Silverlight in your browser, well go for it using IronPython. Oh wait is Microsoft pushing APAX now?
Ruby on the browser, c'mon pick a language that's popular. Or perhaps it will just end up in a decent browser anyway.
Now that's unusual
Fri, 06 Jun 08, 13:13:46
filed in
General
Bam!
Gloworm rocks
Mon, 02 Jun 08, 13:51:09
filed in
Plone
Move over Clouseau there's a new tool on the development block. Gloworm provides a:
poke-that-thing-on-the-page-and-tell-me-more-about-it-style
interface that allows you to poke and play with objects right in the user interface, a la Firebug.
Congratulations and good luck getting this out the door. Then once that is done we should take Clouseau and mash the two together (including Gloworm's much nicer style) to provide some serious kick ass development tools. Great job Eric!
|
About
Andy McKay works at Clearwind Consulting and can emailed at andy@clearwind.ca. If you are web developer, you need to try Arecibo.
Blogs
Months
-
All
-
February, 10
-
January, 10
-
December, 09
-
November, 09
-
October, 09
-
September, 09
-
August, 09
-
July, 09
-
June, 09
-
May, 09
-
April, 09
-
March, 09
-
February, 09
-
January, 09
-
December, 08
-
November, 08
-
October, 08
-
September, 08
-
August, 08
-
July, 08
-
June, 08
-
May, 08
-
April, 08
-
March, 08
-
February, 08
-
January, 08
-
December, 07
-
November, 07
-
October, 07
-
September, 07
-
August, 07
-
July, 07
-
June, 07
-
May, 07
-
April, 07
-
March, 07
-
February, 07
-
January, 07
-
December, 06
-
November, 06
-
October, 06
-
September, 06
-
August, 06
-
July, 06
-
June, 06
-
May, 06
Categories
|