MultiInfoCMS

0:55, Thursday November 18th, 2004 • feeling webmasterly • no comments

An InfoCMS-alike.

The InfoCMS-alike is multi-site which is a neat idea. I've deployed about four sites on InfoCMS now and I'm getting bored of cvs update-ing them. I'm only going to have more, since we're using it for all our in-house web projects. Handling multiple sites on one install would require extensive changes to the codebase. There would need to be a concept of sites at the model level. Secondarily there would need to be a way to split assets and configuration files (sitemap.xml, transform.xsl, application.ini). Finally, how would a site be defined from the point of view of the controller? Are http://server1.com/ and http://server2.com different sites? Almost certainly. But what about http://server3.com/afternoon/ and http://server3.com/someoneelse/? How could these differences be accomodated within a system that depends on mod_rewrite? Certainly the rewrite rules would have to be quite potent.

One way to do it would be to use rewrite rules to pass requests to the same code but adding query string flags. http://server2.com/ could be rewritten to http://server1.com/?site=2. However, mod_rewrite is optional for InfoCMS, though very strongly recommended. The alternative is to incorporate some kind of similar functionality into InfoCMS itself, adding a sites table with a regex column used for sorting the wheat from the chaff. That's not ideal though, regexs can be very complex to debug, what if two overlap? What should InfoCMS serve in that case?

For the site configuration the answer has to be on the filesystem. For one the information about how to get to the database is in there, though that would be site non-specific. Secondly there's the assets. Thirdly however, InfoCMS currently has no web configuration mechanism. Moving the config to the DB would require one, as hacking the DB with the MySQL client or something similar is a right pain in the ass. I guess the solution would have to be a set of folders, but how would defaults be handled? How could it be kept simple for the most common case, which is that InfoCMS is only used to serve one site?

Also, a recipe for the ultimate blog

phphierarchy.py

14:40, Wednesday November 17th, 2004 • feeling relaxed • no comments

I have discovered the wonders of Graphviz, a really very useful piece of software indeed. I wrote a little script to enumerate a folder full of PHP files, discover the class relationships contained within and produce a Graphviz input file. I'm going to use it to make a graph of the classes from InfoCMS and release it with the documentation that I'm currently writing.

phphierarchy

China economic

1:05, Monday September 20th, 2004 • feeling relaxed • 2 comments

Just realised we have CCTV on our Sky box. I'm watching an interview with the outgoing World Bank country director for China, Yukon Huang.

With the final handover of power this week from Jiang Zemin (78) to Hu Jintao (61), the confirmation came that the Chinese Communist Party would continue it's policy of reform. Listening to Huang, it's obvious that much of China's strength lies in it's ability to throw all it's resources into achieving one objective, marketisation in this case. As Huang notes, the advantage of central planning lies in the ability to create large scale consensus, but this is moderated by the risk of throwing the government's resolve behind inappropriate decisions.

What interests me is, from a purely structural point of view, ignoring what decisions are actually made (e.g. the terrible human rights record in China), how different are the governmental systems in China and western democracies? You can draw a graph of the different techniques for creating the government, but how much effect does the will of the people have on a democracy in this country vs how little control does the average chinese exert when it comes to the day-to-day operations of government?

I was reading about post-war Japanese politics last week and that serves as an interesting example. Since the reconstruction, the Japanese government has been pretty much dominated by one party, the conservative Liberal Democrat Party. This party is huge but is highly factional. The prime minister is basically the leader of the largest faction or power sharing group of factions. The faction leader is chosen for his ability to raise funds for himself and his fellow party members. This is a democracy, but how different is it from the internal CPC power struggles that create the leadership for China?

China is a country of 1.2bn people and yet it is changing much more quickly than any other country in the world. Economically it defies all trends. This is surely due to it's consistent leadership goals. So ironically enough, the lack of change at the top, which we in the west see as a deficiency, is the unique cause of the massive amount of change in economic and industrial spheres, the kind of change which has lead to far greater change in the social sphere in the west, and must inevitably do so in China as well.

Talking to people with experience of the Chinese policy making, it seems that the country's people are share the desire for efficiency and to further China on the world platform that their government has placed centre stage. Surely they can not continue to elevate China for long before they have to consider non-economic metrics, such as education and social justice. Already huge issues of regional differences are coming to the fore, as they are in the US, much of Europe and around the world. Look again at the US, it's position in the world league tables of nice places to live is predicated almost solely on it's massive GDP, in social metrics it trails far behind Europe and other countries. The US is traditionally seen as a social paradise compared to China.

