Monday, December 28, 2009

Here's to the Quiet Ones


 First off, I hope you are having an awesome holiday season. I was enjoying mine this past Sunday and talking to my cousin Duane Roelands, who is also a .NET developer, about programmers. I said (and I think this is stolen from somewhere, just not sure where), "There is no such thing as famous programmers, just loud ones." He retorted that there definitely were famous programmers. After some back and forth I thought of people like DHH and R Stallman who are not only loud, but also accomplished and therefore I would consider them famous. I had to concede. 


This got me thinking of the shy quiet amazing developers I have met, and there have been a lot of them. The ones you have heard of were shoved out into society for accomplishing great things, usually amongst much protest. However, the majority haven't crossed your path. Meeting guys like this surprised me in the beginning, because I didn't understand why they didn't shout it from the mountains. In fact, most of the best developers I have spoken to have been very quiet and introverted. It's made me grill all the programmers I meet because I can't rely on the fact that they will be outgoing enough to share if they have some learning to drop on me. 


I love the opportunities I have to be around great developers all the time, really love absorbing what they have to say. So I wanted to take a second and tip my hat to the quiet ones. Because I really appreciate all you have taught this total spaz. 


***EDITOR'S NOTE: I was going to make a X - Talent of Developer, Y- Vociferousness of Developer graph, however, I felt that it would inspire criticisms. However, it would have been funny.***



Sunday, December 20, 2009

Spoke at Girl Geek Dinner - World Still Intact


Despite my protests I was invited to speak at this past weekend's Girl Geek dinner. I can't tell you guys how great it was to be around a room full of nerd girls. I take back that we shouldn't have support groups, kind of. I still think we could use more time spent focused on accomplishing things. I would love to see more GTD from the ladies. I'm not against us getting together, however. Though it may be a little sexist and counter productive, the positives outweigh the negatives. 


Everyone there was so friendly, a girl even gave me her homeabde ring after I complimented it! It seems the whole thing was videotaped and should be going up on their site. 



Thanks to the ladies of GGD for inviting me, I look forward to attending another!



Here are some pictures from the GGD facebook page:










Sunday, December 6, 2009

Easy HTML Templating with JQuery

 I have been wanting to write a blog about this for a while and my first post on Devlicious is the perfect place. Firstly I have to thank Jess Chadwick for his help with this when I first started out with the Bundl.it project. Working with ASP.NET MVC has been wonderous, but when I was first starting out I was confused how I would replicate some of the behavior I was used to on my heavy server controls.


I wanted my page to be quick, and to do this I wanted only the amount of HTML I need to display to be on the page. When I was using webforms I would probably do this with a repeater, but I'm using .NET MVC so I thought dynamically generating the HTML was the way to go.


Your first step is creating your template; your template is the HTML that gets added to the page. You want it to be hidden; throwing it in a script tag is a good way to do this. You need to give it an ID that can be referenced in your code. You can create multiple templates as well. I am creating an unordered list.


My template looks like this:


  <script id="ItemTemplate" type="text/html">


        <li class="item" value="|rowNumber|">


              <input type=”text” id=”input|rowNumber|” />


        </li>


    </script>


 


Now within my code I need to put a place holder where I want my HTML to go.  I have my unordered list called url_list.


 


<ul id="url_list"></ul>


 


Now, you see that most of my items look like this “|rowNumber|” I have a variable in my code called nextUniqueItemID (I believe in extremely descriptive variable names). Here is my “addItem” function.


 


function addItem() {


        var list = $('#url_list'),


                      items = list.find('li');


        list.append($('#ItemTemplate’)


                                    .html().replace(/\|rowNumber\|/gi, nextUniqueItemID++));


      


    }



 The list item gets added on user action. You can interpret it how you want The first thing it does is find my unordered list using the ID selector. Then the append function locates my template using the same selector and adds it to the html inside the url_list. It also replaces the rowNumber with the nextUniqueItemID, that way when I can reference this particular input when submitting my form. . It's that easy!


 


 






Wednesday, December 2, 2009