I’m a practical guy. I like utilitarian pottery, stuff like butter dishes by Warren MacKenzie. I’m not a big fan of vases that just site there and look nice. If you’re going to make something, give it a purpose. I’ve written about ten attributes of high quality software, by analogy, in the previous article. Now I want to give some practical things that can be done to build those attributes into software for the web. - Correct: BDD A slow Porsche isn’t going to get you any ladies, and incorrect... Read the Rest →
Here’s some attributes that are commonly cited as being associated with high quality software: correctness, robustness, user-friendliness, adapt-ability, reuse-ability, interoper-ability, efficiency, port-ability, security, and replace-ability. Dan Wooster recently asked what I thought about those attributes. My immediate reaction was that they’re a great description of what high quality code looks like. But I asked myself: What is it about those attributes that are so great? Why do those attributes go hand in hand with high quality code? Software has been around for a while, but “hardware” has been around for... Read the Rest →
Most line numbers I get back from MS SQL Server are all the same: line 1. However, when working on big queries with a team or reviewing logged errors from stored procedures, using the line numbers in Management Studio is invaluable. Tools > Options Expand the Text Editor node Select the All Languages node Under the Display header in the right pane, check the Line Numbers box
I recently needed a form input that acted like a select input with a droplist of items, but it also had to allow the customer to type in a custom value. The customer wanted an input with and autocomplete droplist that didn’t force the user to use one of the autocomplete items. In the jQuery docs there’s a jQuery UI Autocomplete Combobox Plugin. Since we use jQuery and the UI, I started with this code and did a simple update around where the autocomplete input is blanked out for “invalid”... Read the Rest →
I had an odd issue with UPS shipment methods the other day. A customer complained that their Canadian address was not returning UPS shipment pricing. It’s important to note that on this particular (old) website, Canadian addresses are hand typed by the user into standard text inputs. Oops! Don’t let users have the opportunity to enter garbage data. If you do, they will. It’s just one of those laws of the universe. Thermodynamics? Here’s the error: UPS: 111286: {Provided State} is not a valid state for the specified shipment. The... Read the Rest →
I found an article on setting up my .gitconfig file to launch p4merge as my custom merge tool: Using p4merge as a custom Git merge tool on Mac OS X The problem was I would get the following errors when there were spaces in my merge file paths. For a path like /path/to the/file.rb I would get something like: Incorrect parameters: Too many files: You may enter a maximum of 4 files. '/path/to' is (or points to) an invalid file. 'the/file.rb' is (or points to) an invalid file. ... Here’s... Read the Rest →
Via: Medical Billing And Coding And me at my standing desk:
I’m currently enjoying reading about algorithms that have been implemented in javascript. Here’s one called Duff’s Device that speeds up the execution of large loops by reducing the number of iterations over the loop: // Begin actual Duff's Device // JS Implementation by Jeff Greenberg 2/2001 var n = iterations / 8; var caseTest = iterations % 8; do { switch (caseTest){ case 0: [Do Something to tesVal here]; case 7: [Do Something to tesVal here]; case 6: [Do Something to tesVal here]; case 5: [Do Something to tesVal here];... Read the Rest →
I did a quick little Google search for a dynamic month and year droplist for credit card expiration dates. I tried two or three searches in Google and couldn’t find anything for PHP. So I rolled my own: //Inside my view <select id="exp_month" name="exp_month"> <?php MonthList() ?> </select> <select id="exp_year" name="exp_year"> <?php YearList() ?> </select> //In your model/controller or some other place you like to keep random stuff like this /** * Populate the credit card expiration month drop down */ function MonthList(){ for($i=0; $i<=11; $i++){ $time = mktime(0, 0,... Read the Rest →
Need webistrano installed on CentOS? Well do I have the step-by-step, leave nothing out, directions for you! Skip the sections you don’t need, but this includes: installing Ruby, MySQL, Rack 1.01, MySQL ruby gem, Webistrano w/ remote database. That’s right! All the little details, even how to connect to that fathomdb database. 1) Ruby (and Rails) [okay... this is coming...] 3) “Fix” Rake $ gem uninstall rack $ gem install rack -v 1.0.1 2) MySQL (you need this even for a remote database, as it provides the necessary headers so... Read the Rest →