Tag: programming

  • Errors and using your ear

    This week, I experienced a traditional whiteboard technical interview, highlighting my coding reliance on running tests for error detection. Reflecting on music, I now prioritize learning by ear over sheet music. I advise fellow interviewees to practice solving problems without immediate error feedback to prepare for challenges where testing isn’t possible.

  • Procs, lambdas, and performance

    The author explores the performance of blocks, procs, and lambdas in Ruby through benchmarking. Initial tests showed blocks to be slower due to method call overhead. After refining the approach, benchmarks indicated that while blocks improved, procs and lambdas remained consistently faster, highlighting the importance of method usage in performance.

  • Ruby vs Python – Speed Comparison

    The author explores the Sieve of Eratosthenes algorithm, implementing it in Ruby and Python to compare performance. After detailing the code structure and optimization strategies, benchmark results indicate that Python is generally faster than Ruby. The exploration serves as a fun comparison between the two programming languages while encouraging feedback on the methods used.

  • Two Sum – Python

    I’ve been reviewing technical interview practice over the last few weeks, and thought it might be a good idea to consolidate my notes and think about how I would teach it. This always worked very well for music, and seems to work for writing code too. I’m going to go over the Two Sum problem…

  • Classes in C#

    The content discusses creating a simple class “Person” in Ruby and C#. In Ruby, it utilizes attr_reader, initializing attributes and defining a method to display information. In C#, it requires defining public properties, using “get” and “set,” and employs Console.WriteLine for output. The implementation demonstrates language-specific differences succinctly.

  • Dynamic vs Static

    The author contrasts C# and Ruby, highlighting C# as a static, compiled language and Ruby as dynamic and interpreted. C# requires variable types to be declared at compile time, catching errors early, while Ruby allows runtime type changes, leading to potential runtime errors. Each language suits different needs: Ruby for speed in small tasks, C#…

  • Method/Function in Ruby and C#

    The author compares method implementation between Ruby and C#. They demonstrate creating a simple addition method and checking for odd numbers in both languages. Ruby’s syntax is more concise with built-in methods, while C# requires explicit logic for operations. The author appreciates C#’s detailed visibility in code structure.

  • C# and Ruby

    I’m thinking that the next few posts are going to focus on the similarities between C# and Ruby, as I work through my notes from being onboarded into a project using C# and .NET. One of the main differences is that C# is a ‘statically typed’ language. It requires explicit declarations, and everything is checked…