It's funny listening to the old red rhetoric though. Deng Xiaoping Theory, the Important Thought of Three Represents, both mentioned by Hu Jintao today, as he constantly referred to the greatness of Comrade Zemin, and the rest. Communism as expounded by the old Soviet Union and today by China does really scare me and piss me off, but you know, ignorance is bliss.

Iraq politic

15:03, Sunday September 19th, 2004 • feeling relaxed • no comments

I've long been thinking about the relevance of the Iraqi situation to the upcoming US elections. About the only thing that can firmly unseat Bush is a large-scale tacit demonstration of his failure in Iraq. Such a demonstration could come at any time. If I were al Qaeda I would be thinking very hard about what to do. One effective tactic would be to kidnap a large number of Americans, in effect reproducing the Iranian hostage crisis that was so fatal for Carter. Another would be to destroy something critical and previously considered out of range. An absolute mistake on al Qaeda's part would be to attack within the US, this would only galvanise support for Bush, seen as the strong war leader.

But this begs the question what are al Qaeda's long term goals? Do they want to keep Bush because he's a beligerent idiot who will give them their holy war? Or do they actually want to bring peace under their terms to the Middle East? This is the Riemann Hypothesis of the politics of international terrorism. Which way you choose to look at this question - and the answer seems unknowable, you just have to choose what to believe - affects the whole outlook for the middle east and for the larger picture of al Qaeda influence. I prefer to believe that their goals are to kick the heretic dogs out of the holy places and then just get on with life, but who's to say that they aren't set on expanding out of the Middle East and Africa and completely destroying their enemies? Terrorists are not known for their realistic goals.

The reason I'm stimulated to post this is that there has been a spate of bomb attacks concentrated on the fledgling Iraqi security forces. This is a successful approach. The forces are absolutely the most critical element of the reconstruction plan from a US-political point of view. Undermining them before they're even started, by killing them in the field at a huge rate and even killing people queuing to apply for jobs, is going to maintain Iraq's current level of chaos like nothing else. The Americans have said they will withdraw and politically have Bush has no other choice. When they do, Iraq will be there for the taking, a new Afghanistan staring down the barrel of years of power struggles.

The political ramifications of this on the US elections are difficult to measure. Firstly this will probably all really start to sink in after the elections have been held. Secondly all indications are that the people of America couldn't really give a fuck. Louise was trying to convince an Texan driver to vote Kerry the other day. He was planning to vote Bush "because he's from Texas". We. Are. All. Doomed.

P.S. Yes, I'm back, but I'm too busy to blog, or post photos. I suck.

Prague to Krakow, Afternoon style

14:43, Tuesday September 7th, 2004 • feeling relaxed • 2 comments

Wrote this offline whilst on the sleeper from Prague to Krakow

I've never been on a sleeper train before. It is very romantic actually, I just got done playing Trivial Pursuit with one of my cabin-mates. Although that was a pretty naff thing to be doing, the stereotypes of sleeper-life are true. Realistically I'm just glad to be here at all.

Charlie and I tried to go out on the town in Prague last night but we didn't get started until 11 (long day covering tourist attractions). We discovered that despite far more liberal drinking laws the Czechs close their bars (pivnices) at pretty much the same time as the English. The result is the same mass exodus which splits into one group going home and the other continuing to a club. Having only had one beer by midnight, we were in the former group. We went back to the hostel and grabbed a couple of beers there though and chatted to an American guy who was travelling before moving to London. We gave him all the inside knowledge on London's idiosyncracies. We'd been walking around Prague all day however, so when we crashed we crashed hard.

This morning we got woken by the cleaning ladies who patiently asked us if we were meant to be checking out today. We were and we'd missed the big buffet breakfast, we needed to find a city to be in that night, a way to get there and a place to stay on arrival.

After spending about two hours holding up the internet machines in a crowded hostel reception it began to dawn on us that this might not be the get-up-and-log-on task that we'd hoped. I panicked a bit. We wanted to get to Krakow and we had either the day train which left in an hour and had no online booking or the sleeper. I'd just read in the Lonely Planet that the Prague-Krakow sleeper was stricken by crime, there were even stories about people having gas pumped into their cabins and then being unconcious while their stuff is taken. This kind of put me off, and I was trying to find a hostel for the night in Krakow quickly so we could run to the day train. There were none. OK, why not go to Bratislava instead. Again, no hostels. No rooms at our hostel in Prague either. I had to let somebody else use the machine for a bit while I got my head together and came up with a new plan. We decided to get the sleeper.

