NINJAS!

Mike,on the topic of  Fun
03.05.2010   |   0comment

Ninja

A friend tipped us off that Abduzeedo had a Friday post on the Awesomeness of Ninjas, mentioning the article probably deserved a spot on the dojo blog. I couldn’t agree more.

From the day I interviewed at Code Greene, Mark (the head sensei here), explained that he was assembling a team of ninjas to do his bidding. Our business has borrowed Japanese philosophy in a number of areas; namely, The Toyota Way, kaizen, and eliminating muda as it applies to workflow and personal improvement. We have 3 actual ninja swords in the office, and we once killed a guy. Well, that’s not entirely true, I can’t actually vouch for the authenticity of the swords.

Anyways, all I really wanted to say is that ninjas are awesome. Go check out the post and relish in their glory.


Sharpening the Blades: Styling Forms, Problem with Passwords and HTML5 in IE9

03.05.2010   |   0comment

This edition of Sharpening the Blades features an article from Mike about using jQuery, CSS and image sprites to create stylish forms, an article from Benjam about Passwords on the web and Mark chimes in with an article about the possibility of HTML5 in Internet Explorer 9.

Mike, Get your form on with Uniformuniform
We’ve all been there. You finish an amazing design using some sweet custom form elements that perfectly match the theme of your design. Then after a few frustrating attempts, you realize that some form elements just can’t be styled. Or if they can, not consistently. So you throw on a border, maybe a background image, and hope for the best as dreams of your custom UI vanish into nothingness. But fear not! Using the clever jQuery script Uniform and some CSS sprites, your form designs can once more be glorious! Works beautifully in all major browsers (degrades gracefully in IE6).

Benjam, The Problem with Passwordspasswords
Being in the Web Development industry for a while now, and having had a few third-party scripts that were on my site hacked, I have become more and more interested in web security.  Passwords are on the front lines to that.  Being a user of Web technologies, I’m also interested in usability and choice, and when it comes to showing or hiding passwords (what? you can do that?) I’m in the boat of give the user the choice.  This article nicely explains a few examples that offer people the choice to show or hide their passwords, both of which are very useful.

Mark, Microsoft to Double Down on HTML5 in Internet Explorer 9internetexplorer
Doubling down seems like the wrong approach to me. If I were the CEO at Microsoft I would instead of thinking of trying to put their foot down harder, they should instead learn to bend in the winds of the market and work on compliance with the other browsers. Though I hate to say it even forced upgrades like Firefox does would be good, to keep people current and reduce the amount of cross browsers compatibility problems Microsoft gives developers. I don’t think Microsoft realizes that by making developers lives bad by trying to be different they are actually building up a mass market of developers who hate them because it is so difficult to make cross compatibility easy and affordable.


Why is coding so personal?

Benjam,on the topic of  JavaScript, PHP, Tools, Usability
02.25.2010   |   5comment

Why is coding so personal?
I’ve been noticing that often times, when getting or giving feedback on code, or browsing my favorite programming forum, or just reading posts about programming, that people often get very emotional about their code. I was wondering why this is, and because I am not a psychologist, I’ll just give you my thoughts.

Coding to me is like creating art, and there’s a great quote that backs me up on this:

Programming is an art form that fights back. —Unknown

Because code is like art, I get very attached to my code, as well as my style of coding. My code is like my baby, my something from nothing that wouldn’t be there if it weren’t for me. It’s just a bunch of characters on the screen that, from somewhere in the blue smoke, creates a function, or a game, or a website. I have received criticism on my code (as everyone has), as well as given criticism on other’s code (as everyone has), and those times when I’ve received criticism on my code, depending on how it was delivered, or what was said, it was almost like a personal attack on me. And I’ve noticed a few other coders react the same way to criticisms on their code. It’s like the person who called your code ugly or inelegant was saying that your child was ugly (and those of you who have kids know… that’s a huge no-no, punishable by any means available).

It may be because I think that my coding style is the best, it’s what I’m used to, and it’s the format I use because it’s the easiest for me to get at the information I need as fast as possible. I know this because I’ve tried other styles (sometimes flipping back and forth in the same day), and looking at someone else’s code that uses a different style from me, is often times hard to peruse easily. It’s what I like, and sometimes I have to hold myself back from reformatting code I come across into my own style.

So maybe we should stop thinking of code and coding styles as being “right” or “wrong”, and think of them more like the tool that they are, a means to an end. And the way you react to someone else’s means should be a little more like a suggestion for a different method of painting. Not a matter of fact, but just another tool for the tool box.

