Practicing Code with the DevChix

August 22nd, 2010 by comment admin

In February I finally decided to do something I always wanted to do with DevChix. I wanted to lead a group project intended for those who wanted to learn and could commit to 2 hours a week. I had 3 volunteers.. then two.. and then one! But thats ok, I know people get busy and other things going on, so no big deal. But cool thing is, even those that left said they learned something. So, my goal was still reached!

The Project

I had this idea in my head for awhile. One thing with lists is, you need to write down something if you want to do it today. We all have todo lists, and there are somethings we want to do every day. You may try to remember them without a list, or maybe you write them out. I thought it would be cool to have a todo list app that will give your list, allow you to check them off, then next day you have the same list. Bonus to have a graph of how many you did each day of the week. I think its motivating to see a graph of my progress.

Getting Started

Its my experience, when I start an app, I add user login and I get hung up on the authentication, tests and stuff and never get to the meat of the app. So I wrote a simple login system with just a username (no password), threw it in the session and wrote some simple methods to check to see if logged in. Later we replaced it with Devise with not much trouble at all.

What we learned

  • git, making branches, push and pull
  • erb and haml
  • grid 960
  • HighCharts a javascript graphing library
    devise, we added a whitelist so we can have a beta with only certain email addresses allowed to sign up.

  • publishing with heroku
  • rails of course

Challenges

Summer got busy, including a cross country move for me and new job! We still managed to meet about every 2 weeks. We used github for our code. We put our tasks in Pivotal Tracker and that worked fine. We used Github wiki to record meeting notes, what happened since last meeting and who is doing what for the next week. We’ve been able to meet weekly the past month or so as the summer is winding down.

Whats next?

We are deploying the app to DevChix for beta testing. From there, not sure.

ˆ Back to top

Apple's WWDC: A Whirlwind Tour

June 30th, 2010 by comment alexis

Apple’s Worldwide Developer’s Conference took place again this year in San Francisco, kicking off with the Steve Jobs keynote.

The iPhone 4 announcement came as no surprise to any Gizmodo readers, but for most developers, this didn’t matter: the conference highlights typically come AFTER the keynote anyway.  And we were rewarded with a new XCode, Safari 5, and other goodies that I can’t talk about because the rest is under NDA!

However, there is lots to show and see outside the NDA, including some of the amazing women developers.  So come along and get a taste of the keynote line, the structure of our days, the parties, and a peek at some of the wonderful attendees who make WWDC such a fun and educational event:

Lastly, if you are a certified Apple developer and want to see the sessions you missed, Apple has released them for FREE to all registered developers!

ˆ Back to top

Remote Pair-Programming

February 11th, 2010 by comment Nola

Seems like Pair Programming is “all the rage” lately in my circles. I haven’t exactly done it before but after hearing about the success and rapid knowledge growth amongst those that pair program…I was almost dying to try it! Especially after i saw David Chelimsky and Corey Haines at WindyCityRails in Sept 2009. I saw them pair and do BDD with Rspec/Cucumber and it was so fascinating, It was like I was watching a ballet as they hopped from RSpec to Cucumber and back and forth. I was like, wow…I wish I was that good! I would have paid good money for a recording of that so I could watch it again and again! I see Corey Haines traveling around pairing with people too. Some people get together and play cards, but Corey gets together to code!

So ok, I like code, I like people, I want to try it! I live a little south of Chicago so its a long commute and it seemed everyone was so busy to pair in person when I asked. I asked on Devchix mailing list for suggestions on how to do pairing online. I had found a few, and the group had some good suggestions. I even had a volunteer to try it with me! This week aimee and I set a few hours aside to try it and see if we could do it!

This article was also sort of “paired” as it was written from my perspective with input and suggestions from aimee!

We asked on Devchix mailing list for suggestions on how to do pairing online. I had found a few, and the group had some good suggestions. I even had a volunteer to try it with me! This week aimee and I set a few hours aside to try it and see if we could do it!

After introductions on Skype we set about getting a shared environment in which to code together. Ideally, we wanted some kind of desktop sharing so we could run tests, console and editor.

We had heard of a few tools and got suggestions from the devchix list:

IChat desktop sharing – we couldn’t get this to work, we did different things and it would appear to connect but then it failed. I tried to mess with settings for Sharing on mac, but nothing doing.

Rio seems to be a library to make collaborative apps, not to use in a pair programming environment.

BeSpin was hard to use.. we couldn’t figure out exactly how to use it. It almost seemed to offer to import the git repository we were working on, but then it said it only supports Subversion and Mercurial, not git.

SubEthaEdit worked but we would have to open each file individually and share each file… unless I was missing something. This would be fine for collaborating on a single file but then we could not share the test runs, terminal commands or view the browser together.

