I love Sass… there I said it. Go on tell my how much Sass sucks, I don’t care. I’ve been using it and have been in a happy code/developer relationship for quite some time now.
However there has been some hardship between Sass and I after trying to deploy my application to Heroku. The problem lies in that Heroku does not allow filesystem write access to anywhere but the temp directory. In a standard Rails application you would be putting your sass files in
public/stylesheets/sass/, which would compile to
public/stylesheets. This makes your app angry, APPLICATION SMASH.. ARGHHH.
So now that you have some background, have you run into this too? Yes… I thought so. Well it just so happens that I’ve got the cure for what ails you. Actually not me, more like this guy. It’s called Hassle and long story short, it is a gem/plugin that rewrites where your Sass files are compiled/served. You don’t have to do anything but install it.
Add this to your Gemfile and you’re pretty much done:
Whoops! If you’re running a rails 3 app then you’re probably real mad at me right now. Well that’s what you get for not finishing my article. Don’t let it happen again! I forgive you.
Turns out that the straight up gem is not rails 3 ready as of yet, and totally hoses your app. Alas there is a lovely fork that provides the nurturing that I require.
gem 'hassle', :git => https://github.com/Papipo/hassle
So there you have it! Your Sass files are now written and served to/from
/tmp which is a writable directory in Heroku. All of a sudden everyone is playing nice, hooray.
Just an FYI, some of the statements made in this article are fact and some are completely fabricated… believe what you will. The truth is out there.
Setting up ctags is simple, now that we have homebrew:
brew install ctags
That’s it. Viva la brew!
Now go back to your rails project in Vim and issue the
Whoops, that didn’t go as planned. You are probably seeing something like this:
invalid flag -- -R
What the heck I just installed ctags via brew, didn’t I? Well yes you did. The problem is that OSX has ctags installed already and is command blocking your awesome ctags implementation (which is actually exuberant tags).
If you were to issue the ctags command alone in the terminal you will see something like this:
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
That means you are still accessing the original ctags implementation on OSX. Turns out this is a simple fix. Just rename the
ctags command in
sudo mv /usr/bin/ctags /usr/bin/ctags_orig
Now if you reload your terminal or open a new window and initiate the
ctags command, you should see something like this:
ctags: No files specified. Try "ctags --help".
Now you’re in business! Go back to your rails project in Vim and run the
:Rtags command again. Now it should appear that the command completed. Give it a try. Go search for one of your methods. With the cursor on something you want to find, press
Quick tip: When using the same repo on multiple Heroku apps, such as staging, qa, production, you can pass a flag to heroku gem commands so that they are specific to the environment you want.
heroku logs --app staging
Just pass the —app flag along with the name of your app on heroku (in this case the name of the app would be ‘staging’)… there you go. App specific logs. Or whatever it is you wanted.
As a software developer there are many different realms of knowledge that are necessary to be perceived as successful. There is so much information, even in one particular aspect, to be processed that even super brained comic book characters couldn’t keep up. So why do some feel it necessary to know everything? Not only that but get upset at themselves for not knowing. I understand having a competitive drive to be the best but knowing everything is just out the realm of possibility.
There is a good majority of days that I feel like a complete idiot for not knowing something till i realized that it is ok not to know. That is the beauty of working in a team or in a pair programming environment. Someone is bound to be in the know enough to help. When I don’t know something, I try to figure it out quickly and if it’s just not happening I will ask someone else. Come on guys, even with your gps powered techno devices… It’s ok to stop and ask for directions sometimes.
Actually not knowing something tends to be more satisfying for me because I love learning. Plus, more often than not I will figure it out on my own with a little extra time, when I do it’s like kicking the Hulk in the testicles. I feel like “F, right I just did that. Did you all see that? That was me.”
It’s the small wins that really count for me. I’d like to consider myself a “Jack of a moderate amount of trades, master of some (every once in a while)” and I hope you all do too. Not sure if this article amounts to much more than an incoherent rant but I hope that some of you take away that it’s cool to not be in the know on every subject.
I’ll be honest, I was never really a _why fan. It took me a long time after discovering ruby to actually sit and read the Poignant Guide to Ruby. Not sure what the reason was for me fighting it, but I did. It wasn’t until after I discovered Hackety Hack that I really started to appreciate _why. Something about him taking the time to create a program that helps kids learn really struck with me. Must be because I enjoy teaching beginners. What can I say, I’m a mediocre programmer but I feel that I have what it takes to get people started. Anyway, what was I saying? Oh yeah, _why. So I finally sat down and read most of the Poignant Guide and was amazed at how much fun it was. It was mostly banter between a few cartoon characters but still found the time to teach people ruby. Plus I finally realized where all the ‘chunky bacon’ references came from.
My take on _why’s demise:
I didn’t really follow what was happening when his disappearance occured, but later read a few articles on what is believed to have happened. Okay, I get it… lets say that his real life persona was compromised. I would mildly understand the reaction of completely stepping away. To me it seems a little over the top to not only step away but to remove everything. Of course some people reside on both sides. Some say they get it, some say it’s shitty of him to do. Hey, as programmers, we’re all a little eccentric… right? Maybe that is what drove him to the extreme.
So that pretty much brings me to the point of this article. We’ll probably never know, and really is it our business anyway? Let me ask if there was another reason for the almost complete disappearance. We all know that for the most part an artist is not truly appreciated until they pass and I would say that _why was, in many respects, an artist. If you ask me… I think he went to the extreme to bring us all together. By removing all assets of the _why persona he has forced the community to come together to rebuild his estate. What if he felt there was no where else for that persona to go and decided to give us one last great act. That would seem like quite and artistic thing to do. How long has it been since this happened and we’re still talking about it? People are still investing time and effort to continue the projects he didn’t leave behind.
Maybe it’s just me wanting to believe that this story is more fantastic in nature than it actually is but this is what I think and will continue with.
I’d like to take a minute this morning to open up a discussion on how we (as developers, ux designers) look at the whole username/password/login interaction.
The normal trend in interaction when signing up for a new web service goes something like this:
- enter my email
- (throw in a username once in a while)
- enter my password
- enter my password again
This is just the basics… sometimes there will even be extra information to enter as well. I want to just gloss over that part for now and just focus on logging in.
So I’ve been thinking about this a lot lately. Why? I have no idea, just trying to make this interaction a little smoother for the end user I guess. You got to focus on something, right?
A few thoughts i’ve seen come up lately go something like this:
When creating an account does the user need to enter a password confirmation? In this age of the super simple password reset. If i didn’t know my password wouldn’t I just hit up the link to reset it? So why do we need that extra step to confirm that it was correctly typed? Of course, this requires a valid communication tunnel to the user that ensures they can get the password reset mechanism. This nicely leads into what we (should?) do about usernames.
The required fields for creating an account vary widely on different services. Sometimes I’m asked for an email, sometimes a username (which could be my email), and sometimes something completely different. Is a username necessary? Could we just ask for an email address and be done with it? This would help ensure that we have a valid communication path for important messages to the user such as password reset. Also this would be enough to be used as a unique identifier until an account is created and a system wide identifier can be created. What? You aren’t specifically setting a system unique for your user? Why would you do that? Using the user entered email/username as an identifier is just stupid in my opinion. I’ve seen this situation before and it’s always messy. Inevitably a user will not want to be known as firstname.lastname@example.org in your system anymore. What can I say… these things happen.
Once a user is in your system, they should always be assigned a unique identifier and that way all interactions can be referenced by that unique. How the user wants to be known in your system is irrelevant at that point. Now from a ux perspective, the user can be known as whatever they want. (I’m looking at you Last.fm, not being able to change your username is idiotic)
Now that we’ve gotten through that, let me lay some password reset thinking on you. Here we go… I forgot my password again, nuff said. You mean you don’t use 1password to remember all of these things for you? I know, I know. Not everyone can be that cool. So this is what I think should be done when you need to use password reset. Hey I forgot my password and there is a link right next to the login fields to help me get my password back. Clicking this link takes the user to a simple form that asks for your EMAIL ADDRESS. That’s it! Please don’t ask me for my email address and username or any other combination of information that I’m not going to remember, considering I couldn’t remember my important password to begin with.
So I think most of what I’ve been pondering has been covered. Should I throw a curveball at you now? When signing up for a new account… do we even need to ask for a password? I think this is one of the most interesting interactions I’ve seen lately. Is the information that will be collected or distributed that important? Does your user care about this information enough password protect it? Instapaper was the first service I’ve seen implement this. Sure you can have a password if you want but it’s not necessary. Do I really care if someone gets into my account and reads the articles I was going to read? Not really. Maybe if they read and deleted them before I could get to them. That wold be a bummer but not world ending. Obviously this path would not be taken for a service that compiles your health records or anything else of that secure nature. I do think for a lot of services this could be a viable option though.
After all of this, what was this discussion about? Well I just wanted to try and open a dialog between fellow developers about how to make this user experience more streamlined for our users. Don’t they deserve it?
This is what I believe this would look like:
With all of this being said, please comment. I want to hear what you all think about this interaction that we have to deal with pretty much every day.