Search Results: "tim"

5 September 2007

Gunnar Wolf: Database abstraction, ORMs and RDBMS-agnostic coding

I came across John Wang's posting titled Database Abstraction - code vs infrastructure. In it, he talks about the problems many people face when migrating applications tied to a specific RDBMS to another one. He recommends:
One solution of modern programming is to move database abstraction from the code to the infrastructure using a ORM (Object-Relational Mapper) or Data Mapper. A ORM and Data Mapper abstracts the database for you so you no longer have to do tie db abstraction to each app. Not only does it let you code once for multiple databases it lets your users migrate their data from one database to another. This blog runs Typo which is based on Ruby on Rails and ActiveRecord. I've been contemplating migrating Typo from MySQL to PostgreSQL and I've been told that it would be as simple as exporting the data with YAML, updating the database.yml file and importing the data.
Umh... Thing is, you often want to use your DB as way more than a data store - At least, when using Postgres, I do. There are many things that can be done inside the DB (such as guarding the programmer against his own mistakes by keeping sanity checks which often go beyond just referential integrity. Constraints and triggers. Oh, and of course, user-defined functions and views. Of course, most times you can go by without using several of such tools - but when they would come in handy, you can sorely miss them.
On the other hand, John mentions (right after the previous paragraph):
ActiveRecord is a data mapper and isn't as flexible as a full blown ORM but it gets the job done for the most part. For a full-blown ORM, I think of Perl's DBIx::Class which provides a full OO interface to the RDBMS allowing you to code just once for multiple DBs without limiting you when you want to use some esoteric database-specific SQL
Currently, I'm among the many that have jumped on the Rails bandwagon - And so far, I really like it. But yes, ActiveRecord -although great for some tasks- is way under what I'd like for many actions I've got used to making.
I might be seen as a backwards guy for this, but until before I started with Rails, I prefered not to use full ORMs (not that I tried too hard anyway - Probably starting a project with DBIx::Class would be all it takes for me to become a convert, from what I've read), but to do the SQL myself - Only, of course, keeping well in mind that I should separate front-end from back-end (or using other jargon to say the same, separating cleanly what should be in a Controller and what should be in a Model - Of course, no one in their right mind would put SQL on a template or a View!). It's not so hard as many people seem to think, although mixing syntaxes for two different languages (and even more if you, as I do, like to keep your code under 80 columns) is sometimes dirt-ugly. Still, on to my last bit of rant:
There are PHP frameworks out there like Symfony and Cake but do any of them have stand-alone ORMs? If so, could Drupal move to something like that and solve their maintainership problems once and for all? Drupal is part of the Go PHP5 effort so there should be no issue using PHP 5 OO. Something to think about for the Drupal folks if a PHP ORM is available
Umh... Even if there are some great ORMs in PHP... Choosing an ORM is something you do when you start a project. I doubt the Drupal people can now just decide to move over to using a ORM, as they potentially have hundreds or thousands of points where they have DB interaction. And although for most of them moving over to an ORM should even be automatizable, every ORM has some very special features which make it damn hard to craft several kinds of query.

MJ Ray: No-monthly-fee UK Card Payment Web Service?

I want a way to take small, infrequent, one-off card payments on my web sites. Some of my customers much prefer to pay by card and I'd be happy to do that, if there's a decent card payment service. Is there one? I've not found it yet. What do I want? The main thing is not to have a significant monthly fee. I'd rather not be paying if I'm not using the service, but I'd probably stomach up to 5% transaction fee for a good credit card handler. The 8% fee listed by Moneybookers seems a little steep, but I might use it as a last resort. I'd prefer no automatic "inactivity" account closure if I don't use it for a couple of months. Sometimes I take no card payments for a while, then need to handle several at once. I'd also prefer a cooperative or mutual, but that seems unlikely in such a small field. So far, I've only found two suitable UK Card Payment Services - Paypal and NoChex - and I've used both, but I've now got problems with both! Paypal won't let me take my money out to my business account. To do that, I need to upgrade my account, but Paypal do not list LLP as a valid type of business and won't fix my bug reports by web, email or telephone. Last time I telephoned, after patiently explaining to them what an LLP is, I was told to put a different business type on the form. That scared me, so I asked for email confirmation of the instruction, which they said they'd send, but it never arrived. NoChex froze my account without warning, due to inactivity. I've sent in their reactivation forms a few months ago and had no reply. I've also filed a web ticket today, but I've done that before. They don't even list a telephone number any more. That's a worrying sign in a bank. So, both of these providers suck for the above reasons and I still need a way to take this month's card payments. All the UK banks charge monthly fees, don't they? Are there European card services which I should consider? International? (2007-09-07: 5 comments)

Thijs Kinkhorst: Japanese Free Software Biking

Japanese professor and free software advocate Masayuki Ida is in The Netherlands, and yesterday gave a lecture about his activities in bringing free software to several Asian developing countries. It was interesting to learn what the state of technology is in a country as Vietnam, and why specifically free software is very welcome to change it. They are not interested in the pricing aspect, since a Windows CD is $1 there. Free software allows and stimulates its users to gain a much better technical understanding of a system, and there's a dire need for people with technical knowledge in the country. By using free software, they are making bigger leaps in their technological development. The professor wanted to do something typically Dutch afterwards, so a couple of us took him on a bicycle ride from Amsterdam to Ouderkerk aan de Amstel, along the Amstel river (known for naming both Amsterdam and a beer brand). He was friendly and very interested in how education works in The Netherlands. We once lost the professor - as it turned out we'd passed a windmill, which none of us locals even noticed, but the professor did and wanted to take some pictures of it. After a stop for a beer we returned to Amsterdam, delivering the professor at his next appointment (a bit late).

Russell Coker: Dead Links

I’ve found a reasonably good free spider for checking for dead links, www.dead-links.com. When I told it to spider my main site www.coker.com.au it worked well and informed me of several dead links that I fixed. When I told it to spider my blog it reported an error 404 and didn’t give any useful output. Strangely it was able to display a thumbnail picture of my main blog page that correctly had all data. I was wondering if it didn’t like Wordpress so I tested it out on Chris Samuel’s blog [ www.csamuel.org ]. It seemed to have no problems with his blog, so I suspected that it was the request time. I reduced the number of blog posts shown on the front page of my blog to 1 to speed things up (which resulted in my page loading faster than his) but still the dead-links.com spider didn’t like me. I now suspect that it’s something related to me using Wordpress 2.2. I would be interested in feedback from other people who try checking their blogs for dead links, whether they are using Wordpress 2.2 or something else. In any case it’s a useful service and I recommend using it.

Michael Janssen: Other Twitter Bots that I use

Earlier this year I blogged about using the twitter bot for Remember the Milk. I still use it fairly well, even though the SMS messages from the RTM come late a bit. It's working for me in order to get a good chain going for the thesis proposal. There are a couple other bots that I'm using which are on twitter as well.

The first bot that I use is the bot at timer. The timer bot will let you set a timer (surprisingly). You only need to send it a direct message with the amount of minutes as well as a reminder for you about what it was set for. For example, if you want to remember to plug the meter before it runs out in 40 minutes, just twitter 'd timer 38 plug the meter' to timer and in 38 minutes it will inform you that your timer is up. You can have multiple timers running at once, which is useful if you are perhaps having tea at a coffee shop while you are parked on the street.

Another bot I use is the gcal. Gcal is a connection to your google calendar through twitter. You can set up new appointments by messaging the gcal bot with something like 'd gcal Pick up joe at 7pm' or 'd gcal set up web application for judy tomorrow' and it will
add it to your calendar. I use it in the morning to track my weight. I just pull out my phone while I am at the scale and SMS 'd gcal my weight is XXX', and it adds the event as a day event on the day it was sent.

The last bot I will go over today is the mymm bot. It is slightly more complicated but still useful. When you're at the pump, you can direct message mymm a little info and get back the MPG that you have done since the last fillup. It helps me keep a tab on how good or bad I'm driving, which is a good thing. The car we drive usually gets about 24 MPG, but I learned through this that when I'm carrying a bunch of crap in the back, the MPG drops 3-4, so it's better for me to have an empty trunk.

I'm sure there are a bunch of other useful bots out there (ququoo is one, which I may cover in another post), but these are the most useful that I've found so far. Twitter is turning out to be much more useful than just random status updates.

John Goerzen: Long enough in the country?

Perhaps this conversation is a sign that we've been in the country for awhile:

"Terah, if you ever drive the pickup..."

"Why would I ever do that?"

"I don't know, but if you ever do, I just want you to know something. The reason there's a towel connecting the brake pedal to the steering wheel..."

At this point I had to wait for her laughter to die down.

"As I was saying, the reason there's a towel connecting the brake pedal to the steering wheel is that, unless you park facing uphill, the brake lights stay on all the time and will drain the battery."

More laughter followed.

I didn't even have the chance to tell her to remove the towel before she starts the truck. Oh well, guess she'll figure it out.

On the other hand, perhaps this is a sign that we haven't been in the country long enough:

Today as I went to lunch, I saw a long, narrow, light gray line across the door on my car. I was pretty annoyed that somebody would have pulled keys or something across it to do that. But as I got closer, I realized it was just a spider web. Terah and I park our cars a few feet apart, and every week or so there will be a spider web connecting the two of them when we go out in the morning.

Adam Rosi-Kessel: The biggest thing in their life is word of mouth

Spot-on profile of Rick Rubin and the future of music in this Sunday’s New York Times Magazine (probably already much blogged about):
The kids all said that a) no one listens to the radio anymore, b) they mostly steal music, but they don’t consider it stealing, and c) they get most of their music from iTunes on their iPod. They told us that MySpace is over, it’s just not cool anymore; Facebook is still cool, but that might not last much longer; and the biggest thing in their life is word of mouth. That’s how they hear about music, bands, everything.
That last point is key. If any new business model will thrive, it will be one that is built around the social graph. Technorati Tags: , , , , , ,

