• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
alpardal Avatar
Name:André
Clan:Unknown
Member Since:Dec 2013
Last Seen:Dec 2018
Profiles:
    Following:0
    Followers:0
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (10)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • eleasias
      • commented on "Power of two" ruby solution
      • 11 years ago

      Thanks, that's helpful comment!

    • Custom User Avatar
      • SteenJobs
      • commented on "You Can't Code Under Pressure #1" ruby solution
      • 11 years ago

      Wow. Very clever. I know pretty much nothing about binary (currently working on changing that), so I guess that explains why I didn't understand it. It's really incredible how much I've learned new skills and refined old skills thanks to this site and its knowledgeable users. Looking forward to learning more, thanks so much for the help!

    • Custom User Avatar
      • alpardal
      • commented on "Power of two" ruby solution
      • 11 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • alpardal
      • commented on "Power of two" ruby solution
      • 11 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • alpardal
      • commented on "Power of two" ruby solution
      • 11 years ago

      In Ruby you normally don't say return something, you just say something, since the last expression is always the return value of a method invocation.

    • Custom User Avatar
      • alpardal
      • commented on "Power of two" ruby solution
      • 11 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • scopevale
      • commented on "You Can't Code Under Pressure #1" ruby solution
      • 11 years ago

      As alpardel said it's the left bitwise shift operator if applied to a Number

      If you take an integer 11 which is 1011 in binary and shift the bits 1 to the left you get 10110 = 22
      if you shift them 2 to the left you get 101100 = 44

    • Custom User Avatar
      • alpardal
      • commented on "Multiples of 3 and 5" ruby solution
      • 11 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • alpardal
      • commented on "You Can't Code Under Pressure #1" ruby solution
      • 11 years ago

      It's a left-shift bit operator: x << n shifts the bits of 'x' n position to the left, doubling its value once for each shift. E.g.: 3 << 2 = 3 * 2 * 2 = 12

      http://en.wikipedia.org/wiki/Bitwise_operation#Bit_shifts

    • Custom User Avatar
      • SteenJobs
      • commented on "You Can't Code Under Pressure #1" ruby solution
      • 11 years ago

      I thought "<<" only adds things to a hash/array. What is its function here?

    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...