AMA: Computer Specialist

Mundane & Pointless Stuff I Must Share: The Off Topic Forum

Moderator: Moderators

User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

Post by Murtak »

krainboltgreene wrote:1. You compared Java to Rails. Rails is not Ruby. Ruby is not Rails.
Fine. Java is not Rails. Happy? Now what is the corporate default? Java frameworks? Which are implemented in Java while Rails is implemented in Ruby?


krainboltgreene wrote:2. Java is not faster than Ruby. That is blanket statement that really does disservice to your credibility. Java, the programming language, is "faster" than Ruby 1.8 (MRI) with optimized programs built to test speed.
I was not aware of Ruby being faster at anything than Java. With the Hotspot VM giving C++ a run for it's money I actually think it is fair to say that Java is faster than Ruby. Java is also unnecessarily verbose and has an unhealthy S/M relationship with XML while C++ is made of Arbitrarium and distilled evil. But that does not mean they are not faster than Ruby, generally speaking. Usually it is not even a contest.

And that's fine. Ruby is not a speed demon and wasn't designed to be one. Ruby is designed to be beautiful, to be able to bend the language and to write code quickly. I love the language. And for nearly all tasks it is fast enough. But if you do require speed Ruby is certainly not a top contender.
Murtak
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

I don't understand why something is on the fall just because a retarded community built around rockstars that are leaving. It's not like Ruby tomorrow is going to be any worse than Ruby today -- and it is pretty good today.

Or well, at least it's pretty good for one of the professors I know. I prefer what he calls "mathematician's languages" :-P
User avatar
Crissa
King
Posts: 6720
Joined: Fri Mar 07, 2008 7:54 pm
Location: Santa Cruz

Post by Crissa »

Rethinkdb will come to a crashing halt once legal shows up asking for DMCA compliance. Alas. Looks beautiful, though.

-Crissa
User avatar
Cynic
Prince
Posts: 2776
Joined: Fri Mar 07, 2008 7:54 pm

Post by Cynic »

I recently bought a panasonic zs3 digital camera. I love it and it takes some beautiful pictures. It uses the avchd format. All my video comes out as filename.mts.

I'm just wondering if there's a good open source/free converter out there that'll convert mts files to other format while retaining hd quality. I've seen a few around that do convert but the quality seems to downgrade.
Ancient History wrote:We were working on Street Magic, and Frank asked me if a houngan had run over my dog.
krainboltgreene
Apprentice
Posts: 50
Joined: Sun May 30, 2010 6:15 am
Location: Eugene, Oregon
Contact:

Post by krainboltgreene »

Now what is the corporate default? Java frameworks? Which are implemented in Java while Rails is implemented in Ruby?
There is no corporate default. There are simply more Java developers than Rails developers. People develop with the tools they are most familiar with. This is not an indication that somehow Java is the "default".
I was not aware of Ruby being faster at anything than Java.
Then you haven't dealt with enough Java from Java developers.
I don't understand why something is on the fall just because a retarded community built around rockstars that are leaving. It's not like Ruby tomorrow is going to be any worse than Ruby today -- and it is pretty good today.
Programming Languages don't make money, they're supported by donations to organizations who "officially" back the language and by people who contribute work.

So when someone talks about a language "falling" it means "falling out of use". Ruby as a community thrives on it's most popular users doing on the edge work.
Last edited by krainboltgreene on Wed Jun 23, 2010 9:11 pm, edited 1 time in total.
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

krainboltgreene wrote:Then you haven't dealt with enough Java from Java developers.
Once again, Debian to the rescue. And for Java Steady State (ouch!)
Last edited by Surgo on Wed Jun 23, 2010 9:21 pm, edited 1 time in total.
krainboltgreene
Apprentice
Posts: 50
Joined: Sun May 30, 2010 6:15 am
Location: Eugene, Oregon
Contact:

Post by krainboltgreene »

Would anyone else without understanding like to post?

Just Surgo? Ok!
Java, the programming language, is "faster" than Ruby 1.8 (MRI) with optimized programs built to test speed.
People do not write optimized programs built to test speeds. They write programs using the style they've picked up at universities.

Basing a language's "speed" off perfect conditions is plain stupid.
Last edited by krainboltgreene on Wed Jun 23, 2010 9:23 pm, edited 1 time in total.
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

So what you're saying is "Ruby is faster because I say so".

Is that it? Okay, got it.
krainboltgreene
Apprentice
Posts: 50
Joined: Sun May 30, 2010 6:15 am
Location: Eugene, Oregon
Contact:

Post by krainboltgreene »

Challenge: Quote me where I said Ruby was faster.
Spoiler: You can't!

What you can find is me saying that Java wont be faster than Ruby for this dude's project.

