Is Scribe sticking around for a while? - grails

Simple question - I have dabbled with the awesome scribe library before but am now thinking of committing to this for an oauth-dependent production grails app. Is there enough community support to keep this library going with all the API changes the likes of Facebook seem to be doing these days? I'd hate to have to revert to something spring security for oauth but, in the same sentence, would not want to have to keep customising scribe for my own once API changes are released by providers.
I ask this because the core code (which is probably perfectly fine at the moment) is about 4 years old. Is this project here to stay?

With the exception of hearing from the Scribe team it's nearly impossible to answer this question with a simple yes/no.
However, I think it's better to look at it from this perspective to arrive at a valid answer.
Does it meet your needs today?
Do you have access to the source code?
Does it have an active community?
Do you have other options if you need to replace it in the future?
Should you need to, can you modify the source to meet your own needs in the future?
Given the fact you do have access to the source, and you do have other options I'd say it doesn't really matter if it's going to stick around because you have options for the future.
Of course, the answer depends on your own abilities and risk assessment, but I think it would be safe to say you can arrive at an answer.
Hope this helps.

Related

Angular with RESFTful Rails APIs or Firebase APIs ?

I am looking for advice to save me time. I am planning to create a Q&A web app for my university, a stackoverflow clone. I know Rails and I know Angular but I never used them together. One option for me is to use Firebase APIs because it's simple. My question is which is easier, making Angular consume Rails APIs, or firebase APIs? Or is it the same steps no matter what I use to create the APIs ?
This is not going to be the same process. It's also not a direct comparison.
Firebase is a hosted third party 'backend-as-a-service' and you use what they give you for API calls, but you can more or less rely on the API working as advertised (though the docs can be less than useful in places).
That is vs building your own RoR API, which means just that - you pick the groceries just as you want them, but you also get to fix all the bugs on both your API and and your client. You also still need a DB selected.
A more direct comparison would be 'should I pick Node or RoR.' Your question as it's posed is really a question of your own backend implementation or a hosted package.
Which is easier?
There is not a real, single answer.
If by easier you mean 'most direct', Firebase has an Angular library called AngularFire. It translates a lot of Firebase paradigms into a pretty familiar Angular pattern, with a couple of nice extras. You focus on your client code and DB design, it handles the server operations. That seems fairly direct to me.
If by easier you mean 'most flexibility', it's hard to see how building your own doesn't give you that.
If by easier you mean 'less work for me', then 'it depends'. If you are comfortable writing RoR backends and less familiar with NoSQL patterns, then you can probably put it together faster on your own setting your API methods and selecting a DB you are comfortable with. If you feel stronger with Angular than RoR, then learning Firebase paradigms might be a shorter climb.
For what it's worth, given its limited set of API calls, there is probably more focused support for specific questions about Firebase. But you do sacrifice the option of doing it 'your way,' and the RoR community is far larger than Firebase's so you can probably still get plenty of help. Like I said, it can really depend.

Ruby on Rails: Is it better to use outdated plugin, or use your own code?

When you are facing with this kind of dilemma, what do you usually do, and why?
In my case, I want to create a user authorization system that works with facebook connect and openID.
Authlogic is working, but unfortunately authlogic-openid is no longer supported (they really should clean up ancient codes on github!)
Thanks!
It's better to use whatever works.
During the time you're building website, luck of continuous development shouldn't be a problem: you just need to see whether this version works.
And if later in production, for example, facebook outdates part of its API, you'll have lots of time to find solution.
There's general philosophy behind it, which I summarize as "do not solve problem before it appears" :)
I I think the best way is to contribute to the existing plugin with your required code implementation. Advantages are
1 - you will get what you want
2 - Plugin will be more rich and active
3 - You will not repeat the work that plugin authors has done already (which saves your time)
Thanks
cheers
sameera
You're just going to have to make an assessment. It's not like the plugin is going to stop working one day (barring changes to OpenID or something), but it may limit which versions of Rails you'll be able to use it with. If you think that its limitations are a problem, then find another solution.
Thankfully, most plugins aren't that big. You can usually extract the functionality you need and keep it up to date yourself without that much work. But it is work, and it takes time. So whether it's worth it to you is really up to you.

