Posts

Showing posts from 2012

This Clean Code Experiment Dedicated to Non-Coders

So now it’s been about two weeks since I first wrote part one of this two part series. I only had two comments up to this point and one of them was a reply from me to the first comment. The one comment came from Amy. She pointed out that she liked the shorter cleaner version of the code. However, she wondered if that one could really accomplish everything that the longer nastier version was accomplishing. To point out the short answer: Yes it can and I’m about to explain why and what the benefits are. Read More

General Steps to Resolve a Complex Software Defect

In a perfect world the software product would be free of any bugs or defects. The software will use best practices of design. The developers will approach the design with engineering principles that take into account performance, scalability, flexibity, targeted loads, etc. In the real world there’s no software product that’s 100% free of defects. There are simply too many factors that affect the functionality of a complex system. The factors are many to include... Read More

PostSharp on Visual Studio Magazine

It's a good feeling when you publish a post on a topic and then you get confirmation from a well-respected authority in the community. This is exactly what happened recently with a post I wrote on using PostSharp . I wrote about PostSharp and two months later Visual Studio Magazine published an article on the same topic.

Here is the post I published: Simplifying Logging in Your Application with PostSharp

Here is Visual Studio Magazine's article on the topic: AOP with Post Sharp

Although Visual Studio Magazine provided a well-written, polished article and mine was merely a blog post, I still like the confirmation that the post was written on a relevant topic.

Oh I Forgot to Mention...

If you have been following this blog, you may have noticed that I haven't published any new posts. The truth is that I have been publishing posts, just not to this site. I've been publishing posts to www.codematterings.com. I didn't think about it much at first and wasn't sure how to best share the posts here and on the other site. The other site is part of the organization where I am currently employed (McLane Advanced Technologies). So what I'm going to be doing from on is to simply place the links here to send you over to the real post. In the mean time here are the posts that you may have missed: java-certification-demonstrates-your-understanding-of-oopfriendly-exception-messages-are-good-for-the-user-as-well-as-the-programmeri-am-moving-from-c#-to-javaMixing Shapes from Different Templates In Visiovideos-from-aspconf-day-1-are-onlinesimplifying-logging-in-your-application-with-postsharp-and-aopjson-is-the-new-xml-for-data-transferdark-matter-developers bit…

A Simple MongooseJs Example

As my latest coding adventure I've decided to give node.js a try.  I read this short little tutorial name the Node Beginner Book.  I went through the entire book in one day.  The book provided me with enough knowledge to be able to produce simple website.   The good accomplished its goal but it did not cover database communications.  I can't think of any business application that does not communicate with some sort of database for storage.

I'd heard that a good choice for using for storage with node.js is MongoDb.  Being that I am totally unfamiliar with MongoDb I did a quick google search and found a driver that can be used to connect node source code to MongoDb.  That driver is called mongoosejs.

So now that I knew all the components to have a database with node I decided to try to connect all the pieces together.  I gotta say that it was not easy for various reasons.  The mongoosejs site was inadequate for me.  It may be totally appropriate for someone who knows the ins…

Austin Code Camp 2012

Austin Code Camp 2012 will take place on June 9th this year at the St. Edwards Professional Education Center in Austin TX.  Code camp is an all day event full of great training and valuable information.  One great thing about code camp is that it's free -  the best part is the value is in the content.  You can find more information at the official site http://austincodecamp2012.com.  Code camp is an awesome conference that has always provided a lot of valuable information to the developer community and to me personally.

I am proud to announce that I will be presenting this year at Code Camp.   If you haven't already signed up to attend I gotta ask "what are you waiting for?!!"  Go visit the website and vote for the presentations that you are most interested in.

My Experience with PHP Thus Far

I started reading the book Beginning PHP 5.3 Wrox by Matt Doyle a few days ago,  I've read quite a bit, so far I'm up to page 160 on chapter 7.  I'm a bit excited by what I've learned so far.  So far I've learned about the following things.

Data Types
Arrays
String Manipulation
Functions
Callbacks

