Posts

Showing posts from September, 2011

Identifying Problems that Already Have A Historical Lessons Learned

Recently I ran into a problem that I had I had solved before.   This time the solution was being implemented by another developer. As it turns out, he ran into the same traps that I fell into when I solved that problem.  The only problem is that I was not able to identify all the pitfalls before hand.    How did I fail to identify the traps and pitfalls?  I had been there before, but I failed to pass along these lessons learned.  My danger antenna never went up. What lead me to buy into the his solution and eat a big piece of the gullible cake was  three things:  Being under extreme pressure to a meet deadline  Believing in the confidence of this very capable programmer "Oh it's easy, I got it, I will have in a couple of hours"  The alternative solution was many times harder so this seemed to be a silver bullet In the end then solution worked but it was many times more effort than the programmer assured me.  And much of that has to do with being my fault. I

Understanding the 'this' keyword in javaScript and JQuery - $(this)

This in C#, Java, C++ The keyword this   is something that has special meaning for most developers that have worked with the C family of object-oriented languages (i.e. Java, C++, C#).  In those languages the keyword  this  is used by the containing class's instance to refer to itself.  Depending on the conventions and standards used, many of us do not use the keyword even though we know it's there.  That is because, as an example, in C# many developers use naming conventions that eliminate any need for it.  In a popular C# convention, for example, a property always starts with an uppercase character, a non-public field starts with an underscore and  local variables start with lower case characters. Therefore according to that convention the following statements hold true: _age is a field age is a local variable Age is a property In those languages this is only necessary to express the scope and that is usually only when you have other variables that might obscure

Forget the Domain, the Model and MVC; Let's Talk About Layered Applications

Image
In my job, as technical lead, I am frequently asked general programming questions by the junior developers.  I love the questions because it gives me an opportunity to share the knowledge I've been fortunate to acquire over the years.  Also, it helps me find out or to ponder on things that I don't know. A couple of days ago I presented a class titled "On Clean Code", based on the philosophy presented by Robert C. Martin in his book Clean Code . The class consisted of several exercises, one of which consisted of a challenge to clean up a function that was poorly written.  The function contained many violations of clean code that Martin outlines, such as abbreviated variable names, non-descriptive variables, etc, but the biggest fallacy in this function was that it had too many responsibilities.  The function's responsibilities included Authenticating a login (username and password) by returning a boolean value to indicate if the login was valid Alerting t

Had a Great Time at Austin Code Camp 2011

Every year there is one event that I look forward to attending and that is Austin Code Camp. This year I had a great time once again at this event.  I've learned that one of the greatest benefits of attending the event is being introduced to some many valuable gems of information. Usually the classes are great and just deep enough to spark my curiosity. I think the one hour duration for those talks is perfect for a few reasons: The talk covers enough ground to allow me to decide if I want to delve deeper into the topic on my own.  I usually do (eventually). The talk introduces me to tools, concepts, events or resources I've never heard of before (and that's exactly the reason I love attending these events).   It gives me a chance to attend more classes throughout the day than if they were two hours or longer. Here is a list of the things that I learned about that made the day worthwhile Orchard Orchard is an open source(Web) Content Management System (CMS) f

App Harbor and Microsoft Web Matrix

I recently committed a project to AppHarbor that was not an MVC Solution but instead was a web matrix project.  Notice the commit log below that was created by AppHarbor.  There is a line that says "No Solution file found, cannot build. Using repository as-is".  That means that AppHarbor will host websites as is.   The only thing that I did different was add a web config file with the following contents: ***************Web.config file****************** <configuration > <system.web > <compilation debug="false" targetframework="4.0" > </compilation > </system.web > <system.webserver > <modules runallmanagedmodulesforallrequests="true"> </system.webserver> </configuration> Harbor Commit Log********************* Build 7af6182 Back to hairban