Whimsical.nu

BgPatterns: Tiled backgrounds designer

I used the BgPatterns tiled backgrounds designer recently in the Seasonal Plume revamp I had just yesterday. BgPatterns is nifty, useful, and very flexible, especially to the pattern-challenged (like me). As you tweak the settings, you can easily see what your tile will look like, apply the background to the site’s patterned header to get a better feel of the pattern, and then when you’re pleased with the outcome, download the image and use it on your projects.

There are a selection of patterns to choose from, and one can change foreground and background colors, canvas texture, pattern image scaling and opacity, and one can even rotate the base image up to a full 360 degrees to suit your customization needs.

One can even sign up and create pattern after pattern, and others vote on how good your pattern is, hopefully becoming the next champion. It’s certainly a very interesting tool with a fun challenge-type game attached to it.

0 Comments

My workstation

A bit late, but Lorelle’s blog challenge on describing my computer setup is something I’ve been thinking of doing for a while now. So here’s a bit of show-and-tell regarding my personal workstation though the years.

For most of my life, my computer has been a shared family computer, until I got my first quasi-laptop. The first things I knew about computers were how to go to the Games directory in DOS and start games, as well as Lotus Spreadsheet, which I used like a simple text editor. I don’t know what happened to our first computer, but I wrote my first story in there. My older sister laid it out and printed it, just like a real book. (It was only a few pages.)

I started really using the computer at around sixth grade. Still without Internet, the computer ran Windows 98, and I again wrote my stories inside. I started diary files, which I password-protected, and the worst (best?) password I came up with was around 50-70 characters. It was so bad (good) that I can’t open that document to this day.

Our computer room was a mix of the guest room and study, and the computer was on a plain computer desk in one corner of the room. During my third year in high school, we got connected to the Internet, and in late 1998, I started making websites. The guest/study room was soon renovated, but I also went off to college and lived in a dormitory room with my older sister for most of the week. Since I was taking up Computer Science, I carted along the computer that I then shared with my sister.

In our room, the computer was always right next my bed, since it also served as my desk. I went through two desktop machines then, and during my last year in college, I got a portable desktop, an Asus Degatto. We still had the desktop machine in the dormitory room, but I never went back to desktops after that.

Back at home, I would be working in the study, along with my sisters. On the left is a photo of the study–two computers at each corner of the room, with some space in the middle for a laptop (that’s my Dad’s). Later on, I would work be using the right corner for my Asus Degatto, and much later on, I’d move to the mini-loft at the top of the study. This is my Degatto in the corner:

My computer corner

In mid-2007 I moved to Singapore, and my mom helped me settle in and buy furniture. Reorganized desk On the left is my workstation, and you can also see my bookshelf (there are a lot more books on it now). I transitioned to using a MacBook, and the widescreen LCD you see was added early 2008. External drives are on the shelf above the LCD, as well as a few more odds and ends. The whiteboard, I use for quick notes and reminders, such as the $6 I owe a friend (pictured). You can click on the photo to get to the Flickr page, which has quite a few more notes on the picture itself.

In about two month’s time I’ll be moving to another house, and my computer setup will likely change, but not by much as I’m bringing my furniture with me. I wish I had more computer photos from way before. :/

0 Comments

Hazel Review

I’ve been taking Hazel for a spin, and I’m rather impressed. The analogy they have running is that it’s a “personal housekeeper”, and does file management/cleaning in the background while you work.

For a good while I thought Hazel was not going to be very useful for me, as my Downloads folder is organized using Speed Download 5‘s rules, and I also had AppZapper for cleaning up application files.

However, firing up Speed Download for downloading a small document sometimes feels a bit overkill, and that’s where Hazel works for me. I can even set custom rules for various file types, like when I download SQL backups:

SQL rules settings

I can send the SQL to a specific folder (here, my database backups folder), and rename it to include the timestamp when I downloaded. Absolutely cool :D

Additionally, firing up an extra application (AppZapper) to delete applications is an additional step, when I can just hit Command+Delete and have Hazel tell me if she wants to delete other application-related files.

The $21.95 Hazel is definitely worth it, especially if you don’t have any of the other applications that manage your folders for you. It’s a great addition to the MacUpdate Parallels bundle, and complements the bundle well.

This is the first review of a series of reviews I plan to do on the applications included in the currently-running MacUpdate Parallels bundle. For the full list, please see my original MacUpdate Parallels bundle post.

1 Comment

Typinator Review

