Harfang's Perch

  • Posts
  • About
  • RSS
  • Atom
  • English
  • 한국어
  • Elixir as First Programming Language (Part 1)

    2016-11-14

    This post is adapted from my talk at Seoul Elixir Meetup on November 16, 2016.

    Elixir might not be the first language that comes to your mind when you think about which programming language to teach to beginners. Languages like Python, Ruby, JavaScript, C/C++, or Java are more popular choices. But I think Elixir has some unique advantages that makes it a serious candidate.

    Read more
  • How to XOR Bitstrings in Elixir

    2016-11-07

    tl;dr

    Use :crypto.exor/2 from crypto module in Erlang standard library.

    Chronicle of My Decent into Rabbit Hole

    It started with a simple quiz from Cryptography course in Coursera. I was given a plain text (pt) and a cipher text (ct) encrypted with one-time pad, so I just had to do an XOR of ct and pt to figure out the one-time pad key.

    I didn’t know how to do that in Elixir, so I decided to figure it out.

    Read more
  • Thank You, Ruby Rogues

    2016-10-31

    So I’ve finally caught up with all the old Ruby Rogues episodes. At this point there are 283 episodes in total, each about an hour long. I started listening to the podcast around the beginning of 2016, so that means I listened to at least an hour of Ruby Rogues everyday. It’s no wonder that I can vividly replay Chuck Maxwood, the host of the show, and other long-time panelists’ voices and laughters in my head.

    First of all, I would like to thank Chuck, panelists, guests, and the other staff who brought this show together and who are still keeping this show going over 5 years. It’s hard to describe how tremendously valuable this show has been to me, and how grateful I am for its existence.

    Read more
  • Educational Potential of Languages and Frameworks

    2016-10-24

    Just like most of new Ruby on Rails developers, I ended up creating a Lovecraftian nightmare of huge tangled models in my first project. It’d have been nice to have an experienced developer to prevent me from making that mess. Unfortunately, I didn’t have one. I had to figure a way out of it on my own.

    Reading through numerous blog posts, I found out that it was not just me. This problem was caused by the way Rails used Active Record pattern, and was prevalent among many Rails developers. I could even see some kind of historical eras of Rails application structure: the Fat Controller Age, the Fat Model Age, and the Plain Old Ruby Object Age. There were other solutions too. For example, Ruby Object Mapper and Hanami framework used Data Mapper pattern to replace Active Record pattern entirely.

    When many people end up making the same mistakes, it can no longer be attributed to the individuals. That’s a sign that there’s a design flaw in Rails that repeatedly misleads people into making those mistakes. But I’m fine with the fact that it has flaws. After all, there’s no such thing as a perpetually perfect system, and Rails got far more things right than wrong.

    Read more
  • What Is JSON Web Token (JWT)?

    2016-10-17

    I needed an authentication system for my application, so I looked at the existing libraries for Elixir and found some promising ones, such as ueberauth, guardian, and openmaize.

    I started to look into how they did things, then I came across a discussion about JWT in authentication. Now then what the hell is JWT? All I know at this point is that it’s another acronym that I don’t know. I swear that this field is at least as obsessed with acronyms as the military, and that’s definitely not a compliment.

    Read more
  • List of Outdated Example Code in Programming Phoenix

    2016-10-10

    If you follow the code examples in Programming Phoenix book now, there are several broken ones that will cause error, fail to pass test, or show deprecation warning. I documented such codes from the book and how to resolve them.

    Read more
  • Using Emmet to Type <%= %> in erb or eex

    2016-10-03

    Emmet is a lifesaver. Writing HTML used to be so painful and annoying that I had to groan at every single closing tag. Now I don’t have to do that. If you write HTML documents but still do not use Emmet, you should definitely try it. It supports pretty much all major editors: check it out here.

    Read more
  • How to Think About Technology Stack as a Head of Company

    2016-09-26

    Recently I had a chance to meet and talk with several aspiring entrepreneurs. They all had different business ideas but our conversations eventually converged on one common problem they had: they didn’t have enough knowledge to make an informed decision on which technology to use to build software, and were feeling helpless. That lack of knowledge also led them to form some potentially harmful misunderstandings about software technology.

    This post is a summary of the advice I gave them. It aims at dispelling some misunderstandings commonly held by entrepreneurs with no software background.

    Read more
  • Manage Dotfiles With a Bare Git Repository

    2016-09-19

    After switching from Sublime Text to vim, I started looking for a way to manage my dotfiles. It took me a lot of work to configure and understand them, so I wanted to back them up against emergency. And of course I wanted to have those personal settings wherever I work.

    At first I considered Vagrant, but it seemed like an overkill for just a few dotfiles. My next idea was to symlink dotfiles to a single directory and manage that folder with git. But that also felt unnecessarily complex - surely there would be a simpler way to do this, right?

    And then I found what I was looking for. This method uses a git bare repository, and aliasing git commands to send them to that repo. Simple setup process? Check. Version control in git? Check. Easy installation on different machine? Check. Awesome!

    Read more
  • Sandi Metz's Advices for Better Code

    2016-09-12

    I’ve recently finished reading the Practical Object-Oriented Design in Ruby by Sandi Metz. I heard a lot of good things about the book and it was definitely worth reading - I highly recommend it too!

    Read more
1 2 3 4 5 6