My colleague Tom has some excellent advice. He suggests that in applications, such as WordPress plugins or themes, you should always return data rather than returning strings of concatenated HTML. Instead the data should be passed to a separate function that will then echo the HTML. Take a look.
Thanks to how awesome my job is* I recently spent a few days in New York.
It was the first time I’d visited New York and although it was a short trip packed full of meetings I got to see some sights 🙂
- My first (I think) propeller plane flight.
- Seeing Untappd used in a bar was pretty cool, including my check-ins.
- Drinking Black Ops, a New York beer, in a New York bar. Damn that’s a nice beer.
- Seeing One World Trade Center and the 911 Memorial.
- Riding (and trying to figure out!) the New York Subway.
- Visiting the offices of CBS, Time Inc. (in the week they named Trump person of the year, no less!), News Corporation, New York Times, New York Observer, Interactive One. NYC is the media capital of the world, and experiencing the offices and (in some cases) the newsrooms of these global media companies was impressive.
- Checking out the amazing (giant) Christmas ‘decorations’ throughout New York.
- Eating some amazing food.
- Visiting the Rockerfeller Centre, Times Square, Wall Street and seeing (from a distance, in a taxi) the Statue of Liberty.
My plans to visit New York just over two years ago fell apart, but this short visit has made me want to return again. It’s on the (growing) list!
*you can join me.
When we’re told there isn’t money available for the most vulnerable, for our schools, for our hospitals, for our essential local services, spending £369m of *OUR* money to renovate the home of an unelected, unaccountable, obscenely wealthy family is not only an insult it’s an overt affront to the principle of equality that one family, by only their birth, should be given such fantastical special treatment over people who are in real, actual need.
Dear EU citizen,
Thanks for your interest in the UK as your home and place of work.
We have reviewed your application and unfortunately it appears that you were born on the wrong bit of the earth.
You see, we (‘humanity’) have, over the years, divided up the various bits of mud, grass, forests and mountains and declared it to be ours. An awful lot of effort has gone into making sure that our bits of land remain our bits of land, and we’ve also put a lot of effort into trying to get more bits of land.
As it happens, us Brits (that’s what we call people who happen to have been born on this bit of the earth we decided to call “Britain” and declare ours) used to claim quite a lot of the earth as ours. We don’t have as much now, so we’re a bit protective about what’s left.
Rather foolishly your parents decided to give birth to you on a bit of land that we hadn’t claimed was ours. So you can’t come to our bit of land. A short holiday would be fine, but you’ll have to go back. You can’t stay.
If you’d been born on our bit of land you’d be one of us, do it be fine. But you weren’t, so it’s not.
Please stay on your own bit of land.
A month ago I took a (relatively) short train ride into the beautiful Derbyshire countryside to spend a week coding in the middle of nowhere.
Part of a group of about 20, we descended on Darwin Lake near Matlock, a beautiful set of holiday cottages set around a lake and right next door to the Peak District National Park – one of Britain’s best destinations.
Being remote there was no mobile signal and the wifi was pretty terrible! But that didn’t matter – the course had been set up in such a way that an internet connection was more of a luxury and the disconnect allowed us to concentrate on learning and interacting with each other.
So what did I learn?
Building a React app was very different to developing for WordPress. We used NPM and Webpack to create a local development environment (sitting at localhost:3000) and we were writing entirely in JS/JSX and there was even an index.html file! Crazy times.
The API endpoints were just a WordPress plugin, and creating them was much like interacting with other WordPress APIs. I’d equate it to registering new post types, so very simple for a WordPress developer to get on with.
Having done the React class at last year’s Automattic Grand Meetup everything I learnt came flooding back, so that wasn’t a big challenge. Using ES6 was weird at first but I quickly came to enjoy it – and I really don’t enjoy JS dev usually 😉 The biggest challenge was probably understanding authentication with the API. While we only used one authentication method and had a helpful library to make it easy, there are some complicated concepts to get your head around and there were a lot of questions on that topic from the group.
Not only were they great teachers, I had a great time hanging out with them, the other Human Made crew and the other attendees. I’m lucky that because of my awesmazing job I already knew some of the HM folks (and met some I work with but hadn’t yet met in person!) which made socialising easier, but I also got along really well with my fellow students, and really enjoyed our various games and late night shenanigans 🙂
Finally, it wouldn’t be right to spend such a long time without an internet connection and not have something to show for it. So I present to you my very first solo-built standalone React app: howmuchhuel.com.
I’ve recently started using Huel* regularly and needed a quick way to measure the mixture on my phone, so I built this neat little app. The calculations are a bit scrappy, but it works. Contributions welcome.
*get £5 off with this link, because I love you.
Well, I already joined the Labour Party because of Corbyn, I might as well complete the set.
But also, as much as I despise Gove, Theresa May will be the absolutely worst option for Prime Minister. She has consistently attempted to undermine our fundamental human rights. She is capable, determined and commands the respect of her peers.
She may well succeed at pulling us out of the European Court of Human Rights and lumping us with both a “British Bill of Rights” and the “Snooper’s Charter”.
Gove on the other hand is in no position to be leading his party nor the country. Even he knows that! My word, the man actually said in his speech announcing his candidacy that he doesn’t want the job. Moron.
Clearly, if he became Prime Minister he’d fuck it up so spectacularly that the Tories would get ripped to pieces. If they didn’t rip themselves to pieces first…
That’s got to be a good thing to spend a few quid on.
So that is why I’m considering joining the Conservative Party to vote for Michael Gove. That, and I put a small bet on him for shits ‘n’ giggles.
Image credit: gove-pob by Little Pixel
Another interesting year.
Much of it, disappointingly (and to their detriment), was spent fighting yet again for my two children to be granted the relationship with me they deserve.
That costs money, so while I kept my job, my other plan – buying a house to give the three of us a more permanent home – didn’t get further than the mortgage offer I received.
Keeping my job was a much more achievable aim, and I did that with bells on. I’ve done so much in the last year, learnt an enormous amount, worked on projects that have made me super proud and built on my confidence.
My 32nd year? Spending more time with my magnificent little girl, building on our already blossoming relationship 🙂
Now I can spend some time on myself too. I’ll be focusing on my career for a bit – taking advantage of the huge opportunities I have.