I bought the MacUpdate Parallels bundle two days ago, which included Typinator. There’s a reason why the first review I’m making is of Typinator: it’s the app that most visibly works in the background, and is easily inserted in my workflow.

Typinator expands/replaces abbreviated text as you type, in any application, and I have to say it’s a really nifty tool. Like what its demo shows, you can create any sort of abbreviation in it and once you hit the space bar, Typinator will replace that abbreviation with “the real thing”.

Pros

One very interesting use of Typinator is for auto correction, which is the reason Typinator is very visible to me. They have an abbreviation set for common typographical errors done for English, French, Dutch, and another set from TidBITS, apparently, which contains gems like “appreachate” translating to “appreciate” and “apperatus” to “apparatus”.

English autocorrection dictionary/abbreviation set

It’s a good tool for programmers, too. A good example is when you’re writing out quick code for debugging, like below:

Abbreviation definition for debug_printr

If you notice, in the expansion field, the value has “{^}” in it, like so:

echo '<pre>'; print_r( {^} ); echo '</pre>';

That tells Typinator where the cursor should be placed. So once I type debug printr $var anywhere, it gets expanded while I’m typing $var and $var ends up at the right place. This will definitely save a good bit of time for those tedious repetitive tasks.

It had just tried to expand that text I put up top. A quick Cmd+Z usually fixes it, but naturally not if there is no such function in the application I’m working on.

Additionally, I liked that when you’re typing out your abbreviations, Typinator tells you if there’s a possible clash with other rules already present in any of your sets, like below:

Rules clash for abbreviations

Cons

It might get better when I’m more used to it, but the half-a-second pause where your abbreviation gets highlighted and then expanded can be rather distracting. Also, I initially planned to load my Terminal aliases to Typinator, but after using a few, I think I will stick with editing .bash_profile for the small stuff.

Typinator also does not have a menu bar even when its window is visible and active, which was disconcerting. Everything is under the Action icon, if you’re looking for it.

I’ve yet to notice if Typinator’s bundled auto correction sets get in the way of typing in another language, but so far it’s behaving pretty well. This shouldn’t be a very big problem, since you can easily go in and change the sets any way you wish. Don’t worry about removing an abbreviation from the bundled sets; if you want to start over, you can just delete that set and add it again.

Conclusion

Typinator, originally at $29.99 for the single license, is a useful application. I wouldn’t say it’s worth the whole bundle, but in conjunction with other applications, it complements them well and is useful in that “running in the background and doesn’t mess with your work” kind of way.

Would I buy it for $29.99? Maybe not, but I suspect this one of those applications which, once you’ve used it for a year or two, you might buy for that price in the future. Way to go for creating need ;)

This is the first review of a series of reviews I plan to do on the applications included in the currently-running MacUpdate Parallels bundle. For the full list, please see my original MacUpdate Parallels bundle post.

1 Comment

MacUpdate Parallels bundle

Kelvin told me that the MacUpdate Parallels bundle went live yesterday, and I caved and bought it last night. The current bundle, which will continue to run for 12 days (at the time of this writing), contains the following gems:

The latter three are currently still unlocked at the moment, with them getting unlocked once the 5,000, 10,000, and 15,000 bundles have been sold, respectively.

Personally, I’m interested in the following applications:

  • Hazel – looks like this is the ultimate app to have if you’re obsessive compulsive ;) the tagline is “personal Max OS X housekeeper”, and while application deletion is already handled by AppZapper (which I bought in the MacHeist bundle before), this still looks like a good application to invest in.
  • MenuCalendarClock – I’ll admit I’ve never used iCal and Address Book all that much, but with this application it looks like I’ll be using them a lot more now. I love being able to see to-do lists and events right when I login, something that I once had on my Windows PC.
  • StoryMill – for anyone who knows me, you’d know why this is interesting ;) novel writing software! Looks pretty nifty, allowing you to organize characters, scenes, etc.
  • Typinator – for shorter keystrokes all over! I’ll have to see how this works with me typing half the time in a different language. Actually, it just fixed one typo I had while writing this entry, from “hvae” to “have”. ;) Nifty!
  • DVDRemaster ProDVD backups anyone? This is an important utility and it looks to be pretty robust.
  • Parallels Desktop – of course. I need IE for testing. Booting up in another OS wastes a lot of time. This will be cool once it’s unlocked!

I plan to review each application in my interested-in list as I play a bit with it over the next few days, so check back if you’re interested. :) I’ll try to do the other applications, so let me know which you’re interested in, but no promises!

