Leave it on or shut it down?

July 4th, 2009

I turn my desktop computer (running XP) off every day when I’m not using it.  It is a pain to wait for startup and shutdown times, but I’m concerned for the environment and all that.

I think most people leave it running 24 hours.  I can understand why.  Sometimes it take over 10 minutes to really get all services loaded.  I’ve tried hibernate, but the Dell 9150 I use comes back from Hibernate with the fan running at full speed and it’s very noisy.  Windows seems to be geared for 24 operation– with automated processes kicking off at different times of the day.  It’s like the fridge– but I’m not sure how it compares in terms of energy consumption.

I’ve actually set my bios to kick on at 4am so the computer has finished start-up before I get up there ten minutes later.  It does all my site backups at a specific time.

I’m trying to find more energy efficient uses of the pc.  If anyone has any ideas, I’d love to know.

Misc, The Environment

What Twitter is becoming

July 3rd, 2009

I enjoy Twitter.  It’s easy to update.  The low character limit, rather than being a hindrance, encourages people to start using it who would never think of started a self-serving blog.  It’s easy to put off a quick statement without having to think too much about it.  I find I update Twitter far more than this blog.

I’m getting lots of followers.  This is good for the ego until I look at who they are.  On any given day, I will get a few email like the following:

SomebodyYouDontKnow is following you on Twitter.
Followers: 300
Status Updates: 121
Following: 1421

Now, I ask you . . . how can someone follow the status updates of over 1400 people?  How is it even possible?  Why would someone want to do it?

I get two or three of these type of followers a day.

I’m also seeing a lot of articles on the web titled “How to increase you followers in Twitter”.  It’s like the new SEO.  There are people now calling themselves “Social Media Consultants”.

I suspect that people follow thousands of people so that those people will in turn follow them.  It makes sense I guess– you send more mail when you want to get more mail.  However, there is just something spammy about this.  Maybe they are looking for the top spot in the Twitter stats.

Twitter is not like Facebook where you have to give permission to people so they can see your status.  You can search all tweets (unless the author specifically selects to option to make it private)– so there is no reason to follow 14k or more people. 

A few years ago, I kept getting contacted by SEO charlatans saying things like “I can get your company in the top 10 on Google.”  It was a ridiculous statement.  I asked if they knew what my business did or what keywords I wanted, but they didn’t. 

I now soon expect to be told, “I can get you 20k followers on Twitter. “  But who wants that?

Blogging, Social Media

UKTI "Doing Business in China and Hong Kong" seminar

July 2nd, 2009

Today I attended the half-day “Doing Business in China and Hong Kong” seminar given by the Southeast UK Trade & Investment organisation.  It was a decent presentation which discussed some of the aspects of doing business with China.  It focused more on Guangzhou, Shanghai and Hong Kong than on the Northeaster areas I’m interested in, but it was very interesting all the same.

My trip to Dalian was supposed to happen a few weeks ago, but do to the bureaucracy of the UK Home Office, I had to cancel it.  I’m planning to make the trip within in the next few months.

China

Attention: Low Crime Area

June 16th, 2009

I’ve been seeing signs all over the place lately by Thames Valley Police which say “This is a Low Crime Area.  Help us keep it that way.”  On the other side of the sign it tells you to lock stuff in your car and take valuables with you etc.2009 230

It strikes me as funny because very rarely are you told that you don’t need to be vigilant.  The sign in the picture was posted in a park.  I walked into the park with my usual level of caution (don’t talk to strangers, etc), but then saw the sign and realised I could take my wallet out and start counting my money right there on the street.  There are no signs like this posted outside the park, so I assume this must be some kind of sanctuary against crime!  Once I leave the park, I need to be careful again.

I wonder how much this sign campaign cost.  I’ll bet it is a ridiculous amount– in the tens of thousands of pounds county-wide.  I wonder how much crime it actually stops.  Someone must have said “Let’s put signs up everywhere where there is little crime, just in case.”  How will they know it works?  If it is still a low crime area six months from now, does that mean the sign campaign was successful? 

Or . . . is it merely a CV point for an public official to say they are “doing something about crime”?

This sign is posted in Oxfordshire in England, but you get the same kind of stuff in the States. 

