Review: Safari Beta for Windows

I know it’s a beta, but with a first impression like this:

safari.jpg

There’s no other choice.

safari-remove.jpg

Database Connectivity With Linux & PHP to IBM iSeries & DB2

BACKGROUND

I work with a local government, where the majority of our existing information systems are on an IBM iSeries machine.

The entire city runs on what is referred to as “green screen” apps. I was charged with the task of bringing our municipal utility company’s bill payment online. Well, not exactly bringing it online… but giving what is currently online a major overhaul.

The existing site was done with an abhorrent product called IBM WebSphere. Apparently people have made pretty impressive applications with this product, but I don’t see how. I spent three months in what I’ve dubbed “JSP hell” (while also working on other PHP/MySQL websites) trying to figure out what a Web Interaction is and then trying to figure out what COBOL program runs when a certain form is submitted. I’m not even going to start on COBOL.

Scattered throughout the JSP code were the one thing that made sense besides the HTML, SQL queries.

unix ODBC to the rescue

NOTE: This was all done on SUSE 10 Enterprise. Your mileage may very, blah blah blah, the usual disclaimer.

Per this wonderful, difficult to find IBM Redbook I found out that I need to install something called iSeries Access (IBM Account Required) – the software is in the form of a RPM.

[shell] rpm -ivh iSeriesAccess-5.2.0-X.YY.i386.rpm

We already had unixODBC installed.

After iSeries Access is installed, run this command:

[shell] odbcinst -j

You’ll get a path to some .ini files. Ours were in /etc/unixODBC/. Fire up your favorite text editor and edit /etc/unixODBC/odbc.ini.

Here is the sample config file that IBM references in the redbook. System is the IP or Domain name of the iSeries machine. Everything else is pretty self explanatory. Refer back to the redbook for clarification on a few of the settings if you need to.

After you’re done editing your file, verify that it works by running this command:

[shell] isql [Your DSN Name] [Your username] [Your Password]
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

Now, you may need to reconfigure PHP to have unixODBC (use ./configure –with-unixODBC) . I didn’t.

After that, it’s simple: use odbc_connect() and you’re on your way.

Django Changed The Game

It all started with a pretty ordinary project request from our Parks & Recreation department – “we want to be able to enter/edit scores for our softball games.”

So, like any good developer, requested a meeting so I could really understand what was going on… it boiled down to this kind of these database entities:

teams
fields
leagues
venues
scheduled games
completed games

Here’s a more traditional view of the design: (click it for a full view)

Keep in mind, only about four or five people (max) need to be able to have CRUD abilities with this data.

However, designing a system like this with PHP would be pretty time consuming to say the least. Even with my nifty little utils and db classes that I tout around.

Stevo had been ranting and raving about Django, specifically it’s administrative interface. So, I gave it a try. Luckily, I had been intending on doing this for some time. My server at home was ready to roll – Django was installed and I was ready to dive right in. A few hours later and with the guidance of Stevo, my model was made.

The source is simple. Python was very intuitive, except for a weird placement of a tuple ( [[ here it was ::: None, {'fields': ('name',)}),) ]] but BAM. The administrative interface was done before lunch.

PHP is unable to compete with this rapid administration capability. Now to get this put on our production server…

Push != Pull, or Why You Should RTFM

My first idea for an F8 app has tanked. I should have read those docs a little further…

I was making a simple countdown, because lot of friends of mine used their status to count down to an event.

From the FAQ:

Is there a way I can avoid pushing content individually to each user?

You can specify default FBML in your application settings, but if you want the boxes to look different for each user, you must manually push to those users. The content rendered in the profile at the time of display must come entirely from our servers to ensure speed and privacy and some level of design sensibility (hence, this is a “push” and not a “pull” model). You can make dynamic content in response to a user’s interaction with your module (via “mock ajaxv or flash). If there is content you want to share across multiple people’s profiles, consider using the tag.

Well… damn. The countdown won’t update itself upon every profile view.

So I thought, I know… I’ll use a PHP generated image, just like I have on my blog… Nope. From the FBML docs:

img tags will also be handled specially. At publish time, any URLs given for images will be requested by our servers and then served by our own image servers. The src attribute of img tags will be rewritten. This protects the privacy of our users and allows us to better control quality of service of images.

The only other way I can envision doing this is pushing out FBML updates via Cron daily or at a specified interval… think the users would go for that?

Offline

Number of hours in the last seven days: 168.

