Where’s php.ini?

August 20th, 2009 | Category: Entrepreneur,Technology

I had a heck of a time hunting down the location of php.ini on my Mac.  I needed to set the PHP error reporting setting to ‘true’ for my local installation.  Though I much prefer the file system organization of the Mac to Windows, I don’t know it nearly as well.  After some digging, I finally found the file.  On top of locating it, I had to set the permissions so that I could make the necessary change to the file.  Here are the steps:

1)  Find PHP5.  It’s a pain in the axe.  It’s located at /usr/local/php5/lib.
2)  Access the parent folder in the finder by typing “/usr/local/php5″ in the dialog at “Go->Go to folder…” menu item.
3)  Right click on “lib” and choose “Get Info”.
4)  Under “Ownership and Permission”, click on the lock icon.
5)  Change the permission so that you now have permission to write to the file.  You’ll have to put in your admin password a cupla times.
6)  Navigate to the “lib” menu now and find the “php.ini” file.  Double click on it and choose “TextEdit” as the application of choice (make it the default app too).
7)  Make the necessary changes and…done.

No comments

Couple days at the cabin

July 22nd, 2009 | Category: Technology,USA

After the climb of Slippery Slab Tower, I headed into Cashmere to hang out at Robert’s cabin for a short retreat.  The great thing is that there was no internet connection, phone, and so on.  I was planning to stay there for about four or five nights, but ended up staying less after Daniel confirmed a Wednesday departure for a trip to the North Ridge of Forbidden Peak.

Though I ended up staying for only two full days, I accomplished a lot.  Basically, my schedule:

  • Wake up, have breakfast
  • Dig a little section of trail on the property until about 8:30 or 9:00
  • Work on WordPress development
  • Have lunch
  • Go into town to check email and do a little bit of internet surfing, two hours max
  • Work on more WordPress development
  • Dinner, read, go to bed

Actually, it was a great break from the usual routine and it confirmed suspicions that I had about my personal productivity.  One of the problems in China was that the internet was so slow that I’d be working on a certain web page, but it would take a little to long to load.  So, I’d tab over and open another page, another site that I needed to work on, investigate, read, or whatever.  Naturally, that page would take a while to load as well, so, I’d open another tab and repeat the process.  Eventually, I’d have ten or so tabs open and rotate to each one as they finish loading.

Switching focus between tasks is undeniably costly.  After a few weeks of this, it became apparent to me that this rapid switching between tasks was costing me a lot of time.  Spending time at the cabin away from the phone and the internet empirically demonstrated that being away from these distractions causes productivity to jump.  So, in only two days I wrote a WordPress plugin that reads a folder on a website and displays each of the files as downloadable links.  This was the first time that I’d written anything in the PHP language.  Not only that, but I also created two admin settings pages that integrate into the WordPress admin panel:  one for uploading files, and one for deleting files.  If I were working on this project in a normal environment, it would probably take me a week to write this.  So, how do I enforce this undeniable law of productivity in a normal environment?  Well, I hope I can qualify this better in the future, but to start with, setting distinct time limits on tasks, in units of hours only, is a good start.  Also, simply accessing the internet at specific times helps too.  I may have to get back on my email checking schedule…

Anyway, thanks, Robert, for the opportunity to stay at the cabin.  I enjoyed it.

No comments

PHP and MySQL on the Mac

April 24th, 2009 | Category: Entrepreneur,Software

I now am needing to learn more about PHP, MySQL, WordPress, and so on. As you may know, this site you’re now reading runs on WordPress software, which, for the most part, I’ve been happy with. But, if I want to add my own customizations or just play around with different ideas to try out on WordPress, running a test site online is not so practical (especially with the pitiful speed of my internet here in China). So, I looked into running WordPress locally on my Mac. I had to hunt down four things to install and configure: Apache, PHP, MySQL, and WordPress. I spent four to five hours downloading, installing, and troubleshooting. In the end, it wasn’t so hard, but pulling all the info together from various websites was quite time consuming. So, I spent 20 minutes this morning culling the important information and distilled how I did it into a five-page document.

You can download the pdf file here.

It sure is nice having this set up locally. It’s incredibly fast (obviously) and as easy as editing and saving files in a basic text editor.

1 comment

The first three weeks

March 03rd, 2009 | Category: Entrepreneur

First of all, I have to apologize for the huge delay in an update to my blog. The last one was significant enough to warrant a decent amount of time before the next post, but this was much longer than I was anticipating. There were those who thought I’d be bored in the short time that I’ve been self-employed. Others suggested I might end up working too much on my blog.  I knew that neither of those would happen.  In fact, it seems like I’m busier now, especially with transitioning to the this new lifestyle.

