IT/Software career thread: Invert binary trees for dollars.

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
And here I am as a Ruby Developer thinking "jeez, what a mess, in Ruby you only have to ask: variable.nil?"

That's why I guess I love the Ruby language, it's so like 'natural' language it scares me. 1..5 do { xyz }, or array.each ... or variable.nil?. So easier and natural to perform operations and checks.
Some people are not crazy about the "magic" of higher level languages. Personally I find that learning c/c++ as a first language allows one a much deeper understanding of the higher level languages like ruby. The abstraction in such languages always bothers me as I prefer to understand what the hell is going on in my code.

Having said that, if the latest news about JRuby with truffle is not worthless hype and IF it will be accepted, when ready, by the wider community, it would be game changing for me. On top of that SciRuby has been accepted to Google Summer of Code which could mean that I'll be banging out ruby in a few years instead of putzing around with python and c++. That is unless Julia crushes the rest of languages used for scientific computation and then we will all just be using that
smile.png
So many choices, so little time.
 

Vinen

God is dead
2,783
490
And here I am as a Ruby Developer thinking "jeez, what a mess, in Ruby you only have to ask: variable.nil?"

That's why I guess I love the Ruby language, it's so like 'natural' language it scares me. 1..5 do { xyz }, or array.each ... or variable.nil?. So easier and natural to perform operations and checks.
Ahh... Ruby... the language companies use to bootstrap then have to rewrite as it doesn't scale worth shit.
 

Tenks

Bronze Knight of the Realm
14,163
606
Yeah that is the same issue we had with Groovy. The code looked nice and read well but we just couldn't scale it without throwing a stupid amount of hardware into the project.
 

Deathwing

<Bronze Donator>
16,426
7,437
What kills the scaling for Ruby and other similar languages? Dynamic typing and run-time interpretation?
 

Tuco

I got Tuco'd!
<Gold Donor>
45,452
73,542
Never looked at ruby or groovy, but is this performance comparison apt?

/var/log/mind

One of the common sins in software development is worrying about performance when you don't need to, but man, groovy/ruby having an order or two of magnitude higher run time is enough for me to never want to write any code in that language.

I feel like any project of significance I've ever worked on has had a need at some point to process a ton of data or doing something very CPU/memory intensive.
 

Vinen

God is dead
2,783
490
Never looked at ruby or groovy, but is this performance comparison apt?

/var/log/mind

One of the common sins in software development is worrying about performance when you don't need to, but man, groovy/ruby having an order or two of magnitude higher run time is enough for me to never want to write any code in that language.

I feel like any project of significance I've ever worked on has had a need at some point to process a ton of data or doing something very CPU/memory intensive.
The thing is Ruby is great for prototyping / starting a company but people need to be more aware that they will have to rewrite everything down the road. It is too high level of a language to do anything other then basic optimizations.
 

Tenks

Bronze Knight of the Realm
14,163
606
What kills the scaling for Ruby and other similar languages? Dynamic typing and run-time interpretation?
I know for Groovy dynamic typing is what murdered performance. It also made it a gigantic pain in the ass to use at a large scale if people just wrote their method as returning "def" (this is the dynamic variable type in Groovy) since 99/100 it is returning a static type so why not just say String myMethod instead of def myMethod?

I believe Groovy has redone some of their backend so you can define classes as being statically typed so it doesn't have to do all the reflection fuckery to get dynamic typing to work. For the most part dynamic typing always felt like it was just there to jerk off the person writing the code because youcouldsolve it the normal way but you could do it with 10 less LOC and use dynamics!
 

Cad

<Bronze Donator>
24,489
45,418
The thing is Ruby is great for prototyping / starting a company but people need to be more aware that they will have to rewrite everything down the road. It is too high level of a language to do anything other then basic optimizations.
Maybe it was mostly Rails but I spent a lot of time doing RoR for a startup and so much of the framework is behind the scenes, I spent a lot of time on google just trying to figure out what something does. I give much less of a shit about having pretty "readable" code as I do being able to figure out what is going on without spending half my day on google. I would prefer a much more explicit language for any important project.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
Maybe it was mostly Rails but I spent a lot of time doing RoR for a startup and so much of the framework is behind the scenes, I spent a lot of time on google just trying to figure out what something does. I give much less of a shit about having pretty "readable" code as I do being able to figure out what is going on without spending half my day on google. I would prefer a much more explicit language for any important project.
Its both. Lots of hand waving in Ruby/Rails. But with Ruby you can code something up in a fraction of the time it takes to do same in Java or C++. As far as scalability, lets just say not every company is Twitter and its not an issue.
 

Cad

