My New Blog

Hello to all my readers (the numbers have probably dwindles by now :p). I’ve got a new blog with a new set of feeds now. Feedreaders, please click here for the new feed options. I now have my own domain, and built my new blog using Django. I’ll be posting all my new blog posts there from now on. The syndication to Planet Gentoo should happen once beandog returns from his short hiatus.

To give you the short cuts. my new gentoo feed will be: http://kulleen.org/atom/blog/seemant/gentoo or http://kulleen.org/rss/blog/seemant/gentoo depending on whether you prefer atom or rss 🙂

My new universe feed will be: http://kulleen.org/atom/blog/seemant/ or http://kulleen.org/rss/blog/seemant/ again, depending on whether you prefer atom or rss 🙂

Meanwhile, please click out of your feedreaders and check my site out and leave me your opinions on my first post there. Please note that this will be the final post I make on Planet Gentoo directly (and furthermore this post will not be duplicated at the new site (though all the prior posts and comments have been ported over).

See you all in my new house!

Lemonade Diet Day 3

Sindhu:

I woke up at 6:00 this morning before my alarm clock went off full of energy and eager to get the salt water down as soon as possible. I’m giving myself 2 hours to do this before going to work. It’s still the worst part of this cleansing. Today I actually felt lighter, my head was clearer and I was not feeling lethargic at work. I missed the cup of coffee by my side and I realized that I didn’t miss the taste. What I missed was the smell and the comfort of knowing that the cup was there. I had my bottle of water next to me for the most part and it actually tasted really good! The greatest benefit of being at work is there is little or no time for my mind to wander and think about food. So, all in all it was a great day full of energy with virtually no cravings.

Bill:

Not such a bad day being that I had off from work. Sindhu got rid of all the junk food in the house so there’s nothing to tempt me which kept me on track. The cravings started after 12:00pm so I had a glass of lemonade and that did satisfy me. I got a good solid hour workout in. This diet has made me feel stronger. Working out has helped me keep my mind strong on this diet. I’m enhancing the results I’m getting by burning more calories. Pretty good day, lost 4 lbs so far :).

Updates on Django, CMS’s and Church websites

In still other news, I’ve been playing with django’s newforms module for creating forms on the websites I’ve got in the pipeline. It looks like the StreamBase website will finally be content-managed, though not by django, but by something else. I’m hard at work on getting the website for Aimee going. This weekend will be a ReaportLab weekend for me. There are some documents on the church site that will be in both web-readable and PDF-able form. I have this notion that I can do both, though I admit to that being somewhat hopeful. We’ll see.

Before I even do that, I have to do major cleanup on the code already written. It’s funny to see how my knowledge of Django has evolved in the last few months. I’m going back in, currently, to do some DRY’ing of a lot of the stuff in there — gosh I repeated myself! But it was intentional, just to get functionality going — I knew I’d go back in and clean up. And here I am on the other side of that. I’m not complaining at all, mind you, because I feel like I’ve learned a lot when I look at that old code.

I’ll share one of the long-standing issues I’m having. The church has a calendars page which shows upcoming and past weekly schedules. Being a church, they have services every Sunday. During the week and in other rooms/halls they have other meetings (Rotary Club, etc). So, the calendars page needs to show all of those. I opted for this approach in the end: a BaseEvent which holds the date, the title and slug information and description field. The Event object has a one-to-one relationship, and it has fields for frequency and timetables (Timetables are a separate model, so they’re foreign-keyed into the Event). The Service object holds the information on the priest, the crucifers, foreign key to the Sermons, etc, and it also has a foreign keys to the Timetable. If there’s enough interest, I’ll put up that file for you all to see and critique. I definitely have not gotten it right, so I’m glad of any input.

So the idea is that a request to the /events/ URL shows the archive of most recent and immediately upcoming events and services. The same with /events/yyyy, /events/yyyy/mmm/ and /events/yyyy/mmm/dd. So the query dictionary has to include all of them, reversed-ordered by date. A request to the /services/ URL is obviously a filtered query, and the like. Now, when you click on a specific event, it either goes to /events/yyyy/mmm/dd/event-name or to /services/yyyy/mmm/dd/service-name. That’s the motivation for all this. If there’s a better way you can think of, please drop me a comment. I’m definitely interested in the opinions of you ruby and rubyonrails people.

Future Proofing

I’d like to talk about future-proofing for a bit. One of the things that’s niggled at me for quite a few years has been the suffixes you find in websites. In the beginning you had either “.htm” or “.html”, and even that was annoying. It’s one thing to have everything be .html. But then (I think FrontPage or its ilk were responsible, but someone please set the record straight here) we got .htm pages as well. Now, it was a 50-50 chance that your memory of a URL was correct. In time, we’ve gotten .jsp (with the hideous jsessionid nonsense), .php, .cgi, and (God help us) .pl pages or .py pages, and probably a whole host more. Is there *any* good reason for this rubbish?