Etherpad – we didn’t end up trying this but I have used it before to debug some code or try out ideas with a friend. They recently got bought by Google, so it would be interesting to see what they do with it. This would suffer the same limitations as SubEthaEdit in that it’s just a text editor.

GoToMeeting (which is $40-50/month) its a little steep for the open source work I want to do. But people say it works really well.

VNC and Unix Screenaimee had used this successfully before but since we weren’t on the same network, just our laptops at home, we weren’t sure it how we could make it work easily.

Then we came to TeamViewer which worked brilliantly! We shared desktop and I could type in aimee’s console window, see the tests running and type in textmate. Even with aimee on her Dvorak keyboard and I on Qwerty! I could type fine but couldn’t copy/paste with keyboard shortcuts so I used the mouse to copy/paste and it worked fine.

All in all, it was an awesome experience and I picked up on a few tidbits of knowledge from aimee on git, and rake! I had some bits of code from another project i was able to quickly copy/paste and get us rolling. We had a few discussions about coding style as we went.

Since aimee was more familiar with the codebase, she mainly wrote the behavioral specs and I wrote the code to satisfy them. We plan to switch around next time, when we pair on a different project that I’ve been developing for a while.

ˆ Back to top

Book Review: "Refactoring in Ruby"

January 4th, 2010 by comment Nola

“Refactoring in Ruby” written by William C. Wake and Kevin Rutherford.
Published by Addison-Wesley

This is more like a “workbook” then a “how to write awesome code” book. You can download the code from github http://github.com/kevinrutherford/rrwb-code and you will find tests/specs for the exercises.

The book is arranged in three parts, The Art of Refactoring, Code Smells, and Programs to Refactor.

There are explanations of “code smells” which are one characteristic of code that could be improved. Some of them are long parameter lists, unnecessarily complex, global variable, feature envy sections, etc. One thing I find interesting is the “How did it get this way?” section. It gives some insight into the thought process and reasoning behind the smell. I think this is good, as programmers our ego may be rather miffed to hear “This code stinks” but with some reasoning, it makes the pain less and I think firms up in our minds when this happens again, to do it this other way. I always want to know why when someone says I could do such and such thing better.

In addition to the code smell examples there are three programs to refactor in the end of the book. In a conversational tone, it walks through and gives some hints on what needs refactoring. Its almost as if you had a pair programming buddy working with you and identifying in small chunks what can be improved. This is definitely something I want to work through more carefully.

What I find odd, is that not all the code smells have code examples. The inspiration for the book I think is the Martin Fowler book “Refactoring Improving the design of Existing Code” which has examples for every code smell. Maybe Ruby smells less than Java? Or those fixes are really trivial? I don’t know. Overall, this is a great book and is certainly worth the price and investment and you will be a better programmer because of it!

ˆ Back to top

She's Geeky 2010 Bay Area, Jan 29-31

December 15th, 2009 by comment gloriajw

She’s Geeky is my favorite stateside women’s tech event. It is a great opportunity to network, learn about other women’s projects and ideas, and test the viability of some of these ideas against receptive VCs. It’s also a great un-conference environment. It is low-key, entirely attendee-drivien, and will be whatever you all make it. I was thoroughly impressed with this conference, now hosted multiple times a year throughout the country, each with it’s own regional twist. It can be a great place to find your next job, start your next dream project, or simply be inspired by others who are doing so.

Early registration ends Friday. Go here for details.

Gloria

ˆ Back to top

How rails has changed how I seek for a job

December 10th, 2009 by comment narwen

For nine years, I have developed for the web. Over the years I’ve programmed in C, C++, Python, Java, ASP, PHP, Perl, and most recently, Ruby.
Since my first job as a developer, I’ve never looked for a new job: all of my job transitions have come through friends or co-workers.

In mid 2007 I was happy working with Perl. One day a friend told me about a Ruby on Rails job. Back in 2007, Rails developers in Brazil were rare. Because of that, the employer was seeking someone who fit the company instead of someone with Rails experience. That was great for me!

After a pleasant summer, the new job’s charm wore off and I decided that I wanted to move on but continue to program with Rails. Finally, I left my job.

When I started to send out resumes I soon realized that Rails’ culture fundamentally changed the way that a Rails job search functioned. In addition to the traditional resume or CV, Rails jobs demanded to know about Working With Rails, LinkedIn, GitHub, Twitter, personal blogs and sites, discussion forum posts, participation in open source projects, and a multitude of other online presences. These new demands made me realize that I hadn’t been cultivating a comprehensive web presence, which is not uncommon for female programmers, in my experience.