Lesson: Speed is only a measurable metric if you're comparing your work in two different languages. Skill, style, and builds are what determine speed and those three factors are so wildly different between each programmer that it's absolutely juvenile to argue unless you're comparing tightly optimized scripts that are built for speed.

Pro-Tip: The real world doesn't work that way.
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

Then might I challenge to you to quote me where I said that...
krainboltgreene wrote:Lesson: Speed is only a measurable metric if you're comparing your work in two different languages. Skill, style, and builds are what determine speed and those three factors are so wildly different between each programmer that it's absolutely juvenile to argue unless you're comparing tightly optimized scripts that are built for speed.
...that this was not the case.

Don't bother doing the hard work, I'll save you the trouble: I never said that either! You can feel free to stop talking past me at any point now.

And aside from that...you said "Java is not faster than Ruby". Which is clearly a false statement.
User avatar
Crissa
King
Posts: 6720
Joined: Fri Mar 07, 2008 7:54 pm
Location: Santa Cruz

Post by Crissa »

Strange, QBasic and VisualBasic are languages which were cash cows for many years.

Of course languages can make money. It's just that proprietary languages need some reason for people to use them, else they fall out of favor.

C# is Microsoft's next try at a paying language for more than their console, I think.

-Crissa
User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

Post by Murtak »

"Under perfect conditions", "not all the time" and "using optimized code" are all bullshit arguments when discussing the general state of things. Generally speaking:
1. Java code will be executed faster than Ruby code that does the same thing.
2. The Java code will be much longer than the Ruby code.

This is not even debatable. The only way for Ruby to partially keep up is to only use built-in methods and hope they are all internally written in C. As soon as you use stuff you wrote yourself in Ruby code you will be slower than the same code in Java. And that is before JIT compiling and adaptive compiling speed up your code. Java is faster than Ruby. So is C. And dozens of other languages. Ruby is slow. Ruby is fat. Sure, it is getting slimmer and faster and that's great. But even with these improvements Ruby. Is. Slow.

It just doesn't matter. Ruby often gets used in web development and to integrate different systems. In both cases you do not need speed. Your database query takes half a second, plus a a twentieth of a second for Ruby code, or a hundredth for Java code. The difference is barely noticeable. And in exchange for speed which does not matter in your situation you get to finish your application sooner. You get a much smaller codebase, so you can change it easier. You get clearer code, so you have fewer bugs. You get much better metaprogramming capabilities, so you can cut down on code duplication and clear up your code structure. Again less bugs and duplication.

And all of this means you might actually write better algorithms, different than the ones you might use if you were coding in Java. And that is the only point were you can actually gain a speed advantage over other languages - by running smarter code, which you were only able to write because Ruby lets you do things Java does not allow or unnecessarily obfuscates. But that still does not mean Ruby is faster than Java. It means Ruby lets you write better code.

I love Ruby. I avoid Java like the plague, think Python is built upon the wrong principles and firmly believe C++ is giant practical joke. Given the choice I will choose Ruby over pretty much anything else. But I do not delude myself into believing that it is a fast language. And I don't get how anyone can believe it is.
Murtak
cthulhu
Duke
Posts: 2162
Joined: Fri Mar 07, 2008 7:54 pm

Post by cthulhu »

According to market research, the actual corporate standard is .NET
User avatar
RobbyPants
King
Posts: 5201
Joined: Wed Aug 06, 2008 6:11 pm

Post by RobbyPants »

Corporate standard of what? Most companies?
cthulhu
Duke
Posts: 2162
Joined: Fri Mar 07, 2008 7:54 pm

Post by cthulhu »

Yeah, it has the highest market presence by a significant margin. Java is way behind that, but still miles ahead of everything else.
User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

Post by Murtak »

.NET is actually dozens of languages, frameworks and applications though, isn't it?
Murtak
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

Indeed.

And, finally, Visual OCaml too (that is to say, "Visual F#"). That's pretty awesome.
RandomCasualty2
Prince
Posts: 3295
Joined: Sun May 25, 2008 4:22 pm

Post by RandomCasualty2 »

cthulhu wrote:According to market research, the actual corporate standard is .NET
What exactly is .NET?

Is it it's own language or what?
User avatar
Gelare
Knight-Baron
Posts: 594
Joined: Sun Aug 10, 2008 10:13 am

Post by Gelare »

Could someone give me, like, a two paragraph explanation of what SQL is and what it's used for? I've only ever done substantial coding in Java, but apparently I'm gonna need to learn SQL for my new job.
Heath Robinson
Knight
Posts: 393
Joined: Sun Aug 17, 2008 9:26 am
Location: Blighty

Post by Heath Robinson »

Gelare wrote:Could someone give me, like, a two paragraph explanation of what SQL is and what it's used for? I've only ever done substantial coding in Java, but apparently I'm gonna need to learn SQL for my new job.
Sure, I'll do this.

