Blog Category: micro

Want to Learn Something? Teach it.

After walking an employee through the basics of HTML today, I realized how much I actually learned by teaching her. It made me go back to the basics, do some research, and find out a few new things that I never knew. Teaching someone the basics actually made me learn more. I think this is a valuable lesson that anyone can apply to a new “thing” they want to learn how to do. It’s a simple theory - if you need to teach someone how to do something, you better know what the hell you are talking about. So you do your research. And you learn more than you knew before.

I was originally thinking that teaching someone HTML code would be similar to how I gave golf lessons in the past. Being a golf instructor, I have given lots of lessons in my lifetime - but it’s tough to compare the way you teach a golf swing to the way you code a website. The way you theorize code and way you can show someone how to swing a golf club are entirely different. It took me a while to wrap my head around programming. It’s an abstract art that requires you to assimilate code to physical things in your head. At the very least, it requires you to associate code with something you already know about. Whatever that is, it needs to work for you. Everyone learns and thinks differently. The beauty of programming is the same application can be written millions of different ways. Not everyone will program something the same way, but the result can always look similar.

So next time you want to learn how to do something - give a presentation on it. Teach it one-on-one. Write an article on it. This will give you the motivation to do your research and start learning.

Google Buys Nest - What Next?

My twitter stream this evening was filled with tweets about the recent purchase of Nest by Google. Google paid an obscene amount of 3.2 billion for the company who makes the most awesome home thermostat ever. Within the past year, Nest also released a new fire alarm that is pretty bad-ass.

But now that the tech giant owns all kinds of data about what kind of energy your house uses, everyone is up in arms! Like Google couldn’t have already gotten a hold of that data anyway? Google is a pretty benevolent company and I’d like to think that if they wanted to do something bad with the trillions of terabytes of data they already know about us, they would have. This is just another feather in their cap and another way they will continue to be a relevant company.

And regarding the Nest thermostat, I’m still surprised that Nest never charged you to use their app to sync with your Nest. It’s a product that is well worth the price and I know the servers required to maintain their app’s infrastructure aren’t cheap!

But looking to the future, I’m sure Google’s resources will give Nest a huge boost in R&D - which can only mean cooler products.

Building a Client Website That They Can Understand

I recently submitted a proposal to speak for a WordCamp and I thought I would start getting some thoughts out about my intended topic. This way, even if I don’t get picked, then my idea can still be brought to life.

My topic is covering how to use WordPress to create websites that are easy for your client to update. I build custom WordPress themes all day long. I also dabble in a few other CMS platforms too. My goal when building on these platforms is usually to make a website that the client can update with minimal training from me. Sometimes all goes as planned, sometimes the client has no idea how to update the website. Of course, this all depends on the client - but it usually boils down to how hard or easy it is to update the website. There can custom fields that are named inappropriately, “un-semantic” naming conventions for classes or shortcodes, and a bunch of other content related misnomers that I take for granted when building.

The point is, as a developer it’s easy to build something that is easy for ME to update, but a good developer must get into the mind of the client and build it for them.

I’ll keep exploring this issue in further posts.

Who Do You Blog For?

I recently read a nice little blog post from Matt Mullenweg. He talks about the intrinsic value of blogging and who you “ideally” should blog for. This struck home with me since I have recently made it a goal of mine to blog everyday this year. It’s been a tough goal, but after reading Matt’s post it made me realize that I don’t need to blog for anyone else but me. Or at least, me and the future me.

Its a healthy habit that helps with all kinds of skills - from simple things like grammar and usage to the art of putting down what’s in your head on paper. For some people it comes naturally. For others, not so much. So I’ll keep on writing until I think I’ve had enough.

Then I can keep writing some more :)

CSS: Select the Last Odd Child

How did I never see this before? In my need for random pieces of code throughout the day, I had this problem arise. I needed a responsive navigation pattern to format correctly when I had an odd number of links. I was using this “clean grid” pattern and I originally wrote that you need an even amount of links in order for this pattern to look good. Not anymore!

Thanks to the magic of CSS3, we can target two things at once: :nth-last-child(1) - then we combine it with :nth-child(odd) to target both a last child and an odd selector. Pretty slick, huh? So put it together and we get this: ul.nav li:nth-last-child(1):nth-child(odd) a

This let me target the last element ONLY if it were an odd number. If it wasn’t an odd number, then no harm no foul.

Here’s the reference I found with a bit more info:

Just Look at the Documentation