We walked from the hostel to Prague's second train station, Praha Holesevice, which was just up the road. We were pleasantly surprised by how easy it was to get the tickets. The book said there would be no English-speaking and a complicated range of tickets and fares. Instead the guy spoke fine English and sorted it out quickly and easily. It even only cost £45 for both tickets.

After all that we decided to quit messing around with all the random wandering and decide on an itinerary and book it. It's nice to wander, but it takes time or money to make it happen smoothly and we didn't really have either. We spent a couple of hours finding places to stay and booking them, reading about transport and sorting that out too. We'd booked a flight out of Budapest for Sunday morning and we just filled in the blanks basically. By not deciding we would have wasted too much time trying to choose what to do from each city, by setting it down we can relax into it and enjoy it all the more.

So now we had everything we needed for at least three days, and more besides, we decided to wander into town and check out the Vysehrad at Ladislav the Alive-and-kicking's request. It was a pretty cool way to spend an afternoon. The Vysehrad is a big fort with hardcore 30m defensive walls, a church on top and a graveyard containing Prague's brightest and best skeletons. Afterwards we found a really nice place to eat and drink beer. I didn't really massively support the Czech cuisine mode, but this place had steak and that was exactly what I needed. I'd been living on half-meals and snacks and good red meat was definitely appreciated.

We only had about 500 kurony left, so we kept an eye on the bill. In fact we got a starter, two mains and five beers within the budget. Then I fucked up. Just as we were about to leave I ordered water, as I often do. Normally I specify tap water, but I didn't have the Czech and the waiter didn't have the English for that. He gave me a bottle and, at more than twice the price of a beer, that put us over the amount of money we had. The guy didn't take cards and he wouldn't let us off the 12 kurony that we were short either. I set out to find a cash machine and wandered for half an hour until I found one. It refused to give me any cash however and by now I really needed the loo. I ran back to the restaurant and, sweating, we managed to persuade the guys to let us off the money. It was eight o'clock and our train was at quarter past nine and we really wanted to be early. The stupid thing was I even had a bottle of water in my bag.

We set off at top pace for the train station. We kind of missed the tram, but weren't too worried, it was about three miles, but we had time for the walk. When we arrived at the station concourse though, we didn't recognise what we saw at all. We searched desperately for the entrance where we had earlier deposited our bags in left luggage. At five to nine, studying the map, I realised that we had previously mistaken another station, used for local trains, for the main station. We panicked. Our luggage seemed quite a long way away, we were knackered from walking and we had twenty minutes. We ran, we ran until we reached the other station, which thankfully only took five minutes, and to great relief reclaimed our luggage. Then we ran back carrying our luggage and rejoiced when we made it to the platform with five minutes to spare.

The sleeper has been fine since then. As I write we're just leaving Ostrava-Svinov still in the Czech Republic. We've had no passport checks yet and thankfully no gas attacks!

So that was Prague. It was nice enough but I don't think it quite lived up to it's reputation. It was certainly very cheap, but I found eating difficult. It was a shame we didn't get to have a proper big night out, but it seemed pretty much like drinking in England, only cheaper and with a few non-English people around. The city by day was pretty lovely. I enjoyed sitting, reading and dozing in the castle grounds for a few hours. There were lots of beautiful sights as well. I'm not sure why, but I didn't quite click with it. Maybe it was because we didn't really relax into it. We walked around loads and loads and tried to fit lots in. I think maybe it would be nice to go back with either a resident or Ladislav the ex-resident. Relaxing into it that way would remove the barriers to finding the really nice place underneath.

It also sounds like Prague has changed quite a bit in the last few years. It's very touristy and in the evenings is dominated by stags and hens drinking their way around the old town. I admit I failed to really engage with the culture in the day however, and maybe that would have been more fulfulling. Still, I had a really nice time and I've got some cool photos and memories out of it.

On to Krakow...

I'm actually in Krakow now, and it's fat, but I'm going to go and enjoy it now and blog it all later :-)

Page 23 of 113

← previous page, next page →

Choose another page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 or return to the most recent entries.

Last updated at 11:32, Wednesday June 18th, 2008. All times are shown in 24-hour clock format and are BST.

Rate my journal on bloghop.com: the best pretty good ok pretty bad the worst

aftnn.orgafternoon's journal → page 23