wallacepolsom
hello vonnie

izzy's playlists!

Origami Around
Show & Tell
PUT YOUR BEARD IN MY MOUTH
d e v o n

Andulka

titsay
🪼
h
Claire Keane
I'd rather be in outer space 🛸

PR's Tumblrdome
Misplaced Lens Cap

★

#extradirty

roma★
Keni
KIROKAZE

seen from Türkiye

seen from Spain

seen from Brazil

seen from South Africa
seen from South Korea
seen from Germany
seen from United States

seen from United States
seen from United States

seen from Saudi Arabia
seen from United States

seen from United States

seen from Australia
seen from United States
seen from United States
seen from United States
seen from United States
seen from China

seen from Russia
seen from Tunisia
@iamsamsterdam-blog
JOSÉ GONZÁLEZ - CROSSES (DINNER DATE REMIX)
I'm digging this right now.
Get it here: https://soundcloud.com/dinnerdatemusic/jos-gonz-lez-crosses-dinner
Build a Blog-Based Site with RefineryCMS
So this post is a little more self-serving since I need to build a simple fashion blog for Stunable AND I want to learn some fun rails CMS solutions for my class at Flatiron School. Obviously, since no one in their right mind wants to spend time updating code every single time they want to post to their blog, the wonderful people of the world have developed CMS or Content Management Systems to allow non-technical plebeians to do lots of stuff like write blogs, sell stuff, and create photo galleries of cats. The most common/[questionably] usable CMS platforms are Wordpress, Drupal, Joomla!, Expression Engine, etc. but I'm not even going to offer you links to them because I hate them. If you have a problem with this deal with it and google them. This isn't a post about CMS platforms anyways.
For this simple project, I refuse to use Wordpress, Drupal, or {cringe} JOOMLA! (I just vomited a little in my mouth no offense if you're totally into Joomla! but personally I think it's the devil so anyways...
I am going to introduce you to my new friend, RefineryCMS (not to be confused with Refinery29, which is a fashion and style website I'm obsessed with and you should be too). RefineryCMS is a rails-based open source content management system written in Ruby as a Ruby on Rails web application with jQuery used as the JavaScript library.
First of all, why the hell would someone use a Rails-based CMS when there are tons of other "easier" solutions out there like Wordpress or even CSS-based "light" CMS?
Wordpress, Drupal, and Joomla! and most other CMS platforms are PHP-based and require a knowledge of PHP to customize themes and make super schnazzy designs. I like my stuff to look good and PHP is no run.
Light CMS is just bull.
Rails is da bomb
Why RefineryCMS and not Locomotive or any other Rails-based CMS?
Refinery is definitely the most user-friendly for a non-technical end user.
There are tons of engines, plugins, and extensions, which can be found here.
Because the CMS can be added to an existing Rails app, it allows you to build super cool customizable rails apps for yourself or your clients.
It has a pretty admin (i think?)
Get Started with RefineryCMS! (and follow along as I attempt to build a custom blogging site using RefineryCMS, the refinery-blog extension, and Foundation by ZURB
(1) Install Refinery CMS
I'm not going to walk through the installation process step by step because Refinery themselves have done a better job with the documentation. This can be found here.
(2) Install the Blog Engine
The blog engine actually installs according to the documentation with the exception of the gem entry in the Gemfile:
Open your project's Gemfile, there are a series of gem entries that were placed there when you ran the RefineryCMS installation. These are commented out by default, look for and uncomment: $ gem 'refinerycms-blog', :git => 'git://github.com/resolve/refinerycms-blog.git', :branch => 'rails-3-1'
Now run $ bundle install
If you run 'rails g' now to see all the available generators you'll see a new one added to the refinery section for the blog. So run it and and run the migrations with: $ rails g refinery:blog $ rake db:migrate
Okay that's it you're done! Login to you're admin and you should see your blog tab. MAGIC
Really freaking annoying issues I encountered:
Well mainly just one and that issue has to do with Dragonfly and ImageMagick (yes that's spell correctly I'm not a poor speller). For some reason when I went to add an image to my new blog post I kept getting a weird error that looked like this:
Dragonfly::Shell::CommandFailed in Refinery::Admin::ImagesController#create
What you need to do is go into your gemfile ad add the gem 'dragonfly' and then run a bundle install. Also MAKE SURE YOU HAVE INSTALLED IMAGEMAGICK IN YOUR APPLICATION DIRECTORY (not system-wide it won't work!).
Make pretty and add custom design schtuff.
For the design side of things I chose to use a framework such as Zurb-Foundation or Twitter Bootstrap frameworks. I chose Zurb Foundation primarily because I wanted the mobile/fluid grid features out of the box. It makes sense to me to advocate a mobile-first approach to website apps now a days, and so having the feature baked into the styling from the start was a big plus for Foundation.
Installing ZURB Foundation and getting it to work is pretty easy. Honestly, if I can do it you can too.
First you need to add the following to your gemfile:
$ gem 'zurb-foundation'
And then run the provided generator to install the stylesheet and javascript onto Sprockets:
$ rails g foundation:install
* Make sure that zurb-foundation is under "assets" in your gemfile
As soon as this is done the typography from Foundation takes effect. Foundation also comes with another generator that would normally update the <head> section in the layouts file and set the top-level section's class to 'container'. RefineryCMS gets in the way of using this method because the generator simply creates a new bare-bones layouts/application.html.erb file which overrides the RefineryCMS version. Doing that loses the system tabs as well as the logo/menu/page content/footer structure that Refinery give you. Instead, the process needs to be done manually like so:
Use Refinery's provided overriding functionality to create a copy of the partial that contains the <head> tag:
$ rake refinery:override view=refinery/_head
This copies a version of the '_head.html.erb' file to your app/view/refinery/ directory. Open this file and add the following meta tag within the <head> tags:
$ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
From here, it is essentially a matter of overriding the pages and sections that you want to style, adding the Foundation classes to the templates and adding your css to your assets/stylesheets directory. Foundation behaves and plays well with Refinery and finding the correct views has proven to be the trickiest part. I'll describe how I setup just the top-level container and max-widths that I am starting out with.
I just wanted something very simple to start out, and the typography and line spacing was already a good start. But the content area was filling the whole screen - the reset setting being margin 20px on either side. So, to solve this I wanted to put the top-level container around the all the content header-to-footer. The page that aggregates all the partials is the 'application.html.erb' file, so first step is to override it:
$ rake refinery:override view=layouts/application
Open the newly copied file in the app/views/layouts directory, and add the container class to line 8 from this:
<div id="page_container">
to this:
<div id="page_container" class="container">
Which should give you this:
EWWWW UGLY!!!! SO GROSS. Now in order to customize the design it's up to you (or me in this case) to get cozy with the zurb-foundation, which I will be doing all night long. If you want to track my progress my source code can be found on Github.
Further Reading from people WAY smarter than myself:
- MY CODE ON GITHUB
- Why Django and Rails CMS are so rare
- Refinery Blog Extension: Github
- RefineryCMS Homepage
- ZURB Foundation Homepage
- ZURB Foundation: Github
Look Ma, I Built a Game!
Gaming is cool you guys.
I'd like to talk a little bit about my educational background for a second. Aside from receiving a BA in linguistics, critical theory, and symbolic systems at Colgate University, I have had very little--if any--"formal" training in the computer arts. Bah! Haha. Formal!? I took a computer science class once and the coolest shit we built all semester was a lame cash register program that could calculate change based on a given input. Wtf are they teaching kids these days? My UP bracelet has more computing power than that. And I'd hope my brain does as well...
Anyways, after my adventure deep into the fairyland forest of liberal arts (which I totally loved, mind you), I decided it would be super fun to jump straight into a Master's degree in "Digital Media." Wtf is that? Don't ask, I still don't know... All I know if that I started taking classes at NYU's Game Center (it was a little more fun than making P&L spreadsheets at Stern) and ended up in quite a few game design and development classes. I mean, where else do you get graded in how well you play Halo 4, or in your analysis of Heavy Rain's so-called "Immersive UI." Interestingly enough, I managed to get a Master's Degree in "Digital Media" without ever once having to program a game or application myself.
.... yeah
fuck that.
The other night I was perusing some of the incredibly witty and not so informative presentations on speakerdeck.com and stumbled upon a few presentations about Ruby video game development.
Who doesn't want to play with Ruby?! First of all, most games are build on C++ and C# or worse yet, Java and C.
EW!
YUCK!!
Super cool game companies have written their own proprietary languages like id Software's QuakeC and Epic Games' UnrealScript, which is awesome. For them.
That really doesn't help me at all so whatever. Screw them. It's 5 am and I want to build a game in Ruby!!!
This guy knows what's up.
I really don't like reading anything that is a vague abstraction of a fairly straightforward concept. I spent the past 6 years doing that, and trust me, I loved it. I had to have loved it if I put myself through thesis after thesis on Derrida, Kafka, Benjamin--the whole god damn Frankfurt School xoxox #frankfurtschool--but these days, I really value clarity. I don't want to spend 8 hours musing over one line of code like I'd spend analyzing Heidegger's Being and Time. Maybe I'm an asshole, I don't know, but I feel like to design a good system is to design a clear system. So it only makes sense to me that instead of reading some dude's convoluted and abstract instructions on how vaguely to build a game using Ruby, that I follow some clear as glass tutorial and then fill in that whole understanding part after the fact.
I decided to build a ruby version of the game Breakout based on this tutorial. Mark (the dude giving the tutorial) is pretty clear in explaining WHY he is doing things and I found the experience quite pleasant, aside from his incessant chewing and coughing.
First of all, please check out my SpeakerDeck Presentation: A Brief History of Action Games.
I got a little bored midway through so I stop at Breakout, but that's cool cause that's the only game you need to know about for now.
What is an "Action Game," you ask?
Wikipedia says the following:
The action game is a video game genre that emphasizes physical challenges, including hand–eye coordination and reaction-time. The genre includes diverse subgenres such as fighting games, shooter games, and platform games, which are widely considered the most important action games, though some real-time strategy games are also considered to be action games.
...Wiki says it better than how I could describe it so we will go with that one. In terms of examples, action games started with Pinball, moved to Pong, Breakout, the nerd-idol Space Invaders, Pac Man, Donkey Kong, Zelda (more action adventure), and so on.
I did a lot of game design in my masters but pretty much paired up with a CS kid in order to prototype games when project time came around. From what I could gather, the general programming logic of a video game is as follows:
The central component of any game, from a programming standpoint, is the game loop. The game loop allows the game to run smoothly regardless of a user's input or lack thereof. Most traditional software programs respond to user input and do nothing without it. For example, a word processor formats words and text as a user types. If the user doesn't type anything, the word processor does nothing. Some functions may take a long time to complete, but all are initiated by a user telling the program to do something. Games, on the other hand, must continue to operate regardless of a user's input. The game loop allows this.The game loop may be refined and modified as game development progresses, but most games are based on this basic idea
Look Ma, I Built a Game!
First of all, feel free to check out my version of Breakout on Github and follow along!
What I used:
Ruby has a few Game Development Libraries, two of which are pretty popular: (1) RubyGame and (2) Gosu. I chose to work with Gosu because word on the street is the RubyGame is not actively maintained and Gosu is a little easier to use.
Gosu, my new best friend.
Find it here: https://github.com/rubygame/rubygame
C++ Library
Ruby Wrapper uses SWIG to call C++ (if you don't know what SWIG is read up on it here.)
Uses OpenGL for Rendering
Actively Maintained
The best part about Gosu?
gem install gosu
done.
Then you just require 'gosu' at the top of your breakout.rb program like so:
You then create classes for the Ball, the Brick, the Paddle, and then GameWindow, which is a superclass of Gosu. See my code or watch Mark do a fairly informational walk through of the process in this tutorial.
This was really just an exercise in following instructions, and trying to figure out what the hell all of it meant after the fact. All the breakout game is, in essence, is a bunch of simple classes and instances of classes.
https://github.com/SamanthaRadocchia/breakout-game
For those of you interested in more info, hit me up via any social media or check out my site: samantharadocchia.com
Other games built with Ruby:
http://www.youtube.com/watch?v=_VmOiZVc7pM
http://www.libgosu.org/cgi-bin/mwf/board_show.pl?bid=2
More Resources for Building Games in Ruby:
http://manwithcode.com/310/making-games-with-ruby-ep-2-setup/
https://speakerdeck.com/cadwallion/game-development-and-ruby
https://speakerdeck.com/sausheong/playing-with-ruby
HERE'S HOW: Customize the Command Line by Adding Emoji Icons to the Bash Prompt
If you haven't already noticed, my terminal is THE SHIT. Why? Because every time I do anything, I see a cheeseburger. I can also see the super cool dancing lady in the red dress, a pizza, a stiletto, or a bahama mama (or something that resembles it) if I so choose.
It gets even better. YOU CAN DO IT TOO! Interestingly enough, emoji icons are built into OS X so it really isn't too difficult. Here's how to customize your own command line by adding emoji icons to the bash prompt:
Open your Terminal and navigate to your .bash_profile. If you don't already know how to do this, the file--albeit hidden--is in your home directory (which you are already in when you open a new Terminal).
Enter ls -a. This will reveal hidden files. You should see a file called .bash_profile.
Enter the command open .bash_profile. This will open your .bash_profile in your default text editor or whatever text editor you prefer (I use Sublime Text 2 so for that I use the command subl .bash_profile but your Mac's default TextEdit program will suffice).
Add a new line like the following: PS1=" " If you want to take a look at what my .bash_profile looks like, see below:
Pull down the "edit" menu from your text editor and select "special characters," then select "emoji" from the special character menu.
(in sublime text it looks like this)
Find the Emoji you want to use in the shell prompt and drag & drop it into the PS1=” ” line so that it’s contained within the quotes
Depending on terminal settings, nothing may be visible after using drag & drop, but put two spaces after the blank space where the emoji was dropped, it will end up looking something like this: PS1=” ”
Save your .bash_profile
Open a new terminal window to see your new super cool shamrock, beer mug, wine glass, or pizza prompt!
"Last Thoughts on Woody Guthrie" is a poem written by American singer-songwriter Bob Dylan, and recited live during his April 12, 1963 performance at New Yor...
"and all the time you were holding three queens..."
customized my shell to open with a cheeseburger. clearly i'm putting my skills to good use.