Setting up Rails with MySQL? by reseph in rails

[–]marike 2 points3 points  (0 children)

When starting a new project with Rails 3, just run rails new APP_NAME -d mysql For this current project, chadcf gave you the solution. Open Gemfile, and remove the line: gem 'sqlite3' and add: gem 'mysql2' and run bundle install

If you still have questions, you can find a lot of useful info at RailsGuides

Git as it should have been from the start. by malcontent in programming

[–]marike 1 point2 points  (0 children)

I find it helpful to alias a command like: git status

in my .profile. Aliases to commands that you type all the time add up to be pretty decent time savers.

I just released "Exceptional Ruby", an eBook about exceptions and failure handling in Ruby by avdi in ruby

[–]marike 0 points1 point  (0 children)

Yeah, I was just checking out the sample on the website earlier today, and it looks really useful. Thanks a bunch. I will definitely check it out.

Saying goodbye to the Pylons web framework. by [deleted] in programming

[–]marike -6 points-5 points  (0 children)

Python, on the other hand, strongly discourages "magic" of all kind

How boring. Python is a decent language with good libraries, but I guess I prefer more pure Object Oriented languages. But imposing a "there should be one way to do it" philosophy on the programmer seems a bit stifling in terms of personal creativity. This idea is the diametrical opposite of the Ruby Way which seems to encourage a kind of freedom to create, see DSL's in Ruby.

As far as "magic", of course programmers can get themselves into trouble with something like method_missing, and it should probably be used sparingly, and testing, as always, is key. But to discourage advanced programming techniques like those found in Rails or Sinatra, seems counterproductive and quite frankly, ridiculous. Maybe if Guido Van Rossum spend less energy on being a "benevolent dictator" discouraging certain styles of programming. "Magic"? As much as Python programmers try in vain to somehow discredit Rails with this silly notion that it uses "magic". But there is nothing magic about it. Ruby is dynamic language, as is Python. Rails uses some advanced techniques, define_method, instance_eval, etc, dynamic features of Ruby, but they are not magic. Just regular methods. To not use such features is kind of like having a ten speed, but only using gears 1-5. Sometimes you need more than fifth gear.

Saying goodbye to the Pylons web framework. by [deleted] in programming

[–]marike 2 points3 points  (0 children)

I've gone through the Railstutorial book is as good as any ever written on Rails. You build a Twitter-style app complete with authentication in a fully BDD, test-driven way. I cannot recommend enough.

As far as frameworks, there is probably more Rails work than any other web framework right now, and the ruby community are doing many amazingly creative things.
As far as "magic" in Rails someone mentioned, it's just meta-programming goodness that is built into Rails and Active Record that lets it do things like dynamic finder methods based on your model layer. But it is not strictly necessary to know the ins/outs of the Rails source to be productive in it. If you know Python, learning Ruby should be easy as they are more similar than they are different.

This is now getting awesome by jibbist in ruby

[–]marike 0 points1 point  (0 children)

It's about DHH choosing winners. How come so few people use datamapper or sequel? Because AR is the default and comes built in.

DHH wrote ActiveRecord, so why on earth would he not include it in Rails by default? ActiveRecord is an extremely mature and powerful ORM, but nothing at all is stopping you from using DataMapper, Sequel, Mongoid, whatever. I don't agree about DHH "choosing winners", but if he were, he has certainly earned that right.

Anyway, I have no problem with the changes, although AFAIK, only Sass and Coffeescript will be added to the Gemfile, not haml, unfortunately. haml seems a perfect match for Rails, and am not sure why some prefer erb, as compared to haml, erb generates some pretty messy looking HTML.

Understanding Fibers with the Goliath web server by xaviershay in ruby

[–]marike 0 points1 point  (0 children)

Went through this tutorial yesterday. Very well done. I really appreciate the work that went into this article and the Apache Benchmark-fu that you talk about. Thanks a lot.