SQL stands for "Structured Query Language" and is the standard way to interface with any widely used relational database system. It's not a particularly complex language (so far as structure goes) because it only needs to define what data you're retrieving or the operation you're performing.

The most frequently used query in SQL generally looks like this:

Code: Select all

SELECT * FROM some.tbl WHERE colName LIKE 'D*D';
That'd retrieve all the tuples/rows from the "tbl" table under the "some" database where the entry under "colName" contains two capital Ds separated by something. You also see quite a number of uses of the "JOIN" syntaxes (and there are quite a number of these) to connect two tables together, so that entries in one table that are references to entries in another are connected up when you retrieve the information.

Yeah, I suck at explaining that, but think of it like this: you have a list of employees and a list of clock-in times. You could copy and paste the employee information into the clock-in entries. But what if something is entered wrong and needs to be changed? You'd need to make those changes thousands of times (and some would likely be entered wrong again). So you assign each employee a number and attach that number to the clock-in entries instead. If you want to see when people clocked-in on tuesday, your database will grab all those entries, then also grab the entries from your employee table and connect them up so that instead of seeing "8:53, 2131" you see "8:53, Sarah Houston, Sales, female, 23/5/73".


You basically learn SQL as part of learning about relational databases, because the two are heavily intertwined. Learning more SQL without learning relational databases is pretty much a losing prospect.
Last edited by Heath Robinson on Fri Jun 25, 2010 10:44 pm, edited 2 times in total.
Face it. Today will be as bad a day as any other.
RandomCasualty2
Prince
Posts: 3295
Joined: Sun May 25, 2008 4:22 pm

Post by RandomCasualty2 »

Gelare wrote:Could someone give me, like, a two paragraph explanation of what SQL is and what it's used for? I've only ever done substantial coding in Java, but apparently I'm gonna need to learn SQL for my new job.
Basically it's a database querying language, giving you a way to read, modify and sort a database using specific criteria.

It's kind of nice since it works with basically any database. That is you can use SQL to access something in MS Access, Oracle, FoxPro, MySQL, and pretty much any database you can think of. And you generally use it through something like Java or VB to do things to your database in program code.

If you want to do it through Java, the classes you need to study are Connection, Statement and ResultSet.
User avatar
Blasted
Knight-Baron
Posts: 722
Joined: Wed May 26, 2010 5:41 am

Post by Blasted »

RandomCasualty2 wrote:
cthulhu wrote:According to market research, the actual corporate standard is .NET
What exactly is .NET?

Is it it's own language or what?
It's a "Framework"; bunch of APIs, which Microsoft would like all programmers to use.
It has native implementations for C++,C#, whatever VisualBasic is called now, IronPython, IronRuby, F#. There are other implementations for a whole bunch of other languages and an opensource implementation called 'Mono'.

I concur with .NET being the corporate standard. Especially for medium/medium-large businesses and those who are MS exclusive.
cthulhu
Duke
Posts: 2162
Joined: Fri Mar 07, 2008 7:54 pm

Post by cthulhu »

Yeah there is a fuck ton of languages - though I'd suggest C++/C# and VBA V6 are like 95% of the .NET footprint
RandomCasualty2
Prince
Posts: 3295
Joined: Sun May 25, 2008 4:22 pm

Post by RandomCasualty2 »

Blasted wrote: It's a "Framework"; bunch of APIs, which Microsoft would like all programmers to use.
It has native implementations for C++,C#, whatever VisualBasic is called now, IronPython, IronRuby, F#. There are other implementations for a whole bunch of other languages and an opensource implementation called 'Mono'.

I concur with .NET being the corporate standard. Especially for medium/medium-large businesses and those who are MS exclusive.
Not quite sure I follow. Doesn't C++ create a self-contained exe file that doesn't require other stuff to run?

Or does .NET include a development kit (compilers and the like) that people can use?
User avatar
Blasted
Knight-Baron
Posts: 722
Joined: Wed May 26, 2010 5:41 am

Post by Blasted »

RandomCasualty2 wrote: Not quite sure I follow. Doesn't C++ create a self-contained exe file that doesn't require other stuff to run?

Or does .NET include a development kit (compilers and the like) that people can use?
Even a simple "Hello, World" program will require other code to run. For instance, the code to draw the characters onto the screen. This is provided by iostream or printf, for instance. .NET provides the code, in "libraries" which the program will access in order to create a window and display the characters.
This is true of almost all C/C++ programs and I can't think of any off the top of my head which are entirely self contained, while remaining useful.

The libraries which are required used to be offered in the choice of static or dynamic. Static libraries were compiled into the program itself, while dynamic libraries are a pointer to where the code which you want to run is. This might be a .dll on windows, or .so on linux and so on and so forth.
The vast majority of compilers now use dynamic libraries by default and for most use cases, they are the way to go.
Post Reply