JavaScript

Web-based editing with TinyMCE

While it’s not specific to PHP, I have found what is perhaps the best web-based WYSISYG editor going: TinyMCE. The only reason I am mentioning it here is because of the framework I built behind it.

The goal was to build an admin page for “blosxom-ish” blogs (like Blosxom, pyBlosxom, phpBlosxom, etc) that use text files for entries. The inital idea was to do it in Python/PSP using mod_python. I quickly abandoned this for the following reasons:

  1. No matter what I tried, I could not get the PSP include directive to work.
  2. The mod_python PSP documentation is sparse and generally not helpful.
  3. I wanted to bang it out and get it done, and I am already familiar with PHP enough to be comfortable with it.

I do have plans to re-implement in a Python cgi-style format, and will offer it to the community at large at that time, but until then this version seems to be working ok for me (at least at the moment).

If you would like a copy of the source for this (WARNING! It is not commented and seriously shows the signs of being hacked out in one evening!) drop me a line and let me know.

By the way: I almost forgot the important part. What is it that makes me think TinyMCE is the best web-based WYSIWYG editor? The fact that it generates <p> tags for paragraphs (rather than stuffing in a couple <br>s), uses <strong> and <em> rather than <b> and <i>, has a working link and image insertion tool, a preview button, and it applies itself to all the textareas in a form page without jumping through a bunch of hoops with id and style attributes. Generally it produces valid HTML 4.0 Transitional. (I think it could be tweaked to produce valid XHTML 1.x Strict, though.)

So what could be tweaked?

  • The “tidy” tool doesn’t strip out the M$ Word class=”MsoNormal” attributes when pasting from Word.
    • Possible fix for now: strip those out in the back-end processing
    • Long-term fix: Find the javascript code that does the tidying and add the logic to delete the Mso* attributes.
  • It uses <font> tags rather that <style> tages to apply color and font-face changes.
    • Possible fix for now: replace the <font color=”#??????”> tags with <span style=”color:#??????;”> in the backend.
    • Avoid using font face changes and allow the css of the site that is going to be displaying the page handle it.
    • Long-term fix: Find the javascript code that produces the font tags and replace it with span.

Overall, it does what it says, and that makes it another of those things that I like: stuff that works!

Python

Checking out TurboGears

On the recommendation of Ted Leung (a former boss of mine and a font of programming wisdom) I decided to look into TurboGears. WOW!

I have seen all kinds of claims along the lines of “this framework is so special because . . .” – and well, most of them just don’t live up to it.

TurboGears does exactly what it says. It provides a means for rapid web application development. And as proof they provide a video that shows the creation of a wiki in right around 23 minutes, start to finish. It doesn’t get much better than that, now does it?

Tools

The best tools for the job – part 3

Programming:

I work in a couple languages and develop everything from full-blown applications to web applications to scripts for server maintenance. These are my top picks for whatever language I am working in at the moment.

Java:
I have been using (for several years) and am partial to NetBeans [Linux – BSD – Windows – OSX]. This Java IDE has progressed into a full-featured environment including the following integrated pieces:

  • Tomcat server
  • local Pointbase database
  • Javadoc Index search
  • Internationalization
  • refactoring engine
  • JUnit testing

I haven’t really tested Eclipse [Linux – BSD – OSX – Windows] more than to install it and run it for a short while. Truthfully, I just didn’t feel like overcoming the learning curve, since I already know how to do what I want to do in NetBeans.

Bash Scripting:
Of course it is always best to do Bash scripting in a bash shell, preferably in XEmacs [Linux – BSD – OSX – Windows] or Nano [Linux – BSD – OSX – Windows (DOS)].When I can, that is exactly what I do. Often, however, I am forced at work to develop Bash scripts for servers from my desktop (Windows) PC. For this I have found evolvEd [Windows] to be the tool of choice. It provides syntax highlighting and code completion hints which help a great deal when you are unable to paste a line of code into a terminal window and see how it runs. Of course, I can test those scripts (at least partially) in Cygwin [Windows] which I make sure to install on every Windows box I am expected to work with, but those tests are limited in that calls to other programs don’t work if those programs aren’t installed in Cygwin.

