The PHP Cult

Shamelessly promoting PHP, Myself, and my services

Archive for the ‘mysql’ Category

Computer World has an article about Telecommuting . So, I thought I’d chip in my inflated $0.02. Telecommuting, doesn’t mean working from home. This is one of the biggest myths, and truths people will realize over time. What makes me such an expert? I’ve been telecommuting for the past 3 years, straight, full time. I’m not talking about moonlighting, and doing part time work for companies who post on craigslist. I’m talking multi million dollar projects. I haven’t been fired, I haven’t left the company, and I’ve been rewarded with a raise, and more importantly, I haven’t missed deadlines.

You still have a job, act like it. (The Ugly)

Telecommuting, is not that hard. But, it’s not the holy grail for workers either. You’re not going to become productive because you work from home, you’re not going to save a lot of gas, and you’re definitely not going to “make your own hours”. The last part is true, if you want to be a telecommuter.
Just because you work from home, or remotely, doesn’t mean your responsibilities to other people go away. Deadlines are deadlines, people need to know what you’re up to, and what the status is. The only time they can get this information is when they’re working. So therefore, you’re still working when they are. Sure, you can actually do the work later, but you better be awake and available to answer phone calls during the 9-5. Your client is being nice enough to let you make your own hours and work remotely, but they can only do so much, you must extend the favor back to them, by being available when they need you.

Working from home isn’t so awesome after all (The Bad)

You’re not going to work from home, if you itch to telecommute, you itch not because you love your home, it’s because you hate the monotony of your cubicle, and your office. You’ll hate your house soon enough. I’ve found that if I work from my house for more than a week, I go crazy, and productivity drops. I’ve found many cool coffee shops and bars that I work from. Yes, I said bar. No, I don’t drink while I work. Get yourself a good pair of headphones, a 3g card, and a good laptop. You’re finally free to work from where you want to, don’t waste it at home.

And the commute shall set you free! (The Good)

I’ve found that I’m more creative, I get more done, and more importantly I’m happier. I don’t have to worry about the morning traffic report, and I don’t have to worry about inclement weather. I make sure I’m available during the day, even if I’m not working, I can answer a phone call from the pool, if the call requires me to get on the computer, I can very quickly. It’s a type of freedom, that can only be experienced once you understand your new responsibility.

Andrii Nikiti’s son Needs Our Help

(Reposted from Zack Urlocker’s blog)

Andrii Nikitin, one of the MySQL support engineers located in Ukraine, has asked for help from MySQLers and so I’m sharing this information to the community at large. Andrii’s son Ivan, who is 2 1/2, is in need of a bone marrow transplant operation. This will require going to a clinic in Europe that will not be covered by regular insurance. So Andrii has aksed to see if we could help raise funds. The cost is expected to be 150,000 - 250,000 EUROS. A huge amount for an engineer from Ukraine to cover. But a small amount by many people could make a big difference.

Many MySQLers have kicked in to help out, but more is needed. Ivan’s health has taken a turn for the worse recently and the issue is now quite pressing. Even a small donation could mean the difference between life and death for Ivan.

I hope some of you who use MySQL or have young kids will join me in making a donation today. You can do so by using Paypal, by sending a check to MySQL, or via wire transfer.

Paypal:
http://tinyurl.com/6rxjsz
Or
by check payable to:

MySQL, Inc.
Mail to: MySQL, Inc.
Attn: Linda Dong
20450 Stevens Creek Blvd #350
Cupertino, CA 95014

or
US wire transfer:

MySQL Inc: 7396643001
SWIFT: NDEAUS3N

or
International wire transfer in any currency:
Bank: Nordea Bank
Bank address: Stockholm, Sweden
Bank account: 3259 17 03868
IBAN: SE27 3000 0000 0325 9170 3868
SWIFT: NDEASESS

