Thinking about Rails? Think Again 482
wolfeon writes "In 2005, Derek Sivers of CD Baby wanted to scrap his site and perform a rewrite in Rails. He hired Jeremy Kemper, also known as bitsweat on Freenode, to help on the project. Two years later, through blood and sweat, the project was then canceled because of limitations of Rails. Rails just wasn't meant to do everything since it is very much "canned" project. Mr. Sivers has written an entry in the O'Reilly blog: 7 reasons I switched back to PHP."
Why rewrite existing systems? (Score:2, Insightful)
One of my main customers hired a good team in Vietnam who used PHP, CSS, HTML, and Javascript. I introduced them to Rails a year ago, and they were just about instantly productive.
Deploying Rails can be a small hassle, but there are now lots of good options, including running on JRuby/Goldspike/Java app server.
Re:Why rewrite existing systems? (Score:5, Interesting)
Sometimes it's best to leave old software systems alone.
http://pinderkent.blogsavy.com/archives/88 [blogsavy.com]
Last night at the pub, a friend and colleague of mine was telling me of a recent experience he had at a company he was doing some IT work for. I think the lesson learned is a very important one, and thus I wish to share it. But first I'll describe the situation he encountered.
In the mid-1990s, the company in question built their IT operations around systems from Sun. They wrote much of their in-house code using C++, and used Oracle for their database needs. On the front-end, they used PCs running a mix of Windows NT 3.51, FreeBSD 2.x, and even OS/2, depending on the department. While that is not a unique setup by any means, what is somewhat unique is that they essentially continued to use those same systems up until 2006.
One of the main reasons why they didn't switch is because their software systems worked just fine, even if the UIs were somewhat archaic. Their software was mature and well-understood by the company's employees. They even got extremely lucky in the first place, as the developers who initially designed and implemented their software systems did so in a way that allowed for the systems to easily scale as the need arose over time.
The hardware proved to be the main instigator of change. After a decade, many of the front-end PCs they were using started to exhibit a variety of physical problems. Some had been replaced earlier, but eventually it was decided to replace them all with newer systems. However, to the best of my friend's knowledge, the back-end Sun systems were working just fine.
However, at the same time they decided to also replace the back-end systems. A variety of consultants were apparently called in to appraise the situation. For whatever reason, it was eventually decided that the new back-end systems would be built around Windows Server 2003 and SQL Server 2005. The new back-end software was to be built upon
By the end of 2006, the consultants and developers deemed the new system ready to go. Over the course of the December 2006 holidays, the new systems were rolled out. It turned out to be a pretty major disaster. The first problem they ran into was a complete lack of performance. As they moved into the first weeks of 2007, their back-end systems just wouldn't scale. As an emergency fix, they ended up throwing more hardware at the problem, which did ease the burden on the existing servers somewhat. But it was in no means a permanent solution.
The front-end software systems proved to be an even bigger disaster. Many of the AJAX-based applications used Internet Explorer-specific functionality. But the IT managers of some of the front-end networks would not allow IE to be used, for security reasons. They only allowed for Firefox to be used. So the Web-based front-end software needed significant modifications right away, as well.
What was perhaps the worst failure involved the in-house users and their productivity. Large portions of the old system were built around a curses-based UI. Although it apparently wasn't very pretty, it did allow for a great deal of user productivity. One of the main complaints about the new Web-based software was that the keyboard support was quite poor, requiring the user to select input fields using the mouse, and at times even having to scroll the page to input or manipulate certain data. With the earlier system, the nagivation could rapidly be performed using just the keyboard. Some of the more experienced users were apparently so efficient with the older system that their productivity was reduced to 25% of what it was before the switch.
My friend and his colleagues were called in to try to
Re:Why rewrite existing systems? (Score:5, Insightful)
Certainly, Web UI's are not appropriate for everything. They should really only be used if there is some overpowering need (like the ability to access the data from anywhere without having client apps installed). They also apparently gave zero thought to existing processes and staff skillsets.
Avoiding AJAX or any other technology because you tried to use it for something it wasn't good at is patently stupid. There are good uses for the technologies. This just wasn't one of them.
Re: (Score:3, Insightful)
Once a company gets committed to a design decision made by an trendy-entranced developer, the sysadmins and users can get punished with years of suffering afterwards.
The tools stop being updated, and none of the *good* developers want to care for the ugly, unique application once the shine comes off the tools. It's like being forced to wear a magic top hat made out of steel - because top hats and
Re:Why rewrite existing systems? (Score:5, Insightful)
My advice is to analyze the needs of the system before designing it. Don't assume a GUI or AJAX front end is the best possible way to do things. My favorite example is the library system in my county: their computers are using a console system for check in/check out, card processing, etc. The beauty of it is that the bar code scanner they use behaves like a keyboard, so that each scan is just a series of a numeric keystrokes following by an end-of-line. It is simple, the 80 year old librarians have no problem using it, and it doesn't require any difficult to coordinate mouse movements (as anyone who has studied this knows, using the mouse requires a lot of brain activity than using the keyboard). The console very accurately maps the workflow; a GUI wouldn't add very much, other than sheer lines of code, and a web interface would actually slow down the people who need to use it.
Sure, there are cases where a GUI or web interface is better than a console interface. But that is why an analysis is needed before any code is written. As your friend's situation demonstrates, a well design system can work for many years without any trouble.
Re:Why rewrite existing systems? (Score:4, Insightful)
Re:Why rewrite existing systems? (Score:4, Insightful)
The only failed experiment is the one you don't try.
Clearly, someone thought there would be a benefit to using Rails over PHP in this case. If they were wrong, they gained valuable insight into a) the abilities of their tools and b) the nature of their project.
I never liked the old saying "if it's not broke, don't fix it". The quest for innovation is a beautiful thing.
Re:Why rewrite existing systems? (Score:4, Insightful)
Re:Why rewrite existing systems? (Score:4, Insightful)
They have should have gone postgresql as per my recommendation. Oh well.
With MySQL at first sight you seem to have all these features and behaviours/performance. But when you get down to the technical details you find that many of the "great" features, behaviours and performance are mutually exclusive. Want transactions - go innodb. Want fast inserts, go myisam. Want better concurrent write performance go innodb (or deal with buggy myisam insert delayed vs concurrent_insert vs etc stuff). Want fast selects - go myisam. Want foreign keys to work - innodb. Don't want to lock yourself to MySQL tech that's owned by Oracle (who may not have the best interests of MySQL in mind...) go myisam.
Or just use postgresql. The devs tend to do things right (except when the SQL specs are stupid, in which case they usually follow the stupid spec and do things "wrong").
Re: (Score:3, Interesting)
But, if the company grows and its database can't do it gracefully then there will be big problems. MySQL is like PHP, it will look ok when you're testing some small stuff, but when you really want to do things properly it gets really difficult (it might still be possible but its difficult and to use the technical term for it - very yucky/icky).
For example: Say it's X years later, and after a few "problems" the company (now bigger) decides it does need to
Project failed due to Project Management and ..... (Score:4, Insightful)
I'm glad I don't work there.
Re:Why rewrite existing systems? (Score:5, Insightful)
"In the mid-1990s, the company in question built their IT operations [...] They wrote much of their in-house code"
I read here: in the mid 90s the company built a tailor-made IT system engineered by their internal knowledgeable technical staff.
"what is somewhat unique is that they essentially continued to use those same systems up until 200what is somewhat unique is that they essentially continued to use those same systems up until 2006."
We know their staff was knowledgeable and that the system fitted well their needs from the simple fact that it managed to work about 15 years without major complains.
"One of the main reasons why they didn't switch is because their software systems worked just fine"
Exactly what I was saying.
"They even got extremely lucky in the first place, as the developers who initially designed and implemented their software systems did so in a way that allowed for the systems to easily scale"
Do you think that's "luckyness"? That properly scalable systems grow up "per chance"? No: it was properly designed, that's why the system scaled, not because "luck".
An now, for the problems:
"A variety of consultants were apparently called in"
I read here: A variety of *external* resources that surely couldn't know the bussiness better than their old internal counterparts (things cannot be done much better than "OK", and that was the standard to beat), and that surely held their own agendas (like pushing the technologies they are knowledgeable about, instead the ones that best fitted, if only because the old "for a man with only a hammer every problem seems a nail", if not worse, "Certified Microsoft Gold Partner That Gains Money Every Time Microsoft Technologies Are Pushed Into A Client") were in place to design the new system.
And this is the very and only problem: By the 90's they had knowdledgeable internal staff. By 2006 they went to external unfitted consultors. I bet there's an untold story here that includes those "so expensive" Solaris sysadmins and C++ developers that were fired by a "smart" manager looking for profit. All the particular problems you outlined are not problems but consecuencies of this. Of course the new web-based GUI could be Firefox-tested -if knowledgeable people were in charge. Of course the new web-based GUI could make use of proper keyboard-based navigation -if knowledgeable people were in charge. Of course that the proper ammount of iron could have been pushed on the backed (specially after 15-more years of stats and usage-patterns) -if knowledgeable people were in charge.
No one of them are strictily speaking problems with AJAX, or Windows, or dot-net, or whatever the technology (while going from a perfectly working C++/Unix environment to an all-and-only-Microsoft is a very hard hint about management going nuts). All of them can be pointed out to a very common tendency on IT: fire the old knowledgeable technicians that put the means for the company to grow and stay there in first place and contract cheap minions and expensive external consultants as substitutes; then look as a very smart manager that saves the company some pennies; then the obvious "???" and finally the "wreak havoc" instead of "profit".
Re: (Score:3, Insightful)
* Use mature, well-tested, effective software (eg. Solaris, Oracle, FreeBSD).
Absolutely, and this should be a given but it isn't always.
* Avoid immature fad "technologies" like AJAX.
There are plenty of people here who would defend AJAX and blame the developers for a poor implementation, but really the point to be made is that if you are goin
Re:Why rewrite existing systems? (Score:5, Funny)
Re:Why rewrite existing systems? (Score:4, Informative)
Ruby is nice, Rails has some severe limitations on what it can do without major hacks.
Examples:
Business Model versus Business RulesThere is a distinction between the Rules and the Model. Rules are those things that must be enforced against the data. Examples of this would be (in database terms) referential integrity, unique values for certain fields or combination of fields.
Without this distinction you can easily run into rampant data duplication and your ability to determine what is actually going on becomes a major challenge. Rails fails on this enforcement of the rule because when you identify something as being unique according to Rails, it's managed by a Model declaration to check for uniqueness before making an UPDATE/INSERT SQL execution. Problem with this is you are assuming that you have only one active rails session at a time. If you don't, then it's trivial for two web sessions to insert the same username in the table, thereby fucking your database and your business. Without the database actually enforcing the data through database constraints, you cannot guarantee the results.
Things get even more difficult/tricky when you have to ensure that combinations of fields remain unique or referential constraints are preserved.
I'm know there is some way to do all of this in Rails, but it's counter productive and essentially a hack. For example -- I would have to create additional unique SQL constraints in the database migration files, in some cases, I have to write out the SQL directly -- bypassing that which is Rails. Then the Model would not only have to run the extraneous SQL statement to check for uniqueness, but also be modified to accomodate the error handling that is going to happen when you violate the database integrity. Again, this makes for a lot of non-Rails and non-elegant code.
Don't get me wrong, Rails is nice but it is not really going to be a useful product for some major site that is going to just get crushed in transactions. Do you really think you can open the next MySpace and have it keep all the data properly synchronized? I know it's possible to get around the application rules of the Model, so I know it's also likely to muck up your data.
Re: (Score:3, Informative)
I agree completely.
More generally, ActiveRecord does not address any interdependence of the tuples or relations at all (except for a few very common cases where they have no alternative).
ActiveRecord is essentially a persistence engine at its core, with it's own OODBMS-like API on top (that is not closed over any useful set of operations). It blindly assumes that objects are indepen
What a false dichotomy! (Score:5, Insightful)
If you want multi-key uniqueness constraints, just define it in your database already! Why do you think Rails prevents you from configuring your database layer?
When I need to do transactions, I use Rails' full support for transactions [rubyonrails.com]. There, that wasn't so difficult, was it?
I let Rails save me hours of backbreaking labour writing conventional SQL queries. Then I use the completed application, identify the query bottlenecks (thanks to Rails' built-in profiling) and re-write the slowest of the dumb auto-created SQL using hand-written SQL, which I can get to using find_by_sql [rubyonrails.org], finder_sql [rubyonrails.com], etc. Rails lets you put your own SQL into the application almost anywhere.
Re: (Score:3, Insightful)
You are obviously very familiar not only with Rails, but databases. Many Rails users are not and there's not much attention paid to the database as a business model enforcement in the Rails "way" of doing things. Specifically, the Ruby on Rails book is way too lean on this subject.
My first and only Rails convention was a real learning experience. I was outnumbered by easily 20:1 in an argument that counter your statements. The generally accepted concept in that room was that Rails manages everything fo
Re: (Score:3, Insightful)
I think the reason it doesn't right now because it was designed to work with MySQL MyISAM tables, which are
Huh? (Score:4, Insightful)
Perhaps I'm missing something in your post, because it sounds to me like you're advocating every application that accesses the database to enforce data integrity rules. This is a recipe for data corruption, as I'm sure you already know.
Re:Why rewrite existing systems? (Score:5, Insightful)
Even worse, there's absolutely nothing there about why Rails didn't work. Exactly what was it that was so hard to do in Rails that was easy to do in PHP? The article provides nothing useful to anyone looking to build a web site. How do I know if PHP is superior to Rails for my particular application? There's little there to help. This is nothing but a senseless rant.
Re: (Score:3, Insightful)
There were some rumblings about the incredible performance of the new PHP system, but no mention of how the Rails version was performing by comparison (it sounds like it never went live).
The "integration" point seemed to be claiming that the only way for the transition to work was for Every Single Line of PHP to be removed from the system simultaneously, but it should be possible for different portions of the site to run in different languages.
The "don't want what I don't need" point
Re:Why rewrite existing systems? (Score:4, Insightful)
A PHP tag on a webserver doesn't mean that the site is powered by PHP. It means that whoever compiled apache loaded a PHP module for possible use in one of the virtual hosts. That Apache also has FastCGI installed, which is routinely used for serving rails applications.
I know for a fact that several high-traffic websites use RoR extensively, but none of them are tech sites, so they don't go around advertising what is on the back-end.
I shouldn't have taken time to respond to your obvious troll, but I felt forced to because some gullible moderators gave you points for spewing lies and idiocy. Typical slashdot fare, I know, but give it a break.
To me that's poor planning (Score:4, Interesting)
I've been involved in the decision making process to choose a technology for writing a site many times. Working for a University common questions we use in comparison to the technology is
1) Development time
2) Ability to integrate with LDAP or other existing technologies
3) Support (server level)
4) Documenation (For development)
5) Budget
6) Number of developers on the project
Depending on those variables it usually winds up being either PHP or Cold Fusion. Ruby on Rails has never once been a consideration. Not because it isn't a good solution, but it's never once been the best for our needs.
7) How far will it scale (Score:5, Insightful)
Re: (Score:3, Informative)
After 30 years development, "How far will it scale" is
* the question that scares me most,
* the one that you can never get honest information about from OS or component suppliers,
* and the one that's hardest to test because the most-used features are rarely those you expected.
After my 10 years of development, "How far will it scale" is
Seriously - if you want to scale, you need to avoid the Shlemiel the painter's algorithm. [joelonsoftware.com] Avoid this sucker with passion and verve. Hunt for ANY CASE where this algorithm is hard at work, sucking away CPU cycles endlessly towards the abyss of swapped memory, session timeouts, and database deadlock
thinking about something new? think again (Score:3, Insightful)
After twenty five years watching technology try to not suck, one note rings true from The Fine Article. The new girlfriend always seems better... at first. But over time you'll likely discover she too (as one might expect) has foibles, idiosyncrasies that annoy and sometimes downright frustrate.
If you've found a solution to a problem, consider carefully wrapping some other technology around it just because. Unfortunately my experience was that usually new technology/approaches typically were just because, usually driven by management (not always, and I'm not blaming them).
Had I known then what I know now I'd have fought harder for status quo on a lot of big projects.
Re: (Score:3, Insightful)
Then again, if this article is any indication, maybe I had better wait another year before I speak.
Re: (Score:2, Interesting)
Yes, some of us are very happy over the long term using Linux. Am I a system administrator? Yes. Do I program? Yes. Am I the average Joe Computer User? No. Does my wife get a free sysadmin with the ability to re
Re: (Score:3, Insightful)
Funny, 10 years ago I ditched Windows (and OS/2) for Linux at home. I stopped dual-booting and everything -- no more Windows, period. I didn't have to use it at work because I was a college student and while I didn't ha
Re: (Score:3, Informative)
He's just pissing in the GP poster's cornflakes; he isn't for real and should be modded appropriately. His only technical qualifications seem to be messing with his own blog, which he describes as "working on the website."
Don't take my word f
Re: (Score:3, Interesting)
Client: "We'd like our site/new site to be Web 2.0 with AJAX and Rails and....
Web Designer: "This is the layout I've created with new logo, etc."
Client: "Ohhh, that's pretty, but I don't like that shade of >, could you make it >, maybe a couple shades darker, but brighter...you
Re:thinking about something new? think again (Score:4, Insightful)
So, we have a slow language, with ugly syntax. The ugly syntax is subjective, so we'll overlook it for now. We have a slow Smalltalk, but maybe the framework makes up for it. Looking at Ruby on Rails, it seems like a cheap clone of the old NeXT WebObjects (cloned as GNUstepWeb and SOPE, uses Objective-C, which is typically faster than Smalltalk), and so far behind something like Seaside [seaside.st] it's not even funny.
So, why do people use Ruby? Or is it like Java, as Guy Steele said:
Re:thinking about something new? think again (Score:5, Interesting)
Try Ruby, code up a project in it after you actually understand the language, and you'll see the draw. For instance, just an hour ago I was writing a quick script to recurse through directories and apply ReplayGain. I had a loop like this:
Later on, just on a whim, I decided I wanted it to sort the dir listing so I could judge how far it was through the process. I only had to change the first line:
A teensy tiny sript to be fair, but that's just an example that I was able to pull out of the last couple hours, I've done much larger things but it'd be hard to think of a good example. There's nine different ways to do everything, and they all work exactly like you'd expect. There's a million things that allow beautiful constructs, like lambda functions and yield statements, implict reference but easy to do deep copies, it goes on and on. The langugage is just an absolute joy to work with, and I'm saying this as a hard-line strict ANSI C++ programmer--so much so that I still find it hard to make myself use long long.
The problem is, it's so easy that it attracts people who hardly understand programming. It also makes you want to try out weird new ideas. I've never looked very hard into it, but from everything I've heard about Rails and its almost code-generation level programming I get the impression that it's a great idea that got over-engineered to Frankenstein proportions, like the first home project of any size a fledgling programmer makes. Not saying these guys are that ... just that's what it reminds me of.
One good measure I try to follow is, if you have to basically learn an entire new language to use your product, be it a framework or a word processor, unless you've purposefully designed it as a language, with all the deep thought that goes into that, you're probably doing something wrong. Really, the yardstick I try to go by is, you should only have to learn one thing to progress further, never two things at once, and it should always be apparent what directions are available. I looked over the Rails documentation and example source, and it doesn't meet that criteria.
Ruby Isn't Rails. Check out the language, it's a thing of beauty, and it allows you to do things really quickly, really easily, and most importantly, the Right Way without a lot of extra effort (an area C++ fails miserably at, unfortunately). No, it's not the fastest language by a long shot, but haven't we always said that premature optimization is the root of all evil? They can (and in all likelihood will) fix that later. Plus, given how easy it is to add inline C, which can easily interact in both directions, make calls, construct objects, etc... well, when I discovered that it was like I was banging a smoking hot woman, who to be fair is a little slow, and I found the keys to a Porche at the bottom of her vagina.
Re:thinking about something new? think again (Score:5, Insightful)
Everything you've said is good about Ruby also applies to Smalltalk, which uses blocks (closures) to implement all control structures, has trivial syntax (the entire language can be defined on a single piece of paper, and taught to small children with no programming experience in a few hours). It's obvious that the choice between Ruby and C++ is not necessarily simple; Ruby has higher-level abstractions, C++ has faster execution speed, so the choice depends on which is important. The question is, why would you choose Ruby over any of the following:
Even Objective-C can do most of what you claim is great about Ruby, and some other things. For example, I have a category which allows me to send messages to arrays as if they were individual objects and have it perform a map operation in Objective-C, and I've implemented futures in the language, and yet I would still choose Smalltalk over it for anything where speed is not critical.
I would hope, by now, that everyone knows that pretty much any language is better than C++, so 'better than C++' is not much of a recommendation anymore.
Re:thinking about something new? think again (Score:4, Insightful)
* a rich standard library with a good reference
* a good extended library like CPAN
* easy extension in C
* good documentation
* easily available compiler, etc.
I don't mind buying a book, as long as I can get somewhere just from the online documentation. Out of the languages you mention, I got the furthest with OCaml. However, if I needed to do something simple like connect to a database and then contact a directory server using LDAP, I'd be lost.
Re:thinking about something new? think again (Score:4, Informative)
Re: (Score:3, Insightful)
Library, Library, Library, Library.
Then comes community, documentation, availability of tools.
Let me ask you a question.
Smalltalk has been around for ages. If it's so great then how come it never caught on?
Re:thinking about something new? think again (Score:4, Funny)
Ow.
Re: (Score:2)
Continuation-passing style web coding. *drool*
Re:thinking about something new? think again (Score:4, Insightful)
Ruby is getting a lot of attention because of Rails, and Rails' attention is making it moderately easy to find web hosts that support it. It is easier to deploy a Rails application than it is to deploy a Django application, if you're taking into account "I must find a web host that supports my framework/language." If you are writing, a web app in Smalltalk using Seaside, well, not only are you definitely not shoving that out to your $8/month Dreamhost account, the chances are you're going to have to have complete control of the production side (i.e., colocation or self-hosting). Also, of course, if you're writing for a business, maintainability becomes an issue with any "obscure" language: eventually, the original development team won't be there, and if you can't replace them because the dozen other people in your area who know the language you chose are happy at the research labs they're working at, you find yourself in a very uncomfortable place. I've heard the even a kindergartner can learn Smalltalk so fast they'll be writing complete CRM systems in a week! speech, too, but in practice it seems those kindergartners are few and far between.
Frankly, deployment issues are one of the reasons I'm slinking back to PHP myself; as much as I love Rails in theory, as it turns out, in practice Rails is a sufficient resource pig that many shared hosts that claim to support Rails put serious limitations on it unless you bump up your service level. (I know I'm inviting arguments from Rails fans here, but yes, I've really looked into this.)
Re: (Score:3, Insightful)
It has been a long time since I did WebObjects work, but I don't think they're particularly similar. The spirit is certainly very different.
So, why do people use Ruby?
I think there are two big crowds. One is the smart OO guys who have been suffering through Java for years. Smalltalk is not commercially viable, but Ruby is. Suddenly, they can escape all the Java idiocy. For the ones doing web stuff, and in particular the ones wh
Yeah, the One True Way (Score:3, Insightful)
sad (Score:3, Interesting)
As for PHP vs. Ruby, both technologies suck: except for minor differences in syntax and object model, they are naively designed and implemented. After decades of
Re: (Score:2)
Ha ha! My thinking exactly.
I feel you are correct in your assessment of these (and other) technologies that abound now.
They were designed by skilfull amateurs and enthusiastic students, who knew problem they needed to address, and addressed it pretty well, but without the benefit of deep technical knowledge and experience.
If everyone had waited for heavyweight pros to address the problem, we'd still be
Re: (Score:2)
The problem with them is you pretty much have to unlearn so much of the ideas we take for granted in imperative languages, so much so, its been sugested your better off promoting scheme by teaching it to children then causing experienced programmers mind haemorages.
Even Haskell might be a candidate, but holy fucking shit will I n
SBCL (Score:3, Funny)
I also did try learning CL, but I personally found it hard to find out how to write production code in Lisp - most of the examples on the web are all very nice for CS stuff (e.g. run this from e
Re: (Score:3, Interesting)
The heavyweight pros did address the problem, many times: Modula-3, Smalltalk, Sather, APL, OCAML, Haskell, Scheme, EuLisp, Icon, and on and on. What those languages lack are user communities.
They aren't perfect, and nothing ever is, but they power a great deal of the web, very effectively and usefully.
Ruby does not power the we
MOD PARENT UP AS FUNNY (Score:3)
Fond memories of PL/1 (Score:2)
Late in high school, some geek friends asked if I wanted to attend a course in PL/1 with them. I thought about it for a day or so, and came to the conclusion that by the time I got to the end of college and was out in the working world, PL/1 might be history. Then, when I got out into the working world I could learn whatever specific language I had to learn. I didn't take the course.
I'm not saying I call it right all the time. I was really skeptical about Java when it first came out, and it seems to h
Slightly different outlook... (Score:3, Insightful)
Thinking about ditching C for Java? Think again.
I will say a lot of companies have successfully ditched C for Java, or at least C for C++. I personally dislike the Java implementations I've seen, Java programs I've used
Planning is key. (Score:3, Insightful)
Heyho I didn't read the artical but if i've learnt anything (hahah like hell i have), then its planning is key. Plan your project and find a language that works, not the other way around.
Languages are just tools (Score:4, Insightful)
Sometimes you go back to the tool you know how to use best.
Re: (Score:3, Funny)
Re:Languages are just tools (Score:5, Insightful)
That said, I don't know much about Ruby or Rails, but I've heard that you have to follow the conventions or you're just making things hard. You can just not follow conventions, but it's just adding another pile of problems that defeat the point of using Rails.
What an idiot (Score:4, Insightful)
Very uninformative article (Score:5, Insightful)
Reasons:
#1: Seems a very weak criticism, all languages are interchangeable really. Except some do some things much better than others.
#2: Internal management problem, not really related to Ruby specifically.
#3: Applies to every language
#4: Potential for real criticism here, but without any DATA it's completely useless
#5: Works for whatever language the author likes, again not related to Ruby
#6: Potential for more real criticism here, but again lacks any useful information
#7: Again something unrelated to Ruby specifically
From the whole list, only 2 of the reasons point to Ruby in any manner, and those are so uninformative as to be useless anyway. I think most of the blame for this lies with slashdot, as the article tries to spin it into something against Ruby when the actual article is more about a failed migration than anything else.
Re:Very uninformative article (Score:4, Insightful)
I have to agree with you. I've been through a few webprojects in perl, php, rails and struts. Perl is my favorite, but that has largely to do with the jobs I had to do in the past, and it's certainly not the only language to get to a solution.
The only thing that I'd have to agree with is that Rails does take up a bit more resources than the average PHP application (#4), but rails like any other framework does allow you access to your database. It's very well documented in Agile Web Development on Rails [pragmaticprogrammer.com] (not being paid, just giving an example I know of) where they introduce Active Record, and there's an small section on the subject itself. I'm pretty sure it's somwhere in the API reference as well.
Some languages are more suited than others for a certain project, so it's perhaps more important to do a proper analysis of what you want to achieve and what languages will help you most to achieve those goals. The author offers very little detail into what exactly went wrong with his project, except that it didn't go as smooth as planned (welcome to the 90% of all projects, pull up a chair and have a drink).
Finally, even though the article mentions he hired a programmer, it's often wise when learning a new language/API/tool to start with a small application so you'll get a firmer grasp on it. That way you'll get a better feel for possible trouble ahead. Sure, we don't all have the time to do that, but in that case it's often better to stick to what you know and what works for you instead of blindly charging forth and trying to ride the latest wave of technology buzzwords. Not that I'm saying that RoR is just a buzzword (it's pretty neat actually), but don't use it because it's hip. Use it because it solves a problem more easily than another language/framework.
article: -1, troll (Score:4, Interesting)
Re: (Score:2)
whoops (Score:2)
Re: (Score:3, Informative)
He had one of the best rails programmers there was. It wasn't a problem with not knowing rails. He still wasn't finished after 2 years. He could accomplish the same thing faster in PHP.
He specifically said that using and learning Rails helped him change his thought process for the better.
Re: (Score:2)
Re: (Score:2)
Are you even paying attention? Once again, the guy hired one of the best Ruby programmers out there to do the rewrite. He didn't try to do it himself. Your point is irrelevant.
Re: (Score:2)
He was incompetent...! (Score:4, Interesting)
While I do not doubt the hired programmers coding skills, I am afraid he was incompetent at planning.
It's like choosing ISAM as the DB engine in MySQL instead if InnoDB then expecting to implement [referential] integrity using your own code.
The fact that it took two years to realize imminent failure disturbs my mind. The worst thing is that this coder might have been an Open Source enthusiast that I'd expect to know better.
I am afraid no home work was done or whatever home work was done, it not good enough. The results speak for themselves.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
http://phppgadmin.sourceforge.net/ [sourceforge.net]
Also dumping python for PHP (Score:2)
We put a key system in Python a while back. After dealing with it for over a year, we are also going back to PHP. Everything else in the company is PHP. It just doesn't make sense to have this one Python. We can customize and improve the PHP a lot faster than the python.
Misleading summary (Score:5, Insightful)
Time to calm down here, people. Just because one person sees value in another set of tools doesn't mean you will too.
Re: (Score:2, Informative)
This article is interesting (and more than just fanboi talk) because it dispels some key myths about both Ruby and PHP -- all 7 points fall into two categories:
a) PHP can do it just as well or better.
b) PHP doesn't force the
Re: (Score:3, Informative)
I've picked PHP for web apps too, though I much prefer Ruby as a language (not too thrilled about Rails, mostly because I have an allergy to
Re: (Score:3)
As opposed to PHP which doesn't have threads at all?
I really don't understand the obsession with threads. Why not just use processes? Running multiple processes allows you to fully utilize that dual core CPU of yours. Plus it doesn't involve messing with locks and conditional variables, an important source of bugs. If one process crashes, the others are un
He makes good points, but (Score:2)
"#1 - "IS THERE ANYTHING RAILS/RUBY CAN DO THAT PHP CAN'T DO?
I might as well ask the opposite: is there anything PHP can do that Rails can't? Nope. PHP doesn't give me any reason to switch back from Rails. This entire argument doesn't mean anything.
"#3 - DON'T WANT WHAT I DON'T NEED"
It's the "not invented here" syndrome. "I didn't write it, so I don't want it, I want to use everything I wrote myself." A pretty weak argument.
I don't know the en
Re: (Score:3, Insightful)
And, I think you're pretty much right on about his other "points." The slashdot summary of his post is entirely misleading and total flamebait--and not written by him. I think the
Re: (Score:2)
Re: (Score:2)
That is true, but in most web applications most database actions are of the "store and retrieve records" type. For everything else, Rails doesn't prevent you from writing SQL. Indeed, most of my websites
Why do people keep comparing languages with API's? (Score:2)
This is getting ridiculous.
Article doesn't make sense (Score:2)
When you're writing a project you need to look at what your existing code base uses and choose something that integrates with it, or just stick with what you know. Every application our company uses is written in perl and they run great, HTML::Mason makes it a lot like PHP any way.
% print "Hello world!" isn't much different from
framework != language (Score:2, Insightful)
people get too tied up with cms's that they think will do everything. code a plugin yourself (assuming a decent api is available).
Why did he do it in the first place? (Score:2)
There is no si
(I'm the author of the article) - Please read: (Score:5, Informative)
Longtime Slashdot reader, surprised to find my little personal blog post on Slashdot today, especially since the lead-in description framed it with the completely wrong point.
I never said "the project was cancelled because of limitations of Rails" - more like I spent two years trying to make Rails do something it wasn't meant to do, then realized my old abandoned language (PHP, in my case) would do just fine if approached with my new Rails-gained wisdom.
That's all.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Funny)
I am very tempted to use the "You must be new here" /. joke.
Slashdot summaries are always written like this. I don't know if the editors/submitters do not understand the point of the article they are linking to, or if said editors/submitters are so biased that they want to prove another point, using that article.
Re:(I'm the author of the article) - Please read: (Score:4, Insightful)
I have one burning question: What is the take of Jeremy Kemper (aka bitsweat) on this situation? Being "one of the best Rails programmers in the world", many of us would like to hear from him. Has he blogged or posted about this too? (need a link) Does he share the same view points on the situation?
Re: (Score:3, Insightful)
Given that your O'Reilly Biography describes you as "Still a relative newbie among programmers, he'd appreciate any tips and advice you could give him", why is it you could pull off CDBaby in 2 months in PHP while an expert Rails programmers, including yourself as a second person on the project, could not pull it off on 2 years?
The project
Lame (Score:2)
The biggest issue I'm having with rails is its lack of scaling due to a horrid threading model. We run mongrel, which can accept multiple requests per mongrel but only process one at a time due to Rails not being thread safe. So you end up having to run many many instances of mongrel on seperate ports to accept incoming requests. This wouldn't bo so bad, but the preferred methods of sending traffic to these mongrels(apache mod_proxy_balancer is what we use) have NO idea what the
hmmm (Score:2)
Programmer vs language (Score:2)
#6 - I LOVE SQL Speaking of tastes: tiny but important thing : I love SQL. I dream in queries. I think in tables. I was always fighting against Rails and its migrations hiding my beloved SQL from me.
Sounds like this guy dropped back to his default mode of putting a lot of his eggs in the database layer, which is good for speed. Some programmers handle levels of abstraction better than others. If he were to reapply Ruby/Rails again in a few years he may
Article Does Not Make Much Sense (Score:3, Insightful)
1. There is nothing that PHP cannot do that Rails cannot do - Well of course, and there's nothing that any language can do that Common Lisp cannot do. Almost all languages implement a Turing machine and can be used to solve any computational problem. The question is code readability, syntactical sugar, and adaptability, all important concepts. Also, the community that has grown around it that builds a knowledge base and plugins and libraries.
2. Their entire company worked on PHP and integration was difficult - Sounds like they didn't understand RPC and services models. Sharing between different languages and platforms is an unfortunate fact of life. Also, it sounds like PHP was the problem here, not Rails, if interoperation was such a problem. "Interoperation" in the article is used oddly - it's actually more about transition to a new site, which has nothing to with the platform used and, if is such a heinous problem, is a problem with design of the new app.
3. Didn't need 90% of Rails - Then why use it? Also, using a tenth of something is not an argument against it if it still the best tool for the job you are doing.
4. The custom solution they jury rigged is "small and fast" - Many Rails apps are small and fast - there's no statistics or analysis here for comparison.
5. The PHP custom app was built for to their tastes - Obviously. If you write a custom app it will miraculously suit your preferences and will probably be a very good solution to your problem. Custom apps if you can do them are often a good idea, keeping in mind the downside is that you don't have a community of knowledge, don't get patches for free, etc..
6. He loves SQL - Fine, don't use ActiveRecord then. Or use ActiveRecord and make direct SQL calls. This goes against common wisdom, of course, regardless of platform, but if you really want to do it, it's there.
7. Programming languages are like girlfriends? - No idea.
The bottom line is that there are criticisms you can level at Rails or any language or framework. However, you actually have to bring facts and analysis to an argument, and this article offers neither.
Yeah, well. (Score:2)
not just PHP/Rails (Score:2)
I worry that a decade of homebrew Perl CGI has warped my brain, but frankly, HashMaps wrapping HTTP Request parameters seems really natural to me, and if you use a Model2+ approach w/ servlet and JSP pairs, you're writing your business logic in Java, your HTML in HTML (well, JSP... and honestly, I don't think I've ever been on a team that manage to l
Dumbass (Score:3, Insightful)
There's nothing wrong with PHP, especially if the current implementation does the job.
#7 - PROGRAMMING LANGUAGES ARE LIKE GIRLFRIENDS (Score:4, Insightful)
My VB coding improved immeasurably after I learned C#. And I'm not just talking VB6, I'm talking VB3 as well.
Learning a new language can teach you to do so much better in your old ones. I am *still* more productive, if you want something fast, in VB6 than I am in Java or C#. I can knock together a small cheap GUI very fast.
Of course, sometimes you do run into the limits of your chosen platform. VB6 strings are all 2-byte unicode internally, which makes dealing with UTF-8 a real pain. Then the ugly kludges start coming out.
To get things straight: Rails did *NOT* invent MVC (Score:5, Insightful)
Technology wise there are many frameworks and webkits that are far more mature and far more sophisticated than Rails and have been around for 6 years and more.
Misleading Post (Score:3, Insightful)
The actual blog post (and poster) imply that Rails was not designed to do things that they were trying to do. That may or may not be... but that is not the fault of Rails. If the tool was inappropriate for the project, then the project manager should have determined that before starting.
Also, while it is implied (and even stated) that Rails was not designed to do these things... nowhere is he specific about what those things actually are. Rather than berating Rails, the blog post glorifies PHP. Those are two very different things.
In introductory Business Law at my college, there was discussion of the classic case of the tavern visitor in the 1700s who stated "My horse can pisse better beer than this!" (sic) The tavern owner sued the patron for slander. (In those days most taverns made their own beer.)
The judge ruled that the statement was not slander, because the customer did not insult the tavern owner's beer at all... rather, he had complimented his horse!
There really is a big difference. So... I want to know what he does not like about Rails, since he really did not explain that.
The real problems - from the original link (Score:3, Insightful)
> I'm a little reluctant to add to the wasteland that is this post
> and these comments, but here goes.
>
> He learned some PHP and cobbled together the old CDBaby site by himself.
> It was good.
> Then, he heard about Rails, and became infatuated with it. He proceeded
> to attempt a rolling rewrite of CDBaby's frontend and backend both
> (the backend is large, because of inter-label and digital distribution
> stuff) in Rails.
> At this time, Derek had no experience with the following things:
>
> * any language other than PHP
> * systems integration and interoperability
> * Rails
> * object-orientation
> * the MVC pattern
> * managing a development team
Concluding with:
> No framework saves you from your own inexperience.
Re: (Score:2)