I was even able to implement a master page-like functionality using PHP. I've been amazed at how easy it has been pickup the PHP language.  It sort of reminds me of the C language because of certain things like it's Printf functions as well as the implementation of local static variables.  I don't know the full history of PHP but I can see the influence that C has had on it as a language.  Its C-like implementation has helped me tremendously in picking up the language.  The one thing that is a little different than anything I've ever seen is its implementation of arrays and associative arrays.  They are a bit more flexible than most of your out-of-the-box …

Solution to Trouble Accessing PhpMyAdmin with WAMP

I've recently started playing with PHP.  PHP has some great resources and for the most part it was easy to install on my windows box with WAMP (Windows Apache MySql PHP).  I initially ran into an issue because I could not access myPHPAdmin. Instead I got the following error:

 #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Apparently this indicates that I am not using a password.  For me it meant that my password was not set in MySql and also that the configuration file had no password set.

I did some searching throughout the web and found several solutions that probably work but the one that worked for me was this one

http://www.sitepoint.com/forums/showthread.php?846777-1045-Access-denied-for-user-root-localhost-%28using-password-NO%29

It appears that I already had installed mySql prior to installing WAMP but had never configured it.  It was just a matter of running it from the command line, setting up the password and then modifying the con…

Real Lessons In Software Development Part 1

Design Considerations for Processing Data in Batch Processes  In my software development journey I've learned many lessons that have caused me and the teams I've worked in much grief and extra effort.  Most of these issues are completely avoidable and avoiding them will extend your life. OK! OK! They won't extend your life but they may help in slowing down rate at which you either lose hair or acquire new gray hair. I want to emphasize that these lessons come from true pain and experience and you should really consider the points I make whenever you are faced with them. I plan to write about these lessons as a series.  I don't know how far the series will go but I can assure you that there will be more to come.

In this particular lesson I will provide a few tips about batch processes.  I don't want you to think of batch processes as they are implemented with any specific technology - batch (.bat) files for example.  A batch process is simply a way to process record…

Mobile Blogging to Blogger is Half Baked as of Now

Apparently mobile blogging is only half-baked. When you see all of my previous posts prior to this one they will appear as jiberish. The reason being is that I was trying out this concept of mobile blogging.  The idea is that you send  the text message "register"  to the number 256447.  That then sends you back a couple of messages with links that help you link that number to your blog.  You can either link it the newly created mobile blog - which you can claim.  Or you can link it to your existing blog. I chose the latter. You then send messages to that number and they post to your blog automatically.

The result was cryptic at best.  As you can see in my previous posts, I have several posts even though I only sent one long text.  Also you can see that it's some weird mono spaced font.

The advantage of that was supposed to be that you can actually send posts from your mobile.  The other advantage is that since I have an iPhone 4S I could leverage the voice recognition to…

Why I Enjoy Writing Code (i.e. being a programmer)

I remember taking my first programming course while I was serving my second year in the U.S. Army.  I took a course in VAX BASIC at Pikes Peak Community College at Ft. Carson.  Although I think it might have actually been QBasic or some other flavor of BASIC.  All I can remember is that it was very basic introduction to computer programming.  The course consisted of basic data types, control logic, loops and arrays - simple topics to me now, but quite foreign to me at the time.  

Back then I took the course more for promotion reasons than anything else - to get promoted in the army, college courses carry a significant amount of weight for promotion points.  I took it because it was available and it would help me reach my promotion goals.  

Although this was fun I didn't think that I would ever care for programming computers all day long every day.  No, not me I wanted to be out and about being physically active.  Back then, an office job, just sitting behind a computer eight hou…

Simple Timer Demo with JavaScript

I visited an auctioneer website at my brothers request that was working on what seem to be some time of bot auction.  There was this box that was logging messages live and anyone could bid on the item being auction.  This was just like a real live auction, except it was done over the web…
A typical log would like like this
Auctioneer:  Now bidding for 7.50Auctioneer: This bid is about to closeAuctioneer: This bid is about to closeAuctioneer: Now the bidding for 8.00Auctioneer: This bid is about to closeAuctioneer: This bid is about to closeAuctioneer: Item sold to bidder #349 for 8.00
That got me thinking about timers in javascript.  Timers, I assume is something that I have to understand in order to continue refreshing the page with everyone’s bids.  It could also be done with async call backs possibly but for my experiment I wanted to try out timers.  I know I also have to understand AJAX and connect it to a back end for fetching.  So I decided to create a demo.  It is a simple demo bu…