You know, technologies underlying your webpages are going to change. There’s nothing you can do about it, they just will. Slashdot is a good example of using .pl extensions. And again, why? Why use any extensions? What happens when you switch from perl to ruby or python?

The point is that the web is evolving. So, why deliberately lock down your site to embrace one web technology? So your website is up for 5 years with your ugly-assed jsp pages and you’ve gotten up there in your google rankings and what not. Then along comes your new business needs, driving your web infrastructure away from jsp to php. All of a sudden you change your extensions, and now you have to do a whole bunch of redirects. Do you see how this doesn’t scale at all? Is it just me?

Honestly, .html extensions are there needs to be, if anything at all. What I really like are no extensions whatsoever. Django embraces this idea. You get really beautiful URL’s with no extensions and other ugliness. Down the road, when you switch to RoR or Java or whatever, your URLS (gasp!) will not have to change!!

OK, that came off pretty rant-like, but the ultimate point I wanted to make is this: my employers are cool like that. They’re paying attention to the things I say 🙂 I brought up the point of future-proofing url’s, and if you look around on the site (especially the revamped DevZone, you’ll see a lot more future-proofed URLs. There’s still some ways to go before we stop exposing the technology behind our web infrastructure, but it’s a great start.

Tell me your thoughts on this — I’m especially interested in you .jsp and .php people. How do you possibly justify that nonsense?

The Stealth Website CMS

So, I’ve been writing a CMS thingy to manage the website for my wife. That has taken a bit of a turn on the backburner, but it’s returning to the front next week. In the meantime, I wrote up django apps for part of the websites where I work. It took quite some learning. Along the way, I learned about decorators and manipulators and validators and templatetags and context processors. Pretty much everything was learned out of James’ blog, and the rest was divided evenly between Django’s own fantastic docs and the fine folks in #django.

I don’t know how the rails community or other communities are. But I’ll tell you the learning has been fun and challenging and easy. The challenge came in to play in the material itself. It was easy because people are so forthcoming with information to help you.

So, I wrote the CMS for work, but I’m not counting on it getting adopted, to be honest. However, a lot of the models and ideas that got created and generated in that project will make their way into the church website. I’ll start to talk more about that one as I make real progress on it next week. I’m looking for a place to host it so that I can share my progress.

The Master Cleanse: Day 3

And then there were three…

My sister’s fiance backed out of his master cleanse programme. They went to the mall, and he went through the food court, with all its smells of pizza and who knows what else, and that did him in. They got home and he made pasta with garlic bread. He feels guilty about it, of course, but he’ll try again the next time. It’s definitely a difficult thing to keep at, especially in the first few days. Those cravings!
And more so than the cravings is the simple desire to put solid food into your mouth. Chewing and all that.

For Aimee and I the day started ok. We lay in bed till late, and then got up to do the flush. Again, for me, there wasn’t much flushed. She had a lot more success. I wonder what’s going on with me. I’ll try again tomorrow morning. If nothing happens, I may reconsider this cleanse this time and reschedule it for January.

The cold that came over me in Oklahoma last Saturday hit me pretty hard. It wasn’t till Thursday that it finally subsided. And now, as of this evening, it hit Aimee. I don’t know if it is the same cold, or a different strain (in which case, should I now be looking forward to another cold?). She’s in bed with a fever. She had some peppermint tea and she took some NyQuil before hitting the sack. She had a slight fever at bedtime. I’m more inclined to take her off the fast, but she’s going to pull it for another day at least and see what it’s like.

Now, because we were so late this morning, she did get a little weak from low blood sugar. A glass and a half of lemonade later, she was feeling much improved. It’s weird for her, because the lemonade does actually cure her hunger, even though it’s not so satisfying. It doesn’t give you a “full” feeling. Or at least not one that lasts more than a few minutes. Being mostly water, it pretty much goes right through you.

So, let’s see how tomorrow goes. This whole fast may come to a halt, or it may not. Will our heroes make it, kids? Tune in!

Django and The Prophet of Bits

So, I’m in the Django IRC channel yesterday. Well, let me back up for a minute. I’m working on a mock-up/demo for djangofying (did I just invent a word here?) some parts of the StreamBase websites. So, I’m deciding on the models and stuff, and it occurs to me that some pages use the same models, just in different ways (based on various aspects of the model). And so, I think that there must be something to make the rendering of the different models easier (instead of creating a _dict in the urlconf). As it happens, there is.

(I tried to paste it in here, but this BROKEN BLOG SOFTWARE won’t let me. I’ve built a blog in Django already, I just need to CSS it up and host it somewhere, so soon I’ll be moving off this piece of crap.

I just want to give my thanks to Jeff (bitprophet`) for all of this. He even made quick code snippets for me (it’s his paste) to learn from.

Community: that’s what makes django really powerful.