<Bronze Donator>
24,489
45,418
Its both. Lots of hand waving in Ruby/Rails. But with Ruby you can code something up in a fraction of the time it takes to do same in Java or C++. As far as scalability, lets just say not every company is Twitter and its not an issue.
You can code it up in a fraction of the time assuming you're happy with the way Rails does it I guess. Soon as you need something weird it's 10 fucking hours on google again.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
You can code it up in a fraction of the time assuming you're happy with the way Rails does it I guess. Soon as you need something weird it's 10 fucking hours on google again.
I am with you. I am not a big fan of hand waving to produce "magic" (I mentioned as much a few posts back). Having said that, programming anything when you dont understand wtf is going on is going to take 10 hours of googling. I dont think its limited to Ruby. The benefit of ruby/rails is the speed at which you can put something together which is largely a result of having a very active community that has written tons of gems (libraries) to do nearly everything you need.
 

Cad

<Bronze Donator>
24,489
45,418
I am with you. I am not a big fan of hand waving to produce "magic" (I mentioned as much a few posts back). Having said that, programming anything when you dont understand wtf is going on is going to take 10 hours of googling. I dont think its limited to Ruby. The benefit of ruby/rails is the speed at which you can put something together which is largely a result of having a very active community that has written tons of gems (libraries) to do nearly everything you need.
Maybe its just the IDE's but I could take a java program and trace it and know exactly what was happening. With Ruby you had to "just know" that this gem overrode that call, because there's no explicit library calls, nothing really tells you it jumps to the controllers at X point, it just does it, etc. Granted, you can figure that out, but once again in java I could just trace the calls because they are explicit, I didn't have to google to figure out what struts does.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
Maybe its just the IDE's but I could take a java program and trace it and know exactly what was happening. With Ruby you had to "just know" that this gem overrode that call, because there's no explicit library calls, nothing really tells you it jumps to the controllers at X point, it just does it, etc. Granted, you can figure that out, but once again in java I could just trace the calls because they are explicit, I didn't have to google to figure out what struts does.
I am sure the guys here that use Ruby full time will tell you that things have improved in the last 4-5 years.
 

Cad

<Bronze Donator>
24,489
45,418
I am sure the guys here that use Ruby full time will tell you that things have improved in the last 4-5 years.
Yea, I always need to filter my responses with the "stopped programming a long time ago" disclaimer, but these topics are near and dear to my heart.
smile.png
 

Tenks

Bronze Knight of the Realm
14,163
606
Yeah programming Java is so nice especially if your 3rd party allows source downloads. I find it far, far easier to learn how to use an API by reading it's source code than digging through documentation as well. Just drill into it from your IDE and just follow the function calls.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
Yea, I always need to filter my responses with the "stopped programming a long time ago" disclaimer, but these topics are near and dear to my heart.
smile.png
Ruby is a recent addition to my hobbies. I primarily use Python (will be going balls deep into c++ over the summer as I have to do a bit of research in computational topology and c++ has decent libraries for it) Anyway, I wanted to write a few websites in my off time but hated the shit out of django for some weird reason. Grabbed a ruby (and later on railz) book or two and really liked the speed with which i can slap something not too shitty together. Its annoying when I look at something in ruby and every tiny thing is abstracted away but the fact that i learned c/c++ first allows me to easily figure out wtf is going on. Having said all that, I am no Ruby expert however I know that Ruby, and especially Railz, have gone through a pretty big change (for the better) in the last few versions. Its not as shitty as you imagine it to be if you havent touched it in 5-10 years.
 

Vinen

God is dead
2,783
490
Yeah programming Java is so nice especially if your 3rd party allows source downloads. I find it far, far easier to learn how to use an API by reading it's source code than digging through documentation as well. Just drill into it from your IDE and just follow the function calls.
I don't understand why people use Java anymore if given the choice. C# is so much more powerful with a far better IDE.

The only case where C# is not the better option is when licensing costs come into play around Windows. Even then, this should be going away soon with immense advances in Mono over the past few years (And given that Microsoft sponsors Mono now)

//Bitter ex-C# developer who was forced to move to Java for political reasons
 

Tenks

Bronze Knight of the Realm
14,163
606
I've already asked in this thread for reasons C# is so much better than Java and I've gotten a few novelty reasons. Also having worked with the MS VS IDE throughout college (so this maybe dated) Intellij is just as good if not better. Not to mention I don't think C# has any equivalent to a Hadoop like ecosystem.
 

Cad

<Bronze Donator>
24,489
45,418
With how mature both languages/frameworks are I can't imagine there's any compelling advantages one way or the other.
 

ShakyJake

<Donor>
7,641
19,281
Java has a shit ton more frameworks, so there may be certain situations where it is the ideal choice. And, like mentioned above, the Intellij IDE is pretty damn good.

By the way, I'm trying to learn Java EE for web development. But i cannot find a good book or tutorial that doesn't automatically assume some existing knowledge beyond Java basics. It's been very frustrating.