At first, this realization was disturbing. Though it’s still possible to get a Rails job without a vast web presence, I was upset to realize that I hadn’t been adhering to this best practice. It was particularly jarring the first time I was unable to answer these questions to potential employer.
The practice of software development as a craft is constantly reinventing itself and this includes the processes around job seeking and reputation building. Despite all of the hours, projects, languages, and jobs I’ve previously invested in, I now realize that I need to adapt to this new developer reality of being social and visible with my work in order to win back my standing as a desirable developer and potential candidate for a Rails position. The details of how I’ll implement that strategy will be the subject of an upcoming post, but I look forward to the possibilities ahead.

To read in portuguese.

ˆ Back to top

PyCon 2010 Financial Assistance Grant for Women

December 3rd, 2009 by comment gloriajw

I am happy as hell to announce that this grant exists. The deadline is Dec. 18th, and I strongly encourage you to apply.

http://us.pycon.org/2010/registration/financial-aid/

This conference gets a bit bigger each year, but the organizers make a great effort to keep the small conference feel. It also has many level-100 tutorials, and is both socially and technically welcoming for py-newbies.

Open space sessions (everything from software development to Settlers) and poster sessions happen every night, tutorials run two days prior, and code sprints run for a few days after the conference. It promises to be a great learning and social experience you should not miss.

I am reserving a room and sharing it: http://us.pycon.org/2010/registration/room_sharing/
I’ll room with as many as possible, to cut costs for everyone. Bring a sleeping bag :)

See you there,

Gloria

ˆ Back to top

Google Web Toolkit, 2.0

November 29th, 2009 by comment Nola

Our life basically lives on the web, the web is the platform! One of the advantages of creating your web application in GWT is it is pure html/javascript/css and the user doesn’t need to install a plugin to use your app! It is easily viewed on most smart phones as well. It compiles to each browser making it more efficient than using alot of if/else statments to build code for the particular browser you are using. It standardizes the method you use to make your app, no more studying the nuances and ripping your hair out over tiny browsers quirks. GWT 2.0 which is scheduled for release this fall has some great new features that I am finding to make GWT more flexible and easy to maintain.

Get GWT Trunk
The 2.0 features talked about here are in trunk and building it yourself is fairly straight forward.

  1. If you don’t already have it, get the latest version of eclipse – Galileo, with the Google plugin.

    http://code.google.com/eclipse/

  2. Checkout the source code
    Follow the instructions on the GWT homepage, its pretty good.
    Make sure you have ant installed. It takes awhile, i think maybe 20 mins or so on my macbook.

  3. Setup the API directory in the Preferences for GWT
    In eclipse, add the new version of GWT library.

    Go to Eclipse > Preferences.
    Find the Google Web Toolkit on the left. Click add, add the path to the compile files like so:
    ~/gwt/trunk/build/lib
    I named it “trunk”

  4. Create project
    Create a new Web Application Project, select “trunk” (or whatever you named it in the previous step) as the version of GWT to use.

The most interesting things in 2.0 is the UiBinder and UiHandler.

Using UiBinder
Usually for each element on the page you need to do something like this


CheckBox box = new CheckBox("this is the label for the checkbox");
box.setFormValue = "3";

Panel verticalPanel = new VerticalPanel();
panel.add(box);

If you have alot of elements on the page, that comes out to alot of java code. And you might start wondering if you are writing a Swing app or a web app?!?

in UiBinder, we can can put it in a XML file like:


<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:VerticalPanel>
<g:CheckBox ui:field="rubyCheck" formValue="ruby">Ruby</g:CheckBox>
</g:VerticalPanel>
</ui:UiBinder>

Typically any attribute you can use in the java code like setName, setFormValue, setStyleName you can add right in the xml as attribute=”"

You can reference your objects from the xml like so:

public class LanguageList extends Composite {
interface MyUiBinder extends UiBinder<Widget, LanguageList> {}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
@UiField CheckBox rubyCheck;
public LanguageList() {
// bind XML file of same name to this class
initWidget(uiBinder.createAndBindUi(this));
// use rubyCheck as if you had defined it already with new
rubyCheck.setStyleName("rubyCheckStyle");
}
}

Note you have to bind the xml to the java code with:

interface MyUiBinder extends UiBinder<Widget, LanguageList> {}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);

This process is called deferred binding. This may be familar to java programmers already but My background is LAM(P|P|R) programming so I am still trying to fully understand it myself! GWT homepage explains it here: http://code.google.com/webtoolkit/doc/1.6/FAQ_Client.html#Deferred_Binding

Using UiHandler

Typically, event handlers are written as such:


// add button and handler to alert the values of checkboxes
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
String output = "";
for(CheckBox box : boxes) {
if (box.getValue()) {
output += box.getFormValue() + ", ";
}
}
Window.alert("You checked: "+ output);
}
});

Instead of having the click handler specified in the java method, you can attach it via an annotation:


@UiHandler("languageButton")
void doClick(ClickEvent event) {
String output = "";
for(CheckBox box : boxes) {
if (box.getValue()) {
output += box.getFormValue() + ", ";
}
}
Window.alert("You checked: "+ output);
}

Sweet, huh? I think it cleans up the code nicely and gets the job done!

Go compile the Trunk version of GWT and give it a try!

If you want to see the full source for a simple gwt app before and after UI Binder, I have a write up here with links to sources on github here.

Resources for learning gwt that I found helpful:

GWT Homepage
http://code.google.com/webtoolkit/

GWT Can Help You Create Amazing Web Apps
http://www.youtube.com/watch?v=T0X9BcBd-I0

GWT Best Practices
http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html

OnGWT – various blog posts about GWT
http://www.ongwt.com/

ˆ Back to top

Craftsmanship without the Man

November 28th, 2009 by comment Victoria

Recently on the Devchix mailing list, aimee brought up the software craftsmanship movement and asked whether other women felt awkward about being labeled “craftsmen.”

Some of our members were fine with it, while others said they felt alienated by the term. Beth explained that it was because of its usage in the movement—“master craftsman” is held up as an ideal that everyone should aspire to, but its male bias makes it difficult for some women to relate to it.

We discussed alternatives like craftsperson, crafter, and artisan. After a bit of brainstorming, Tess came up with “codesmith.” Many of us were excited about this term—it has a fun and geeky vibe that captures the enthusiasm we have about our work, while having the same emphasis on creation present in “craftsman.”  While it’s certainly based on words like blacksmith, I like to think of it as more similar to wordsmith—a person who is skilled at using language to make something great.

As the sort of programmers who get into debates over small differences in syntax and rack our brains to come up with the most appropriate name for some variable, we know language is important. It’s a shortcut for identifying something, but over time it can create expectations and beliefs. Making changes to language can be difficult, but in the case of being inclusive to women in a women-starved field, I think it’s worth it.

ˆ Back to top

PyArkansas: Small town, big tech!

November 21st, 2009 by comment gloriajw

Last weekend I flew out to to Little Rock, Arkansas, took a two hour crawl through a snarl of traffic, and arrived just in time for my Friday night pre-PyArkansas tutorial in Conway. Held on the stunning campus of Hendrix College, I wended my way around buildings, a massive fountain, inspiring structures, until I found the building where my tutorial was about to happen. Standing in the foyer with the beautiful Foucault pendulum, I could not help but to stop for a moment, exclaiming “Oooo!!!!” aloud, wishing I had gotten there thirty minutes earlier.

My tutorial was intended to encourage women in computer science by serving two purposes: discussing the source code and functionality of a particular project, and openly discussing some of the issues they faced in their current programs and surroundings. I was pleasantly surprised to discover that these women needed no technical or social encouragement. They are already enthused, technically and socially well prepared, and on their way to a very bright future in engineering or computer science. I was pleasantly surprised that they were very comfortable in the bash shell, and as comfortable in their current college curriculum. Like children at play, they picked up the moderate-levelled tutorial code quickly, made great strides in such a short time, and had a lot of fun doing it.

It was profoundly encouraging to see such a small computer science program achieve diversity as well as such a high level of skill. It made me wonder why larger colleges and universities cannot accomplish the same on bigger budgets, with larger staff, and a more diverse mix of students. It touched me to hear and see the enthusiasm, eagerness, and skill of the students in this program. Their learning experience under the Department Chair, Dr. Burch, comes as close to perfect as I have ever seen.

The next day’s events at PyArkansas were held at the also-very-nice campus of University of Central Arkansas, where an entire day’s worth of tutorials took place. Two Python 101 tracks were held: one for programmers and one for non programmers (a great concept). An all-day Django Track was given, where the advanced course was taught by Jacob himself. I held an afternoon tutorial addressing advanced Python concepts, with downloadable example code, where we compared and contrasted build and deployment tools, played with regex, and showed examples of some internal Python oddities involving static variables. I unfortunately missed the Python Blender tutorial, held at the same time as mine, and I heard it went quite well.

The campus facilities were very accomodating. Everything was well organized,and up and running for us when we arrived. This is a very welcome surprise to anyone who has travelled a bit to do tutorials. I was specifically told by Dr. Chenyi Hu, the Department Chair of UCA, that he really does care about diversity, and it is something they strive to achieve. This was truly touching, quite impressive, and a pleasant surprise from such a small town.

Kudos to Greg Lindstrom, Dr. Carl Burch of Hendrix College, Dr. Chenyi Hu of UCA, and everyone else involved. You induced a big technical “tremor” through your small town, which echoed far and wide. It is yet another example of the great people drawn to the Python community, and the amount of quality effort they are willing to give back. I feel honoured to have been part of this event, and I hope to be involved in many more to come.

Gloria

ˆ Back to top