FormHelper

Posted about 1 year back at Sneaky Abstractions

An unobtrusive "unobtrusive" answer to the very frequently asked question “how do I create a dropdown that fills out another dropdown”.

<select name="foo" class="updates:bar">
  <option value="1">1</option>
  <option value="2">2</option>
</select>
<select name="bar">
  <optgroup label="1" class="foo:1">
    <option value="1">1.1</option>
    <option value="2">1.2</option>
  </optgroup>
  <optgroup label="2" class="foo:2">
    <option value="3">2.1</option>
    <option value="4">2.2</option>
  </optgroup>
</select>

And it just works.

Download now for the low price of nothing and get one extra feature for no added cost! But wait, there’s more! Download within the next ten years and receive the practical Checker for free!

Open Letter to the people who present for Microsoft Regional Events

Posted about 1 year back at fallenrogue articles

Just because we’re not in NYC or LA or [Insert major city here] doesn’t mean that we’re retarded. I try to attend all of the talks that I can, no matter what the subject (so long as it’s on tech,platform, language, etc) is so that I can better understand the landscape that I’m developing in and stay above the curve with new patterns, practices and technologies. Since, for the last 7 years, I’ve made my living as a Microsoft developer, I continue to evolve my senior level .net tool set by attending events that are free or, at least, very cheap.

Now, this is going to sound petty. This is going to sound uneducated and like I’m being a hater or whatever you kids are calling it these days but it’s time for Microsoft to stop lowering the bar for developers. It’s time to stop going out on the road and saying you’ve got a presentation for software architects and then spend 2 hours describing features to your most expensive technologies. We’re architects. Price of admission should be: not an idiot or not person who doesn’t know what this thing the “internet” is. Look, I’ve had an assload of your f-ing terrible presentations and demos. Show me something, anything at all worth looking at and maybe I’ll be able to not hang my head in shame every time the term Microsoft comes up.

The last arcREADY event that I attended (two days ago.) was about bringing web 2.0 into the enterprise. Audience was suppost to be enterprise level software developers and architects. These people are, by their title, senior to expert level .net developers at their companies. We know what Web 2.0 is. We’re maybe interested in seeing how it’s philosophies are being implemented at other companies. I don’t, for the love of all that is holy, need to know where I can’t download the latest TERRIBLE VERSION OF ASP.NET AJAX!!!!!

Then, while going over nearly 20 minutes they proceeded to mention “Web 2.0 Poster Children” and you’ll never guess who has been a beacon of hope and miracles regarding the web 2.0 movement… yes Microsoft. Innovators in the web 2.0 space. Sure they were last on the list but the message was clear. We were not sharing knowledge or best practices, we were bearing witness to the marketing machine that was going to be sure that every idiot in the room left thinking that you need Microsoft’s wonderful leadership to satisfy your manager’s requests for that “web 2.0 thing”. Because they innovated in the space.

I’m being harsh for the wrong reasons. So, if you tuned out during my rant you can start reading again here. I’m more peeved at the lack of honesty on the presenters part than I am at Microsoft. MS is doing some innovative things in the web space. They are just bringing them to the table in a late fashion and in a very component based way.

There have been others who lamented the fact that MS is pushing their alpha geeks away. I’d agree. So, with that, I present my call to action.

It’s time to send your alpha geeks on the road. That’s right. Take some of the people that are kicking ass and taking names, doing it their own way and give them a 2 month vacation. Send them on the road not to evangelize your platform, but rather to show developers why they shouldn’t be paying attention to your competitors. Send someone from Redmond who has the stones to stand up in front of a room full of experts and say “don’t you dare EVER use the update panel in a production scenario. It’s Leaky abstraction. It’s a terrible anti-pattern that we created to lower the bar for the idiot on your team who used to answer the help desk phone who now thinks he’s a senior .net developer.”

