Skip to main content

Posts

Showing posts from 2015

Ember + Node + Express + EJS + Elastic Beanstalk

Here's the set of steps I follow to test out Ember using Node / Express in Elastic Beanstalk. For reference, here's a test project I've deployed to AWS EB using these steps. Start a new Ember project, and add in the Express dependencies npm install -g ember-cli ember new my-awesome-app cd my-awesome-app npm install --save express npm install --save ejs npm install --save path npm install --save debug mkdir bin mkdir views create a file named www inside bin folder #!/usr/bin/env node var app = require('../index'); var debug = require('debug')('autocare:server'); var http = require('http'); var port = normalizePort(process.env.PORT || '3000'); app.set('port', port); var server = http.createServer(app); server.listen(port); server.on('error', onError); server.on('listening', onListening); function normalizePort(val) { var port = parseInt(val, 10); if (isNaN(port

2015 Reading List

So it's that time of year again when I look back over my goodreads list of books, and share the ones I've actually finished. Lots of good stuff this year, IMHO. If I had to pick, I think The Toyota Way and Holacracy are at the top of the list. I'm a software developer, and I spend my days in the coding trenches. However I like to read about and understand the bigger picture, and how my work fits in with the rest of the company, and the rest of the world for that matter. Having said that, I'd read just about anything. Lean Enterprise: How High Performance Organizations Innovate at Scale , Jez Humble, Joanne Molesky, Barry O'Reilly The Toyota Way: 14 Management Principles from The World's Greatest Manufacturer , Jeffery Liker Understanding the Four Rules of Simple Design , Corey Haines A Brief History of Time , Stephen Hawking The Tao of Pooh , Benjamin Hoff Siddhartha , Hermann Hesse Peace of Mind: Becoming Fully Present , Thich Nhat Hanh Fis

Quality is Free

Ed Horch commented on an answer I posted on Quora, suggesting I add  Quality is Free by Philip B. Crosby to my answer. I have never read that book before, so I went ahead and bought a used copy. This book is stirring up things in my head about quality as it relates to software development, and I want to jot down a few notes, before I forget them. What is Quality? According to Crosby Quality is conformance to requirements  That's a very simple definition of quality, and at first glance it might not seem revolutionary. And it's in stark contrast to how Prisig tries to define quality in Zen And The Art of Motorcycle Maintenance , driving the main character mad trying to define exactly what quality is. I really like Crosby's definition of quality. I'll try to expand on that a little bit. Another way quality was book in the book, and I'm paraphrasing here Quality is when a customer gets what they expect What are your customers expectations? Most of w

Programming Tips and Tricks

Ham Zaf asked the following question on Quora. Computer Programmers :   What are the greatest programming tips and tricks you have learned on your own by years of coding? Here's the answer I wrote. How would you have answered this question?

Code Comments

The whole "no comments" thing can be taken too far. We should strive to write code that is clear as possible so comments aren't necessary. However, the act of writing a function header before writing the function is a good way to think about the intent of the code your about to write. If you try to write a concise description of a function and you struggle with it, then its a sign your design might be over complex,or you haven't decomposed the problem well enough. Its also a good way to spot violations of SRP.if you find that you have to use the word "and" multiple times to describe the intent of a function, then you probably have multiple functions crammed Into one. After refactoring your code, perhaps using TDD, if your comment is completely redundant because the code expresses everything you need to know, then as a last step you should delete the comment. Here's what I consider bad comments: 1. Comments that add no value because the code

Software Quality

Greg Finzer asked the question on a Linedin Group "What practices do you use to improve the quality of an application?" . Greg shared is ideas on improving application quality here , and focuses on developer practices to increase quality. I have my own ideas on what quality means, and how to improve it. Here's my take on it. How do you define quality? Quality is hard to define, and I don't know of any satisfactory description (much like architecture). In Zen and The Art of Motorcycle Maintenance, the narrator (Pirsig) spends a great deal to time trying to define quality, which eventually drove him insane (requiring shock therapy). One way you can define quality might be how close the item comes to ideal, when viewed through different perspectives. For example, for a software project, we can look at quality from the perspective of the end user - does the application work? How easy is it to use? We can look at code quality - How complex is the code? How much

The Software Craftsman

I've just finished reading  The Software Craftsman: Professionalism, Pragmatism, Pride by Sandro Mancuso, and I must say that it resonated with me. Treating software development as a craft, and striving for mastery is something that I admire. This book reflects my attitude towards building software, and is now one of my favourite development books ( The Pragmatic Programmer being my all time favourite). The only thing I don't really agree with is the emphasis on XP practices, notably TDD. I think professional developers should know about TDD and have practiced it, but I don't think it's a requirement to being a software craftsman. The debate between Jim Coplien and Uncle Bob on TDD is good food for thought.