Current musing:

A Review of Stylizer, a shockingly productive CSS editor.

I’ve always shunned paying for HTML and CSS development tools, because all you really need is a good text editor. The other day, however, I downloaded Skybound’s Stylizer 5 and promptly dropped the small chunk of change required to activate it. Read more…

downloads

These guides are free, but if you have found them useful then please consider donating $2. Hey, that's less then the cup of coffee your drinking right?

subscriptions

 


A Review of Stylizer, a shockingly productive CSS editor.

I’ve always shunned paying for HTML and CSS development tools, because all you really need is a good text editor. The other day, however, I downloaded Skybound’s Stylizer 5 and promptly dropped the small chunk of change required to activate it.

Stylizer, which is available for both Mac and Windows, is a visual css editor like no other. The Skybound website claims that it is “shockingly more productive”, and even though I was skeptical at first, I’m a utterly convinced now. Stylizer makes working with CSS incredibly easy, without sacrificing any control.

Real-time Preview and Remote Controls

The first thing you’ll notice when launching Stylizer is that it is a browser. You can load any web page by typing its URL in the address bar, or load any HTML page from a local folder. Stylizer displays a live view of the page and loads all of its linked style sheets into tabs on a sidebar.

Stylizer updates its preview in real time as you make changes to styles, no refreshing needed, and it automatically refreshes the page if you make changes to the underlying HTML, although you’ll have to use another application to do so. All of this makes stylizer the perfect companion to a good HTML editor: keep them both open and you never need to do the save-switch-n’refresh dance.

On Windows, Stylizer previews pages in several different browsers, including IE 6-8, Firefox 2+, and Google’s Chrome. On Mac you’ll only get Webkit. I’ve had a little trouble getting the IE 6 rendering engine to work on my Windows 7 machine, but all the others work flawlessly.

Next you’ll notice Stylizer’s buttons that float just underneath each selector in the sidebar. Stylizer calls these “remote controls”. They can be a bit daunting at first, but once you get the hang of them you’ll wonder how you ever worked without them.

These sleek little buttons are the “shockingly more productive” part of Stylizer. You can set (or unset) all the most common css propertiess with a click, or you can click-and-drag to change margins, dimensions, and placements in real time. Slide your mouse across the desk and watch in amazement as elements slide smoothly across your layout. These controls make pixel perfect adjustments actually fun! No more guessing, reloading, guessing again, etc.

Bullseye, Stakeout, Lens, and Rulers

Want to create a new selector? Bullseye hits the… well, bullseye. Simply tap the space bar and click on an element in the preview. Stylizer displays a series of buttons representing the element’s ancestry at the bottom of the screen. Click the ones you want and, boom, instant selector creation. It’s devilishly simple. Stakeout works the other way around. With Stakeout enabled Stylizer’s preview displays a red border around any elements targeted by the selector currently being edited.

Stylizer’s lens and ruler make it easy to position elements and backgrounds perfectly. Lens is a magnifying glass which you can lock in place over the preview, and the ruler allows you to get perfect measurements of anything on the screen.

All four of these features are remarkably intuitive. They are tools you never knew you needed, but once you use them you won’t want to let them go.

But it’s still a text editor (sorta :)

For all the fancy visual editing mojo, it’s hard to remember that Stylizer is still a text editor. Although technically Skybound refers to it as a “grid based” editor, the distinction is semantics in my opinion. All the basic keystrokes do exactly what you would expect them to do. Press enter to go to the next line, press tab to change between a property and its value, etc. I was instantly at home using the keyboard. Stylizer even offers code completion and a set of poweful snippets.

Of course, you never have to worry about formatting your code or forgetting a semicolon. Stylizer automatically formats your code perfectly every time. You can even customize every detail of how Stylizer writes the CSS code. I feel like I have more control over the code with Stylizer than with a true text editor.

This is hands-down, Stylizer’s best feature: all the power of a fantastic visual editor AND all the power of a fantastic text editor. Stylizer is a truly revolutionary interface.

Not just a pretty face

Under the pretty UI Stylizer packs some heavy duty punch. You can save your style sheet to the local drive, a network share, or an ftp/sftp host, And once you save it, Stylizer remembers that location for the future. You can even save drafts of your style sheet and revert to them when needed. You can also bookmark pages for quick access.

