Web Devout tidings


Archive for the 'Miscellaneous' Category

A cool new CSS reference

Monday, February 4th, 2008

Tommy Olsson and Paul O’Brien have made something I’ve wanted to make for a while but haven’t had time for: a complete, modern CSS reference with in-depth usage information, examples, and compatibility information for more browsers than my standards support resource currently covers. I haven’t read through the whole thing, but what I’ve seen so far has been pretty accurate, including the documentation of some picky bugs that most standards support resources miss.

For a while now, I’ve felt that we’ve needed an accurate, up-to-date reference with more information and better readability than the W3C specs. Aside from the “all rights reserved” licensing, this is very close to the way I would have designed it. Clearly, a lot of work has been put into this.

The pyramids weren’t built in a day

Tuesday, January 15th, 2008

I have a confession to make: I haven’t actually been working on the new Web Devout that much lately. In my previous post, I mentioned somewhat in passing that I was developing a to-be open source system to power the new Web Devout. That’s what I’ve been busy working on, and for some good reasons. I’m not going to give too many details about the project just yet, but I thought I’d share some of my motivations for it and what I hope to accomplish.

At my job, I have to maintain a lot of different types of web apps. We have three installations of WordPress, about a dozen of Moodle, one of MediaWiki, one of Drupal, Two of Joomla, and other various systems. When a new update comes out for Moodle, I have to manually run the updates for each of the different sites, each of which usually involves a number of steps. It can end up taking several hours out of my day, and the other systems aren’t any better.

Website platforms are too hard to update.

We recently had a meeting to discuss the future of our web development efforts, particularly looking for some way to standardize all of our future endeavors on a single website engine. We looked at WordPress, we looked at Joomla, we looked at Drupal, we looked at a number of other systems, and we concluded that nothing out there could adequately do a good enough job on everything. Each app was good for certain types of sites or users, poor for others, and they would each stretch only so much.

Website platforms aren’t flexible enough.

I built the California Virtual Campus website using WordPress, which really impressed me with its extensibility to handle a site like that. However, as time has gone on and people have requested some changes here, some changes there, it became apparent that although you can build a lot of things on top of its base, it’s hard to remove things that are part of that base. WordPress provides a lot of helpful functions and a solid page management system, but it’s sometimes a little too helpful or a little too solid. In other words, it’s easy to scale a project up from WordPress, but it’s hard to scale a project down from WordPress.

Website platforms have layers that are difficult to remove.

What I want is a website platform that really makes me feel like I’m king. The king shouldn’t have to do the grunt work of manually downloading and installing an update every time a developer forgets that mysql_query($_GET['q']) probably isn’t the wisest thing to do. If the king wants his entertainers to start tending animals instead, they had better do it. And the king’s power shouldn’t be limited to just the living halls of his temples, but also to the underground dungeons, boiler rooms, and warp cores (depending on the era we’re talking about).

The system I’m developing is intended to make you king over your website. With diligence, elegance, common sense, and a striped hat, I hope this project ends up making web development just a little less stressful and a little more empowering.

There is not yet a guestimate on the release date, but it will definitely be free as in beer, free as in freedom, and free as in fat if you so desire.

How to: Enable edge mouse wheel rotate in Gutsy

Friday, October 19th, 2007

Update: It seems this solution only works until you log out, and it has to be applied again. At the bottom I’ve written a script to do this automatically.

When I upgraded to Ubuntu Gutsy (7.10), there was one thing that annoyed me about its version of Compiz Fusion: I’m used to rotating my desktop cube (well, octagonal prism for me) by moving my mouse cursor near the screen edge and rotating the mouse wheel, but that no longer seems to work.

In the past, you’d enable this through the CompizConfig Settings Manager by going to Rotate Cube → Actions → General → Rotate Left / Rotate Right, enabling all edges, and setting button 4 for left and button 5 for right. But that doesn’t work in this version, because the Rotate Left and Rotate Right settings are bound to the general Gnome keyboard shortcuts (that’s what the blue text in the Name column means). So you can change the settings, and it doesn’t give you any errors, but it just doesn’t do anything.

But fear not! The problem is that the settings manager just isn’t bothering to change the Compiz Fusion gconf entry when you change it. So the solution is to just go in and change it yourself. Here are the steps:

(First of all, keep in mind that this issue and solution are only for people using the Rotate Cube plugin, which isn’t enabled in Ubuntu Gutsy’s default profiles. If you aren’t using the Rotate Cube plugin, this probably won’t interest you.)

  1. You’ll need the Configuration Editor. Although this application doesn’t appear in your menus, it should be installed on your system by default. In case it isn’t, you can install it by going to Applications → Add/Remove… → System Tools → gconf-editor; or if you prefer a command line, typing “sudo apt-get install gconf-editor” in a terminal.

  2. Press Alt+F2 to bring up the Run dialog, and type “gconf-editor” to bring up the Configuration Editor.

  3. In the Configuration Editor, navigate to / → apps → compiz → plugins → rotate → allscreens → options.

  4. Double-click on rotate_left_edge (not rotate_flip_left_edge). Add the following values: Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left, and TopLeft. Press OK.

  5. Double-click on rotate_left_edgebutton, change the value to 4, and press OK.

  6. Double-click on rotate_right_edge and add the same values as in step 4. Press OK.

  7. Double-click on rotate_right_edgebutton, change the value to 5, and press OK.

  8. Close the Configuration Editor.