Python:
Python is fairly new to me still, for anything beyond server scripts, and large text file parsing, which is what got me started in Python. (Python can do a line-by-line parse of a 280MB text file, determining the interesting non-empty lines by the characters in the 12th – 20th position and writing them out to a series of 1200 line files in a matter of a couple minutes – as opposed to the constant hung process I was getting with a Bash script to do the same thing.) Being new to Python I have really only worked with IDLE [Linux – BSD – Windows – OSX] which is included with the current distribution of Python. There may be better things out there – perhaps jEdit [Linux – BSD – Windows – OSX] or something else, but I am still too new in the game to make that decision, even for myself.

Tools

The best tools for the job – part 2

Music Creation and Editing

When it comes to music creation/editing software and tools there are rabid fans of just about anything you can find. These tools are by no means the only thing available, and there might even be some that don’t do the job as well as others. These (as all the picks in this series) are just the ones I happen to like.

Sequencing:
For sequencing (MIDI) work I like Anvil Studio [Windows]. I have been using it for several years now, (since around ’99 or ’00 or so) and it works great for composing music. I generally create a complete melodic piece, and then split it into ‘chunks’ which I can use in my loop composition package. I then work out the harmonic tracks based on the whole, figure out the thematic elements and work that into a set of harmony ‘chunks’ which are (mostly) interchangeable throughout the melody line.

Using MIDI pieces directly in a loop composition package is generally not such a good idea. You’re generally stuck with whatever MIDI interpreter is built into the package. Which is why I then take my ‘chunks’ and convert them to wav files using TiMidity++ [Windows – Linux – BSD – OSX]. Since TiMidity++ uses Gravis Ultrasound compatible patch files and/or SoundFonts (essentially sample libraries) to convert to wave, you get the benefits of a sampling board, and you can turn your MIDI files into well-voiced wavs.

Of course, well-voiced wavs still aren’t completely ready to pull into a loop composition. They need to be edited, manipulated, sometimes warmed and riched, sometimes fuzzed and occasionally pitch-shifted or time-stretched (when the piece starts to deviate radically from what I started with – which happens more often than you may think). Plus there are those direct recorded samples (usually done with something like the built-in Windows sound-recorder) of things like hand drums, didgeridoo, or some weird sound that I thought would be cool. All of these need to be edited before importing and for that I currently use WavePad [Windows]. I used to use Syntrillium CoolEdit (which has now become Adobe Audition) but I couldn’t keep up with the ever rising license costs. So far, WavePad has been able to do everything I need it to do, so I’m not feeling too bad about it. I have also tried Audacity which I love under Linux, but feel the interface of WavePad suits better.

Once I have all my chunks and loops, it’s time to assemble them. For this I use eJay Music Director Gold [Windows]. I have tried other packages (like Acid and FruityLoops) but so far have been pleased with what I can do in Music Director. I may try other packages again some time in the future – but for now I am sticking with what works!

Tools

The best tools for the job

I am often asked by my Linux-using friends why I am using Windows, while my my Windows-centric friends wonder why I am using Linux or BSD and my Mac-user friends ask why I’m not using Mac at all. The answer to the last is easiest – I don’t have a Mac.

As to the other questions, it depends on what I am doing at the moment. I don’t think that Windows is inherently better or worse than Linux or BSD, nor do I think that all software that costs money is evil. I think it all comes down to asking the question: “What is the best tool for the job I am doing?”

With that in mind, here is the first installment in the list of my picks:

Web Development (HTML/PHP/JavaScript): Adobe HomeSite (previously Macromedia HomeSite, previously Allaire HomeSite). [Windows]

I have been using HomeSite for several years now, and despite the changes in company ownership, it continues to be the best tool available for general web development.

In the realm of rapid development, HomeSite has a built-in ftp client, and you can also set it to use a server running locally to see PHP pages and Perl CGI in action. For that I prefer Xampp from ApacheFriends, because of its ease of installation on Windows and the fact that it makes creating a local Apache/PHP/MySQL setup a snap.