To continue the art analogy, it’s like everybody is given all the art supplies in the world, and told to make/paint/draw/create a box. Everyone will come up with a different way of doing it, some will be huge and bright red; others will be small and drawn in pencil; others still might be made of clay or brick. No matter what, it’s the way you chose to do it, and it’s no better or worse than the person’s next to you. You might think so because yours was faster, fancier, more elegant, or more “boxy”; but they might think the opposite. In the end, you still have a box, and so do they.


Sharpening the Blades: Tricking out WordPress, Designers who can’t code and Content Management

02.19.2010   |   0comment

This weeks edition features an article about customizing WordPress for beginners, designers who can’t code their own designs and the best way to handle content management systems for sites that matter.

Chad, The Beginner’s Guide to Tricking Out Your WordPress Blogtrickingoutwordpress
I liked this post/entry about WP because it was built and geared for the beginner. Once you installed it now what. I find these type of articles interesting because sometimes they are just so simple that I don’t even think of them. And it helps me to explain or think of other things that I feel our clients may want or need.

Mike, Web Designer’s Who Can’t Codedesignerswhocantcode
Twitter exploded in a debate this week when Elliot Jay Stocks boldly tweeted:

“Honestly, I’m shocked that in 2010 I’m still coming across ‘web designers’ who can’t code their own designs. No excuse.”

The world is full of talented designers trained in a wide array of media, but just like other mediums, the web offers its own constraints and limitations. Knowing how to code definitely gives you an edge, even if you don’t code the site yourself. Image resolution, measurements, typography, and browser discrepancies all play a role in what is possible, and help determine the collective best practices of the web. So does a good architect need to know how to dry wall? Maybe not. What about a fundamental understanding of construction and engineering? Absolutely. How much does a good web designer need to know about their craft in order to build a successful website? What do you think?

Mac, Content Management for Sites that Mattercontentmanagementforsitesthatmatter
I liked this article because it gets right at the core of the cost/benefit trade-off that many people don’t think enough about when building their web site. Either there’s a significant value to the work you’re doing on your site, which justifies spending some money on it and getting it done right, or there isn’t a significant value to your site, so why bother? I don’t 100% agree with them about the WYSIWIG comments, but I’ve never tried to tell a client to assume it would look identical in TinyMCE and on the public site. We’ve generally had to train them to be very careful to keep it simple. Use bold if you want, make some lists, paragraphs, links, and stuff like that, but don’t try and do anything funky or you’ll end up disappointed. Another annoying thing about TinyMCE is that even when you tweak the HTML manually in their HTML view, it often wants to “automatically fix” some of the things you did. I was trying to leave a <br /> or two between a couple of separate lists if I remember right, and it kept either taking it completely out, or turning into a paragraph, constantly leaving too much or too little whitespace, even though the HTML I manually entered would display exactly how I intended.


Just be a little more patient with your clients

Tim,on the topic of  Browsers, Business, Web Development
02.12.2010   |   0comment

ConfusedLately I have been thinking about all the wonderful clients I have had a chance to work with. Each one has characteristics and qualities that make them unique and fun to work with. However, clients never cease to amaze me with their downright silliness and ignorance.

My favorite conversations with clients are the ones where we discuss browsers and the difference between them. I chuckle every time I hear, “I am using IE6.” I frequently applaud the client who uses Firefox because they have taken the time to educate themselves and while I don’t want to get into the reasons we use the browsers we do, just noticing what browser you use is half the battle. You’ve probably read the post by a Google employee about browsers. If not you can read it here. His post got me thinking about comparing clients to cars.

For those of us in the web industry, we frequently laugh at people who just don’t know how to use the web, but how many people are laughing at us because we don’t know how to do something? You might argue “But we (society) spends so much time online, how can someone not know how to use it?” I would argue the following.

How much time do we spend in our cars? Obviously this number depends on your commute, area, etc., but we spend a substantial amount of time in, caring for, washing, and feeding them that we should probably know more about how they work. How many mechanics laugh at us because we can’t change our own oil or replace our brakes? How many AAA repair men does society employ because society doesn’t know how to change a flat tire?

How much time do we spend in our house, but don’t know how to lay carpet or do any sort of plumbing? How many of us know what kind of carpet we have? What is the brandname of your couch? What kind of pipes do you have? These questions are simple for those who are educated and experts in that industry. Compare that to browsers or websites. How many plumbers laugh at you and I because we have weak pipes? How many painters cringe when they see the paint we have? We might say, “But it works just fine!” True, however, IE7 “works just fine” but how many of us cringe when we hear our clients are using it?

