← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 185
  1. Comments and word-wrap

    Since almost as long as compilers have been around there have been attempts to store source code as something other than plain text.

  2. Elm open source model

    There was a thread on the Elm discourse regarding the communcation of expectations when contributing to Elm.

  3. Elm and comma separated lists

    In Elm comma separated lists (and records and tuples) are traditionally written with the comma on the next line preceding the next item like: elements : List (Html msg) elements = [ title , introduction , mainImage , mainContent , conc…

  4. Indent with two or four spaces

    I’ve always indented Elm with four spaces.

  5. Delete this comment

    This morning someone posted their snake game implementation to the Elm discourse asking for feedback on their implemenation.

  6. My opinionated import style

    In Elm it’s possible to import a name from a module in two ways, you can either import the module and expose the name, or import the module, perhaps aliasing the module name, and then qualify the use of the target entity.

  7. Files as modules

    Elm has followed many other languages in equating a file to some form of encapsulation unit, in the case of Elm this is a module, much like it is in Haskell, Java used a class.

  8. Less is more security (sometimes)

    We have an application that uses a login token which expires.

  9. Or patterns

    Elm is famously pretty conservative when it comes to adding language features/syntax.

  10. Defensive programming is generally defined using terms such as ‘impossible’, one definition on the c2 wiki has Defend against the impossible because the impossible will happen.

  11. Elm has extensible records, you can write a type like { a | x : Int } which means a record type that has at least a field named x of type Int but may have other fields as well.

  12. Elm catalog

    Alex Korban has released another version of his Elm Catalog.

  13. CLR, Purescript, and Elm

    I’m going to talk about the common-language-runtime, and use this to contrast Purescript and Elm.

  14. The builder pattern seems to be prettty popular in Elm, here is an elm-radio episode dedicated to it.

  15. Camel case vs snake case

    Musings on my extremely mild preference for snake-case over camel-case

  16. Conditional refactorings

    I have been reading through some of the source code from the requests library.

  17. Scottish Local Elections 2017

    I wanted to compare the manifestos for the local elections so I did a quick search but it came up with nothing.

  18. Poker puzzle

    Bill the lizard has an excellent post describing an interesting puzzle as to the most desirable full house in a game of poker.

  19. Developing a small web application I recently had reason to upgrade from Python 3.4 to Python 3.6.

  20. Flask and Pytest coverage

    I have written before about Flask and obtaining test coverage results here and with an update here.

  21. Python and Lambdas

    I come from a functional programming background, so I a lot of love for functions and so-called anonymous functions or lambdas.

  22. Minor Refactorings

    Looking through the code of an open-source Python project I came across code that amounts to the following: host_name = self.connection.getsockname()[0] if self.server.host_name is not None: host_name = self.server.host_name This looks odd

  23. List arguments and isinstance

    More than a decade and a half ago, Kragen Javier Sitaker wrote a blog post isinstance() considered harmful, a lot of which I believe holds up pretty well today.

  24. Login not required pattern

    Introduction Typically routes in a web application that require login are explicitly marked as such.

  25. if as syntax possibility

    I have a small niggle that comes up in my Python programming.

  26. Lazy calculation

    In many cases whilst programming there is a decision to be made as to whether to store some state, or (re)caluate it as and when needed.

  27. Covering dead code

    Dougal Matthews has written a blog post detailing how Vulture can be used to find some dead code.

  28. Introduction I do not aim to answer the question in the title more raise the question.

  29. Selenium and Javascript Events

    Selenium is a great way to test web applications and it has Python bindings.

  30. Method Cascading

    Method Cascading Vasudev Ram has a thoughful post about method chaining/cascading that I picked up from planet python in which he basically argues for the use of method cascading.

  31. Test First and Mutation Testing

    Test First and Mutation Testing I’m going to argue that mutation testing has a strong use in a test first development environment and I’ll conclude by proposing a mechanism to link mutation testing to the source code control mechanism to further aid test…

  32. Placement of Python Import Statements Pep 8 specifies that all import statements should be “put at the top of the file, just after any module comments and docstrings, and before module globals and constants.”

  33. Update Flask and Coverage

    Update: Flask+Coverage Analysis In a previous post I demonstrated how to get coverage analysis working for a Flask web application in a relatively simple manner.

  34. Flask and Coverage Analysis

    Flask + Coverage Analysis This post demonstrates a simple web application written in Flask with coverage analysis for the tests.

  35. Selenium vs CasperJS

    Suppose you have a web service using a Python web framework such as Flask.