andyman’s posterous

creating delicious apps for a better world 

Articles

Here are some interesting articles I've read recently:

Freelancing:
Web Development (for Wanni):
Top 10 Tutorials for Converting PSDs to HTML/CSS
Let Internet Explorer 6 Behave Like Internet Explorer 7 » DivitoDesign
CSS Best Practices

Marketing:

Loading mentions Retweet

Comments [0]

Thoughts after 6 months of Ruby on Rails

I started learning Ruby on Rails programming language and framework about 6 months ago and have been using it quite extensively to develop my first Rails web application, Headmagnet. (I am a former Java and PHP developer)

Here are my miscellaneous thoughts and lessons learned on Ruby on Rails:

 

  1. There is a learning curve to learn the Ruby programming language, and also one to learn the Rails framework. Everyday, I find features of Ruby, and features of Rails that I didn't know that I didn't know - which makes it harder to proactively learn.
  2. Even with the learning curve, I could code stuff up a lot faster with Ruby on Rails than with Java (and I'm supposedly fast at Java), and much cleaner than with PHP. I wouldn't want to go back to Java or PHP, except when work really requires it.
  3. There's quite a difference between doing Ruby on Rails the way you write Java or PHP, and doing Ruby on Rails the "right" way. The "right" way usually tends to be a lot less lines.
  4. Too many old Rails tutorials are old and obsolete. There were big changes in Rails 2. Look for Rails 2.x.x tutorials. Although many of those tutorials were written for an audience for already knew Rails.
  5. Having good and quick Ruby documentation and Rails API documentation in your bookmarks is indispensible. I'd recommend Railsbrain for downloading the Rails API docs for fast local access.
  6. The production environment in Rails for Mongrel is MUCH MUCH faster than the development environment. (more than 10x faster). I didn't know this until too late in the game, after much optimization work had been done.
  7. Named scopes are great, allowing you to combine multiple conditions and parameters for queries. I wish I knew about this one earlier.
  8. There are tons of plugins and gems. The three I'm most thankful for are: will_paginate, restful_authentication, and jrails
  9. As a proponent of separation of content, behavior, and presentation, I hate the javascript that Rails generates and embeds into the html. I love the convenience it offers though, that view methods like link_to_remote, or remote_form_for offer though.
  10. Writing and testing custom Javascript to do stuff more "properly" can take a lot longer than just using Rails view helpers to generate the view. 
  11. It's much easier to test models than controllers. You can also play with models easily thorough the rails console, and explore what you can do with them. I guess this is why they say to keep the controllers small, besides for reusability. I find the same with helpers.
  12. Autotest sure helps with continuous testing. The Rails console is useful for digging deeper and playing around with models. It can be a bit distracting though, breaking the focus/flow when coding.
  13. Slicehost is a great VPS for hosting Rails. Even if you don't use them, but want to set up an Ubuntu Linux server from scratch with a mail server, mysql, nginx server (a fast lightweight server), Ruby on Rails, and Mongrel Cluster (a bunch of Mongrel servers), they got awesome documents. If you do sign up with Slicehost, please use this referral.
  14. There's an overhead for calling view partials, especially if you call it in a loop. Just don't go crazy breaking things down into a million little view partials if you don't need to. Its hard to work in editors with when there are too many files to flip/browse between to find the right place. Originally when developing Headmagnet, I broke views down into many view partials to make the site more AJAX friendly and convenient to use with RJS. But soon, I had dozens of little partials and it got hard to manage and read. Later on, I simplified and consolidated drastically, as well as just wrote custom javascript to take care of things more efficiently and more responsively.
  15. The Rails migration features are quite useful, especially the incremental migrations where you are just adding a column to an existing table. Don't worry if you have a lot of those during initial development. You can consolidate them later if you want to. Just refer to the db/schema.rb as your reference for what columns are where.  Don't do like I did at first in using the migration files as my reference, and change old migration files to add new columns and indices and then drop, recreate, and remigrate. Just remember also that when you add new columns via migrations, it doesn't automatically update any tests. 

If anyone has tips or experiences they'd like to share, please post.

 

Loading mentions Retweet
Filed under  //   headmagnet   Ruby on Rails   web development  

Comments [2]

Fallout 3 and Lessons Learned

I hate the new game Fallout 3. I hate it because I love it too much. It is too addicting. Way too addicting. I've spent countless hours playing it since this past Saturday after launching the public beta of Headmagnet, my new web app that lets you memorize stuff quickly, and predicts when you forget things. (Well, I needed a good break after months of grueling workdays slaving away at code and dealing with web browser inconsistencies. Besides, I'm waiting to collect some user usage data from the beta test.)

Fallout 3 is a game set in post-apocalyptic Washington D.C. area after a nuclear war. You've lived in an underground vault all your life and am coming out to the surface for the first time.

Some really innovative features I've found about Fallout 3 so far, without giving any real spoilers:

  1. Character Creation: The character creation process is so original and unique, almost like real life. Your new character starts literally from the moment of birth as a newborn. The tutorial steps follow through at the ages of 1 where you learn how to walk, 10 and 16 where you set up your character's skills and abilities. By the time the real game starts, you're fully immersed as the character.
  2. Immersion and Artwork: The post-apocalyptic world they created is so immersive and real looking. The first steps out of the vault where the character has lived since birth, are breathtaking and staggering -- and in real time! Not a movie. Excellent artwork and design.
  3. V.A.T.S. system: The V.A.T.S. system for pausing combat, and choosing targets to attack is great for those who are not fast first-person shooter gamers like myself. It was a good way to integrate the mechanics of Fallout 1, Fallout 2, and Fallout Tactics, which were all top down games where things were much more dependent on the character's stats than the player's own reflexes and mouse skills.
  4. Open-endedness: just like in the Elder Scrolls series by the same company, Bethesda Softworks, you don't have to follow the main storyline, and can wander off on your own and just explore or do one of thousands of side quests. I haven't really even begun the main plot yet, but have managed to somehow spend two dozen or more hours playing the game.
