The first RubyMotion Conference #inspect2013 happened in Brussels, Belgium. It was a very well organized conference, lots of talented people, awesome speakers, good food and yes ‘Belgian Beer’ Many thanks to Laurent Sansonetti (@lrz) for making it successful. The general gist of what happened there. Below are my observations and opinions. What I saw at #inspect2013 - RubyMotion conference? For people who don’t know about RubyMotion: - http://www.rubymotion.com/developer-center/ - http://rubysource.com/laurent-sansonetti-on-rubymotion-internals/ - http://motioncasts.tv/ - vimeo.com/61255647 Observations/Opinions: The Community: Community plays a very important role in the success of Open Source Software. Even though RM is licensed, it has blessings from Ruby Community. Rubyists (including me) who have tried Obj-C in the past have found it verbose and complex. We all embraced RubyMotion because of its simplicity and more important being a developer friendly language - Ruby. At the conference I saw a lot of seasoned Obj-C developers who had tried RM and loved it. Now, they are using it for full fledged production applications. One of the big reason for this is Cocoa-Pods. They can still use their legacy Obj-C code / project in new a RM application. The build system takes care of linking and tying them during compilation. No need to re-invent the wheel, utilize the investment people have already done in iOS world. This is an interesting phenomenon because this is going to push the toolchain to next level. Contribution: It is less than a year and the RM community has grown exponentially from few rubyists to thousands of iOS developers. There has been tremendous contribution by people to build ruby-motion gems/libraries/wrappers around verbose Obj-C code.The list is very big but I should definitely mention: rubymotion-wrappers.com A lot of talks at the conference were about these libraries and wrappers. Focus on testing: Ruby Community has successfully induced the importance of testing the code. Though RM comes bundled with a testing framework, its hard to do UI testing on iOS and Obj-C has suffered a lot because of this. At the same time, it is unusual that Rubyists would not explore options to test their code on iOS platform. In the conference I got to learn some awesome frameworks out of which ‘motion-calabash’ is really good. It gives you BDD style testing similar to what we are familiar in Ruby/Rails world - Cucumber. You should definitely checkout https://github.com/calabash/motion-calabash . A sample app The one thing I would like to explore is the possibility to test my HTML5 phone-gaped application using 'motion-calabash'. When I am developing for mobile platform I miss Chrome Developer Tools a lot. Not any more. It blew my mind to see the demo by Colin Gray (@colinta). Motion-Xray: An iOS Inspector that runs inside your app, so you can debug and analyze from your device in real-world situations. It is amazing, go check it out Broader Reach: I was completely stunned to see presentation in a technological event by a visually impaired (I don’t mean to hurt anyone. I had never seen such a thing happening and it was a complete jaw-drop for me). Let me introduce Austin Seraphin (http://behindthecurtain.us/about/) . He is an iOS developer and iOS Accessibility Expert. He explains how iPhone and Accessibility changed his life. A completely new perspective. His slides if you are interested - I would urge to have a look at them. Trend and My Reaction: Laurent was the last to present at the conference - a noble decision I would say. He talked about roadmap and the future of RubyMotion. I see a focus shift to make the toolchain more developer friendly. Some highlights: High-level debugging support: right now it uses GDB technology which is pretty low-level. Documentation: add more documentation to make it easier for newbies. I definitely feel RM is going to change the way we are used-to doing native iOS development. So, don’t delay, hack and be awesome. Finally, here is the presentation (Building Interactive Data Visualization Charts) @rubymotion conference: Please share your thoughts. Enjoy !
The presentation: And the video: Amit Kumar - Using Ruby for iOS development (RubyMotion) from Ruby Australia on Vimeo.
Adding the SSH keys on your github site is the simple solution. I am using 3 github sites; - 1 external - 2 behind the firewall Each have their different email address for security reasons. So, quite often, I get this error - if I mess up things. I was looking for a solution so that you can create a public rsa file for each github site. The solution was to create config inside ~/.ssh directory. The file: Host User git Port 22 Hostname github-site1.com IdentityFile ~/.ssh/github_site1_id_rsa TCPKeepAlive yes IdentitiesOnly yes Hostname github-site2.com IdentityFile ~/.ssh/github_site2_id_rsa Hostname github-site3.com IdentityFile ~/.ssh/github_site3_id_rsa Bingo !! I am sure there are other better ways to solve this problem. I would appreciate comments.
Agile development has become the backbone of modern software development process. In a nutshell, it can be defined as - iterative, self-evolving incremental development that demands high collaboration and flexibility to change . Component driven development on the other hand augments to building reusable and testable components that be plugged together to form application foundation for delivering business functionality. In our current engagement with Firm Account, they have started providing IT tools/solutions to their clients supplementing the strategic solutions they have been providing so far. They wanted to deliver the solution with rapid-prototyping and Challenges The challenge was to deliver the solution in quick 2-3 months iterative cycles. The working software was to be delivered and handed over to IT department of the client. This meant the software has to be of high quality and maintainable with least amount of support Approach Each application we were building had certain common components. For eg: - Authentication - Work flow process - Data upload process - Data crunching and cleansing - Data export - User Management with corporate level security - Background processing for data manipulation - etc. This problem can be easily solved with Service Oriented Design Pattern. But since most of the deliverables were ‘leave behind’, we started to observe an evolving pattern of Component Driven Development. There was two approach to establish a pool of commonly required components. 1. Staff a team that is responsible for building common components 2. 'Tax' teams to contribute 'components', if they use any from the components library. The first seems more common but does not align with the paradigm of Agile Software Development. One team should not be responsible for building and maintaining the software. Over time this leads to quality compromises and delays in deliverables. Extracting common components from existing applications and taxing teams (who want to use from pool) to contribute to common pool did the magic. Initially leap was a little difficult. It took sometime for us to institutionalize the mind-set of building component -based software that can be contributed back to pool. Once the team was adept with this working process, the pool expanded and became rich. Impact and Benefits Redundant work, development time: Developing every system from scratch means redundant development of many of these re-usable components. These can be shared shared across multiple applications reducing development time. Time to market: Each application goes through rigorous process of QA and Security Assurance. This meant a lot of time was wasted testing the components that can be built and tested once. Using re-usable components reduced the time to market by ~40%. Expertise sharing: Software reuse supports the sharing of knowledge naturally. This helps in learning from peers and improves the quality of deliverables Focus on solving the actual business problem: Teams can focus on solving the business problem rather than spending time building the components that are common Rapid prototyping support: Reusable components can provide an effective basis for quickly building a prototype of a software system. This provides the opportunity to get customer feedback early in the life cycle, thus supporting the conception of requirements. Maintenance costs: Fewer defects can occur when proven components have been used, and less of the software system must be maintained. High quality: Error fixes occur from reuse to reuse. This yields higher quality for a reused component that would be the case for a component that is developed and used only once. What do you think ?
@engineyard and @pivotallabs release an excellent course material and exercise for Ruby and Ruby on Rails.It is one of the best I have seen so far. Quotes from the repo: ”This course teaches experienced developers Ruby and Ruby-on-Rails. It’s designed to be taught by a practicing rubyist and a teaching assistant. Both individuals must have expert understanding of Ruby, Rack and Ruby-on-Rails.” The list of contributors: https://github.com/generalassembly/ga-ruby-on-rails-for-devs/blob/master/CONTRIBUTORS.mdCourse is structured to cover all the platforms (Linux, Mac and yesss Windows). It starts with basics and covers some advanced development guidelines.An excellent presentation by @dblockdotorg: http://www.slideshare.net/dblockdotorg/crafting-a-rubyonrails-course-for-developersMore resources: http://code.dblock.org/crafting-a-ruby-on-rails-course-for-developersIt is CDE –> Community Driven Education :)
For last few days I have been struggling with a requirement to show file download indicator. Here’s the requirement.Web page has a link “Download File”. On click of this link - a JSON post request is sent to the server. The server generates the files based on the JSON input and streams back with Content-Disposition “attachment” for the browser to download. There are several ways to visually indicate the click of the link:Normal form post - Create a dynamic form and post it. On the server-side make sure content disposition is set to attachment. When browser receives the response, it pops the “Open-Save-Cancel” dialogue box. Cons: - No control of the page response time, page dies in case of timeouts - Page refreshes and the current context of the user is lostAjax post - Do an Ajax form post with JSON data. Download “waiting” indicator can be easily initiated with ”Ajax prefilter”. In the response from the server send back the URL to download. Remove the “waiting” indicator. Change the window location to the URL and let the browser do the rest. Cons: - Retain the file on the server and run a background cleanupIframe post (recommended solution) - Create a dynamic form and post (target of the form) it to an iframe. Disable the download link, show the “waiting” indicator. Start the timer and look for presence of a cookie. If the cookie is found, remove the indicator and enable the link. This requires some server side code as well: adding the cookie. The detailed sample code: The client side code: The server-side code: Cons: - Server has to set an extra cookieThe third approach has helped in solving for the following:1. Submit a JSON request to the server2. Show/Hide a “waiting” indicator3. Controlling the timeouts and indicate the user of delays (if any)4. File download handleLet me know if there are other ways of making it work.
Ever tried this:Weird isn’t it ?I checked the “/etc/sudoers” and everything looked normal:toamitkumar ALL = (ALL) NOPASSWD: ALLI have sudo access - which means I have access to everything (thats what my understanding was)Well, I was wrong.After thinking for a while I felt - ‘cd’ is not a program, it is built-in for bash shell. So, I had to do:sudo -s or sudo su or sudo bashand then ‘cd’.But be careful, that will open a shell for ‘root’ user.
Came across this weird error: This had happened because I had RSpec 1 way of including spec_helper (in old files):require File.expand_path(File.dirname(__FILE__) + ‘/../spec_helper’)And the other way (in my new files):require ‘spec_helper’Synching them fixed it :))
Update: the chart extension has evolved to produce waterfall charts with bubbles superimposed:Just committed JS extension to create Waterfall chartsLook at here for details Comments Anonymous I just downloaded your extension fromhttps://github.com/toamitkumar/waterfall-charts/downloads and the example returns an errorMyLib.js:33 TypeError: 'undefined' is not a function (evaluating '$.lineConnector([[i+0.38, data[i].y], [i+0.62, data[i].y]])')I'm using safari 5.1.2. Thought I'd let you know.
Devise has become the de-facto library if you ever need Authentication. Tonnes of pluggable components which you can easily enable/disable.For our application we had to reset session and easiest and cleanest way to do was to extend the devise - SessionsController:For testing this piece:With smiling face I ran the spec buuuuuuttttttttttttttttt arrrrggghhhh:AbstractController::ActionNotFoundChecking the devise filters helped with some direction:Have fun !! Comments Amit Kumar Glad this helped you.. !! Shlomo Brilliant. Thanks.