Also, Stylizer’s powerful snippets make complex CSS code drop dead simple. Type the magic “+border-radius” property, for example, and Stylizer creates all the css properties needed to make this CSS3 functionality work in every browser that supports it.

What’s not to like?

A few things actually. For all its awesomeness there are some things that I think could be improved. Most notable is the lack of proper documentation. The tooltips are helpful, but there is no true instruction manual. Unfortunately that means you have to discover some of Stylizer’s more useful features and keyboard shortcuts through experimentation.

The activation requirements are also a bit draconian. Before activation is granted stylizer requires basic information about your system’s hardware be sent to Skybound. Of course, I can’t really blame them for wanting to protect against piracy. Especially among developers who have a pretty strong sense of “open source entitlement”.

It’s also worth noting that one activation key will allow you to install the program twice. Once on your laptop, and once on your desktop, and the same activation key works for both Mac and PC versions. I installed Stylizer on both my MacBook Pro and on my Windows 7 desktop.

Another minor annoyance is the need for a separate application to edit HTML, but even so my workflow has actually become simpler with Stylizer. With Dreamweaver I was constantly switching tabs between HTML and CSS edit modes, and then flipping over to Firefox to “preview” my work. With stylizer I don’t need Firefox and there really isn’t much difference between switching tabs and switching apps.

All in all, Stylizer is a fantastic program and I’m extremely satisfied with it. Try it for a day and you will be wondering how you ever coded CSS without it.


How to podcast with Modx 2.0

This tutorial will show you how to use Modx 2.0 Revolution to publish a podcast. It requires only one very simple custom snippet (which I will provide for you) and the GetResources snippet which you can download from the package repository. I assume you have a passing familiarity with Modx Revolution, but following this tutorial will also be a great introduction to using it, as well as to some its the new and very powerful features.

Tutorial Overview

Step 1: Setup Modx for podcasting
Step 2: Creating the podcast
Step 3: Creating the podcast feed

Step 1 Setup Modx

This step is pretty simple. Besides the basic Modx installation, you’ll also need the GetResources snippet and a custom filesize snippet. First, install GetResources through the Package Management interface under the System tab in Modx. Next, create a new snippet and call it “filesize”. Insert the following code in the snippet’s content:

$output = filesize($input);
return $output;

Step 2: Creating the podcast

I’m going to assume that your podcast will only be accessed through the feed that we’ll create in step 3. You could, of course, expand on this tutorial and create a nice web accessible front end for your podcast, but for now let’s keep it simple.

First, create a new template and call it “podcastTPL”.

Second, create a new template variable called “podcastFile”. Set its Input Type to “file” and assign it to your podcastTPL template under the Template Access tab.

Third, create a new resource and set its page title to “podcast” and its template to “podcastTPL”. Then create a new resource underneath this one with the page title “episodes”. This “episodes” resource will be the container for each individual episode.

Fourth, upload a few podcast files to a convenient location on your server. You can, theoretically, do this using Modx’s file manager, but I recommend using an ftp client instead. Podcast files tend to be fairly large and many servers have a relatively small limit on the size of files that can be uploaded via PHP.

Finally, create a new resource underneath your “episodes” resource. This is your first episode. Set its page title to the title of the episode. Under the Template Variables tab use the podcastFile drop down box to find and select the episodes audio file. Repeat this process for any new episodes. If you want to control the published date of the episode you can do so under the Page Settings tab.

Step 3: Creating the podcast feed

Nearly done! This is the hardest part, but don’t worry, it’s pretty easy!

First, create a new Chunk called “rssEpisodeTPL”. Paste the following code into its content:

<item>
<title>[[+pagetitle]]</title>
<link>http://www.oursaviorlcms.com/media/sermon-audio/</link>
<guid>http://www.oursaviorlcms.com/[[+tv.podcastFile]]</guid>
<description>Reading for the day: [[+description]] </description>
<enclosure url="FULL URL TO YOUR PODCAST FILES FOLDER/[[+tv.podcastFile]]" length="[[+tv.podcastFile:filesize]]" type="audio/mpeg"/>
<category>Podcasts</category>
<pubDate>[[+publishedon:strtotime:date=`%a, %d %b %Y %T %Z`]]</pubDate>
</item>


