Rails 3.x Assets Pipeline Tip - Any file can be a manifest
posted 1 week agoI’ve just started playing with Ruby and Rails, and one of the cool things I’ve been tinkering with is the new assets pipeline. It does a few neat things:
- Compiles multiple JS/CSS files into a single file and minifies it
- Evaluates things like Coffeescript or SASS/LESS
- Allows you to logically store your assets whether they be images, JS or CSS files where they belong - be it with a vendor, plugin, or right in your app, but access them all off the root of /assets.
- and more
The RailsGuide does a good job of going over the basics.
However, one thing that concerned me was that there didn’t seem to be a way to group things like JS files into separate compiled files. A good reason to want to do this, for example, would be if you had an admin section of your site with its own JS that you don’t want to pointlessly load on the front end.
The documentation lead me to believe that the application.js file was the singular manifest file. However, after poking through the sprockets code, I’ve learned that ANY file can be a manifest file, so you can pop an admin.js file in your app/assets/javascripts folder with
//= require_tree ./admin
This tells sprockets to compile all the js files in the admin directory into the admin.js file at the root. Then you can include that in your application via lazy loading or via
<%= javascript_include_tag “admin” %>
in your admin section layout.
- 17,195 notes | Comments
- comic •
- doctor who •
Tags:
I recently answered this question on Quora. I feel I came across a tad more aggressive than I intended. I think it’s clear I’ve had some pent up frustration with the Joomla project and community.
There’s also a little back and forth between myself and Amy Stephan (Quora | Twitter) in the comments of this answer as well which flesh out my opinion on the current state of Joomla and where the project is lacking.
It’s frustrating because I really liked where Joomla was headed originally. I honestly didn’t believe that forking Mambo was the best long-term idea, but it gave the project a huge initial push from an enthusiastic community who was eager to make something of the stagnate Mambo project.
After an initial burst of code and some major releases advancement seemed to wane and it’s been very nearly 3 years since the last major release (1.5). In that time projects like Drupal, ModX, Expression Engine, and many others have blown past and are maintaining good momentum and seeing steady community growth.
I feel many developers simply aren’t very excited about working on Joomla, and I feel it’s the Mambo fork that is to blame. While it did give Joomla a great burst of users at the start, the horrible job of refactoring Mambo into a more modern platform is far more laborious than it’s worth.
Also it’s not just old code that hurt Joomla, but rather old, outdated site management metaphors inherited from Mambo. Most people aren’t publishing old style news site portals anymore. We’ve long left the days where things like PHPNuke portals were commonplace.
Amy maintains that the forthcoming 1.6 release will “leap frog” projects like Drupal due to its long incubation. It remains to be seen if this will be the case, but I wish them all the best - the more options that exist in the open source CMS arena, the better.
Stop Making Massively Multiplayer Online Games
posted 1 year agoDear Aspiring MMO Game Developers,
Stop trying to make MMO games. You will not be successful. Even if you get a GREAT first couple months, players will drop off when they run out of content, get bored, and/or can’t convince their friends to quit Word of Warcraft.
You will never get a critical mass of subscribers to not only recoup the costs you wasted building the game and setting up infrastructure, but to fund the development of new content.
WoW was a fluke. It was in the right place at the right time, with a company and franchise behind it that most of the PC gaming world adored.
It doesn’t matter if your game is better. The graphics could be better, the gameplay could be better, there could be more variety, exciting combat, deep character building, and weapon crafting mechanics.
It doesn’t matter if you have a killer IP behind it. Star Wars, Star Trek, Warhammer 40K, Lord of the Rings, Dungeons and Dragons, etc - irrelevant.
It doesn’t matter if your subscription is cheaper. It doesn’t even matter if your game is FREE to play.
You won’t succeed because everyone who is into these sorts of games (eg masochists) are only playing WoW because that’s what their friends are playing.
This means that in order to succeed in this market, you need to “convert” entire guilds en-masse away from WoW - which isn’t going to happen; and even if you do, you’ll lose them as soon as Blizzard announces a new expansion.
How many of these titles need to fail, and how many dev studios need to close doors before the industry comes to realize this? Stop making them - please. Think of your families.
You’d have a far better chance at success with peer-to-peer, instanced, co-op multiplayer games like Borderlands, and Diablo which require no central server to maintain persistence, and won’t require you to charge a subscription to play.
This page on GNU’s site as part of their published philosophy has been making the rounds today on Twitter encouraging users to avoid licensing their next open source library under the less-restrictive LGPL license, and instead opt for GPL instead.
The main difference between GPL and LGPL is that GPL prohibits the code from being used as part of commercial and/or closed source projects. The article defends this notion by claiming open source software is in direct competition with proprietary software and that the open source community should not let closed source projects benefit from their work.
Why? Because proprietary software developers have money and open source developers do not… wow.
There are several things wrong with this philosophy. Firstly, the implication that open source developers are in some sort of competition with proprietary software developers is short sighted and childish.
Commercial business often supports open source projects via monetary donations, or code. There are also several business models for open source software that rely on commercial services, plug-ins, support, or training to finance further development of the software. What side of this supposed battle do projects like this fall under?
Furthermore the article implies that the only reason someone would even consider releasing under LGPL is to give the developer’s ego a stroke by seeing more people using their library. I don’t know about you, but this sort of condescending attitude isn’t doing much to convince me of the virtues of GPL over LGPL, or gain my support in this supposed “us vs them” software war.
That’s not to say that LGPL is always the answer - different projects will have different goals in mind. However, the hostile attitude presented in this “philosophy” is both unnecessary, and short sighted.
- 0 notes | Comments
- open source •
Tags:
Sad but true. Even I was under the impression that when Apple said iOS 4 was going to support multi-tasking, that it was actually going to support multi-tasking. That’s not to say Apple’s solution is bad - in fact, it’s quite brilliant. It’s just missing a critical ability; the ability for apps to make requests for data over the Internet in the background.
Most iPhone users expect this to be possible as of iOS 4 and it’s not the case currently.
By naming these features “multitasking”, Apple has set customers’ expectations to include what apps can do in a traditional computer multitasking environment.
It’s going to mislead people into expecting such behavior from apps, but we can’t actually deliver most of it.
- 78 notes | Comments
- smartphone •
- apple •
Tags:
HDH Invitational Starcraft II Beta Tournament
posted 1 year agoThose who follow me on Twitter are likely very aware of the fact that I’m a big fan of Starcraft, or more specifically the recently closed Starcraft II beta.
Given that beta keys were in limited supply and I didn’t manage to get a key until about half-way through, I found there were several YouTubers casting high-definition replays with commentary of high-level play.
With the explosive popularity and enthusiasm around the Starcraft II beta, two of the better commentators, HDStarcraft and HuskyStarcraft managed to organize a global tournament with some of the best players in the young Starcraft II scene.
I’ve been following the tournament closely on YouTube and have found it extremely entertaining to watch. If you haven’t ever really gotten into Starcraft before, or are curious about the hype, this tournament is probably one of the best ways (outside of learning the game and playing yourself) to get a taste of what makes the game so entertaining to spectate and play.
I’ve included links to every match in the tournament after the cut. I haven’t included player names to avoid spoilers.