Don’t ever come back into my neighborhood again and tell me that the entire world is in love with WS-* (death-star) and we should be so happy that we’ve got a tool that generates proxies for it. Don’t tell me it’s difficult to impossible to do it in Ruby when I’ve done it a million times before using Soap4r with GREAT success. Don’t then try and SELL me on your new RESTful toolkit after telling me that I shouldn’t be interested in that because the WS-* standard is better in every way. Don’t tell me IronRuby is a Rails port on .net when you know it’s not. Don’t, glibly, say that Rails doesn’t scale and Django is not elegant and php has a difficult learning curve and have no real world argument or facts to back that up. Sure, the boys at Twitter had a time of it at the beginning but they solved their scaling problems with Ruby. They scaled quickly because of the 11,000 requests per second they were serving at the time. I’m sure if I had a simple 2 server deployment (front end and SQL server) of some .NET app that I didn’t painstaking take the time to put as much caching as humanly possible in the beginning and suddenly had 11,000 requests per second my site would be slow too.

Look, do your thing, Microsoft. I think you do some things right and I think you do some things wrong. I’m also not afraid to tell you. but you’ve got to do better by your seniors and experts. And by better, I don’t mean make the f-tards and asshats who blog the same stupid “hints” that you present in your sessions. If you come to town and you ask the experts to come out from behind their monitors to hear what you’ve got to say, then HAVE SOMETHING TO SAY. Don’t just stand up there and condescend your stupid message to me.

Sorry for the rant. I’m just fed up. Took the time to gain expertise on the platform because that’s what people around me wanted. Now, I’m wondering why I’m not just dropping it all, being called a noob all over again and interning for any Ruby shop that will have me. At least I wouldn’t have to defend my choices any longer.

Ruby: Trivial Debugger Implementation

Posted about 1 year back at Jay Fields Thoughts

A common question you receive as a Ruby developer is: Don't you miss robust debugging support? The short answer is No, but that's not entirely true. The reality is that Ruby developers are generally willing to make trade-offs in order to work with a language that they find more pleasing.

Do I wish I had a great IDE with fantastic debugging support? Of course I do, and I'd also like refactoring support while we are daydreaming. Until that day comes, I'll continue to look for other ways to be effective.

To mitigate the debugging issue the Ruby developers I work with end up relying very heavily on their tests; therefore, debugging becomes less of an issue. Unfortunately, even the best testers can't always isolate complicated issues. In these circumstances the best Ruby developers are often forced to use the age old debugging strategy of printing values. I was recently in one of these situations and I used the following statement in lieu of the typical p statement.

loop do
p eval(gets)
end

I do miss mature tools and infrastructure. However, the ease in which I can create adequate solutions in Ruby makes it hard to consider doing anything else, currently.

And the envelope please

Posted about 1 year back at Rails Rumble - Home

The moment you’ve all been waiting for is here. Time to announce the winners of Rails Rumble 2007.

Grand Prize - TastyPlanner Screencast
1st Runner up - Checkbook
2nd Runner up - Admiteer

Categories
Appearance - Elf List
Most Useful - Conduit
Most Complete - Invent-A-Story
Innovation - SoundBadge
Best Solo Project - Irksome

Honorable Mentions
Pagestackr
Shoelockr
Linga
RubyBrigade
PubBud
Redux
PretendPeople
Gradeseed

Thanks to all that participated and many thanks to Linode for hosting the servers and our many other sponsors for helping make Rails Rumble 2007 a success.

And The Envelope Please...

Posted about 1 year back at Rails Rumble - Home

The moment you’ve all been waiting for is here. Time to announce the winners of Rails Rumble 2007.

Grand Prize - TastyPlanner (Screencast Here)
1st Runner up - Checkbook
2nd Runner up - Admiteer (Screencast Here)

Categories
Appearance - Elf List
Most Useful - Conduit
Most Complete - Invent-A-Story
Innovation - SoundBadge (Screencast Here)
Best Solo Project - Irksome