How many times has a client come to you saying their site is broken, only to find out it is a user error? It’s natural to sit back and just laugh, but how many of us have made a user error when we “pushed” instead of “pulled” on the door at a restaurant?

When it comes down to it, we are no different from our clients. We may know more about the web, browsers, computers, etc., but they may know more about neurology, public relations, and even cars. We make the same mistakes, just in a different aspect of life, so please, just be a little more patient with your clients.


Sharpening the Blades: Custom WordPress Dashboard, Wireframing and Communication

02.05.2010   |   0comment

Tim, 10 WordPress Dashboard Hackscatswhocode
This is a nice article that shows you how to get a customized WordPress dashboard. The article calls them hacks, but I would call them customizations. One that I have tried and loved is adding your logo on the dashboard page next your blog title in the top left hand corner of the dashboard. It’s a nice little touch that goes a long way.

MikeHow Wireframing Makes Your Website Designs Betterbriancray
The value of wireframing comes down to a simple idea: Wireframing forces you to think about your user interface design decisions in terms of user needs first, instead of in terms of what looks good.” While wireframing requires a little extra effort in the initial planning stages, it pays huge returns in the long run. We redesign less frequently, hit deadlines sooner, and best of all, greatly mitigate scope creep. So take your foot off the pedal, assess your client’s business objectives and user needs, and translate concepts into a tangible wireframe. You’ll be glad you did.

LukeFor Better Productivity, Communicate Lesscommunicateless
I agree with Joel Spolsky in one of Lifehackers latest posts when he says that adding more people to a project will only slow it down. I think this is especially true in web development. Once deep into a big project a web developer knows where things are and how they are related. If you throw five of them at the same project at some point they would end up stepping on each others toes. There is a chance that if things are planned out right each developer could tackle a specific task and then they could put all their pieces together to make the final piece. To do that though a lot of planning and meeting together would have to happen. This will probably lead to more disagreements and toe stepping. For those reasons I think getting the few people needed on the project and keep them there is the best way to accomplish a web dev project.


Sharpening the Blades: Document Ready, Admins and Automagic in CakePHP

01.19.2010   |   0comment

This edition of Sharpening the Blades features articles about creating admin sections with CakePHP,  how $(document).ready( ) can slow down your site, and the wonderful things CakePHP can do “automagically.” Hopefully these articles will help you sharpen your coding blades.

Chad, Creating an Admin Section with CakePHPcakephp-admin
I have come across James blog just recently (about 2 months). The guys blog is great. He does so much with CakePHP that it is great to see what he is doing and what he can do. But the reason I suggest this specific post is because it seems to be the first stumbling block that every developer comes across while using CakePHP. This article specifically will explain how to get an Admin section set up and working. I consider this one of the must needed to know things to develop correctly in CakePHP.

Benjam, Don’t let Document Ready slow you downdocument-ready
Everybody wants to have a faster loading website, and I am certainly guilty of putting every DOM related jQuery snippet into the $(document).ready( ) function.  This post showed me that this wasn’t absolutely necessary and gives good examples of when and how to break out of the document ready mentality.

Mac, The Dark Side of CakePHP’s Automagicautomagic-cakephp
I’m not sure I like the title of this article so much as I like the article itself, but it does point out some useful information about the “automagic” things that CakePHP does for you. Some of the things they discuss are definitely features that were designed very wisely, even though the article seems to disagree with me on that. There are definitely some automagic things in Cake that they mention that drive me crazy too though, and I don’t really see the necessity for the seemingly poor decision made by Cake’s developers. My biggest peeve they mention are the behavior it has (or had, this may have been fixed/changed now) for many-to-many relationships (a.k.a. HABTM). It is really a pain in the neck when your relationship table has other data in it, like the date/time when the relationship was added, or by whom, or a quantity, etc.


Redirecting to parent or child pages in WordPress

Benjam,on the topic of  Usability, WordPress
01.12.2010   |   4comment

A few of our projects here at Code Greene required the use of WordPress, and those projects had situations that I have since encountered in a site I built in WordPress for someone in my family. That situation was trying to redirect to a parent or child page when a certain page was clicked on.

