If you’ve been working with PHP/MySQL based websites for any amount of time, you’ve probably heard about the MySQL command line tools for importing and exporting your database.
The syntax is quite simple, for exports you run
mysqldump -udbuser -p dbname > dbfile.sql
which exports the database to a file on the local machine. For imports you run
mysql -udbuser -p dbname < dbfile.sql
which imports the contents of the local file (dbfile.sql) into the empty database.
This is usually the quickest way to export a database from one location to import it into another.
One problem I’ve experienced from time to time is exporting and importing large databases. By default the tools don’t output any progress indicator (or anything at all really), and using the -v (verbose) switch outputs every single MySQL command being run from the import file, which is like watching the code in the Matrix.
Fortunately, there is a way you can run imports and exports and show a progress bar, with Pipe Viewer.
Pipe Viewer is a terminal-based tool for monitoring the progress of data through a pipeline. The Pipe Viewer homepage has all the install commands for the various operating systems, and Ubuntu has an official package for it, so you can install it through apt.
sudo apt-get install pv
Once pipe viewer is installed, you merely need to make two small changes to you import and export commands.
pv dbfile.sql | mysql -udbuser -p dbname
mysqldump -udbuser -p dbname | pv -W > dbfile.sql
And viola! You will be presented with a progress monitor that shows file size imported, time taken, percentage progress. Much better than staring at a blank screen.
A handy guide for clients working with freelance developers so nobody gets hurt…
Working with freelancers can be, for some, the equivalent of playing with a loaded gun. It can work out, but there are times when it can really affect your business and your life. As a client, you need a handy guide to working with freelance developers to ensure that every person working on the project comes out on top.
You need to understand your product and its requirements very intricately before you move into a relationship with a freelance developer. You can’t brief something in to someone until you know it really well. This also ensures you have a very clear vision of the final product and will inform all your engagements with your freelancer.
Step 02: Have a basic understanding
You will need some basic knowledge of web and development before you embark on this adventure. Yes, you are hiring a professional to take on your project so theoretically you shouldn’t need to know a thing. The fact is, if you have a modicum of understanding then you will have more realistic ideas around time frames, deliverables and project potential (and the magic Foo of your developer).
Step 03: Budget is everything
Don’t expect your freelance developer to be happy to cut their rates to suit your budget.The work they do is complex and specialised. Instead, be prepared to cut your requirements to fit your budget. That way you are assured of quality work from a reliable developer.
Step 04: Clarify your requirements
This is an extension of Step 01. Why? Because this is the most important step of all – it will cost you money and time if your requirements are vague so spend time on clarifying them. It’s worth it.
Step 05: Develop a clear timeframe
Work closely with your freelance developer to break the project down into achievable phases,each with their own milestones and deliverables. This will ensure that both you and your freelance development team are on the same page and working towards the same goals. This way nobody can say that they didn’t know that X had to be done by Y date…And this includes you providing your development team with the information and materials they need to achieve these goals.
Step 06: Create communication channels
From Slack to Asana to Evernote to Skype – there are plenty of communication and collaboration tools available to help you streamline communication with your freelance developers. Many of these offer timeline and deadline management tools as well, making it really easy for you to track timing and status.
Step 07: Don’t hover
The headline says it all. Science has shown that for every interruption, it takes a person at least 20 minutes to get their concentration back. Every time you interrupt,you slow your project down.
Step 08: Test
Every step, every aspect, every phase – test. Test assumptions, capabilities, developer promises and results. This will ensure that the final product has had most of the kinks ironed out iteratively rather than a messy tangle to unwrap at the end.
Step 09: Feedback
There is bad feedback, there is good feedback and there is great feedback. Learn how to do the last two types of feedback really well. Good feedback is defined as giving the person the information they need to make changes, fix problems, address issues and overcome obstacles with precision. Vague and wishy-washy comments like, ‘Yeah, it doesn’t feel right’ are not helpful. Nor are nasty and antagonistic ones. Nobody puts passion into a project for someone they don’t like.
Step 10: Everything is in writing
From the onset of your project to the phases and timelines to the final deliverables ensure that your project is clearly documented and that all parties have read and signed every document. You do not want to end up at the end of a messy conversation or project with someone saying that something was never clarified.Assume the best, prepare for the worst.
Step 11: Manage expectations
Your developer won’t always be around to leap to your requests or requirements. This is very normal and you may not be their only client. Be patient and trust that they will get back to you and respect your urgency.
Usually, towards the end of a year, I start looking back at the year that has been, and looking forward to the year ahead, planning my new goals and resolutions.
This year, however, I have one very specific goal in my head. It’s an idea that actually birthed itself way back in July of 2016, when I wrote a post about why I got into development and blogging about development, in the first place.
2018 has been a year of personal goal achievement and so for 2019 I want to get back to sharing my (limited) knowledge and experience with others, to assist them in achieving their goals, both personally and professionally. So with that in mind I’d like to announce a few changes that will happen on this blog and my podcast, and a few other additions I’m making that will hopefully help support my efforts.
The Jonathan Bossenger Patreon
I have retooled and relaunched my Patreon page. The goal of this page is to give those of you who read my blog, listen to my podcast, or generally follow me online, the ability to help fund my work. I get a lot of folks asking questions in the comments area of my blog posts, and I’d like to be able to spend more time in helping them solve the problems they present. The Patreon is the perfect place to do this.
If you’d like to be able to get a little more out of me, from answering your questions to helping you solve your WordPress or web development problems, or you want me to write about specific experiences or topics, or even interview specific people on the podcast, the Patreon is the perfect way to have your voice heard. For a small monthly fee you can help me bring you the kind of content you are looking for.
At the bottom of every blog post there is a ‘subscribe to my mailing list’ form. If I’m honest I’ve not really used my mailing list to it’s full effect. I intend to do so moving forward. I promise I won’t bombard you with rubbish, but I will select a few useful topics or articles, from either my blog or the web, that I think you will find useful, to send to you, no more than twice a month.
I will also use this mailing lists to announce any new exciting things I am doing.
You may have noticed that I have been blogging a lot more the past few months. This is because I’ve recently started working with a copywriter, who is helping me get my content out there. While I will still use this blog to share my personal experiences, it is my hope that with the assistance of the copywriter I will produce more useful and relevant content to my readers.
WP HackerCast – Season 2
If you were a regular listener to the podcast, you will have noticed things went very quiet after episode 18. This was mostly due to not really having enough time to find guests and prepare podcasts. For 2019, and with the help of my Patreon, I hope to relaunch the podcast with more interesting guests and interviews.
It’s amazing how stories mutate. What started as a simple ‘this is my setup’ post, then turned into a ‘what a day in my life looks like’. This morning I woke up and realised it might be more interesting, and less braggy, to look at how, and why, my workstation has evolved in the last two years, since I moved from office worker to freelancer.
A long, long time ago…
First, a little background. In 2011 I moved from being employed to being a combination of self employed (in the business my wife and I run together) and contract worker (at a local web development agency called Reamdigital). This meant I was working half the time from on office and half the time from home. This lead to me purchasing my first ‘developer’ laptop, a 17 inch Dell Vostro with a Core i5 processer, nVidia graphics, 16GB of RAM (manually upgraded) and a 750 GB hard drive. About a year later I upgraded the hard drive to a 500GB SSD and put the 750 GB drive into an external housing, but that laptop lasted me for a good 5 years in that configuration.
This laptop replaced my then current desktop computer, which I had custom built in 2010, while I was still employed at a company. Using my bonus that year I built a mid range gaming computer. The original specs aren’t important, but by the time I purchased the laptop it had the original AMD Phenom II 945 processor, 8GB of RAM, a 128GB SSD boot drive, a Radeon GPU, and a 1TB Hard drive for storage. My monitor was a 23 inch Samsung Syncmaster, which my wife had kindly purchased for me as a birthday present the previous year.
Other peripherals I had purchased for the computer over time included a Logitech gaming mouse, a Logitech 2.1 surround sound set and a Logitech gaming headset. Some years before my wife got me (another present) a Microsoft ergonomic keyboard, after my previous one died.
As this computer was originally built as a gaming rig, when I purchased the Dell laptop I turned this into a media streaming centre, and played the odd game on it in my lounge. Much fun was had with my oldest when I re-discovered the MAME emulator, and we had hours of joy playing the Teenage Mutant Ninja Turtles arcade game together.
The ‘dad-station’ days
So, fast forward to January 2016 and I’m 100% freelance/self employed and working from home with a 1 year old at home all day and a 4 year old at home for the afternoon. Part of the reason I left the agency was to be able to spend more time with my boys, so I had a bright idea.
Scouring the local online classifieds, I found a second hand (this will become a recurring theme in this story) computer stand and set the laptop and monitor up in what I affectionately called ‘the dad-station’. This allowed me to work in the house seated or standing. The standing option was so that I could strap the 1 year old onto my chest and work while he sleeps, or just keep him busy while my wife tries to get some work done, or just take a break for sitting down all the time.
In the picture you can also see the Microsoft keyboard, Logitech gaming headset and mouse, and the R2D2 bobble head I received from the Reamdigital for my last birthday there.
It was during this time that the first of a few incremental changes happened to my work setup.
Firstly, having never previously worked on the Microsoft keyboard for a full day, I discovered that the so called ergonomic keyboard I had was causing a repetitive strain injury. For whatever reason, the way I use my right little finger on the shift key on the keyboard was leading to the top joint of the finger being slowly bent to the right over time and causing pain. To this day that top section of the finger is not straight when compared to the other hand.
While I was at Realmdigital someone suggested I look into the Logitech Marathon mouse, which I had done, and discovered it’s not only amazing battery life, but the fact that it uses the Logitech unifying software to connect, meaning you only need one USB dongle to connect multiple devices. When the keyboard starting giving me issues I went searching for a Logitech keyboard that was similar to a laptop keyboard (as I’d never experienced the problem when working on my laptop keyboard) and found a keyboard that was very similar, and also used the unifying software, so I purchased the wireless keyboard and mouse to replace my current gaming set.
Side note, the person I sold the mouse and keyboard to, a friend I know through jiu-jitsu, recently let me know that he is still using them, so I’m glad they found a new home.
At more or less the same time I purchased a second hand 27 inch monitor to replace the 23 inch, and moved from the house into our home office space. I also purchased a Gigabyte laptop stand so that I could have the bottom of the laptop screen at roughly the same height as the bottom of the monitor.
Towards the end of 2017 the Vostro laptop was in need of an upgrade, having served me well for 5 years. I opted for another Dell laptop, this time a Core i7 Dell Inspiron gaming laptop, RAM upgraded to 16GB, and a nVidia GeForce GTX 960M graphics card. It came with a 128GB M.2 SSD and I took the 500 GB SSD from the Vostro and installed it into the Inspiron, dual booting Ubuntu on the 500 GB drive and Windows on the 128 GB. I had a 320 GB notebook drive spare, which I installed in the Vostro and sold second hand to help pay for the Inspiron.
Unfortunately, as the year progressed, and as my workload and stress levels increased, it became obvious that working at home wasn’t productive or beneficial to anyone. My sons, as much as I love them, don’t understand either what a closed door means, or ‘the headphone rule’, and the constant interruptions caused me to start looking for an office space within a few kilometres radius.
In September 2017 I moved into my current office. Here is the original Instagram post I shared when I started in the new space.
What you can see in this image is the 27 inch monitor, the Inspiron laptop on the Gigabyte stand, the wireless mouse and keyboard, and the original gaming headset. As you can see R2D2 moved with me. The desk is a 6 seat dining table that was already in the office and the chair is an AllOffice contract office chair I used at home.
This is what my work space looks like now.
As you can see, quite a bit has changed.
Making the perfect space.
I replaced the dining room table with a second hand adjustable desk that I’ve made slightly higher then a standard office desk, to suit my size. I purchased an AllOffice Accent, which is a cost effective ergonomic office chair. I have definitely noticed the difference in purchasing an ergonomic office chair.
Next to my desk I have a small bar fridge and various coffee making paraphernalia, including a pour over coffee maker for when I want good coffee and a jar of Jacobs for when I just want OK coffee.
I upgraded the custom built workstation, to be powered by an MSI x470 gaming motherboard, 6 core AMD Ryzen 5 2600x, 16GB of DDR4 RAM and a Zotac Geforce GTX 1060. OS is taken care of by two 128 GB SSD hard drives dual booting Ubuntu and Windows, with the original 1 TB hard drive and a new one purchase for storage for each OS. This handles every thing I throw at it, including some down time gaming between work sessions.
My peripherals now include a new Dell 27 inch LED, the 7 year old Samsung 23 inch Syncmaster and a Philips 24 inch monitor I picked up second hand recently. My wife is currently using the other 27 inch monitor, as I found the frame around it to be too big when I wanted to add additional monitors. The side monitor stands are a combination of phone books and Dos 6.2, Windows 3.1, and Office manuals I found in the office when I moved in.
You’ll see my R2D2 bobble head stayed, and he’s joined by the Lego Mini-Me I got from WordCamp Cape Town 2017. Next to that is the travel mug we all got as swag from WordCamp Cape Town 2018.
The wireless mouse, keyboard and headset are all the same, and I dug out my Logitech 2.1 surround sound set. I was actually pretty happy to be able to use my speaker set again, as it’s been sitting in a cupboard for almost 7 years now, since the days of the ‘dad-station’. Because I switched from a laptop to a workstation, I had to purchase a separate webcam which, if you’ve not already noticed the trend, is a Logitech one.
Finally I also purchased a Samson mic for meetings and podcast recordings.
I had previously purchased a Griffin stand to replace the Gigabyte one after I moved into the new office, mostly to allow for more space. I keep it around for when I need to use my laptop at the office (mostly to copy something I’ve forgotten to sync to the cloud). In this picture it’s on my desk, but I usually pack it away when I’m not using it.
My main OS is currently Ubuntu 18.04 LTS, and I generally stick to the LTS version unless something cool is coming out on a newer version. The Windows 10 install is mostly for gaming (those games that don’t work via Steam on Linux) or if I need to test something in a true Windows environment.
I still use the Inspiron laptop, mainly when I’m travelling, either for meetings or conferences, or working from home. I took the 128GB SSD out of the laptop for the workstation and installed Ubuntu on the 500 GB SSD as the main OS. At the moment I am considering selling this laptop and replacing it with something lighter, slightly less powerful but with better battery life, as I still do some development on it, but not as much as I before, and definitely not enough to warrant such a powerful laptop.
The office is 5 minutes drive away from home and my morning commute takes me directly past a Vida, Xpresso and Seattle, so I can mix up my morning coffee flavours.
The office has a wall size street map of the Cape Peninsula, which is a talking point whenever I have video calls with folks from outside Cape Town and provides fun conversations when my 6 year old comes to visit.
There’s also a spare chair, if I ever have physical meetings, or the 6 year old is visiting. I like to keep the rest of the office as tidy as possible, but at the time of this photo there were a few boxes of stuff left over from WordCamp.
One advantage of my office is that because it’s actually at the back of my father-in-law’s home office, I get to enjoy the pool whenever the Cape Town weather gets too hot. This is helpful as the office itself has no air conditioning.
It also means that if my children want to visit the grandparents for a swim, all I have to do is make sure I have my costume and towel, and I can join them for some water fun.
And in case you’re wondering, all that is in the bar fridge is some long-life milk for coffee, and a few bottles of water. I leave the beers at home, to be enjoyed on my couch with my family, after a long day 😉
As it stands, I probably won’t make any changes to this setup any time soon. As previously mentioned, I might replace my laptop, but there’s no real need to yet. I will probably only start looking at upgrading the computer hardware in about 5 years.
During that time, the only hardware I might consider upgrading or replacing is my headset, to a wireless option, and possibly replacing the second hand monitors with newer Dell ones. I really like the minimalist build of the Dell monitors, but at around R3000 a piece for new 24 inch models, there’s no real desire to do so.
If I do spend money on the office space in the near future, it will probably be on air conditioning. Currently it can get quite hot in the summer and quite cold in the winter, and comfort is more of a current priority than computing power.
I learned a valuable lesson yesterday, if your workshop prep requires a lot of involved setup, you might want to reconsider your workshop.
Anyway, for those who want to try and replicate the workshop process at home, here are my slides and the workshop notes I used. You should also be able to followed the numbered branches on each of the GitHub repositories.