That should be it. Now when you rotate your mouse wheel near the edge of the screen, it will rotate your desktop.

Update: As it turns out, the above solution is only a temporary fix. Once you log out, Compiz seems to forget the setting. Below is a workaround script that you can set to automatically run at the start of each session:

#!/bin/bash
sleep 5
gconftool --type=list --list-type=string --set \
	/apps/compiz/plugins/rotate/allscreens/options/rotate_left_edge \
	[Top,TopRight,Right,BottomRight,Bottom,BottomLeft,Left,TopLeft]
gconftool --type=left --list-type=string --set \
	/apps/compiz/plugins/rotate/allscreens/options/rotate_right_edge \
	[Top,TopRight,Right,BottomRight,Bottom,BottomLeft,Left,TopLeft]
gconftool --type=int --set \
	/apps/compiz/plugins/rotate/allscreens/options/rotate_left_edgebutton 4
gconftool --type=int --set \
	/apps/compiz/plugins/rotate/allscreens/options/rotate_right_edgebutton 5
  1. Paste the above into a text editor and save the file as /home/<username>/bin/enable-edge-mousewheel.sh (substituting <username> for your account username).

  2. Open your home directory, then the bin directory. Right-click on the newly created file and click Properties. Click on the Permissions tab and check the box next to Execute. Close the dialog.

  3. Click on your System panel menu, then go to Preferences and Sessions.

  4. Click the Add button. For Name, put “Enable Edge Mouse Wheel“. For Command, put “/home/<username>/bin/enable-edge-mousewheel.sh“. Click OK.

  5. Close the windows.

How to: Upload PNG, GIF, or BMP to Picasa Web Albums

Thursday, July 12th, 2007

After a few months of searching, I’ve finally figured out how to upload PNG, GIF, and BMP files to Picasa Web Albums without them being converted into JPEG. Here’s what to do:

  1. If you don’t already have one, sign up for a Blogger account at http://www.blogger.com/

  2. Create a new blog. The title will be the name of the album you want to make on Picasa Web Albums. You have to use Blog*Spot for the hosting, and you should pick a Blog*Spot address that no one else is likely to want (some random keyboard mashing will be fine). You’ll never need to actually visit this address.

    Warning: If an album of the same name already exists in your Picasa Web Albums account, they will *not* merge. You will end up having two albums of the same name (but different URL), which you probably don’t want. Take this into account before picking the blog name.

  3. Once your blog is set up, go to the “Create Post” page in Blogger.

  4. Click on the “Add Image” icon just above the post entry field. This will open an “Upload Images” window.

  5. Click on “Browse” and select the image you want to upload. This may be a JPEG (JPG), GIF, BMP, or PNG up to 8 MB in size.

  6. If you want to add multiple images at once, click on “Add another image”. A maximum of 5 images may be uploaded at once.

  7. Once you’re ready to upload, click the “Upload Image” button.

  8. After it’s finished uploading, optionally give the post a title (today’s date or something, just to identify the image upload session), save the draft, and leave Blogger. The post body may be blank and you don’t need to actually publish the post, but there has to at least be a draft saved or else the images will be lost.

  9. Go to your Picasa Web Albums account. If all went well, you should have a new album with a little Blogger logo in the bottom-left corner. If the album isn’t there, try waiting a few minutes and refresh. If it still isn’t there, you should recheck the steps above.

  10. To make the album public, open the album page in Picasa Web Albums, click on Edit Album Properties in the left sidebar, and set it to Public.

For these Blogger albums, you’ll always have to use Blogger to upload images; the regular Picasa Web Albums interface won’t let you upload images into those albums. But you can view them normally, set captions, comments, etc. The images retain the full pixel-precise quality and filesize of the original images, and you can manually download them in their original PNG/GIF/BMP formats.

It would be nice if Picasa Web Albums would allow us to simply upload PNG/GIF/BMP images from the regular upload interface, but this will have to do for now.

Update on the job opportunities

Tuesday, May 22nd, 2007

As mentioned earlier, I was approached by both Microsoft and Mozilla with the possibility of a job with one of them. I’d like to give an update on the situation.

First of all, I really appreciate how Microsoft (specifically, Markus Mielke) hung out with me, sat in my IRC channel and chatted with me, and generally made me feel welcome throughout the last few weeks. Their sales pitch was also about the best pitch they could have made: if I really want Internet Explorer to improve, why not roll up my sleeves and play an active role in its development myself? I felt then and still feel today that I’d love to do what I can to help move Internet Explorer in the right direction.

However, as the discussion progressed, a few things started worrying me.