One thing that I have to specifically mention is that what my friend and former colleague Peter, who quit Microsoft back in July and now lives in Shanghai, told me:  “You will feel a euphoria of having the freedom of setting your own schedule and working on the things you care about.”  That is certainly true; I feel it.  Despite feeling some anxiety during the transition period away from Microsoft, I now can’t imagine going back.  I hope I will feel the same way in six months.

Back in the real world, however, there are several pressing transition issues I have to deal with:  tax issues in the US and China, getting all of my outstanding expenses reimbursed, researching and setting up insurance, planning a move to a cheaper place (now that MS isn’t footing the bill), and a few others.  Here is the list of the various projects I’m working on now:

  1. The aforementioned domestic issues, which need to be taken care of as soon as possible for peace of mind.
  2. Setup the appropriate and best structures for being self-employed.  This involves lots of emails to lawyers and CPAs in the US.
  3. Re-releasing my two shareware applications. I am combining the two apps into a single suite, redoing all the graphics and UI, fixing a few bugs, updating the name to something funnier, buying the domain name, doing some marketing and affiliate programs. My goal is to increase downloads by 10 times.  This should increase revenues nicely.  We’ll see; it will be a learning experience regardless and it’s fairly cheap to do all of this.  It’s been six to seven years, but I have been too lazy and comfortable to touch the code.
  4. Re-release my Tchaikovsky Violin Concerto CD.  This has involved redesigning the cover professionally, getting a logo developed, and reworking the orchestral tracks, remixing the CD, and sending the tracks to the US for printing and hosting on CD Baby.  It’s been sold-out for three or more years now and, again, I’ve been too lazy and comfortable to do anything about it.
  5. Release two reuseable CMS (Content Management System) websites for two different purposes, both of which are specific needs of mine.  One of them could turn into another side business, but I’m not focusing on that right now.  The other, maybe a little later as well, or just free software.  I’m hoping to outsource these to two projects different local companies in Shenzhen to see how well we work together.  The best company will win the big website I’m working on, which I’m still designing.

Numbers 1, 2, 3 and 4 should happen within the next three to four weeks.  That should free up time to focus on #5, which will also give me incentive and time to continue working on my other website idea.

So, what has my daily life been like?  Well, I’m trying to keep it as close to normal, structured life as possible.  I still have my weekends available.  It’s not so busy that I need to eat into weekend time.  So, I’ve been keeping a schedule Monday-Friday that begins around 8 am lasts through 5-6pm.  I’m working pretty hard to spend the requisite time outside so that I maintain the right level of social contact, otherwise, I’m afraid I’d get shiftless and lazy.  So, much of my time is spent working remotely.  There are also frequent lunches and usually activities every single evening whether it be Chinese Lessons, Basketball, or simple dinner with a friend.  So far, it’s working very well.

Here are some of the challenges, none of these is terribly serious:

  • The internet is slow in Shenzhen.  It’s quite slow in my apartment at key traffic times.  This causes me to be distracted.  How so?  Well, I start working on a certain a certain problem, using a certain website, and it turns out that website takes a too long to load for my liking, so I multi-task over to another problem, and usually load another website.  Repeat, repeat.  Eventually, I’m bouncing around from task to task.  You’ve probably heard that it takes a lot of time and mental effort to make a switch from one task to another.  It’s true; I can really feel it.  I’m trying to minimize the distractions by:  Batching (like doing all my email only three times per week), and doing as much offline work as possible.
  • Lack of focus caused by not adhering to a schedule.  Remember what I wrote above about my schedule?  Well, I’ve been 100% diligent about it when other people are involved.  However, when it’s just me, I tend to slide a bit.  Just a couple of days ago, I realized that this was causing me to lose focus.  By knowing that I have a hard break for a task, I tend to focus because I want to finish as much as possible before my time is up.  Of course, if I’m on a roll, I’ll reschedule an impending schedule item, but usually this isn’t necessary.  This reminds me of the Parkinson Law.
  • Instant Messaging is hugely distracting.  OK, this one is easy to fix.  I enjoy chatting with a few US friends in my early mornings and I still allow myself to do this briefly, but if I’m on after 9:30AM China time, I’m often inundated with people who want to chat.  I’m often too nice to tell them I have to go; I usually let them chat until they’re done.  Bad habit, but easily managed by turning off Messenger by 9:00-9:30AM.
  • Facebook can be a distraction, though I think it has huge amounts of business potential.  I’ve already made some important business decisions because of Facebook.  But, the other great thing about it though, finding long lost friends, can be distracting too.  I spend a lot of time on Facebook writing long emails with old friends.  I haven’t quite figured out this yet; there seems to be no single solution, but rather just learning to be more brief or only do this sort of activity on the weekend.
1 comment