2
Oct
Posted by Chris Hartjes in Chris' Brain. 4 Comments
Thanks to the power of Twitter I found out that The Show for CakePHP was resuscitated and brought back to life last night. I listened to the (surprisingly short) show, the main thrust of which was that CakePHP 1.2RC3 was released last night. Why should you care?
Well, maybe not so much on the last item but it’s ALWAYS good to see any project make a significant release. 1.2 has been in the works for more than 18 months, which seems to many to be way too long. I’m not so sure I share that sentiment. If the goal is to try and produce quality releases, then “it’s done when it’s done” is a reasonable answer. I’m sure this is not a new argument, so I won’t get into it here.
My own contributions to RC3 have been, what’s the word…non-existent. Non-computer hobbies + side work = no time to contribute to Cake. I found out that commit access for people who haven’t contributed anything in more than 60 days has been revoked, but that’s really just a minor annoyance. I’m sure I could get it back by asking nicely and actually having something to contribute.
But I think I’ve gotten back into Cake developing at the right time as I caved in and decided that my long-rumoured plan-a-road-trip site shall be built in CakePHP after all. Yes, I’ve been playing around with Django but I’m violating one of my favourite rules: Just Build It, Damnit! I’ve been fooling around with Balsamiq Mockups to do the pages and are now digging around for helpers to do the mapping mashup I need. If you want to mock me over how little progress I’ve made, feel free to visit the site. If you’d like to get involved at all (I could use some help on the “make a pretty UI for it” front) let me know.
Article Tags >>
CakePHP ||
Rallyhat
23
May
Posted by Chris Hartjes in Chris' Brain. 3 Comments
I’m bored.
There, I said it. I think it’s probably one of my worst character flaws in that I get disinterested in long-running projects that I am working on quite easily. Somehow, CakePHP continues to grab my interest so maybe I’m getting better. But I can’t escape that voice I hear in my head (I mean, the one that cuts through all the other voices) that says “you MUST be working on the latest and the greatest, otherwise you’re wasting your time”.
Such is the peril when you work for a small company, and you’re the only developer on a project. I should’ve stuck with my guns and built the damn thing on CakePHP instead of CodeIgniter. Bah! Anyhow, here’s what I’ve been thinking about lately:
- Lots of good input on features for my ‘cake deploy’ idea. I got a good suggestion via Twitter to take a look at what Symfony is doing in this regard, so maybe they can give me some ideas on a solid implementation.
- I have an extreme alpha version of Rallyhat working, and are now trying to get the look-and-feel stuff taking care of. Found a colourscheme I like. Thank you kuler
- Gave up on the Django-on-Google-App-Engine idea because I just couldn’t get the datastore stuff to work properly. Screw it, I’ll go back to my straight Django app. I am contemplating running it off of Amazon EC2, but I wonder how much work that is to do. If any of my readers have any tips on making this work, let me know.
- 3 weeks straight of using MacVim as my main IDE! No complaints, and I broke out Komodo the other day just for the XDebug stuff. Yes, I know you can use xdebug inside vim but the implementation I saw lacks the variable introspection features that Komodo gives you.
- Some time in the next day or two, a beta release for CakePHP 1.2 is coming out. This is *very* exciting news. After that, 1.2RC1 is around the corner. If I wasn’t so damn busy working on the new and shiny things, I might actually contribute more than that one small patch for console work. Which other people ended up extending anyway. Bah
- I took a look at Seaside, a web application framework that uses Smalltalk and found out that there is no templating for doing the HTML. Huh? You create all the HTML programatically and then style it using CSS. Not too designer friendly, but they do give an explanation about why it is this way.. How delightfully sadistic! And yet, strangely appealing…
- I need to find a way to convince my employer that attending conferences provides value to the company, and not just me. Even though I only go to conferences where I speak. Unless I have some really generous readers willing to underwrite me to go.
- I read something recently on the idea of working remotely but with some other freelance tech types as a way to at least get some social contact. Don’t know how well that would work out here in Milton, but maybe it’s worth sending some feelers out.
Okay, back to refactoring some code for work…
Article Tags >>
Chris' Brain ||
conferences ||
Komodo ||
MacVim ||
Rallyhat ||
Seaside ||
Smalltalk ||
XDebug
2
May
Posted by Chris Hartjes in Chris' Brain. No Comments
Yes, it’s the day after May Day (workers of the world, unite!) and yes, I only managed to get one blog post done this week. So, it’s time for a round-up of the stuff I’ve been thinking about this week.
- For all the bleating I did on the CakePHP mailing list this week about using free and open software, the editor waffling continues and I was back to Komodo today. I needed the security blanket of an IDE today after spending way too much time with CSSEdit trying to get stuff lining up properly for a work project.
- Halfway through a code review project as a side gig. Old code, running on PHP 4.4.8 (those of you following me on Twitter saw me moaning about getting that working with CentOS on Parallels). Needless to say, the code is a mess but I have to actually talk about WHY it’s a mess and what can be done.
- Trying to see if I can get a caching plugin for WordPress to work with nginx. Not that I ever expect to get Dugg, but you never know. Almost there…
- Finally managed to get a Django app running properly inside the Google App Engine SDK. Work on that got torpedoed this week by two slow-pitch games…that got rained out…after me waiting around for 20 minutes or so. Next step is to build out my web service for Rallyhat. Should only be a few hours work (he said, not knowing now what he will know later)
- YASP (Yet Another Side Project) is going to get rolling this weekend. Some cool stuff using Amazon S3, integration with OpenID and PayPal. This time I actually have a plan to make some money.
- I’ve submitted my “Deployment Isn’t A 4 Letter Word” talk for ZendCon.
- Been updating the IBL web site to use the latest CakePHP goodies, meaning just refactoring a lot of stuff that was garbage and using newer techniques I discover via the mailing list and Nate Abele’s rantings.
- Special thanks to Travis Cline for sending me a copy of “xUnit Test Patterns” from my Amazon Wish list! Many thanks to a fellow budding Djangonaut for the gift.
Article Tags >>
CakePHP ||
Chris' Brain ||
CSSEdit ||
Django ||
Komod ||
OpenID ||
Parallels ||
PayPal ||
Rallyhat ||
YASP ||
ZendCon
12
Apr
Posted by Chris Hartjes in Rallyhat. No Comments
Well, that went relatively well. As a proof-of-concept for Google App Engine I decided to see what I could whip together today in between domestic duties, looking after the kids and praying that my wife gets better from her massive cold because I’m off to Vancouver tomorrow.
So, I pushed the database for Rallyhat up into the cloud and wrote a super-simple front end just to see if I could do it. You can take a quick peek at http://chrishartjes.appspot.com. To get it to spit something out, you need 3 parameters:
- home_team — nickname for a baseball team (i.e. Yankees, Red Sox, Padres). Don’t forget to urlencode the spaces with a +
- begin_date — date in YYYY-MM-DD format
- end_date — date in YYYY-MM-DD format
It’s a small start, but a start nonetheless. Next step is to configure my app to use the dev version of Django, not the built in version.
Article Tags >>
Django ||
Google App Engine ||
Rallyhat
4
Apr
Posted by Chris Hartjes in Python. No Comments
I continue to be impressed with Django as I build out Rallyhat. I have an extreme alpha version working on my laptop, minus the Yahoo! Maps stuff I've been playing around with. The biggest task was populating my database with the schedules for all the baseball teams. I thought I'd share what the import script looks like:
PYTHON:
-
#!/usr/bin/env python
-
from django.core.management import setup_environ
-
import settings
-
setup_environ(settings)
-
from rallyhat.www.models import Team
-
from rallyhat.www.models import Game
-
from rallyhat.www.models import Location
-
from rallyhat.www.models import Sport
-
-
from datetime import date
-
-
import csv, urllib, time
-
-
s = Sport.objects.get(name='Major League Baseball')
-
teamSchedules = Team.objects.all()
-
-
for teamSchedule in teamSchedules:
-
scheduleFile = teamSchedule.schedule
-
print "Importing games for " + str(teamSchedule.name)
-
-
if scheduleFile != "":
-
reader = csv.reader(urllib.urlopen(scheduleFile))
-
-
for row in reader:
-
teams = row[3].split(' at ')
-
-
if len(teams) == 2:
-
if Team.objects.filter(name=teams[1]).count() == 0:
-
print "Adding new team: " + teams[1]
-
homeTeam = Team(name=teams[1], sport=s)
-
homeTeam.save()
-
else:
-
homeTeam = Team.objects.get(name=teams[1])
-
-
if Team.objects.filter(name=teams[0]).count() == 0:
-
print "Adding new team: " + teams[0]
-
awayTeam = Team(name=teams[0], sport=s)
-
awayTeam.save()
-
else:
-
awayTeam = Team.objects.get(name=teams[0])
-
-
gameDate = time.strftime("%Y-%m-%d", time.strptime(row[0], "%m/%d/%Y"))
-
startTime = time.strftime("%H:%M", time.strptime(row[2], "%I:%M %p"))
-
-
# If this game doesn't exist, add it to the system
-
if Game.objects.filter(home_team=homeTeam, away_team=awayTeam, game_date=gameDate, start_time=startTime).count() == 0:
-
locationCheck = Location.objects.filter(name=row[4]).count()
-
-
if locationCheck == 0:
-
print "Adding new location: " + row[4]
-
l = Location(name=row[4])
-
l.save()
-
else:
-
l = Location.objects.get(name=row[4])
-
-
locationId = l.id
-
g = Game(home_team=homeTeam, away_team=awayTeam, location=l, game_date=gameDate, start_time=startTime)
-
g.save()
It's interesting to treat everything as an object after so many years of being in the PHP world where you can mix and match depending on what's been going on in your application. I'm also amazed at how clear the code is. There is some non-intuitive stuff in there, especially when dealing with the saving of model records. It took me a while to figure out I could pass the object containing the model as a parameter when saving a record for a model that it is associated with.
Article Tags >>
Django ||
Python ||
Rallyhat
Recent Comments