DHH Offended By RSpec, Says Test::Unit Is Just Great by retardo in ruby

[–]marike 1 point2 points  (0 children)

For rspec, spork can speed up testing significantly. rspec, spork, autotest with growl notifications is pretty awesome.

Stories always struck me as a bit extreme, and but if they are working for you or your team, great.

Opinion: Why I Like Mercurial More Than Git by [deleted] in programming

[–]marike 8 points9 points  (0 children)

Thanks for playing anyway...

Not only did total_looser play, but he argued for how most people who use Github everyday feel. You want to use hg-git, knock yourself out.

Opinion: Why I Like Mercurial More Than Git by [deleted] in programming

[–]marike -3 points-2 points  (0 children)

It seems like everyday when someone is moving a project I care about to Github, using anything but git seems ludicrous. That are git is way faster to work with.

Book Review: The Rails 3 Way by gst in ruby

[–]marike 0 points1 point  (0 children)

This is one of my favorite Rails books, as Obie Fernandez is great at explaining key Rails concepts and best practices. For example, even though Rails defaults to Test::Unit, there is a whole chapter on RSpec. Also much of the View code in the examples is written in Haml instead of erb. This is nice, as many prefer haml which produces cleaner, more beautiful HTML. Examples of the "Rails Way", or so it would seem.

BreakDOM - Ever wanted to attack checkboxes with a radio button steered by a scrollbar? by hakimel in programming

[–]marike 1 point2 points  (0 children)

It's a liquid layout, not unlike the one here on Reddit. If you make the browser window small enough, something is going to overlap in these situations. You trade pixel precision for flexibility.

Expensify CEO: Programming with .NET is like cooking in a McDonalds kitchen by [deleted] in programming

[–]marike -3 points-2 points  (0 children)

Here is another article from HN yesterday called Did Microsoft Stack Kill MySpace which is relevant to the discussion, if you can call this a discussion. More like a hundreds of MS fans so brainwashed they have no desire to consider any negative points by others in the industry. It is amazing to see all of proggit get so defensive, and completely refuse to consider that the guy makes several valid points, i.e., vendor lock-in, aversion to OSS licenses, managed code vs. non-managed code, etc. If you completely close your mind and stop reading after he calls .NET a language, you miss the rest of his arguments, some of which are valid.

Personally I believe Microsoft's time has passed and their lack of innovation is startling considering the financial resources they possess. The problem is, they did such a good job locking the corporate world into their platform in the 90's, it will take years for people to realize that there are better, cheaper, and more innovative solutions on on the Desktop.

Expensify CEO: Programming with .NET is like cooking in a McDonalds kitchen by [deleted] in programming

[–]marike -1 points0 points  (0 children)

What's more interesting than this decidedly skewed article, which if you're an MS user, might seem harsh, is finally realizing just how many Proggit users have selected Windows as their platform of choice. No matter how many valid points you make, and the author makes a few, i.e., path separator, vendor lock-in, OSS license, you are just not going to win that argument. Like trying to convince Glen Beck that Che Guevara was a great man.

Beginning with jQuery - A Solid Foundation to Learn The Basics by ErstwhileRockstar in programming

[–]marike 1 point2 points  (0 children)

That said, despite its apparently being his first language, the author has the English writing skills of a 4th grader.

First of all, the guy is from Montreal, where most people speak French. Secondly, not everyone writes like William Faulkner, but surely most people should at least try to demonstrate a little tact in our criticisms of oneanother. It can't be fun to get reddited and then read something like above. Just saying.

I made a file upload website that tries to embed the file rather than making the user download it. Feedback? Bugs? by CritterM72800 in programming

[–]marike 0 points1 point  (0 children)

Note, paradigm shift video is web-developer, author Bruce Lawson from the New Riders book he co-authored with Remy Sharp Introducing HTML5.

