Month: May 2018

  • A More Powerful Exponential Function

    In this post I describe how I solved the following question (from Chapter 3 of OCaml from the very beginning): Use pattern matching to write a function which, given two numbers x and n, computes x to the power of n. Although the author provided an answer, his function returns a stack overflow error when…

  • Learning Pattern Matching in OCaml

    In Chapter 3 of OCaml from the very beginning, I learned about pattern matching.  It can replace the ‘if … then … else …’ construct, and can be easier to read.  It also has the advantage that if you haven’t considered all cases in the pattern matching, OCaml will warn you so.  Just for this…

  • Learning About Names and Functions in OCaml

    In chapter 2 of OCaml from the very beginning, I learned the following: Naming an expression Use the following constructs to define our own name (e.g., x) to stand for the result of evaluating an expression: let x = (expression) ;; let x = (expression) in (another expression) ;; OCaml replies to confirm that an…

  • OCaml – from the very beginning

    I’m going to deep dive the language of OCaml and become an expert of this language.  Why OCaml?  Because I want to write programs that make no mistakes, and OCaml seems to help with that.  As explained in this website ‘OCaml is a general purpose programming language with an emphasis on expressiveness and safety……it (OCaml)…

  • Communication Skills

    To be an awesome software engineer, not only should you write awesome code, you should collaborate with people well.  May it be your boss, your co-workers, your clients etc, you need to understand their needs and know how to get the stuff done the best way. With a BBA degree and two years of experience…

  • Algorithms

    To be an awesome software engineer, you should know the common algorithms and data structure well.  I’m starting my algorithms learning with this book.  It is commonly regarded as the best book for learning algorithms.  I’ll go through this book chapter by chapter, and work on the exercises as I finish each chapter.