Some things I wish could be improved about the game:
  1. Have more non-combat options. I'm getting tired of being harassed by countless raiders, mutants, radroaches, and mercenaries and then having the kill them in self defense. I guess it is realistic though.
  2. More keyboard shortcuts: Keyboard shortcuts for the Pip-boy interface, so you can jump directly to your inventory, stats, and data without having to go through a few clicks first and then waiting for the animations. I understand that they had to make the game for console gamers too, but why dumb things down? (I'm a biased PC gamer, who works on a Mac)
All said, here are some lessons learned, that I want to apply to my own software development:
  1. Don't deliver before you're ready. Take the extra time. Yes, yes, I've read Getting Real by 37signals and am inspired by it, and have applied it. (If you are a web developer or software engineer and haven't read it, then read it. I'll wait your you to read it and then come back...)  I'm glad Fallout 3 took so long to make, and they didn't deliver it prematurely, like so many other game developers have done, with half-baked products that need several patches before it can be playable. Desktop software and web apps are different from each other though. With web apps, it is easy to deploy new features (or should be), but with desktop apps, this is a real chore. But web apps however, make sure the features are solid, even if there are not as many of them initially.
  2. Attention to detail: The level of detail in Fallout 3 really impressed me. It's scary how detailed it is, actually. From allowing you to be able to push a ball while taking your first steps as a 1 year old toddler in the game, or the way one of the towns in the game is constructed from the metal of airplanes scavenged from an airport - this level of detail is amazing. For web apps, sometimes it's the little details that make using it easier or harder.
  3. Make the user feel good: In the game, I've saved some towns from being raided. I've negotiated a trade agreement between a group of civilized cannibals and the town they were feeding on. I've helped write a survival guide. There a reward, whether it is in bottlecaps (the currency of the game), items, or karma points. With web apps, reward the user for doing things you want them to do, like coming back to the site. Find someway to make them feel good about using the site and coming back to it - whether it is by rewarding them with some stat on the page that they can show off to other users and friends, or just showing them new content for coming back. 
  4. Addiction: create a need in the user to want to keep using it. With Fallout 3, I'm addicted because I just HAVE TO find out what happens next, or what happens if I explore someplace I heard about. What does the post-apocalypse White House look like? I've got to travel there and find out.  For social web apps, one of the addictive qualities is - "If I don't check that site again, how will know what my friends are saying and what's happening in their lives?" (where calling, face-to-face, or email may not be convenient) or "My online friends are expecting me to use it and twitter/blog every so often. If I don't, then I won't be relevant or accepted." (peer pressure)
One last note on game addiction:
One good thing about non-online computer/console games is that the addiction to them is easily beatable with mere time. The more you give into the addiction, the faster you'll be free from the addiction when you beat the game or bore of it.  However, the same is not as much the case with massively-multiplayer online games (MMO's) like World of Warcraft, or even old-fashioned text-based MUDs (which are still more fun than the newfangled 3D MMOs IMHO), where you may stay addicted until the online game is obsolete or a better one comes along to take its place.

Loading mentions Retweet
Filed under  //   addiction   fallout 3   gaming   getting real   headmagnet   web development  

Comments [3]

Woohoo! Headmagnet is born!

Hurray! I've just launched the public beta of the web application I've been working on for the past few months: Headmagnet


It's actually up and open to the wilds.


Ironically, it is Halloween today, and the headmagnet.com site has lots of orange. If you're reading this and got some spare time, please take a look.

Now I just need to find out how to find people to come to the site. Please post if you have some tips.

Loading mentions Retweet

Comments [0]

Articles

Comments [0]

Articles

Comments [0]

Articles

Here are interesting articles I've come across this week:

On freelancing and clients:
The Only Two Secrets to Motivating Yourself You’ll Ever Need | Zen Habits

Loading mentions Retweet

Comments [0]

Outrage! Porkbarrel Bailout Bill!

Here's a link to the PDF of the bailout bill passed by U.S. congress and signed by Bush today.

I've started reading through it after hearing about the porkbarrel spending in it. About $150 BILLION work of porkbarrel and earmarks for a $700 BILLION bailout bill. Incredible!

I urge you to read the bill for yourself. I'm totally outraged, and you should be as well, if you are a U.S. taxpayer! Both Obama and McCain, who both supported this bill didn't say anything about all this porkbarrel.

Besides for the porkbarrel items for the childrens' arrows (p.301), wool imports and wool research (p.296), motorsports racetrack exemptions (p.290), and rum (p.279), there also the following crazy crazy items:

  • Section 504: Income averaging for amounts received in connection with Exxon Valdez Litigation, page 301
  • Section 401: Permanent Authority for Undercover Operations, page 297
  • Section 322: Tax Incentives for Investment in the District of Columbia, page 291. (Who do you think benefits from this?)
What can we do about this? Do the congress people actually read the bills before they sign these things? Even if we replaced each senator and representative with 200 lines of Ruby on Rails code, we'd be doing better.

Loading mentions Retweet

Comments [0]

Articles

Comments [0]

Articles

Here are some interesting articles I've found recently:

For Wanni:
25 Beautiful Minimalistic Website Designs - Part 4
101 Ways to Really Annoy Your Vistors

Work:

Finances:
A Recession. The perfect time to make money
How and When to Cancel a Credit Card

Loading mentions Retweet

Comments [0]