Adam Rosi-Kessel: Bourne Execution

Two words: flawless execution. I can enjoy almost any movie that is well constructed, regardless of genre, plot, etc.. It did help to sit pretty far back in the theater, though. If the CIA were really as clever and technologically sophisticated as it appears in the Bourne movies, the United States wouldn’t have so many foreign policy disasters on its hands (egregious constitutional violations notwithstanding). Technorati Tags: , ,

4 September 2007

Neil Williams: time for quicklist development again

I've found some time for quicklist, finally, to move the port on to a second pre-release. New additions include a Recent Files submenu and GtkHTML report engine but the Sort and Filter options are not complete and adding a new report is problematic.
quicklist is now ready for some translations (the first one identified a problem in pre1 that prevented certain strings from showing up as translated). Also added a prototype manual using docbook that I've made available as HTML for dwww and making the docbook file itself available to yelp.
Currently, I'm undecided just where QuickList will fit between pure-Gtk2 and pure-Gnome2. pre2 uses libgnomeprint and libgnomevfs but yelp would bring in the main gnome libraries so yelp is just a Recommends and only as an alternative to dwww:

Recommends: www-browser, dwww yelp

I hope to find some time to fix the remaining bugs but if anyone fancies helping out, see http://quicklist.sourceforge.net/ and take a look at the current CVS prior to the pre2 upload. CVS provides a method to build the updated code docs for developers (rather than the Manual which is aimed at users) using doxygen - the version on the website is out of date. This includes a list of bugs and ToDo items - most of which are centred on removing the last vestiges of the original QuickList code and refactoring to make full use of libglib2.0-0 functions like GList and GHashTable instead of fixed length multi-dimensional arrays.

