Tuesday 29 May 2012

A lot of people who use Javacsript come up against the same problem when it comes to dates. Stack Overflow is full of these questions. Well look no more...

A quick prototype over the Date object will allow you to add days to a date. By all means extend this or create your own functions such as addMonth, addHour etc using getMonth, getTime and so on.







Date.prototype.addDays = function(days)
{
var dat = new Date(this.valueOf())
dat.setDate(dat.getDate() + days);
return dat;
}

Thursday 17 May 2012

Learn to code?

In response to Gina Trapanis post on Google+ on learning to code or not learning to code... 
The problem associated with most education based learning of coding is the recipe based format of the courses. We have all seen the "Lets write an app to record our shopping list" course in books, online and in class. 

To really become a developer you need to go back to the fundamentals. Frameworks and API's are great, I use them daily, but they shield the developer from the underlying principles of logic, work-flows, storage and security. You can't teach a person to cook an omelette and then expect them to prepare a 5 course fine dining experience!
Think outside the box and strive to learn more!