Recent Updates Page 2 RSS Toggle Comment Threads | Keyboard Shortcuts

  • John Congdon 3:16 pm on September 17, 2011 Permalink | Reply
    Tags:   

    I am proud of my progress with Javascript. I used to consider myself a javascript hacker. I could put other people’s components to work, but wasn’t comfortable writing my own.

    I would consider myself much more proficient today. I can write maintainable/reusable Javascript. I have become more capable of writing routines that can be used on multiple widgets easily.

    My latest code has been able to work on multiple “widgets” within one page. This was exciting for me, and I ended up staying late at work the other night as I got near completion. I was sooo happy with my accomplishment, but being the only programmer, it can be tough. Nobody really appreciates the successes that I feel are so exciting. It’s not their fault by any means, they just are not into the tech as much as I am.

    At the end of the day, I tell my wife. She is the best cheerleader a guy could have. While she doesn’t fully understand, she puts on a smile and tells me how great it is when I do accomplish the small things. She tries so hard to be understanding and just there for me. I am a lucky lucky man.

     
  • John Congdon 2:17 pm on August 4, 2011 Permalink | Reply
    Tags: , patch, visualsearch   

    Patch for VisualSearch.js To Prevent AutoSearching 

    I learned about VisualSearch today when I listened to The Javascript Show podcast.

    I started using it for some backend work. However, I did not like the fact that as soon as you completed a facet, it did the search automatically. Don’t get me wrong, it is great for the way DocumentCloud is using it. Very ajax responsive, but for what I am trying to do, I needed that to stop.

    I changed it so that I could pass autosearch: false as a parameter to VisualSearch. Now it will only search after hitting enter.

    --- visualsearch.js        2011-08-04 13:16:46.000000000 -0400
    +++ visualsearch.js     2011-08-04 13:23:21.000000000 -0400
    @@ -30,6 +30,7 @@
         var defaults = {
           container   : '',
           query       : '',
    +      autosearch  : true,
           unquotable  : [],
           callbacks   : {
             search          : $.noop,
    @@ -543,7 +544,9 @@
             var originalValue = this.model.get('value');
             this.set(ui.item.value);
             if (originalValue != ui.item.value || this.box.val() != ui.item.value) {
    -          this.search(e);
    +            if (this.options.app.options.autosearch) {
    +                this.search(e);
    +            }
             }
             return false;
           }, this)
    

     
  • John Congdon 8:32 am on July 28, 2011 Permalink | Reply
    Tags: , ,   

    Watch me throw the Brunswick C-System Ulti-Max 

    [bowlingball value="9659"/]

    Based on the [bowlingball value="9120"/], I was expecting The [bowlingball value="9659"/] to be a hooking monster. Brunswick was able to make the ulti-max even more angular. I think this was accomplished with a pearlized coverstock that helps the ball easily clear the heads, going longer before making its move towards the pocket.

    The ulti-max has a great color combination that makes the bowling ball very appealing as it rolls down the lane.

    Find some oil, keep your speed up, and let this bowling ball do all the work for you. Fantastic job Brunswick.

     
  • John Congdon 11:37 am on July 15, 2011 Permalink | Reply
    Tags:   

    PHP Excel/reader.php Date Format Error 

    I, like so many others have been confused by the Excel/reader.php problem with dates. I took the time today to patch it for myself. This works in my situations, but may not in yours. Make a backup before trying this.

    You will see in the diff that for some reason the date being returned was off by a day, so I fixed by adding 86400.

    Here is the patch:

     
  • John Congdon 8:27 am on July 8, 2011 Permalink | Reply
    Tags: , , , presentations   

    Why Aren’t You Using Git Flow? 

    I gave a presentation at Orlando PHP last night. I had a great time, and everyone there was fantastic.

    I really want to improve my public speaking. I gave a very simple introduction of myself to a Google Checkout panel a few years ago and thought I was going to passout. I felt I did a horrendous job, and all I was doing was talking about myself and the company I work for.

    Enough about that. Last night I was running late due to traffic on I-4 because of the rain. I got there and was very surprised to see one of the biggest turnouts we have ever had for Orlando PHP. I quickly setup my computer while David Rogers talked a little about GIT.

    I sped through my slides a little bit. I really didn’t want to just sit there and read what was on them. I wanted to be personable, clear spoken, and desperately wanted to avoid filler noises (ah’s, umm’s, like’s and you know’s). Overall I am very happy with the way it turned out.

    Had I gotten there early, I would have setup a tripod and camera to tape it. Because I was running late, I scrapped that.

    People were asking me some great questions, and I hope I took enough time to answer to the best of my ability. Some things I deferred to other members of the group that had better answers. Thank you Ketema for stepping in where you could.

    I have become very passionate about using Git & Git Flow for my development. It has truly made me a better developer, rather than just a hacker.

    Thank you to Vincent Driessen for sharing his git workflow originally. I used it for a couple of weeks, but ultimately did not keep up with it. At some point he released the “git flow” tools that I used in my presentation. I became aware of these tools thanks to Jeff Kreeftmeijer who wrote a blog post titles “Why Aren’t You Using Git Flow?

    I have some resources at the end of the slides that you can refer to.

     
  • John Congdon 11:33 am on June 30, 2011 Permalink | Reply
    Tags: dojo javascript   

    Dojo dijit.form.Form submission with a dijit.form.Button 

    ARGH!!! I searched and searched for a very long time for this answer. I hope it helps someone.

    I couldn’t seem to get the form to submit correctly. I tried various ways. Widget’s, non widgets, declarative, programmatic.

    Turns out for some very strange reason, the form does not take kindly to data-dojo-type, it must use the older dojoType.

     
  • John Congdon 7:02 am on June 28, 2011 Permalink | Reply
    Tags: git macosx   

    Getting “flags:FATAL unable to determine getopt version” while trying to do git flow init 

    I am preparing for a presentation on git flow for the Orlando PHP Users Group. I don’t use git flow on my laptop, so I thought I should set it up since the wireless is kind of spotty at our meeting place.

    Installation was simple enough, however when trying to init I was receiving an error about getopt.

    JC-PowerBook17:gitflow jcongdon$ git flow init
    /opt/local/bin/gitflow-shFlags: line 119: 70405 Trace/BPT trap getopt > /dev/null 2>&1
    flags:FATAL unable to determine getopt version

    By running getopt directly I found this

    JC-PowerBook17:gitflow jcongdon$ getopt
    dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
    Referenced from: /opt/local/bin/getopt
    Reason: no suitable image found. Did find:
    /opt/local/lib/libintl.8.dylib: mach-o, but wrong architecture
    Trace/BPT trap

    Basically it looks like my libintl.8.dylib is not correct. I ran the following:

    JC-PowerBook17:gitflow jcongdon$ otool -L /opt/local/lib/libintl.8.dylib
    /opt/local/lib/libintl.8.dylib:
    /opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
    /opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)

    I see that this is version 10.1.0. I then ran:

    JC-PowerBook17:gitflow jcongdon$ otool -L /opt/local/bin/getopt
    /opt/local/bin/getopt:
    /opt/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

    WTF?!?!? getopt is looking for 9.2.0? It turns out that I tried doing something along time ago that messed up my libraries. Luckily I made a copy of them for some unknown reason. I just copied my backup version over the old one and it works. I probably broke something else in the meantime though. :’-(

     
  • John Congdon 3:03 pm on June 9, 2011 Permalink | Reply
    Tags: autocomplete, , , multi-column autocomplete   

    jQuery Multiple Column AutoComplete (multicolumn) 

    I was searching for a way to do a jQuery multicolumn autocomplete with a search box, and kept coming up short. The solutions out there were more table based, with a single row of similar data.

    On http://www.bowlingball.com I wanted to have 3 distinct columns when someone searched, the first was for product, the second for articles, and the third column would contain any matching pro shops.

    Here’s how I did it, not saying this is elegant, but it works.
    1) Create a custom autocomplete widget, based on the one that comes with jQueryUI.
    2) Override the _renderMenu function
    a) This sets up my columns, and their headers
    b) Used CSS to format and float them so that they are side by side.
    c) Used $.each to run through the items, examine item.category (set via Ajax data) and appended that to the appropriate column
    3) Created a _renderItem that creates each individual item.
    a) This creates the div of the item to be appended. It checks for certain pieces such as an image and uses that to create the view

    Using jQueryUI autocomplete:

    $.widget(“custom.catcomplete”, $.ui.autocomplete, {
    _renderMenu: function( ul, items ) {
    var self = this;
    ul.css(‘z-index’, ’99999′);
    ul.append(“<div id=’productColumn’><div class=’autoCellHeader’>Products</div></div>” +
    “<div id=’articleColumn’><div class=’autoCellHeader’>BowlVersity Articles</div></div>” +
    “<div id=’proshopColumn’><div class=’autoCellHeader’>Pro Shop Locator</div></div>” +
    “<div style=’clear:both;’></div>”);
    $.each( items, function( index, item ) {
    var column = “#” + item.category + “Column”;
    self._renderItem( ul.find(column), item);
    });
    },
    _renderItem: function( appendTo, item) {
    if (item.image) {
    var cell = $(“<div class=’autoCell’></div>”);
    cell.data( “item.autocomplete”, item )
    var reviews = ”;
    var image = ”;
    var video = ”;
    if (item.image) {
    image = “<div class=’imgCell’><a href=’” + item.value + “‘><img src=’” + item.image + “‘ align=’left’ height=’35′ width=’35′/></a></div>”;
    }
    if (item.reviews) {
    reviews = “<br/><a href=’” + item.value +”&reviews=1#tabs’><img class=’reviews’ src=’” + item.reviews + “‘ alt=’Read Reviews’ title=’Read Reviews’ />(” + item.reviewCount + ” reviews)<br/><img class=’reviews’ src=’http://c0004111.cdn.cloudfiles.rackspacecloud.com/ReadReviews_95x12.png&#8217; alt=’Read Reviews’ title=’Read Reviews’ /></a>”;
    }
    if (item.video) {
    video = “<a href=’” + item.value + “&video=1#tabs’><img class=’video’ src=’http://c0004111.cdn.cloudfiles.rackspacecloud.com/WatchVideo_90x12.png&#8217; style=’padding-left: 15px;’ alt=’Watch Video’ title=’Watch Video’ /></a>”;
    }
    cell.append( image + ‘<div><a href=”‘ + item.value + ‘”>’ + item.label + ‘</a>’ + reviews + video + ‘</div><div style=”clear:both;”></div>’ )
    cell.appendTo( appendTo );
    return cell;
    }
    else {
    return $( “<div class=’autoCell’></div>” )
    .data( “item.autocomplete”, item )
    .append( ‘<a href=”‘ + item.value + ‘”>’ + item.label + ‘</a>’ )
    .appendTo( appendTo );
    }
    }
    });

     

    My inspiration and guide came from http://stackoverflow.com/questions/2744747/quick-example-of-multi-column-results-with-jqueryuis-new-autocomplete which was using a table to align information.

     
  • John Congdon 7:12 am on June 3, 2011 Permalink | Reply
    Tags: meetup,   

    My First Experience at the @OrlandoPHP Coding Dojo 

    I attended my first coding dojo last night for our Orlando PHP Meetup.

    Boy was I confused. In my mind I was thinking the javascript library Dojo. I thought maybe they used Dojo as a front end to a PHP backend, and just did some coding samples. I have been wanting to use Dojo (the javascript library) lately, so that is why if was top of mind.

    The coding dojo is interesting. Simply put, it’s like a karate dojo, in the sense that it is a programming practice. Pick a simple problem, lay the groundwork, and start developing. Not start coding. They guys running the group stress good TDD (Test Driven Design) practices, which was great. I heard many people last night say something to the effect that the project will take twice as long, because you are writing twice as much code.

    While I feel I am a decent programming and make a living, I realize that there are many new programmers that come to these meetups. It was nice to feel like I was contributing to someone else’s learning. I was able to relay some of my personal experience with spaghetti code that I am working on untangling now. TDD is the best way for me to untangle the mess.

    All in all, I prefer the presentations when they have them. I have volunteered to do one (I want to improve my speaking skills). I may not make all the dojo’s, only because I drive an hour each way, however I will definitely contribute to others learning when I can.

    Thanks #OrlandoPHP

     
  • John Congdon 12:13 am on May 28, 2011 Permalink | Reply
    Tags: geek, nerd   

    Top 10 Nerdy Music Video Parodies 

    @SnipeyHead tweeted this link out and I found all the videos great. A couple I have seen before, but they were all great to see. This is probably my favorite of the bunch.

    http://nerdbastards.com/2011/05/19/top-10-nerdy-music-videos-parodies/

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel