Another strike against GoDaddy

News 5 Comments »

In, not that surprising, news, it seems GoDaddy employees are allowed to bid in the companies TDNAM auctions. In fact VP Adam Dicker has bought a number of domains with the service.

Why is this wrong? Employees, especially ones like Dicker, have access to inside information like what domains are on user’s wishlists and their bid reserve amounts. This makes it easy for employees to inflate domain prices if they know it is in demand.

According to an article on Domain Name Wire, GoDaddy freely admits that it does not prevent it’s employees from participating as the other big name auctions do.

When will people wake up and realize there are other options to GoDaddy and that the extra $1-$2 you save is not worth this insanity!

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

2 tried and true ways to frustrate and discourage your developers

Personal, Software Design 5 Comments »

I have been reading a lot about what makes a developer want to stay or leave their current jobs or clients on some development blogs as of late.

There are two things that stuck out to me, probably because they hit home with me, that can really frustrate and discourage a developer.

1. Poor or incomplete specifications. There is nothing worse for a developer to implement code based on wrong or poor specifications. The results are never what the manager or client wanted. This results in tention on both ends and the developer ends up recoding the task. Everyone loses in this case.

It is very important for the client or project manager to lay out very precise and detailed instructions for the developer before any coding begins. This is even more important if the developer has limited or no access to the client or manager to resolve questions. The poorer the specifications the more questions and guess work the developer must do to complete the project.

Being a the lead developer in my organization I have felt the pain of redoing work and have a strong appreciation for proper planning and documentation.

2. Unreasonable expectations. This can come in many forms, from unreasonable deadlines to being expected to overcome limitations in technology. What ever the expectation both parties end up discouraged and disappointed when things fall apart.

It is essential that the client be made aware from day one what is possible in the realm of technology and timeline. It is also crucial that the person or team that communicates with the clients and relays information to the development team be very knowledgeable in these areas as well. Sales reps love to say whatever will make the sale but this can lead to some messy situations if promises cannot be delivered as stated.

Avoiding disaster

If managers can keep these points in mind, and take them to heart, when organizing projects they will be amazed at the amount of positive outcomes that will result from just a little diligence to make sure both sides stay happy and productive.

kick it on DotNetKicks.com

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Advanced tableless forms

XHTML/CSS 5 Comments »

I am always looking for easy ways to use less tables in my markup. When designing a website I always aim for no tables but in a web application I may cheat from time to time.

Some time ago, thanks to an article on quirksmode, I began creating tableless forms. This trick was great for simple forms but I kept using tables for really complicated forms.

For example, if I needed a 2 or 3 column form I would just use a table because figured it was easier. Well, after playing with the orginal code from quirksmode I have found a simple way to create multi column forms with little to no extra effort. It just requires you to think about it ahead of time.

Let’s take a look at a simple example based on the original tableless form.

<!-- ----------
HTML
---------- -->
<form>

	<label for="firstname">First Name:</label>
	<input type="text" name="firstname" id="firstname"/><br/>

	<label for="lastname">Last Name:</label>
	<input type="text" name="lastname" id="lastname"/><br/>

	<label for="emailaddress">Email Address:</label>
	<input type="text" name="emailaddress" id="emailaddress"/><br/>

</form>
/* ----------
CSS
---------- */
label, input {
	display: block;
	float: left;
	width: 150px;
	margin-bottom: 10px;
}
label {
	width: 110px;
	text-align: right;
	padding-right: 10px;
	margin-top: 2px;
}
br {
	clear: left;
}

That code would produce a form that looked like this:

simple tableless form

But what if you want to do something a bit more advanced, say, like this:


advanced tableless form

We have made the form 2 columns and thrown in a select box and a textarea. Normally I would be preparing to use tables in a situation like this until a stopped and realized how easy it would be to do without tables.

The CSS hardly changes.

/* ----------
CSS
---------- */
label, input, select, textarea {
	display: block;
	float: left;
	width: 150px;
	margin-bottom: 10px;
}
label {
	width: 110px;
	text-align: right;
	padding-right: 10px;
	margin-top: 2px;
}
textarea {
	height: 50px;
}
br {
	clear: left;
}

All I’ve done is add the select and textarea selectors to the first definition. I also added a specific definition to make the textarea 50 pixels high.

Now the HTML doesn’t change too much either. There is just more of it, obviously.

