Collaborative Ruby resources for novices - ruby

I am very much a Ruby newb - hoping to migrate to Ruby on Rails (although I have walked through Mike Hartl's Tutorial, which was excellent). I just want to solidify my Ruby knowledge first.
I am working on a hobby Ruby project to help me learn. I am pretty happy with how far I have got so far, but wanted to discuss/share it with other like-minded novice/beginner programmers.
Can anyone point me to a 'community' that promotes collaboration, critisim and discussion on code (ideally Ruby, obvs)?
If such a community doesn't exist, does anyone have any advice on how to find other like-minded programmers working on small-scale scripts/programs?
I have an account on Github, and on here (obviously!). Whilst Github is great for navigating around, cloning and looking at people's code, I don't feel anywhere near the level where I can start to actually contribute to anything and likewise request people look at my code. Maybe I am just being a wuss and I should just jump in the deep end? Perhaps I am not using GitHub correctly as a 'social network'.
Also, from what I can see, StackOverflow is not the place to send out 'Hey, check this out and let me know what you think' type requests either.
Not meant to be a discussion - just whether anyone knows if such 'networks' exist.

It depends on where you're located, but hacknights (Ruby or otherwise) are probably up your alley. There are different flavors (Are you solving a stated problem? Working on something general?) but usually you can work with others in a collaborative and low-stakes environment. I'd suggest searching for "hacknight" in your area and look at any past or upcoming nights.
As an example, see http://www.meetup.com/torontoruby/events/53887372/

RailsCasts - very interesting project for knowing ruby-technologies.
Also you can going to software-company and start working, and you get criticism, discussions and collaboration :)

Related

Learn Ruby Without Poignancy

I suppose this is two very closely related questions:
Everyone says to start with Why's (Poignant) Guide to Ruby, and I can't stand that book; what's another good starting point for an experienced programmer that has a more serious tone?
If I'm not the sort of person who appreciates _why, should I skip Ruby because the community will not be to my taste?
I'm currently rolling through Programming Ruby: The Pragmatic Programmer's Guide. So far I think the concepts are well-defined by the authors, and the examples provided help clarify any misunderstandings. The book is available for free online or you can order a copy:
http://www.ruby-doc.org/docs/ProgrammingRuby/
Update: More current version of book (Thanks bgporter)
http://pragprog.com/titles/ruby3/programming-ruby-1-9
The only problem with the online version is that it is a little outdated. I don't know Ruby that well yet so I can't say how much of the book is still valid in all cases, but the examples have worked for me so far when I run them. Note that the book available for purchase is up to date. It's hard to beat free, so be sure to check this guide out.
That being said, I don't think you should skip out on Ruby just yet. I've had a blast learning the language so far, and I'm looking forward to doing some full-fledged web development with Rails soon. At the very least give the language a chance; I think you'll find it a joy to work with.
I bought a lot of books learning ruby, the Well Grounded Rubyist was hands down the best.
And while we aren't really a community of _whys, we are a community of people who appreciate creativity and cleverness in code. If you are the sort of person who thinks there should only be one way to do something, and that way should be the clearest and most straight forward possible, python is probably for you. If you are the person who likes to push the language as far as it will go to create interesting and clever APIs, ruby is probably for you.
The Ruby Programming Language.
Programming Ruby would be my choice. It's also known as the Pickaxe book because of the cover:
It's a great introduction to Ruby. Why they still have the huge API reference in it in this day and age escapes me, though. It makes it thick as a brick, which is its only fault.
You can also find it online, although I think it's the first edition, which is well dated: http://ruby-doc.org/docs/ProgrammingRuby/. The third edition is the one in print now, it was updated just months ago and covers Ruby 1.9.2, which is the latest version of Ruby at this time.
I don't particularly like _why either. He created some great libraries, but I can't stand the Poignant guide, nor any of the talks he made. You don't have to like him, or be like him to belong in the Ruby community.
Ruby Koans are great for learning those small things that make Ruby unique.
It's basically set of excercises that show you how things work. Each excercise is in form of a failing test, and you have to make sure it passes. And they're fun! :)
If you're going to do them all, I also suggest enabling autotest, so you won't have to run them manualy. This article explains how.
Not everyone says start with Why's book, for instance, me.
Here's a quick list of my on-disk Ruby books and references. You can search for their individual titles on the interwebs. Some are commercial, and some are free. I linked the ones that are part of an app's documentation that I saved as PDFs so I'd have them on my laptop.
Agile Web Development with Rails
Programming Ruby
Ruby Best Practices
Sequel cheatsheet
Sinatra Book
The Ruby Cookbook
The Ruby Programming Language
The Ruby Way
The Well Grounded Rubyist
Why's book is worthy, but reminds me of Hunter S. Thompson trying to write a programming book, complete with Ralph Steadman drawings, which really disturbs me.
Also, don't overlook using ri, which is the on-disk reference to Ruby's libraries and gems. Also, the core library and standard library docs are really useful.
I was in your position this summer. Why was not for me, but I did find an excellent online resource: http://railstutorial.org/. It is actually for learning Ruby on Rails, but you can use it to learn Ruby as well. I'm not very experienced but I believe you can be part of the Ruby community without appreciating Why :-).
http://railsforzombies.org/ is a nice one , although it is not a book
Chris Pine's Learn to Program It's very straightforward. I started learning right away. It was very encouraging.
My colleague has written an excellent post summarizing starting points, books to read and paths to follow when learning ruby at http://www.jasimabasheer.com/posts/meta_introduction_to_ruby.html
I'd recommend taking a look at it, it has a wealth of information.
To add more info to the answers above, not really a book to learn ruby but a some companion resources for the learning process:
Ruby Language Quick Ref
Essential Ruby Refcard

