git and the single dev

I’ve returned from (arguably) the last Magento Imagine and have almost recovered from my personal branch of the flu that seems to have been burning through the attendees. While hacking and spluttering and read Reilly Chase’s post on using git as a solo developer and thought it was a great idea for an article.

I think I started using git about 10 years ago (geez) and at the time was acting as solo dev on most of the projects I worked on. It seemed slightly useful, but honestly seemed like a lot of overhead for not much benefit. I already had my own system of local backups that I was quite comfortable with.

But, git was “how real developers worked” so I started to use it. I set up a remote server to use as my remote repo (didn’t use github at first) and had relatively few problems using it locally – but I was paranoid about running it on the live server. It seemed like one flubbed command could really mess up the site!

So, at the time I installed the repo outside of the web root on the live server, and manually copied changed files from there to where they needed to go. Obviously not the most efficient way to do things!

Eventually I moved on to managing a pretty large open source project on github, and quickly began to learn the value of git in the multi-developer context. And once I became a developer working with about a dozen other devs on projects that used an entirely git-based workflow, it was clear how critical a tool git is for multi-developer projects.

But, what about the single dev?

Beyond the obvious advantages of using git (branching/merging/etc) there’s a few others I’d like to highlight

  • Detecting changes on the live server – if site is running from the repo on the server, a single git status command will show you changed files or new untracked files. Very handy in cases where an attacker has gained access to the server!
  • Remembering what you did last – there may be big gaps of time between when I work on a client’s site – while waiting on feedback/payment/etc. A quick git log shows the recent commits. Or look at github/bitbucket to see what you were up to. This is also a great way to reconstruct work done on a site for billing purposes, if you forgot to log your hours :\

My strategy

I generally keep my workflow pretty simple. Almost all work is done locally in MAMP (I mostly work on LAMP stack sites), tracked within a single master branch. I use Bitbucket for my remote. I do occasionally create a branch if I’m messing around on something I think I may need to keep around longer term – best example was working on converting an older site to use PHP7.2 – while ongoing work was going on in PHP 5.6.

On some more complex projects, I have a staging server set up to allow the client to see changes before they go live. This is usually a cheap Lightsail instance. I set up the repo containing the site files there, and just do a quick git fetch when I want to see what updates will be applied, and git pull to bring them down.

The live server is set up the same way. I always do a fetch first to make sure I know exactly what’s going to be pulled on to the live site. No surprises!

I realize I could use hooks or something to have the live server automatically update when I push commits to master, but with my setup that doesn’t make much sense – I prefer to do this manually. And as I mentioned, running git status on the live server now and then gives me one more level of security check… I do have one project moving towards an architecture of multiple front end nodes, in which case I will have to change this model. In that case, I don’t want to have to login to each node to pull down the latest commits. A bridge to cross when I get to it!

My Completely Unnecessary Magento Imagine Guide

That’s right, I’ve decided to post my own guide to Magento Imagine. By my calculations, I will have been to half of the Imagine conferences this year. So, I suppose, I’m half of an expert! So half of what I say below is probably garbage 😃 I’ve also been to a few other Magento events over the years, all over the world.

The Tips

1st night party, 2018