Number of hours I absolutey could not access the web to do what I needed to do: ~40. (being out and about in St. Louis, driving to and from St. Louis, Paducah, The Lake, Owensboro, and Murray… staying a night at The Lake) Note: All 40 of these I had no access to a computer, too. We don’t have a computer or internet connectivity at The Lake. I could have used my phone, I suppose.

Number of hours I needed to access the web: 0.

See: You’re not on a fucking plane (and if you are, it doesn’t matter)!

5 Applications I’d like to see on Facebook’s F8 Platform

Facebook released The Platform last week. This post isn’t intending to break the news or provide anything but a few of my ‘hopeful’ apps I’d like to see with F8.

It’s interesting to note that according to the Developer Documentation Facebook is not offering ‘hooks’ into their Marketplace, Notes, Video, or Posted Items applications. Currently they only allow you to leverage their users, events, photos, and groups. I wonder if this is going to change in the future.

5) faceBulletin. Facebook has some discussion features, but it’s no full fledged message board. I’d like to see vBulletin integrated into the platform. Think – a vBulletin forum for each of your Facebook groups. One thing Facebook seems to lack is a “what’s changed since my last visit?” for their discussion area — akin to vBulletin’s “New Posts”.

4) Google Calendar integration. Have Facebook events that you’re attending automatically add to your Google Calendar and vice versa (with privacy, of course). Also, be able to set calendar sharing up through Facebook friends. Let’s say you’re in a group on Facebook called “Wednesday Poker Games” with the integration, a Google Calendar entry/Facebook event could be set up to occur every Wednesday at 7:00 pm. You could leverage Google’s SMS reminders with Facebook’s large user base and social graph. You would also be able to check against your work schedule if you entered it into Google Calendar.

3) A Better Last.FM. TechCrunch slammed Last.fm for being too slow when I’m willing to be they’re trying to make something actually useful to Facebook users instead of my last N songs showing up. The current unofficial Last.fm facebook application is also fairly restricted because it depends on the last.fm XML feeds which are not updated very frequently. Leverage the friends on Facebook that use last.fm! For example, I have maybe one friend on last.fm… and over 300 friends on Facebook. I hope last.fm is taking the approach of full integration into F8.

2) X-box Live/XBLA integration. I don’t even own an X-box but I can see the possibilities. Imagine logging into X-box live and seeing all of your Facebook friends that use the service showing up on your list. Imagine a little Guitar Hero Addicts Support Group having each members’ top scores for each song included. Apply thoughts like this to any game.

1) A better Monster/CareerBuilder/Job Site. Imagine being notified of a Job opening at a friends company that is related to your college major/work history/interests. I would personally like to see this go to 2 levels of friends. A friend of a friend has a job opening at company XYZ. It’s not always what you know, but who.

Google Analytics will make your boss happy

If there ever was a question about Web Analytics packages, this should answer it:

untitled-1.jpg

FCKEditor and Ajax Requests

This took me a while to figure out, so I hope this little tidbit helps someone…

If you want to send XHTML over GET or POST in an Ajax request with FCKEditor, be sure to do something like this:

var pars = 'page_content=' + escape(FCKeditorAPI.GetInstance('page_content').GetXHTML());

The critical part of this is escape() – it is the javascript equivalent of PHP’s urlencode.

CSS: For Your Sanity

I can’t remember where I read this, but alphabetizing your CSS attribute lists is a great habit to get into.

I haven’t quite gotten to the point where I’m abstracting CSS as much as some (one file for color, one for positioning, etc) but I’m starting to go a little batty with all of the style I do have to deal with… one way to help is to alphabetize the CSS attributes so you don’t have to look around as much to find where your margin attribute may be hiding.

Another For Your Sanity Tip: Initial CSS which takes care of a lot of the “default” styling that happens to elements.

It’s been a week

- Dreamhost is announcing PHP 5.2.1 sometime soon… that means JSON support… that means I can put “the app” there!

- I was sick from last Friday until yesterday. Yesterday I got back in the swing of things and started running again, too.

- I’ve reached a point where I’m comfortable taking the app live, if I’m the only user…that isn’t exactly the case.

- Dailyshortcut.com has had a post every day since November 3, 2006. That’s at least 112 keyboard shortcuts.

- I get to decide if I want to take some side work on this weekend…

- I’ve started extensive development on a new Owensboro Parks & Recreation Department website.

- I redesigned bofe.org to more accurately reflect my freelance offerings. Included is a infomercial style contact form which took me back to my direct marketing days.

- Two days ago I celebrated my sixth year of blogging. I rock.

Follow

Get every new post delivered to your Inbox.