The down side to HomeSite is that it doesn’t understand Python/PSP, and changing the tab settings to use spaces instead of tabs seems to be broken in the latest version. I thought it used to do that, but I may be mistaken.

The only tool that comes close is Bluefish [Linux] which seems to be improving in great strides. When I need to whack out a quick web document while in Linux that is the tool for which I reach.

Although Bluefish understands Python it still doesn’t quite work the way I would like it to when highlighting and parsing PSPs. Maybe, when I have the time I can write a plug-in for HomeSite to do just that.

Tomorrow: Music Editing/Creation Tools

Writings

I’m still here

Just to let the myriad of my readers know (all both of them!) that I am still here. I just decided to take a weekend.

I figured that since I had a three-day weekend I would avoid working on anything other than the house for a couple days. That was actually very nice.

Now, however, I find out that not checking my email accounts several times a day, in fact letting them go for more than two whole days, I am facing an incredible amount of catch-up I have to do. The old saw that “Hard work pays off later, procrastination pays off right now” comes with an unspoken caveat: while procrastination might pay off right now, the check still needs to be handled later!

Alaska

(Yet Another) Augustine Update

Word just came over the radio that all flights into and out of Anchorage International Airport and the Kenai Peninsula have been
postponed until 3PM tomorrow due to the danger of ash above the 30,000 foot range.

CORRECTION: Listening to the rebroadcast (which was much more in-depth than the first announcement) it turns out that Era Aviation and
Alaska Airlines have suspended all flights between:
Anchorage and Fairbanks
Anchorage and Homer
Anchorage and Ninilchick
Anchorage and Seattle
and all flights in and out of Homer and Ninilchick, while all flights in and out of Kenai are expected to stopped at dark (because of the inability to see any ash clouds.)

Needless to say, we are currently on “alert” here at the university, getting ready to shut down and bag everything if the higher-level winds shift.

One of our coworkers who is currently involved in a cross-country ski competition in the lower 48 says there is no news of
the volcano down there.

Alaska

Augustine Updates

There have been three more eruptions so far today and the status has been moved back up from “orange” to “red”.

From the Alaska Volcano Observatory Augustine Eruption Page:

January 13, 2006
Level of Concern Color Code: RED

Several explosive events occurred at Augustine Volcano this morning: at approximately 3:55 AM AST (13:24 UTC); 8:47 AM AST (17:47); and 11:22 AM AST (20;22). Pilot reports and satellite imagery confirm ash clouds in excess of 30,000 ft above sea level moving eastward. Seismic data suggest that pyroclastic flows and lahars (volcanic mudflows) are occurring on the flanks of the island and possibly extending beyond.

Similar short-lived explosive activity is expected to continue over the next several days or weeks. Individual explosions are expected to produce ash plumes accompanied by pyroclastic flows and lahars (volcanic mudflows) on the flanks of the volcano.

More information is also available at National Weather Service, Anchorage Forecast Office – Augustine Coordination.

2DL

Finally got some samples up

I finally got around to uploading some samples from the first released 2DL album for Now

Since the fastest upstream rate I can get here without going to a managed T1 (why, oh why, can’t I get an unmanaged T1 here?) is 360kbps the files are in lower quality MP3 and limited to only the first two minutes of each song. They are, however, decent enough to give you an idea of what we (2DL) are doing.

To access the samples go to http://www.evardsson.com/blog/2dl/ and check them out.

I do ask that you are gentle on my server, though, for the reasons listed above.

Alaska

Augustine Eruption

Mt. Augustine started spitting ash this morning, as we all knew it would. (Details available at The Alaska Volcano Observatory.)

Currently all the ash is staying East of Anchorage, but if the wind shifts we’ll get plenty. That may mean a long day or night for me and my co-workers as we power off every piece of equipment with a fan or moving parts, bag all the servers and PCs and seal the server rooms and wire closets with plastic sheeting.

In case you were unaware, volcanic ash is actually tiny pieces of glass and it can do serious damage to electronics, glass, cds, car paint jobs, your lungs, ad infinitum.