I covered my packing tips below, these are intended to be helpful once you get there

  • Maps – the Wynn is huge, make sure you have a map – paper or digital – handy!
  • The Dry Run – If it’s your first time, or just in case – figure out the route and how long it takes you to get from your lodging to the conference area. No surprises when you’re in a rush!
  • WhatsApp Group – be sure to join the WhatsApp group for Imagine (contact me for details). It’s very handy for finding out the various other events that are happening before, during and after the conference. Twitter is also very popular – watch the Imagine hashtag! If you’re trying to find something to go to – just say something.
  • Side Events – there are tons of events going on beyond the main conference events. Keep an eye on twitter and Whatsapp, and ask around…
  • Food – while the drinks are free-flowing – the food can disappear quickly at the events! Obviously, this can cause problems… Be sure to chow down when you find food, especially at the parties each night. And drink lots of water. Don’t be like me.
  • Introvert? Don’t worry, the Magento community is incredibly welcoming. Don’t be starstruck, most of the Magento folks are very personable, as well as the Masters, sponsors, etc. Check below for list of conversation starts in case you’re like me and tend to blank out… and of course feel free to say hi if you see me staggering around the conference.
  • The Booze – there’s lots of it. Pace yourself and know your limits! Yes, great chance to try all sorts of things – enjoy but be careful!
  • Parasol Up – This is almost the unofficial gathering spot of Imagine, with the Wynn Tower Bar being a close second – and also B Bar. These are all quite close or inside of the main casino floor at the Wynn. If you’re bored and looking for Magento peeps, check it out!
  • Finding Food – As I mentioned, the food at the conference can disappear quickly. Lunch and dinners and generally great so no need to search for alternatives. Moreover, even costly restaurants can be pretty mediocre unless you have specific recommendations. Grand Lux Cafe across the street at the Venetian has decent food at decent prices – especially for breakfast. Its also a short walk away. There’s also a french restaurant in the Venetian called Bouchon that’s pretty good. La Cave and Jardin in Wynn/Encore are ok… The burger place across the street from the Wynn is also pretty popular – you’ll probably find some Magento folks there… You can get by with the free breakfast, lunch and dinner options on each conference day, so don’t feel like you need to spend a bunch for the crappy casino buffet, unless that’s your thing.
  • Water – Vegas is dry – make sure to bring chapstick, or grab some in the vendor hall. And grab those water bottles whenever you see them.
  • Your Badge is Your Life – don’t lose it, and don’t forget it! They’re serious when they say they won’t replace it… And you’ll need to be sure to have appropriate ID on you (driver’s license, or passport) for a lot of the events.
  • Badge colors/designs – the badges generally have different colors/borders to indicate “categories” of attendee – i.e. merchant, magento employee, etc. This can be helpful if you’re trying to find certain sorts of people.
  • Enter all the things – There are tons of giveaways, make sure to drop your business card in all of them! It’s worth the spam you may end up getting.
  • The Strip – The Wynn is at one end of the strip, with the Venetian next to it. If you want to go see the strip, do it at night – it’s both cooler (literally) and more scenic. Walking the strip always takes longer than you expect, things seem closer than they are because they’re so huge – and you’re always getting diverted into casinos, etc. You can’t just walk straight up and down the strip!
  • Off Strip – Go check out “old Vegas” i.e. Fremont Street. It’s worth the trip. You can get there cheaply by bus. No doubt groups from the conference will be heading there as well.
    Ellis Island casino and restaurant are closer to the Wynn for a taste of “old Vegas”. They brew their own beer and have decent deals on food. It’s a couple (long) blocks off the strip. It’s very smoky though, but not as smoky as Silver Sands a little further away. Go there if you are on the prowl for a cheap simple buffet.
  • Got a question? Ping me on twitter – @adwatson. If I can, I’ll help. Or introduce you to someone who knows more than me (plenty of options there!)
Straight pimpin’ with the always fabulous Fabian – and many other wonderful people!

Packing List

Here’s a few ideas of what to pack. Save lots of room in your luggage though. There will be lots of swag! Or, check out my cheap tip below if you have too much swag for your luggage space…

  • Sunscreen and Shades – you’ll certainly spend most of your time in the Wynn/Encore. But, the lunches are held outside, and the tables with shade fill up quickly! Bring sunscreen and shades, especially if like you know who, you don’t have the hair up top you once had.
  • Backpack – we’ll almost certainly get a free bag when we get our badges, and they’re usually pretty decent.
  • Phone chargers – have a way to recharge your phone, you’ll be draining that battery quick. Lots of vendors will have free chargers as swag in the vendor hall – some will even be pre-charged! Bring the relevant cables (USB -> whatever you need).
  • Less Shirts than you need – if you’re tight on space (and not picky on style), you can get by packing fewer shirts than you need – there will be tons of tee-shirts available as swag.
  • Business Cards – You will have many, many chances to hand these out!
  • Walking Shoes – everyone says this, and for good reason. Even if you’re staying at the Wynn, expect a 15-20 minute hike just to get to the conference area. Add more for when you get lost 🙂 And then you’ll spend a good chunk of the day wandering around the conference area… And then you’ll get lost again heading to your room…
  • Coffee? Despite the 5 stars (and the 5 star cost) the Wynn/Encore doesn’t have coffee makers in the rooms. So you’ll have to go down to the main floor to buy over-priced coffee every morning. Or get by until you can get to the free coffee at the conference.
  • Cheap “Luggage” – Here’s my cheap packing tip. If you end up with more swag than you have space for – there will be no shortage of cardboard boxes available in the vendor hall. Be sure to pack some packing tape and tape the heck out that thing. Depending on your travel plans – it may only need to survive one trip! We’ve successfully done this a few times.

Conversation Ideas

More of us are bad at this then you probably think. Maybe these will help? I tried to keep the list short to make them easier to remember.

  • Is this your first time at Imagine? What do you think?
  • What other events have you been to?
  • What do you do? What does your company do?
  • Where’s the best swag?
  • What time did you get in? When do you leave?
  • What else are you planning to do in Vegas?
Most important – have fun!