Honorable Mentions (Aside from our winners, we feel that there are a few other apps that deserve attention)
Pagestackr (Screencast Here)
Shoelockr (Screencast Here)
Linga (Screencast Here)
RubyBrigade
PubBud
Redux
PretendPeople
Gradeseed (Screencast Here)
Merlin

Thanks to all that participated and many thanks to Linode for hosting the servers and our many other sponsors for helping make Rails Rumble 2007 a success.

Orkut

Posted about 1 year back at Robert Evans - Home

Orkut is an online social networking site backed by Google. It seems harmless enough, except that a handful of users, on the site, have been taking pictures of children (some 5 years old and younger) from flickr and posting them on Orkut, pretending to be these children.

Furthermore, these users add messages to their profiles (or rather the 5 year old they are pretending to be) such as: “I am 5 years old. I am single. Want to be my friend? I am so lonely. Come visit me and see all my pictures.”

Orkut has been contacted, but they have refused to take action against their members who are posting these pedophile-type profiles. Orkut’s only comment is, “Tell the user of the profile to remove the pictures”, and when these users are approached about what they are doing, such comments as “calm down..this is a game for us” or “your child deserves an ugly mother” are their response.

Please visit here: http://www.petitiononline.com/jmelhado/petition.html and sign this petition to get Orkut to take action and not allow them to post images of children (who aren’t their own) in such ways. Next time, it could be your son, daughter, brother, sister, niece or nephew that is displayed on this site, looking for a “good time”.

Orkut

Posted about 1 year back at Robert Evans - Home

Orkut is an online social networking site backed by Google. It seems harmless enough, except that a handful of users, on the site, have been taking pictures of children (some 5 years old and younger) from flickr and posting them on Orkut, pretending to be these children.

Furthermore, these users add messages to their profiles (or rather the 5 year old they are pretending to be) such as: “I am 5 years old. I am single. Want to be my friend? I am so lonely. Come visit me and see all my pictures.”

Orkut has been contacted, but they have refused to take action against their members who are posting these pedophile-type profiles. Orkut’s only comment is, “Tell the user of the profile to remove the pictures”, and when these users are approached about what they are doing, such comments as “calm down..this is a game for us” or “your child deserves an ugly mother” are their response.

Please visit here: http://www.petitiononline.com/jmelhado/petition.html and sign this petition to get Orkut to take action and not allow them to post images of children (who aren’t their own) in such ways. Next time, it could be your son, daughter, brother, sister, niece or nephew that is displayed on this site, looking for a “good time”.

Orkut

Posted about 1 year back at Robert Evans - Home

Orkut is an online social networking site backed by Google. It seems harmless enough, except that a handful of users, on the site, have been taking pictures of children (some 5 years old and younger) from flickr and posting them on Orkut, pretending to be these children.

Furthermore, these users add messages to their profiles (or rather the 5 year old they are pretending to be) such as: “I am 5 years old. I am single. Want to be my friend? I am so lonely. Come visit me and see all my pictures.�

Orkut has been contacted, but they have refused to take action against their members who are posting these pedophile-type profiles. Orkut’s only comment is, “Tell the user of the profile to remove the pictures�, and when these users are approached about what they are doing, such comments as “calm down..this is a game for us� or “your child deserves an ugly mother� are their response.

Please visit here: http://www.petitiononline.com/jmelhado/petition.html and sign this petition to get Orkut to take action and not allow them to post images of children (who aren’t their own) in such ways. Next time, it could be your son, daughter, brother, sister, niece or nephew that is displayed on this site, looking for a “good time�.

hiker dot rb

Posted about 1 year back at technomancy.us

I mentioned before that I have some code for mapping geotagged photos on Google Maps. I've gotten a chance to wrap that up and polish it for release. Thanks to a tip from an anonymous commenter my code now creates detail bubbles that include the photo rather than just a link to it. You can see a couple examples of it.