Be sure you change the “FULL URL TO YOUR PODCAST FILES FOLDER” in the above code. For example, if your episodes are stored in the “episodes” directory located in your root directory, then you would enter: “http://www.yoursite.com/episodes/”.

Second, create another Chunk called “buildDateTPL” and enter the following code:

[[+publishedon:strtotime:date=`%a, %d %b %Y %T %Z`]]


Third, create a new resource under your “podcast” resource, set its page title to “feed”. Under the Page Settings tab set the Content Type to RSS, and uncheck the Cacheable option. If you are using a Rich Text editor, be sure to disable it for this resource by unchecking the “Rich Text” option.

Fourth, in the Resource Content paste the following code (changing the all caps text accordingly):

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>TITLE OF YOUR PODCAST</title>
<link>FULL URL TO YOUR PODCAST'S HOME PAGE</link>
<description>DESCRIPTION OF YOUR PODCAST</description>
<language>en-us</language>
<copyright>YOUR COPY RIGHT INFO</copyright>
<pubDate>THE CURRENT DATE IN EXACTLY THIS FORMAT: Sun, 03 Oct 2010 00:00:00 EST</pubDate>
<lastBuildDate>[[!getResources? &limit=`1` &parents=`RESOURCE ID OF THE "episodes" RESOURCE` &tpl=`buildDateTPL`]]</lastBuildDate>
<webMaster>YOUR EMAIL (YOUR NAME)</webMaster>
[[!getResources? &limit=`0` &parents=`RESOURCE ID OF THE "episodes" RESOURCE` &tpl=`rssEpisodeTPL` &includeTVs=`1` &processTVs=`1`]]
</channel>
</rss>


Double check the code above, be sure you’ve substituted all the text in caps with your information. Note especially the two “&parents” parameters of the getResource snippet calls. These must be set to the resource ID of your “episodes” resource (the resource ID is listed in parentheses next to the resource name in the tree).

That’s it you’re done!

Check out your new feed by visiting it in the front end of your website. I recommend using feed burner to manage your new feed, it will automatically transform this basic feed into all the different custom feeds you need for any specific podcast client, including iTunes.

By the way, have you ever noticed that after smoking your cigar for awhile it can get a little bitter? A neat little trick is to gently blow out for a second or two through your cigar, and then let it rest for a minute. This will clear all the stale smoke and let the stogie cool down. It will taste much better afterward!

You might also be interested in

My Modx 2.0 Cheat Sheet


Zuckerberg reveals details about Facebook Phone

“The phone is real, and it’s going to dominate the market.” Said Mark Zuckerberg, CEO of Facebook, in an interview yesterday. Mr. Zuckerberg was surprisingly forthcoming about the company’s plans for a social networking centric phone. He revealed, for example, that the phone would be based on Google’s Android operating system, and would be available on both CDMA and GSM networks. Much to everyone’s surprise, he even revealed the phone’s name: Facepwn (pronounced face-pone). “Because this will totally ‘pwn’ your face!” he said as he unveiled the phone’s new logo.

Facebook phone logo: Facepwn

“this will totally ‘pwn’ your face!’

According to Mr. Zuckerburg, the key feature contributing to the phone’s “pwnage power” is its tight integration with users’ Facebook profiles. When a new user activates a Facepwn, it will immediately enable a “Listen Live” button on the user’s public profile. Clicking on the button will begin a live stream of all phone calls, in real time, to anyone who visits the user’s Facebook page. It will also automatically transcribe all conversations and post them to the user’s wall. When asked about privacy concerns, Mr. Zuckerburg appeared confused and said that “There are no immediate plans to allow users to disable this feature.”

Please Note: just in case you didn’t figure it out already, this is a spoof!


Using contenteditable to test css page layouts

This should be obvious, but I just realized that one could use the the HTML5 contenteditable feature to test page layouts. “Contenteditable” is a fancy little tag attribute that allows the user to edit the content contained in the element from the browser.

