Archive of articles classified as' "Other"

Back home

Lifehacker: Teach Yourself to How to Code

11/12/2009

Lifehacker continues to move up my list of favorite sites to visit on a daily basis.  They recently ran a list of top how-to guides from 2009, and included among them is Programming 101: Teach Yourself How to Code.
PHP gets plenty of attention in the section about server-side scripting languages, althought I will note they chose to post the cover of a Python book in the paragraph.

Server-side scripting: Once you’re good at making things happen inside a web page, you’re going to need to put some dynamic server action behind it—and for that, you’ll need to move into a server-side scripting language, like PHP, Python, Perl, or Ruby. For example, to make a web-based contact form that sends an email somewhere based on what a user entered, a server-side script is required. Scripting languages like PHP can talk to a database on your web server as well, so if you want to make a site where users can log in and store information, that’s the way to go. Excellent web development site Webmonkey is full of tutorials for various web programming languages. See their PHP Tutorial for Beginners. When you’re ready, check out how to use PHP to talk to a database in WebMonkey’s PHP and MySQL tutorial. PHP’s online documentation and function reference is the best on the web. Each entry (like this one on the strlen function) includes user comments at the bottom which are often as helpful as the documentation itself. (I happen to be partial to PHP, but there are plenty of other server-side scripting languages you might decide to go with instead.)

The author, Gina Trapani, is Lifehacker’s founder and, like me,  is a self-taught programmer:

Good coders are a special breed of persistent problem-solvers who are addicted to the small victories that come along a long path of trial and error. Learning how to program is very rewarding, but it can also be a frustrating and solitary experience. If you can, get a buddy to work with you along the way. Getting really good at programming, like anything else, is a matter of sticking with it, trying things out, and getting experience as you go.

1 Comment

New theme for my blog…

10/12/2009

I’ve been paying more attention to web design lately.  Why?  Well I’m definitely not morphing into a designer–I don’t have the DNA for it–but rather because design is relevant, even in an enterprise environment.  As I have mentioned before, the interface matters to the end user–perhaps moreso than all the backend code you’ve spent hours building and that only other coders can truly appreciate.

With that said, I think this blog was getting stale, and although I continue to adore everything Apple, the “Mac” themed blog thing is just a little dated.  After searching Wordpress.org, I stumbled upon MacPress, a very clean and modern Web 2.0-ish theme by the folks at Sizlopedia.  I hope you enjoy the cleaner look, which I happen to think is vastly more readable.  I’ll probably tweak here and there in the next few weeks, but I am largely happy with it as-is.

You can download MacPress from Wordpress.org or from Sizlopedia.com.

1 Comment

Mac OS X 10.6 Snow Leopard: My upgrade experience

31/08/2009

My Snow Leopard disk arrived Friday, and I promptly began upgrading my three Macs (A 2008 Mac Pro and early 2008 MacBook Pro at work, and a 2008 Mac Pro at home).

I’ve read very few horror stories so far about folks and their upgrades.  I had no issues whatsoever.  Install took about 1 hour for each of these three machines.

I likewise had virtually no issues with any of my apps.  Preference pane add-ons iStat Menus and Blueharvest didn’t work.  Fortunately, Blueharvest’s developer already had a new 10.6 compatible version available. Still waiting on something for iStat Menus however, but it is not a big operational loss for me to not know the exact load of my CPUs at any given moment.

hero_osx_2009082810.6 boots by default into 32-bit kernel mode. This is done to maximize compatibility with dozens of apps that haven’t been updated to work in 64-bit mode.  10.6 is great in 32-bit mode, though if you’re like me and cannot use the new Exchange features (We’re in the midst of migrating from Exch 03 to 07 and my account hasn’t been moved yet), you were left Friday a little bit disappointed by just how few visible perks Snow Leopard gives you.

So this morning I booted into 64-bit mode on my Mac Pro at the office (done by holding down “6″ and “4″ keys during boot, hold “3″ and “2″ during boot to go back to 32-bit).  All I have to say is “WOW.”  This machines flies now…start up was multiple times faster (or at least seemed..I didn’t time it) than before, and all my login items fired up at least twice as fast as before.

Mac Pro64-bit mode, as you might suspect, produced more software incompatibilities.  My Parallels 4.0 (mission critical for me to run a few Windows apps, as well as IE6 and IE7), would not load a VM.  The problem was a driver incompatible with 64-bit mode.  Big kudos to the folks at Parallels, however, because they released an update over the weekend that resolves the issues.

1Password 2 also encountered issues with 64-bit mode, but a few minutes spend cruizing the Agile Software website got me into the 1Password 3 BETA program and a 64-bit compatible version. Thanks to Brett Terpstra of TUAW for the tip.

Everything else seems to work, and work fantastically well.  I’ve read reports of Office for Mac 2008 not running well in 64-bit mode, but its been fine for me, if not much quicker to load than in 32-bit mode.

Other Apps I’ve tested in 64-bit mode so far:

Netbeans 6.7.1 – works just fine

The Gimp (in X11) – seems to work fine

LittleSnapper – hung on my first try

Panic Transmit – works fine

2 Comments

BlueHarvest Fixes pesky ._DSstore and resource fork files

15/07/2009

For those developing on a Mac in an otherwise non-Mac environment (Windows or Linux desktops and/or servers), you’ve undoubtedly run into the dreaded ._DSstore files.  These are resource files OS X creates for directories, and when connecting to a remote file system of another flavor, OS X will leave behind these files and cause you great torment from co-workers as you litter their machines and the servers with these files.  ._DSstore files are hidden by default in OS X, which is why you won’t see them until and unless you access the given directory with another OS.

The simplest fix for this comes from Apple itself.  In this support document, Apple describes a Terminal command designed to turn off writing ._DSstore files to attached network drives.  The command looks like this:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

We use a virtual Windows Server as our dev environment, and I run Win XP under Parallels on my Mac in order to access some Windows-only software we still use.  I found even with the above terminal command, I was still leaving ._DSstore droppings everywhere I went.
Fortunately I found Blue Harvest, a system-preference pane add-on for OS X 10.4 and 10.5.  The software is $12.95 but it is free to try.  In the words of the developer:

BlueHarvest allows you to keep your disks and servers free of Mac “trails” by:

  • Automatically removing DS_Store files.
  • Automatically removing resource forks (”dot underscore” files).
  • Automatically removing hidden folders such as “.Trashes” from removable disks.
  • Providing simple Control-Click Finder based cleaning of disks, folders and Zip archives.

BlueHarvest is fully customizable (via a System Preferences Panel) and is a Universal binary, supporting Intel and PowerPC based Macs. BlueHarvest 2 requires 10.4.x or 10.5 and later.

Blue Harvest Preference Pane

Blue Harvest Preference Pane

So far I could not be happier with Blue Harvest.  Apple appears serious about making inroads into the enterprise office environment with Snow Leopard’s upcoming native Exchange support.  Though I don’t wish anything bad for the developer of Blue Harvest, one cannot escape the conclusion that such functionality should also be native if Apple really expects wide-spread adoption of Macs into Windows networks in workplaces around the world.

No Comments