<!-- ----------
HTML
---------- -->
<form>

	<label for="firstname">First Name:</label>
	<input type="text" name="firstname" id="firstname" tabindex="1"/>

	<label for="address">Address:</label>
	<input type="text" name="address" id="address" tabindex="5"/><br/>

	<label for="lastname">Last Name:</label>
	<input type="text" name="lastname" id="lastname" tabindex="2"/>

	<label for="city">City:</label>
	<input type="text" name="city" id="city" tabindex="6"/><br/>

	<label for="emailaddress">Email Address:</label>
	<input type="text" name="emailaddress" id="emailaddress" tabindex="3"/>

	<label for="province">Province:</label>
	<select name="province" id="province" tabindex="7">
		<option value="0">--Select a Province--</option>
		<option value="AB">Alberta</option>
		<option value="BC">British Columbia</option>
		<option value="MB">Manitoba</option>
		<option value="NB">New Brunswick</option>
		<option value="NL">Newfoundland</option>
		<option value="NS">Nova Scotia</option>
		<option value="ON">Ontario</option>
		<option value="PE">Prince Edward Island</option>
		<option value="PQ">Quebec</option>
		<option value="SK">Saskatchewan</option>
	</select><br/>

	<label for="comments">Comments:</label>
	<textarea name="comments" id="comments" tabindex="4"></textarea>

	<label for="postalcode">Postal Code:</label>
	<input type="text" name="postalcode" id="postalcode" tabindex="8"/><br/>

</form>

What you should notice is that the markup creates the fields from left to right. I have also added a tabindex to each field so that you can tab through them from top to bottom. So, the tabbing would start on the First Name field tab to the bottom on the left hand side fields then move tot he top of the right side fields and tab to the bottom of that column, exactly how it would if I had created the form with tables.

So in the end we have nice clean markup for our more advanced form with hardly any extra CSS and no messy tables. Enjoy!

kick it on DotNetKicks.com

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Ruby Programmers Beware

ASP.Net, Ruby/Rails No Comments »

If you are a ruby programmer or a sys admin that maintains ruby programs on your network you should be aware, if you are not already, of some serious vulnerbilities that have been found in ruby.

Drew Yao of Apple has reported 5 exploits that allow an attacker to execute arbitrary code.

ruby-lang.org

Multiple vulnerabilities in Ruby may lead to a denial of service (DoS) condition or allow execution of arbitrary code.

The Ruby team have released patches for the 1.8 series (1.8.5 >) and the 1.9 series which should be implemented immediately.

The following issues are not likely to affect loyalty among the Ruby community, as expressed in the following comment on a blog covering this issue.

For the record… I love Ruby. I blame Drew!

Now the comment is obviously meant to be funny but most likely shows the true feelings of the community. They won’t let this deter them. They will just keep working to make Ruby better.

This may, however, have negative results on the preception of Enterprise level companies who, for the most part, haven’t embraced Ruby yet. Hopefuly this isn’t a setup back to furthering adoption outside the freelance community.

On another not Ruby may get a bit more exposure from an unlikely source. Microsoft is working on it’s implementation of Ruby, IronRuby, for the .Net CLR and making it compatible with their upcoming MVC framework. Could give Ruby some limelight in Enterprise companies that use .Net and give Ruby programmers a “foot in the door” so to speak.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Friday Roundup for June 13, 2008

SEO/Marketing, Software Design No Comments »

Here is what I found interesting this week.

Unit tests are for functionality, not code!
The prevailing philosophy in regards to unit testing is writing your tests before your code. In practice, this happens a lot less than it should. Why should we write our unit tests first?

Turn Google App Engine into your own Personal Content Delivery Network (CDN)
As anybody who has run a growing website or blog knows, response time is going to get worse with the more users you have visiting your site. The users come from all angles, RSS feeds, homepage visits, search engine visits, people sealing your static files that you host, and pretty much anything else that can be served over HTTP. The solution to this problem is to off load your static content on to a Content Delivery Network or CDN. CDN providers cost a lot of money though, so it is nothing for us mere mortals with one server can afford.

But thanks to Google anyone can now run their own CDN for free on Googles servers. Lucky for you and me Google has made the process really painless and you can even have the CDN under you own domain name. In my case static.coderjournal.com.