I typically build WordPress websites for clients. I’ve built tons of custom themes and modified WordPress to do LOTS of different things. You know what my best asset has been while building custom themes? The WordPress Codex. I also build in a lot of functionality with jQuery plugins - like Flexslider, OwlCarousel, and ImagesLoaded. And you know how I get those to work correctly? I look at their documentation.

Documentation is key when it comes to making things happen. Eventually you’re going to manipulate certain plugins or other people’s code for your own particular circumstance. And when this happens you’ll need to dive into their documentation (hopefully they have proper docs written!).

So unless you’re writing your own plugins, frameworks, and other fun features - then you’re probably using something that’s already been coded. So play it smart and look for code with proper documentation. You’ll get a better understanding of how that particular script works and that right there should allow you to manipulate it.

Are We All Becoming Devoid of Attention?

Attention Deficit Disorder. ADD. I’m pretty sure that over the last 5 years this term has now become a slang term that refers to anyone who can’t seem to focus on one thing at a time. Their attention moves quickly from one thing to the next. I personally know a few people that will stop mid-thought and start a new sentence about something completely different. Now, I’m not knocking this sort of thing - some people actually are diagnosed with ADD. Others may have just become this way because of the way our culture is shifting.

It’s not surprising that this is more a thing now than ever. We live in a world full of distractions. The internet being the biggest. It’s the internet that holds all of social media, email, websites, streaming music and streaming video. It’s also our connection to tons of other people. But in the end, it’s a good thing, right?

At any party I go to I always see half the room staring down at their phone. What did we ever do without smartphones? It’s a shame for kids these days - they are growing up in a world where it’s OK to look down at your phone during a conversation. They’ll grow up with a phone glued to their hand and never know a world without one.

The advent of the iPhone was probably the beginning of the end. No longer are phones used for actually calling people - they are more often used for apps and access to the internet. Facebook and other social media outlets have long realized this as they are seeing the most interaction to their platforms via mobile devices. People probably only use the actual Facebook website while they’re at work and supposed to be doing other things (see: distractions). Go to a party and look around for a minute, or a restaurant - how many people are looking down at their phone? How many people are engaged in conversation while also looking at their phone too? It’s crazy. Now I have nothing against smart phones - they’re pretty awesome. But they are also an awesome distraction.

My business partner always seems to use the phrase, “I’ll knock that out on the flight down”. He’s referring to doing work on his flight to and from destinations. It’s always made sense to me, but I never really thought why. Why does he want to write an article on a plane ride instead of doing it now? It’s because he has no distractions on a plane ride - there’s no internet access (at least there didn’t used to be), there’s no TV, there’s nowhere to go. It’s a completely distraction fee zone that allows someone to focus and get shit done. But that sort of thing is rare these days - unless you actually make time (and make a place) to be less distracted from all of the outside influences that are available to you, then you’re stuck in a world full of distraction. An airplane flight gives you no choice - you have to be disconnected.

So I guess I would love it if we were all a little more engaged and a little less distracted. I suppose this is how it used to be in the old days - but who can remember anything before the internet came around?

Longevity in Web Development

Today I had the pleasure of looking at some code that I had written about three years ago. A client needed a site updated and I decided that the code also needed to be updated. It’s not that the site didn’t work just fine - but there was just so much cool stuff I was able to add to it that I didn’t have (or know about) 3 years ago. I added some font icons, some fancy new CSS3 properties, and some new javascript for added functionality. I also had to refactor some of the PHP to make it a little cleaner and more efficient.

But all that updating had me wondering if there was a better way. Is there a better way to keep your code more maintainable and “future-proof”? My best guess would be that no - it’s impossible to write code that is completely future-proof because new things will always be evolving. It’s not to say that you can’t write the absolute best program right now and it won’t be useful at all in a few years. Because it totally should be. However there will definitely be something you can add or change within a few years. That’s just the nature of the beast.

So from now on I suppose I’ll try to write all my code as clean and as “future-proof” as I can make it - all while knowing that someday, I’ll be back to clean it up a bit more. Or add something shiny and new.

Day 1

This year I’m going to try and write a blog article a day. I’ve had the idea of introducing a micro-blog section to my website to post snippets, quick thoughts, and other random stuff. So after seeing the Pressgram 365 Challenge and how he’s asking everyone to try and post a photo a day in 2014, I thought I would give myself a personal challenge.

Having personal goals are great - and meeting them is even more great. It’s a healthy habit and we all could use more of those. This is also going to spur me along with my goal of building an app/web-app to post pictures directly to a statamic blog. I’m very pumped about that one.

2014 is going to be great. Let’s do this.