How do you remember/organise Rails information to prevent wheel reinvention? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I love working with Rails but I keep tripping up against my own inefficiency: I'll spend time implementing some "useful" function only to discover subsequently that it was already in the framework, had I but known it!
Particular areas of wheel reinvention for me are
helpers and built-in class extensions
recently-released features that may not yet have lodged in my brain
plugins (a taxonomy of Rails plugins, if such a thing makes sense, would be a boon)
migration options
less-frequently used rake tasks
the options hash on just about everything
Obviously (?) we can't all remember all this stuff all the time. There are "cheat sheets", but unless they're up-to-date they can potentially compound the problem by appearing authoritative when they're really targeted at older versions.
What do you do to minimize this excise? Can anything be done?
I wondered if a set of Big Visible Charts might help, although goodness knows where I'd stick them in an open-plan office.
One thing here is to know about the existence of particular feature (plugin, gem, etc) in the first place. That's why
I try to keep up to date with the information about the edge Rails.
I follow many blogs and try to if nothing else then run over the titles every day, just to have it leave at least some tiny footprint in my memory.
That's for the passive part. Now for the active:
As I fly through the new features/plugins I try to imagine at least some use case in which it might be helpful in what am I working on right now - this exercise helps me to remember the thing, since I connect it to my actual conceptual system.
In my less serious projects I really try experiment with new things.
On SO I often answer questions I'm not sure about or I don't really know anything about but they seem interesting to me - then I do some research and extend my knowledge on that particular topic.
I don't think that "big visible charts" can help in the long run. I only use cheat sheets when learning new things and it's really only a short term thing. Exellence is a habit, as Aristotle said.
This isn't just a problem with Rails, but with any framework. Programmers I know who have worked for years with Delphi still are shocked to find simple standard functions that they'd replicated.
WRT Rails, Mike Gunderloy recently wrote about highlighting text, and ended with this wise tidbit:
It’s worth taking a dip into ActionView::Helpers occasionally to see what other bits of functionality are lurking that you’ve forgotten about.
Any time I need to do something I think should be easier than it is, I do a quick check there, as well as Google, to make sure I'm not about to waste a ton of time.
I face this problem as well- and it was a lot worse when I first started with RoR. Now after over 1.5 years, I know what's available pretty well.
Basically what I do is if I am using parts of the framework I know... no big deal. If I need to do something I will likely have to create myself, I first google it or search the Rails API. Lately I have also begun searching github and some of the plugin sites like railslodge.com.
While this does not completely solve the problem, it has helped dramatically.
I surf over the rails blogs in my RSS feed reading the headlines and just enough to figure out what the article is about. This gives me a good breadth of knowledge but pretty shallow. Still it lets me know what is out there. Like yesterday when I saw a blog post about a highlight helper (I had no idea it existed. Now I do and if I ever need it I know to look for it - even without reading the post in depth). I also open the posts I want read in depth in another tab for later (I used to use ReadItLater but it got out of hand) and as i read them i write notes in a post on my own blog more for my own benefit than for others - to get into memory and to ensure I can find it later.
The other thing I do when I am entering uncharted or forgotten territory is to I ask a question here about best practices or specific details even if I think I know the answer. For example I couldn't remember the names of the popular plugins for tracking edit histories of records (acts_as_audited and acts_as_versioned). I had the answer in 15 minutes.
It turns solo programming into programming in one of those cool noisy dev shops with a foosball table and lots of other people who know stuff i don't.
I tend to assume that most types of basic problems I'm solving have already been solved by someone else; by starting with the assumption my thoughts aren't along the lines of "how do I build this" but "where do I find it" and of course google, the wikis and the plugin and gems lists all play a part in that. I have written very little code that isn't directly related to my business domain.
I write tests first. Then code. Sometimes the framework does it for me and I don't have to write code. :)
I don't think Rails is any different than other frameworks... it takes a while to know where things are. The best you can do is read the API docs and see what's there. You don't need to learn how to use it, just what is there and get an idea of how to look for it when you need it.
Also, it's not a bad thing to write code that someone else already has. You learn from it. Later you just swap in the framework mojo and see if your tests still pass. If so, you're good and you know how the internals of one part of the framework probably work.
I believe the key to eliminate the time wasted on reinventing the wheel is to have a very handful tool to search inside the Rails helpers/capabilities.
On one hand a good choice of IDE could help a lot. On the other hand - a very good online (offline) edge documentation with an ability to quick search through it. These days one of our russian Rails programmers made one: http://railsapi.com/. The search is done in a very MacOS style, making it a very good choice for a fast diggin'.

What Rails plugins would you like to see?