Go check the promo bundle out yourself! ;)

Edited to add: I’ve started reviewing! Click to see the reviews, if you haven’t decided on getting the bundle yet:

2 Comments

Inconsolata, a monospace font

I came across an interesting monospace font, Inconsolata, when it was featured at Smashing Magazine (along with other interesting fonts). I’ve started using it — it speaks to both my geek programmer and aesthetic sensibilities.

Sample of Inconsolata font

I’ve noticed that straight quotes (single or double) lean slightly to the right, as if it doesn’t know if it’s a straight quote or a curly quote, exactly. This is “pretty”. Unfortunately, the backtick (`) leans the same way to the left, around the same angle. This can possibly be a problem (or maybe that’s too harsh: the word is annoyance) especially for types such as myself who habitually use backticks and straight quotes in the same line (see the SQL queries above).

The same goes for zero (0) and uppercase O — the former isn’t slashed, and the difference in width between the two is rather slight especially at small font sizes. I don’t want to need to use a bigger, less space-efficient font size just to use the font. The number one (1) and lowercase l seem different enough to me, so that’s good.

The font is pretty, but is pretty enough?

We’ll see. If I end up getting annoyed because I’d be hunting for code errors and can’t easily distinguish it (due to things looking somewhat the same… especially at 3AM in the morning and some 486732478623472 lines of code later), I suppose it will be time to look for another font.

For the moment — it’s shiny!

9 Comments

Apache, PHP, and MySQL in Leopard

I was quite delighted to find out recently (via AJ) that Apache and PHP was available by default on my Mac. Before I got my Mac, I thought that was the case, and then I couldn’t find it and supposed there was none and got living-e’s MAMP instead.

I quickly got annoyed, because just logging off and shutting down my computer after a bit of dev tweaking meant typing in my account password. Sometimes I ended up forgetting I had it running, and Logout would stop because MAMP needed something from me. It was quickly set up, but after a few weeks of getting it (and ending up too lazy to go through the whole startup-type-password-work-shut-down-type-password cycle…go figure) I was ready to brave whatever UNIX source compiling wizardly people go through to get their machines ready for web development.

After all, I’ve never resorted to using WampServer or XAMPP (etc) when I was still on Windows. I’d always preferred installing and configuring each one by one. This shouldn’t be hard, right?

And nope, it wasn’t! I’d initially envisioned needing to compile the source and all that scary stuff, but apparently (like I said) Apache and PHP was already built in, and MySQL had a Mac OS X binary. Yay! I spent an afternoon tweaking to my heart’s content, after finding gems like these:

Here’s what I did.

  1. Set up Apache’s configuration file.

    Open up Terminal, and type sudo vim /private/etc/apache2/httpd.conf. You’ll need to enter your password, since you’re running as root. Line 114 (or thereabouts) will be where Apache loads the PHP5 module. Remove the hash/pound sign (#) (type i to enter insert mode, and escape to get out of insert mode when you’re done) at the start of the line.

    LoadModule php5_module in httpd.conf

    Optional: You can keep going and customize your httpd.conf file to your liking. For me, I did the following:

    1. Change DocumentRoot to my Sites folder (two lines to change).
    2. Add index.php in DirectoryIndex to automatically load index.php files ahead of index.html when requesting a directory.

    Save the file (type :wq when in command mode).

  2. Setup PHP’s php.ini

    Leopard doesn’t have a php.ini by default, but the default one is still there, named php.ini.default. Make a copy of this by moving to the /private/etc folder and copying that file:

    $ cd /private/etc
    $ sudo cp php.ini.default php.ini

    You might need to enter your password again. After that, you can edit php.ini (again, sudo vim php.ini…this is read-only, so remember to override vim’s warning when you’re saving and use :wq!) to change error reporting and other things you like to have PHP do when you’re developing.

    php.ini error reporting

    Note: The mysql and mysqli extensions are not enabled by default. You probably want to change that. (See lines 625 and 626.)

  3. Run Apache!

    Now it’s time to test your web server and PHP together. Fire up System Preferences, and under the Internet & Network section, click on Sharing. Check the check box next to Web Sharing. Once it’s on, you can go to the URL there, or try the ever-trusty http://localhost, to test if your settings are as they are.

    Of course, if you feel like you want to do it the geeky way, you can always run sudo apachectl start.

    Web Sharing preference pane

  4. Now let’s get MySQL up and running.

    MySQL isn’t included, so we’ll have to install that. Download a binary package and install MySQL, the StartupItem, and the preference pane. I haven’t actually gotten the preference pane to actually stop and start the MySQL daemon, but I figure it will work eventually, and it’s always nice to see it in System Preferences.

    Once they’re installed, hit sudo /usr/local/mysql/support-files/mysql.server start to start the daemon. You can try doing this via the preference pane (and let me know if it works). The preference pane also lets you toggle if you want the daemon to start automatically when you log in (which is the whole point of this exercise…but again, for some reason it doesn’t like me ;( sob).

    MySQL preference pane

  5. MySQL socket problems in PHP

    As of the time of this writing, just installing MySQL and enabling the appropriate extensions in php.ini isn’t enough. PHP won’t be able to find the MySQL socket and won’t be able to talk to your database server. This post has a good explanation why, but to summarize the fix for this:

    1. Create a my.cnf file in /etc:
      $ cd /etc
      $ sudo vim my.cnf
    2. Type the following in the file:
      [client]
      socket = /var/mysql/mysql.sock
      
      [mysqld]
      socket = /var/mysql/mysql.sock
    3. Save the file and exit to the shell (:wq in command mode).
    4. Type the following commands for the sock file’s directory:
      $ sudo mkdir /var/mysql
      $ sudo chown _mysql /var/mysql

    PHP should be able to connect to MySQL now. A word of caution:

    One drawback to this is that if you have installed the MySQL GUI tools, they will look for the mysql.sock file at the old location. You can enter the new socket in the connection dialog under More Options, there is a box labeled “connect using socket.” Just enter /var/mysql/mysql.sock.

    Another solution is to change the php.ini file to expect the socket in a different location. I’m going with the my.cnf option because I expect the MySQL will have a Leopard version out in a few days that changes the default location.

    - from Professional PHP

That’s all there was! You should be up and running in no time. I ended up taking a bit longer because of the following (which might help you):

  • My files all had wrong permissions. They were all just readable and writable by myself (the owner) and hence my web server couldn’t read them. A quick recursive chmod 755 * helped, although of course I’m wondering if there’s an easier way to get this all done. (Let me know?)
  • I installed CocoaMySQL for my database management needs. It looks pretty spiffy. I’ll give it a whirl and if it isn’t enough, I might try out Navicat, although I’d rather not need to pay for a management tool.

Edited to add: I found out that the MySQL preference pane really wasn’t working, and that MySQL is aware of this issue. I found a patch for it via Natron Designs; and yes, now, it works!

3 Comments

Another new MacBook post

So last November 30, I braved the Singapore IT Expo (SITEX) to purchase my first ever personal Mac. Almost a month prior to this, I had received my first Mac in the form of my work machine, a MacBook Pro, and after a lot of deliberation, have decided to purchase my own.

OS X Leopard If you want to see my first few thoughts on working with a Mac (and OS X), you can visit the aforementioned entry. The first few weeks of working with the “new toy” was exciting, if a bit nerve-wracking. As loadx correctly pointed out, I’m not a hardcore BSD (or any UNIX flavor) user, and I do rely heavily on Windows binaries for my PHP, Apache, and other geeky development application needs. Were it not for the sheer niftiness of the Mac, and the amazing colors, I would probably wailed about my choice for the work machine. I’m still learning the works, but so far I’m enjoying.

At the moment, I am:

  1. Learning the ins and outs of iPhoto.
  2. Hunting for a good LiveJournal client that’s up to par with Semagic.
  3. Re-assessing Mail; just because I use Mail for work, doesn’t mean I need to stick to it for my personal email.
  4. Needing to get another Windows license to set up dual booting.
  5. Still deciding about using iCal.
  6. Still hunting for a good personal finance application that will easily let me import my GnuCash data. Would prefer free, but depending on feature set, I don’t mind if I have to pay a bit.
  7. Loving Stacks Overlays.

There’s more, but those are the pressing things. Through the advice of a friend, I have also started using MAMP for my development web server. This is new to me: I’ve always installed Apache, MySQL, and PHP one by one. We’ll see if I get the itch to give myself a hard time and install everything one by one.

More insights on my new MacBook soon. I still need to decide on a name! Continued application suggestions are welcome.

8 Comments

Musings of a new Mac user

A few days ago, I finally received my actual work machine: a sleek 15.4″ widescreen MacBook Pro. This is the first Mac machine that I will be using on a regular basis, having never owned one before. So, I am slowly re-learning how to be productive on a laptop, but what I can say so far is: the odds are high that my next personal machine will be a MacBook. (We’ll see if I can stretch my budget for a MacBook Pro… if they release a smaller one, then it’s probably a definite yes :P)

I’ve still a ways to go, I’m sure, but so far I’m doing good in terms of personalizing how my machine works. The trackpad now works the way I’m used to it working; I have my trusty Aptana IDE with me; I have installed QuickSilver (but have yet to really get used to it); and I’m slowly learning the shortcut keys and whatnot, which is a big must. I suppose I’m moving along just fine; proof of this is when I sit down after a day’s work at my own laptop and end up hitting Alt+S for saving and Alt+Left Arrow Key to go back one word when typing. ;)

Now, I’m still weighing the pros and cons of going for a Mac for the next personal machine. In a nutshell, these are:

Pros
  • Web development (read: PHP) should be easier on Macs because UNIX-compliant. I have not tried this out yet since I don’t use PHP when at work.
  • Oh my gosh, the colors! The clarity! It’s absolutely breathtaking. I am in love.
  • If I’m working on a Mac machine the whole day and go home to do some hobby coding on my Windows machine… I end up having around 10 minutes of re-learning the shortcuts and the keyboard. Yes, my mind is apparently rather malleable that way. It makes for slower hobby coding!
  • I love the fact that the screen brightness dims when the surrounding light dims. Way to go, Apple! (Have Windows machines done this too?)
Cons
  • Games. Seriously, people, this is a huge disadvantage, and I know that I am not the only one. I like my games. Right now I am delegated to the smaller games that don’t suck you in and make you play all night long, but I still have that inner yearning to go back to my gamer days. :P
  • I’m still trying to get the hang of things not maximized all the way, which apparently is “the norm”. Now I don’t have a problem with multi-tasking in that way (i.e., having a code resource in one window on one side of the screen and the actual IDE in another side) but more often that not this just feels a little messy and disorganized to me.
  • Expensive! Okay, the MacBook isn’t too expensive over a high-end laptop, so it’s probably more of a psychological thing.
  • I need IE on Windows for web design. Let’s face it, lots of people use IE, so I have to design for IE as well. I know about Parallels, and I will have to take that into consideration, and make sure that it does work exactly like a Windows machine (or that IE does, anyway).

This isn’t saying that I’m completely won over, as there are still times when I feel like, oh but this is so easy in Windows! I am missing TortoiseCVS (is there a similar Mac OS X equivalent around that I don’t know about?) and I’m still slowly inching my way around Terminal. But this might all just be because I’m still a newbie, but I’m sure in time it will all feel like second nature.

25 Comments

Aptana, the Web IDE

Aptana IDE start page I’ve been doing a lot of work recently in the Aptana IDE (see screenshot on the left), taking the time out to give it a whirl because I needed a new IDE, I needed something that was platform-independent, and I needed something free. I’ve always liked their feature set, but since as a PHP IDE it was pretty poor (no code assist and all those sorts of nifty things) I wasn’t too convinced. But they’d started working on PHP code assist since last month, and I figured that was good enough lead time to get used to the IDE.

But PHP code assist for Aptana is finally here, as part of the official current milestone release. I must say I’m pretty pleased with it so far. I’ll admit I’ve never used a full-blown IDE specifically for PHP before, but for my purposes I don’t see anything shabby with this. Some things that I’m loving about Aptana are:

  • Syntax highlighting for HTML, CSS, JS, and PHP
  • Code assist for all four
  • I can see if a certain PHP function isn’t available in PHP4
  • Tabs automatically converted to spaces
  • Auto-indent can use spaces too
  • Text wrapping suggestion (I just need a suggestion, thankyouverymuch)

Here’s an example of how PHP code assist looks like in Aptana.

PHP Code Assist in Aptana

Yes, I haven’t tried out the AJAXy goodness that’s in Aptana yet, but I will get there in time as I continue to go deeper and get more and more comfortable with using JS and YUI. I admit that the fact that it’s rather slowwww is a bit of a downer, plus I’m missing the functionality to find a certain string in the whole project or folder (if the functionality’s there, anyone care to point it out to me?), but these aren’t very huge problems.

I’d certainly recommend Aptana if you’re looking into a good IDE and don’t mind a touch of slowness. Try out Aptana, watch a few screencasts, or share your interesting Aptana tips and tricks. :)

5 Comments