For example, I have a three column page with a footer that spans the first two columns and places a large element in the third. I needed to be able to alter the lengths of the columns quickly to see how my footer would react and so, instead of flipping back and forth between the html code, I simply did this:


<div id="content" contenteditable="true"> ...
<div id="sidebar" contenteditable="true"> ...

Now I could load the page in Firefox, Chrome, Safari, and Opera and fiddle around with the lengths of the columns simply by adding or deleting dummy text out of the columns and watching the footer move. Cool!


Free, excellent, Optical Character Recognition (OCR)

Why have I not heard about this before!? Google docs now offers automatic Optical Character Recognition for images and pdfs when you upload them. Details at Google Doc’s help site.

As a teacher I’m constantly downloading pdfs and wishing that I could easily convert them to editable text. I just tried this feature on one of my many pdfs and it worked perfectly, it even retained most of the formatting. I’m not sure how it will work on less then perfect images or pdfs, even if it gets 60% of the text right that could be a huge help.


Modx 2.0 Revolution Cheat Sheet

Many people have found my Modx 1.0 “Evolution” Cheat Sheet very useful.

So I think people will also enjoy the slowly being updated modx 2.0 “Revolution” Cheat Sheet.

Please note that I have not had time to update all of it, so things will be changing as time goes on, but the first page of this cheat sheet is already very useful because it highlights some of the changes to tag formats and a handy list of output filters.

Also please note that you can get excel or open office calc versions of both of the above files by simply changing the output variable in the address line from “output=html” to “output=xls” or “output=ods”.

Please drop me a comment if you have found these useful!


Code is NOT Poetry

Matt Ward has written a very nice article over at Smashing Magazine examining some of the similarities between code and poetry. It is an excellent article, but I must respectfully disagree. There are similarities between code and poetry, as Matt and others have seen, but these do not make code poetry (as claimed by WordPress’ famous tagline). Here are two reasons why:

A Categorical Difference

Following the ancients, we must distinguish between Craft and Art. Both are skillful endeavors that require mastery to do well, but they differ in purpose. Arts are pursued for their own sake, while crafts are pursued for the sake of utility.

Craft is done for the sake of some other goal. An excellent shoemaker, for example, is a craftsman because he creates shoes to be worn, and we judge a shoe’s excellence based on how well it serves its function. We never purchase a shoe just to hang on our wall. No, a great shoe is one that is comfortable, wears well, and looks great. A craft’s value and excellence lies in its utility.

Art, on the other hand, is done for its own sake. An excellent painter creates his paintings to be enjoyed in-and-of-themselves. There is no other purpose for his art. We judge a paintings excellence not on how well it sells beer (that would be commercial art, a craft), rather we judge its excellence based on how much we enjoy looking at it. In other words, an excellent painting is an enjoyable painting.

Code is craft. No one writes code so that the code itself can be enjoyed. It is written to perform some job. That is not to say that code cannot be beautiful. There is a distinct difference between beautiful and ugly code, but at the end of the day code is judged based on how well it performs its job. In fact, beautifully structured code that doesn’t work is worse than ugly, difficult to maintain, code that does. We can even say that beautifully structured code that doesn’t work isn’t actually “beautiful” at all, for the simple reason that it is flawed and doesn’t do what it’s suppose to do. The very question of what it means for code to be beautiful is bound up in the question of whether or not it fulfills it’s purpose.

Poetry is art, at least good poetry is. It is written to be enjoyed in its own right. Its beauty does not rest in utility but in itself.

The question of meaning

Code and poetry differ in many other more specific ways as well. But I want to deal with only one that Matt perceived to be a similarity: meaning. Matt argued that just as poetry has multiple levels of meaning, so code can impart varying meaning to content. He attempted to compare a poem’s literal and figurative meaning to some code’s semantic value.

He gave these two examples of HTML code to illustrate code’s ability to imbue content with different meanings:

<p>The Wasteland</p>
<h1>The Wasteland</h1>

I agree with Matt’s basic contention about this code: the displayed text is the same on both lines but the “meaning” is different. Obviously the first is paragraph text, and the second is a top-level heading. But these two lines are distinctly different lines. The one does not imply the other. One does not “figure” the other. Strictly speaking, considered as code, the content of each line is not the same. Each line can mean one and only one thing and it is different for each.