In order to work for Microsoft, I’d have to agree to not post or maintain any content particularly critical of Microsoft’s products. I already figured that the Internet Explorer is Dangerous page would have to be dumped or given an overhaul (and I actually do plan to eventually do a major rewrite of the page with better focus on what the core problems are rather than just “it’s fundamentally flawed”). But I’m no legal expert, and the loose wording they used put up a red flag in my mind, especially considering Microsoft’s extensive history of dishonesty and shady “gotcha” fine print in their agreements. There isn’t much I value more than freedom of speech, and if I receive a slightest hint that I may be unable to publicly express my true concerns on an issue, I have to take a step back and reevaluate the situation. I can’t risk Web Devout being sacrificed for a position that, in terms of how much influence I’ll actually end up having, is a bit of a gamble from where I stand.

Where I currently work, the only restrictions on my freedom of speech are for things like account passwords. The hours are flexible and the work is flexible. If I feel like making a blog for our organization, I make it, show it to my boss, and he says, “Cool, you should send links to everyone.” I love my job because I feel free. I only make $25,000 a year right now, but I’m fine with that. For now, all I need are a computer, Internet connection, food, bill repellent, and some money in reserve for emergencies. That’s enough.

I was never considering the Microsoft job for the money and benefits. Those are nice and all, but it wasn’t really a factor in my decision. From the beginning, my decision was going to be based on how much freedom I was willing to give up and how much that sacrifice would help me accomplish my goals. I want the Web to be a better place. I want web developers to have the right tools to make the most out of it. I definitely want Internet Explorer to be a better browser, but that’s just one piece in the big puzzle, and if working on that one piece would prevent me from working with the many other pieces I want to work with, then that’s a problem. How much of a difference would I really be able to make on the IE team? How much of a difference would I be able to make elsewhere if I had more freedom? I’ve been juggling these questions in my mind for the last few weeks.

I noticed something else. Somehow, I was under the impression that Microsoft had been improving over the last few years in regard to their role in the industry. Maybe it was just because they stopped being quite as aggressive for a few years and sort of sat on their laurels, I don’t know, but somehow I thought Microsoft was learning and improving, more openly embracing freedom of choice and standards, or at least not trying to fight it as much anymore. But the last few weeks have shot that idea dead in the water. Microsoft began sending out mass e-mails telling people to vote against the California state bill promoting ODF, instead telling them to push for Microsoft’s OOXML, using shameless flat-out lies like OOXML being better supported than ODF and being more application-agnostic (which anyone remotely familiar with the formats knows is B.S.). Microsoft began making up baseless nonsense about open source patent infringements for which they refused to provide any evidence. I’m hearing one story after another lately, and it’s really irritating. Microsoft gave me another reason to be concerned about taking a job with them: overall, Microsoft has continued to fight against the best interests of the computer industry, and they seem to be sparring against every application and technology that I personally like.

Then I thought about my future after Microsoft. I don’t want to work with Microsoft forever. I know that I’d have trouble adjusting to their culture, I don’t have any particular enthusiasm for their products (for the Web, sure, but not Microsoft’s products), and it’s generally not a company that I could feel proud or excited to work for. But once I decide to leave, then what? There aren’t many interesting companies in the area, and I wouldn’t have as good of a chance making positive connections with interesting companies as I might working for Mozilla. Big companies, maybe, but not as much interesting ones. Then, I have to consider any legal agreements Microsoft would require me to sign which would restrict what I can do after I leave the company. I recall a guy who left Microsoft for Google to manage the China operations, who was then forced to change jobs because of a previous contract he made with Microsoft. Like I said, I don’t have much of a mind for legal fine print, and I’m a bit paranoid about possibly putting myself into one of these types of situations. It’d be different if this were with a company that I really wanted to work for long-term, but Microsoft isn’t that company.

The bottom line is that I enjoy what I’m currently doing, I feel like I’m being productive toward a goal, and I have several doubts about what would become of my ability to achieve my goals if I were to work for Microsoft. I would love to chat with the IE developers and discuss what future directions would be in the Web’s best interest, but I’d much rather do that without the major legal bindings to Microsoft itself. I have no personal beefs with anyone at Microsoft; it’s just the overall company policies and history which worry me. In the end, I just wasn’t comfortable enough with the idea of working for them, so I declined.

Shifting back to Mozilla, I honestly don’t know what the status is, but I have a feeling it’s currently in limbo. I had a phone chat with someone who was considering me to do documentation work, but we agreed that some sort of development position would be better suited to my skills. He said someone from that end of the company was supposed to get in touch with me a week later, but I haven’t heard from them since. I really hope the message didn’t get lost in the spam filter; I just discovered that every single blog comment moderation notification was getting marked as spam without my knowledge, so I just approved a bazillion comments earlier today.

For now, I’m having fun at my current job, and I have some nice tools in the works for Web Devout. I’m also planning to, in the near future, get a lot of my source code cleaned up and open sourced under GPL licenses. I’ve already released the generic syntax highlighter script used on the webpage test system, and other tools like the log-scanning visitor statistics system, site crawler and search engine, and eventually the PHP-based SGML/XML parser will come later.