Thanks to those who have donated already. A child’s life is precious and I hope we can give Ivan a chance.

  • 1 Comment
  • Filed under: mysql, personal, php
  • Telecommuting in 2008

    Considering the few posts made recently, regarding Telecommuting, I thought I’d put in my $0.02, adjusted for inflation.
    See Cal’s Post and this awesome job opportunity.
    I want to discuss the various tools and options available to the telecommuter in 2008.

    Disclaimer: I don’t want to make this another post on the benefits of Telecommuting, as I strongly believe there is no silver bullet for the problems an individual or a company faces. There are many drawbacks to telecommuting, and the positives don’t always neutralize the drawbacks.

    Background: I’ve been telecommuting since 2003, that’s when I decided to quit working for the ‘man’. I chose a laptop to give myself mobility. This mobility also came in the form of being single, unattached, and my willingness to drive. I drove from New Jersey to San Antonio, to Corpus Christi, TX, back to San Antonio, to San Francicso, to Los Angeles, to Boca Raton, FL, to Alexandria, VA, Birmingham, AL, to Herndon, VA to San Antonio TX.

    All of this traveling was done between January 2003 and October 2005. So, for almost two years I lived in hotels, and everything I owned, fit in my Nissan Sentra. This was telecommuting 1.0, I call it telecommuting because quite often, I could work from my hotel room, they just wanted me close by, in case of meetings.

    As much as I loved driving and finding new places, hotel life does get a bit tiring. So, in 2005 I decided to settle down in San Antonio. I’m sure a lot of you will wonder why I chose Texas of all places, to which I can only say ‘try it’.

    Here are some tools I use to help keep my sanity, and my contract.

    1. Laptop: I use a macbook pro as my one and only machine, the laptop is my primary means of income. My laptop is almost 1.5 yrs old, and it’s still more than what I need. My only gripes are:

      1. Glossy Screens: I chose the glossy screen from Apple, it’s a great looking screen, but it’s not the best in all situations (outdoors).
      2. Resolution: 1680×1050 is nice, but I think I’d prefer 1920×1200, so I want to buy the new MacBook Pro’s, but I don’t know what to do with this laptop first. I can’t logically, or fiscally justify two laptops.

      Since OS X has unix at the core, I have a local development environment for all my projects. I’ve tried out things like MAMP, MAMP Pro, but I keep going back to my old Linux roots. I have the default Apache, and a customized PHP installation, along with MySQL.

      I use subversion for my source control, though I am thinking of switching to GIT. But, whether you use GIT or SVN, it doesn’t matter as long as you use something it’s good. Basically, the use of SVN, Apache, PHP and MySQL allows me to have a full local dev environment. I can write new code, make bug fixes, document, whatever, all from the comfort of my laptop. And I never have to say
      “oh, I can’t get to that file it’s at home, or at the office”.

      The laptop alone gives me the freedom to work from home, or any other place with internet. As much as I love my laptop, I stronly urge you to learn to live without it as well. I’m a strong believer in the no laptop per meeting initiative (there should be one if there isn’t already).

      You don’t have to use a mac, or install Linux. I know people who are very happy with Windows as their primary OS/Development environment, this is development so performance is not your primary concern here.

    2. Mobile Data Cards (EVDO/HSDPA): These things are awesome, and worth it if you telecommute. Now, I’m sure you’re going to ask.. but if I work from home, isn’t my cable/dsl faster and more reliable than Sprint/Verizon/ATT? Why yes it is, but telecommuting doesn’t necessarily mean you’ll be in the comfort of your home all the time, nor does it mean that you’ll want to be. I spend more time at Starbucks, Coffee houses, and other places where the weather is nice, and the view is even nicer. None of these places have reliable Wifi, or wifi at all. But, my Sprint EVDO card works. Plus, for what I do, it’s awesome. I don’t upload massive files, I don’t download massive files, I upload incremental changes, ssh into remote machines, and I read the news with my RSS reader. I really don’t need a 10mbps internet connection. I need a stable connection, that lets me work anywhere. These card work all the time, and work every where I have been.
    3. Good headphones: I use the V-Moda head phones, they are good enough for my ears. They sound great, and fit perfectly. They’re so comfortable that sometimes I get up with the phones still in my ears, only to be yanked down by the laptop. I’m interested in bluetooth headphones, if someone has any opinions, please share them. Anyway, the reason for headphones is because they help you concentrate. They drown out the ambient noise of the environment you’re in, OR you can turn up your music as loud as you like then. I can’t work in silence, nor can I work when other people are talking. I love listening to music when I work, it helps me concentrate.
    4. An extra power cord: I have two power cords for my laptop. One is stationary and never leaves the house. The other is always in my laptop bag. This is just a peace of mind/convenience thing. I used to land in a different city, or get to the airport and find out I left my powercord at home, or at the client’s site, but no more. Part of it is due to better discipline, part of it is the intangible comfort I have when I travel, that there is always a cord at home.
    5. A good laptop bag: Like a man or a woman, is hard to find. Everyone has their own preferences, I prefer to use bags that can carry things besides my laptop. I like to take pictures, and since I normally find myself in places I find interesting, the ability to have my camera with me is a huge plus. But, sometimes I want to travel light, I want the ability to take the camera out, as well as the compartments for the laptop and lenses. The bag should transform from a large laptop bearing bag, to a smaller version of it self.
      I prefer the use of back packs, but I like the style of messenger/brief case bags. So, I’m still trying to find the perfect fit, but for now I use a Targus back pack. I’ve tried Brenthaven, Tumi, Timbuk2, and InCase bags, the Targus has been with me the longest, due to it’s simplicty, and my ability to pack my camera bag in it, when I need to.
    6. A portable hard drive: I have a Maxtor 160GB USB only drive, I bought it on sale for $80. I now have a constant backup of everything on my laptop. If I’m traveling, I just start the rsync before I go to bed. In case the events of the day cause me to lose my hard drive, drop my laptop, or I become a victim of the burning battery, my work is backed up. I am looking at Truecrypt, to see how I can make my backups a little bit more secure. If I lose/forget my drive, then my work becomes the property of Joe H4×0r, which is bad. I’d love to hear your opinions on this. I’m trying to find a balance between encrypting everything, and only encrypting the things I need encrypted.

    I believe these 6 items, will help you, because they have helped me. I don’t want to talk too much in detail about how you should
    live your day, or how you prioritize your tasks. There are plenty of sites out there to help you with GTD, Focusing, Time Tracking/management. Those same rules still apply, whether you work from home, or the office, you will still need to prioritize. You will still need to keep track of your hours, and you’ll still need to make time for the wife, kids, dogs, and most importantly, yourself.

    MySQL Database Backups, and your health.

    If you read my blog, chances are you are aware of this new fad called the internet, and this new language called PHP. You’re also probably aware of things like MySQL and SQL, and the importance of data to visitors of your website. So, keeping that in mind, I’d also like you to know about backing up this data.

    As I grow my business, the number of clients I run into that do not do backups, astounds me. I’m not talking about end user laptops/desktops, but rather backups of their SugarCRM database, or their file server, or even their company website, which is powered by Drupal/Wordpress/CMS Du Jour. When, not If, the database is corrupted, or the disk fails, they have no idea what they would do then. They just hope that it doesn’t happen to them.

    So I did some thinking, and decided I should write a post, and make available to the world, a simple script, which I believe will at least give you onsite backups. This is what the script does:

    • Backs up each mysql database into it’s own little .sql file.
    • Makes a tar ball of the .sql files.
    • Copies this tarball to a remote server of your choice. (optional/requires more than editing a few lines)

    The script is available to download/view here.

    Change the configuration options at the top of the file, make sure everything works, and then put it in your cron. Feel free to post questions/comments in the comments section.

  • 7 Comments
  • Filed under: mysql, php
  • A lot of you may already know this, but I am willing to bet there are more that don’t. I’m talking about the tee command in the bash shell, and in MySQL. For our purposes, we’ll talk about the tee command in MySQL.

    Problem: You have a series of SQL statements whose results take up a few screens worth of output, and you need to take this output and send it to someone else (A DBA, MySQL Support, your mentor). You could just do a copy/paste from your terminal, but what if you realized in the end that your scroll back buffer isn’t as large as you thought it was?

    Solution: Tee. Apparently, the mysql client comes with tee.

    mysqlshell> tee mysqlog.sql ;
    Logging to file ‘mysqlog.sql’
    use dbname;
    select foo from bar;
    ….
    mysqlshell> notee;
    quit;
    bash> cat mysqlog.sql

    This could be filed under “my bag of neat mysql tricks”

    PS: Sorry for the K.T Tunstall song reference/joke.. I heard it on Saturday and it’s not leaving my head.

  • 1 Comment
  • Filed under: mysql, php
  • Basically, if you need a job, or hate your current job, and have time to commit, and if you’re a professional, or just disciplined and care about every little thing you do..Or, if you just want to work with me.. :

    Geneva Data, an Internet Security company is looking for PHP developer to work on a unique project in San Antonio, Texas.
    We’re open to a full-time, part-time, contract, consulting or project work. We just want the most innovative local PHP programmer available (with experience.)

    “Experience” means you can show us proof of your work … whether you have been in the workforce for 6 months or 60 years.

    “Innovative” means that you’ve never encountered a problem that you couldn’t solve. We appreciate individuals who experiment with new technologies on personal projects. Creativity is a plus with us.

    • MySQL and/or Linux proficiency is a further plus.

    • Experience with Internet Security is a HUGE plus (you know how to use tcpdump etc).

    • Local (San Antonio) or in-state (Texas) candidates preferred.

    So, if this sounds interesting to you.. please contact me vid at phpcult dot com.

  • 0 Comments
  • Filed under: mysql, php, security
  • Calendar

    November 2008
    M T W T F S S
    « Sep    
     12
    3456789
    10111213141516
    17181920212223
    24252627282930

    My Photos

    www.flickr.com

    Tweet Tweet

    Powered by Twitter Tools.