Sorry, Taiwan Is Closed

As of right now, every city and county government has announced that businesses and schools will be closed tomorrow. I closed my restaurants early tonight at 8pm and we will decide tomorrow when to re-open for business. It is too early to tell when it will be safe for our staff and customers to open.

Meanwhile I’ve managed to get almost complete translations up on my English version of official business and school closures. The exceptions are notes 3 and 4 at the bottom which are atrocious run-on sentences I can’t quite wrap my head around in understanding. They don’t seem to be terribly important though from what I can understand of them. 3 is about who is affected by the closure notices and 4 seems to be about whether or not the time off is paid or will require make-up work. My translator fetches a copy of the official page every ten minutes and rewrites it and posts it on my web server. Pretty neat for a quick hack.

The current forecast has the typhoon cutting across the center of Taiwan but the storm is big enough that it will probably affect all of Taiwan. The eye should cross over the east coast tomorrow morning at 8am and exit on the west coast around 5pm. So there’s a good chance that we’ll be stuck at home all of tomorrow unless the storm weakens after making landfall. Right now things are very quiet in Taipei. “The calm before the storm.”

Quick Hack

As a quick hack, I’ve whipped up something that will automatically translate the official business and school closings from Chinese to English:

As this is a quick hack, it currently only has translations for the current contents of the main table. I will have to update the translations as new types of closings are posted, and add translations for the surrounding information.

Web application development (Part 2)

Thanks for all the great feedback on my previous post. I had previously wondered why I don’t get a lot of comments on my posts and I think I’ve discovered why. I haven’t been making postings that were nerdy enough for my readership. Well, I guess I’ve learned my lesson.

I got a lot of good advice about using Drupal, CakePHP and Rails. I also got some offline advice to look into another PHP framework called Symfony. Symfony has one good thing going for it in that it has a book out which is available locally, which isn’t something any of the other PHP frameworks have going for it. (Drupal has at least one book available locally and Rails has at least a dozen.)

Anyways, after weighing all the good suggestions, I gave a stab at learning CakePHP. I found a few good tutorials online, probably the best of which is Sitepoint’s article The CakePHP Framework: Your First Bite. I combined that with a couple of other tutorials and within a couple of hours had an application with basic user authentication working. It really was pretty easy.

Today I worked on setting up the modeling for my first web application. I want to have a system where I can enter the hourly sales breakdowns from our daily receipts to come up with a schedule predictor of how many staff should be on duty at what times. SUBWAYâ„¢ has a way to do this but it involves employees writing information on dead trees and the manager to calculate by hand this data weekly. Much easier to just enter the raw numbers from the Z-Tape receipt each day and have it calculate things for me.

So I’ve finished modeling the four database tables needed and their relationships, and have entered some basic data with scaffolding. I think the modeling is pretty much set at this point and I can start building the controllers and views.

All in all it’s been fairly easy to get to this point and already I can see all the work that’s needed to get this complete. It’s quite possible I’ll have a working application by tomorrow and can bring the results to my manager at our weekly meeting on Wednesday.

Better yet, as soon as I get the authentication framework a bit more robust I can get my manager access and have her do the weekly data entry and set the employee scheduling herself. And the eventual goal is to get everything we do now in Excel and E-mail to be done via web applications.

Web application development

I’m looking for some advice from my readers. I’m looking at developing some web applications to support my business. A lot of it will be data entry that will be saved in a database and then some simple data processing done to the data. I will also need multi user access with authentication and authorization functions.

My server is currently LAMP based: Debian 4, PHP 5, MySQL 5, Apache 2.2. So a solution built around this platform would be easiest to implement, and I also have basic PHP coding skills.

Here are some of the options I’m considering:

1) Roll my own application from scratch based in PHP. More work, but more flexibility and less learning.

2) Install Drupal or some other CMS and build modules. Will get a nice CMS too but need to learn a bunch of stuff and the type of apps I need to make will still require significant effort.

3) Use some kind of PHP Rapid Development Framework. Again, this will require more learning, but again has the flexibility of not being tied to a particular CMS’s requirements. But then the question is which one? CakePHP, Prado, Horde?

4) Switch over to Ruby on Rails which is supposedly the easiest way ever invented to code web apps. Means installing and learning a new platform and language from scratch.

5) Something else?

Any ideas or feedback?

Lyrics: New York Is A Woman (Suzanne Vega)

I’ve been listening to Suzanne Vega for ages and she’s finally released a new album recently called ‘Beauty & Crime’ which is pretty good. Even better, it was available on iTunes Plus (high bit-rate and no DRM!). Probably the best track on it is ‘New York Is A Woman’. I tried to find correct lyrics for it but couldn’t find any one site that had the complete and correct lyrics (some were correct but incomplete, others were complete but incorrect), so here’s my version:

Artist: Suzanne Vega
Song: New York Is A Woman
Album: Beauty & Crime

New York City spread herself before you
With her bangles and her spangles and her stars
You were impressed with the city so undressed
You had to go out cruising all the bars

Your business trip extended through the weekend
Suburban boy here for your first time
From the 27th floor above the midtown roar
You were startled by her beauty and her crime

And she’s every girl you’ve seen in every movie
Every dame you’ve ever known on late night TV
In her steam and steel is the passion you feel endlessly

New York is a woman, she’ll make you cry
And to her, you’re just another guy.

Look down and see her ruined places
Smoke and ash still rising to the sky
She’s happy that you’re here but when you disappear
She won’t know that you’re gone to say goodbye

New York is a woman, she’ll make you cry
And to her, you’re just another guy

And she’s every girl you’ve seen in every movie
Every dame you’ve ever known on late night TV
In her steam and steel is the passion you feel desperately

New York is a woman, she’ll make you cry
And to her, you’re just another guy


As expected, Pabuk didn’t have much affect on us up in Taipei. All we got was a bunch of rain.

Right on its tail is Wutip which is forecast to hit Taipei early tomorrow morning. The forecast probability is at 62% for Taipei right now so it looks likely to reach us, but it’s a fairly weak storm so I’m not expecting much from it either.

Pabuk (Part 2)

When I posted the previous entry, Typhoon Pabuk was headed towards central Taiwan and had a 58% chance of affecting Taipei. As the day has worn on the predictions have moved steadily southward to the point where currently it is predicted to cross the southern tip of Taiwan and only has a 12% chance of affecting Taipei. We’ll probably just get a lot of rain.