RocknrollMarcs Coding Adventures

‘‘If you always do what you always did, you will always get what you always got.’’ Albert Einstein

Angular-rails

| Comments

Angularjs with Ruby on Rails…..

Hey Muchachos!!!!.

Yes I know there is 10 and more ways to set up Angularjs with rails and to be honest, at first I though, these frameworks are just not meant to be together but then on second thought There are a few nice and easy ways to use this fantastic HTML evolutuin.

  1. Gem (angular-rails)
  2. Bower-rails
  3. Good old, by hand

These are just a few ones Im sure. I find using these is the easyest und not as confusing especialy for begginers.

Docker CI

| Comments

Docker as a continious build server…..

I was playing around with docker the other day and was quite surprised how easy it is to get an Automated Build running.

All you have to do is:

  • Create an account on Docker hub
  • Create a github account.

There are a few ways to do this but I set it up this way:

  • GO into Docker hub and Add a Repository (Automated build)
  • You can then choose the repository you want to set up for the build.

If all goes well then “Rocknroll dooooood”

After every commit to the github Branch you configured Docker tryes to build an image (snapshot) you can now docker pull your image….Great…

Volt

| Comments

Volt

is a new Ruby webframework which reminds me of the Play framework in scala

Some of the things it has to offer:

– Sockjs Layer – Vert.x integration – SProckets replacement – Opal IRB – Volt COntributions / Reactive system – Ruby Motion support

Volt is a ruby web framework where your ruby code runs on both the server and the client (via opal.) The DOM automatically update as the user interacts with the page. Page state can be stored in the URL, if the user hits a URL directly, the HTML will first be rendered on the server for faster load times and easier indexing by search engines.

Instead of syncing data between the client and server via HTTP, volt uses a persistent connection between the client and server. When data updated on one client, it is updated in the database and any other listening clients. (With almost no setup code needed)

Pages HTML is written in a handlebars like template language. Volt uses data flow/reactive programming to automatically and intelligently propagate changes to the DOM (or anything other code wanting to know when a value updates) When something in the DOM changes, Volt intelligently updates only the nodes that need to be changed.

This is one of the greatest things if seen in a ling time.

You dont need to use javascript front end frmeoworks like AngularJS its got it all included and the best….. it crosscompiles automatically and reloads the Browser in change to….A bliss to work with.

Here is the finnished App on Heroku Heroku link.

The GodFather

| Comments

Padrino is the new Rails on the Block !!!!!

Its for apps that dont need as much overhead as for Rails and more overhead then for a Sinatra app

Its a very Modular approach to making web apps and the best thing a very nice admin pannel which you can use for making protected CRUD interfaces..

The Generators are very similar to the RoR ones but better. You have a better choice of ORMs for example – mongomatic – mongoid – activerecord – minirecord – datamapper – couchrest – mongomapper – ohm – ripple – sequel – dynamoid

Test Frameworks: – rspec – steak – bacon – cucumber – riot – minitest

Renderers: – erb – haml – slim – liquid – erubis

script: – prototype – jquery – rightjs – mootools – extcore – dojo

stylsheet: – compass – sass – scss – less

Examples:

padrino g project your_project -d mongoid -b
padrino g project your_project -t riot -m rr
padrino g project your_project -d sequel -a mysql

Cuke or Puke

| Comments

One of the Projects Im working on at the moment is developing a Cucumber interface. And I must say I would of told you a few weeks ago that Iabsolutly love Cucumber and Behaviour driven development.

Well I still love BDD and TDD but Im not so sure about Cucumber or its cause and place.

I have actualy never heard of a non Developer writing or reading Gherkin tests in ther Terminal. And ro be honest Im not so sure about our Project Lead actualy wanting or having the time to learn Gherkin and start writing Tests.

Browser Automation with Selenium is great but you dont need Cucumber for that rspec or minitest ist fine to.

The main thought I had today is ….What is the best way to integrate Stakeholders or other non developers into agile Flow???

Im actualy now quite sure that User stories which should be done before integration testing anyway are more than enough to get the point over..

Im beginning to think that Cucumber is just another bit of Waste that is not part of a Minimum viable product.

Rspec has features if used with Capybara and can automate the Browser…

I also find that Gherkin stands in the way of me Being Creative while practicing TDD.

More and more books are switching from Cucumber as Acceptance test Framwork to Capybara with Rspec or Minitest.

I wonder what time will show……..

Anyway its all rocknroll

The Pope

| Comments

Yes this is the Pope …..Tim Pope

He must be the most influential Developer I know, or I dont know.

This is a realy nice Tutorial on his Famous Vim Plugins.

I think everyone who uses Vim has one or the other Plugins from the Pope…..

Vim Rails

| Comments

If you are like me then there is nothing nicer then Living in the Terminal

The hook is you actualy have to do something to make this editor make your life easyer For me, I never felt at home in any IDE, maybe Webstorm but not even that :)

It does take a while until you have wet up your perfect Vim environment. I use the YADR framework for every new machiene I have to setup.

Here is a Link to YADR it has:

  • ZSH
  • VIM
  • Solarized

And here is a nice Video tutorial on how to use Vim with Rails

Advice From an Old Programmer

| Comments

From Zed Shore the writer of learn ruby the hard way

Advice from an Old Programmer You’ve finished this book and have decided to continue with programming. Maybe it will be a career for you, or maybe it will be a hobby. You’ll need some advice to make sure you continue on the right path and to get the most enjoyment out of your newly chosen activity.

I’ve been programming for a very long time. So long that it’s incredibly boring to me. At the time that I wrote this book, I knew about 20 programming languages and could learn new ones in about a day to a week depending on how weird they were. Eventually though this just became boring and couldn’t hold my interest anymore. This doesn’t mean I think programming is boring, or that you will think it’s boring, only that I find it uninteresting at this point in my journey.

What I discovered after this journey of learning is that it’s not the languages that matter but what you do with them. Actually, I always knew that, but I’d get distracted by the languages and forget it periodically. Now I never forget it, and neither should you.

Which programming language you learn and use doesn’t matter. Do not get sucked into the religion surrounding programming languages as that will only blind you to their true purpose of being your tool for doing interesting things.

Programming as an intellectual activity is the only art form that allows you to create interactive art. You can create projects that other people can play with, and you can talk to them indirectly. No other art form is quite this interactive. Movies flow to the audience in one direction. Paintings do not move. Code goes both ways.

Programming as a profession is only moderately interesting. It can be a good job, but you could make about the same money and be happier running a fast food joint. You’re much better off using code as your secret weapon in another profession.

People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology, medicine, government, sociology, physics, history, and mathematics are respected and can do amazing things to advance those disciplines.

Of course, all of this advice is pointless. If you liked learning to write software with this book, you should try to use it to improve your life any way you can. Go out and explore this weird, wonderfu, new intellectual pursuit that barely anyone in the last 50 years has been able to explore. Might as well enjoy it while you can.

Finally, I’ll say that learning to create software changes you and makes you different. Not better or worse, just different. You may find that people treat you harshly because you can create software, maybe using words like “nerd.” Maybe you’ll find that because you can dissect their logic that they hate arguing with you. You may even find that simply knowing how a computer works makes you annoying and weird to them.

To this I have just one piece of advice: they can go to hell. The world needs more weird people who know how things work and who love to figure it all out. When they treat you like this, just remember that this is your journey, not theirs. Being different is not a crime, and people who tell you it is are just jealous that you’ve picked up a skill they never in their wildest dreams could acquire.

You can code. They cannot. That is pretty damn cool.