What behavior have you had to implement in your Rails applications that you feel could exist nicely as a plugin?
What plugin functionality have you searched for in the past but couldn't find?
What existing Rails plugins could be improved or extended, and how?
I'd like to see an engines plugin that dropped in an admin interface that provided a dashboard summary of all the models in the app, with configurable activity charts.
I once wrote a component for an application that did uploaded a zip of photos to an application so they didn't have to be done one by one, I think I may make that into a plugin when I have time, well a new version of it, the code's a little ugly.
Not easy to answer. Everyone is biased towards his own current projects. Additionally a lot of great plugins already exists.
Personally I would like to see some menu plugin for a typical data base application. E.g. where there are few user roles, and every user role has different rights. And a main menu with sub menu which depends on user's rights to actions.
A (CSS) menu is reimplemented in almost every data base application. It is rather given application specific thing and I don't know how hard it would be to implement some general solution or template.
A Credit Card Payment System
Right now, no one bothers implementing credit card payments until a site has become "production quality". Single-person projects or small startups don't bother making this at first b/c they would much rather spend their time prototyping new, hard, or interesting features.
This is bad in the long-run for everyone, including end-users, b/c the default is to offer (often innovative and really great) services for free, which means only already-funded teams or people with lots of extra time can even get to the point of making something.
If this existed, were packaged up neatly, and were as dead-simple as Rails scaffolding, small projects could default to whatever payment scheme that actually made sense -- like pay-per-use, donations, trial periods, first 5 free, etc. -- making it possible to fund the really great products out there, instead of forcing them to rely on outside funding or ads, which ruins the product.
In a real physical store, people expect to pay. If the person on the other side of the counter gives me something for free (w/o buying anything at all), I say "Are you serious??" and walk away bewildered. But online, I almost expect it. This is bad! Because now everyone expects it, and people trying to make great things can't focus on actually doing that b/c they are too busy trying to figure out how to make it great and free.
Oftentimes, there are free things out there online that I like so much that I would like to pay for, but there's simply no easy way to do it. And I'm not alone. I use tipjoy and have donated to things that have a PayPal donation setup like Auditorium, but I don't see these as adequate.
The best thing out there that I've seen is RailsKits. But as far as I understand, they aren't packaged properly so that I can add them to my site whenever I please like a plugin or gem.
I'd like to see some sort of in-built video playback/streaming. I need it for my current project.
I agree with Greg... there are lots of great plugins, and lots of great ideas for more.
I think there's always a need for more web APIs to be supported. As we go forward with API driven services and semantic web, there's tons of work to be done on that front.
http://www.programmableweb.com/ is a great starting point for thinking about what really useful APIs don't have a rails plugin or ruby gem yet.
Cheers!
Walt

General Development Notes [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.
I need a place to keep the solution(what I did), and I need to find it somehow, which may be months or a year later. Using a mind map sort of idea, I was thinking about a personal wiki, but then I heard the stackoverflow podcast mention using this site for such a reason. Does anybody else keep track of slick things they've done so that they may find it sometime in the future. If so, what did you use, and in general, how do you use it?
i like to personal blog idea and using the stack for it. i'll try the idea of posting at the stack and then answering it myself, with the benefit of other people potentially giving their opinion.
As long a the stack will be around for a while :)
Jeff Atwood recommends using Stack Overflow for this kind of thing. Post a question (your problem) and then post an answer (the solution you found). This lets you share the information with the world, and maybe get some valuable feedback or better solutions.
(Wow, I got downvoted for repeating what Jeff Atwood said. I won't do that again, I promise.)
I use neomem all the time. I write notes to myself. Then I can later search for it.
You may find these questions useful
Where do you store your code snippets?
Tracking useful information
What is you preferred site for code snippets?
I use a personal Wiki, my del.icio.us bookmarks and my own blog for that. Usually my blog: When I learn something that I know I might stumble on again I write a short post in my blog.
I use WikiDPad or Wiki-On-A-Stick. It works not only for code snippets but also to take notes, record typical problems you get and how to solve them and documentation. Take my word for it, it makes your job a LOT more easier if you have proper notes... and add the power of interlinking to it and you have a killer resource. I have very bad memory and taking notes has improved my performance by an order of magnitude. It also saves you from having to ask someone the same question twice or thrice. Also, if anyone asks the same question, you can just helpfully point them to the wiki and they can read it and add to it if they need to.
The technical term for what you are thinking of is "code snippets", and googling for that will find you many programs designed to store them for a variety of platforms, including entirely web-based ones such as this one.
I set up dekiwiki on a server at work that my coworkers and I use for company specifics stuff but also for general programming tips that arise as well.
A simple wiki, may be useful. SeeTiki Wiki
I always put it on my blog. Not only am I able to get back to it later, there is also a chance that it can help someone else as well.
It's oldschool, but I keep notes in a notebook. Makes remembering solutions (or the problems that caused them) a bit easier. Usually I make 1-2 pages of notes a day.
The digital equivalent of this would be keeping a private blog or journal. Easy enough to add a search program to help you find stuff.
Worthwhile things that my boss might be interested in, like bugs and user calls all get entered into bug tracking software where it is more formally handled.
I use the excellent Trac project management system for my personal projects, and I use it's wiki as a brainstorming and note-taking tool. And, because it also hooks into the Subversion repository and the bug tracking system, I can link from my notes right to a particular section of code or a bug report.
I keep my personal projects on assembla. Wiki, Issue Tracking, Source Control... very useful.
Check to see if your editor has some kind of annotations feature. Ideally you could link a particular location in code with a small note, and store it in a centralized place. If it doesn't, that kind of plugin wouldn't be too hard to build, your biggest hurdle is going to be how to link the piece of code to a file (due to the volatile nature of code) and even that one isn't insurmountable.

Resources