Skip to main content

Posts

Building an AI Agent with Laravel

Building with AI Agents

Laravel Cloud

Laravel Cloud  

Laravel: ChatGPT and Livewire

Laravel APIs. Using the Command Handler Pattern (Part 2)

Laravel APIs. Using the Command Handler Pattern (Part 1)

SQLite Studio (a quick walkthrough)

PHP and Laravel Development: A 17-part video series

 Enjoy!

Introduction to Rails: An eleven-part series

View FULL YouTube playlist First of 11 videos: Enjoy!

Elixir: Pattern Matching - A Taste of Functional Programming

=  is a match operator After an initial assignment it then becomes a match assertion. num = 1 To check the match assertion you can try this and it will be valid 1 = num Furthermore, these are also valid: [1] = [1] [num] = [num] Destructuring [score1, score2, score3] = [89, 93, 87] IO.puts score1  # 89 IO.puts score2  # 93 IO.puts score3  # 87 {:ok, value} = {:ok, 1000} IO.puts value # 1000 {:error, message} = {:error, "Uh oh"} IO.puts message # "Uh oh" Error when matching: {:foo, value} = {:bar, "nope"} ** (MatchError) no match of right hand side value: {:bar, "nope"} Matching function arguments Various function definitions and subsequent calls: def sum_two_nums(num1, num2) do num1 + num2 end sum_two_nums(2,5) def sum_two_nums(%{num1: num1, num2: num2}) do num1 + num2 end sum_two_nums(%{num1: 2, num2: 5}) def sum_two_nums([num1, num2]) do num1 + num2 end sum_two_nums([2,5]) There's so much more you ...

Elixir: Anonymous Functions - A Taste of Functional Programming

An anonymous function is composed of an optional parameter list, a body enclosed by fn -> and end . It returns a function definition and the potential for the function to be executed. Quite simply the anonymous function can be assigned to a variable which then can be subsequently called. Define an anonymous function:, greet = fn -> IO.puts "Hello World" end Of course that does nothing unless we call it! We can do that by using this dot notation - [function name].([optional parameters]) Like this: greet.() Where the output is: Hello World Anonymous functions with parameters add = fn(num1, num2) -> num1 + num2 end IO.puts add.(10, 15) IO.puts add.(12, 15) IO.puts add.(14, 19) subtract = fn num1, num2 -> num1 - num2 end IO.puts subtract.(15, 10) Output: 25 27 33 5 I hope these examples ignite an interest for you to further learn functional programming using Elixir. Cheers! Other posts in this series: A Taste of Functional Programming A...

A Taste of Functional Programming

Objectives Ignite an interest in those who have never explored functional programming before Exposure to functional concepts Use functional parts of your existing language of choice you've never used before  Lead you to pursue a functional language more in-depth Paradigm Evolution Mathematics Computer Science Spawn of languages functional procedural imperative declarative object-oriented programming OOP Limitations " We’re going to be living in a multicore, distributed, concurrent — all the buzz words — world. The conventional models we’ve been doing, the OO stuff… is not going to survive in that kind of environment. " - Dave Thomas " OOP promised a cure for the scourge of software complexity. …its weaknesses have become increasingly apparent. Spreading state all over the place leads to concurrency issues and unpredictable side effects. " - Dave Thomas Thinking in Functions Functions Easy to reason about Reliable Pur...

Learn Elixir: Building a Neural Network from Scratch (Video)

Video of my ElixirDaze Talk

AngularJS 101: A Beginner's Tutorial

Below is the PDF article I submitted to Software Developer's Journal  for their series they did on AngularJS. It was published in two of their issues: Nov. 15th 2013 -  AngularJS, Java and Drupal Tips & Tricks and Nov. 7th 2013 -  AngularJS Starter Kit . It's behind a paywall and thus hidden from most of the world. That sucks... which is why I'm posting my article here for all to see. Enjoy! AngularJS 101: A Beginner's Tutorial Github code for application built in the tutorial

Screencasts on Engine Yard

Engine Yard asked if my screencasts could be added to their listing. I said 'yes'! It's great to know that the screencasts I made several years ago can still help others learning Ruby today!

Introduction to Erlang

This is my second talk related to Erlang. Both have been introductory and well received. I hope you enjoy my slide presentation. I also did a chat demo using real-time updates using Comet. Presented at Silicon Valley Web Builders meetup Introduction to Erlang Presentation Chat Demo code Erlang web framework used: Nitrogen

Beginning Erlang for Ruby Developers

If you missed my "Beginning Erlang for Ruby Developers" here is a link to the presentation. https://beg-erlang-for-ruby-devs.herokuapp.com/