Archive for the ‘General’ Category

Useful Word Building Tool: AyanRay.com Dictionary

Sometimes, when I can’t find something that fits my needs, I build tools for myself to use to fit those needs. Lately, I’ve been trying to build my usable, day-to-day vocabulary. I’ve been reading a lot lately and write down words that are beyond my comprehension. Words like circumspect, scant, and vehement are all words I don’t often use but can describe a particular circumstance quite accurately. And that, the ability to increase my/your vocabulary, is the goal of this tool.

Tool: Dictionary


What is it?

The AyanRay.com Dictionary is a free comprehensive dictionary tool used to help build your vocabulary on a regular and repetitive basis. It offers easy-to-use tools to add any term or word to your dictionary with the ability to have it email you these words regularly for you to review and study. Over a period of time, these words will become second nature to you and will hopefully help build your vocabulary.

Features:

  • Register/Delete your account
  • Add words to your dictionary using an HTML editor (TinyMCE for those interested)
  • Edit/Delete words from your dictionary
  • Alphabetically sorted dictionary page listing all words in your dictionary
  • Categories for organizing and grouping your words into mini-dictionaries (I.e. if you read a new book, you can create a category for words you learn from that book)
  • Category to Word Management – a word can have as many categories as you wish
  • Auto-parse Google “define: word” definitions for easy adding of words to the dictionary
  • Daily, Every other day, Weekly, and Monthly Emails with any number of words from your dictionary randomly emailed to you
  • Comprehensive settings page allowing you to customize email frequency, whether you receive emails at all, and more
  • It’s free :)
  • Coming soon: functionality making it easier to add words :p. I cannot auto-query Google or they will ban my server :( , sorry.

Anyways, this post was more for an introduction to the application. If you find it helpful, have any suggestions, or find any bugs/errors in the application, please let me know. If you need help with it, please post a comment here and I will do my best to answer your questions.

Link: http://www.ayanray.com/tools/dictionary

Custom PHP Install on Dreamhost Shared Hosting

I like to share what takes some agitation to figure out and doing a custom PHP install on Dreamhost was my most recent tiring endeavor. It’s hardly difficult, but only if you know what you are doing. There’s a plethora of resources out there and unfortunately they all seem outdated (and some are, because I tried them). The ones that are not promise ease and quickness but fail to deliver when it comes down to actually getting it to work or providing the pivotal last hoorah that will accomplish that task.

The PHP Custom Install Script that Works

Source: http://www.bernawebdesign.ch/byteblog/2010/02/17/custom-php-5-3-1-with-apc-and-xdebug-on-dreamhost-shared-hosting/

Note: This script works and the others didn’t for me. I post it up here again for my peers who use Dreamhost in case they need it too. If you require help, you are welcome to post here or post on the original author’s blog.

Note #2: In order for this script and the .htaccess file to work accordingly, you must use a UNIX friendly text editor and save it in UNIX text mode. I use a tool called metapad and you can get it free here: http://liquidninja.com/metapad/. Otherwise, you might get 500 Internal Server Errors and those can sometimes be solved simply with this advice.

#!/bin/sh

# update 16.2.2010
# @author Marco Bernasocchi
# – Added OPENSSL LIBMCRYPT LIBTOOL and a promt for installing XDEBUG
# (still uses XDEBUG 2.05, which has basic PHP 5.3.1 support. 2.1.0 is on its way)
# – removed unsupported php configure switches
# – disabled –with-xsl, if you want to use it you’ll probably need to install
# libxslt (http://xmlsoft.org/XSLT/) version 1.1.0 or greater.
# – sets the ini files into the install directory instead than on cgi-bin
# – to add more domains just copy the cgi binary to the new domain
# cp “$PHP_BIN_DIR/php-cgi” “$NEW_CGI_BIN_DIR/php.cgi” and modifiy the .htaccess

#Script for a minimal PHP 5.3.x install with APC
#
#- Prompts for the domain to build for
#- PHP configure line contains only valid PHP5 options
#- Displays colourful status messages
#- Many build messages, which aren’t helpful to most people, are now suppressed
#- Procedurised, making it cleaner and easier to follow
#
#The only things you may want to change in here are marked with “@todo”s
#
#Derived form the original PHP 5.3 install script at
#http://wiki.dreamhost.com/Installing_PHP5
#
#@author Dan Bettles

#Exit on error
set -e

clear

echo -n “Enter the domain for which you want to build PHP and press [ENTER]: ”
read DOMAIN

echo -n “Enable XDEBUG (y|n): ”
read ENABLEXDEBUG

#==================================================================

#@todo Update versions, if necessary
M4=”m4-1.4.13″
AUTOCONF=”autoconf-2.65″
OPENSSL=”openssl-0.9.8l”
CURL=”curl-7.20.0″
LIBMCRYPT=”libmcrypt-2.5.8″
LIBTOOL=”libtool-2.2.6b”
PHP=”php-5.3.1″
APC=”APC-3.1.3p1″
XDEBUG=”xdebug-2.0.5″

#@todo Update install paths, if necessary
WEB_ROOT=”$HOME/$DOMAIN/web”
CGI_BIN_DIR=”$WEB_ROOT/cgi-bin”
HTACCESS=”$WEB_ROOT/.htaccess”

INSTALL_DIR=”$HOME/mycompiles”
BUILD_DIR=”$INSTALL_DIR/build”
DOWNLOADS_DIR=”$INSTALL_DIR/downloads”
PHP_BASE_DIR=”$INSTALL_DIR/$PHP”
PHP_BIN_DIR=”$PHP_BASE_DIR/bin”
PHP_EXTENSIONS_DIR=”$PHP_BASE_DIR/extensions”
PHP_CONFIG_DIR=”$PHP_BASE_DIR/etc/php5/config”
PHP_INI=”$PHP_CONFIG_DIR/php.ini”

#@todo Alter features, if necessary
PHP_FEATURES=”–prefix=$PHP_BASE_DIR \
–with-config-file-path=$PHP_CONFIG_DIR \
–with-config-file-scan-dir=$PHP_CONFIG_DIR \
–bindir=$PHP_BIN_DIR \
–enable-zip \
–with-xmlrpc \
–with-freetype-dir=/usr \
–with-zlib-dir=/usr \
–with-jpeg-dir=/usr \
–with-png-dir=/usr \
–with-curl=$PHP_BASE_DIR \
–with-gd \
–enable-gd-native-ttf \
–enable-ftp \
–enable-exif \
–enable-sockets \
–enable-wddx \
–enable-sqlite-utf8 \
–enable-calendar \
–enable-mbstring \
–enable-mbregex \
–enable-bcmath \
–with-mysql=/usr \
–with-mysqli \
–without-pear \
–with-gettext \
–with-pdo-mysql \
–with-openssl=$PHP_BASE_DIR \
#–with-xsl=$=$PHP_BASE_DIR \
–with-mcrypt=$PHP_BASE_DIR”

#==================================================================

#@param string $1 Message
function echoL1 () {
echo -e “\n\033[1;37;44m$1\033[0;0;0m\n"
}

#@param string $1 Message
function echoL2 () {
echo -e "\n\033[0;37;44m$1\033[0;0;0m\n"
}

#@param string $1 URL
#@param string $2 Output directory
function downloadTo () {
wget -c $1 --directory-prefix=$2
}

#@param string $1 TAR filename
#@param string $2 Output directory
function untarTo () {
cd $2
tar -xzf $1
cd -
}

#@param string $1 Source directory
#@param string $2 Output directory
#@param string $3 configure arguments
function configureAndMake () {
cd $1
COMMAND="./configure --quiet --prefix=$2 $3"
if [ $1 = "$BUILD_DIR/$OPENSSL" ];then
#special command for OPEN SSL
COMMAND=”./config –prefix=$2 $3″
fi
echo “$COMMAND”
eval $COMMAND
make –quiet
cd -
}

#@param string $1 Source directory
#@param string $2 Output directory
#@param string $3 configure arguments
function makeAndInstall () {
configureAndMake $1 $2 “$3″
cd $1
make install –quiet
cd -
}

#@param string $1 Directory
function mkdirClean () {
rm -rf $1
mkdir -p $1
}

#@param string $1 Message
function echoWarning () {
echo -e “\n\033[1;37;41m$1\033[0;0;0m\n"
}

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

export PATH="$PATH:$PHP_BIN_DIR"

echoL1 "-> DOWNLOADING..."

mkdirClean $BUILD_DIR

echoL2 "--> Downloading $M4..."
downloadTo "http://ftp.gnu.org/gnu/m4/$M4.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$M4.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $AUTOCONF..."
downloadTo "http://ftp.gnu.org/gnu/autoconf/$AUTOCONF.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$AUTOCONF.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $OPENSSL..."
downloadTo "http://www.openssl.org/source/$OPENSSL.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$OPENSSL.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $CURL..."
downloadTo "http://curl.haxx.se/download/$CURL.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$CURL.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $LIBMCRYPT..."
downloadTo "http://easynews.dl.sourceforge.net/sourceforge/mcrypt/$LIBMCRYPT.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$LIBMCRYPT.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $LIBTOOL..."
downloadTo "http://ftp.gnu.org/gnu/libtool/$LIBTOOL.tar.gz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$LIBTOOL.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $PHP..."
downloadTo "http://www.php.net/get/$PHP.tar.gz/from/this/mirror" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$PHP.tar.gz" $BUILD_DIR

echoL2 "--> Downloading $APC..."
downloadTo "http://pecl.php.net/get/$APC.tgz" $DOWNLOADS_DIR
untarTo "$DOWNLOADS_DIR/$APC.tgz" $BUILD_DIR

if [ $ENABLEXDEBUG = "y" ]; then
echoL2 “–> Downloading $XDEBUG…”
downloadTo “http://xdebug.org/files/$XDEBUG.tgz” $DOWNLOADS_DIR
untarTo “$DOWNLOADS_DIR/$XDEBUG.tgz” $BUILD_DIR
fi

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echoL1 “-> BUILDING…”

mkdir -p $PHP_BASE_DIR

echoL2 “–> Building $M4…”
makeAndInstall “$BUILD_DIR/$M4″ $PHP_BASE_DIR

echoL2 “–> Building $AUTOCONF…”
makeAndInstall “$BUILD_DIR/$AUTOCONF” $PHP_BASE_DIR

echoL2 “–> Building $OPENSSL…”
makeAndInstall “$BUILD_DIR/$OPENSSL” $PHP_BASE_DIR

echoL2 “–> Building $CURL…”
makeAndInstall “$BUILD_DIR/$CURL” $PHP_BASE_DIR “–enable-ipv6 –enable-cookies\
–enable-crypto-auth –with-ssl”

echoL2 “–> Building $LIBMCRYPT…”
makeAndInstall “$BUILD_DIR/$LIBMCRYPT” $PHP_BASE_DIR “–disable-posix-threads”

echoL2 “–> Building $LIBTOOL…”
makeAndInstall “$BUILD_DIR/$LIBTOOL” $PHP_BASE_DIR

echoL2 “–> Building $PHP…”
#Fixes compile error
export EXTRA_LIBS=”-lresolv”
makeAndInstall “$BUILD_DIR/$PHP” $PHP_BASE_DIR “$PHP_FEATURES”

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echoL1 “-> INSTALLING PHP…”

mkdir -p -m 0755 $CGI_BIN_DIR
mkdir -p -m 0755 $PHP_CONFIG_DIR
cp “$PHP_BIN_DIR/php-cgi” “$CGI_BIN_DIR/php.cgi”
cp “$BUILD_DIR/$PHP/php.ini-production” $PHP_INI

mkdir -p $PHP_EXTENSIONS_DIR

echoL2 “–> Building $APC…”
APC_SOURCE_DIR=”$BUILD_DIR/$APC”
cd $APC_SOURCE_DIR
$PHP_BIN_DIR/phpize
configureAndMake $APC_SOURCE_DIR $PHP_BASE_DIR “–enable-apc –enable-apc-mmap\
–with-php-config=$PHP_BIN_DIR/php-config”
cp modules/apc.so $PHP_EXTENSIONS_DIR
echo “extension=$PHP_EXTENSIONS_DIR/apc.so” > $PHP_CONFIG_DIR/apc.ini
cd -

if [ $ENABLEXDEBUG = "y" ]; then
echoL2 “–> Building $XDEBUG…”
XDEBUG_SOURCE_DIR=”$BUILD_DIR/$XDEBUG”
cd $XDEBUG_SOURCE_DIR
$PHP_BIN_DIR/phpize
configureAndMake $XDEBUG_SOURCE_DIR $PHP_BASE_DIR “–enable-xdebug\
–with-php-config=$PHP_BIN_DIR/php-config”
cp modules/xdebug.so $PHP_EXTENSIONS_DIR
echo “zend_extension=$PHP_EXTENSIONS_DIR/xdebug.so” > $PHP_CONFIG_DIR/xdebug.ini
cd -
fi
#——————————————————————————-

if [ -f $HTACCESS ]; then
HTACCESS_NEW=”$HTACCESS.old”
cp $HTACCESS $HTACCESS_NEW
echoWarning “–> Copied $HTACCESS to $HTACCESS_NEW”
fi

#The backslash prevents a newline being inserted at the start
HTACCESS_CONTENT=”\
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

#Deny access to the PHP CGI executable and config files

Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS

#Preserve newlines in the content by quoting the variable name
echo “#######ADDED BY installPHP script” >> $HTACCESS
echo “$HTACCESS_CONTENT” >> $HTACCESS

echoL2 “–> Created $PHP_INI”

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rm -rf $BUILD_DIR

echo -n “Delete the downloads directory? (y/n): ”
read DELETE_DOWNLOADS_DIR

if [ $DELETE_DOWNLOADS_DIR = "y" ]; then
rm -rf $DOWNLOADS_DIR
fi

echoL1 “DONE”

exit 0

After running this script, it creates a folder in your domain called ‘web’ and within that another folder called ‘cgi-bin’.  I wasn’t able to get anything working within this folder at first so I am guessing it is meant to be off limits? Anyways, I was able to get PHP 5.3 working ultimately with the following within your .htaccess file in the root of the your.com folder. This information came from the Dreamhost Custom PHP Install Wiki itself.

AddHandler phpFive .php
Action phpFive /web/cgi-bin/php.cgi

After getting your custom PHP build installed correctly, you should create a php file with phpinfo(); and check that the PHP version is 5.3 or whatever you might have altered the script to. At that point, you are free to edit your php.ini file located at /home/user/mycompiles/php-5.3 (or whatever it might be)/etc/php5/config/php.ini for further modifications.

Phew, well that took me a few hours to figure out and I hope it saves you some time :p. Trying scripts left and right can really eat up time. Some literally just “stopped” or as Dreamhost might say was “killed”. Others just produced errors during the php build of the operation with no indication of why it failed. Helpful? Not at the very least.

Getting Things Done: The Personal Wiki

One application of David Allen’s Getting Things Done principles is the personal wiki (google Monkey GTD). Although the book is on my reading list and I have yet to touch it, there’s no reason to start ‘working on it’ early, eh? Well, I’ve been using a personal wiki for a few weeks now and let me tell you it is the best think since peanut butter. A personal wiki allows you to share knowledge with the most important person in your life — you! No, it’s not egotistical, it’s brain centric. Humans are notorious for forgetting things. If we stop, we forget. If we forget, we might lose information or skills that are necessary down the road. A personal wiki is beyond that. It is exactly like any wiki — it is searchable, indexes items, and can be used from any computer and certain mobile devices. If you know you are going to forget something, or want to write something down that could be important or interesting, why not save it in your own wiki? I don’t advocate being dependent on a machine to look up content you forgot or writing everything you read down; I’d rather you remember. However, as it’s impossible to remember everything, it could be a good source of knowledge kept just forgotten. Here’s an example of how I use it. Currently, I use it for is for writing book reviews to myself — at least for now. I remember a lot of details from books I read and yet I still forget a lot of the good stuff. The great stuff sticks, but it’s those one-liners and unique examples that might be peripheral to the solution but could really interest me down the road and allow me to remember complicated discussions and some of the reasons to support theories. Too bad I forget those the most. So, lately, I’ve been writing book reviews and keeping track of valuable information chapter by chapter — in my own words. I write a post to myself, indicating the main points of chapters and in a language I’m comfortable with. I don’t edit it as much as I edit assignments or work projects; it’s for my eyes only so that I can revisit it without having to read the whole book again. I also use it for jargon, definitions within my problem domain, that would otherwise be forgotten in a few hours if not minutes after look up. It’s a useful tool that maybe won’t pay off immediately, but in the long run for sure.

As for recommended personal wikis, I use TiddlyWiki. It is a 1 file HTML page that can be stored locally, on a jump drive, or on a server. It needs write permissions on the local drive to run but that’s certainly worth it considering how valuable it is. There are a ton of plugins for it if you know where to look. Goto this page to find them. All you need to do is download the index.html file and load it up in your personal wiki and it automatically detects the plugins and transfers it over. Neat eh? I was impressed on how powerful that one file is. I would hate to be working on it with a team of developers, but I can’t complain because it fits my needs perfectly. Anyways, I can’t express how useful this will be if you start using it. It might take some time getting used to but it can be like your own private journal — except this has a search function you might need 2 years down the road.

Productivity and Motivational Tip: Time Cost Table

I’m not sure if this is a standard tool, but I created it for myself to start seeing where my time was going and thought it could be valuable to others. Your personal time is valuable. And like anything valuable, you need to know what’s happening on a regular basis. It may not seem sensible at first, but I suggest creating what I call a time cost table. At the heart of it is knowledge — knowledge of where your valuable time is going. It is flexible in that you can use it in a relaxed or a strict way and still receive the benefits of using it.

So here’s what it looks like:

Start Time End Time Duration Item
7:02 pm 8:15 pm 1 hr 13 min Studied for GMAT – quantitative section
8:16 pm 8:45 pm 30 min Ate Dinner
8:46 pm 10:32 pm 1 hr 46 min Studied again for GMAT
- - - Total for the day:  2 hr 59 min GMAT // 30 min break

To use it, simply create your own in a word processing suite etc.  using the full page and the column headers in the example and start writing down start time and end times for work and break blocks. If you are working on homework, write it down. If you are watching TV, write it down. I try to imagine that I’m being paid for work or a goal for a certain day, say studying for GMAT for example, and that I have to work 7 hours for example on a free Saturday. By writing down the time, I can see where I take breaks, how long I take it, when I wake up, how long I actually study and subsequently how much I should be ‘paid’ for my time. Lawyers and other professionals use the concept of billable hours and a plan like this makes it easy to see how many hours are you billing per day. Imagine billing 9 hours per day for a goal, can you do it? What about 13? Now that’s hard.

Hopefully this helps make you more productive, procrastinate less, and reach and plan your goals accordingly.

Code Agitation – The Perils of Duplication

Recently, I noticed something funny in a code base that I view seldomly. I was scrimmaging through the code of a maintained code base and noticed something sour – duplicated code. Duplicated code is not bad, when it is in the form of syntax of a language (haha)! And that isn’t real duplication! What I noticed was something that frustrates me, and surprisingly, wouldn’t have frustrated me 4 months ago. The duplication was basically 10 duplicated functions that were essentially identical to each other with hard-coded differences that should have been parameters and were written when the quantity of functions were low and the purpose was minor. What really irritates me is that this code has been updated many times and someone, in the words of Andy Hunt and David Thomas, did not fix the broken window. I’m not writing this post to complain, but to rather preach.

If you see something you know just isn’t right, take ownership of the code and fix the problem. It is easy to say it’s not yours or that you can do it next time or that the code base is so old it will be replaced. Well those excuses may or may not be true. But chances are, you will have to look at it again, or someone will, and you should fix it now while you know. If you aren’t familiar with this or it sounds familiar, it’s basically the principle of controlling the entropy within your project, which is preached within 3 of the 4 programming books I’ve read in the last 4 months. Whether it’s building an application, playing a game of pool, or anything for that matter, you should try to control the chaos and be pro-active and decisive with reason.

Thankfully, I fixed the problem. This is something that I do regularly and consistently now that I’ve gone through quite a learning curve. I refactor, refactor, and refactor some more. Perfection isn’t what you can add, it’s what you can take away.

10 Reasons to Start using WordPress (in general)

I have almost finished configuring my blog to my liking and let me tell you that I am really liking it. It is honestly such an easy process to get up and writing that you need to know next to nothing about web servers, PHP, MySQL. So, in order to start writing, which is what this blog is all about, I wanted to share some insight into the custom blog to wordpress experience. Here are my top 10 reasons to use WordPress:

10. Dreamhost One-Click Install

Let’s start from the beginning. I was navigating Dreamhost (my hosting provider) and I saw the swanky WordPress logo in the one clicks. WordPress has been around a long time in the one clicks but this time I was feeling venturous as the pressures of not writing in awhile from my current blog were weighing me down. Anyways, I clicked it and low and behold it installed it! I went to the site and I was up and running within 5 minutes.

9. Pages

A blog is not just a blog these days. Take a look at Lee Brimelow’s blog at TheFlashBlog.com or Keith Peter’s blog at bit-101.com. These aren’t really the best examples of using pages but they definitely use it to separate their blog from additional content that would be of interest to their readers. So having pages makes the blog into more of a website and less of just a blog.

8. Settings Managers

The settings managers in WordPress are awesome. I want to see their implementation. It looks so modular!

7. E-mail Notifications

I love getting emails when I get comments so I can approve them and move on with my life. However, coming from my own custom blog, I appreciate not having to do it manually in CakePHP with the various options and installation that are required with those options.

6. Administration Panel

The administration panel is sweet. It emphasizes writing new content and getting your blog setup how you like it. I would definitely like to see them set up auto redirects like after I hit publish I don’t want to see the same post again. I’d rather be taken to my blog or back to the dashboard or something else that is I haven’t been staring at for the last little while.

5. Importing/Exporting

When I setup my new blog, I wanted to preserve what little content I had from my previous site. In order to do that, I pointed my new WordPress blog at my RSS feed from my old blog and presto, it all came in! I had to write a custom script for my comments though but that wasn’t as hard as it would have been for the posts.

4. Install Plug-ins without using FileZilla!

I thought this feature deserved it’s own title. One of my issues with these blogs is the installation process. I don’t want to develop to write. I want to write. Period. Having a plug-in like Plugin manager allows me to download plug-ins from an interface, install them with one click, and activate them in another. Now this is what usable applications are all about. Automate whatever you can and this is a feature that is worth a gold star.

3.  Themes

When I installed the one-click Dreamhost WordPress, I was impressed with how fast it was and how easy it was to setup. The initial design was the standard blue pill look and that was so outdated. So I spent a good 30 minutes looking for a new design and looking at how to install it onto my server. Little did I know that Dreamhost actually installed the top 50 designs already and all I had to do was go to my Appearance tab and navigate through them. Wow is that ever easy to switch the design. I love it cause if I am not feeling the design anymore, there’s plenty of pay and free designs out there that can fit my bill.

2. Plug-ins

I love plug-ins. Need I say more? They are short, simple, and sweet. They are like little utilities that do specific tasks and do them well. They are free, well-done, and there are tons of them. Blogging isn’t new – what I need has already been developed. Using this open source community to leverage my development of my own blog makes my life so much easier so I can write about how much I love WordPress more often.

1. Less programming, more writing mantra

At the end of the day, it’s all about writing. I don’t care if no one reads this post. I don’t even care if this post ever makes it to page 2000 on Google let alone that. What I do care is that I write and that I practise writing. I read that in some MBA programs, one of the tasks the professor gives students is to wake up in the morning and write 3 pages about anything. All they have to do is write. In the beginning, it is tough to get the 3 pages and it feels silly writing the 3 pages. But after awhile the author begins to notice patterns in their writing. They start talking about common problems, business ideas, and solutions to these issues. They talk about what’s bothering them and they have a place to vent it out. They become more involved in how they think and value their thoughts more than before. Some even more remarkable things occur and that is what I’d like to aim for. I do sometimes do the morning ritual, but those writings are generally not shareable and generally you don’t need to look them over. My blog posts are for sharing and for offering insignt and advice to someone who might be interested. Getting back to the point, if I spend more time developing, I am practising programming. But if I practise blogging, I am practising a very core and basic skill that is just a tad under appreciated.

Thank you WordPress. You Rock.

Ayan

New Blog

Hello everyone!

As you might be able to tell, I have a new blog. I have finally resorted going back to WordPress. Around 2 years ago, I transfered from a WordPress blog to a CakePHP blog; deciding in favour of the custom cake caching and control CakePHP had to offer. Unfortunately, with this new found CakePHP blog and the skills I acquired by making it, it caused me to develop more and write less and this is what is causing me to switch back. WordPress allows me the beauty of OpenSource without the trouble of developing. Don’t get me wrong, I love CakePHP. It is an awesome framework with fun and entertaining analogies to create beautiful code. However, I don’t want to have to develop more than I write. I also don’t want to have to change so much when I feel like switching blog layouts. So… back to WordPress. I’ll be transfering over all my posts from my previous blog in a few days (I’ll have to write one last script).

Please stay tuned and I hope you enjoy this new direction.

Cheers,

Ayan

Japan: Mount Fuji and Typhoons

Last weekend, I finally got a chance to go to Mount Fuji and it’s famous amusement park, Fuji Kyu Highland. Unfortunately, that was also the same time a typhoon hit the area, shutting down almost all rides and making Mount Fuji hidden by clouds. I wasn’t expecting much when I went there but I was pleasantly surprised by the amount of fun you can have in a giant poncho with friends.

Chiaki and I at Fuji Kyu

Chiaki and I at Fuji Kyu

In the morning, the rain and wind wasn’t too bad. It was slightly drizzling and everything seemt rather okay. However, when we got to Mount Fuji, it was chilly and the rain fall had kicked into overdrive. The clouds were everywhere and I kept having to ask, “Where is Mount Fuji?”. It wasn’t looking too good so far.

Although the rain kept most of the major attractions closed (like the roller coaster pointed AT Mount Fuji, which was my compass for the day), we still managed to get into some of the rides. Some of the rides that were still open were the ferris wheel, Zorpis (shooting targets), Gundam Crisis, Biohazard, and some “Scary House”, which was off a childhood cartoon for Japanese people. Let me just tell you that the Japanese love to get scared. Biohazard was a messed up old hospital where there are zombies who pop out of nowhere and chase you. Although it is just a show, they do a great job making the whole atmosphere real and can really freak you out.

Monsters at Amusement park

Monsters at Amusement park

Anyways, after going to the rides, getting our feet soaked, we went over to the Onsen at the hotel. It was simply short of fantastic as it is a great vacation from the ordinary, difficult working style of the Japanese, which I have become so accustomed to. Along the way to the onsen, I found this funny sign below. It pretty much says that coming in 2051, there will be a human powered Geisha roller coaster going at a whopping 12 km per hour. Damn I wish Canadian’s had the same kind of humour.

Coming Attractions

Coming Attractions

And at the end of it all, we took our bus back to Shinjuku and enjoyed some delicious Turkish food. Part of living in Tokyo is getting the advantage of having many times of cuisine. Canada has this benefit as well but perhaps not to such a large scale as Tokyo. Here is a photo of that wonderful course.

Turkish Dinner

Turkish Dinner

View the entire gallery by clicking here!

AS3: Apple’s Leopard Time Traveller Tutorial

Okay I lied, this isn’t really a tutorial. This is just everything you will hopefully ever need to create this beautiful, simple user interface from my favorite designers down in Cupertino. In this “tutorial”, you will learn about how to create assets, initialize the time traveller class, and customize the effect for your own website. Could it be any easier than this? 

What you will make:
 [FLASH]/img/blog/2007/10/timetravel_example[/FLASH]

First, you will need to download the package below. It contains a working example file with all classes required to create this beauty. Also, you might want to check out the actual TimeTraveller class located in package com.ayanray.ui. It contains detailed documentation for your learning as well as for general use.

LeopardTimeTravel_20071024.zip [80KB]

Now that you have the files, give it a quick look-over. It is extensively commented and should be descriptive enough to allow you to make your own unique example or site built off of it.

 


Step 1: Create Assets

 In the example, I create mock assets and store them in an array. You don’t have to copy the example code for this but you do need to have the assets created and on the display list (on the stage). Also, I advise you to store the assets in an array and keep track of them. After creating the assets, pass them over to the Time Traveller for management.

 // Create Assets (you should use your objects)            for(var i=0; i<15; i++) {                var window = new Window(); // creates window from library items                window.name = "window"+i;                window.visible = false;                this.addChild(window); // adds to the display list                assets[i] = window; // adds to assets array           }

 


Step 2: Initialization

Next step is to pass the time traveller the assets that you would like it to control for the time traveller user interface. 

Method 1: Time Traveller does not immediately start

 timeTraveller = new TimeTraveller(assets);

Method 2: Time Traveller immediately starts 

timeTraveller = new TimeTraveller(assets, true, this.stage.stageWidth, this.stage.stageHeight, settings);

 


Step 3: Starting the Time Traveller

If you followed Method 1 from Step 2: Initialization, you will need to start the time traveller manually. You can do this by calling the following code:

timeTraveller.init(this.stage.stageWidth, this.stage.stageHeight, settings); 

 


Step 4: Playing with the Settings

I created that nice little demo above just for this purpose! Play around with the settings until you find an animation style you like. Link up the numbers in your own file for your own unique Time Traveller. The actionscript files are all commented extensively so please look at those for more details if you have more requirements. 

 


Other Examples

Using the test example above, your own positioning system, and your own graphics, you can make each time traveller truly unique. Here are some examples of where I’ve used this interface.

  1. Wilson Japan: Technologies
  2. Wilson Japan: Catalogs 
  3. Wilson Japan: Feelit Catalogs
  4. Suunto Japan: Catalogs 
  5. Precor Japan: Product Images (click the button underneath the price) 

That’s it! Post up your examples too and show us some great uses of the time traveller! Also, bug reports and comments are appreciated =).

Brought to you by myself and the good people at ComQuest Inc., where I first learnt how to do this in Actionscript 2. 

 

New Artwork :: Angel Within

Made a new piece work that expressed what I was feeling at the time. It is an expression of light through the darkness and I hope it leaves a little impression after 5 minutes ;) . Used some nice fractal imagery and photoshop.

Return top

About the Author

My name is Ayan Ray and I'm a new media specialist from Ottawa, Canada with a Bachelors in Information Technology. My expertise is in creating unique user experiences using computer science and design principles to develop intuitive applications that people can use effortlessly. I also have experience with 3D modeling, texturing, and animation for short animated clips and game design. I have completed projects for some of the world's top companies such as Adobe Systems, Salomon Sports, Wilson, Suunto, and Yokohama Tires. I've also read some of the most influential books in investing and computer science and share some of the lessons they teach throughout this blog.