Tuesday, January 22, 2013

Ruby begins a new day and on my Rails track

After P2PU's atypical start on coding
Codecademy's nuturing
and meeting strange but awesome, non-traditional coding teachers
I have been touched
Ruby on Rails

Wow that is quite a bit of Coding Basics. The dim sum bites of my codes have shot up. I will start to post more resources here on this blog. More cultural (including Silicon Valley lifestyle) experiences here:

More "Pinterest-like" resources here:

Git & GitHub explained in simple terms :

And as I learn more, I will summarize it here on this blog for non coders.

One very basic coding friend asked me to explain to her in metaphors how the different languages are and how they come together. I synthesized all I have learnt from my developer friends and came up with the following (they are not the best, but they are easier to understand, and it was an important point for her)

Front-end languages deal with more how the websites look, how pretty or interactive they are
- e.g.  HTML, CSS, Javascript
"Midware" Back-end languages connect the front-end view with more of the engines, database, and back-end of a web application
- e.g. PHP, Ruby, Python
- some are more object-oriented (think an Object is like a cube, Objects that are similar to the cube, under the same class may have some similar characteristics, methods or functions that can easily be carried over, making coding simpler), some are script languages like Python which makes doing repeatable tasks easier, really that's what programming languages are meant to be, they can also be more algorithm heavy
- e.g. Ruby on Rails, Django
- think this as the architectural guideline of how to code with a specific language, e.g. Rails is based on Ruby, that will make things easier
Database languages : allows the front-end to talk to or extract info from the database, create new transaction rows etc...
- Rails architecture helps developers avoid dealing with this in too much details.
- MongoDB, not a language per say, more like the new way of storing data like Ruby+Rails, no longer relational (SQL is more relational, think almost a complex form of multiple Excel sheets, but MongoDB is more like MapReduce than otherwise, which is quite quite different from just a relational language)
Git, GitHub
- Git is like version control for codes. Imagine it like a Microsoft Word it saves and stores different versions of your code, and then you can retrieve an earlier version if something goes wrong
-GitHub is social coding, allows you to share your codes online via git push to online format, so that other people can view and build on top of your code

Maybe this isn't metaphoric enough, well then try the Poigant Guide to Ruby, which is completely written in amazing non-sense, but fairly easy to understand. Think it as a terrible yet useful poetry written to explain Ruby. Read it fast. It is quite an insider sensation/joke.

To obtain the book. Google it in PDF, and read it for free. Warning, you have to bear to read a lot of non-sense.

Rules of Sudoku for Algorithm Exercises

Need to code a Sudoku solver? Here are three rules of Sudoku: A 9x9 grids, Each row ... Each column ... Each of the 9 3x3 grids (examp...