Older blog entries for lkcl (starting at number 361)

titus: for goodness' sake advise them to think creatively about their programming.

if they're doing applications, show them pyjamas: i think that's absolutely essential.

even if you don't know anything about it, at least show them the samples on the pyjamas.pyworks.org site.

point them at my web site, which comes with the source code, and squish my web site down to 800, then 640, then 300 pixels wide, on the browser.

and remember to mention that because pyjamas is version 0.1, the auto-resize doesn't work yet :)

show them SQLobject and SQLbuilder (part of turbogears) and Formencode (part of turbogears) and the _very_ simple htmltmpl.sourceforg.net (not part of turbogears but it damn well should be).

explain that htmltmpl has not had _any_ "maintenance" on it - because basically, it is complete! it does what is needed, and if you think anything more is needed, then you are programming / designing the web site completely wrong.

but - above all, emphasise creativity as the absolute fundamental and overarching priority which they should be focussing on. they should be _good programmers_ who _happen_ to be using python.

make sure every module, class and function is either obvious (from its name or from its very few lines) or is documented, and make DAMN sure that everything has test procedures.

someone on here was raving about a new python test environment, which automatically hunted through code looking for stuff that LOOKED like a test - can't remember what it's called.

emphasise that the more testing you can do, the faster you will develop the program.

so, it doesn't matter if you write test procedures: that's good, because those will do testing.

it doesn't matter if you are a fast typer and have some scripts which do your install automatically: the sooner it's installed, the quicker you can do testing.

if you have code coverage techniques (saw one on here last week - looked great) - then great: that's testing.

the faster you can do testing - of _any_ kind - users, test suites, your own development cycle, whatever it is - the faster you will become confident that your code does what you need it to do.

the NSA and GCHQ have a way of thinking about things.

they don't care too much if something is broken, as long as they can _prove_ that it's broken. what they DO care about is if they CAN'T prove one way or the other if it's broken.

so, for the poor NSA and GCHQ, windows is _totally_ out of the question. outright. flat-out. banned. they REFUSE to use it, and will NOT allow a windows computer on their premises. AT ALL.

why? because it's 60 MILLION lines of utter unprovable shit. they can't tell where it _isn't_ secure.

tell your 20 scientists these things and they will go 'hmmmm...' :)

27 Feb 2007 (updated 27 Feb 2007 at 00:22 UTC) »

Well :)

i finally implemented an email button on my web site after what... three to four years?

it's a python JSON service (http://lkcl.net/site_code/ - see json_service directory)

unfortunately, mod_python won't let me import smtplib for some reason, so i had to use popen2 on /usr/bin/mailx. oops.

anyway.

you'll need the slightly modified version of jsonrpc (also in the json_service directory). you'll need to put json_service/email.py into a services subdirectory (e.g. /var/www/services). you'll need to create /var/cache/mailsender and chown www-data:www-data it. and you'll need this in apache config:


  <Directory /var/www/services >
    AddHandler mod_python py
    PythonHandler jsonrpc.apacheServiceHandler
    PythonPath
"sys.path+['/usr/share/python-support/python-simplejson/simplejson/']"
    </Directory>

hw6915 suspend/resume - might be fixed...

arg arg arg a post by paul psokolovsky on kernel-discuss@handhelds.org describes a horror-story debugging session in suspend/resume, where, it turned out, he hadn't converted _one_ device driver for the h4000 from a legacy struct device to the more up-to-date struct platform_device.

apparently you can't mix-and-match both in your hardware: you have to all struct device or all platform_device.

read more

Syndicated 2006-12-22 02:10:37 from lkcl's blog

quick, quick, slow...

argh.

things were going _so_ well on the htc sable (ipaq hw6915) and then i ran into suspend/resume hell for over a week, went to holland for another week, and i think i left the charger there, so i can't carry on until i find it.

in the mean-time, i've been playing with other devices: sound on the blueangel, which is hell, and the s3c2442-based htc hermes, which is hell. all in all, i don't feel like i've actually achieved anything, for over two weeks. and it's pissing me off.

read more

