What are the most useful gems to use in Rails?
RubyGems were developed to simplify and accelerate the stages of the application creation deployment and library connection. Utilizing this package manager for Ruby saves you time as you get ready-made solutions to almost any task instead of writing the functions from scratch. Each gem contains a particular element of functionality including all related files. Unfortunately they aren structured in any way so in order to find ruby gems it better to use a regular search engine and the required key words (check GitHub s ). Our dedicated development team also actively employs Ruby Gems in the process of software development. Here is the top of the most popular and useful ruby gems according to our experience GeoCoder s . Being able to connect through itself over 4 APIs this Ruby gem implements both the direct and reverse geocoding by IP address geographical coordinates and even real physical addresses (e.g. the address of the street). Bullet s . The most downloaded Ruby gems out there. It was initially created with an intention to boost software performance. It does so by decreasing the total amount of client-server requests. Basically Bullet tracks the N+1 cases of requests and notifies the developer when other tools can be used instead (e.g. cache counter). Pry s . We rmend to simplify the bug fixing procedures for your RoR-based application with the Pry gem which is a more advanced alternative to the standard IRB wrapper. ActiveModelSerializers s (which starts lagging while processingpound documents) and uses caching. Fast JSON API s . Fast JSON API wille in handy when you need fast serialization of software code. It works much faster than Wicked PDF s . This gem is working alongside with wkhtmltopdf s and helps realizing an interaction with the DSL generator. Devise Masquerade s . This Ruby gem helps developing multi user apps. In particular youll be able to test your app from the perspective of users with different levels of access. Devise s . Based on the MVC model the Devise gem can provide secure user authentication and session management. Letter opener s . If you need to create a newsletter mechanism to send notifications to all users that launched your app this gem will help you do that much easier you won need to integrate and configure your own SMTP server. Money Rails s . If you are planning to integrate your app with Ruby Money this gem wille in quite handy. Pundit s . A tool that allows defining different levels of access to the app functionality according to the rights of an authorized user.
Is there a way to extract Xero data into Excel?
First up lets clear up one point Xero is Accounting Software - Excel is not ! Accounting software has a lot of facilities that can be emulated in Excel but the most important thing is that Accounting software provides is a moving picture of your finances on a given day you had this much money in the bank this much as invoices that hadn been paid yet this much that was tied up in stock and this much in orders that you hadn filled and invoiced yet etc. but Excel can be used to work on a snapshot of the data. (Of course accounting software provides a lot of other facilities but this is the core difference between it and a set of Excel Workbooks). italic You have a number of options to get the data into a form that Excel can work on (always remembering that it is a snapshot at a single point in time) Xero has the facility to export a report (a set of records at a specific point in time) to Excel PDF or Google Docs s . There is further integration available to allow Excel to be used to request the data direct from Xero. You can also use one of the developer APIs s to languages such as the python API s and then create the selected data snapshot in Excelpatible formats such as CSV or in the case of python directly to xlsx workbooks. italic
What is the laziest thing you have ever automated?
I was working at a satellite antenna manufacturer where they had several NASA and JPL contracts. They had a major shipment that needed to be made one week and the one shipping clerk they had who knew how to properlyplete the byzantine NASA shipping docs. process was out on maternity leave. So they gave the task to the guy who can never say no of course. Never knew anything about that process but I did know about a whole lot of other NASA paperwork so why not? What I didn realize was the way things were traditionally done it was a very dynamic process just getting the shipping docs.pleted. First there was a set of arcane forms like ten pages with blocks that had to all contain something or it was notplete. Most of the blocks represented the acceptance of a sheaf file or box of supporting documents. The acceptance was done by a NASA representative who was there all week just to verify and sign off every single box but in no particular order. Up to him what he worked on every day. One incorrigibly OCD nit-picking NASA Bureaucrat . he was. Perfect for aplex job where people lives were at stake so I did grant him that. Ok so once I got up to speed with all that came the real kicker; The Hard Part. That ten-page form had always traditionally beenpleted at thispany on a good OLD IBM Selectric writer. Yes they did have a decentpanyputer system that was not to be used by tradition. So every time the shipment auditor found a mistake or something to add the page it was on had to be redone by hand. Which happened all day long(!) italic Yeah for only one day. I went out on the Internet once I got home and found all of the different interactive .pdf versions of the form that were available for free and emailed a couple versions to my work PC. The next morning I filled the form with the info. I had so far which took about 3 minutes. Every time the guy came to hand me another page needing adjustment I took a five-minute break from my real job and made the update. My supervisor saw me doing this and made clear his suspicion that I was breaking some concrete process protocol. Oh Well italic Inevitably the auditor figured out that newly updated pages were no longering down the hall one at a time or at all and came to see what had interrupted my work. I showed him what I begun doing uncertain how he react. He just grinned put out his lower lip and said Finally you guys got the memo! No more crap to fix! italic Thank God I had some laziness left in me! Im pretty sure though that I didn make a friend of the guy I temporarily replaced; I done a real good job of permanently knocking over his rice bowl there. Oh Well italic
How suitable is Python for automated document creation?
Yes I think Python is a great choice for this of application. I used to use perl for this kind of thing but once you establish a framework for what you are doing it's easier to grow and maintain it in python. Perl's advantage is that is has a built in reporting capability and a larger public library of modules but Python's contributed library is quite good and you can usually find what you need. One paradigm I often use is to write python scripts to process tab delimited data and then use Excel as a reporting and analytical engine. I take the raw data in as tab separated rows and then output it the same way. If your raw data is in Excel you can even use the clipboard to get it out run a python script in amand shell to transform it send that result to the clipboard then switch back to Excel and paste the results into a new worksheet. With Excel pivot tables you can summarize the transformed data as a crosstab or present it as a chart. I don't bother to try and do that kind of stuff in python. Of course you could write the transformation code in VB within Excel but I always found python to be much easier especially with the help of libraries. I work on Windows so I use a freemand shell called tcc (from JO Software) that has a built-in clipboard device that allows piping from my python script to or from the clipboard. Python has an excellentmand-line arguments processor so I make frequent use of that to provide options in the transformation and reporting logic within my script. There are also libraries for direct access to Excel workbooks database access etc. tabular data management etc. Also for generating HTML which is another good option for your report output.
What's the most beautiful code you've ever written? By beautiful I mean simple, clean, and implementation of a potentially complex function/algorithm.
I wrote a Turing machine in a version of Turtle Art made of snap-together programming blocks for the purpose of teaching Computer Science concepts to elementary school students in the One Laptop Per Child program. I coded the symbols on the Turing machine tape as colored dots which the turtle could read and translate to integers used as indices into the program table. The table was also made of dots that the turtle could read to determine what state to go into what symbol to write on the tape and which way to move the head for the next iteration. The initial state of the tape for the simple addition 3+2 math appears on the top edge and the program table below. At the end of execution for this simple case when the machine halts we get the tape state containing the answer and also an execution trace as shown below. Activities Art Art Turing Machine s Here are pictures of theplete code with annotations. Activities Art Art Code for Turing Machine s I also provided a machine translation into Logo on a separate page ed from those above. Inparison with -basedputer languages this kind of Turtle Art makes most typing and syntax errors impossible. The user programs directly in a tree structure a much more natural CS representation of a program than a that has to go through lexical analysis and parsing stages to get to a parse tree. On a larger scale I rmend a number of elegant programming language implementations that an undergraduate could read in their entirety including the original Pure LISP the original FORTH Smalltalk and J Ken Iverson's last version of APL. Some of them have implementations written entirely in their own languages with a kernel that can be crosspiled to any new architecture.