Typing Pinyin on Windows Part ][ (a better way)

     

There was some room for improvement with the last posting I did on how to setup Windows to type pīnyīn. There were four problems with the last keyboard layout installer I found (three if you are in the UK).

First, the original keyboard layout was UK based. If you were using a US keyboard, when you switched to the pīnyīn layout you gained the pīnyīn tone marks, but some keys switched and you lost other keys (for example you would lose the dollar sign and gain the British pound sign).


Speech Recognition Coding

     

Well, if you think you’re going to be able to use speech recognition to code anytime soon, this video will set you straight.

This guy tries to write a simple perl script using Windows Vista’s new speech recognition. The fact the video is 10 minutes long pretty much sums it up, but you have to check it out. The frustration level and the things it actually types is a crack up. I have a headache from laughing so hard.


Blogging From Within Eclipse - metaWeblog Plugin

     

I’ve been meaning to write this Eclipse plugin for a while, and yesterday I just pulled an all nighter to get it out. You probably know how it is; sometimes you just have to finish that nagging project. I’ve been wanting to write this post and put it out all day too, but I had to wait till I was done with work.

Finally… so here it is. It’s an Eclipse plugin that lets you post to metaWeblog enabled blogs (I only know for sure it works with WordPress , and while posting does work with BlogCFC, entry listing does not and BlogCFC). It is probably only going to be used by coders as there is no wysiwyg - it can use the Afae editor to do HTML syntax highlighting though (or any HTML editor you assign to edit the *.blog file type).


Typing Proper Pinyin on Mac

     

I had my first Chinese class on Friday, and it was fun. It was hard, but fun.

The class is being taught by Pan lǎoshī (潘老师), and he stresses the use of pinyin and hitting the proper tones (as I am sure most teachers do). The tones are key to speaking Chinese well, he says.

So I needed to find a way to type pinyin with the correct tone marks (so I can print stuff out, and to get used to placing them properly). Openvanilla.org (which is fantastic at typing pinyin to get the simplified characters) doesn’t support typing accent marks on romanized characters, but after a bit of digging I found that Mac OS X does it out of the box (why am I not surprised).


Mac Chinese Keyboard?

     

I started taking a class to learn to speak and read / write Chinese. One cool thing about Mac is you can type Chinese without a Chinese keyboard (System Preferences -> International -> Input Menu if you are curious).

The thing about trying to type Chinese with an American style keyboard is you have to use like 3 or 4 keystrokes to do one character. Plus, being a noob, I am not totally sure how to find the right character (I think they are based on radical but I am not sure).


Doing Tabs In Emacs

     

As you may know I like using the emacs editor (I use vi too - so please no wars). In general I love the key bindings and the elegant power built into the editor. One of the things that bothers me about it though is it tries to help too much when I hit tab. When I press the tab key, I want a tab. That’s why it’s the tab key.


Howto Setup Python For Web Development on Ubuntu

     

I’ve been checking out python on and off for a while. It’s one of those languages I’ve been meaning to learn. I hear it’s great for desktop development as well as web development.

To setup Apache 2 on Ubuntu to run python scripts like PHP, CF, ASP, et al, you can do the following (this information came from a couple places mostly here and here it’s assumed you are already running apache2):


Simple MVC ASP Framework

     

One of the things I do for me treasure is create custom web applications for SMBs, and often the client already has some infrastructure in place. Often times PHP is available, but sometimes they just have a basic hosting account on a windows box somewhere so the only language available is ASP. I’ve actually had a few gigs lately that needed somewhat complex sites, and they needed to be done is ASP.


9ne 0.82 Beta Released

     

9ne is an online, syntax highlighting, text editor.

I just put the latest beta up. The main changes in this version are:

(Or you can read my poorly spelled release notes. Which is actually a change log and requires a 9ne enabled browser.)

The first one is pretty obvious. The second one is the cooler part to me. What it means is that you can just type some javascript in the editor and have it run. Say you just type “alert(‘hi’)” on any line in the editor. You can then do CTRL+X L on Mac or CTRL+ALT+SHIFT+R on Windows / Linux and it’ll evaluate that javascript and show an alert “hi”.


Javascript: String width in pixels

     

One of the hardest things about doing web development - using the browser as your GUI - is that you have to get used to, and accept, “close enough” (actually, getting your clients used to that idea is probably harder). “Close enough” is in direct conflict with many things in computer science, so it’s a difficult pill to swallow.

Keeping that in mind…

I was chatting with one of my friends, and they asked if there was anyway to get the length of a string in pixels. He needed it mostly for form layouts - to align buttons with labels. The project I am working on I have a similar issue, but not related to buttons (more of a dynamic truncation “…” kind of thing).