1,122 Matching Annotations
  1. May 2017
  2. Apr 2017
    1. The choice between maps, structs, and keyword lists, or between string keys and atom keys, is not always clear, and improper decisions can lead to headaches. This article promotes simple guidelines to keep the Elixir programmer out of trouble: Use string-keyed maps for data which has just arrived from an external source. Convert external data to structs as soon as possible. Use ExConstructor or something similar to abstract away the handling of string-keyed maps. Use structs almost everywhere else in your program. Use other atom-keyed maps sparingly. Use keyword lists only to provide arguments to a function. These rules of thumb have improved the quality of our code here at Appcues, and we hope they can help you out too.
  3. Mar 2017
  4. Feb 2017
    1. Just reading an interesting document wherein elixir takes an important placehttp://arxiv.org/pdf/1601.05976.pdf49 . BPM (business process management), for those who never heard of it, is a sort of Model Driven Development; in BPM you model a workflow / process mostly visual and use this model for execution. So the process that was hidden in your code becomes visible and maintainable for business specialists (I mean specialists that do not code). It can be used together with other MDD parts like BRM (business rules management). Here the rules are extracted out of the code. Even the screen / form builder where you visually compose your forms is a form of MDD. You can choose to create executable models (for example an xml or json that can be interpreted by your code), generate code based on your model or choose a mix. I prefer executable models. Here a company that did a lot of research which names key advantages: https://www.mendix.com/blog/the-power-of-mendix/30 .
    1. In this paper, we propose to rethink the dominantlogic of how to model business processes. We think that an actorbased approach supports in a much better way the fundamentalnature of business processes. We present a proposal for a compilerarchitecture to model and execute business processes as a setof communicating microservices that are hosted on a generalpurpose virtual machine for distributed execution.
  5. Jan 2017
    1. sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

      sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

  6. Dec 2016
    1. Sometimes you may want to manually generate a token, for example to return a token to the user immediately after account creation. You can do this as follows:
    1. The real benefit of JSONB: IndexesWe want our application to be fast. Without indexes, the database is forced to go from record to record (a table scan), checking to see if a condition is true. It’s no different with JSON data. In fact, it’s most likely worse since Postgres has to step in to each JSON document as well.

      This solves the problem of the last implementation I handled where json (not jsonb) data was stored in postgres

    1. When you’re picking a data store, the most important thing to understand is where in your data — and where in its connections — the business value lies. If you don’t know yet, which is perfectly reasonable, then choose something that won’t paint you into a corner. Pushing arbitrary JSON into your database sounds flexible, but true flexibility is easily adding the features your business needs.

      This is an old article but valuable thinking for system design.

    1. The BSON format used by MongoDB is limited to a maximum of 64 bits for representing an integer or floating point number, whereas the JSONB format used by Postgres does not have this limit. Postgres provides data constraint and validation functions to help ensure that JSON documents are more meaningful: for example, preventing attempts to store alphabetical characters where numerical values are expected. MongoDB offers automatic database sharding for easy horizontal scaling of JSON data storage. Scaling of Postgres installations has often been vertical. Horizontal scaling of Postgres is also possible, but tends to be more involved or use an additional third party solution. MongoDB also offers the possibility of increasing write throughput by deferring writing to disk. The tradeoff is potential loss of data, but this may suit users who have less need to persist their data.

      Good pros and cons of Mongo vs Postgres for JsonB

    1. I am not saying in this conception of adult behavior that one style of being, one form of human existence is inevitably and in all circumstances superior to or better than another form of human existence, another style of being. What I am saying is that when one form of being is more congruent with the realities of existence, then it is the better form of living for those realities. And what I am saying is that when one form of existence ceases to be functional for the realities of existence then some other form, either higher or lower in the hierarchy, is the better form of living. I do suggest, however, and this I deeply believe is so, that for the overall welfare of total man’s existence in this world, over the long run of time, higher levels are better than lower levels and that the prime good of any society’s governing figures should be to promote human movement up the levels of human existence.

      Graves discussed that the patterns appeared to show that higher cognitive complexity world views appeared to be better for the overall welfare of humans