Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I am not a python guy but I'd think the user = 1 thingy makes that it only ever goes if and not the else? 😅
-
@Michelle Ahh nevermind me. I never programmed in either language and don't know much of the differences 😅
*walks out silently and emberrassed (I have no clue how to spell that one)* -
@linuxxx
Don't worry. It's a common mistake, so you're not the only one. I'm the one who coded in Ruby, so I'm the ignorant one lol.
Also, it's spelled embarrassed :). -
@ThatDude
It's really easy and elegant. It's useless without the framework, Ruby on rail, but it's still really good. -
Ahh you have been spending time in Ruby land I imagine :P to me it happened similarly when I tried using blocks in Python, i was weirded out when the interpreter gulped an error out and was all like "waaaait a minuuuute"
-
@Michelle not really useless, it is used extensively with Puppet for sys admin stuff and with Metasploit as the scripting language of choice for that framework. Really powerful and elegant language, i wish it was used more in ml
-
@AleCx04
I think these mistakes occur because Ruby has such a similar syntax to Python. -
github95617yI saw "puts" in .py
Immediately realized you must be debugging recently in RoR, as I am doing the same using puts and debugging the hard way. -
github95617y@Ashkin I find it slightly difficult. Maybe because I started ruby with RoR. Personally, I don't like it. Even had a rant on it.. teehee
-
@AlexDeLarge
Most of my errors include missing semicolons, so instead of realizing the fact I used the wrong language, I always check for semicolons. Though the worst is when you mix languages together.
Like mixing Ruby and JavaScript together.
Var x = test
puts x -
@linuxxxxxx
The error kept saying something about line 3, but there was nothing wrong with line 3. -
bioDan61597y@Michelle lol exactly. its the "puts" on line 3 that gives it away. But i totally get the confusion since python and ruby are so semantically similar.
(python doesn't have a "puts" method unless explicitly defined ofcourse) -
No ':' after block creations, puts instead of print(). Are you learning Python 2 in 2017? WHY.
-
@afrometal
I just got mixed up is all. I already know Python 3, there's no reason for me to use 2..
It took me a good 20 minutes to realize why my Python code wasn't working. Then it hit me.
random