Syndicated 2006-12-19 03:39:43 from lkcl's blog

old kernels, reverse-engineering, new kernels...

the key rule to reverse-engineering is to only have one thing to change at any one time in order to find out its effect. or to have the minimum number of things.

at the moment, i have a particularly difficult task with the blueangel: the sound infrastructure for soc devices is undergoing a rewrite, and unfortunately it was never entirely completed for the blueangel back for 2.6.12.

however, if sound was played from wince at the time that haret booted into linux, sound _did_ at least work. so there was a 'known' state to test things.

read more

Syndicated 2006-12-12 02:28:58 from lkcl's blog

first post!

hooray! i discovered today that at some point over three years ago i must
have registered on kerneltrap. so i've decided to create a diary here for
os-related stuff, and syndicate it over on advogato.org. note to self: must ask steven if he can put more than _one_ syndication site link into advogato profile pages.

Syndicated 2006-12-10 13:52:47 from lkcl's blog

pyjamas is just... weird. it's like... i know it's python, but it's like it's another programming language or something.

which it is, ha ha :)

no, but seriously: i have to keep bearing in mind that there is a specific framework - only a subset of python can be used, and a 'way of working' which, at the moment, i can only gawp at and mimic.

i'm doing pretty good at mimicking being able to design sites with pyjamas!

does anyone remember reading - probably on slashdot - an article about the chemistry of laughter?

i urgently need to review the article in light of some new information and i can't find the damn thing because it was... over 18 months ago probably more like two years.

can anyone help me out?

email me lkcl@lkcl.net most grateful.

i had an interesting idea: to modify rsync to combine encryption into it, using CBC-mode block ciphers instead of md4 checksumming.

what you would do is, every <blocksize> bytes, perform a single encrypt of a sequential number (or a pre-seeded pseudo-random number generator) and that one block becomes your checksum.

you _would_ need to store those checksums on the server (and the checksums should be stored on the server _anyway_ to save processing power!)

The Plan is, ultimately, to safely and efficiently perform secure backups.

i wish rsync already had a VFS layer, i really do.

7 Feb 2007 (updated 8 Feb 2007 at 12:28 UTC) »

*ROTFL*.

http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20070205/msg00113.html

i'm going to collect these:


From: exim-users-bounces@exim.org
To: lkcl@lkcl.net
X-BeenThere: exim-users@exim.org
X-List-Administrivia: yes
Subject: You have been unsubscribed from the Exim-users
mailing list

here's the message that i received which prompted this:


X-SA-Exim-Mail-From: graeme
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on
dedi28
X-Spam-Level:
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00
autolearn=ham
        version=3.1.7
Subject: Re: [exim] local_user section with check_local_user
removed (as advised
X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100)
X-SA-Exim-Scanned: Yes (on lkcl.net)


OK, gloves off.

On 01/02/2007 16:06, Luke Kenneth Casson Leighton wrote: >i will endeavour to track down the scope of this problem a bit >further, because i have just tried this: > >HELO localhost >MAIL FROM:<> >RCPT TO:llllllllllllltotallyfakeaddress@localhost > >and _that_ was accepted (!)

In that case, YOUR copy of Exim is not checking against YOUR copy of Cyrus - or anyhting else, in fact - to see if the local_part is valid.

>it's the fact that the mail gets accepted - without even being >checked against the cyrus mailbox, and THEN it gets attempted >to be delivered by LMTP, that bothers me. is that... just... >too much to ask?

No. But then you haven't given us your ACL details, you haven't described the files your Cyrus installation is using, you... well, obviously you haven't done much apart from follow, blindly, recommendations you found somewhere (in HOWTOs, but are they official ones?) and they *don't do what you want them to*

>and this issue smells veeerrry slightly, to me, like a bug or >limitation in exim4 itself, with a limitation in the config file >format (of not being able to specify empty users, for sure).

Incorrect. It is a misconfiguration in YOUR Exim config.

[snip]

and, this was my reply, after several days, and some quite intense debugging one night that had to involve examining the exim 4.64 source code _and_ taking the risk of compiling and installing a modified version on a live server:

....

heya folks,

i've been thinking carefully about how to reply to this message, composing a reply over several days.

here's how i expected this conversation, over several emails and days, to go:

me:

"hello, i'm an experienced free software developer and i consider myself to be a reasonably experienced linux admin and i've found a problem that is beyond my level of experience and it might be a bug and i need help in working it out"

you (exim developers):

"greetings, and thank you for contacting us: we're a bit busy but we'll try to get to the bottom of this as well you're probably not correct but we could also be wrong, so we'll see. firstly, just to check: have you tried [description cut] and could you also send your configuration or put it online somewhere. btw, with the greatest of respect: as an experienced free software developer you should know already to do these things to save us time, slapped wrist to you. in the mean-time, your issue smells like this one which we already discussed to death [timescales cut] and here are some references [urls to archives or even better to wiki pages supplied] and it would help enormously if you could read and review those as it will save us a hell of a lot of time which we don't have a lot of".

me:

"oops, sorry, yes i really should know by now: i'll try to make life easier for you and save time. here's the config [url cut]. yes i tried X / no i didn't try Y [delete as appropriate]. thank you for the references, i read them and yes it's the same issue / no i don't believe it is the same, and this and this and this is why [delete as appropriate]".

we go round this loop a few times, resolving what the issue is, or at least trying to resolve it, and each of us gets to learn something, and, ultimately, hopefully, the quality of the code and/or documentation that comes out of it gets improved, and everyone is happy that they learned something.

AT NO FUCKING TIME are the words "ok, gloves off" anticipated to be heard in those discussions, the ones in my head.

graeme - as an experienced developer, you should know better.

if someone describes to you something that quite obviously demonstrates that they haven't got a clue [like i did when i didn't know what <> was], but they appear to be quite articulate and also quite intelligent, then next time why don't you consider telling them "look, dude, you're completely in the wrong ball-park, and you're likely to take up quite a lot of our time if we explain it to you in detail. please trust me when i say that your issue is probably this this or this, and please investigate it by trying that, that or that, and come back to us and let us know".

telling me that my issue is a problem with someone else's default configuration is FUCK ALL use to man nor beast.

now.

i did some code-walking in exim 4.64 and to me it would appear that there is a problem with 550 codes being ignored by the code that uses src/transport/lmtp.c - but (and i know why and i agree with the design) i haven't yet found the point where the exec()s call out from, as it's a bit complicated to follow (and the code comments are extremely useful and well-written but it's _still_ a bit hard to follow as it's unfamiliar code to me).

here's the thing: i've already made my decision not to pursue this.

instead, i'm just going to put in a little bit of exim config and leave it at that. if that exim config makes messages from <> bounce with a reject message saying 'sorry, <> messages not accepted, please send manually to postmaster@lkcl.net' then so be it. it solves my immediate problem.

so, your 'ok gloves off' stupid outburst has _lost_ you someone who could have helped you solve a problem. helped you to help others. which is the whole point of writing free software.

_don't_ do that again. not to anybody. no matter _what_ you may have heard about them.

now, here's the thing. this is _another_ example of developers who can't deal with intelligent but inexperienced users of their software, who _want_ to help, _want_ to get things resolved.

and yes, i know that i'm a complete pain, and i go totally off on the wrong tangent making the wrong conclusions and treading on toes along the way - but who doesn't???

here's the bit about this that makes me particularly sad: i love exim, and it's a great mailer, and i consider it to be a hell of a lot easier to work with than the alternatives: with exim, i can achieve more (extremely complex things) in a very short amount of time.

the goal of the developers (all free software developers) should be to think of ways to accelerate the development of free software to reach and help the maximum number of people that they can.

this is a _classic_ example of how not to go about doing exactly that. the developer, in this case, graeme, was extremely sarcastic, extremely nasty, extremely unhelful, rude, curt and generally demonstrated, without saying so (which would actually have been much better) that he really didn't want to waste his time even communicating with me.

and yes, i know i'm a pain. but somebody has to be a pain. otherwise there's no way to know when the pain stops, is there?

352 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!