Growing up in San Diego, there were always public service signs and posters up everywhere–most of the time, no one paid any attention to them.  In school, the hallway walls were plastered with posters of Rob Lowe and Brooke Shields that had giant slogans telling you to stay away from drugs, smoking, sex, etc.  No one ever stopped to look at these posters– they were always just there.  Someone somewhere spent a ton of taxpayer money to produce them, but no one cared.

California is broke.  Republicans in the state refuse to raise taxes any further and the voters agreed with them in a recent election.  I think these kinds of ineffective programs are the reason why.  While the Democrats want to make out that Republicans are against paying teachers and firemen, the reality is that Republicans are against wasteful spending more than anything else.

Sure, putting up signs everywhere to reduce crime sounds like a good idea–but it also sounds like an expensive idea.  The problem is there is no way to measure how effective they are.  Our governments are so far in debt, that these kind of luxuries need to be looked at. 

I didn’t mean for this post to be a rant– just a picture of a funny sign.  I’ll try to post a picture of this sign in a few weeks– after it has been vandalised.

Living in the UK, Misc

Time to Drop Audible.co.uk

June 11th, 2009

For the last couple of years, I’ve subscribed to Audible for my audio books.  For £7.99 a month, I get one audio book a month.  I’ve got loads now.

I frequently listen to audio books when I have downtime or doing something mundane like garden work or dishes.  Audible delivers the books in audio book format instead of MP3, so I don’t lose where I am in the book when I stop it and don’t have to go to a specific track when I pick it up again.

In the past couple of years, I’ve had a few problems with the service.  They use a pretty strict DRM, and I’ve had trouble each time I’ve re-installed an OS or moved to my laptop.  One month, I didn’t use my book credit and found that it was removed the following month.  Their customer service resolved this for me but told me I have to use the credits or lose them.  That’s fine.

They seem to be doing well.  Every UK magazine I look at these days has an add for “Free Audio Book” to get people in.  It’s not a bad service and I would recommend getting the free book.

But I’ve come to realise lately, that all the Audible books are on iTunes.  Even some books that are produced by Audible in the US are available in iTunes and not the UK Audible website.  Here’s the big thing– the audio books are cheaper in iTunes.  Every book I’ve compared seems to be 2 or 3 quid cheaper if you bought them when you needed to.  Besides, on Audible, I find that all the books I want to listen to lately cost less than £7.99– so it would be better to stop paying the subscription.  This wasn’t the case a year ago.

Audible is a good service, but I think it needs to compete better with the same books it sells through iTunes.  If you are looking to join Audible.co.uk, join for the free book, then buy them when you need to through iTunes (that is, if you are tied to Apple because of your iPod or iPhone).

Misc

Why I would never host with Re-Invent Technologies again

June 10th, 2009