How to get involved in development of Mozilla Firefox?

I am a CS grad student, and I am interested in spending some spare time in getting involved with development of Mozilla Firefox web browser . I would like to contribute to HTML renderer , JavaScript engine etc. But I don't have any solid experience in writing parsers or similar stuff, and I don't have any clue from where to start.
There are of course some links in https://developer.mozilla.org/En/Developer_Guide/ but since Firefox is already is very huge project, I don't know from where I should start learning.
So, my question is what core things I need to learn first to get started with Web browser Development and from where I can learn this (any links)? Do I have to revise how to write parsers/compilers? How do I learn to write HTML renderer/ JavaScript engine? Is it even possible considering they are already very huge projects? Sometime back, I downloaded source code of V8 JavaScript engine (http://code.google.com/p/v8/) but I couldn't understand much from it's source code as it was highly optimized code, and there were no much useful comments for beginner like me to understand what going on.
Update:
I am fairly comfortable working with C, C++, Java, PHP, C#, VB.Net, JavaScript and I am more interested in learning how web browser parses an web page, how it constructs and maintains the DOM, how CSS is applied, how HTML reflow engine works, how it interacts with JavaScript engine, how it interacts with web server, how the components are drawn on the screen etc.
Read the docs on getting started. Hang out on irc.mozilla.org in #developers and watch for interesting conversations. Introduce yourself in #introduction and ask questions. Go to http://bugzilla.mozilla.org and start searching for open bugs in components that sound interesting, then look for bugs that catch your fancy. Use tools like http://mxr.mozilla.org/ and http://dxr.mozilla.org to help you locate the relevant code, and ask questions in #developers. Learn, hack, repeat.
I wrote a post about my experiences getting involved over the past year, and it seems to reflect the path that a significant amount of Mozilla developers took.
You might want to review a list of known bugs and see if you're able to fix them. Other possible way to get a foot in the door is to get involved in quality assurance tasks, which would help you learn better internals of the application.
Bugs marked in Bugzilla with the [good first bug] whiteboard status are a good place to start. You can view the list here.
Find something you like and try to fix it! The developers on IRC (#developers in irc.mozilla.org) are usually happy to help when you get stuck.
If you are interested in parsing, learn finite state automata and formal gramars, it should be part of your CS curriculum at some point, like in a compilers class. For the javascript part, study about JIT compilers, specially on how a tracing JIT works. Follow Mozilla development blogs, here is a good starting article:
http://hacks.mozilla.org/2010/03/a-quick-note-on-javascript-engine-components/
Finally, but not least importantly, try to contact people already working there, and try to build a mentor-pupil relationship, they can assign you tasks and can help if you get stuck when working on the code. Going to opensource conferences is a great way to meet the people behind a project and get started contributing.
Mozilla Developer Guide

Is there a website to look up common, already written functions?

I'm sitting here writing a function that I'm positive has been written before, somewhere on earth. It's just too common to have not been attempted, and I'm wondering why I can't just go to a website and search for a function that I can then copy and paste into my project in 2 seconds, instead of wasting my day reinventing the wheel.
Sure there are certain libraries you can use, but where do you find these libraries and when they are absent, is there a site like I'm describing?
Possibly a wiki of some type that contains free code that anybody can edit and improve?
Edit: I can code things fine, I just don't know HOW to do them. So for example, right now, I'm trying to localize a robot/car/point in space. I KNOW there is a way to do it, just based off of range and distance. Triangulation and Trilateration. How to code that is a different story. A site that could have psuedo code, step by step how to do that would be ridiculously helpful. It would also ensure the optimal solution since everybody can edit it. I'm also writing in Matlab, which I hate because it's quirky, adding to my desire for creating a website like I describe.
StackOverflow.com. No, I'm not joking.
At its best, people come here saying "hasn't some library done X already", and very often the Collective Wisdom answers "yes". But the biggest obstacle is lack of a description language: even here, a big problem for many posters is describing the problem clearly enough for others to recognize it as something they've seen before.
And if people can't understand what you're trying to do, no search engine will.
Firstly, two caveats:
Copy and pasting code you don't understand is a bad idea. Make sure you understand exactly what the code does before you use it.
Make sure you respect the license of the code you are copying. This is important!
Those caveats aside, it's often language dependent. Languages with an open development ethos (not just an open source implementation, think Python as compared to Java) tend to have official archives of open source libraries. For example:
Perl (which probably started this trend) has CPAN
Python has PyPI and Python Cookbook
PHP has PEAR
C++ has boost
Ruby has gems
R has CRAN.
Haskell has Hoogle and Hackage
Furthermore, don't forget to look in your languages standard library. Some modern languages have massive standard libraries, which have often contained the functionality I am looking for:
Java has its API documentation
C# and VB.NET have the massive MSDN
Non-openly developed languages often have non-official community archives. For example:
C# tends to have a lot of code at CodePlex and CodeProject
MATLAB has the Matlab Central File Exchange
A third category of sites are language agnostic. They are often best search through POG (plain old-fashioned Google). For example:
Stack Overflow
SourceForge
The confusingly language agnostic Java2s
Planet source code
Github
Finally, a fourth category of sites that I find increasingly useful are source-code search engines:
Google Codesearch
Koders
You may also be able to find useful source code, or at least get help writing something, through various pastebins.
Pastebin is language-agnostic
HPaste is mostly Haskell, but has a little in other languages.
Often, at the end of the day it is easiest just to google it, though.
There is a wiki that contains free code that anybody can edit and improve:
Rosetta Code.
As a means of an overview there is the "Solutions by Programming Task" page.
From the former page:
"Rosetta Code is a programming chrestomathy site. The
idea is to present solutions to the same task in as
many different languages as possible, to demonstrate
how languages are similar and different, and to aid a
person with a grounding in one approach to a problem
in learning another."
Cutting and pasting code you find on the Internet into production code would be like chewing gum found in the street. - Mike Johnson
With that in mind, try sites that host opensource projects like GitHub, CodePlex, code.google.com, etc.
I'm not sure this question is language agnostic, but I use GitHub this way ;) Other languages may have places where this is possible.
Safari Bookshelf from O'Reilly has many, many books that contain many implementations from which to choose.
http://my.safaribooksonline.com/
I was a subscriber for a few years before coming to my current job, where we have a corporate account! It's one of the best perks, and one of the best resources I have available. I haven't bought a computer book in years.
Aside from sites like this (Stack Overflow) I don't think there's many, maybe CodePlex, but I almost marked you -1 for assuming that code found on the Internet is yours to copy.
I'd suggest reading about software licencing, I hope you'd at least comment where you got it from.

Keeping abreast with technology

I know this is not a technical question, but this is something I believe could be best answered by the technology community. I've been in software development for ~2 years now, but most of the time, it has been a learn as is needed experience. I was recently asked by a friend on how to go about getting a strong foothold on technology so as to be able to easily adapt to new technology that comes up every day.
I'm not sure how to answer his question as my way of approaching this situation has been learn as you need. How would you suggest someone proceed if they were getting into Microsoft technologies today? Where would they start, and how would they proceed? To be able to expand their knowledge to the new advances we see everyday (linq, silverlight, entity framework, mvc framework and the ever expanding list).
Basically I think my question is a mix of both "how to be a better programmer" and how to get to the "next level" in technology (where you are no longer an intermediate programmer, but able to see the whole picture and easily assimilate new technology)
Thanks in advance.
One thing I enjoy is to listen to technology podcasts while I commute, exercise or do household work. You will net become an expert alone by listening to podcasts, but you will get a lot of input. In particular I enjoy .NET Rocks! but Stack Overflow also has a podcast to name a few.
Read, do and try new things. Do that for a few years you'll eventually end up an experienced programmer.
I think this post by the Misfit Geek could help you out a bit. I think it gives some great tips and gives some good advice on how a respected technologist has stayed up on technology.
How did you learn what you know
Hope these help. I also agree that podcast are a great source of info, at least to point you to the best new technologies. I listen to .Net Rocks, Hanselminutes, HerdingCode, and DeepFriedBytes just to name a few. I also follow some good .net releated blogs such as CodeBetter, Devlicio.us, and Los Techies.
Good luck!
I spend at least 1 hour a day just reading blogs, and listening to podcasts. You cant possibly get involved in everything new that comes along, but having knowledge of what's new is just as important as trying new things out.
If you want to specialise in one thing, then that's fine, but always try to include new technologies into your projects, and look for better solutions to things you have done in the past.
You need to follow what the technical community is interested in. Blogs are the best way that I've found to do this. Pick at least 50 that cover a wide range of topics, and you'll know what is coming down the pipe.
Keep involved in podcasts and blogs. Set aside at least 15 minutes a day to ready them or listen to them. Take their ideas, find which ones apply to you or are interested and add it to your personal development plan to learn them.
Here are a few previous posts regarding these:
Podcasts
OR
c# blogs
Interesting project + new technology = motivated learning.
There is no alternative to getting your hands dirty. Take one of the ideas you've had rolling around in your head and implement it using buzzword technologies. Be prepared to realize many hyped technologies are mostly just hype. Hopefully you will find some real gems, change your perceptions of what is possible, and add some tools to your toolbox all while achieving a goal.
Here's the list of Top 200 blogs for software developers. Try to read some of them and subscribe to what you like or find useful.
Blogs are great for spotting trends and finding some advice about the newest technologies, but if you want to learn something in-depth, you need books. Try to read 3 or 4 every year.
Finally, local user groups. Find and meet your fellow developers face-to-face and find out what they're doing and what's on their minds.
Attend meetings of local user groups.

Project in Ruby

I've been coding alot of web-stuff all my life, rails lately. And i can always find a website to code, but i'm kind of bored with it. Been taking alot of courses of Java and C lately so i've become a bit interested in desktop application programming.
Problem: I can't for the life of me think of a thing to code for desktop. I just can't think of anything i can code that isn't already out there for download. So what do i do?
I need some project suggestions that i can set as a goal.
I would say you should roam through github or some other open source site and find an existing young or old project that you can contribute to. Maybe there is something that is barely off the ground, or maybe there is a mature project that could use some improvement.
I find to complete a project, it needs to be something I am passionate about. I feel you need to find your own project I'm afraid.
There is always the Netflix Prize though!
I would write a ray tracer.
Oops, sorry... you're looking for an original idea. :) Ray tracers are still cool, though, and easy to get started on. Maybe you'll get an idea for a game while you're working on it.
Visit shoooes.net for a UI toolkit that's easy and fun, and then the-shoebox.org to see the kinds of things people are doing with it.
If you could make a Ruby ANSI (and xbin, and idf, and adf...) Editor, I would love you. Because that means you would have written ANSI parsing routines that I can hope you release to the open source community.
... but that is a selfish answer. Oh, and a cross-platform editor would be nice as well (although TundraDraw somewhat takes care of that).

Resources