If this were not the case then code would be useless. Ambiguity in code is deadly. Just imagine the nightmare of trying to debug code in which a single line could be interpreted in 2 (or heaven forbid more) ways at the same time in the same context! But ambiguity is a strength in poetry. Ambiguity is poetry. The poet’s ability to give the same words multiple meanings at the same time is what makes a good poem good! Ambiguous figurative language is poetic language.

just look again at the example of poetry Matt provided. He quoted the following lines from Robert frost:

The woods are lovely, dark, and deep,
But I have promises to keep.
And miles to go before I sleep,
And miles to go before I sleep.

We could unpack the meaning of these lines for hours. What do the woods signify? Why are they lovely, but also dark and deep? Does sleep refer to death, or to the comforts of home, or both? We cannot derive the same joy from the lines of HTML code quoted above, nor would it be good if we could.

Code is not poetry. It can be excellent, beautiful even, but its beauty must be judged by a different standard than the beauty of poetry. Code is craft, poetry is art. Excellent code is certainly worthy of pursuit, laudable to master, but it will never be art. Speaking as one who loves to code, but hates to debug it, I’m thankful that is so.


Lucid Outlining Application

I love to outline, but I hate all of the outlining applications I’ve used. I want a simple, open, and free outlining app that works the way I want it to work. So I decided to make my own.

Lucid Outlining Application is my first attempt at creating an outlining app that does only one thing well: make outlines.

It is completely browser based and freely available. It will work with any modern browser which supports HTML 5 and advanced CSS. Unfortunately this means that no version of Internet Explorer works, but all three of the major competitors: Firefox, Safari, and Chrome, work just fine. (Since all three of those are free and available in cross platform versions I do not feel too bad about the lack of support for IE).

Main features

  1. Convenient keyboard shortcuts for fast editing
  2. Supports rich text entries (uses browsers native “contenteditable” attribute)
  3. Saves all data to local hard drive using HTML5′s local storage
  4. Free!

Lucid Outlining Application


Blog theme under development

I recently redesigned my main website, and now I’m finally getting around to making my blog match. Some things may not work properly so please bear with me. Of course, you can also feel free to contact me with any thoughts or suggestions.


Google, numerology, and what’s on our (collective) minds.

After reading this post about Google’s “suggest” feature, I was inspired to do a little experimentation of my own. What I found was very intriguing.

You are probably already familiar with Google’s suggest feature. As you type anything into Google’s search box, it automatically suggests completions based on the most popularly searched phrases. For example, type in “how to”, and Google will helpfully suggest “how to tie a tie“, and “how to kiss“. Clearly there are a lot of men who need to know how to impress their date!

Instead of questions, however, I wondered what would happen if I started typing in numbers? So I started with “1″ and just kept going. Try it yourself, but be aware that there is often a big difference between just the number (i.e. “1″) and the number with a space after it (i.e. “1 “). Be sure to do them both as you go along.

What I found interesting is that somewhere between the number “4″ and the number “11″, the phrase “X weeks pregnant” begins to show up every time. By number “13″ or “14″ that phrase is near the top and stays there until you hit “41″, especially when you insert a space after the number. Around the number “26″ you start seeing other issues concerning pregnancy, such as “weight gain”, and “what to expect”, or “fetal pictures”. This is a fascinating insight into what concerns women when they are pregnant. The closer you get to “40″ you can almost sense the desperation set in, it’s surreal.

I haven’t systematically worked through the 3 digit numbers, but I didn’t immediately discern any trends between 42 and 100. Most of the 3 and 4 digit numbers appeared to be address searches, and of course, 5 digit numbers tended to be zip code inquires.

The address results are interesting. Why are some addresses searched enough to make it on this list? Try “3837″ for example. For me it returned addresses from California, Texas, and Illinois. What is so interesting about “3837 bayview circle concord ca”? Google maps doesn’t list any businesses near that address. In fact, it’s a relatively normal looking house; you can see it on street view. Who lives here, and why is he so interesting?

Have you found any strange numerological insights or quandaries in Google’s “suggest” feature? Let me know in the comments