Jeff Bailey: Arrived in Santa Clara

We arrived in Santa Clara two nights ago and have done the usual things like unpack, do laundry, buy groceries. Aside from that, a pretty mellow day yesterday. Randolph and his wife Amy came over for dinner. It's nice to start to get to know people. I spent a bunch of time looking at phone options, banks, PO boxes and mostly came away confused. How do Americans cope with so many choices?

Otherwise, I start my new job in just over an hour. Off I go!

MJ Ray: Installing a complex perl web application

Time to revisit this topic. I asked debian perl for advice on packaging a CGI with modules and my current solution is to use ExtUtils::MakeMaker - I'm just writing the PL files which will generate the configuration files. I also took a look at Module::Build and PAR::Tutorial but I'm not convinced that they're both as portable and as smooth as if I can do it all from MakeMaker. There are occasional posts about Module::Build problems on lists like this one on ledgersmb-users which worry me. After koha-1.2's bespoke installer, I really want to make it as easy and simple as possible, for both development and use. There are also periodic debates about M::B at perlmonks too. Maybe we can use PAR later, like this perlmonks post suggests and apparently KrangCMS does. Now, what have I missed? (2007-09-07: 3 comments)

3 September 2007

MJ Ray: Current Issues / Ride Report: Kewstoke-Congresbury

