Client side element naming

December 3, 2012

Sometimes, I wonder if someone is playing a joke:

@using (Html.BeginForm("Update",
                            "Profile",
                            FormMethod.Post,
                            new { id = "MoreInfoText" }))

By which coding convention can it ever make sense to give a form an ID ending with “Text”? Javascript has no type safety either, so bad naming like this makes things even worse.

This echoes the mindset of some developers on my team perfectly:

From time to time there is a romantic notion of teams pulling crazy hours and working all-nighters frequently. The idea is that you can cheat the night (or morning, for that matter) and continue coding, writing, or doing whatever it is you that do. Sometimes this is driven by maniacal managers, but other times it comes from within.

In fact, every time I’ve come across some appalling code and mentioned it to the developer who wrote it, the standard reply seems to be “Oh yeah, I must’ve written that 3 in the morning!” as if it’s acceptable to continue working until that hour and churning out shit code which then comes back to haunt other members of the team.

As Rachel says, Don’t feed the stupid hour. It never ends well.

In the database, the ClosedFlag field can consist of “Y”, “N”, or “I”, which tells us whether an auction is open, closed, or in progress.  Unfortunately, this naming convention made it up through the data access layer and several service tiers, leaving us with the following:

public class Auction
{
    public bool ClosedFlag { get; set; }
}

Somewhere along the way, the purpose of this field got confused, and instead of being mapped to an enumerator or something sensible, it ended up as a badly named boolean property which is impossible to decipher.

I’m generally against this type of naming convention, and prefer the self-documenting style of IsSomething, so we could have IsOpen, IsClosed, etc.  In this specific scenario though, there are multiple states and an enum would be more appropriate.  The oddly named naming convention from the database should be restricted to the data access layer, where we’re already converting data to business objects (using AutoMapper), but it seems like it was ignored in this case.

Redundant Property

October 30, 2012

There’s some real incompetence on my current team. WTF would anyone add this code and check it in:

public class BizObject
{
    #region private fields
    private Boolean _liveBid;
    #endregion

    // More properties here...

	public bool LiveBid {
		get { return State == AuctionState.SaleActive; }
		set { _liveBid = value; } 
	}
}

Makes no fucking sense.

This developer added a new property to the class, with a setter that sets a private field which is never used. So setting the value doesn’t error, but the getter uses a completely different mechanism for determining what to return.

This could almost (but not quite) be forgiven if this screw up happened as part of the refactoring process, but both the new property and backing field were added in the same fucking checkin.

If the setter is irrelevant, remove it. Why there’s a need to leave redundant or shitty code sitting around is beyond me. Everything is source controlled.

Disaster waiting to happen.

Sales dude vs Web Guy

June 28, 2008

Saw this posted on Techcrunch, and it’s hilarious.

Sounds like a bit like a typical day in a web agency.

One of the incompetent account executives from one of our agency clients recently got pissed that we didn’t respond to their request to look into a problem on their client’s websites.  Part of their message in our project management system was:

“To service [client] and retain them as our loyal client I will need more prompt communications regarding timings up front.”

Hilarious. “To service [client] and retain them as our loyal client”. Clearly drinking too much of this company’s kool-aid. He must be screwing the CEO’s daughter or something.

Dumb Account Managers

June 27, 2007

An account manager from one of our traditional media agency clients recently said:

I havn’t (sp) coded HTML for 7 years, just out of curiosity I’m guessing you remove the attached code?

I’m actually fascinated how an account manager working in the web industry can not touch HTML for seven years. Unless they’re bullshitting, which based on previous dealings, is probably the case.

In fact, I wonder if they even know what HTML stands for.

Many of the account managers in traditional media agencies are assigned to one big client. The primary reason for this is that they are too stupid to be able to deal with more than one client at a time.

Our digital agency is a busy one. The small team has a lot of work, and deals with a multitude of clients and projects on a day-to-basis, often skipping rapidly between projects tackling issues and solving problems. Our primary project manager is nothing short of spectacular, juggling no less than 7-10 projects at any given time, for at least 5 different clients.

So, it’s disgusting when the account executives are so lazy that they can’t even make basic copy changes. Not one of these idiots we work with has taken the time to learn basic HTML, nor familiarise themselves with our CMS system, which is a breeze to use thanks to the excellent RadEditor.

I hate account executives. Bastards.

It’s all about passion

February 22, 2007

One of the great things about being a developer is that a lot of people you work with are passionate about software development. We all live and breathe code.

As Pardesi Blogger says.

Nowadays, it’s refreshing to just crack open my laptop and leisurely write code. Now to some people I know, they probably just think that such an activity is just plain sad.

A lot of people would think that it’s a plain sad, but forget that a lot of people who write code for a living enjoy writing code for a living.

Most of us were doing it before we started getting paid for it, and we’ll probably keep doing it even when we stop getting paid for it.

Have to agree with Pardesi:

You have to have passion….It’s what you live for and a bit of design & development, for me, is what it’s all about.

It’s about passion. If you’re passionate about what you’re doing – whether it’s programing or something else, nothing else matters.

Is it any wonder that web developers look upon traditional marketing agencies with such distaste. Many of them pitch web work to their clients without so much as a basic understanding of the web, and come from a background in print media, which is very different from interactive media. Every web developer working in a digital agency has had to work with a traditional agency at some point, and looked at their web designer’s work with utter dismay.

Marketing is bullshit. Let’s make no mistake. If you’re one of those people who most print adverts (magazines, billboards, etc) don’t make sense, you wouldn’t be wrong. In fact, an intelligent individual has created a website to randomly generate print adverts, which are scarily realistic. As Techcrunch describes it:

The Ad Generator is a simple site that’s kind of fun to watch. It’s not a business at all – it was created by Alexis Lloyd as part of her thesis project at Parsons The New School for Design.

She’s taken “words and semantic structures from real corporate slogans,” and remixed and randomized them to generate new ones. She then takes “related” images from Flickr (I assume using Flickr tags) and generates fake advertisements.

Her goal is to “show how the language of advertising is both deeply meaningful, in that it represents real cultural values and desires, and yet utterly meaningless in that these ideas have no relationship to the products being sold.”

When the kind of work being produced by the designers we have to work with can now be done by a computer algorithm, who can blame us for disliking them so much? It just shows how little creativity is really required in their work. I’m yet to work with a capable designer from a traditional agency. They simply don’t understand the media, and make no attempt to learn, instead applying their skills from one industry to another and sweet-talking clients into accepting substandard work.

Call me a bitter developer if you will, but I’ve worked with too many dumbass designers on too many projects, to realise that the majority of them just don’t get it. If traditional media agencies are selling web work, they need to get web designers, or allow their digital partners to handle the creative element too.

Follow

Get every new post delivered to your Inbox.