Living up to the Agile Principles

Agile development is an approach to software development that we can all agree is effective and efficient.  In many cases when companies adopt this approach they fail miserably, resulting in unfinished products or products that fail to deliver the necessary value.In my opinion the reason for this failure is a failure to understand the principles of the Agile Manifesto.

In many cases organizations focus way too much in the process itself as opposed to the philosophy behind it all. Organizations either approach it with a by the numbers approach as dictated by some certification process or agile specialist or with a make up the rules as you go approach.  Both of these approaches have a negative effect.

In the former case an extreme amount of effort is placed on the process itself and not on the focus of delivering working software early and frequently.  This also comes with working extra hours over 40 a week which in turn burns out the developers. Developers can become frustrated at this…

Integrating BrowserId with MVC3

Recently I read about BrowserId in Web Designer magazine.  It seems that BrowserId removes the burden of maintaining passwords within your application.  As such I became quite interested.  I set out to get it working with MVC.  The example in WD was with PHP.   I don't do PHP, for no other reason than I just haven't been exposed to it. 

I found some hints along the way on how to integrate it with Asp.net.
First I found this blog; http://www.eggheadcafe.com/tutorials/asp-net/7784b8c5-51ed-4aa9-b837-ed4084924ee8/implementing-browserid-signin-with-aspnet.aspx.  That put me halfway there but the problem was that that blog demo'ed it using Asp.net webforms.   So I made it my mission to integrate it with MVC.   The browserid backend code was encapsulated in it's own class so it wasn't very difficult.

I don't want to say much about how I got it working other than to point you to the demo site, the github repository and some other resources.  These resources have all …

Adding Google Analytics to Your WebSite in 3 Easy Steps

So you've learned how to create a website.  You wrote all the pages added all of the images.  You loaded your site up to the Web Host and you are set to go.  Everything is great and life goes on.  Not so fast. How will you know if your website is being visited and when? How many hits are you getting each week, month or for the year?

We've all heard of page counters.  Those are the little widgets that you can add to your site that provide live information on the number of visitors your site has had up to date.  There is only one problem with those widgets, most of the time they're cumbersome to add and they're specific to the Content Management System that you may be using.  Another disadvantage to them is that they lack much vital information. I mean they only provide you with the total visits but not when those visits occurred, for example. If you website is valuable to you, you will want more information than that.

Enter Google Analytics.  Google Analytics is free f…

Top 5 Reasons Why You Should Use Twitter

Both twitter and facebook have proven their worth, but I was a  twitter user long before I was a facebook user.  As such, it took me some time to get used to facebook.  Now that I've used both for some time I've come to realize the benefit of each. I have noticed that the inverse is true for facebook users that decide to try out twitter - twitter has an akward feel to them. I decided to write this short post on the top five reasons why anyone would find it useful.  Hopefully this will be usefull for those of you that have become accustomed to facebook and are thinking about giving twitter a try.

1. All information is public.  I know, I know facebook friends; you want to protect your privacy. In twitter there is no such thing as privacy settings.  Anything you tweet is automatically accessible to the twitter universe (Everything except for direct private messages).  Why this is a good thing is because other users and applications can quickly find you and your topics.
I'v…

Linux Mint

Recently I discovered Linux Mint. So far my experience with it has been pleasant. It runs way faster than the Windows 7 that was previously installed on the same box.   I actually installed this on a loved one's box and and since she is not a savy computer user I figured I would install everything she needed to make her experience pleasant.  I really didn't know what I was getting me and her into but I decided to give it a try because her computer was running extremely sluggish.  She mostly uses it for web navigation, so she had no files to backup and she doesn't rely on any Windows app for work or entertainment - so this made the decision much easier.

So far she is quite pleased with the experience.  The only thing I did to the OS so far was add Google Chrome because FireFox for some reason does not appear to be as good as Chrome on Linux or even as good as FireFox on Windows.  One of the key features failing in FireFox on LinuxMint is that the address bar does not double…