In preparation for Wednesday's cycle forum meeting at Backwell station (6.30pm), I went for a ride to Congresbury.

I followed roughly the route out along Ebdon Lane and Hewish bridges shown on this javascript map but on the way there, I went south from Puxton and turned off Nye Road onto the Strawberry Line (NCN route 26) to test it out.

The main surface seems to be very loose gravel on top of a very hard subsurface.  It's uneven in places, but I think I still averaged about 10mph. At each end of the route, the connecting paths are mud tracks.  The left turn just before Congresbury station is unsignposted. It's not a bad route, but a long diversion to go to Congresbury. The whole ride out took about an hour in total, going at a fairly gentle pace.

Coming back, I rode along the bridleway that is pretty direct from Congresbury to Puxton. Unfortunately, somebody has tried to fill in some uneven sections with rubble since I rode it last year. The route is now "get off and walk" in several places and uncomfortable otherwise.

I think I'll be riding along the A370 from Wick Road to Congresbury on Wednesday evening. If only there was a track across Tutshill sluices...

In other cycling news, the police have an undercover bike which they'll leave lying around, see if it gets nicked, then track the thieves back to their lair.

Russell Coker: George Monbiot s Solution to Emissions Trading

I previously posted about Interesting Ideas from George Monbiot, one of which was to establish individual emissions trading. Gyros Geier disagrees with this and cites the current emission trading schemes as evidence. There are several fundamental differences between George’s idea and the current implementations of emission trading. The biggest flaw in current emission trading schemes is that the emission credits are assigned to the worst polluters. George is proposing that an equal amount be assigned to all citizens. Assigning credits to the worst polluters is another form of by the polluting industries. The way to solve these problems through emission trading is to start by fairly assigning the credits (and what better way than to equally distribute them among all citizens) and to then reduce the amounts assigned over time. Gyros claims that emission trading which allows people who use little emissions to get large credits will cause people to have resources used in their name which they would not otherwise use. The solution to this is to assign to each citizen in a country a set of credits that is equal to the use by someone on the median income. Note specifically that setting credits equal to average use is not the right thing to do, the vast majority of the population produce significantly less emissions than average. The result of such a policy would be that people who produce median emissions (and most of whom would be close to the median income) would reduce their emissions as much as possible so that they could sell the credits, they would even have an incentive to spend money to reduce their emissions (for example by installing better insulation in their home) as it would be an investment. Then people who produce more emissions than the median would be forced to buy credits to support their extravagant lifestyle. This would give a significant reduction in emissions (the median income is about half the average income and I presume that the emissions produced are in line with income). Gyros also makes the startling claim that emissions trading increases emissions. I can’t imagine that being possible, in fact I can’t imagine how the coal industry could do more damage to the environment if they tried. Finally, taking a positive approach to blogging is a really good idea. I welcome discussion with people who want to claim that my ideas (and the ideas that I quote) are bad, but if you are going to do this please describe something that you consider to be better.

Biella Coleman: Dependability