10 Universal Truths of SEO
Google is great. I use its services on a daily basis and love the traffic it sends to my websites. As smart SEO professionals point out, however, Google isn’t the only search engine around, and may not be the biggest, baddest search engine on the block forever.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Want to win cool stuff?

News, Personal 2 Comments »

I usually don’t participate in contests. That’s probably due to the fact that I am essentially lazy and I have the mind set that I couldn’t possibly win.

Well, I am shrugging that off after seeing Alan’s, of Affiliate Confession, sweet new MacBook Air that he won in a contest.

Alan is throwing a contest of his own with some pretty nice prizes from Market Leverage and Vat19. These prizes include a Nintendo DS iwth 2 games, a Flip Mino camera, a USB missle launcher for harassing your co-workers, and a banana bunker (a plastic shell to protect bananas).

Now it is easy to enter, which is probably why even I am doing it. You just write a blog post, kind of like this one, about the contest. Make sure you link to the contest post, Market Leverage, and Vat19 then leave a comment on the contest post with a link to your blog post about the contest. It’s that easy.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Friday Roundup for June 6, 2008

ASP.Net, Ruby/Rails No Comments »

Here is what I found interesting this week.

Exception handling best practices in ASP.NET web applications
Exception handling plays an important part of application management and user experience. If implemented correctly it can make maintenance easier and bring the user experience to a higher level. If not, it can be a disaster.

How many times have you seen the error message that doesn’t make any sense or at least provides some valuable information, or even better - how many times have you seen the famous error screen with exception message and a complete stack trace on yellow background? Too many times, I would say. This is why, among other things, some of my colleagues were very interested in exception handling techniques and best practices.

Did Rails Sink Twitter?
Twitter is arguably the most heavily used Ruby on Rails application in the world. Almost since its inception, Twitter has fostered a wildly passionate cult following. Also from the beginning, Twitter has suffered from chronic outages under that load.

In the past month, record downtime has prompted fresh outcry within its ever-growing user base. This, along with increased attention from mainstream media has forced Twitter to publicly acknowledge these issues, and to reveal a few details about the source of these problems.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

SEO and Adwords, using both to your
advantage

Personal 3 Comments »

Search Engine Optimisation is well known in the development community. Developers may not be SEO experts but they have at least heard of it and understand it’s importance in relation to the success of a website. Now, with some big names offering SEO services the non-technical and managers are catching on and realizing it’s importance to their success.

As a quick overview of SEO it is making sure that you use the proper, semantic, markup for your webpages, writing keyword targetted content, and building links back to your pages. I know SEO is more complex than that but it is beyond the scope of this post.

Beyond SEO, there is another option that has presented itself. Google Adwords. Now Adwords doesn’t instill the same feelings of confidence in all people as SEO does. It is a mysterious beast that takes knowledge and experience to harness. You will find those out there that love Adwords and use it to drive a great deal of business to their websites. There are just as many, if not more, out there that will tell you that Adwords is a money pit and a waste of time.

As someone who has played the Adwords game I like to think I fall into the middle of both of those extremes. I know Adwords holds great potential for me but I still haven’t mastered the art yet. Having spent in excess of $600 experimenting with Adwords I found that it was fairly easy to drive lots of cheap traffic to my site. Getting that traffic to convert into something meaningful like a sale, lead, or even RSS subscription proved much harder.

Just like in SEO, the proper keywords are key (no pun intended). Even a slight variation in keyword selection can mean the different between rags and riches.

With SEO if you choose the wrong keywords you are out time and money in the form of work on your site and content. In Adwords the wrong keywords mean lost money for every single visitor to your site because you are paying for every single click.

So when it comes to either SEO or Adwords it pays to do your homework before you start rather than later. It could save you time and ultimately money.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Understanding scope in object oriented JavaScript

JavaScript/Ajax 13 Comments »

When you think of the keyword this you probably assume it refers to the current instance of the class. This is true for most object oriented languages like C# and Java.

For example I could use the this keyword in C# like this:

class Cat {
	string _name;
	public Cat(string name) {
		this._name = name;
	}
}

In the above example you see this illustrated. In C# and Java, this always refers to the class instance.

So, knowing this you would probably assume the same would be true of JavaScript and it’s this keyword. This is, however, not the case. Like a lot of things about writing object oriented code in JavaScript, this behaves differently in some situations. this does not always refer to the class instance depending on how you use it.