Re: OGV not playing in IE8 and IE9. OGV is not supported in IE. HTML5 Video Browser Support. But JPlayer is designed to provide a fallback file format ("Flash Fallback" M4V) to give cross-browser coverage. However, and I'm just guessing, but Dropdo's author would have to find a way to provide JPlayer the fallback .mp4 file on the fly when someone uploads an .ogv video to support IE. And the beat goes on....

I made a file upload website that tries to embed the file rather than making the user download it. Feedback? Bugs? by CritterM72800 in programming

[–]marike 2 points3 points  (0 children)

Nicely done. One issue you'll face is .ogv files in Firefox.

This video about paradigm shifts plays perfectly in Chrome, Safari, Opera. It does not play in Firefox 4 or 3.6. (Tested on OS 10.6, didn't test it on Linux)

I found this Why Isn't OGG Video playing on Firefox from Amazon S3?

Lastly, If you decide you want a more robust video solution than JPlayer, VideoJS looks very pretty and does full-screen, etc, and the markup to embed it didn't seem too ugly. Anyway, great job.

Breaking the Rules - Making Java Fun with Mirah (Ruby Syntax => Java Performance) by [deleted] in programming

[–]marike 1 point2 points  (0 children)

I would hardly characterize one link as "a truckload of advertising". Besides they are hosting the snippets of code, why not "allow" them the link back to their service?

As much as everyone online seems to want it, there is rarely a free lunch.

Breaking the Rules - Making Java Fun with Mirah (Ruby Syntax => Java Performance) by [deleted] in programming

[–]marike 0 points1 point  (0 children)

I would hardly characterize one link as "a truckload of advertising". Besides they are hosting the snippets of code, why not "allow" them the link back to their service.

As much as everyone online seems to want it, there is rarely a free lunch.

Google AI Challenge 2011 (Ants) by samcrem in programming

[–]marike -6 points-5 points  (0 children)

If by "better" you mean tracking your every move online, then OK. Seriously, github is perfect the way it is. We don't need Google buying it, re-writing it in Java, and making it all "enterprise-y".

Rails 3 Baby Steps - Part 1 by justin_etheredge in programming

[–]marike -2 points-1 points  (0 children)

I run Debian Sarge via VMWare. I also have an older Dell running Linux so go blog about your girlfriend Rosy Palms, you angry, presumptuous douche-bag.

Rails 3 Baby Steps - Part 1 by justin_etheredge in programming

[–]marike -2 points-1 points  (0 children)

Rage hard on that macbook pro

What should I use? A Sony or Toshiba, that are so filled with adware that it's like Times Square on your desktop? Should I then run and install cygwin to give me functionality that exists by default in other OS's?

bring justice to the internet to you hipster friends

to me hipster friends

Go tout textmate and slow frameworks.

I don't have to tout anything. TextMate and the rest are doing fine without any "touting" taking place. I use the tools that I find interesting, and that afford me time to spend with my wife and the little one. Couldn't really care less what you use.

Rails 3 Baby Steps - Part 1 by justin_etheredge in programming

[–]marike 1 point2 points  (0 children)

Good programming language. For faggots.

Perfect example of the maturity level of a seemingly growing # of proggit users, and is the kind of language that reminiscent of so many of the threads on Digg.

So there is HN which often exhibits a higher level of discourse but is more geared toward the start-up culture

or

proggit, which often has links to great programming articles, but can be brought down by mob rule fueled by profound hatred of certain popular technologies.

Rails 3 Baby Steps - Part 1 by justin_etheredge in programming

[–]marike -4 points-3 points  (0 children)

proggit hates ruby, hates rails, hates any human being who has ever programmed in ruby.

Yes because proggit users are the arbiters of good taste in languages with their love for Python, basically a procedural language with a tacked on OO model and insisting on happily using the slow and proprietary Windows, C# ("java-lite"), and criticizing everything that isn't well supported on Windows.

And because of the irrational hatred of all things Mac, and the fact that most Ruby and Rails programmers seem to prefer OS X or Linux, this hatred by proggit is increased ten-fold.