In the last week, I have been witness to and part of many conversations and probably one of my favorite ones was about coffee. My friend reasoned that coffee is as wonderful as it is because of its dependability (unlike, for example, your relatives). You know that for a moderate sum of money, you can drink a drink that makes you happy, alert, and, for some of us, allows us to face the rest of the day on an even keel. It is pure comfort that derives from a form of almost ritualistic dependability. This morning, as I was sipping my coffee, I came across a short blog post by Stanley Fish who certainly does not make me as happy as my morning cup of joe, but I do admire him for his dependability and consistency when it comes to reporting on matters of liberalism. For over 20 years he has dependably written on the quandaries and limit of liberal political ideology and his most recent installment, which focuses primarily on a new book by Paul Starr, is no different. Well, his conclusion strikes just a little differently than the tone of some of his previous works. In the past (or perhaps in some of his longer academic works), Fish’s solution to the problem of competing ideologies is that there are no solutions, just incommensurable ideologies and you gotta sort of duke it out, and the strong man/woman/group wins (see Terry Eagleton for this characterization of Fish’s work. But the ending to this piece is subtly different, a tone and stance I rather prefer: So again, what to do? Lilla s answer is pragmatic rather than philosophical (and all the better for that). All we can do, he says, is cope ; that is, employ a succession of ad hoc, provisional strategies that take advantage of, and try to extend, moments of perceived mutual self-interest and practical accommodation. We need to recognize that coping is the order of the day, not defending high principles. Now there s a principle we can live with, maybe. What I like about his ending is that it acknowledges there are times when compromise is possible, where a common meeting ground can be forged, however provisional these may be. As someone interested in the politics of consensus and accommodation, I think it is important to recognize that human beings are not simply molded by one set of values but are are often dwelling within various systems (of sometimes contradictory) values. And it is because of this multiplicity that forms of accommodation and consensus emerge and can emerge, signaling a more hopeful politics that derive not from abstract adherence to precept such as tolerance, but from the far messier realm of actual life experience.

Felipe Augusto van de Wiel: 3 Sep 2007

To Blog, or Not To Blog...

Amazon: in the hands of a few
Thinking about writing something for a while, about my Debian work or about my daily stuff, sometimes you lack the time or the motivation to do so, I should kept this more up-to-date so people can follow a little bit what's going on with me... specially considering that I try to keep this diary neutral about non-technical subjects, but hey! it is somewhat hard to be neutral in every single situation. Anyway, I found that I should help to spread the word from a Brazilian colleague, Sulamita, she posted about democracy (or the lack of it) today. Two videos, about the Amazon Forest area and some of the crazy things we find in Brazil. You can watch the Brazilian Portuguese version or the English one.

A lot of people are not aware of some of the political problems that Brazil faces in the last 10 years, it is not like it doesn't exist before, but it is getting worst and worst and, for a while, I've been wondering...
    A lot of friends want to leave Brazil as soon as they can, I love Brazil but I can understand their motivation.

  • Where do you find the desire to stay when you look around and you can't find fairness and equality? And if you look to the houses or places that should protect people, you realize that there is no protection?
  • How do you keep the passion for a country with huge levels of corruption in public government, in police forces, in your law makers? And day after day, corruption schemas, robbery and law abuse are noticed on the television?
  • What to do when you realize that the perception of the disloyal advantage is shared among your colleagues and that the feeling of failure dominates a great part of the population that could actually do something to change?
  • Can anybody, or group of individuals, feeling alone, work to change that? How? Specially when you look around and although you know there are people willing to help they need to take care of their lives (money, food, family)?
Or should I ask: Where's the love? (Black Eyed Peas Lyrics).

And before somebody thinks that the entire Brazil is lost, that we are under a Civil War and that monkeys and other animals are walking on our Jungle streets in the middle of the cities, no it is not... yes, we need help; yes people need to join forces; yes, we need to find ourselves and fix it; but it is still a great country to live, and yes, I love it!
Thanks: beraldo and sysdebug. And I'm happy to discover that advogato upgraded my status, I'm now a Journeyer.

Wouter Verhelst: Recent movies

I like seeing movies. I don't always blog about them, but sometimes they're just too good to ignore them in the long run. Here's a recap of some of the movies I saw recently: That's it for now.

Russell Coker: Photography and Censorship at APEC

World News Australia reports that Police forced three tourists to delete photos of a fence. Apparently the officers in question believed that such photos would be a threat to security. It’s interesting to note that the first sentence of the World News Australia report is “Officials say police who forced three tourists to delete photos of a huge security fence erected in Sydney for the APEC summit were not over-reacting” while later in the article it says “The police action against the tourists may have been “over the top” but was necessary, said New South Wales state Transport Minister John Watkins“. So which was it? Was it “over the top” or was it “not over-reacting“. Strangely the World News Australia web site shows a picture of the fence. If this fence is so secret then why are the pictures being published so that millions of people will see it? For that matter why even try censoring the pictures. Censoring the pictures effectively issues a challenge to everyone who has a digital camera and plenty of spare time (which means most university students among others) to get the best photos of the fence (feel free to leave comments with the URLs for your best pics). While this is happening protesters from Real Action On Climate Change have been protesting at the Loy Yang power station, according to their blog posts it seems that they were partially inspired by the APEC meeting. It seems that APEC leaders are keen on nuclear power. If they really believe that nuclear power is safe then maybe they should have their meeting at Maralinga. There would be little effort or expense required to secure Maralinga and it wouldn’t disrupt a major city. :-# But seriously if they wanted a secure location for a meeting with no protesters then an aircraft carrier would make an ideal location. The people who need to attend the meeting could get flown to a carrier that’s off-shore in the territorial waters of one of the countries concerned with a full battle group to deter any other ships from entering the area. It is reported that Sydney whores are expecting to do a lot of business during the APEC meeting. Maybe this is the reason why they wanted to have their meetings Sydney (which is rumoured to have the best brothels in Australia). I wonder if they are planning for a future APEC meeting in Bangkok…

Mario Iseli: Back from my pseudo [VAC]

Those who read debian-private knew it, some others were informed too. I was (at least for Debian) in Vacation until last weekend. The main reason was that I didn’t have time at my workplace to work on Debian because of other quite urgent projects which were open. Tomorrow I will package bluez-libs 3.18 which was released by upstream yesterday and review some other packages and maybe sponsor them. In the evening I was also very busy this week, dinner here, dinner there, meet some friends, wait until girlfriend comes home from the theater. I didn’t really sleep more than 5 hours per night and this since about 3 weeks now. At least, my ~/TODO list became much shorter and I hope I will find more sleep now, more time together with Lisa and at work I will have 3-4 hours per day for Debian again. :) Ah, by the way, thanks to all people who were involved with updating packages.debian.org! Ah, 2nd by the way: I booked my flight to Berlin for 25.12.2007 and the flight back on 31.12.2007, see you during 24c3, send me an E-Mail if you want to go for a beer with me, keysigning, whatever :)

Dirk Eddelbuettel: Another Herbie Hancock concert

Herbie Hancock was in town to open this year's Chicago Jazz Festival with a concert at the CSO last Thursday. This time he came with a mostly-electric setup featuring Nathan East on bass, Vinnie Colaiuta on drums and Lionel Loueke on guitar. I found it at times a little heavy on the synthesizers, but it was evident that Hancock and the band enjoyed themselves during the two hour set. A nice concert, all in all, and again very different from his last two concerts.

2 September 2007

MJ Ray: Blogging on Other Sites

Some of my blogging is going to take place on other sites from now on. Sometimes for money reasons, sometimes for audience reasons. Eagle-eyed readers may have spotted that I've already switched on a feed of my WsM Forum writing and my new cycle-racing feed should go live in the middle of next week. I'll still be archiving those posts, just in case the other sites go off-line, and they still appear in my "all posts" feeds. I may move my satellite TV stuff off-site soon too, which would leave programming, webmastering and my cooperative business posts on my personal site. This means a site which "fits together" more neatly than my current mix, I think. After that, I may edit the categories again, merging koha back into hacks. Are there other changes which I should consider?

Next.

Previous.