Do I actually have readers? And if so, do you have topics you’d like me to post about? Add to the comments and suggest ideas.
When this post is a month old with zero comments I think I’ll do something else with this site!
Do I actually have readers? And if so, do you have topics you’d like me to post about? Add to the comments and suggest ideas.
When this post is a month old with zero comments I think I’ll do something else with this site!
I just returned from Baltimore, home of RailsConf 2010. It was my first ever conference (Rails or otherwise), and it was an incredible experience thanks to the amazing community and the many takeaways.
The Ruby on Rails community has a wealth of friendly, generous and hospitable people from all over the world: San Francisco, Portland, Seattle, Vancouver, Winnipeg, Chicago, South Bend, Philadelphia, New York, Baltimore, Richmond, North Carolina, Florida, the UK, Denmark, Kenya, Australia, and Uruguay. The Ruby community in Baltimore is filled with the friendliest guys, and they showed all of us a great time at the local pubs.
I had a lot of opportunities to mingle with other Rail developers over the 4-day conference. I met people from Github, Heroku, Engine Yard, New Relic, sort of talked to DHH for second, had a great short conversation with Derek Sivers, and met Ryan Bates, John Nunemaker and Chris Wanstrath. I can tell you they were modest, real, genuine people with tremendous spirit for the community.
Along with the regular sessions, I attended the Rails 3 Ropes Course and Mobile App Development with iPhone/iPad and Rails tutorials, and I learned some interesting ideas for continuous production integration with Cucumber that are centered around DevOps. There are some exciting things coming from Rails these days. Rails3 is in beta4, very close to RC1, and it has so many excellent updates. I will go over my notes on those in an upcoming post.
Alongside RailsConf was BohConf: a local un-conference in one of the rooms at RailsConf. Everyone at RailsConf had access to BohConf. It was a hacking room, with regular paired programming exercises and general “anything-goes” tables where people could work together or alone on any project or idea. I sat in on one of the exercises alongside my new friend Robert, and we learned faster testing and development practices when thinking about how to fulfill business rules. I also spent a little bit of time starting my first real iPhone app, and I’ll be posting updates as I push forward on that work.
One of the most important things I learned at RailsConf is that no one is particularly special or gifted. The people who contribute heavily to the community are those who work hard and deserve the status they earned among the rest of us. But there is no reason for the rest of us not to contribute back, not to work just as hard; and there’s no reason we couldn’t. These guys weren’t looking for attention, they had real problems to solve and then shared the fruits with us.
Hard work, kindness, fun, friendliness, generosity, hospitality, common sense, contribution, value, ideas, knowledge, helpfulness—these traits are commonplace among the developers in the Ruby on Rails community. It’s now my goal to facilitate the influence of the RailsConf goers everywhere I go because while I traveled to the conference alone, I stayed among friends.
Here’s an article showing how mind-blowingly simple it will be to use jQuery and unobtrusive javascript in Rails 3.
I’m seriously a fan of Rails’ dedication to HTML5 advocacy. I’m excited about all that’s coming in web development this year.
Hey, I’m starting to learn how to develop applications for the iPhone, so I thought I’d start sharing what I find along the way.
First, I picked up two books:
Turns out, I’m not quite ready for those books. But a peek at the first few pages in each told me that my Ruby background would help me learn the basics of C, Objective-C, and my Rails and RubyGem API experience should guide me through the iPhone SDK. If you’re like me, feel free to buy them now. The tutorials for C and Objective-C aren’t long, and the books promise this will be enough knowledge to learn with.
So the next thing I did (which should have been the first thing I did) was find C and Objective-C tutorials:
I’m only up to “chapter” 6 on Objective-C, but so far the concepts are pretty simple. Some things I don’t like and other things I do like.
In C, variable types must be declared. In Ruby, that’s not the case. And you have to use type conversion (casting) to get different results. If you’re confused about what this means, the C for Cocoa tutorial should help. I prefer Ruby’s duck typing. It’s less to write and worry about. Functions have to be typed, too. Yech.
In C, you can define a function and implement it later or in a separate file. I think that’s kind of nice. You can quickly scan what type the functions return, their names, their arguments and what types they should be; all without the code in between.
In C, you can declare your own types! That’s pretty cool. It’s kind of similar to creating a class in Ruby.
In Objective-C, so far I’ve created a class and I had to declare the getters, the setters and the methods. And the methods just return the getters that are set by the setters. It’s weird. But it’s probably just a ridiculously simplified model to teach me how those things interact.
That’s all for now. I’m going to keep sharing as I go.
I posted a tutorial for using jQuery with Cycle at the Neoteric Design blog. I really love working there, and I may have some thoughts on that later.
Please check it out:
http://www.neotericdesign.com/blog/2010/04/build-a-slick-portfolio-w-jque.php
This post is a follow-up to the post on my personal blog, titled “Ruby on Rails Photo Gallery & Shopping Cart with RESTful Authentication” In that article, I merely showed off what I’d done with Ruby on Rails, but I didn’t show anyone how. Well, I’ve gotten some comments from people asking me to show them how to build it.
That’s what this post is for.
So on to the nitty gritty details.
Start with the RESTful Authentication Tutorial:
Follow the README to install, but READ THIS FIRST to fix the ExceptionLogger error Then follow these instructions to fix the OpenID plugin error Make sure you get your recaptcha keys for the config.yml, otherwise failed login attempts will bust your application. Fill out the config & database.yml files accordingly, run your database create & migrate rakes, fire up the server and make sure it looks good. Cool? Let’s move on: Define the objects Let’s begin by pointing out what, exactly, we’ll be building this application around: Galleries of Photos that Customers can order with a private Account provided to them by an Admin who can manage the galleries and review the Orders, which are also available to their respective customers. I will go through how to set up the following models like so:
So let’s build the Galleries first:
Then edit the Gallery model:
That’ll be fine for now. Let’s add the Photos model with paperclip image attached:
Now edit the Photo model as such:
You should read all about the paperclip gem if you need more info on this model. Basically, we’re telling it to allow image attachments to the Photo model. Customers can be the RESTful Authentication Tutorial User model, just need to add a couple things here:
Let’s worry about Orders and Line Items later. We’ll have to add a cart, too. I’ll cover it, but it is all derived from Agile Web Development with Ruby on Rails Third Edition
Run your rake db:migrate and confirm all is well. Delete the Galleries layout file so it uses the application layout.
Let’s go see http://localhost:3000/galleries and play around. Add a gallery and then go to edit it. This is where we’ll add SWFUpload. Follow Jim Neath’s advice for this.
You’ll want a photos controller:
The create method I use is:
I had no luck getting Jim Neath’s session fix working, so I put skip_before_filter :verify_authenticity_token in the Photos Controller. Bad? Yea, probably. I haven’t found a better way yet.
Add this code to app/views/galleries/edit.html.erb:
Which leads you to add the following partial: app/views/photos/_image.html.erb
We’ll worry about the destroy link later, let’s integrate swfupload. Download the latest copy of SWFUpload. Copy flash/swfupload.swf to public/flash (make directory first). Copy swfupload.js & upload.js (in Jim Neath’s demo app) to public/javascripts. Copy Jim Neath’s swfupload.css file to public/stylesheets. Copy Jim Neath’s images/icons folder to public/images.
Add this code to app/views/galleries/edit.html.erb:
Yep, a lot is going on there. Reload your galleries/edit page and see if it’s still working
Ok, so this gets you to a functioning online photo gallery. Up next will be adding user accounts, a shopping cart, ordering options, customers & paypal integration. Stay tuned!
For now, please find the source here: http://github.com/joemsak/proofs_package
And for help on your project, visit us at http://www.simplifyadvance.com
Tonight I launched another web application for Michael Youngblood Photography which allows him to build online photo galleries that his customers can privately view and order online with qty, size and framing options. The customer must use paypal to complete the transaction (because I’m still a rails n00b, guys. no serious SSL stuff for me yet).
So I grabbed the RESTful Authentication Tutorial as my base framework for the application, so I automatically had user accounts, roles, logging in and session stores to work with right off the bat.
I’m very proud of this application from a knowledge/skill expanding aspect, a UI aspect, project complexity, and the fact that I was careful to write this in “The Rails Way” as strictly as possible. Remember guys I’m still a n00b but I’m coming along. Enjoy!
Demonstration of the User Interface process and application
What I had to add on to it was the ability for Michael to create galleries which belong to the user accounts he creates in the process.
So he begins by creating a customer:
Then he names the gallery:
Then he populates the gallery with photos:
This is what the customer sees when they log in (minus the edit gallery link, only admins see that)
*note, the “Add to Cart” gray bar is triggered by mouse hover.
They can add to cart:
After completing the checkout process in paypal, the user can see their order list, and Michael can access their order list directly off their private user page.
To see the full demonstration, check out my Jing! Screencast here:
View the 5 minute Screencast Demonstration
*note -> the photo uploads actually work much better and without wonkiness on the production server!
If you’d like to get your hands on the source, or would like to work with me, please contact me.
Lansingsports.org, one of my favorite projects as a web developer for Artemis Solutions, was given the award for Outstanding Web Site by the NASC. I don’t have proof because no one is blogging or writing about it, but @greaterlansing says so, and they’re the ones who got the award, so I’ll trust them. Especially since they seem to like working with me.
AOL Instant Messenger. Y’all are using it.
You randomly get an IM from <adjective>coho or trout or salmon. It’s nonsensical but you reply to it out of curiosity. Then you find out the person on the other end is some random AIM user. It’s annoying as all hell. Your block list is probably long, and it doesn’t even matter because it changes its name every time!
HOW DO YOU STOP THE DAMN AIM COHO BOTS?
Thanks to some info from Morouxshi, it’s actually really easy to stop the bots:
When that stupid thing IMs you respond to it with
$optout
It will ask you to respond with something like ‘$optout blah’ and once you do that it will stop sending you IMs.
Some known AIM bot names (to help with people searching this problem):