A couple of years ago, I bought some web-space from a company called Re-Invent Technologies (http://www.re-invent.com/) for some ASP.Net web space with SQL Server hosting.  I paid for a 2 year contract. 

I didn’t realise they had set me up with the dreaded auto-renew option.

About six months ago, I migrated my site to a dedicated server because I had converted it into PHP.  I knew the Re-Invent contract was due to run out anyway.

I noticed a few weeks ago that I had been charged for another year of server (about £60).  I never received an invoice or an email notifying me this would happen.  The last correspondence I had from the company was two years ago. 

So, I sent a polite email to them explaining that I didn’t use the webspace anymore.  I said that there should be no traffic coming through and that I did not get an email notifying me of the new charge.  I also, in an effort to get them to be more responsive, thanked them for the service and said I would recommend them to others.  Could they please refund my money, or at least the money for the rest of the year from now?

What I got back was as follows:

Hello

Notices are sent automatically to the email address on file about 2 weeks prior to billing.  Customers are responsible for maintaining their current contact information.

To cancel your account you would need to log into the customer portal (NOT control panel)  and click on the account cancellation link on the left.  This is the only means of cancellation as per the hosting contract.
Refunds are given only if the cancellation is within 15 days of the renewal date, as per the hosting agreement also.

Thank You

Re-invent Technologies LLC
http://www.re-invent.com

Now, I know they are not legally required to refund my money (not sure about this, actually)– but if they wanted me to host my .Net stuff with them in the future, they would have.  They could have been a little more client focused in how they dealt with this issue.  It is not signed by a person.  There is no one I can talk to.  They have not addressed my genuine issue of not getting the emails or the invoices.  There is no empathy at all in this email.  Even if it had said, “I’m so sorry, our policy is that we . . .” whatever, it would still suck, but it would soften the blow.

So, I would NOT recommend this company.  They blew it.  I’ve paid them money to host with them, and I can’t even talk to anyone.  I’m a little annoyed.

So I’m posting this for anyone who is Googling Re-Invent. Anyone who is doing a little research before hosting with them, I am giving you warning.    In fact, let me just include this for SEO: “Re-Invent Technologies Review”.

I’ve hosted with lots of companies.  When I’ve had issues, I usually get a ticket back with someone’s name on it.  This was a legal response.

My Review of Re-Invent: Very poor customer service.  They got my money this time, but they will NEVER get another penny from me. 

There.  I feel better.

Blogging, Software Development

Creating a daily Database backup for MySql (and self-hosted Wordpress blogs)

June 8th, 2009

Most of the professional work I do is with Microsoft SQL Server and .Net platform.  For my own pet projects, I prefer using MySql as a db engine.  Wordpress (and most PHP projects use it primarily).  It’s cheap and efficient to host.

One of the features I always found SQL Server to lack is the ability to generate insert scripts.  Sure, it’s easy to script out tables, views, and stored procs– but you still have to get tricky with transferring data from one database to another.  I know people say “you can just back up the database and restore it to a new server”, but they obviously have never worked in a tight change-controlled enterprise environment where you need everyone under the sun to approve this a dedicated dba overlooking everything.  This method is overkill if you just want to replace the a record that a user has “accidentally deleted”.

MySql has a very handy feature that use frequently called mysqldump.  This will create an sql file of all db objects and store them in an sql file — data structures and data too.  Mysqldump will create one script with table create statments (and drop statements) along with insert statements for all of your data.

I use mysqldump to store local backups of my remote databases.  For example, this blog is backed up every morning– just in case my server goes down and is unrecoverable.   I occasionally back up web code with an FTP routine, but the database needs to be done more often– since it is frequently updated by me or readers of this blog with comments.

Here’s how it’s done using my Wordpress database and local XP account:

1.  Make sure you can connect to your remote database from your local pc

To do this, you need to have MySql client tools installed on you local pc.  Just try to log into our remote site using MySQL Administrator. 

image

If you can connect from you local pc, you can use mysqldump from the command line.

2.  Write a batch script to create a folder for each day

I have a folder called “backups” with a date-stamped folder for each day of backup (ie.  2009-06-08).  Here is my code for that batch file (with my db details removed):

rem backup blog

rem create new folder name
set DD=%DATE:~0,2%
set MM=%DATE:~3,2%
set YY=%DATE:~8,2%
set YYYY=%DATE:~6,4%
set FOLDER=%YYYY%-%MM%-%DD%

rem make the new folder
cd g:\backups
mkdir %FOLDER%

rem go to folder
cd %FOLDER%

rem create the data dump
mysqldump -h 111.222.111.222 -u username -ppassword wpDBName > blogdump.sql

For the mysqldump line, use the ip address (or host name) of the remote server and user name and password.  In the example above, I am connecting to my db called “wpDBName” on host 111.222.111.222 with the user name “username” and password “password”.  It is writing out to a file on my local pc called “blogdump.sql” in a folder with a date stamp.

NOTE: the -p switch does not have a space between it and the password.  This is bizarre, but that’s how it works.

Save to the above code to a file with a .bat extension.  I called mine “backup.bat”.

3.  Create a scheduled task to run this job.

Use Windows Scheduled Tasks to automatically run your batch job.  This can be found in Control Panel and is easy to use (Wizard Generated).  I run my job at 4:10 am.  To save the environment, I shut down my pc at night, but a bios task wakes it back up at 4.  At 10 minutes past 4, my databases are backed up (just before I sit at the keyboard with my coffee to catch the final innings of a Padres game).  Once a week, I have a similar job that will back up all web code via ftp.

image

 

That’s it, the majority of my disaster recovery problems taken care of.  I have the data stored on my local pc and on the server.  It would be easy to run the same script from another pc if I need to, also.

As you can imagine, this daily backup can take a good deal of disk space.  Each sql dump is about 3mb for this site.  I usually clear things down every few weeks and delete backups that are over a week old.  I don’t replace my backup file every day because it could be a few days before I realise anything has gone wrong.  I may script this at some point in the future.

I’m blogging about this because a few days ago I was playing around with my Plesk settings on my Ubuntu VPS and everything stopped working.  I had to restore to my last VPS backup– which was a few weeks old.  That would have meant losing all my Wordpress blog posts and (more importantly) the comments I’ve received from them.  Luckily, I have this backup method in place so I didn’t lose anything.

If you are not backing up your databases (even if they are hosted with a web host), you should really consider it.  It is a trivial task to set this up and could save you in the future.

I hope someone out there finds this useful.  Drop me a line (or post a comment) if you found this to be of any help.

Blogging, Software Development

Conan O’Brien on the Tonight Show

June 6th, 2009

I used to watch the tonight show every night. I missed a lot of school from oversleeping. At the NBC studios in Burbank, I saw Jay Leno a few times while he was guest hosting for Carson. When O’Brien took over for Letterman, I thought he was awful– but six months later, he had his own style and was funnier than Letterman.

I miss the late night TV while living in England. This week, Conan took over for Leno as host of the Tonight Show. This is the opening for the first show. Looks like it will be very good.

Maybe we will be able to watch the show from the UK one day.

Growing Up, Living in the UK

Live Fire use of Hindi

June 4th, 2009

Last night, my family treated ourselves to Indian takeaway.  I was planning on cooking something earlier (I absolutely hate cooking), but was feeling ill after my vaccinations.  So, I called the local Indian restaurant and ordered a curry.

When I showed up at the Indian restaurant to pick up the food, it wasn’t ready yet so I sat in a chair by the door.  The restaurant was empty except for me and the waiter.  I was wearing sandals, shorts and t-shirt, and my San Diego Padres cap.  He was wearing his waiters uniform (bow tie and button-up shirt).  The waiter started to make small talk with me.

“So, are you having a good day today?” he asked.

“Yes.  Thank you.  Are you?” I returned.  I’m never good with small talk. I think this is why I will never be a master networker.  I will never attain my junior high school visions of being able to walk down the street and have people greet me with high fives and everyone knows me.  I’m just not good at talking when I don’t have anything to say.   

The waiter told me he was fine and a few minutes of silence passed.  Then I realised this was an excellent opportunity to practice some Hindi.  I could actually use some Hindi in a real-life, live fire, situation.

“Aj mausam garam hai,” I said.  This means “The weather is warm”.  Luckily, the weather actually was very warm– because I couldn’t remember if the word “weather” was masculine or feminine and which form of the word “cold” to use.

He looked slightly amused and asked where I learned to speak Hindi.  I told him about taking the class at the local college.  He confirmed back to me that the weather is very warm (”bohot garam hai”).

I was pretty impressed with myself that I was having a Hindi conversation.  But, I had nothing else to say!  I couldn’t think of anything thing else to say that I learned on that 10 week course that I could use. I couldn’t think of anything that my colleagues in Mumbai had taught me.  I froze.  So, to fill the conversation gap, I said the one thing I used to say to my Mumbai friends which usually got them to laugh– “May thola thola mota hai kewkee may chicken bohot passand hai.”  This means “I am a little bit fat because I really like chicken.”

This was just met by an odd look from the man.  He didn’t laugh or even smile– he just looked at me as if not knowing what to say.  He then told me he was actually Bangladeshi but did understand Hindi.  I nodded in understanding and then pretending I was reading a text on my phone.

It got my food and then left.

I’ve been studying Chinese a lot lately and haven’t really used Hindi at all.  To be honest, I found Hindi to be a difficult language to learn.  I am not fluent by any stretch of the imagination.  It will never be listed on my CV.  I’m not sure if I will ever have a reason to pick it up again.

I don’t think I’ll try speaking Hindi in a restaurant again any time soon.

Hindi, Learning

Dalian Promotional Video

June 3rd, 2009

In my preparation for the trip to Dalian, I’ve been watching a lot of videos on Youtube.

Here is a promotional video which shows a lot of scenes around Dalian.  I’m very excited.  But the city is a lot bigger than I thought it would be!

China, Chinese