Showing posts with label styling. Show all posts
Showing posts with label styling. Show all posts

Thursday, November 24, 2011

Working on Skyrim Stories

So I've been playing a lot of Skyrim lately. I mean a LOT. It's interfered with my coding schedule a bit, but I've also been working on a Skyrim-related project.

Take a look:

Skyrim Stories

Basically what this site is doing is searching Twitter for tweets tagged with #skyrimstories, and displaying the 15 most recent Tweets. My friend @netshade sent me the javascript for it, and my friend @jqr got the domain set up and (gently) harassed me to work on it.

So far I've had a lot of fun with this project. It's been good for me for a few reasons: first, the time between thinking of the idea and having a working first version was about 2 hours or so. Within a few minutes of calling @jqr for advice, @netshade had already sent me the code and @jqr had set up the domain. It feels good to get work done really quickly, especially since I sometimes feel like it takes forever for me to get ANYTHING done. It's also been a good opportunity to get my hands dirty with some CSS and I always enjoy styling. And lastly, it's reinforcing what I've known for a long time: programming is programming, and it doesn't make sense to use Ruby or Rails for every project, especially if there's an easier, more elegant solution.

A few notes here: First, I've got very limited experience with Javascript. I can typically take some code, figure out how it works and manipulate it to do things I want it to do, but I can't write my own. For example, the code @netshade sent me worked pretty well, but it was displaying user names instead of users, so instead of displaying a tweet from @illbzo1, it would display it as being from Tyler Moore. The code also displayed retweets by default, but a quick look through Twitter's Get Search API and I was able to fix that. Especially at this stage where I'm not paginating older tweets, I don't want the entire feed to get populated by retweets. And retweets don't really fit with the idea of this site, anyway.

I didn't invent #skyrimstories, but it's already (kind of) popular, so I think with a bit of promotion and some more polish, this could really be a fun site. At least until everyone gets sick of Skyrim, but that'll be another few months, at least.

I've still got a few things I want to do with it. First off, I want to strip out #skyrimstories when the tweet is posted to the site, because I think it'll read better without that Twitter-specific language. I'd also like to make the username displayed with the Tweet a link to that user's Twitter account. I'll also want to look into a way to paginate older Tweets, displaying 15 per page or so.

Anyone with more Javascript powers have any advice?

Here's a link to the project on GitHub:

Skyrim Stories on Git

Monday, August 22, 2011

Css, page design and Rails applications

I think a lot about function and form when I'm coding. I hate looking at the default black text on white body when working on an application, so I usually do some basic styling early in development. I definitely tend to get bogged down with CSS, spending entirely too much time adjusting margins, padding and other granular details, but I don't think styling can be entirely separated from the function of an application.

For example, I created a basic navigation partial, wrapped it in a div and styled it to appear at the top of all the pages in my Manticore app. I'm not sure how this will change in the final version, or if I'll keep it at all, but it certainly helps out right now, when I want to quickly switch back and forth to test navigation or to see how a change in the code works. Or if it works at all!

How do you work with styling when developing a new application? Do you leave it until the end, or do you do some basic styling and then polish it up later? Do you have someone else do it? I know it doesn't make sense to style something that may not be included in the final version of an application, but I'm not sure how other developers work when it comes to basic styling.

Agile Web Development with Rails did styling early on in the development, with some minor tweaks here and there later. It was coming from the perspective of working for a client who wanted an e-commerce site created, so that may have had something to do with getting page styles hammered out early.