Unfortunately the process of going from a set of photos and a GPS tracks file to a KML photo file is somewhat involved. First there's the fact that no mainstream GPS manufacturer uses a sane format. You need a program called gpsbabel to do the conversion into the GPX format. Say you've got a saved GPS tracks from your hike called myhike.log and your photos from the hike in a directory called hike_photos.

$ gpsbabel -i magellan -o gpx myhike.log myhike.gpx

Once you've got the GPX file, you can use gpscorrelate to write the coordinate metadata onto the photo files. This program uses the GPX file to figure out where you were at a given time and then for each photo makes a best guess of where you were at the time when it was taken.

$ gpscorrelate -g myhike.gpx hike_photos/*

The one caveat at this point is that often your GPS device and your camera will be set to different time zones. If this is the case, simply add a --timeadd +8 to add 8 hours or adjust accordingly.

At this point you'll have to upload the photos to Flickr. Note that if you've already got the photos in Flickr but they don't have the coordinate metadata you'll have to re-upload them. Be sure they are tagged with something unique; you'll use Flickr tags to tell hiker.rb which to process. The last bit of setup you need is to sign up for a Flickr API key. Place the key in a file in ~/.flickr_key.

Now you're ready to run the script.

$ ruby hiker.rb myhiketag myusername > myhike.kml

So now you've got your shiny new hike KML file. Publish it to the web and you'll be able to view it in Google Maps by appending its URL to the Google Maps URL: http://maps.google.com/?q=http://example.com/myhike.kml

That's all! Future revisions may automate the tiresome work of running gpsbabel and gpscorrelate, but this is how it works for now. Let me know if you run the script and have any feedback; please leave a comment.

The software silver bullet

Posted about 1 year back at BenCurtis.com

Since I’m building a very focused piece of HR software that hiring managers and recruiters can use to manage sourcing of resumes and other recruiting activities, I’ve been watching the various vendors like LongJump and Coghead, who promise a software silver bullet: delivering software without the expense of developing it. I’m not convinced they are going to deliver on that promise.

In some respects, I’m sure the applications they will help their clients build will be fine—they’ll do one thing (perhaps even doing it well), and cost very little to build, and everybody will be happy. In other ways, though, I think those applications will fall short, simply because the thought, the planning, and the refinement that go into a software application built by designers, developers, and domain experts working together with their respective skill sets just won’t be there.

As I’ve been working on Catch the Best, I’ve been reminded how an idea for an application can start out very small, but the deeper you dig into it, the more complicated it gets. Of course, this is one reason why trying to preserve simplicity in software is so hard. But on the flip side, your application can’t be so simple it isn’t useful. This can be a fine line to walk in order to deliver excellent software, and just handing someone some building blocks and saying “go build it yourself” will have mixed results.

In other words, sometimes the just-add-water brownie mix gets the job done. If you want the best brownies, though, it needs a little more effort than that. :)

CSRF protection for your existing rails application

Posted about 1 year back at has_many :bugs, :through => :rails - Home

If you google for csrf attacks, you’ll find plenty of articles. But just for fun, here’s a simplest example : http://rubyurl.com/Liu Copy/Paste the link in a new window ( Don’t do it if you hate me/twitter )

Thanks to Rick, rails now has in built protection against such attacks, which is turned on by default for all new rails applications.

Here are some steps to make use of it for your existing rails application :

  • Add protect_from_forgery in your application.rb
1
2
3
4
class ApplicationController < ActionController::Base
  protect_from_forgery # Add :secret => 'some cryptic string' if not using cookie sessions
  # All your existing stuff
end
  • Turn off csrf protection in your test environment, unless you have time/energy/reasons to add csrf token to all your functional/integration tests that use post/put/delete methods.

To do so, add following in your test.rb environment file

1
2
# All your existing stuff
config.action_controller.allow_forgery_protection  = false
  • If you have cached any pages containing forms/buttons/links using post/put/delete method, make sure you clear your cache.

That’s all folks!

Simple steps to make your existing rails app secure against csrf

Posted about 1 year back at has_many :bugs, :through => :rails - Home

If you google for csrf attacks , you’ll find plenty of articles. But just for fun, here’s a simplest example : http://rubyurl.com/Liu Copy/Paste the link in a new window ( Don’t do it if you hate me/twitter )

Thanks to Rick, Rails now has in built protection against such attacks, which is turned on by default for all new rails applications. Here are simple steps to use it for your existing rails app :

  • Add protect_from_forgery in your application.rb
1
2
3
4
class ApplicationController < ActionController::Base
  protect_from_forgery
  # All your existing stuff
end
  • Turn off csrf protection in your test environment, unless you have time/energy/reasons to add csrf token to all your functional/integration tests using post/put/delete method.

To do so, add following in your test.rb environment file

1
2
# All your existing stuff
config.action_controller.allow_forgery_protection  = false
  • If you have cached any pages containing forms/buttons/links using post/put/delete method, make sure you clear your cache.

And done.

CSRF protection for your existing rails application

Posted about 1 year back at has_many :bugs, :through => :rails - Home

If you google for csrf attacks, you’ll find plenty of articles. But just for fun, here’s a simplest example : http://rubyurl.com/Liu Copy/Paste the link in a new window ( Don’t do it if you hate me/twitter )

Thanks to Rick, rails now has in built protection against such attacks, which is turned on by default for all new rails applications.

Here are some steps to make use of it for your existing rails application :

  • Add protect_from_forgery in your application.rb
1
2
3
4
class ApplicationController < ActionController::Base
  protect_from_forgery # Add :secret => 'some cryptic string' if not using cookie sessions
  # All your existing stuff
end
  • Turn off csrf protection in your test environment, unless you have time/energy/reasons to add csrf token to all your functional/integration tests that use post/put/delete methods.

To do so, add following in your test.rb environment file

1
2
# All your existing stuff
config.action_controller.allow_forgery_protection  = false
  • If you have cached any pages containing forms/buttons/links using post/put/delete method, make sure you clear your cache.

That’s all folks!

CSRF protection for your existing rails application

Posted about 1 year back at has_many :bugs, :through => :rails - Home

If you google for csrf attacks, you’ll find plenty of articles. But just for fun, here’s a simplest example : http://rubyurl.com/Liu Copy/Paste the link in a new window ( Don’t do it if you hate me/twitter )

Thanks to Rick, rails now has in built protection against such attacks, which is turned on by default for all new rails applications.

Here are some steps to make use of it for your existing rails application :

  • Add protect_from_forgery in your application.rb
1
2
3
4
class ApplicationController < ActionController::Base
  protect_from_forgery # Add :secret => 'some cryptic string' if not using cookie sessions
  # All your existing stuff
end
  • Turn off csrf protection in your test environment, unless you have time/energy/reasons to add csrf token to all your functional/integration tests that use post/put/delete methods.

To do so, add following in your test.rb environment file

1
2
# All your existing stuff
config.action_controller.allow_forgery_protection  = false
  • If you have cached any pages containing forms/buttons/links using post/put/delete method, make sure you clear your cache.

That’s all folks!

First, Fully Functional Ruby 1.8 Compiler Now Complete

Posted about 1 year back at Ruby Inside

Charles Nutter says:

It is a glorious day in JRuby-land, for the compiler is now complete.

But not only is it a glorious day in JRuby-land, but in Ruby-land proper as Charles has announced that the JRuby-based Ruby 1.8 compiler is now "complete!" Excellent work guys. This is still early days, but with the leaps being made by both the JRuby, Rubinius, and Ruby 1.9 teams as of late, the state of Ruby interpretation and compilation is set to radically evolve over the next year. No longer shall our runtimes be mocked by the Pythonistas!


1 ... 514 515 516 517 518 ... 634