aneta_bielska [:blog]

Benchmarking Elixir - List and Tuple example
#elixir #benchmark

Intro In this post you will get familiar with basics of benchmark tool for elixir. As the title mentioned I am going to test elixir collection types: tuple and list. A note. For my tests I chose Benchee. But there are other benchmark tools, for example Benchfella and Bmark. Benchmark tool setup Setup is quite straight forward. Create a new... Read more

BRUG - Białystok Users Ruby Group - Jan 2017 meeting hightlights
#brug

It has been a while since last BRUG meeting. As usually well organized by Adam Piotrowski. But this time in new place - Hacklag. We had three impressive talks: Petri nets in software engineering by Łukasz Pełszyński PostgreSQL - database or useful tool? by Grzegorz Łuszczek Hanami - RoR alternative? by Bartosz Bonisławski And two not ... Read more

Rails console: six ways to get pretty output
#ruby-on-rails

The problem Dull and difficult to read rails console output. Example: > Movie.first Movie Load (0.3ms) SELECT "movies".* FROM "movies" ORDER BY "movies"."id" ASC LIMIT ? [["LIMIT", 1]] => #<Movie id: 1, title: "Batman", year: 1989, genre: "Action, Adventure", director: "Tim Burton", production: "USA, Great Britain", boxoffice... Read more

Web scraping with Ruby
#ruby #web-scraping

By writing couple lines of code you can get some data you need from a web that does not provide an API. To make it happen we will need HTTP parser. I am going to use Nokogiri. But there are other options. Check ruby toolbox for other tools. Example Add nokogiri to Gemfile: gem 'nokogiri' Then in your file you need to require: require 'nok... Read more

Ruby rake tasks
#ruby #rake

The problem I want to run scripts on server. For example to populate a database. The solution Use rake gem. What is rake? More offical explanation: Rake is a build language, similar in purpose to make and ant. Like make and ant it’s a Domain Specific Language, unlike those two it’s an internal DSL programmed in the Ruby language. In thi... Read more

#servers (1) #hosting (1) #sinatra (2) #assets (1) #sprockets (1) #react-js (1) #data-mapper (1) #ROM (1) #sequel (1) #ORM (1) #pg (1) #sqlite3 (1) #postgresql (1) #ruby (4) #ubuntu (1) #heroku (1) #git (1) #css (3) #cors (1) #same-origin-policy (1) #rake (1) #web-scraping (1) #ruby-on-rails (1) #brug (1) #elixir (1) #benchmark (1)