Open nelsonic opened 7 years ago
https://elixirschool.com/lessons/basics/pattern-matching/
https://elixirschool.com/lessons/basics/control-structures/#if-and-unless
https://elixirschool.com/lessons/basics/control-structures/#case
https://elixirschool.com/lessons/basics/control-structures/#cond
https://elixirschool.com/lessons/basics/control-structures/#with
https://elixirschool.com/lessons/basics/functions/
https://elixirschool.com/lessons/basics/functions/#function-naming-and-arity
https://elixirschool.com/lessons/basics/functions/#private-functions
https://elixirschool.com/lessons/basics/functions/#guards
https://elixirschool.com/lessons/basics/functions/#default-arguments
https://elixirschool.com/lessons/basics/pipe-operator/ There are much better pipe operator examples on: https://stackoverflow.com/questions/41584737/how-does-pipe-operator-in-elixir-work
https://elixirschool.com/lessons/basics/modules/
https://elixirschool.com/lessons/basics/documentation/
Note: Dogbert to the rescue: https://stackoverflow.com/questions/42504226/elixir-module-was-not-compiled-with-docs ... ๐
https://elixirschool.com/lessons/basics/documentation/#documenting-functions
https://elixirschool.com/lessons/basics/documentation/#exdoc
https://elixirschool.com/lessons/basics/documentation/#installing
https://elixirschool.com/lessons/basics/documentation/#generating-documentation
Further reading:
https://elixirschool.com/lessons/basics/testing/
https://elixirschool.com/lessons/basics/testing/#assert
https://elixirschool.com/lessons/basics/testing/#assertreceive there's a gap in this section of the tutorial ... it does not explain how to use assert_receive ... but that's OK! because we aren't going to use it for now! ๐
https://elixirschool.com/lessons/basics/testing/#captureio-and-capturelog
https://elixirschool.com/lessons/basics/testing/#test-setup
https://elixirschool.com/lessons/basics/testing/#mocking AMEN! :shipit:
https://elixirschool.com/lessons/basics/comprehensions/
This is soooooo cool! ๐ฎ
https://elixirschool.com/lessons/basics/iex-helpers https://elixirschool.com/lessons/basics/iex-helpers/#autocomplete
https://elixirschool.com/lessons/basics/iex-helpers/#iexexs
https://elixirschool.com/lessons/basics/iex-helpers/#h
https://elixirschool.com/lessons/basics/iex-helpers/#i
https://elixirschool.com/lessons/basics/iex-helpers/#s
https://elixirschool.com/lessons/basics/iex-helpers/#t
Totes finished the "basic" level in Elixir School. easy. AMA! ๐
Obviously my laptop is a bit slower than the author's ... ๐ But apparently that's not a "bad" thing ... https://twitter.com/dominictarr/status/629992939738005504
Obviously this code will/would work if we use valid filename and palette variables... see: https://github.com/yuce/png
sweet. ๐ญ
https://elixirschool.com/en/lessons/advanced/error-handling/#error-handling
typed example:
got error as opts
is undefined. (obviously) but unclear from example... (unfriendly to beginners)
https://elixirschool.com/en/lessons/advanced/error-handling/#after File.open docs: https://elixir-lang.org/getting-started/io-and-the-file-system.html
https://elixirschool.com/en/lessons/advanced/error-handling/#new-errors
https://elixirschool.com/en/lessons/advanced/error-handling/#throws
(no longer used in new
elixir code, but need to be aware of it...)
https://elixirschool.com/en/lessons/advanced/error-handling/#exiting
https://elixirschool.com/en/lessons/advanced/escripts/
https://elixirschool.com/en/lessons/advanced/escripts/#parsing-args
https://elixirschool.com/en/lessons/advanced/escripts/#building
Initially it did not work ... ๐
defined as :main_module could not be loaded
found answer: https://elixirforum.com/t/cant-find-the-module-in-the-escript-made-by-one-mix-exs-file-at-runtime/2838/6
updated mix.exs
to:
defmodule Example.Mixfile do
use Mix.Project
def project do
[app: :example,
version: "0.1.0",
escript: escript(),
elixirc_paths: ["."],
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()
]
end
def escript do
[main_module: Example.CLI]
end
end
and cli.ex
to:
defmodule Example.CLI do
def main(args \\ []) do
args
|> parse_args
|> response
|> IO.puts
end
defp parse_args(args) do
{opts, word, _} =
args
|> OptionParser.parse(switches: [upcase: :boolean])
{opts, List.to_string(word)}
end
defp response({opts, word}) do
if opts[:upcase], do: String.upcase(word), else: word
end
end
Now builds:
https://elixirschool.com/en/lessons/advanced/concurrency/ https://elixirschool.com/en/lessons/advanced/concurrency/#processes
https://elixirschool.com/en/lessons/advanced/concurrency/#message-passing got error:
Tried again from scratch: worked. Don't know what was wrong, but re-typing everything carefully worked. ๐
https://elixirschool.com/en/lessons/advanced/concurrency/#process-linking
https://elixirschool.com/en/lessons/advanced/concurrency/#process-monitoring
https://elixirschool.com/en/lessons/advanced/concurrency/#agents
https://elixirschool.com/en/lessons/advanced/concurrency/#tasks
https://elixirschool.com/en/lessons/advanced/otp-supervisors/#configuration https://elixirschool.com/en/lessons/advanced/otp-supervisors/#strategies https://elixirschool.com/en/lessons/advanced/otp-supervisors/#nesting https://elixirschool.com/en/lessons/advanced/otp-supervisors/#task-supervisor Examples aren't clear. Will read this in more detail when I need it! ๐
https://elixirschool.com/en/lessons/advanced/metaprogramming/#quote
https://elixirschool.com/en/lessons/advanced/metaprogramming/#unquote
https://elixirschool.com/en/lessons/advanced/metaprogramming/#macros
The Logger
Example is kinda useless (not very beginner friendly...)
How exactly are we meant to run this example code? ๐
https://elixirschool.com/en/lessons/advanced/metaprogramming/#debugging
https://elixirschool.com/en/lessons/advanced/metaprogramming/#private-macros no example for private macros (why/when would you need them...?)
https://elixirschool.com/en/lessons/advanced/metaprogramming/#macro-hygiene
https://elixirschool.com/en/lessons/advanced/metaprogramming/#binding
https://elixirschool.com/en/lessons/advanced/typespec/
https://elixirschool.com/en/lessons/advanced/typespec/#specification
https://elixirschool.com/en/lessons/advanced/typespec/#custom-types (just intro) https://elixirschool.com/en/lessons/advanced/typespec/#defining-custom-type
https://elixirschool.com/en/lessons/advanced/typespec/#documentation-of-types
https://elixirschool.com/en/lessons/advanced/behaviours/ The example is incomplete. ๐ข The "advanced" lessons aren't as useful because the examples are isolated and theoretical. Instead it should build up a mini-project that uses the various features similar to how the Elixir book does.
Anyway, for behaviours, see: https://elixir-lang.org/getting-started/typespecs-and-behaviours.html
https://elixirschool.com/en/lessons/advanced/gen-stage/
https://elixirschool.com/en/lessons/advanced/gen-stage/#getting-started
https://elixirschool.com/en/lessons/advanced/gen-stage/#producer
https://elixirschool.com/en/lessons/advanced/gen-stage/#producer-consumer
https://elixirschool.com/en/lessons/advanced/gen-stage/#consumer
https://elixirschool.com/en/lessons/advanced/gen-stage/#putting-it-all-together
https://elixirschool.com/en/lessons/advanced/gen-stage/#multiple-producers-or-consumers
https://elixirschool.com/en/lessons/advanced/gen-stage/#use-cases found a better example: https://github.com/pcmarks/genstage_example
https://elixirschool.com/en/lessons/advanced/protocols/ (just intro/reading) https://elixirschool.com/en/lessons/advanced/protocols/#what-are-protocols
https://elixirschool.com/en/lessons/advanced/protocols/#implementing-a-protocol with working to_string(Tuple):
Implementing a new
protocol:
works:
and thus concludes the "Advanced" section of Elixir School!
Quick pomodoro break: https://www.youtube.com/watch?v=RM7lw0Ovzq0&list=PLQw3xggCuGQUdd7reYR1SoUW5SvkQyNEY
"Quick" in the loosest possible sense of the word ... ๐ I watched a few of Jay-Z's videos ... ๐ถ ๐ง
but now I'm$.ready()
forplug
! ๐
https://elixirschool.com/en/lessons/specifics/plug/ https://elixirschool.com/en/lessons/specifics/plug/#dependencies
https://elixirschool.com/en/lessons/specifics/plug/#the-specification
https://elixirschool.com/en/lessons/specifics/plug/#configuring-the-projects-application-module
Totes Works!
https://elixirschool.com/en/lessons/specifics/plug/#plugrouter
Update lib/example.ex
to Example.Router
:
Works as expected:
https://elixirschool.com/en/lessons/specifics/plug/#adding-another-plug
https://elixirschool.com/en/lessons/specifics/plug/#making-the-http-port-configurable
update ./config/config.exs
to include config :example, cowboy_port: 8080
https://elixirschool.com/en/lessons/specifics/plug/#testing-a-plug run the test:
Further reading: https://github.com/elixir-plug/plug#available-plugs
https://elixirschool.com/en/lessons/specifics/ecto/ https://elixirschool.com/en/lessons/specifics/ecto/#setup
mix new exampleapp --sup
https://elixirschool.com/en/lessons/specifics/ecto/#repository
missed a step: add ExampleApp.Repo
to config.exs
:
use Mix.Config
config :exampleapp, ecto_repos: [ExampleApp.Repo]
then run: mix ecto.gen.repo
https://elixirschool.com/en/lessons/specifics/ecto/#supervisor
https://elixirschool.com/en/lessons/specifics/ecto/#configuration
https://elixirschool.com/en/lessons/specifics/ecto/#mix-tasks
https://elixirschool.com/en/lessons/specifics/ecto/#migrations
mix ecto.gen.migration users
mix ecto.migrate
https://elixirschool.com/en/lessons/specifics/ecto/#models
unclear from the intro to models
where we should put our Users model...! ๐
so putting it in ./models/user.ex
:
https://elixirschool.com/en/lessons/specifics/ecto/#querying again zero indication where we should put the code!!
https://elixirschool.com/en/lessons/specifics/ecto/#basics just shows some basic ecto queries. useless without any sample data!
https://elixirschool.com/en/lessons/specifics/ecto/#changesets
There doesn't appear to be any continuity after this ... ๐ Again, I think we need an "end-to-end" tutorial ...
https://elixirschool.com/en/lessons/specifics/eex/
https://elixirschool.com/en/lessons/specifics/eex/#evaluation
https://elixirschool.com/en/lessons/specifics/eex/#definitions again totally unclear where I'm meant to put the code ... but here goes: Worked:
https://elixirschool.com/en/lessons/specifics/eex/#tags
tried it in greeting.eex
:
https://elixirschool.com/en/lessons/specifics/eex/#engine
done. โ
https://elixirschool.com/en/lessons/specifics/ets/ https://elixirschool.com/en/lessons/specifics/ets/#creating-tables
https://elixirschool.com/en/lessons/specifics/ets/#table-types
https://elixirschool.com/en/lessons/specifics/ets/#inserting-data
https://elixirschool.com/en/lessons/specifics/ets/#data-retrieval
https://elixirschool.com/en/lessons/specifics/ets/#simple-matches
https://elixirschool.com/en/lessons/specifics/ets/#advanced-lookup
https://elixirschool.com/en/lessons/specifics/ets/#deleting-data
https://elixirschool.com/en/lessons/specifics/ets/#removing-tables
https://elixirschool.com/en/lessons/specifics/ets/#example-ets-usage
simplecache.ex
https://elixirschool.com/en/lessons/specifics/ets/#disk-based-ets
done. sleep time ... ๐ด ๐ค
https://elixirschool.com/en/lessons/specifics/mnesia/ finally!!! ๐
https://elixirschool.com/en/lessons/specifics/mnesia/#when-to-use
https://elixirschool.com/en/lessons/specifics/mnesia/#nodes
went off on a slight tangent reading: https://dba.stackexchange.com/questions/84/mnesia-advantages-and-differences which took me to many other places! but in the interest of getting back on track (i'm not going to paste lots more links here...) where was I...? ๐ค
https://elixirschool.com/en/lessons/specifics/mnesia/#starting-mnesia
https://elixirschool.com/en/lessons/specifics/mnesia/#creating-tables
https://elixirschool.com/en/lessons/specifics/mnesia/#the-dirty-way
https://elixirschool.com/en/lessons/specifics/mnesia/#transactions and
https://elixirschool.com/en/lessons/specifics/mnesia/#using-indices
Retrieving based on :job
index:
https://elixirschool.com/en/lessons/specifics/mnesia/#match-and-select
Mnesia.select/2
: http://erlang.org/doc/man/mnesia.html#select-2
https://elixirschool.com/en/lessons/specifics/mnesia/#data-initialization-and-migration code:
done. (barely scratch the surface, but at least we know the super-basics!)
https://elixirschool.com/en/lessons/specifics/debugging/ Took absolute ages to check 380 on my "crappy ol' laptop" and didn't output time taken ...!
https://elixirschool.com/en/lessons/specifics/debugging/#static-analysis-of-code
https://elixirschool.com/en/lessons/specifics/debugging/#debugging
https://elixirschool.com/en/lessons/specifics/debugging/#creating-breakpoints
Disable / Delete a breakpoint:
onto Guardian ...?
pretty close to finishing (all of) Elixir School, why not do the Guardian lesson...? ๐ https://elixirschool.com/en/lessons/libraries/guardian/
https://elixirschool.com/en/lessons/libraries/guardian/#jwts I'm quite familiar with JWTs ... ๐
https://elixirschool.com/en/lessons/libraries/guardian/#setup
mix new MyApp
cd MyApp
https://elixirschool.com/en/lessons/libraries/guardian/#minimal-setup
config/config.ex
:
lib/my_app/guardian_serializer.ex
>> lib/guardian_example/guardian_serializer.ex
https://elixirschool.com/en/lessons/libraries/guardian/#http-requests
"Guardian doesnโt require Phoenix, but using Phoenix in the following examples will be easiest" right... ๐
The guardian example is incomplete and thus confusing to beginners. I'm disappointed. We can/will do better. see: https://github.com/dwyl/learn-phoenix-framework/issues/93
The Last Lesson in Elixir School!! ๐ฎ https://youtu.be/GVUTiuPuxMc
https://elixirschool.com/en/lessons/libraries/poolboy/
https://elixirschool.com/en/lessons/libraries/poolboy/#installation
https://elixirschool.com/en/lessons/libraries/poolboy/#the-configuration-options
Note: actual configuration below.
https://elixirschool.com/en/lessons/libraries/poolboy/#configuring-poolboy
https://elixirschool.com/en/lessons/libraries/poolboy/#creating-worker
https://elixirschool.com/en/lessons/libraries/poolboy/#using-poolboy
Ok. this is a joke. it would have been trivially easy to make this lesson good. instead it assumes that people magically know where to put the code! Utterly useless! I'm exceedingly disappointed with these lass two lessons. They should have a massive "Work In Progress" label on them cause they aren't finished!! I'm going to FIX this!!
My plan is go through all of the Elixir School Lessons and log my progress! ๐ค
https://elixirschool.com/lessons/basics/basics/
https://elixirschool.com/lessons/basics/collections/
https://elixirschool.com/lessons/basics/enum/