Code Monkey home page Code Monkey logo

abitdodgy.github.io's Introduction

Mohamad El-Husseini

A senior technology leader, tenacious problem-solver, building digital products since web 1.0. Enthusiastic and passionate about learning and helping others learn.

Currently in charge of Technology at Kovi, helping transform ubran mobility in LATAM. Previously in charge of consumer and enterprise commerce products at Obramax, Adeo, where I helped millions of customers build their dream projects.

abitdodgy.github.io's People

Contributors

abitdodgy avatar

Watchers

 avatar  avatar

abitdodgy.github.io's Issues

How we built our activity feed

I should write a post about how we built our activity feed, and the limitations we had. Specifically, I should outline the requirements, and how they changed from open/closed to open/closed with access.

  1. Privacy conditions
  2. Scalability and backgrounding
  3. Querying
  4. Testing
  5. Outcome
  6. Improvements

Studying-todos

  • Read Introduction to Algorithms.
  • Re-read Programming Elixir 1.2
  • Build something with Elixir.
  • Re-read the latest edition of Programming Phoenix, especially the OTP and testing chapters.
  • Finish reading Build Awesome Command-Line Applications with Ruby 2.
  • Complete the Elixir-TV video course.
  • Complete the Swift courses on Udemy.
  • Complete Head First Design Patterns on Safari Books.
  • Read the Gang of Four Design Patterns on Safari Books.
  • Choose an iOS side project to work on.
  • Look into Big Nerd Ranch Guide on iOS.
  • Master recursion using the Scheme book (nothing to do with the Scheme language).
  • Build something with Phoenix.
  • Buy Grokking Algorithms
  • Look into researching and solving some of these.
  • Recursion via Towers of Hanoi
  • Finish playing through Ruby Monk.
  • Finish playing through the Ruby Track on Exercism.
    Perhaps I can write a command-line app that uses Gibran or WordsCounted as a book project.

How to avoid using callbacks

This is an idea for a blog post about callbacks. It should discuss:

  1. Why are callbacks usually a bad idea.
  2. Techniques to avoid using callbacks, using:
    1. Using custom crud methods
    2. Using service objects
    3. Using custom setter and getter methods.
  3. When using callbacks is acceptable.

Why are callbacks a bad idea?

They have unintended consequences. Show examples of how they've complicated our lives, especially when building the activity feed for bulk actions.

Techniques to avoid using callbacks

Using custom crud methods we can replace:

class Order
  has_many :line_items

  before_create :set_total!

private

  def set_total!
    self.total = line_items.sum(:price)
  end
end

With...

class Person
  has_many :line_items

  def dispatch!
    set_total! and save
  end

private

  def set_total!
    self.total = line_items.sum(:price)
  end
end

When using callbacks is acceptable

Are there times when we can safely use callbacks? When and why? Why is it better than any of the previous techniques?

Creating an OOP version of Snakes and Ladders

This would be a nice tutorial to dive into. The current production version can be one post. And the refactoring as the result of the code review can be a follow up.

It would be nice to give this a crack in Elixir as well.

Newbie mistakes when working with enums

  1. Using the wrong column type.
  2. Not being aware of the methods that enums make available.
  3. Not using enums in the views to generate links and forms.
  4. Validating enums
  5. Not passing them on as values, but rather checking them in the params using conditionals.
  6. Not adding database indexes.
  7. Not using them with associations and scopes.

What else?

Math

  1. Understand the Problem. What is the problem asking for?
  2. Identify the knowns and unknowns. All math problems give known information and ask you to find unknown values. What information is known? What is not?
  3. Translate the problem from English into math notation. This exposes the relationship between known and unknown values, and eventually takes the form of an equation.
  4. Solve the problem. If we have an equation, we can solve it.
  5. Validate the answer. Plug it into the original equation to see if it's correct.
  6. Khan Academy.
  7. The Calculus Lifesaver

Study recursion in computer science

This is a deep topic and involves more than writing simple recursive functions to replace iteration with for and while. Binary trees, for example, are a great way to learn some fundamental concepts in CS including recursion. Had I been familiar with recursion, going through Programming Elixir might have been faster and easier. Learning recursion in depth will also teach me about data structures in depth.

Book recommendations:

Resources:

Jeff Atwood's article on classic computer science problems is a great resource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.