Showing posts with label Learning. Show all posts
Showing posts with label Learning. Show all posts

Wednesday, February 15, 2012

You Are Not the Language You Write Code With

Lately I've been thinking a lot about my career and what I'll think about when I reflect on it when I'm retired. Will I look at myself as a ColdFusion programmer?  Will I look at myself as a JavaScript programmer?  I'm pretty sure I'll just look at myself as a programmer.  This got me thinking about how others perceive me as a programmer.  Do others come to my blog and never read past the first two words of  "Ryan's ColdFusion and Web Development Blog"?  Am I automatically dismissed as a programmer because I primarily associate myself with ColdFusion?  I'd like to hope not but I'm sure there are more people that do than I'd like to admit.

This brings me to my point, a developer is not the language they prefer to code with.  A developer is defined by so much more than that.  I'd hire a good Python developer to write ColdFusion applications even if they've never even seen a line of CFML in their life.  A good developer will be a good developer in any language.

So what does define a developer if its not the language they write with?  For me its a few things, first its what they have given back to the programing community through their contributions to open source projects.  I'm not saying Java developers should go out and contribute to Ruby projects.  Its perfectly fine to stay in an area of expertise. The point here is that a developer that gives back by contributing to open source projects shows that they have a passion for writing software that helps others and for writing code in general.  Passion goes a long way to making a good developer.  

Secondly I think a developer can be defined by their thirst for learning new things.  The world of programming is always changing, it can be exhausting to think that the learning never stops.  It can also be exciting and fun.  I wake up each morning looking forward to learning something new, when this feeling stops I'll know its time to get into management.  A developer who doesn't embrase the ever changing landscape will quickly get left behind by others who are actively seeking new things to learn.

Lastly I think a developer can be defined by their willingness to teach and help others.  I'm not talking about speaking at user groups and conferences here.  Yes, those things take tons of time and preparation and do help many others.  However, they are also self-serving engagements.  There's nothing wrong with that, but its the simple truth.  Speaking in public is an ego and career boost for the speaker.  What I'm talking about is spending one on one time with another developer helping them solve a problem or helping them master a new technique.  There's no reward in that other than the self satisfaction of helping someone else.  That't the kind of programmer I want to work with.

Wednesday, August 10, 2011

Learn JavaScript completely On the Cloud With the JavaScript Koans and Cloud9 IDE

Lately I've been investing a lot of time into learning JavaScript and one of the neatest things I've come across is the JavaScript Koans project.  If you haven't heard of Koans before the basic concept is to learn a programming language through the act completing unit tests in that language.   The most popular implementation of this concept is the Ruby Koans project (http://rubykoans.com/).  Liam McLennan took this concept and ported it over to JavaScript and his implementation can be found over on github (https://github.com/liammclennan/JavaScript-Koans).

When you pair this repository with the Cloud9 IDE you can work on them completely on the cloud without having to download a single piece of code locally.  Cloud9 (http://cloud9ide.com/) is an completely online and very richly featured IDE.  One of the great things about Cloud 9 is that it can access your github repositories and clone them into its environment for you to edit.  Cloud9 also provides you with a interactive console with git installed so you can push the changes back into your repository. The console will even give you intellisence on the git commands as shown to the right!

Assuming you already have a github account the first step is to fork a copy of the JavaScript Koans repository.  Once you have a forked copy of the Koans head over to the Cloud9 website and log into your dashboard.  Your dashboard will have a "Add On Services" section that will allow you to connect Cloud9 with your github account and pull in your public repositories.  One thing I've noticed is that if you've added a new repository since you last connected with github you'll have to connect to github again for Cloud9 to pull in the newly created repository.   Once the repository is pulled into Cloud9 next you'll have to select the project from the github menu and click on the "Clone to Edit" in order to be able to edit the files.

Once your github repository is cloned it will show up as a new project in the Projects area.  First click on the Koans project and click on the "Start Editing" button which will open up the project in a new tab.   Once your koans project is open double click on the "jskoans.htm" file to open it up in the editor.  The editor will detect that this is a HTML file and a "preview" icon will appear in the editor.  Click on this button to run the Koans.  When you do the jskoans.htm file will open in a new tab and run the koans unit tests, which will fail on the first test like so:



Whats important to note here is which file the error occurred on. The Koans are organized by topics, and each topic will have its own JavaScript file with qUnit tests that pertain to that topic.  Find that file that caused the error in the editor and open it.  You'll now see all the qUnit tests for that file.  Below you'll see the code from the first topic which is a brief overview of assertions.


Inside the assertion code there will always be two underscores "__" that denote an area where you are to fill in a value to make the test pass.  As you go through the exersizes save the unit test file and refresh the jskoans.htm preview page and you'll start to fill the page with passed tests.  The test runner will stop at the first failed test it finds. As more and more of the tests pass the page will begin to fill up with passed tests as shown in the image to the right.

Whats great about the koans is that its an open source project so community members can add more tests and actively improve the tests that are there, which are very good right now.  Some of the topics covered are: arrays, reflection, prototypical inheritance, objects, and functions and closures. Going through these you'll get to learn JavaScript the best way, by writing JavaScript.




Fork me on GitHub