Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 194 of 427

Showing Poor Source Code

The act of showing poor source code either via our blogs or our open repositories can be a scary thing. I mean, we’re putting out for others to read and critique that we’ve worked hard to complete.

Sometimes we do it thinking that we’re on the right track; sometimes we do it when we’re asking for it.

Writing

In the latter case, I’d say that it’s not so scary – we’re asking for critique. In the former, isn’t it a bit more challenging when we get that criticism?

That is, isn’t it harder to deal with the criticism that comes on to something we thought we were doing right?

Of course. Does that mean we should stop sharing our code? No way.

Continue reading

Tips For Daily Blogging (And How To Garner Blog Post Ideas)

Like anyone who blogs are regular intervals, be it a few times a week to daily, I’m asked how I write daily. In short, I wish I had a simple recipe to explain how to do it.

But I think this is something unique to every person.

Sure, I think people should write daily even if they aren’t publishing their content on a blog. I believe something happens when you articulate your thoughts via the written word.

  • You become better at thinking through some of your own opinions.
  • You get better at presenting ideas to other people even if they will result in a debate.
  • You reason through your own convictions for why you feel the way you do about a given topic.

Sure, this sounds a little silly when talking about writing about development. It’s not, though.

Our field is one that’s built on the idea of logic and having things work in a logical and efficient manner. It’s important to make sure that our reasons for why we do the things we do have been reasons through, as well.

But I’ll talk more on that in a moment.

Instead, back to the original question: How does one get into the habit of daily blogging?

Continue reading

Using Third-Party Code Is Not Immature

One aspect of growing in a career in development is knowing when to write your own code and when to use the work of others.

So many libraries available via others work.

So many libraries available via others work.

This isn’t a hard and fast rule, but when we start out it’s like we want to roll everything on our own. I don’t know if it’s because we want to prove to our employer, our clients, or ourselves we can do it. Maybe it’s a mix of the two or maybe we just welcome the challenge.

Maybe it’s all the above.

Whatever the case, we’ll eventually work on larger projects and eventually become more specialized. That is, we’ll identify what we need to write and where we can use an existing library.

Continue reading

Quick Tip: An Alternative To file_get_contents

One of the more common PHP functions developers use in order to make remote requests is file_get_contents. The function makes it easy to send requests to another URL and then handle the response.

It’s especially handy if you need to make an Ajax request to another site but aren’t allowed to do so from the client-side because of cross-site-scripting.

That said, cURL is often a better option than file_get_contents because it gives you far more control over the options that are set when setting up the request to be made. file_get_contents simply doesn’t do that. Instead, it provides enough options for making simple GET requests.

No, not that kind of curl.

No, not that kind of curl.

For these reasons, it’s often a good idea to use cURL when you need to provide a more fine-tuned request. Even more so, it’s helpful to have all of the functionality wrapped up in a utility function you can drop in your project whenever you need it.

Continue reading

The Grid Ruler Chrome Extension

If you work in web development long enough, odds are you’re going to discover your strength lies within writing code or designing a site. It’s possible to be good at both – I’ve seen it in rare cases – but it’s more common for someone to be strong in one area or the other.

As easy as frameworks like Bootstrap, Foundation, 960gs, and so on have made it for us to build layouts against a grid, it has not – thankfully – removed the need for designers (of course, that was never their intent, anyway).

The reason I bring this up is because years ago, a good friend of a mine – a designer, to be clear – would jokingly say I was pixel approximate.

And he wasn’t wrong.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