I know that may seem a bit confusing, but let me give an example. Say I have an “About” page, and that “About” page has three child pages; “Who I Am”, “What I Do”, and “Why I Do It”. Now let’s also say that my “About” page doesn’t have any actual content, it’s just a container for the other three pages, and I just want to redirect my visitors to the “About | Who I Am” page without ever hitting the “About” page. Well, here’s how I do that.

First we need a page template that we can use for the “About” page that will do all the magic for us:

In a new file in your theme folder called redirect_down.php (you can really call it anything you want, this is what I used), put the following:


<?php

/*
Template Name: Redirect Down
*/

// grab the direct children pages of this page
// (both child_of and parent are needed)
$sub_pages = get_pages(array('child_of' => $post->ID, 'parent' => $post->ID, 'sort_column' => 'menu_order', 'number' => 1));

$URI = get_permalink($sub_pages[0]->ID);

// redirect the user down one level in the tree
header('Location: '.$URI);

How this works is it finds the first child of the page you are on, grabs the URI for it, and redirects you to that page.

Now when I create my “About” page (the one with no content), I set my page template to “Redirect Down” in the template drop down, and voilà, when a visitor clicks on the “About” link, they automatically get redirected to the “About | Who I Am” page, no questions asked. If I had pages under the “Who I Am” page, and it was just a container for those, I could also set my template for the “Who I Am” page to “Redirect Down”, and when my visitor clicked the “About” link, it would redirect to the “Who I Am” page, which would then redirect to the first child page.

To complete the collection… in one of the projects I worked on recently, we had a situation where if a child page link was clicked, we needed to redirect up the tree to the parent page. This is basically the same thing, just the other direction, but also a bit easier to code. Here is how it is achieved:

In a new file in your theme folder called redirect_up.php (again, you can call it anything you want, this is just what I used), put the following:


<?php

/*
Template Name: Redirect Up
*/

// redirect the user up one level in the tree
$URI = rtrim($_SERVER['REQUEST_URI'], ' /');

$URI = substr($URI, 0, strrpos($URI, '/') + 1);

if ( ! in_array($URI, array('', '/'))) {
	header('Location: '.$URI);
}

The way this works, is it grabs the URI given, and simply removes the last directory from the URI. (You could also find the parent ID from the $post data and use that to find the permalink, much like the previous template, but this works for what I needed it to do.) If you have your permalinks set up properly, this should work beautifully. And again, with this one, you can set it on as many pages as you want, redirecting all the way up the tree if you wish.

Hope this helps someone. Let me know if it helped you in the comments below.


Kaizen in 2010: Stock Cliches, HTML5 Forms, & Web Advertising

Tim,on the topic of  Fun, Web Development
01.05.2010   |   3comment

One of the main focuses of our philosophy at Code Greene centers around the Japanese philosophy of continuous improvement known as “kaizen”. The web offers tremendous opportunities to learn from our peers, and sharing articles with each other has really helped us keep our blades sharp. Here are a few of the best articles we’ve read recently, submitted by members of our team:

Luke, Stop Using Stock Photography Clichés

stockI liked this article because I could really relate to the author. I am super sick of stupid stock photography. This type of stock photography has become meaningless to the user. Especially if the user has seen the same photo in other places before. As users, we are so used to seeing two business people shaking hands that we overlook it immediately, without giving it a second thought. Useless.

Mike, A Form of Madness

formForm design is awesomeness, but coding them? Not always the case. Luckily, there’s good news for form coders the world over with HTML5 on the brink of greater support. This article comes from an up-and-coming book all about HTML5. The author introduces some cool new tags and attributes that we can start using right now, including: placeholder text, autofocus fields, spinboxes, sliders, date pickers, and more! Exciting stuff.

Tim, On Web Advertising

adThis is something I have been very curious about lately, so to find this was a refreshing way to start out the week. It was nice to get Chris’s perspective about online advertising and I know he knows about it because all his work uses it.

What have you been reading recently?


Updated GeekTool Weather Images

Luke,on the topic of  Uncategorized
12.22.2009   |   1comment

The code in an older post that talks about GeekTool calls the weather images to your desktop through Yahoo. They recently changed the location of these images so the GeekTool code no longer works. If you take the url at the beginning of your GeekTool script and paste it into a browser it will redirect you to the new url. Take that one and paste it back into GeekTool and it will be working again.

http://weather.yahoo.com/forecast/USUT0078.html
changes to
http://weather.yahoo.com/united-states/utah/farmington-2402466/

Sorry took so long to get this posted.