function Cat(name) {
	this.Name = name;
}

In the above example it works just like our C# example but let’s look at a situation where things can go wrong if you are unaware of some rules.

var wrong = new WrongClass();
wrong.publicMethod();

function WrongClass() {
	this.publicProperty = 'props';
	this.publicMethod = function() {
		console.log('public method');
		privateMethod();
	};
	var privateMethod = function() {
		console.log('private method');
		console.log('public property equals ' + this.publicProperty);
	};
}

In my examples I am using the console object of Firebug to output my data.

So what is wrong with the above example? It looks like everything should work, right? Well, operating on the assumption that this always refers to class instance then the above code would be correct. We are, however, using JavaScript and shouldn’t be that surprised that it does things a little differently.

The output when publicMethod() is called would be:

>>> public method
>>> private method
>>> public property equals undefined

The reason this.publicProperty is undefined is because when entering the private method the scope of this changed. It no longer means the current instance of the class ‘WrongClass’ but it now means the current instance of the function ‘privateMethod’.

Another situation where the scope of this would change is when dealing with event handlers.

document.getElementById('button').onclick = function() {
	alert(this.id);
}

In the above example this would refer to the instance of the document element ‘button’. There are many cases of scope change that you need to be aware of when dealing with object oriented techniques.

Back to our ‘WrongClass’ example. I’ll show you how to make that example work the way you would have expected it to work in the first place.

var right = new RightClass();
right.publicMethod();

function RightClass() {
	var self = this;
	this.publicProperty = 'props';
	this.publicMethod = function() {
		console.log('public method');
		privateMethod();
	};
	var privateMethod = function() {
		console.log('private method');
		console.log('public property equals ' + self.publicProperty);
	};
}

You’ll see that in the above code I have declared a variable called self. I assign this to this variable. This allows me to then use ’self’ any time I want to refer to the class instance without worrying about scope.

You can call your variable anything you like but ’self’ seems to be a common practice. So, now in ‘privateMethod’ when ‘publicProperty’ is called using ’self’ it will output the proper value.

>>> public method
>>> private method
>>> public property equals props

kick it on DotNetKicks.com

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.

Friday Roundup for May 30, 2008

ASP.Net, News No Comments »

It seems I was a bit forgetful on Friday and forgot to post my roundup. Here is what I liked last week.

The future of .Net, Visual Studio, and more
As the information has been quite minimal, I decided to find out what kind of job postings Microsoft has listed at the moment as they reveal something of what they are planning at the Redmond. As it turns out, there are lot’s of interesting things coming in the future versions of .NET Framework, Visual Studio, SQL Server and SharePoint.

It should be noted that the information in this post is based mostly on combination of several job listings and speculations and it shouldn’t be taken as a definite road map or truth. Projects can be combined, canceled and delayed. I’ll link to the original job posting sources, but I’m not sure how long the links will work.

What is the future of C# anyways?
It was often asked during some of my presentations on F# and Functional C# about the future direction of C# and where I think it’s going. Last night I was pinged about this with my F# talk at the Philly ALT.NET meeting. The question was asked, why bother learning F#, when eventually I’ll get these things for free once they steal it and bring it to C#. Being the language geek that I am, I’m pretty interested in this question as well. Right now, the language itself keeps evolving at a rather quick pace as compared to C++ and Java. And we have many developers that are struggling to keep up with the evolution of the language to a more functional style with LINQ, lambda expressions, lazy evaluation, etc. There are plenty of places to go with the language and a few questions to ask along the way.

Something is wrong on the Internet
That comic sums up the internet in one sentence: the scrum of jostling opinions on the web and the optimism that truth can still win out. I was reminded of that comic when someone asked me about a particular way that someone recently tried to get links. Jonathan Crossfield wrote up a good background summary of the situation.

ASP.NET MVC Preview 3 Release
This morning we released the Preview 3 build of the ASP.NET MVC framework. I blogged details last month about an interim source release we did that included many of the changes with this Preview 3 release. Today’s build includes some additional features not in last month’s drop, some nice enhancements/refinements, as well as Visual Studio tool integration and documentation.

Did you like this post? Be sure to grab my RSS feed so you don't miss out on more great articles.
WP Theme & Icons by N.Design Studio
Entries RSS Login