Mar 2 2016

The Setup

Here is a short list of the tools, applications, and services I use most often.

  • MacBook Pro 15″ 2014
    • OS X Yosemite
    • Terminal
    • Photos
  • Chrome
    • JSONView
    • Postman 3.0
  • Parallels Desktop 10
    • Ubuntu Desktop 14.04
      • Inkscape 0.48
      • Gimp 2.8
      • MonoDevelop 4.0
    • Windows 7
  • Google Docs
  • Amazon Web Services
  • Atlassian
    • Jira
    • Confluence
    • HipChat
  • Brackets 1.4
  • Atom 1.0
  • TextWrangler 5.0
  • Komodo Edit 9.2.1
  • Eclipse Luna 4.4
  • SourceTree 2.0
  • GitHub Desktop
  • SQL Developer 4.0
  • MySQL Workbench 6.3

Jun 4 2012

JavaScript Debugging With The console Object

In the early days of JavaScript there were few options for debugging large web applications. You could have used the multiple alert notifications or possibly even calling document.write to write messages into the document. Firebug changed web developers lives, and I think how we view JavaScript, by making it incredibly easy to debug HTML, CSS, and JavaScript. Since Firebug, most current versions of web browsers include powerful debugging tools. In addition to the debugging tools browsers have made available a JavaScript console object to help write debug statements. With console, there is no need to pop up alerts to inspect the state of an object. To write a log message intended for the console, just write the following JavaScript statement in the right place.

console.log("This is a log message");
console.log("Message one", "Message two", "Message three");

To open the console, you can find it in Safari by looking for the the Web Inspector, in Chrome it’s called Developer Tools, and in Firefox you’ll find it under the Tools menu as Web Console.

The console object has a lot of useful debugging messages for errors with different severity, such as log, debug, info, warn, and error.

console.info("I'm here.");
console.warn("Do I smell smoke?");
console.error("The roof, the roof, the roof is on fire.");

In addition to logging String messages, you can log whole JavaScript objects. It may be useful to inspect a complete object and it’s state. To write out the state of an object to the console use the dir method as in the following example.

console.dir({fname:"Bill", lname:"Gates"});
console.dir(document.getElementById('SomeElementId'));

In Chrome and Safari, you can also use dirxml to display the a HTML element object in the console as HTML. In my version of Firefox, this method did not work.

console.dirxml(document.getElementById('SomeElementId'));

You can also group related log messages, no matter their severity. To group console messages surround them with a group and groupEnd. You can even nest groups inside of groups.

console.group("Server update");
console.log("calling server...");
// ... any number of console log messages.
console.groupEnd();

You can also test the performance of your JavaScript code with time and timeEnd. Both of these methods accept a String label and it needs it needs to be the same value for both methods.

console.time("Process Data");
// ... some time consuming code
console.timeEnd("Process Data");

When the timeEnd method is executed it will generate a message in the log console with the amount of time it took to run the code between the time and timeEnd method.

Chrome Developer Tools Web Console

Chrome Developer Tools Web Console


Jun 30 2011

Microsoft BizSpark

In the era of Apple fanboys and opinionated Ruby on Rails developers, it might not be cool to use Microsoft tools and products. It seems that startup will tend to use Ruby over .NET, Google Docs instead of Microsoft Office, OS X or Ubuntu in lieu of Windows. I’ve never been dogmatic about the technology I use. I’m a pragmatic programmer and the fact of the matter is that a large number of computer users still rely on Microsoft products. In the financial industry, Excel spreadsheets are traded like baseball cards. Microsoft realizes that they are not the cool kids in the block, at least amongst Silicon Valley startups, and perhaps that is why the started the Microsoft BizSpark program.

I’ve been one to always chase my customers and users, not trends and fads. That is why, I’ve been a huge fan of Microsoft DreamSpark and Microsoft BizSpark. Microsoft BizSpark is a program that allows small startups have access to many of its products, frameworks, tools, and resources for free.

Microsoft BizSpark Software Download

Microsoft BizSpark Software Download

Through BizSpark you can get access to applications such as Visual Studio 2010 Ultimate, Office for Mac 2011, Microsoft Windows 3.1 through Windows Vista, and much more for free. There is no need for your CTO to look for serial numbers for Windows Server 2008 on Google and warez sites. BizSpark gives you legit licenses to key Microsoft products.

I’m a huge fan of any company that supports startups and software developers in general. I can’t say enough nice things about Microsoft BizSpark, even if they paid me. And not, they didn’t pay me but I am a proud member. I only wish that the Microsoft BizSpark program also included hardware.


Apr 14 2011

Keep is Short and Simple

No one has time to read long rambling text. One of the great things about Twitter is that it has a 140 character limit, it forces people to be concise, precise, to the point. It is so much easier to follow someone twitter than someones blog. This is also true for corporate communication. Within a team, the best way to ask short question is through instant messages such as Skype. The one draw back to instant messaging systems is that people expect instant responses. But for quick yes or no questions this is the best approach. More detailed questions can be escalated to email. But always be short and precise in emails. Always stay on point when emailing someone. If you are making multiple points separate them to their own bullets or paragraphs. Don’t intermix different ideas in the same paragraph. Always outline and simplify key points to one line bullet points. When asking for something, be clear as to what you are requesting or asking and always outline what you have tried, research, or done prior to asking.

Effective communication is a skill. There are tools, habits, and best practices that can help maximize the results of your team communication efforts. One of my most effective tool in communicating is to keep to the Three Sentences practice. One way to successfully achieve reply within three sentences is to never answer the same question twice, to refer to existing documentation, wiki sites, and other resources.


Sep 4 2010

Use Google Forms For Building Simple Surveys and Polls

I use Google Documents to manage drafts of blog posts, to keep track of house hold finances, and even to manage an invite list to gatherings at my house. You can do a lot with nothing more than Google Docs. Recently I had to help a friend create a small informal survey to use with her clients and we choose Google Docs from her Google Apps for Domain account. In this article, I’ll go through the motions of creating and using a simple form in Google Docs which can be used in polls, surveys, or questionnaires.

Create New Form in Google Docs

Create New Form in Google Docs

Log into you Google Docs account and create a new Form document. Creating a new Form document takes you to the Form builder which allows you to enter a title and description for your form and any number of questions. For each question, be sure to enter the question itself, any short description to describe the question further, and the question type. There are several question types, most common are the text, multiple choice, checkbox, list, and scale. You can use the text question type for things like persons name, addresses, city, etc. The multiple choice question type is also known as the radio button, meaning that out of several choices you can only select one. The checkbox allows you to check multiple choices at the same time. The scale question type can be use to identify a range between 1 and 5 of how much a person liked the product or service being asked about.

Google Docs Form Editor

Google Docs Form Editor

Once you filled out your form, you can choose a theme. As of this writing there are over 90 themes available, from plain to whimsical. With the form done you can email the form, make it public, or embeddable in a blog or website. If you reopen the form, you will be presented with the spreasheet view of the form. The form data is saved in the spreadsheet, to view or edit the form again, click Form | Edit Form under the main menu.

Google Docs Form Sharing Settings

Google Docs Form Sharing Settings

You can have three basic sharing options. You can make the form public to everyone in the web, or available to only those that have a link for it, or those you explicitly grant access to.

If you run a small business or a large family, you can use Google Docs to create forms for surveys, polls, questionnaires, or even a small customer relationship management system.